@fluid-app/portal-sdk 0.1.62 → 0.1.63

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 (119) hide show
  1. package/dist/{AppDownloadScreen-CLWxnFsd.mjs → AppDownloadScreen-DUGGDlr4.mjs} +9 -9
  2. package/dist/{AppDownloadScreen-CH96k5cA.cjs → AppDownloadScreen-DW3cBnbI.cjs} +9 -9
  3. package/dist/{AppDownloadScreen-BH7GQ-qi.cjs → AppDownloadScreen-oMzxBETr.cjs} +2 -2
  4. package/dist/{AppDownloadScreen-BH7GQ-qi.cjs.map → AppDownloadScreen-oMzxBETr.cjs.map} +1 -1
  5. package/dist/{AppDownloadScreen-DcVl4492.mjs → AppDownloadScreen-pm8fLxZX.mjs} +2 -2
  6. package/dist/{AppDownloadScreen-DcVl4492.mjs.map → AppDownloadScreen-pm8fLxZX.mjs.map} +1 -1
  7. package/dist/{CarouselWidget-lx6QKa-q.mjs → CarouselWidget-BGdjG-xz.mjs} +2 -2
  8. package/dist/{CarouselWidget-lx6QKa-q.mjs.map → CarouselWidget-BGdjG-xz.mjs.map} +1 -1
  9. package/dist/{CarouselWidget-B74eKTnT.cjs → CarouselWidget-CC6ZQZ8e.cjs} +2 -2
  10. package/dist/{CarouselWidget-C_Bpw7nB.cjs → CarouselWidget-DgskhtDP.cjs} +2 -2
  11. package/dist/{CarouselWidget-C_Bpw7nB.cjs.map → CarouselWidget-DgskhtDP.cjs.map} +1 -1
  12. package/dist/{ContactsScreen-IAGjo08W.cjs → ContactsScreen-B3k1fVQx.cjs} +2 -2
  13. package/dist/{ContactsScreen-IAGjo08W.cjs.map → ContactsScreen-B3k1fVQx.cjs.map} +1 -1
  14. package/dist/{ContactsScreen-Dk9bp3Jj.mjs → ContactsScreen-CH6u8cRi.mjs} +2 -2
  15. package/dist/{ContactsScreen-Dk9bp3Jj.mjs.map → ContactsScreen-CH6u8cRi.mjs.map} +1 -1
  16. package/dist/{ContactsScreen-B8iWQTbP.cjs → ContactsScreen-C_c2yy5J.cjs} +9 -9
  17. package/dist/{ContactsScreen-C8Bp62F4.mjs → ContactsScreen-ruymx9Pi.mjs} +9 -9
  18. package/dist/{FluidProvider-9JuTycML.cjs → FluidProvider-SnHdl4ww.cjs} +13 -13
  19. package/dist/{FluidProvider-9JuTycML.cjs.map → FluidProvider-SnHdl4ww.cjs.map} +1 -1
  20. package/dist/{FluidProvider-9ZC28GXK.mjs → FluidProvider-uuu90TSG.mjs} +13 -13
  21. package/dist/{FluidProvider-9ZC28GXK.mjs.map → FluidProvider-uuu90TSG.mjs.map} +1 -1
  22. package/dist/{ImageWidget-BLnPO0Ba.mjs → ImageWidget-BHwucvLx.mjs} +2 -2
  23. package/dist/{ImageWidget-BLnPO0Ba.mjs.map → ImageWidget-BHwucvLx.mjs.map} +1 -1
  24. package/dist/{ImageWidget-DbDhysGw.cjs → ImageWidget-BRfKvv08.cjs} +2 -2
  25. package/dist/{ImageWidget-DbDhysGw.cjs.map → ImageWidget-BRfKvv08.cjs.map} +1 -1
  26. package/dist/{ListWidget-D6XZ53U9.cjs → ListWidget-BwyavG5d.cjs} +2 -2
  27. package/dist/{ListWidget-CiV9j7vm.cjs → ListWidget-DAtEwFCR.cjs} +2 -2
  28. package/dist/{ListWidget-CiV9j7vm.cjs.map → ListWidget-DAtEwFCR.cjs.map} +1 -1
  29. package/dist/{ListWidget-DuPrSL9o.mjs → ListWidget-ZqCYH78q.mjs} +2 -2
  30. package/dist/{ListWidget-DuPrSL9o.mjs.map → ListWidget-ZqCYH78q.mjs.map} +1 -1
  31. package/dist/{MediaRenderer-CY2gR7hk.mjs → MediaRenderer-B3R-Q6Qt.mjs} +8 -5
  32. package/dist/MediaRenderer-B3R-Q6Qt.mjs.map +1 -0
  33. package/dist/{MediaRenderer-CkMwv5q1.cjs → MediaRenderer-CRKJcPD9.cjs} +8 -5
  34. package/dist/MediaRenderer-CRKJcPD9.cjs.map +1 -0
  35. package/dist/{MessagingScreen-DpVYlTyB.cjs → MessagingScreen-27HyrQ1V.cjs} +3 -3
  36. package/dist/{MessagingScreen-DpVYlTyB.cjs.map → MessagingScreen-27HyrQ1V.cjs.map} +1 -1
  37. package/dist/{MessagingScreen-BuZTTy-l.cjs → MessagingScreen-C7xDqpLm.cjs} +9 -9
  38. package/dist/{MessagingScreen-RhCqymLN.mjs → MessagingScreen-CGS474IP.mjs} +9 -9
  39. package/dist/{MessagingScreen-DdQPLrmd.mjs → MessagingScreen-tFbOXFq4.mjs} +3 -3
  40. package/dist/{MessagingScreen-DdQPLrmd.mjs.map → MessagingScreen-tFbOXFq4.mjs.map} +1 -1
  41. package/dist/{MySiteScreen-DadI19bJ.cjs → MySiteScreen-B_UnnWDX.cjs} +9 -9
  42. package/dist/{MySiteScreen-DNn3aWn0.cjs → MySiteScreen-C-cS0_qZ.cjs} +2 -2
  43. package/dist/{MySiteScreen-DNn3aWn0.cjs.map → MySiteScreen-C-cS0_qZ.cjs.map} +1 -1
  44. package/dist/{MySiteScreen-Ddxdk1Pe.mjs → MySiteScreen-DR_xY95c.mjs} +2 -2
  45. package/dist/{MySiteScreen-Ddxdk1Pe.mjs.map → MySiteScreen-DR_xY95c.mjs.map} +1 -1
  46. package/dist/{MySiteScreen-Dbvaw1nu.mjs → MySiteScreen-bUfo9RDR.mjs} +9 -9
  47. package/dist/{NestedWidget-7Fn8H4aI.cjs → NestedWidget-BzFrzPFd.cjs} +2 -2
  48. package/dist/{NestedWidget-DS8F_8SN.mjs → NestedWidget-JS_3-isb.mjs} +2 -2
  49. package/dist/{NestedWidget-DS8F_8SN.mjs.map → NestedWidget-JS_3-isb.mjs.map} +1 -1
  50. package/dist/{NestedWidget-C1neMqH7.cjs → NestedWidget-cl38JElu.cjs} +2 -2
  51. package/dist/{NestedWidget-C1neMqH7.cjs.map → NestedWidget-cl38JElu.cjs.map} +1 -1
  52. package/dist/{OrdersScreen-QFndb0Oi.mjs → OrdersScreen-CO9vm0Wj.mjs} +9 -9
  53. package/dist/{OrdersScreen-CwTIkQNI.mjs → OrdersScreen-CQzgIEa4.mjs} +3 -3
  54. package/dist/{OrdersScreen-CwTIkQNI.mjs.map → OrdersScreen-CQzgIEa4.mjs.map} +1 -1
  55. package/dist/{OrdersScreen-CZdh8mbE.cjs → OrdersScreen-JCVS__ag.cjs} +9 -9
  56. package/dist/{OrdersScreen-DpyL3mIg.cjs → OrdersScreen-OexJlI4Y.cjs} +3 -3
  57. package/dist/{OrdersScreen-DpyL3mIg.cjs.map → OrdersScreen-OexJlI4Y.cjs.map} +1 -1
  58. package/dist/{ProductsScreen-CmZw1rWf.mjs → ProductsScreen-B0BsPJth.mjs} +3 -3
  59. package/dist/{ProductsScreen-CmZw1rWf.mjs.map → ProductsScreen-B0BsPJth.mjs.map} +1 -1
  60. package/dist/{ProductsScreen-dN4s469R.cjs → ProductsScreen-BcM3LqsG.cjs} +9 -9
  61. package/dist/{ProductsScreen-CGjMUHds.cjs → ProductsScreen-BgVl8GAm.cjs} +3 -3
  62. package/dist/{ProductsScreen-CGjMUHds.cjs.map → ProductsScreen-BgVl8GAm.cjs.map} +1 -1
  63. package/dist/{ProductsScreen-HaYLhqt1.mjs → ProductsScreen-GOW8lxiN.mjs} +9 -9
  64. package/dist/{ProfileScreen-1hqd2fN7.cjs → ProfileScreen-DFM_r4T5.cjs} +3 -3
  65. package/dist/{ProfileScreen-1hqd2fN7.cjs.map → ProfileScreen-DFM_r4T5.cjs.map} +1 -1
  66. package/dist/{ProfileScreen-DSr0OwIA.mjs → ProfileScreen-Tcqc5WfU.mjs} +9 -9
  67. package/dist/{ProfileScreen-_4yPoIgh.cjs → ProfileScreen-e-uj2ulO.cjs} +9 -9
  68. package/dist/{ProfileScreen-pCW_VAPN.mjs → ProfileScreen-pvpnY0cG.mjs} +3 -3
  69. package/dist/{ProfileScreen-pCW_VAPN.mjs.map → ProfileScreen-pvpnY0cG.mjs.map} +1 -1
  70. package/dist/{ShareablesScreen-DNzrgsmZ.cjs → ShareablesScreen-8rSANBth.cjs} +9 -9
  71. package/dist/{ShareablesScreen-CdXtyZma.cjs → ShareablesScreen-C7M_kGX9.cjs} +3 -3
  72. package/dist/{ShareablesScreen-CdXtyZma.cjs.map → ShareablesScreen-C7M_kGX9.cjs.map} +1 -1
  73. package/dist/{ShareablesScreen-xqMDNJ6m.mjs → ShareablesScreen-KFwyduqD.mjs} +9 -9
  74. package/dist/{ShareablesScreen-Cm8zbATC.mjs → ShareablesScreen-SS9rcLym.mjs} +3 -3
  75. package/dist/{ShareablesScreen-Cm8zbATC.mjs.map → ShareablesScreen-SS9rcLym.mjs.map} +1 -1
  76. package/dist/{ShopScreen-D2cMeKSk.mjs → ShopScreen-Bg696rqv.mjs} +9 -9
  77. package/dist/{ShopScreen-BnVS75fU.cjs → ShopScreen-DCKr0cbB.cjs} +9 -9
  78. package/dist/{ShopScreen-Dc3lQLGI.mjs → ShopScreen-DFWQY8hT.mjs} +4 -4
  79. package/dist/{ShopScreen-Dc3lQLGI.mjs.map → ShopScreen-DFWQY8hT.mjs.map} +1 -1
  80. package/dist/{ShopScreen-qZa0cEwy.cjs → ShopScreen-qgOXPdUf.cjs} +4 -4
  81. package/dist/{ShopScreen-qZa0cEwy.cjs.map → ShopScreen-qgOXPdUf.cjs.map} +1 -1
  82. package/dist/{SubscriptionsScreen-749p5heX.mjs → SubscriptionsScreen-50w7SgWX.mjs} +3 -3
  83. package/dist/{SubscriptionsScreen-749p5heX.mjs.map → SubscriptionsScreen-50w7SgWX.mjs.map} +1 -1
  84. package/dist/{SubscriptionsScreen-DxVV0sZx.mjs → SubscriptionsScreen-BVLHc7-p.mjs} +9 -9
  85. package/dist/{SubscriptionsScreen-DRgSTuJv.cjs → SubscriptionsScreen-DKI17q_K.cjs} +9 -9
  86. package/dist/{SubscriptionsScreen-7VBEggJ_.cjs → SubscriptionsScreen-Vn6EN634.cjs} +3 -3
  87. package/dist/{SubscriptionsScreen-7VBEggJ_.cjs.map → SubscriptionsScreen-Vn6EN634.cjs.map} +1 -1
  88. package/dist/{TableWidget-BnhJPYUm.cjs → TableWidget-CcPSLT0B.cjs} +2 -2
  89. package/dist/{TableWidget-Vcxw-se8.cjs → TableWidget-Cri6r5Yr.cjs} +2 -2
  90. package/dist/{TableWidget-Vcxw-se8.cjs.map → TableWidget-Cri6r5Yr.cjs.map} +1 -1
  91. package/dist/{TableWidget-CK5jQxjz.mjs → TableWidget-DjYabx1e.mjs} +2 -2
  92. package/dist/{TableWidget-CK5jQxjz.mjs.map → TableWidget-DjYabx1e.mjs.map} +1 -1
  93. package/dist/{VideoWidget-ho9fGQ3V.mjs → VideoWidget-51MxnPRZ.mjs} +4 -4
  94. package/dist/VideoWidget-51MxnPRZ.mjs.map +1 -0
  95. package/dist/{VideoWidget-7Q2eqHFn.cjs → VideoWidget-DnnuIvW1.cjs} +4 -4
  96. package/dist/VideoWidget-DnnuIvW1.cjs.map +1 -0
  97. package/dist/index.cjs +41 -41
  98. package/dist/index.mjs +41 -41
  99. package/dist/{use-account-clients-cHyQEhPp.cjs → use-account-clients-Bem920_7.cjs} +2 -2
  100. package/dist/{use-account-clients-cHyQEhPp.cjs.map → use-account-clients-Bem920_7.cjs.map} +1 -1
  101. package/dist/{use-account-clients-CqC0etbc.mjs → use-account-clients-FUcF1B-z.mjs} +2 -2
  102. package/dist/{use-account-clients-CqC0etbc.mjs.map → use-account-clients-FUcF1B-z.mjs.map} +1 -1
  103. package/dist/{use-current-user-Ccn1lGeB.cjs → use-current-user-Bld9wMVT.cjs} +3 -3
  104. package/dist/{use-current-user-Ccn1lGeB.cjs.map → use-current-user-Bld9wMVT.cjs.map} +1 -1
  105. package/dist/{use-current-user-CyodELl8.mjs → use-current-user-DnBpWIw6.mjs} +3 -3
  106. package/dist/{use-current-user-CyodELl8.mjs.map → use-current-user-DnBpWIw6.mjs.map} +1 -1
  107. package/dist/{use-customer-account-DODRyBye.mjs → use-customer-account-Dix8Ja5O.mjs} +3 -3
  108. package/dist/{use-customer-account-DODRyBye.mjs.map → use-customer-account-Dix8Ja5O.mjs.map} +1 -1
  109. package/dist/{use-customer-account-DOmzp1sM.cjs → use-customer-account-Rm2QXJiZ.cjs} +3 -3
  110. package/dist/{use-customer-account-DOmzp1sM.cjs.map → use-customer-account-Rm2QXJiZ.cjs.map} +1 -1
  111. package/dist/{use-fluid-api-BvakcAkY.mjs → use-fluid-api-CedscoxF.mjs} +2 -2
  112. package/dist/{use-fluid-api-BvakcAkY.mjs.map → use-fluid-api-CedscoxF.mjs.map} +1 -1
  113. package/dist/{use-fluid-api-CBm9h3s3.cjs → use-fluid-api-DyI6LDsV.cjs} +2 -2
  114. package/dist/{use-fluid-api-CBm9h3s3.cjs.map → use-fluid-api-DyI6LDsV.cjs.map} +1 -1
  115. package/package.json +12 -12
  116. package/dist/MediaRenderer-CY2gR7hk.mjs.map +0 -1
  117. package/dist/MediaRenderer-CkMwv5q1.cjs.map +0 -1
  118. package/dist/VideoWidget-7Q2eqHFn.cjs.map +0 -1
  119. package/dist/VideoWidget-ho9fGQ3V.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ListWidget-DuPrSL9o.mjs","names":["DOMPurify","getImageUrl","getAspectRatioClass"],"sources":["../../widgets/src/widgets/list-widget/FeaturedSection.tsx","../../widgets/src/widgets/list-widget/ListItemCard.tsx","../../widgets/src/widgets/list-widget/UnorderedList.tsx","../../widgets/src/widgets/list-widget/OrderedList.tsx","../../widgets/src/widgets/ListWidget.tsx"],"sourcesContent":["import type React from \"react\";\nimport type {\n BorderRadiusOptions,\n FontSizeOptions,\n ColorOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { MediaRenderer } from \"../../components/MediaRenderer\";\n\ninterface FeaturedSectionProps {\n borderRadius: BorderRadiusOptions;\n titleSize: FontSizeOptions;\n featuredTitle?: string | undefined;\n featuredSubtitle?: string | undefined;\n featuredButtonText?: string | undefined;\n featuredButtonUrl?: string | undefined;\n featuredSubtitleColor: ColorOptions;\n featuredSubtitleSize: FontSizeOptions;\n asset: { url: string; isVideo: boolean };\n}\n\nexport function FeaturedSection({\n borderRadius,\n titleSize,\n featuredTitle,\n featuredSubtitle,\n featuredButtonText,\n featuredButtonUrl,\n featuredSubtitleColor,\n featuredSubtitleSize,\n asset,\n}: FeaturedSectionProps): React.JSX.Element {\n return (\n <div\n className={`relative h-full min-h-[300px] w-full overflow-hidden rounded-${borderRadius}`}\n >\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n src={asset.url}\n mediaType={asset.isVideo ? \"video\" : \"image\"}\n alt={featuredTitle || \"Featured\"}\n objectFit=\"cover\"\n autoplay={asset.isVideo}\n loop={asset.isVideo}\n muted={asset.isVideo}\n controls={false}\n />\n </div>\n\n <div className=\"absolute inset-0 bg-black/40\" />\n\n <div className=\"absolute inset-0 flex flex-col items-start justify-end p-8\">\n {featuredTitle && (\n <h3\n className={`font-header mb-2 font-bold text-white text-${titleSize === \"md\" ? \"base\" : titleSize}`}\n >\n {featuredTitle}\n </h3>\n )}\n {featuredSubtitle && (\n <p\n className={`mb-4 text-${featuredSubtitleColor} text-${featuredSubtitleSize === \"md\" ? \"base\" : featuredSubtitleSize}`}\n >\n {featuredSubtitle}\n </p>\n )}\n {featuredButtonText && (\n <a\n href={featuredButtonUrl || \"#\"}\n className={`text-foreground bg-white px-6 py-2 font-medium transition-opacity hover:opacity-90 rounded-${borderRadius}`}\n >\n {featuredButtonText}\n </a>\n )}\n </div>\n </div>\n );\n}\n","import type React from \"react\";\nimport DOMPurify from \"dompurify\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\n\ntype ListItem = {\n id: string;\n image?: string;\n imageUrl?: string;\n videoUrl?: string;\n title?: string;\n description?: string;\n price?: string;\n display_price?: string;\n originalPrice?: string;\n discount?: string;\n qv?: string;\n cv?: string;\n [key: string]: unknown;\n};\n\nfunction getStringValue(value: unknown): string {\n if (!value) return \"\";\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\") return String(value);\n if (typeof value === \"object\" && value !== null) {\n if (\"body\" in value) {\n const body = (value as { body: unknown }).body;\n if (typeof body === \"string\") return body;\n }\n if (\"text\" in value) {\n const text = (value as { text: unknown }).text;\n if (typeof text === \"string\") return text;\n }\n if (\"value\" in value) {\n const val = (value as { value: unknown }).value;\n if (typeof val === \"string\") return val;\n if (typeof val === \"number\") return String(val);\n }\n }\n return \"\";\n}\n\n/**\n * Strips parenthetical text like \"(USD)\" from price strings.\n * Matches the shop page's stripParentheticalText pattern.\n */\nfunction stripParentheticalText(text: string): string {\n return text.replace(/\\s*\\([^)]*\\)/g, \"\").trim();\n}\n\n/**\n * Formats a price for display. Follows the shop page pattern:\n * prices arrive pre-formatted from the API via display_price\n * (e.g. \"$19.99\", \"€15.00 (EUR)\") so we just extract the string\n * and strip parenthetical suffixes.\n */\nfunction formatPrice(value: unknown): string {\n const str = getStringValue(value);\n if (!str) return \"\";\n return stripParentheticalText(str);\n}\n\nexport interface ListItemCardContentProps {\n item: ListItem;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nexport function ListItemCardContent({\n item,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n}: ListItemCardContentProps): React.JSX.Element {\n return (\n <div className={`p-${padding}`}>\n {item.title && (\n <h3\n className={`text-${itemTitleColor} text-${itemTitleSize === \"md\" ? \"base\" : itemTitleSize} font-header mb-1 font-semibold`}\n >\n {getStringValue(item.title)}\n </h3>\n )}\n {item.description && (\n <div\n className={`text-${descriptionColor} text-${descriptionSize === \"md\" ? \"base\" : descriptionSize} mb-2 line-clamp-2 overflow-hidden`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(item.description ?? \"\", {\n ALLOWED_TAGS: [\n \"br\",\n \"strong\",\n \"em\",\n \"b\",\n \"i\",\n \"ul\",\n \"ol\",\n \"li\",\n \"p\",\n ],\n ALLOWED_ATTR: [],\n }),\n }}\n />\n )}\n <div className=\"flex items-center gap-2\">\n {(item.display_price || item.price) && (\n <span\n className={`text-${priceColor} text-${priceSize === \"md\" ? \"base\" : priceSize} font-bold`}\n >\n {formatPrice(item.display_price || item.price)}\n </span>\n )}\n {item.originalPrice && (\n <span\n className={`text-${originalPriceColor} text-${descriptionSize === \"md\" ? \"base\" : descriptionSize} line-through`}\n >\n {formatPrice(item.originalPrice)}\n </span>\n )}\n </div>\n {showMetaText && (item.qv || item.cv) && (\n <div\n className={`mt-2 flex gap-3 text-${metaTextColor} text-${metaTextSize === \"md\" ? \"base\" : metaTextSize}`}\n >\n {item.qv && <span>QV: {getStringValue(item.qv)}</span>}\n {item.cv && <span>CV: {getStringValue(item.cv)}</span>}\n </div>\n )}\n </div>\n );\n}\n\nexport function DiscountBadge({\n discount,\n}: {\n discount: string;\n}): React.JSX.Element {\n return (\n <div className=\"bg-destructive text-destructive-foreground absolute top-2 right-2 z-10 rounded-md px-2 py-1 text-xs font-bold\">\n {getStringValue(discount)}\n </div>\n );\n}\n\nexport { getStringValue };\nexport type { ListItem };\n","import type React from \"react\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { gapValues } from \"../../core/fields\";\nimport { useWidgetInteraction } from \"../../contexts/WidgetInteractionContext\";\nimport {\n ListItemCardContent,\n DiscountBadge,\n type ListItem,\n} from \"./ListItemCard\";\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\n\nconst getImageUrl = (item: ListItem): string | undefined => {\n return item.imageUrl || item.image;\n};\n\nconst getAspectRatioClass = (ratio: ImageAspectRatio): string => {\n const ratios = {\n square: \"aspect-square\",\n landscape: \"aspect-video\",\n portrait: \"aspect-[3/4]\",\n };\n return ratios[ratio];\n};\n\nconst getResponsiveGridClass = (columns: number): string => {\n const responsiveClasses: Record<number, string> = {\n 1: \"grid-cols-2 @lg:grid-cols-1\",\n 2: \"grid-cols-2 @lg:grid-cols-2\",\n 3: \"grid-cols-2 @lg:grid-cols-3\",\n 4: \"grid-cols-2 @lg:grid-cols-4\",\n 5: \"grid-cols-2 @lg:grid-cols-5\",\n 6: \"grid-cols-2 @lg:grid-cols-6\",\n };\n return responsiveClasses[columns] || \"grid-cols-2 @lg:grid-cols-3\";\n};\n\nexport interface UnorderedListProps {\n items: ListItem[];\n columns: number;\n gap: GapOptions;\n borderRadius: BorderRadiusOptions;\n imageAspectRatio: ImageAspectRatio;\n showBadge: boolean;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nexport function UnorderedList({\n items,\n columns,\n gap,\n borderRadius,\n imageAspectRatio,\n showBadge,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n}: UnorderedListProps): React.JSX.Element {\n const gridClass = getResponsiveGridClass(columns);\n const { onItemClick } = useWidgetInteraction();\n\n return (\n <div className={`grid ${gridClass} gap-${gapValues[gap]}`}>\n {items.map((item) => {\n const imageUrl = getImageUrl(item);\n const aspectRatioClass = getAspectRatioClass(imageAspectRatio);\n\n return (\n <div\n key={item.id}\n className={`relative rounded-${borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...(onItemClick\n ? {\n role: \"button\",\n tabIndex: 0,\n onClick: () => onItemClick(item),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onItemClick(item);\n }\n },\n }\n : {})}\n >\n {showBadge && item.discount && (\n <DiscountBadge discount={item.discount} />\n )}\n {imageUrl && (\n <div className={`w-full ${aspectRatioClass} overflow-hidden`}>\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <ListItemCardContent\n item={item}\n padding={padding}\n itemTitleColor={itemTitleColor}\n itemTitleSize={itemTitleSize}\n descriptionColor={descriptionColor}\n descriptionSize={descriptionSize}\n priceColor={priceColor}\n priceSize={priceSize}\n originalPriceColor={originalPriceColor}\n metaTextColor={metaTextColor}\n metaTextSize={metaTextSize}\n showMetaText={showMetaText}\n />\n </div>\n );\n })}\n </div>\n );\n}\n","import { useRef } from \"react\";\nimport type React from \"react\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { gapValues } from \"../../core/fields\";\nimport { useWidgetInteraction } from \"../../contexts/WidgetInteractionContext\";\nimport { ScrollArrows } from \"../../ui/scroll-arrows\";\nimport {\n ListItemCardContent,\n DiscountBadge,\n getStringValue,\n type ListItem,\n} from \"./ListItemCard\";\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\ntype ScrollAxis = \"horizontal\" | \"vertical\";\n\nconst SCROLL_ITEM_WIDTH = 300;\n\nconst getImageUrl = (item: ListItem): string | undefined => {\n return item.imageUrl || item.image;\n};\n\nconst getAspectRatioClass = (ratio: ImageAspectRatio): string => {\n const ratios = {\n square: \"aspect-square\",\n landscape: \"aspect-video\",\n portrait: \"aspect-[3/4]\",\n };\n return ratios[ratio];\n};\n\nexport interface OrderedListProps {\n items: ListItem[];\n scrollAxis: ScrollAxis;\n gap: GapOptions;\n borderRadius: BorderRadiusOptions;\n imageAspectRatio: ImageAspectRatio;\n showBadge: boolean;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n numberColor: ColorOptions;\n numberSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nconst largeNumberSizes: Record<FontSizeOptions, string> = {\n xs: \"8rem\",\n sm: \"10rem\",\n md: \"12rem\",\n lg: \"14rem\",\n xl: \"16rem\",\n \"2xl\": \"20rem\",\n};\n\nexport function OrderedList({\n items,\n scrollAxis,\n gap,\n borderRadius,\n imageAspectRatio,\n showBadge,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n numberColor,\n numberSize,\n showMetaText,\n}: OrderedListProps): React.JSX.Element | null {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n\n const scrollByAmount = (direction: \"prev\" | \"next\") => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const computedGap = parseFloat(getComputedStyle(container).gap) || 0;\n const scrollAmount = SCROLL_ITEM_WIDTH + computedGap;\n\n container.scrollTo({\n left:\n container.scrollLeft +\n (direction === \"next\" ? scrollAmount : -scrollAmount),\n behavior: \"smooth\",\n });\n };\n\n const { onItemClick } = useWidgetInteraction();\n\n const interactionProps = (item: ListItem) =>\n onItemClick\n ? ({\n role: \"button\" as const,\n tabIndex: 0,\n onClick: () => onItemClick(item),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onItemClick(item);\n }\n },\n } as const)\n : {};\n\n const contentProps = {\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n };\n\n if (scrollAxis === \"horizontal\") {\n return (\n <div className=\"relative\">\n <div\n ref={scrollContainerRef}\n className={`flex gap-${gapValues[gap]} scrollbar-hide overflow-x-auto overflow-y-hidden scroll-smooth`}\n >\n {items.map((item, index) => {\n const imageUrl = getImageUrl(item);\n const aspectRatioClass = getAspectRatioClass(imageAspectRatio);\n\n return (\n <div\n key={item.id}\n className={`relative w-[300px] flex-shrink-0 ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...interactionProps(item)}\n >\n <div\n className={`absolute top-0 left-0 text-${numberColor} z-0 leading-none font-bold opacity-20`}\n style={{ fontSize: largeNumberSizes[numberSize] }}\n >\n {index + 1}\n </div>\n\n <div\n className={`relative z-10 ml-20 rounded-${borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md`}\n >\n {showBadge && item.discount && (\n <DiscountBadge discount={item.discount} />\n )}\n {imageUrl && (\n <div\n className={`w-full ${aspectRatioClass} overflow-hidden`}\n >\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <ListItemCardContent item={item} {...contentProps} />\n </div>\n </div>\n );\n })}\n </div>\n\n <div className=\"absolute inset-x-0 top-1/2 z-20 flex w-full -translate-y-1/2 items-center justify-between px-8\">\n <ScrollArrows\n onPrevious={() => scrollByAmount(\"prev\")}\n onNext={() => scrollByAmount(\"next\")}\n />\n </div>\n </div>\n );\n }\n\n if (scrollAxis === \"vertical\") {\n return (\n <div className={`flex flex-col gap-${gapValues[gap]}`}>\n {items.map((item, index) => {\n const imageUrl = getImageUrl(item);\n\n return (\n <div\n key={item.id}\n className={`relative flex gap-${gapValues[gap]} rounded-${borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md ${`p-${padding}`} ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...interactionProps(item)}\n >\n <div\n className={`flex-shrink-0 text-${numberColor} text-${numberSize === \"md\" ? \"base\" : numberSize} flex w-16 items-center justify-center font-bold`}\n >\n {index + 1}\n </div>\n {imageUrl && (\n <div className=\"h-24 w-24 flex-shrink-0 overflow-hidden rounded-md\">\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <div className=\"flex-1\">\n <ListItemCardContent item={item} {...contentProps} />\n </div>\n {showBadge && item.discount && (\n <div className=\"bg-destructive text-destructive-foreground absolute top-2 right-2 rounded-md px-2 py-1 text-xs font-bold\">\n {getStringValue(item.discount)}\n </div>\n )}\n </div>\n );\n })}\n </div>\n );\n }\n\n return null;\n}\n","import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n BackgroundValue,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n borderWidthClasses,\n borderColorClasses,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getGapField,\n} from \"../core/fields\";\nimport { FeaturedSection } from \"./list-widget/FeaturedSection\";\nimport { UnorderedList } from \"./list-widget/UnorderedList\";\nimport { OrderedList } from \"./list-widget/OrderedList\";\n\nconst DEFAULT_ITEMS: ListItem[] = [];\n\ntype ListItem = {\n id: string;\n image?: string;\n imageUrl?: string;\n videoUrl?: string;\n title?: string;\n description?: string;\n price?: string;\n originalPrice?: string;\n discount?: string;\n qv?: string;\n cv?: string;\n [key: string]: unknown;\n};\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\ntype ListType = \"ordered\" | \"unordered\";\ntype ScrollAxis = \"horizontal\" | \"vertical\";\n\ntype ListWidgetProps = ComponentProps<\"div\"> & {\n // List configuration\n listType?: ListType;\n scrollAxis?: ScrollAxis;\n titleEnabled?: boolean;\n title?: string;\n items?: ListItem[];\n\n // Text styling\n titleColor?: ColorOptions;\n titleSize?: FontSizeOptions;\n itemTitleColor?: ColorOptions;\n itemTitleSize?: FontSizeOptions;\n descriptionColor?: ColorOptions;\n descriptionSize?: FontSizeOptions;\n priceColor?: ColorOptions;\n priceSize?: FontSizeOptions;\n originalPriceColor?: ColorOptions;\n metaTextColor?: ColorOptions;\n metaTextSize?: FontSizeOptions;\n\n // Ordered list styling\n numberColor?: ColorOptions;\n numberSize?: FontSizeOptions;\n\n // Layout\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n gap?: GapOptions;\n columns?: number;\n imageAspectRatio?: ImageAspectRatio;\n background?: BackgroundValue;\n\n // Behavior\n showBadge?: boolean;\n showMetaText?: boolean;\n maxItems?: number;\n\n // Featured section\n showFeaturedSection?: boolean;\n featuredAsset?: string | { [key: string]: unknown };\n featuredTitle?: string;\n featuredSubtitle?: string;\n featuredButtonText?: string;\n featuredButtonUrl?: string;\n featuredSubtitleColor?: ColorOptions;\n featuredSubtitleSize?: FontSizeOptions;\n};\n\nfunction getFeaturedAssetUrl(\n value: string | { [key: string]: unknown } | undefined,\n): { url: string; isVideo: boolean } | undefined {\n if (!value) return undefined;\n\n // Handle string URLs\n if (typeof value === \"string\") {\n const isVideo = /\\.(mp4|webm|ogg|mov)$/i.test(value);\n return { url: value, isVideo };\n }\n\n // Handle ShareableItem objects\n if (typeof value === \"object\") {\n // Check for video URL first\n const videoUrl =\n (value.videoUrl as string) ||\n (value.video_url as string) ||\n (value.url as string);\n if (videoUrl && /\\.(mp4|webm|ogg|mov)$/i.test(videoUrl)) {\n return { url: videoUrl, isVideo: true };\n }\n\n // Fall back to image URL\n const imageUrl =\n (value.imageUrl as string) ||\n (value.image_url as string) ||\n (value.url as string);\n if (imageUrl) {\n return { url: imageUrl, isVideo: false };\n }\n }\n\n return undefined;\n}\n\nexport function ListWidget({\n listType = \"unordered\",\n scrollAxis = \"horizontal\",\n titleEnabled = true,\n title,\n items = DEFAULT_ITEMS,\n titleColor = \"foreground\",\n titleSize = \"lg\",\n itemTitleColor = \"foreground\",\n itemTitleSize = \"sm\",\n descriptionColor = \"foreground\",\n descriptionSize = \"sm\",\n priceColor = \"foreground\",\n priceSize = \"md\",\n originalPriceColor = \"muted\",\n metaTextColor = \"muted\",\n metaTextSize = \"xs\",\n numberColor = \"primary\",\n numberSize = \"2xl\",\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 4,\n gap = \"md\",\n columns = 3,\n imageAspectRatio = \"square\",\n background = { type: \"solid\", color: \"background\" },\n showBadge = true,\n showMetaText = true,\n maxItems = 12,\n showFeaturedSection = false,\n featuredAsset,\n featuredTitle,\n featuredSubtitle,\n featuredButtonText,\n featuredButtonUrl,\n featuredSubtitleColor = \"background\",\n featuredSubtitleSize = \"md\",\n className,\n ...props\n}: ListWidgetProps): React.JSX.Element {\n const displayItems = maxItems ? items.slice(0, maxItems) : items;\n const hasItems = displayItems.length > 0;\n\n const itemStyleProps = {\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n showBadge,\n borderRadius,\n imageAspectRatio,\n gap,\n };\n\n const hasFeaturedAsset = getFeaturedAssetUrl(featuredAsset);\n const shouldShowFeaturedSection = showFeaturedSection && hasFeaturedAsset;\n\n // Background styling\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n\n return (\n <div\n className={`@container bg-${backgroundColor} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ backgroundImage }}\n {...props}\n >\n {titleEnabled && title && (\n <h2\n className={`text-${titleColor} text-${titleSize === \"md\" ? \"base\" : titleSize} font-header mb-6 font-bold`}\n >\n {title}\n </h2>\n )}\n {!hasItems ? (\n <div className=\"border-border bg-muted flex items-center justify-center rounded-md border-2 border-dashed py-12 text-center\">\n <p className=\"text-muted\">No items to display</p>\n </div>\n ) : shouldShowFeaturedSection ? (\n <div className=\"flex flex-col gap-4 @lg:flex-row @lg:gap-6\">\n <div className=\"w-full @lg:w-[45%]\">\n <FeaturedSection\n borderRadius={borderRadius}\n titleSize={titleSize}\n featuredTitle={featuredTitle}\n featuredSubtitle={featuredSubtitle}\n featuredButtonText={featuredButtonText}\n featuredButtonUrl={featuredButtonUrl}\n featuredSubtitleColor={featuredSubtitleColor}\n featuredSubtitleSize={featuredSubtitleSize}\n asset={hasFeaturedAsset!}\n />\n </div>\n <div className=\"w-full @lg:w-[55%]\">\n {listType === \"unordered\" ? (\n <UnorderedList\n items={displayItems}\n columns={columns}\n {...itemStyleProps}\n />\n ) : (\n <OrderedList\n items={displayItems}\n scrollAxis={scrollAxis}\n numberColor={numberColor}\n numberSize={numberSize}\n {...itemStyleProps}\n />\n )}\n </div>\n </div>\n ) : listType === \"unordered\" ? (\n <UnorderedList\n items={displayItems}\n columns={columns}\n {...itemStyleProps}\n />\n ) : (\n <OrderedList\n items={displayItems}\n scrollAxis={scrollAxis}\n numberColor={numberColor}\n numberSize={numberSize}\n {...itemStyleProps}\n />\n )}\n </div>\n );\n}\n\nexport const listWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"ListWidget\",\n displayName: \"List\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"items\"],\n fields: [\n // Styling tab - Title group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the list\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"Header text for the list\",\n defaultValue: \"List\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleSize\",\n label: \"Title Font Size\",\n description: \"Size of the list title\",\n defaultValue: \"xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the list title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling tab - Design group\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding inside the container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the container and images\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getGapField({\n key: \"gap\",\n label: \"Gap\",\n description: \"Spacing between items\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n type: \"background\",\n defaultValue: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background color or image for the widget\",\n tab: \"styling\",\n group: \"Design\",\n },\n\n // Styling tab - List Configuration group\n {\n key: \"listType\",\n label: \"List Type\",\n type: \"select\",\n description: \"Type of list layout\",\n defaultValue: \"unordered\",\n options: [\n { label: \"Unordered (Grid)\", value: \"unordered\" },\n { label: \"Ordered (Numbered)\", value: \"ordered\" },\n ],\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"maxItems\",\n label: \"Max Items\",\n type: \"number\",\n description: \"Maximum number of items to display\",\n min: 1,\n max: 100,\n step: 1,\n defaultValue: 12,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"imageAspectRatio\",\n label: \"Image Aspect Ratio\",\n type: \"buttonGroup\",\n description: \"Aspect ratio for item images\",\n defaultValue: \"square\",\n options: [\n { label: \"Square\", value: \"square\" },\n { label: \"Landscape\", value: \"landscape\" },\n { label: \"Portrait\", value: \"portrait\" },\n ],\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"showBadge\",\n label: \"Show Discount Badge\",\n type: \"boolean\",\n description: \"Display discount badge on images\",\n defaultValue: true,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"showMetaText\",\n label: \"Show QV/CV Text\",\n type: \"boolean\",\n description: \"Display QV and CV values\",\n defaultValue: true,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n\n // Styling tab - Unordered List Configuration\n {\n key: \"columns\",\n label: \"Grid Columns\",\n type: \"number\",\n description: \"Number of columns in the grid (unordered list only)\",\n min: 1,\n max: 6,\n step: 1,\n defaultValue: 3,\n tab: \"styling\",\n group: \"Unordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"unordered\" },\n },\n\n // Styling tab - Ordered List Configuration\n {\n key: \"scrollAxis\",\n label: \"Scroll Direction\",\n type: \"select\",\n description: \"Direction for ordered list scrolling\",\n defaultValue: \"horizontal\",\n options: [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n ],\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n },\n getColorField({\n key: \"numberColor\",\n label: \"Number Color\",\n description: \"Color for ordered list numbers\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n }),\n getFontSizeField({\n key: \"numberSize\",\n label: \"Number Font Size\",\n description: \"Size of ordered list numbers\",\n defaultValue: \"2xl\",\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n }),\n\n // Styling tab - Item Styling group\n getColorField({\n key: \"itemTitleColor\",\n label: \"Item Title Color\",\n description: \"Color for item titles\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"itemTitleSize\",\n label: \"Item Title Font Size\",\n description: \"Size of item titles\",\n defaultValue: \"sm\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"descriptionColor\",\n label: \"Description Color\",\n description: \"Color for descriptions\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"descriptionSize\",\n label: \"Description Font Size\",\n description: \"Size of descriptions\",\n defaultValue: \"sm\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator3\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"priceColor\",\n label: \"Price Color\",\n description: \"Color for prices\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"priceSize\",\n label: \"Price Font Size\",\n description: \"Size of prices\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getColorField({\n key: \"originalPriceColor\",\n label: \"Original Price Color\",\n description: \"Color for crossed-out original prices\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator4\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"metaTextColor\",\n label: \"Meta Text Color\",\n description: \"Color for QV/CV text\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"metaTextSize\",\n label: \"Meta Text Font Size\",\n description: \"Size of QV/CV text\",\n defaultValue: \"xs\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n\n // Styling tab - Featured Section group\n {\n key: \"showFeaturedSection\",\n label: \"Show Featured Section\",\n type: \"boolean\",\n description: \"Display a featured content section\",\n defaultValue: false,\n tab: \"styling\",\n group: \"Featured Section\",\n },\n {\n key: \"featuredAsset\",\n label: \"Featured Asset\",\n type: \"resource\",\n description:\n \"Select a single image or video resource for the featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n allowedTypes: [\"Medium\"],\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredTitle\",\n label: \"Featured Title\",\n type: \"text\",\n description: \"Title for featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredSubtitle\",\n label: \"Featured Subtitle\",\n type: \"text\",\n description: \"Subtitle for featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredButtonText\",\n label: \"Featured Button Text\",\n type: \"text\",\n description: \"Text for featured section button\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredButtonUrl\",\n label: \"Featured Button URL\",\n type: \"text\",\n description: \"URL for featured section button\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n getColorField({\n key: \"featuredSubtitleColor\",\n label: \"Featured Subtitle Color\",\n description: \"Color for featured subtitle\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n }),\n getFontSizeField({\n key: \"featuredSubtitleSize\",\n label: \"Featured Subtitle Font Size\",\n description: \"Size of featured subtitle\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n }),\n\n // Data tab - Data Configuration\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n itemConfigSchema: {\n description: \"Configure settings for this list item\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description\",\n rows: 3,\n },\n {\n key: \"price\",\n label: \"Price\",\n type: \"text\",\n description: \"Current price\",\n },\n {\n key: \"originalPrice\",\n label: \"Original Price\",\n type: \"text\",\n description: \"Original price (will be crossed out)\",\n },\n {\n key: \"discount\",\n label: \"Discount Badge\",\n type: \"text\",\n description: \"Discount text (e.g., '40% Off')\",\n },\n {\n key: \"qv\",\n label: \"QV Value\",\n type: \"text\",\n description: \"Qualifying Volume value\",\n },\n {\n key: \"cv\",\n label: \"CV Value\",\n type: \"text\",\n description: \"Commission Volume value\",\n },\n {\n key: \"image\",\n label: \"Image URL\",\n type: \"text\",\n description: \"Custom image URL for this item\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;AAoBA,SAAgB,gBAAgB,EAC9B,cACA,WACA,eACA,kBACA,oBACA,mBACA,uBACA,sBACA,SAC0C;AAC1C,QACE,qBAAC,OAAD;EACE,WAAW,gEAAgE;YAD7E;GAGE,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,eAAD;KACE,KAAK,MAAM;KACX,WAAW,MAAM,UAAU,UAAU;KACrC,KAAK,iBAAiB;KACtB,WAAU;KACV,UAAU,MAAM;KAChB,MAAM,MAAM;KACZ,OAAO,MAAM;KACb,UAAU;KACV,CAAA;IACE,CAAA;GAEN,oBAAC,OAAD,EAAK,WAAU,gCAAiC,CAAA;GAEhD,qBAAC,OAAD;IAAK,WAAU;cAAf;KACG,iBACC,oBAAC,MAAD;MACE,WAAW,8CAA8C,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K;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aACE;GACF,KAAK;GACL,OAAO;GACP,cAAc,CAAC,SAAS;GACxB,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CACD,kBAAkB;EAChB,aAAa;EACb,QAAQ;GACN;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,MAAM;IACP;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACF;EACF;CACF"}
1
+ {"version":3,"file":"ListWidget-ZqCYH78q.mjs","names":["DOMPurify","getImageUrl","getAspectRatioClass"],"sources":["../../widgets/src/widgets/list-widget/FeaturedSection.tsx","../../widgets/src/widgets/list-widget/ListItemCard.tsx","../../widgets/src/widgets/list-widget/UnorderedList.tsx","../../widgets/src/widgets/list-widget/OrderedList.tsx","../../widgets/src/widgets/ListWidget.tsx"],"sourcesContent":["import type React from \"react\";\nimport type {\n BorderRadiusOptions,\n FontSizeOptions,\n ColorOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { MediaRenderer } from \"../../components/MediaRenderer\";\n\ninterface FeaturedSectionProps {\n borderRadius: BorderRadiusOptions;\n titleSize: FontSizeOptions;\n featuredTitle?: string | undefined;\n featuredSubtitle?: string | undefined;\n featuredButtonText?: string | undefined;\n featuredButtonUrl?: string | undefined;\n featuredSubtitleColor: ColorOptions;\n featuredSubtitleSize: FontSizeOptions;\n asset: { url: string; isVideo: boolean };\n}\n\nexport function FeaturedSection({\n borderRadius,\n titleSize,\n featuredTitle,\n featuredSubtitle,\n featuredButtonText,\n featuredButtonUrl,\n featuredSubtitleColor,\n featuredSubtitleSize,\n asset,\n}: FeaturedSectionProps): React.JSX.Element {\n return (\n <div\n className={`relative h-full min-h-[300px] w-full overflow-hidden rounded-${borderRadius}`}\n >\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n src={asset.url}\n mediaType={asset.isVideo ? \"video\" : \"image\"}\n alt={featuredTitle || \"Featured\"}\n objectFit=\"cover\"\n autoplay={asset.isVideo}\n loop={asset.isVideo}\n muted={asset.isVideo}\n controls={false}\n />\n </div>\n\n <div className=\"absolute inset-0 bg-black/40\" />\n\n <div className=\"absolute inset-0 flex flex-col items-start justify-end p-8\">\n {featuredTitle && (\n <h3\n className={`font-header mb-2 font-bold text-white text-${titleSize === \"md\" ? \"base\" : titleSize}`}\n >\n {featuredTitle}\n </h3>\n )}\n {featuredSubtitle && (\n <p\n className={`mb-4 text-${featuredSubtitleColor} text-${featuredSubtitleSize === \"md\" ? \"base\" : featuredSubtitleSize}`}\n >\n {featuredSubtitle}\n </p>\n )}\n {featuredButtonText && (\n <a\n href={featuredButtonUrl || \"#\"}\n className={`text-foreground bg-white px-6 py-2 font-medium transition-opacity hover:opacity-90 rounded-${borderRadius}`}\n >\n {featuredButtonText}\n </a>\n )}\n </div>\n </div>\n );\n}\n","import type React from \"react\";\nimport DOMPurify from \"dompurify\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\n\ntype ListItem = {\n id: string;\n image?: string;\n imageUrl?: string;\n videoUrl?: string;\n title?: string;\n description?: string;\n price?: string;\n display_price?: string;\n originalPrice?: string;\n discount?: string;\n qv?: string;\n cv?: string;\n [key: string]: unknown;\n};\n\nfunction getStringValue(value: unknown): string {\n if (!value) return \"\";\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\") return String(value);\n if (typeof value === \"object\" && value !== null) {\n if (\"body\" in value) {\n const body = (value as { body: unknown }).body;\n if (typeof body === \"string\") return body;\n }\n if (\"text\" in value) {\n const text = (value as { text: unknown }).text;\n if (typeof text === \"string\") return text;\n }\n if (\"value\" in value) {\n const val = (value as { value: unknown }).value;\n if (typeof val === \"string\") return val;\n if (typeof val === \"number\") return String(val);\n }\n }\n return \"\";\n}\n\n/**\n * Strips parenthetical text like \"(USD)\" from price strings.\n * Matches the shop page's stripParentheticalText pattern.\n */\nfunction stripParentheticalText(text: string): string {\n return text.replace(/\\s*\\([^)]*\\)/g, \"\").trim();\n}\n\n/**\n * Formats a price for display. Follows the shop page pattern:\n * prices arrive pre-formatted from the API via display_price\n * (e.g. \"$19.99\", \"€15.00 (EUR)\") so we just extract the string\n * and strip parenthetical suffixes.\n */\nfunction formatPrice(value: unknown): string {\n const str = getStringValue(value);\n if (!str) return \"\";\n return stripParentheticalText(str);\n}\n\nexport interface ListItemCardContentProps {\n item: ListItem;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nexport function ListItemCardContent({\n item,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n}: ListItemCardContentProps): React.JSX.Element {\n return (\n <div className={`p-${padding}`}>\n {item.title && (\n <h3\n className={`text-${itemTitleColor} text-${itemTitleSize === \"md\" ? \"base\" : itemTitleSize} font-header mb-1 font-semibold`}\n >\n {getStringValue(item.title)}\n </h3>\n )}\n {item.description && (\n <div\n className={`text-${descriptionColor} text-${descriptionSize === \"md\" ? \"base\" : descriptionSize} mb-2 line-clamp-2 overflow-hidden`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(item.description ?? \"\", {\n ALLOWED_TAGS: [\n \"br\",\n \"strong\",\n \"em\",\n \"b\",\n \"i\",\n \"ul\",\n \"ol\",\n \"li\",\n \"p\",\n ],\n ALLOWED_ATTR: [],\n }),\n }}\n />\n )}\n <div className=\"flex items-center gap-2\">\n {(item.display_price || item.price) && (\n <span\n className={`text-${priceColor} text-${priceSize === \"md\" ? \"base\" : priceSize} font-bold`}\n >\n {formatPrice(item.display_price || item.price)}\n </span>\n )}\n {item.originalPrice && (\n <span\n className={`text-${originalPriceColor} text-${descriptionSize === \"md\" ? \"base\" : descriptionSize} line-through`}\n >\n {formatPrice(item.originalPrice)}\n </span>\n )}\n </div>\n {showMetaText && (item.qv || item.cv) && (\n <div\n className={`mt-2 flex gap-3 text-${metaTextColor} text-${metaTextSize === \"md\" ? \"base\" : metaTextSize}`}\n >\n {item.qv && <span>QV: {getStringValue(item.qv)}</span>}\n {item.cv && <span>CV: {getStringValue(item.cv)}</span>}\n </div>\n )}\n </div>\n );\n}\n\nexport function DiscountBadge({\n discount,\n}: {\n discount: string;\n}): React.JSX.Element {\n return (\n <div className=\"bg-destructive text-destructive-foreground absolute top-2 right-2 z-10 rounded-md px-2 py-1 text-xs font-bold\">\n {getStringValue(discount)}\n </div>\n );\n}\n\nexport { getStringValue };\nexport type { ListItem };\n","import type React from \"react\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { gapValues } from \"../../core/fields\";\nimport { useWidgetInteraction } from \"../../contexts/WidgetInteractionContext\";\nimport {\n ListItemCardContent,\n DiscountBadge,\n type ListItem,\n} from \"./ListItemCard\";\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\n\nconst getImageUrl = (item: ListItem): string | undefined => {\n return item.imageUrl || item.image;\n};\n\nconst getAspectRatioClass = (ratio: ImageAspectRatio): string => {\n const ratios = {\n square: \"aspect-square\",\n landscape: \"aspect-video\",\n portrait: \"aspect-[3/4]\",\n };\n return ratios[ratio];\n};\n\nconst getResponsiveGridClass = (columns: number): string => {\n const responsiveClasses: Record<number, string> = {\n 1: \"grid-cols-2 @lg:grid-cols-1\",\n 2: \"grid-cols-2 @lg:grid-cols-2\",\n 3: \"grid-cols-2 @lg:grid-cols-3\",\n 4: \"grid-cols-2 @lg:grid-cols-4\",\n 5: \"grid-cols-2 @lg:grid-cols-5\",\n 6: \"grid-cols-2 @lg:grid-cols-6\",\n };\n return responsiveClasses[columns] || \"grid-cols-2 @lg:grid-cols-3\";\n};\n\nexport interface UnorderedListProps {\n items: ListItem[];\n columns: number;\n gap: GapOptions;\n borderRadius: BorderRadiusOptions;\n imageAspectRatio: ImageAspectRatio;\n showBadge: boolean;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nexport function UnorderedList({\n items,\n columns,\n gap,\n borderRadius,\n imageAspectRatio,\n showBadge,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n}: UnorderedListProps): React.JSX.Element {\n const gridClass = getResponsiveGridClass(columns);\n const { onItemClick } = useWidgetInteraction();\n\n return (\n <div className={`grid ${gridClass} gap-${gapValues[gap]}`}>\n {items.map((item) => {\n const imageUrl = getImageUrl(item);\n const aspectRatioClass = getAspectRatioClass(imageAspectRatio);\n\n return (\n <div\n key={item.id}\n className={`relative rounded-${borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...(onItemClick\n ? {\n role: \"button\",\n tabIndex: 0,\n onClick: () => onItemClick(item),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onItemClick(item);\n }\n },\n }\n : {})}\n >\n {showBadge && item.discount && (\n <DiscountBadge discount={item.discount} />\n )}\n {imageUrl && (\n <div className={`w-full ${aspectRatioClass} overflow-hidden`}>\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <ListItemCardContent\n item={item}\n padding={padding}\n itemTitleColor={itemTitleColor}\n itemTitleSize={itemTitleSize}\n descriptionColor={descriptionColor}\n descriptionSize={descriptionSize}\n priceColor={priceColor}\n priceSize={priceSize}\n originalPriceColor={originalPriceColor}\n metaTextColor={metaTextColor}\n metaTextSize={metaTextSize}\n showMetaText={showMetaText}\n />\n </div>\n );\n })}\n </div>\n );\n}\n","import { useRef } from \"react\";\nimport type React from \"react\";\nimport type {\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n} from \"@fluid-app/portal-core/types\";\nimport { gapValues } from \"../../core/fields\";\nimport { useWidgetInteraction } from \"../../contexts/WidgetInteractionContext\";\nimport { ScrollArrows } from \"../../ui/scroll-arrows\";\nimport {\n ListItemCardContent,\n DiscountBadge,\n getStringValue,\n type ListItem,\n} from \"./ListItemCard\";\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\ntype ScrollAxis = \"horizontal\" | \"vertical\";\n\nconst SCROLL_ITEM_WIDTH = 300;\n\nconst getImageUrl = (item: ListItem): string | undefined => {\n return item.imageUrl || item.image;\n};\n\nconst getAspectRatioClass = (ratio: ImageAspectRatio): string => {\n const ratios = {\n square: \"aspect-square\",\n landscape: \"aspect-video\",\n portrait: \"aspect-[3/4]\",\n };\n return ratios[ratio];\n};\n\nexport interface OrderedListProps {\n items: ListItem[];\n scrollAxis: ScrollAxis;\n gap: GapOptions;\n borderRadius: BorderRadiusOptions;\n imageAspectRatio: ImageAspectRatio;\n showBadge: boolean;\n padding: PaddingOptions;\n itemTitleColor: ColorOptions;\n itemTitleSize: FontSizeOptions;\n descriptionColor: ColorOptions;\n descriptionSize: FontSizeOptions;\n priceColor: ColorOptions;\n priceSize: FontSizeOptions;\n originalPriceColor: ColorOptions;\n metaTextColor: ColorOptions;\n metaTextSize: FontSizeOptions;\n numberColor: ColorOptions;\n numberSize: FontSizeOptions;\n showMetaText: boolean;\n}\n\nconst largeNumberSizes: Record<FontSizeOptions, string> = {\n xs: \"8rem\",\n sm: \"10rem\",\n md: \"12rem\",\n lg: \"14rem\",\n xl: \"16rem\",\n \"2xl\": \"20rem\",\n};\n\nexport function OrderedList({\n items,\n scrollAxis,\n gap,\n borderRadius,\n imageAspectRatio,\n showBadge,\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n numberColor,\n numberSize,\n showMetaText,\n}: OrderedListProps): React.JSX.Element | null {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n\n const scrollByAmount = (direction: \"prev\" | \"next\") => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const computedGap = parseFloat(getComputedStyle(container).gap) || 0;\n const scrollAmount = SCROLL_ITEM_WIDTH + computedGap;\n\n container.scrollTo({\n left:\n container.scrollLeft +\n (direction === \"next\" ? scrollAmount : -scrollAmount),\n behavior: \"smooth\",\n });\n };\n\n const { onItemClick } = useWidgetInteraction();\n\n const interactionProps = (item: ListItem) =>\n onItemClick\n ? ({\n role: \"button\" as const,\n tabIndex: 0,\n onClick: () => onItemClick(item),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onItemClick(item);\n }\n },\n } as const)\n : {};\n\n const contentProps = {\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n };\n\n if (scrollAxis === \"horizontal\") {\n return (\n <div className=\"relative\">\n <div\n ref={scrollContainerRef}\n className={`flex gap-${gapValues[gap]} scrollbar-hide overflow-x-auto overflow-y-hidden scroll-smooth`}\n >\n {items.map((item, index) => {\n const imageUrl = getImageUrl(item);\n const aspectRatioClass = getAspectRatioClass(imageAspectRatio);\n\n return (\n <div\n key={item.id}\n className={`relative w-[300px] flex-shrink-0 ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...interactionProps(item)}\n >\n <div\n className={`absolute top-0 left-0 text-${numberColor} z-0 leading-none font-bold opacity-20`}\n style={{ fontSize: largeNumberSizes[numberSize] }}\n >\n {index + 1}\n </div>\n\n <div\n className={`relative z-10 ml-20 rounded-${borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md`}\n >\n {showBadge && item.discount && (\n <DiscountBadge discount={item.discount} />\n )}\n {imageUrl && (\n <div\n className={`w-full ${aspectRatioClass} overflow-hidden`}\n >\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <ListItemCardContent item={item} {...contentProps} />\n </div>\n </div>\n );\n })}\n </div>\n\n <div className=\"absolute inset-x-0 top-1/2 z-20 flex w-full -translate-y-1/2 items-center justify-between px-8\">\n <ScrollArrows\n onPrevious={() => scrollByAmount(\"prev\")}\n onNext={() => scrollByAmount(\"next\")}\n />\n </div>\n </div>\n );\n }\n\n if (scrollAxis === \"vertical\") {\n return (\n <div className={`flex flex-col gap-${gapValues[gap]}`}>\n {items.map((item, index) => {\n const imageUrl = getImageUrl(item);\n\n return (\n <div\n key={item.id}\n className={`relative flex gap-${gapValues[gap]} rounded-${borderRadius} bg-background overflow-hidden shadow-sm transition-shadow hover:shadow-md ${`p-${padding}`} ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n {...interactionProps(item)}\n >\n <div\n className={`flex-shrink-0 text-${numberColor} text-${numberSize === \"md\" ? \"base\" : numberSize} flex w-16 items-center justify-center font-bold`}\n >\n {index + 1}\n </div>\n {imageUrl && (\n <div className=\"h-24 w-24 flex-shrink-0 overflow-hidden rounded-md\">\n <img\n src={imageUrl}\n alt={item.title || \"Product\"}\n className=\"h-full w-full object-cover\"\n />\n </div>\n )}\n <div className=\"flex-1\">\n <ListItemCardContent item={item} {...contentProps} />\n </div>\n {showBadge && item.discount && (\n <div className=\"bg-destructive text-destructive-foreground absolute top-2 right-2 rounded-md px-2 py-1 text-xs font-bold\">\n {getStringValue(item.discount)}\n </div>\n )}\n </div>\n );\n })}\n </div>\n );\n }\n\n return null;\n}\n","import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n BorderRadiusOptions,\n PaddingOptions,\n GapOptions,\n BackgroundValue,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n borderWidthClasses,\n borderColorClasses,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getGapField,\n} from \"../core/fields\";\nimport { FeaturedSection } from \"./list-widget/FeaturedSection\";\nimport { UnorderedList } from \"./list-widget/UnorderedList\";\nimport { OrderedList } from \"./list-widget/OrderedList\";\n\nconst DEFAULT_ITEMS: ListItem[] = [];\n\ntype ListItem = {\n id: string;\n image?: string;\n imageUrl?: string;\n videoUrl?: string;\n title?: string;\n description?: string;\n price?: string;\n originalPrice?: string;\n discount?: string;\n qv?: string;\n cv?: string;\n [key: string]: unknown;\n};\n\ntype ImageAspectRatio = \"square\" | \"landscape\" | \"portrait\";\ntype ListType = \"ordered\" | \"unordered\";\ntype ScrollAxis = \"horizontal\" | \"vertical\";\n\ntype ListWidgetProps = ComponentProps<\"div\"> & {\n // List configuration\n listType?: ListType;\n scrollAxis?: ScrollAxis;\n titleEnabled?: boolean;\n title?: string;\n items?: ListItem[];\n\n // Text styling\n titleColor?: ColorOptions;\n titleSize?: FontSizeOptions;\n itemTitleColor?: ColorOptions;\n itemTitleSize?: FontSizeOptions;\n descriptionColor?: ColorOptions;\n descriptionSize?: FontSizeOptions;\n priceColor?: ColorOptions;\n priceSize?: FontSizeOptions;\n originalPriceColor?: ColorOptions;\n metaTextColor?: ColorOptions;\n metaTextSize?: FontSizeOptions;\n\n // Ordered list styling\n numberColor?: ColorOptions;\n numberSize?: FontSizeOptions;\n\n // Layout\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n gap?: GapOptions;\n columns?: number;\n imageAspectRatio?: ImageAspectRatio;\n background?: BackgroundValue;\n\n // Behavior\n showBadge?: boolean;\n showMetaText?: boolean;\n maxItems?: number;\n\n // Featured section\n showFeaturedSection?: boolean;\n featuredAsset?: string | { [key: string]: unknown };\n featuredTitle?: string;\n featuredSubtitle?: string;\n featuredButtonText?: string;\n featuredButtonUrl?: string;\n featuredSubtitleColor?: ColorOptions;\n featuredSubtitleSize?: FontSizeOptions;\n};\n\nfunction getFeaturedAssetUrl(\n value: string | { [key: string]: unknown } | undefined,\n): { url: string; isVideo: boolean } | undefined {\n if (!value) return undefined;\n\n // Handle string URLs\n if (typeof value === \"string\") {\n const isVideo = /\\.(mp4|webm|ogg|mov)$/i.test(value);\n return { url: value, isVideo };\n }\n\n // Handle ShareableItem objects\n if (typeof value === \"object\") {\n // Check for video URL first\n const videoUrl =\n (value.videoUrl as string) ||\n (value.video_url as string) ||\n (value.url as string);\n if (videoUrl && /\\.(mp4|webm|ogg|mov)$/i.test(videoUrl)) {\n return { url: videoUrl, isVideo: true };\n }\n\n // Fall back to image URL\n const imageUrl =\n (value.imageUrl as string) ||\n (value.image_url as string) ||\n (value.url as string);\n if (imageUrl) {\n return { url: imageUrl, isVideo: false };\n }\n }\n\n return undefined;\n}\n\nexport function ListWidget({\n listType = \"unordered\",\n scrollAxis = \"horizontal\",\n titleEnabled = true,\n title,\n items = DEFAULT_ITEMS,\n titleColor = \"foreground\",\n titleSize = \"lg\",\n itemTitleColor = \"foreground\",\n itemTitleSize = \"sm\",\n descriptionColor = \"foreground\",\n descriptionSize = \"sm\",\n priceColor = \"foreground\",\n priceSize = \"md\",\n originalPriceColor = \"muted\",\n metaTextColor = \"muted\",\n metaTextSize = \"xs\",\n numberColor = \"primary\",\n numberSize = \"2xl\",\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 4,\n gap = \"md\",\n columns = 3,\n imageAspectRatio = \"square\",\n background = { type: \"solid\", color: \"background\" },\n showBadge = true,\n showMetaText = true,\n maxItems = 12,\n showFeaturedSection = false,\n featuredAsset,\n featuredTitle,\n featuredSubtitle,\n featuredButtonText,\n featuredButtonUrl,\n featuredSubtitleColor = \"background\",\n featuredSubtitleSize = \"md\",\n className,\n ...props\n}: ListWidgetProps): React.JSX.Element {\n const displayItems = maxItems ? items.slice(0, maxItems) : items;\n const hasItems = displayItems.length > 0;\n\n const itemStyleProps = {\n padding,\n itemTitleColor,\n itemTitleSize,\n descriptionColor,\n descriptionSize,\n priceColor,\n priceSize,\n originalPriceColor,\n metaTextColor,\n metaTextSize,\n showMetaText,\n showBadge,\n borderRadius,\n imageAspectRatio,\n gap,\n };\n\n const hasFeaturedAsset = getFeaturedAssetUrl(featuredAsset);\n const shouldShowFeaturedSection = showFeaturedSection && hasFeaturedAsset;\n\n // Background styling\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n\n return (\n <div\n className={`@container bg-${backgroundColor} rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ backgroundImage }}\n {...props}\n >\n {titleEnabled && title && (\n <h2\n className={`text-${titleColor} text-${titleSize === \"md\" ? \"base\" : titleSize} font-header mb-6 font-bold`}\n >\n {title}\n </h2>\n )}\n {!hasItems ? (\n <div className=\"border-border bg-muted flex items-center justify-center rounded-md border-2 border-dashed py-12 text-center\">\n <p className=\"text-muted\">No items to display</p>\n </div>\n ) : shouldShowFeaturedSection ? (\n <div className=\"flex flex-col gap-4 @lg:flex-row @lg:gap-6\">\n <div className=\"w-full @lg:w-[45%]\">\n <FeaturedSection\n borderRadius={borderRadius}\n titleSize={titleSize}\n featuredTitle={featuredTitle}\n featuredSubtitle={featuredSubtitle}\n featuredButtonText={featuredButtonText}\n featuredButtonUrl={featuredButtonUrl}\n featuredSubtitleColor={featuredSubtitleColor}\n featuredSubtitleSize={featuredSubtitleSize}\n asset={hasFeaturedAsset!}\n />\n </div>\n <div className=\"w-full @lg:w-[55%]\">\n {listType === \"unordered\" ? (\n <UnorderedList\n items={displayItems}\n columns={columns}\n {...itemStyleProps}\n />\n ) : (\n <OrderedList\n items={displayItems}\n scrollAxis={scrollAxis}\n numberColor={numberColor}\n numberSize={numberSize}\n {...itemStyleProps}\n />\n )}\n </div>\n </div>\n ) : listType === \"unordered\" ? (\n <UnorderedList\n items={displayItems}\n columns={columns}\n {...itemStyleProps}\n />\n ) : (\n <OrderedList\n items={displayItems}\n scrollAxis={scrollAxis}\n numberColor={numberColor}\n numberSize={numberSize}\n {...itemStyleProps}\n />\n )}\n </div>\n );\n}\n\nexport const listWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"ListWidget\",\n displayName: \"List\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"items\"],\n fields: [\n // Styling tab - Title group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the list\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"Header text for the list\",\n defaultValue: \"List\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleSize\",\n label: \"Title Font Size\",\n description: \"Size of the list title\",\n defaultValue: \"xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the list title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling tab - Design group\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding inside the container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the container and images\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getGapField({\n key: \"gap\",\n label: \"Gap\",\n description: \"Spacing between items\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n type: \"background\",\n defaultValue: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background color or image for the widget\",\n tab: \"styling\",\n group: \"Design\",\n },\n\n // Styling tab - List Configuration group\n {\n key: \"listType\",\n label: \"List Type\",\n type: \"select\",\n description: \"Type of list layout\",\n defaultValue: \"unordered\",\n options: [\n { label: \"Unordered (Grid)\", value: \"unordered\" },\n { label: \"Ordered (Numbered)\", value: \"ordered\" },\n ],\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"maxItems\",\n label: \"Max Items\",\n type: \"number\",\n description: \"Maximum number of items to display\",\n min: 1,\n max: 100,\n step: 1,\n defaultValue: 12,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"imageAspectRatio\",\n label: \"Image Aspect Ratio\",\n type: \"buttonGroup\",\n description: \"Aspect ratio for item images\",\n defaultValue: \"square\",\n options: [\n { label: \"Square\", value: \"square\" },\n { label: \"Landscape\", value: \"landscape\" },\n { label: \"Portrait\", value: \"portrait\" },\n ],\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"showBadge\",\n label: \"Show Discount Badge\",\n type: \"boolean\",\n description: \"Display discount badge on images\",\n defaultValue: true,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n {\n key: \"showMetaText\",\n label: \"Show QV/CV Text\",\n type: \"boolean\",\n description: \"Display QV and CV values\",\n defaultValue: true,\n tab: \"styling\",\n group: \"List Configuration\",\n },\n\n // Styling tab - Unordered List Configuration\n {\n key: \"columns\",\n label: \"Grid Columns\",\n type: \"number\",\n description: \"Number of columns in the grid (unordered list only)\",\n min: 1,\n max: 6,\n step: 1,\n defaultValue: 3,\n tab: \"styling\",\n group: \"Unordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"unordered\" },\n },\n\n // Styling tab - Ordered List Configuration\n {\n key: \"scrollAxis\",\n label: \"Scroll Direction\",\n type: \"select\",\n description: \"Direction for ordered list scrolling\",\n defaultValue: \"horizontal\",\n options: [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n ],\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n },\n getColorField({\n key: \"numberColor\",\n label: \"Number Color\",\n description: \"Color for ordered list numbers\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n }),\n getFontSizeField({\n key: \"numberSize\",\n label: \"Number Font Size\",\n description: \"Size of ordered list numbers\",\n defaultValue: \"2xl\",\n tab: \"styling\",\n group: \"Ordered List Configuration\",\n requiresKeyValue: { key: \"listType\", value: \"ordered\" },\n }),\n\n // Styling tab - Item Styling group\n getColorField({\n key: \"itemTitleColor\",\n label: \"Item Title Color\",\n description: \"Color for item titles\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"itemTitleSize\",\n label: \"Item Title Font Size\",\n description: \"Size of item titles\",\n defaultValue: \"sm\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"descriptionColor\",\n label: \"Description Color\",\n description: \"Color for descriptions\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"descriptionSize\",\n label: \"Description Font Size\",\n description: \"Size of descriptions\",\n defaultValue: \"sm\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator3\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"priceColor\",\n label: \"Price Color\",\n description: \"Color for prices\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"priceSize\",\n label: \"Price Font Size\",\n description: \"Size of prices\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getColorField({\n key: \"originalPriceColor\",\n label: \"Original Price Color\",\n description: \"Color for crossed-out original prices\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n {\n key: \"separator4\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Item Styling\",\n },\n getColorField({\n key: \"metaTextColor\",\n label: \"Meta Text Color\",\n description: \"Color for QV/CV text\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n getFontSizeField({\n key: \"metaTextSize\",\n label: \"Meta Text Font Size\",\n description: \"Size of QV/CV text\",\n defaultValue: \"xs\",\n tab: \"styling\",\n group: \"Item Styling\",\n }),\n\n // Styling tab - Featured Section group\n {\n key: \"showFeaturedSection\",\n label: \"Show Featured Section\",\n type: \"boolean\",\n description: \"Display a featured content section\",\n defaultValue: false,\n tab: \"styling\",\n group: \"Featured Section\",\n },\n {\n key: \"featuredAsset\",\n label: \"Featured Asset\",\n type: \"resource\",\n description:\n \"Select a single image or video resource for the featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n allowedTypes: [\"Medium\"],\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredTitle\",\n label: \"Featured Title\",\n type: \"text\",\n description: \"Title for featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredSubtitle\",\n label: \"Featured Subtitle\",\n type: \"text\",\n description: \"Subtitle for featured section\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredButtonText\",\n label: \"Featured Button Text\",\n type: \"text\",\n description: \"Text for featured section button\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n {\n key: \"featuredButtonUrl\",\n label: \"Featured Button URL\",\n type: \"text\",\n description: \"URL for featured section button\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n },\n getColorField({\n key: \"featuredSubtitleColor\",\n label: \"Featured Subtitle Color\",\n description: \"Color for featured subtitle\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n }),\n getFontSizeField({\n key: \"featuredSubtitleSize\",\n label: \"Featured Subtitle Font Size\",\n description: \"Size of featured subtitle\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Featured Section\",\n requiresKeyToBeTrue: \"showFeaturedSection\",\n }),\n\n // Data tab - Data Configuration\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n itemConfigSchema: {\n description: \"Configure settings for this list item\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description\",\n rows: 3,\n },\n {\n key: \"price\",\n label: \"Price\",\n type: \"text\",\n description: \"Current price\",\n },\n {\n key: \"originalPrice\",\n label: \"Original Price\",\n type: \"text\",\n description: \"Original price (will be crossed out)\",\n },\n {\n key: \"discount\",\n label: \"Discount Badge\",\n type: \"text\",\n description: \"Discount text (e.g., '40% Off')\",\n },\n {\n key: \"qv\",\n label: \"QV Value\",\n type: \"text\",\n description: \"Qualifying Volume value\",\n },\n {\n key: \"cv\",\n label: \"CV Value\",\n type: \"text\",\n description: \"Commission Volume value\",\n },\n {\n key: \"image\",\n label: \"Image URL\",\n type: \"text\",\n description: \"Custom image URL for this item\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;AAoBA,SAAgB,gBAAgB,EAC9B,cACA,WACA,eACA,kBACA,oBACA,mBACA,uBACA,sBACA,SAC0C;AAC1C,QACE,qBAAC,OAAD;EACE,WAAW,gEAAgE;YAD7E;GAGE,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,eAAD;KACE,KAAK,MAAM;KACX,WAAW,MAAM,UAAU,UAAU;KACrC,KAAK,iBAAiB;KACtB,WAAU;KACV,UAAU,MAAM;KAChB,MAAM,MAAM;KACZ,OAAO,MAAM;KACb,UAAU;KACV,CAAA;IACE,CAAA;GAEN,oBAAC,OAAD,EAAK,WAAU,gCAAiC,CAAA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Ac;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF,gBAAgB;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,qBAAqB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,YAAY;GACV,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,MAAM;GACN,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR;EAGD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAoB,OAAO;IAAa,EACjD;IAAE,OAAO;IAAsB,OAAO;IAAW,CAClD;GACD,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS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,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aACE;GACF,KAAK;GACL,OAAO;GACP,cAAc,CAAC,SAAS;GACxB,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,iBAAiB;GACf,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CACD,kBAAkB;EAChB,aAAa;EACb,QAAQ;GACN;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,MAAM;IACP;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACd;GACF;EACF;CACF"}
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Image, Video } from "lucide-react";
3
3
  //#region ../widgets/src/components/MediaRenderer.tsx
4
- function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, mediaType = "image", poster, autoplay = false, loop = false, muted = false, controls = true }) {
4
+ function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, mediaType = "image", poster, autoplay = false, loop = false, muted = true, controls = true }) {
5
5
  const hasValidSrc = src && src.trim() !== "";
6
6
  const objectPosition = focusPoint?.replace("-", " ");
7
7
  if (!hasValidSrc) return /* @__PURE__ */ jsx("div", {
@@ -18,6 +18,7 @@ function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, me
18
18
  const blurSrc = isContainMode ? `${src}?tr=bl-50` : void 0;
19
19
  if (mediaType === "video") {
20
20
  const blurredBgSrc = isContainMode ? poster ? `${poster}?tr=bl-50` : blurSrc : void 0;
21
+ const controlsHoverClass = controls ? "[@media(hover:hover)]:[&::-webkit-media-controls-panel]:opacity-0 [&::-webkit-media-controls-panel]:transition-opacity [&::-webkit-media-controls-panel]:duration-300 [@media(hover:hover)]:hover:[&::-webkit-media-controls-panel]:opacity-100" : "pointer-events-none";
21
22
  if (isContainMode && blurredBgSrc) return /* @__PURE__ */ jsxs("div", {
22
23
  className: "relative h-full w-full overflow-hidden",
23
24
  children: [
@@ -38,7 +39,8 @@ function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, me
38
39
  autoPlay: autoplay,
39
40
  loop,
40
41
  muted,
41
- className: `relative z-10 h-full w-full object-contain ${!controls ? "pointer-events-none" : ""}`,
42
+ playsInline: true,
43
+ className: `relative z-10 h-full w-full object-contain ${controlsHoverClass}`,
42
44
  children: "Your browser does not support the video tag."
43
45
  })
44
46
  ]
@@ -50,7 +52,8 @@ function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, me
50
52
  autoPlay: autoplay,
51
53
  loop,
52
54
  muted,
53
- className: `h-full w-full object-${objectFit} ${!controls ? "pointer-events-none" : ""}`,
55
+ playsInline: true,
56
+ className: `h-full w-full object-${objectFit} ${controlsHoverClass}`,
54
57
  style: objectPosition ? { objectPosition } : void 0,
55
58
  children: "Your browser does not support the video tag."
56
59
  });
@@ -119,7 +122,7 @@ function getMediaPropsFromWidgetSchema(schema) {
119
122
  mediaType: "video",
120
123
  autoplay: props.autoplay ?? false,
121
124
  loop: props.loop ?? false,
122
- muted: props.muted ?? false,
125
+ muted: props.muted ?? true,
123
126
  controls: props.controls ?? true,
124
127
  objectFit: displayFit ?? "cover",
125
128
  focusPoint
@@ -156,4 +159,4 @@ function getMediaPropsFromWidgetSchema(schema) {
156
159
  //#endregion
157
160
  export { getMediaPropsFromShareable as n, getMediaPropsFromWidgetSchema as r, MediaRenderer as t };
158
161
 
159
- //# sourceMappingURL=MediaRenderer-CY2gR7hk.mjs.map
162
+ //# sourceMappingURL=MediaRenderer-B3R-Q6Qt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaRenderer-B3R-Q6Qt.mjs","names":[],"sources":["../../widgets/src/components/MediaRenderer.tsx"],"sourcesContent":["import type React from \"react\";\nimport { Image, Video } from \"lucide-react\";\nimport type { ShareableItem, WidgetSchema } from \"@fluid-app/portal-core/types\";\n\nexport type MediaRendererProps = {\n src?: string | undefined;\n alt?: string | undefined;\n objectFit?: \"contain\" | \"cover\" | \"fill\" | \"none\" | undefined;\n focusPoint?: string | undefined;\n mediaType?: \"image\" | \"video\" | undefined;\n poster?: string | undefined;\n autoplay?: boolean | undefined;\n loop?: boolean | undefined;\n muted?: boolean | undefined;\n controls?: boolean | undefined;\n};\n\nexport function MediaRenderer({\n src,\n alt = \"Media\",\n objectFit = \"cover\",\n focusPoint,\n mediaType = \"image\",\n poster,\n autoplay = false,\n loop = false,\n muted = true,\n controls = true,\n}: MediaRendererProps): React.JSX.Element {\n const hasValidSrc = src && src.trim() !== \"\";\n const objectPosition = focusPoint?.replace(\"-\", \" \");\n\n if (!hasValidSrc) {\n const Icon = mediaType === \"video\" ? Video : Image;\n const label =\n mediaType === \"video\" ? \"No video selected\" : \"No image selected\";\n return (\n <div className=\"bg-muted flex h-full min-h-[200px] w-full items-center justify-center\">\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <Icon className=\"h-12 w-12\" />\n <p className=\"text-sm\">{label}</p>\n </div>\n </div>\n );\n }\n\n const isContainMode = objectFit === \"contain\";\n const blurSrc = isContainMode ? `${src}?tr=bl-50` : undefined;\n\n if (mediaType === \"video\") {\n const blurredBgSrc = isContainMode\n ? poster\n ? `${poster}?tr=bl-50`\n : blurSrc\n : undefined;\n\n const controlsHoverClass = controls\n ? \"[@media(hover:hover)]:[&::-webkit-media-controls-panel]:opacity-0 [&::-webkit-media-controls-panel]:transition-opacity [&::-webkit-media-controls-panel]:duration-300 [@media(hover:hover)]:hover:[&::-webkit-media-controls-panel]:opacity-100\"\n : \"pointer-events-none\";\n\n if (isContainMode && blurredBgSrc) {\n return (\n <div className=\"relative h-full w-full overflow-hidden\">\n <img\n src={blurredBgSrc}\n alt=\"\"\n className=\"absolute inset-0 h-full w-full object-cover\"\n aria-hidden=\"true\"\n />\n <div className=\"absolute inset-0 bg-black/30\" aria-hidden=\"true\" />\n <video\n src={src}\n poster={poster}\n controls={controls}\n autoPlay={autoplay}\n loop={loop}\n muted={muted}\n playsInline\n className={`relative z-10 h-full w-full object-contain ${controlsHoverClass}`}\n >\n Your browser does not support the video tag.\n </video>\n </div>\n );\n }\n\n return (\n <video\n src={src}\n poster={poster}\n controls={controls}\n autoPlay={autoplay}\n loop={loop}\n muted={muted}\n playsInline\n className={`h-full w-full object-${objectFit} ${controlsHoverClass}`}\n style={objectPosition ? { objectPosition } : undefined}\n >\n Your browser does not support the video tag.\n </video>\n );\n }\n\n if (isContainMode) {\n return (\n <div className=\"relative h-full w-full overflow-hidden\">\n <img\n src={blurSrc}\n alt=\"\"\n className=\"absolute inset-0 h-full w-full object-cover\"\n aria-hidden=\"true\"\n />\n <div className=\"absolute inset-0 bg-black/30\" aria-hidden=\"true\" />\n <img\n src={src}\n alt={alt}\n className=\"relative z-10 h-full w-full object-contain\"\n />\n </div>\n );\n }\n\n return (\n <img\n src={src}\n alt={alt}\n className={`h-full w-full object-${objectFit}`}\n style={objectPosition ? { objectPosition } : undefined}\n />\n );\n}\n\n/**\n * Converts a ShareableItem to MediaRenderer props.\n * Replaces the createWidgetFromShareable → ScreenRenderer pattern.\n */\nexport function getMediaPropsFromShareable(\n item: ShareableItem,\n): MediaRendererProps {\n const isVideo = item.kind === \"video\" || !!item.videoUrl;\n\n if (isVideo && item.videoUrl) {\n const result: MediaRendererProps = {\n mediaType: \"video\",\n src: item.videoUrl,\n alt: item.title ?? \"Video\",\n };\n if (item.imageUrl != null) result.poster = item.imageUrl;\n return result;\n }\n\n const result: MediaRendererProps = {\n mediaType: \"image\",\n alt: item.title || \"Image\",\n objectFit: \"cover\",\n };\n if (item.imageUrl != null) result.src = item.imageUrl;\n return result;\n}\n\n/**\n * Extracts media props from an ImageWidget/VideoWidget schema.\n * Used by CarouselWidget for slide.content rendering.\n */\nexport function getMediaPropsFromWidgetSchema(\n schema: WidgetSchema,\n): MediaRendererProps {\n const props = schema.props;\n\n const resource = props.resource as ShareableItem | undefined;\n const useCustomUrl = props.useCustomUrl as boolean | undefined;\n const focusPoint = props.focusPoint as string | undefined;\n const displayFit = props.displayFit as\n | MediaRendererProps[\"objectFit\"]\n | undefined;\n\n if (schema.type === \"VideoWidget\") {\n const result: MediaRendererProps = {\n mediaType: \"video\",\n autoplay: (props.autoplay as boolean | undefined) ?? false,\n loop: (props.loop as boolean | undefined) ?? false,\n muted: (props.muted as boolean | undefined) ?? true,\n controls: (props.controls as boolean | undefined) ?? true,\n objectFit: displayFit ?? \"cover\",\n focusPoint,\n };\n if (useCustomUrl) {\n if (typeof props.src === \"string\") result.src = props.src;\n if (typeof props.poster === \"string\") result.poster = props.poster;\n } else if (resource) {\n if (resource.videoUrl) result.src = resource.videoUrl;\n else if (typeof props.src === \"string\") result.src = props.src;\n if (resource.imageUrl) result.poster = resource.imageUrl;\n else if (typeof props.poster === \"string\") result.poster = props.poster;\n } else {\n if (typeof props.src === \"string\") result.src = props.src;\n if (typeof props.poster === \"string\") result.poster = props.poster;\n }\n return result;\n }\n\n const result: MediaRendererProps = {\n mediaType: \"image\",\n alt: (props.alt as string | undefined) ?? \"Image\",\n objectFit: displayFit ?? \"cover\",\n focusPoint,\n };\n if (useCustomUrl) {\n if (typeof props.src === \"string\") result.src = props.src;\n } else if (resource) {\n if (resource.imageUrl) result.src = resource.imageUrl;\n else if (typeof props.src === \"string\") result.src = props.src;\n if (resource.title) result.alt = resource.title;\n } else {\n if (typeof props.src === \"string\") result.src = props.src;\n }\n return result;\n}\n"],"mappings":";;;AAiBA,SAAgB,cAAc,EAC5B,KACA,MAAM,SACN,YAAY,SACZ,YACA,YAAY,SACZ,QACA,WAAW,OACX,OAAO,OACP,QAAQ,MACR,WAAW,QAC6B;CACxC,MAAM,cAAc,OAAO,IAAI,MAAM,KAAK;CAC1C,MAAM,iBAAiB,YAAY,QAAQ,KAAK,IAAI;AAEpD,KAAI,CAAC,YAIH,QACE,oBAAC,OAAD;EAAK,WAAU;YACb,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBANO,cAAc,UAAU,QAAQ,OAMvC,EAAM,WAAU,aAAc,CAAA,EAC9B,oBAAC,KAAD;IAAG,WAAU;cALjB,cAAc,UAAU,sBAAsB;IAKR,CAAA,CAC9B;;EACF,CAAA;CAIV,MAAM,gBAAgB,cAAc;CACpC,MAAM,UAAU,gBAAgB,GAAG,IAAI,aAAa,KAAA;AAEpD,KAAI,cAAc,SAAS;EACzB,MAAM,eAAe,gBACjB,SACE,GAAG,OAAO,aACV,UACF,KAAA;EAEJ,MAAM,qBAAqB,WACvB,oPACA;AAEJ,MAAI,iBAAiB,aACnB,QACE,qBAAC,OAAD;GAAK,WAAU;aAAf;IACE,oBAAC,OAAD;KACE,KAAK;KACL,KAAI;KACJ,WAAU;KACV,eAAY;KACZ,CAAA;IACF,oBAAC,OAAD;KAAK,WAAU;KAA+B,eAAY;KAAS,CAAA;IACnE,oBAAC,SAAD;KACO;KACG;KACE;KACV,UAAU;KACJ;KACC;KACP,aAAA;KACA,WAAW,8CAA8C;eAC1D;KAEO,CAAA;IACJ;;AAIV,SACE,oBAAC,SAAD;GACO;GACG;GACE;GACV,UAAU;GACJ;GACC;GACP,aAAA;GACA,WAAW,wBAAwB,UAAU,GAAG;GAChD,OAAO,iBAAiB,EAAE,gBAAgB,GAAG,KAAA;aAC9C;GAEO,CAAA;;AAIZ,KAAI,cACF,QAC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S;YACpC,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;AAC3D,OAAI,SAAS,SAAU,QAAO,SAAS,SAAS;YACvC,OAAO,MAAM,WAAW,SAAU,QAAO,SAAS,MAAM;SAC5D;AACL,OAAI,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;AACtD,OAAI,OAAO,MAAM,WAAW,SAAU,QAAO,SAAS,MAAM;;AAE9D,SAAO;;CAGT,MAAM,SAA6B;EACjC,WAAW;EACX,KAAM,MAAM,OAA8B;EAC1C,WAAW,cAAc;EACzB;EACD;AACD,KAAI;MACE,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;YAC7C,UAAU;AACnB,MAAI,SAAS,SAAU,QAAO,MAAM,SAAS;WACpC,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;AAC3D,MAAI,SAAS,MAAO,QAAO,MAAM,SAAS;YAEtC,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;AAExD,QAAO"}
@@ -2,7 +2,7 @@ require("./chunk-DAgNkxik.cjs");
2
2
  let react_jsx_runtime = require("react/jsx-runtime");
3
3
  let lucide_react = require("lucide-react");
4
4
  //#region ../widgets/src/components/MediaRenderer.tsx
5
- function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, mediaType = "image", poster, autoplay = false, loop = false, muted = false, controls = true }) {
5
+ function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, mediaType = "image", poster, autoplay = false, loop = false, muted = true, controls = true }) {
6
6
  const hasValidSrc = src && src.trim() !== "";
7
7
  const objectPosition = focusPoint?.replace("-", " ");
8
8
  if (!hasValidSrc) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -19,6 +19,7 @@ function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, me
19
19
  const blurSrc = isContainMode ? `${src}?tr=bl-50` : void 0;
20
20
  if (mediaType === "video") {
21
21
  const blurredBgSrc = isContainMode ? poster ? `${poster}?tr=bl-50` : blurSrc : void 0;
22
+ const controlsHoverClass = controls ? "[@media(hover:hover)]:[&::-webkit-media-controls-panel]:opacity-0 [&::-webkit-media-controls-panel]:transition-opacity [&::-webkit-media-controls-panel]:duration-300 [@media(hover:hover)]:hover:[&::-webkit-media-controls-panel]:opacity-100" : "pointer-events-none";
22
23
  if (isContainMode && blurredBgSrc) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
23
24
  className: "relative h-full w-full overflow-hidden",
24
25
  children: [
@@ -39,7 +40,8 @@ function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, me
39
40
  autoPlay: autoplay,
40
41
  loop,
41
42
  muted,
42
- className: `relative z-10 h-full w-full object-contain ${!controls ? "pointer-events-none" : ""}`,
43
+ playsInline: true,
44
+ className: `relative z-10 h-full w-full object-contain ${controlsHoverClass}`,
43
45
  children: "Your browser does not support the video tag."
44
46
  })
45
47
  ]
@@ -51,7 +53,8 @@ function MediaRenderer({ src, alt = "Media", objectFit = "cover", focusPoint, me
51
53
  autoPlay: autoplay,
52
54
  loop,
53
55
  muted,
54
- className: `h-full w-full object-${objectFit} ${!controls ? "pointer-events-none" : ""}`,
56
+ playsInline: true,
57
+ className: `h-full w-full object-${objectFit} ${controlsHoverClass}`,
55
58
  style: objectPosition ? { objectPosition } : void 0,
56
59
  children: "Your browser does not support the video tag."
57
60
  });
@@ -120,7 +123,7 @@ function getMediaPropsFromWidgetSchema(schema) {
120
123
  mediaType: "video",
121
124
  autoplay: props.autoplay ?? false,
122
125
  loop: props.loop ?? false,
123
- muted: props.muted ?? false,
126
+ muted: props.muted ?? true,
124
127
  controls: props.controls ?? true,
125
128
  objectFit: displayFit ?? "cover",
126
129
  focusPoint
@@ -174,4 +177,4 @@ Object.defineProperty(exports, "getMediaPropsFromWidgetSchema", {
174
177
  }
175
178
  });
176
179
 
177
- //# sourceMappingURL=MediaRenderer-CkMwv5q1.cjs.map
180
+ //# sourceMappingURL=MediaRenderer-CRKJcPD9.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaRenderer-CRKJcPD9.cjs","names":["Video","Image"],"sources":["../../widgets/src/components/MediaRenderer.tsx"],"sourcesContent":["import type React from \"react\";\nimport { Image, Video } from \"lucide-react\";\nimport type { ShareableItem, WidgetSchema } from \"@fluid-app/portal-core/types\";\n\nexport type MediaRendererProps = {\n src?: string | undefined;\n alt?: string | undefined;\n objectFit?: \"contain\" | \"cover\" | \"fill\" | \"none\" | undefined;\n focusPoint?: string | undefined;\n mediaType?: \"image\" | \"video\" | undefined;\n poster?: string | undefined;\n autoplay?: boolean | undefined;\n loop?: boolean | undefined;\n muted?: boolean | undefined;\n controls?: boolean | undefined;\n};\n\nexport function MediaRenderer({\n src,\n alt = \"Media\",\n objectFit = \"cover\",\n focusPoint,\n mediaType = \"image\",\n poster,\n autoplay = false,\n loop = false,\n muted = true,\n controls = true,\n}: MediaRendererProps): React.JSX.Element {\n const hasValidSrc = src && src.trim() !== \"\";\n const objectPosition = focusPoint?.replace(\"-\", \" \");\n\n if (!hasValidSrc) {\n const Icon = mediaType === \"video\" ? Video : Image;\n const label =\n mediaType === \"video\" ? \"No video selected\" : \"No image selected\";\n return (\n <div className=\"bg-muted flex h-full min-h-[200px] w-full items-center justify-center\">\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <Icon className=\"h-12 w-12\" />\n <p className=\"text-sm\">{label}</p>\n </div>\n </div>\n );\n }\n\n const isContainMode = objectFit === \"contain\";\n const blurSrc = isContainMode ? `${src}?tr=bl-50` : undefined;\n\n if (mediaType === \"video\") {\n const blurredBgSrc = isContainMode\n ? poster\n ? `${poster}?tr=bl-50`\n : blurSrc\n : undefined;\n\n const controlsHoverClass = controls\n ? \"[@media(hover:hover)]:[&::-webkit-media-controls-panel]:opacity-0 [&::-webkit-media-controls-panel]:transition-opacity [&::-webkit-media-controls-panel]:duration-300 [@media(hover:hover)]:hover:[&::-webkit-media-controls-panel]:opacity-100\"\n : \"pointer-events-none\";\n\n if (isContainMode && blurredBgSrc) {\n return (\n <div className=\"relative h-full w-full overflow-hidden\">\n <img\n src={blurredBgSrc}\n alt=\"\"\n className=\"absolute inset-0 h-full w-full object-cover\"\n aria-hidden=\"true\"\n />\n <div className=\"absolute inset-0 bg-black/30\" aria-hidden=\"true\" />\n <video\n src={src}\n poster={poster}\n controls={controls}\n autoPlay={autoplay}\n loop={loop}\n muted={muted}\n playsInline\n className={`relative z-10 h-full w-full object-contain ${controlsHoverClass}`}\n >\n Your browser does not support the video tag.\n </video>\n </div>\n );\n }\n\n return (\n <video\n src={src}\n poster={poster}\n controls={controls}\n autoPlay={autoplay}\n loop={loop}\n muted={muted}\n playsInline\n className={`h-full w-full object-${objectFit} ${controlsHoverClass}`}\n style={objectPosition ? { objectPosition } : undefined}\n >\n Your browser does not support the video tag.\n </video>\n );\n }\n\n if (isContainMode) {\n return (\n <div className=\"relative h-full w-full overflow-hidden\">\n <img\n src={blurSrc}\n alt=\"\"\n className=\"absolute inset-0 h-full w-full object-cover\"\n aria-hidden=\"true\"\n />\n <div className=\"absolute inset-0 bg-black/30\" aria-hidden=\"true\" />\n <img\n src={src}\n alt={alt}\n className=\"relative z-10 h-full w-full object-contain\"\n />\n </div>\n );\n }\n\n return (\n <img\n src={src}\n alt={alt}\n className={`h-full w-full object-${objectFit}`}\n style={objectPosition ? { objectPosition } : undefined}\n />\n );\n}\n\n/**\n * Converts a ShareableItem to MediaRenderer props.\n * Replaces the createWidgetFromShareable → ScreenRenderer pattern.\n */\nexport function getMediaPropsFromShareable(\n item: ShareableItem,\n): MediaRendererProps {\n const isVideo = item.kind === \"video\" || !!item.videoUrl;\n\n if (isVideo && item.videoUrl) {\n const result: MediaRendererProps = {\n mediaType: \"video\",\n src: item.videoUrl,\n alt: item.title ?? \"Video\",\n };\n if (item.imageUrl != null) result.poster = item.imageUrl;\n return result;\n }\n\n const result: MediaRendererProps = {\n mediaType: \"image\",\n alt: item.title || \"Image\",\n objectFit: \"cover\",\n };\n if (item.imageUrl != null) result.src = item.imageUrl;\n return result;\n}\n\n/**\n * Extracts media props from an ImageWidget/VideoWidget schema.\n * Used by CarouselWidget for slide.content rendering.\n */\nexport function getMediaPropsFromWidgetSchema(\n schema: WidgetSchema,\n): MediaRendererProps {\n const props = schema.props;\n\n const resource = props.resource as ShareableItem | undefined;\n const useCustomUrl = props.useCustomUrl as boolean | undefined;\n const focusPoint = props.focusPoint as string | undefined;\n const displayFit = props.displayFit as\n | MediaRendererProps[\"objectFit\"]\n | undefined;\n\n if (schema.type === \"VideoWidget\") {\n const result: MediaRendererProps = {\n mediaType: \"video\",\n autoplay: (props.autoplay as boolean | undefined) ?? false,\n loop: (props.loop as boolean | undefined) ?? false,\n muted: (props.muted as boolean | undefined) ?? true,\n controls: (props.controls as boolean | undefined) ?? true,\n objectFit: displayFit ?? \"cover\",\n focusPoint,\n };\n if (useCustomUrl) {\n if (typeof props.src === \"string\") result.src = props.src;\n if (typeof props.poster === \"string\") result.poster = props.poster;\n } else if (resource) {\n if (resource.videoUrl) result.src = resource.videoUrl;\n else if (typeof props.src === \"string\") result.src = props.src;\n if (resource.imageUrl) result.poster = resource.imageUrl;\n else if (typeof props.poster === \"string\") result.poster = props.poster;\n } else {\n if (typeof props.src === \"string\") result.src = props.src;\n if (typeof props.poster === \"string\") result.poster = props.poster;\n }\n return result;\n }\n\n const result: MediaRendererProps = {\n mediaType: \"image\",\n alt: (props.alt as string | undefined) ?? \"Image\",\n objectFit: displayFit ?? \"cover\",\n focusPoint,\n };\n if (useCustomUrl) {\n if (typeof props.src === \"string\") result.src = props.src;\n } else if (resource) {\n if (resource.imageUrl) result.src = resource.imageUrl;\n else if (typeof props.src === \"string\") result.src = props.src;\n if (resource.title) result.alt = resource.title;\n } else {\n if (typeof props.src === \"string\") result.src = props.src;\n }\n return result;\n}\n"],"mappings":";;;;AAiBA,SAAgB,cAAc,EAC5B,KACA,MAAM,SACN,YAAY,SACZ,YACA,YAAY,SACZ,QACA,WAAW,OACX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MAAM;AACtD,OAAI,OAAO,MAAM,WAAW,SAAU,QAAO,SAAS,MAAM;aACnD,UAAU;AACnB,OAAI,SAAS,SAAU,QAAO,MAAM,SAAS;YACpC,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;AAC3D,OAAI,SAAS,SAAU,QAAO,SAAS,SAAS;YACvC,OAAO,MAAM,WAAW,SAAU,QAAO,SAAS,MAAM;SAC5D;AACL,OAAI,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;AACtD,OAAI,OAAO,MAAM,WAAW,SAAU,QAAO,SAAS,MAAM;;AAE9D,SAAO;;CAGT,MAAM,SAA6B;EACjC,WAAW;EACX,KAAM,MAAM,OAA8B;EAC1C,WAAW,cAAc;EACzB;EACD;AACD,KAAI;MACE,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;YAC7C,UAAU;AACnB,MAAI,SAAS,SAAU,QAAO,MAAM,SAAS;WACpC,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;AAC3D,MAAI,SAAS,MAAO,QAAO,MAAM,SAAS;YAEtC,OAAO,MAAM,QAAQ,SAAU,QAAO,MAAM,MAAM;AAExD,QAAO"}
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-DAgNkxik.cjs");
2
- const require_FluidProvider = require("./FluidProvider-9JuTycML.cjs");
2
+ const require_FluidProvider = require("./FluidProvider-SnHdl4ww.cjs");
3
3
  const require_src = require("./src-DqIS-4ns.cjs");
4
- const require_use_fluid_api = require("./use-fluid-api-CBm9h3s3.cjs");
4
+ const require_use_fluid_api = require("./use-fluid-api-DyI6LDsV.cjs");
5
5
  const require_dist = require("./dist-NpiIdjkL.cjs");
6
6
  const require_es = require("./es-qN_AsxTa.cjs");
7
7
  let react = require("react");
@@ -59628,4 +59628,4 @@ Object.defineProperty(exports, "useMessagingConfig", {
59628
59628
  }
59629
59629
  });
59630
59630
 
59631
- //# sourceMappingURL=MessagingScreen-DpVYlTyB.cjs.map
59631
+ //# sourceMappingURL=MessagingScreen-27HyrQ1V.cjs.map