@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,4 +1,4 @@
1
- import "./FluidProvider-9ZC28GXK.mjs";
1
+ import "./FluidProvider-uuu90TSG.mjs";
2
2
  import "./error-state-BGEvTYIh.mjs";
3
3
  import "./PointsWidget-DjSC-B2i.mjs";
4
4
  import "./ScreenRenderer-CnxT7sYF.mjs";
@@ -13,23 +13,23 @@ import "./CardWidget-BKk7OtDP.mjs";
13
13
  import "./purify.es-BiyaWMrt.mjs";
14
14
  import "./src-Bh-9OV8i.mjs";
15
15
  import "./scroll-arrows-D9DfrbI-.mjs";
16
- import "./MediaRenderer-CY2gR7hk.mjs";
17
- import "./CarouselWidget-lx6QKa-q.mjs";
16
+ import "./MediaRenderer-B3R-Q6Qt.mjs";
17
+ import "./CarouselWidget-BGdjG-xz.mjs";
18
18
  import "./CatchUpWidget-BGOAfvS0.mjs";
19
19
  import "./ChartWidget-DSaru9Bb.mjs";
20
20
  import "./LayoutWidget-DVqlQga6.mjs";
21
21
  import "./ContainerWidget-Dlno2qQ7.mjs";
22
- import "./ImageWidget-BLnPO0Ba.mjs";
22
+ import "./ImageWidget-BHwucvLx.mjs";
23
23
  import "./LinkWidget-dwIVKZD0.mjs";
24
- import "./ListWidget-DuPrSL9o.mjs";
24
+ import "./ListWidget-ZqCYH78q.mjs";
25
25
  import "./MySiteWidget-KK2_WF16.mjs";
26
- import "./NestedWidget-DS8F_8SN.mjs";
26
+ import "./NestedWidget-JS_3-isb.mjs";
27
27
  import "./QuickShareWidget-DsBI1JQ_.mjs";
28
28
  import "./RecentActivityWidget-CuU8Rd77.mjs";
29
29
  import "./SeparatorWidget-DQqeYY3c.mjs";
30
30
  import "./SpacerWidget-DgVU58BC.mjs";
31
- import "./TableWidget-CK5jQxjz.mjs";
31
+ import "./TableWidget-DjYabx1e.mjs";
32
32
  import "./ToDoWidget-Cmvf7I6c.mjs";
33
- import "./VideoWidget-ho9fGQ3V.mjs";
34
- import { n as appDownloadScreenPropertySchema, t as AppDownloadScreen } from "./AppDownloadScreen-DcVl4492.mjs";
33
+ import "./VideoWidget-51MxnPRZ.mjs";
34
+ import { n as appDownloadScreenPropertySchema, t as AppDownloadScreen } from "./AppDownloadScreen-pm8fLxZX.mjs";
35
35
  export { AppDownloadScreen, appDownloadScreenPropertySchema };
@@ -1,5 +1,5 @@
1
1
  require("./chunk-DAgNkxik.cjs");
2
- require("./FluidProvider-9JuTycML.cjs");
2
+ require("./FluidProvider-SnHdl4ww.cjs");
3
3
  require("./error-state-CGCSDJIJ.cjs");
4
4
  require("./PointsWidget-Bs74dyFl.cjs");
5
5
  require("./ScreenRenderer-D-vpSa-G.cjs");
@@ -14,24 +14,24 @@ require("./CardWidget-BkLF5NI4.cjs");
14
14
  require("./purify.es-BNrhJaiC.cjs");
15
15
  require("./src-DqIS-4ns.cjs");
16
16
  require("./scroll-arrows-BNDly6uT.cjs");
17
- require("./MediaRenderer-CkMwv5q1.cjs");
18
- require("./CarouselWidget-C_Bpw7nB.cjs");
17
+ require("./MediaRenderer-CRKJcPD9.cjs");
18
+ require("./CarouselWidget-DgskhtDP.cjs");
19
19
  require("./CatchUpWidget-DXjW4lrg.cjs");
20
20
  require("./ChartWidget-CS600CjN.cjs");
21
21
  require("./LayoutWidget-q4xxJVPn.cjs");
22
22
  require("./ContainerWidget-CdUs8OBL.cjs");
23
- require("./ImageWidget-DbDhysGw.cjs");
23
+ require("./ImageWidget-BRfKvv08.cjs");
24
24
  require("./LinkWidget-Bvw5OZwU.cjs");
25
- require("./ListWidget-CiV9j7vm.cjs");
25
+ require("./ListWidget-DAtEwFCR.cjs");
26
26
  require("./MySiteWidget-BPp8ZoqT.cjs");
27
- require("./NestedWidget-C1neMqH7.cjs");
27
+ require("./NestedWidget-cl38JElu.cjs");
28
28
  require("./QuickShareWidget-C5u0Rngd.cjs");
29
29
  require("./RecentActivityWidget-WmA5W55V.cjs");
30
30
  require("./SeparatorWidget-UJrep6Kl.cjs");
31
31
  require("./SpacerWidget-Br2IZFFv.cjs");
32
- require("./TableWidget-Vcxw-se8.cjs");
32
+ require("./TableWidget-Cri6r5Yr.cjs");
33
33
  require("./ToDoWidget-Bv6POc5R.cjs");
34
- require("./VideoWidget-7Q2eqHFn.cjs");
35
- const require_AppDownloadScreen = require("./AppDownloadScreen-BH7GQ-qi.cjs");
34
+ require("./VideoWidget-DnnuIvW1.cjs");
35
+ const require_AppDownloadScreen = require("./AppDownloadScreen-oMzxBETr.cjs");
36
36
  exports.AppDownloadScreen = require_AppDownloadScreen.AppDownloadScreen;
37
37
  exports.appDownloadScreenPropertySchema = require_AppDownloadScreen.appDownloadScreenPropertySchema;
@@ -1,5 +1,5 @@
1
1
  require("./chunk-DAgNkxik.cjs");
2
- const require_use_current_user = require("./use-current-user-Ccn1lGeB.cjs");
2
+ const require_use_current_user = require("./use-current-user-Bld9wMVT.cjs");
3
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
4
  let lucide_react = require("lucide-react");
5
5
  let clsx = require("clsx");
@@ -220,4 +220,4 @@ Object.defineProperty(exports, "appDownloadScreenPropertySchema", {
220
220
  }
221
221
  });
222
222
 
223
- //# sourceMappingURL=AppDownloadScreen-BH7GQ-qi.cjs.map
223
+ //# sourceMappingURL=AppDownloadScreen-oMzxBETr.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppDownloadScreen-BH7GQ-qi.cjs","names":["ExternalLink","AppDownloadScreen","useCurrentUser","AppDownloadScreenUI"],"sources":["../../app-download-ui/src/components/AppStoreButtons.tsx","../../app-download-ui/src/components/QrCodeSection.tsx","../../app-download-ui/src/components/ImageSection.tsx","../../app-download-ui/src/lib/cn.ts","../../app-download-ui/src/components/AppDownloadScreen.tsx","../src/screens/AppDownloadScreen.tsx"],"sourcesContent":["import { ExternalLink } from \"lucide-react\";\n\nexport interface AppStoreButtonsProps {\n appstoreUrl: string;\n playstoreUrl?: string;\n}\n\nfunction AppleIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 384 512\"\n fill=\"currentColor\"\n className=\"size-5\"\n >\n <path d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-62.1 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\" />\n </svg>\n );\n}\n\nfunction GooglePlayIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n fill=\"currentColor\"\n className=\"size-5\"\n >\n <path d=\"M325.3 234.3L104.6 13l280.8 161.2-60.1 60.1zM47 0C34 6.8 25.3 19.2 25.3 35.3v441.3c0 16.1 8.7 28.5 21.7 35.3l256.6-256L47 0zm425.2 225.6l-58.9-34.1-65.7 64.5 65.7 64.5 60.1-34.1c18-14.3 18-46.5-1.2-60.8zM104.6 499l280.8-161.2-60.1-60.1L104.6 499z\" />\n </svg>\n );\n}\n\nexport function AppStoreButtons({\n appstoreUrl,\n playstoreUrl,\n}: AppStoreButtonsProps) {\n return (\n <div\n className={`grid gap-4 ${playstoreUrl ? \"grid-cols-2\" : \"grid-cols-1\"}`}\n >\n <a\n href={appstoreUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <AppleIcon />\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Open\n <br />\n App Store\n </div>\n </div>\n <div className=\"flex items-start\">\n <ExternalLink className=\"size-4\" />\n </div>\n </div>\n </a>\n\n {playstoreUrl && (\n <a\n href={playstoreUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <GooglePlayIcon />\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Open\n <br />\n Play Store\n </div>\n </div>\n <div className=\"flex items-start\">\n <ExternalLink className=\"size-4\" />\n </div>\n </div>\n </a>\n )}\n </div>\n );\n}\n","export interface QrCodeSectionProps {\n companyId: number;\n}\n\nexport function QrCodeSection({ companyId }: QrCodeSectionProps) {\n const redirectUrl = `https://api.fluid.app/mobile_app_download/${companyId}`;\n const qrCodeUrl = `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(redirectUrl)}`;\n\n return (\n <a\n href={redirectUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex items-end justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Scan to\n <br />\n Download\n </div>\n </div>\n <div className=\"flex\">\n <img\n src={qrCodeUrl}\n alt=\"QR code for mobile app download\"\n className=\"h-16 w-16\"\n loading=\"lazy\"\n />\n </div>\n </div>\n </a>\n );\n}\n","const DEFAULT_IMAGE =\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/iphone_product.png\";\n\nconst DEFAULT_LOGO =\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png\";\n\nexport interface ImageSectionProps {\n logoUrl?: string | null;\n screenshotUrl?: string | null;\n appName?: string;\n}\n\nexport function ImageSection({\n logoUrl,\n screenshotUrl,\n appName = \"App\",\n}: ImageSectionProps) {\n return (\n <div className=\"flex flex-col overflow-hidden\">\n <div className=\"-mb-px flex flex-1 flex-col\">\n <div className=\"flex h-20 px-3 pt-8\">\n <img\n src={logoUrl || DEFAULT_LOGO}\n alt={appName}\n width={150}\n height={150}\n className=\"object-contain\"\n />\n </div>\n <div\n className={\n screenshotUrl\n ? \"mt-8 flex flex-1 items-end justify-start\"\n : \"-ml-20 flex flex-1 items-end justify-start\"\n }\n >\n <img\n src={screenshotUrl || DEFAULT_IMAGE}\n alt=\"Mobile app interface\"\n width={480}\n height={500}\n className=\"h-full w-auto object-cover\"\n />\n </div>\n </div>\n </div>\n );\n}\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { AppStoreButtons } from \"./AppStoreButtons\";\nimport { QrCodeSection } from \"./QrCodeSection\";\nimport { ImageSection } from \"./ImageSection\";\nimport { cn } from \"../lib/cn\";\n\nconst DEFAULT_APPSTORE_URL =\n \"https://apps.apple.com/app/wecommerce/id1564463740\";\nconst DEFAULT_PLAYSTORE_URL =\n \"https://play.google.com/store/apps/details?id=com.fluid.crm\";\n\nexport interface AppDownloadScreenProps {\n companyId: number;\n appstoreUrl?: string | null;\n playstoreUrl?: string | null;\n logoUrl?: string | null;\n screenshotUrl?: string | null;\n appName?: string;\n className?: string;\n}\n\nexport function AppDownloadScreen({\n companyId,\n appstoreUrl,\n playstoreUrl,\n logoUrl,\n screenshotUrl,\n appName,\n className,\n}: AppDownloadScreenProps) {\n const resolvedAppstoreUrl = appstoreUrl?.trim() || DEFAULT_APPSTORE_URL;\n const resolvedPlaystoreUrl = playstoreUrl?.trim() || DEFAULT_PLAYSTORE_URL;\n\n return (\n <div\n className={cn(\"flex h-full items-center justify-center p-4\", className)}\n >\n <div className=\"bg-muted relative mx-4 w-full max-w-6xl overflow-hidden rounded-xl px-6 shadow-xl\">\n <div className=\"grid h-150 w-full grid-cols-1 lg:grid-cols-2\">\n {/* Left side - Images */}\n <ImageSection\n logoUrl={logoUrl}\n screenshotUrl={screenshotUrl}\n appName={appName}\n />\n\n {/* Right side - Content */}\n <div className=\"space-y-2 pt-8 pb-8\">\n <h1 className=\"mt-12 text-left text-[32px] leading-tight font-black text-gray-900\">\n EVERYTHING YOU NEED\n </h1>\n <h1 className=\"-mt-2 text-left text-[32px] leading-tight font-black text-gray-900\">\n AT YOUR FINGERTIPS\n </h1>\n <p className=\"-mt-1 text-left text-[14px] leading-relaxed text-gray-600\">\n Everything you need at your fingertips. Run your business from one\n place while on the go. Share, message, sell, and manage from the\n mobile app.\n </p>\n\n <h3 className=\"mt-16 text-left text-[12px] font-bold text-gray-900\">\n Download the App\n </h3>\n\n <AppStoreButtons\n appstoreUrl={resolvedAppstoreUrl}\n playstoreUrl={resolvedPlaystoreUrl}\n />\n\n <QrCodeSection companyId={companyId} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { AppDownloadScreen as AppDownloadScreenUI } from \"@fluid-app/portal-app-download-ui\";\nimport { useCurrentUser } from \"../hooks/use-current-user\";\n\nexport const appDownloadScreenPropertySchema = {\n widgetType: \"AppDownloadScreen\",\n displayName: \"App Download Screen\",\n fields: [],\n} as const satisfies WidgetPropertySchema;\n\nexport function AppDownloadScreen(): React.JSX.Element {\n const { data: user } = useCurrentUser();\n\n return (\n <AppDownloadScreenUI\n companyId={user?.company?.id ?? 0}\n appstoreUrl={user?.company?.appstore_url}\n playstoreUrl={user?.company?.playstore_url}\n logoUrl={user?.company?.logo_url}\n />\n );\n}\n"],"mappings":";;;;;;;AAOA,SAAS,YAAY;AACnB,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,OAAM;EACN,SAAQ;EACR,MAAK;EACL,WAAU;YAEV,iBAAA,GAAA,kBAAA,KAAC,QAAD,EAAM,GAAE,ubAAwb,CAAA;EAC5b,CAAA;;AAIV,SAAS,iBAAiB;AACxB,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,OAAM;EACN,SAAQ;EACR,MAAK;EACL,WAAU;YAEV,iBAAA,GAAA,kBAAA,KAAC,QAAD,EAAM,GAAE,0PAA2P,CAAA;EAC/P,CAAA;;AAIV,SAAgB,gBAAgB,EAC9B,aACA,gBACuB;AACvB,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,WAAW,cAAc,eAAe,gBAAgB;YAD1D,CAGE,iBAAA,GAAA,kBAAA,KAAC,KAAD;GACE,MAAM;GACN,QAAO;GACP,KAAI;GACJ,WAAU;aAEV,iBAAA,GAAA,kBAAA,MAAC,OAAD;IAAK,WAAU;cAAf,CACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;KAAK,WAAU;eAAf,CACE,iBAAA,GAAA,kBAAA,KAAC,WAAD,EAAa,CAAA,EACb,iBAAA,GAAA,kBAAA,MAAC,OAAD;MAAK,WAAU;gBAAf;OAAsD;OAEpD,iBAAA,GAAA,kBAAA,KAAC,MAAD,EAAM,CAAA;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iBAAA,GAAA,kBAAA,KAAC,MAAD;OAAI,WAAU;iBAAqE;OAE9E,CAAA;MACL,iBAAA,GAAA,kBAAA,KAAC,MAAD;OAAI,WAAU;iBAAqE;OAE9E,CAAA;MACL,iBAAA,GAAA,kBAAA,KAAC,KAAD;OAAG,WAAU;iBAA4D;OAIrE,CAAA;MAEJ,iBAAA,GAAA,kBAAA,KAAC,MAAD;OAAI,WAAU;iBAAsD;OAE/D,CAAA;MAEL,iBAAA,GAAA,kBAAA,KAAC,iBAAD;OACE,aAAa;OACb,cAAc;OACd,CAAA;MAEF,iBAAA,GAAA,kBAAA,KAAC,eAAD,EAA0B,WAAa,CAAA;MACnC;OACF;;GACF,CAAA;EACF,CAAA;;;;ACpEV,MAAa,kCAAkC;CAC7C,YAAY;CACZ,aAAa;CACb,QAAQ,EAAE;CACX;AAED,SAAgB,oBAAuC;CACrD,MAAM,EAAE,MAAM,SAASC,yBAAAA,gBAAgB;AAEvC,QACE,iBAAA,GAAA,kBAAA,KAACC,qBAAD;EACE,WAAW,MAAM,SAAS,MAAM;EAChC,aAAa,MAAM,SAAS;EAC5B,cAAc,MAAM,SAAS;EAC7B,SAAS,MAAM,SAAS;EACxB,CAAA"}
1
+ {"version":3,"file":"AppDownloadScreen-oMzxBETr.cjs","names":["ExternalLink","AppDownloadScreen","useCurrentUser","AppDownloadScreenUI"],"sources":["../../app-download-ui/src/components/AppStoreButtons.tsx","../../app-download-ui/src/components/QrCodeSection.tsx","../../app-download-ui/src/components/ImageSection.tsx","../../app-download-ui/src/lib/cn.ts","../../app-download-ui/src/components/AppDownloadScreen.tsx","../src/screens/AppDownloadScreen.tsx"],"sourcesContent":["import { ExternalLink } from \"lucide-react\";\n\nexport interface AppStoreButtonsProps {\n appstoreUrl: string;\n playstoreUrl?: string;\n}\n\nfunction AppleIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 384 512\"\n fill=\"currentColor\"\n className=\"size-5\"\n >\n <path d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-62.1 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\" />\n </svg>\n );\n}\n\nfunction GooglePlayIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n fill=\"currentColor\"\n className=\"size-5\"\n >\n <path d=\"M325.3 234.3L104.6 13l280.8 161.2-60.1 60.1zM47 0C34 6.8 25.3 19.2 25.3 35.3v441.3c0 16.1 8.7 28.5 21.7 35.3l256.6-256L47 0zm425.2 225.6l-58.9-34.1-65.7 64.5 65.7 64.5 60.1-34.1c18-14.3 18-46.5-1.2-60.8zM104.6 499l280.8-161.2-60.1-60.1L104.6 499z\" />\n </svg>\n );\n}\n\nexport function AppStoreButtons({\n appstoreUrl,\n playstoreUrl,\n}: AppStoreButtonsProps) {\n return (\n <div\n className={`grid gap-4 ${playstoreUrl ? \"grid-cols-2\" : \"grid-cols-1\"}`}\n >\n <a\n href={appstoreUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <AppleIcon />\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Open\n <br />\n App Store\n </div>\n </div>\n <div className=\"flex items-start\">\n <ExternalLink className=\"size-4\" />\n </div>\n </div>\n </a>\n\n {playstoreUrl && (\n <a\n href={playstoreUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <GooglePlayIcon />\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Open\n <br />\n Play Store\n </div>\n </div>\n <div className=\"flex items-start\">\n <ExternalLink className=\"size-4\" />\n </div>\n </div>\n </a>\n )}\n </div>\n );\n}\n","export interface QrCodeSectionProps {\n companyId: number;\n}\n\nexport function QrCodeSection({ companyId }: QrCodeSectionProps) {\n const redirectUrl = `https://api.fluid.app/mobile_app_download/${companyId}`;\n const qrCodeUrl = `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(redirectUrl)}`;\n\n return (\n <a\n href={redirectUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex items-end justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Scan to\n <br />\n Download\n </div>\n </div>\n <div className=\"flex\">\n <img\n src={qrCodeUrl}\n alt=\"QR code for mobile app download\"\n className=\"h-16 w-16\"\n loading=\"lazy\"\n />\n </div>\n </div>\n </a>\n );\n}\n","const DEFAULT_IMAGE =\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/iphone_product.png\";\n\nconst DEFAULT_LOGO =\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png\";\n\nexport interface ImageSectionProps {\n logoUrl?: string | null;\n screenshotUrl?: string | null;\n appName?: string;\n}\n\nexport function ImageSection({\n logoUrl,\n screenshotUrl,\n appName = \"App\",\n}: ImageSectionProps) {\n return (\n <div className=\"flex flex-col overflow-hidden\">\n <div className=\"-mb-px flex flex-1 flex-col\">\n <div className=\"flex h-20 px-3 pt-8\">\n <img\n src={logoUrl || DEFAULT_LOGO}\n alt={appName}\n width={150}\n height={150}\n className=\"object-contain\"\n />\n </div>\n <div\n className={\n screenshotUrl\n ? \"mt-8 flex flex-1 items-end justify-start\"\n : \"-ml-20 flex flex-1 items-end justify-start\"\n }\n >\n <img\n src={screenshotUrl || DEFAULT_IMAGE}\n alt=\"Mobile app interface\"\n width={480}\n height={500}\n className=\"h-full w-auto object-cover\"\n />\n </div>\n </div>\n </div>\n );\n}\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { AppStoreButtons } from \"./AppStoreButtons\";\nimport { QrCodeSection } from \"./QrCodeSection\";\nimport { ImageSection } from \"./ImageSection\";\nimport { cn } from \"../lib/cn\";\n\nconst DEFAULT_APPSTORE_URL =\n \"https://apps.apple.com/app/wecommerce/id1564463740\";\nconst DEFAULT_PLAYSTORE_URL =\n \"https://play.google.com/store/apps/details?id=com.fluid.crm\";\n\nexport interface AppDownloadScreenProps {\n companyId: number;\n appstoreUrl?: string | null;\n playstoreUrl?: string | null;\n logoUrl?: string | null;\n screenshotUrl?: string | null;\n appName?: string;\n className?: string;\n}\n\nexport function AppDownloadScreen({\n companyId,\n appstoreUrl,\n playstoreUrl,\n logoUrl,\n screenshotUrl,\n appName,\n className,\n}: AppDownloadScreenProps) {\n const resolvedAppstoreUrl = appstoreUrl?.trim() || DEFAULT_APPSTORE_URL;\n const resolvedPlaystoreUrl = playstoreUrl?.trim() || DEFAULT_PLAYSTORE_URL;\n\n return (\n <div\n className={cn(\"flex h-full items-center justify-center p-4\", className)}\n >\n <div className=\"bg-muted relative mx-4 w-full max-w-6xl overflow-hidden rounded-xl px-6 shadow-xl\">\n <div className=\"grid h-150 w-full grid-cols-1 lg:grid-cols-2\">\n {/* Left side - Images */}\n <ImageSection\n logoUrl={logoUrl}\n screenshotUrl={screenshotUrl}\n appName={appName}\n />\n\n {/* Right side - Content */}\n <div className=\"space-y-2 pt-8 pb-8\">\n <h1 className=\"mt-12 text-left text-[32px] leading-tight font-black text-gray-900\">\n EVERYTHING YOU NEED\n </h1>\n <h1 className=\"-mt-2 text-left text-[32px] leading-tight font-black text-gray-900\">\n AT YOUR FINGERTIPS\n </h1>\n <p className=\"-mt-1 text-left text-[14px] leading-relaxed text-gray-600\">\n Everything you need at your fingertips. Run your business from one\n place while on the go. Share, message, sell, and manage from the\n mobile app.\n </p>\n\n <h3 className=\"mt-16 text-left text-[12px] font-bold text-gray-900\">\n Download the App\n </h3>\n\n <AppStoreButtons\n appstoreUrl={resolvedAppstoreUrl}\n playstoreUrl={resolvedPlaystoreUrl}\n />\n\n <QrCodeSection companyId={companyId} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { AppDownloadScreen as AppDownloadScreenUI } from \"@fluid-app/portal-app-download-ui\";\nimport { useCurrentUser } from \"../hooks/use-current-user\";\n\nexport const appDownloadScreenPropertySchema = {\n widgetType: \"AppDownloadScreen\",\n displayName: \"App Download Screen\",\n fields: [],\n} as const satisfies WidgetPropertySchema;\n\nexport function AppDownloadScreen(): React.JSX.Element {\n const { data: user } = useCurrentUser();\n\n return (\n <AppDownloadScreenUI\n companyId={user?.company?.id ?? 0}\n appstoreUrl={user?.company?.appstore_url}\n playstoreUrl={user?.company?.playstore_url}\n logoUrl={user?.company?.logo_url}\n />\n );\n}\n"],"mappings":";;;;;;;AAOA,SAAS,YAAY;AACnB,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,OAAM;EACN,SAAQ;EACR,MAAK;EACL,WAAU;YAEV,iBAAA,GAAA,kBAAA,KAAC,QAAD,EAAM,GAAE,ubAAwb,CAAA;EAC5b,CAAA;;AAIV,SAAS,iBAAiB;AACxB,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,OAAM;EACN,SAAQ;E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AAS,MAAM;EAChC,aAAa,MAAM,SAAS;EAC5B,cAAc,MAAM,SAAS;EAC7B,SAAS,MAAM,SAAS;EACxB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { n as useCurrentUser } from "./use-current-user-CyodELl8.mjs";
1
+ import { n as useCurrentUser } from "./use-current-user-DnBpWIw6.mjs";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { ExternalLink } from "lucide-react";
4
4
  import { clsx } from "clsx";
@@ -208,4 +208,4 @@ function AppDownloadScreen() {
208
208
  //#endregion
209
209
  export { appDownloadScreenPropertySchema as n, AppDownloadScreen as t };
210
210
 
211
- //# sourceMappingURL=AppDownloadScreen-DcVl4492.mjs.map
211
+ //# sourceMappingURL=AppDownloadScreen-pm8fLxZX.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppDownloadScreen-DcVl4492.mjs","names":["AppDownloadScreen","AppDownloadScreenUI"],"sources":["../../app-download-ui/src/components/AppStoreButtons.tsx","../../app-download-ui/src/components/QrCodeSection.tsx","../../app-download-ui/src/components/ImageSection.tsx","../../app-download-ui/src/lib/cn.ts","../../app-download-ui/src/components/AppDownloadScreen.tsx","../src/screens/AppDownloadScreen.tsx"],"sourcesContent":["import { ExternalLink } from \"lucide-react\";\n\nexport interface AppStoreButtonsProps {\n appstoreUrl: string;\n playstoreUrl?: string;\n}\n\nfunction AppleIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 384 512\"\n fill=\"currentColor\"\n className=\"size-5\"\n >\n <path d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-62.1 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\" />\n </svg>\n );\n}\n\nfunction GooglePlayIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n fill=\"currentColor\"\n className=\"size-5\"\n >\n <path d=\"M325.3 234.3L104.6 13l280.8 161.2-60.1 60.1zM47 0C34 6.8 25.3 19.2 25.3 35.3v441.3c0 16.1 8.7 28.5 21.7 35.3l256.6-256L47 0zm425.2 225.6l-58.9-34.1-65.7 64.5 65.7 64.5 60.1-34.1c18-14.3 18-46.5-1.2-60.8zM104.6 499l280.8-161.2-60.1-60.1L104.6 499z\" />\n </svg>\n );\n}\n\nexport function AppStoreButtons({\n appstoreUrl,\n playstoreUrl,\n}: AppStoreButtonsProps) {\n return (\n <div\n className={`grid gap-4 ${playstoreUrl ? \"grid-cols-2\" : \"grid-cols-1\"}`}\n >\n <a\n href={appstoreUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <AppleIcon />\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Open\n <br />\n App Store\n </div>\n </div>\n <div className=\"flex items-start\">\n <ExternalLink className=\"size-4\" />\n </div>\n </div>\n </a>\n\n {playstoreUrl && (\n <a\n href={playstoreUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <GooglePlayIcon />\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Open\n <br />\n Play Store\n </div>\n </div>\n <div className=\"flex items-start\">\n <ExternalLink className=\"size-4\" />\n </div>\n </div>\n </a>\n )}\n </div>\n );\n}\n","export interface QrCodeSectionProps {\n companyId: number;\n}\n\nexport function QrCodeSection({ companyId }: QrCodeSectionProps) {\n const redirectUrl = `https://api.fluid.app/mobile_app_download/${companyId}`;\n const qrCodeUrl = `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(redirectUrl)}`;\n\n return (\n <a\n href={redirectUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex items-end justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Scan to\n <br />\n Download\n </div>\n </div>\n <div className=\"flex\">\n <img\n src={qrCodeUrl}\n alt=\"QR code for mobile app download\"\n className=\"h-16 w-16\"\n loading=\"lazy\"\n />\n </div>\n </div>\n </a>\n );\n}\n","const DEFAULT_IMAGE =\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/iphone_product.png\";\n\nconst DEFAULT_LOGO =\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png\";\n\nexport interface ImageSectionProps {\n logoUrl?: string | null;\n screenshotUrl?: string | null;\n appName?: string;\n}\n\nexport function ImageSection({\n logoUrl,\n screenshotUrl,\n appName = \"App\",\n}: ImageSectionProps) {\n return (\n <div className=\"flex flex-col overflow-hidden\">\n <div className=\"-mb-px flex flex-1 flex-col\">\n <div className=\"flex h-20 px-3 pt-8\">\n <img\n src={logoUrl || DEFAULT_LOGO}\n alt={appName}\n width={150}\n height={150}\n className=\"object-contain\"\n />\n </div>\n <div\n className={\n screenshotUrl\n ? \"mt-8 flex flex-1 items-end justify-start\"\n : \"-ml-20 flex flex-1 items-end justify-start\"\n }\n >\n <img\n src={screenshotUrl || DEFAULT_IMAGE}\n alt=\"Mobile app interface\"\n width={480}\n height={500}\n className=\"h-full w-auto object-cover\"\n />\n </div>\n </div>\n </div>\n );\n}\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { AppStoreButtons } from \"./AppStoreButtons\";\nimport { QrCodeSection } from \"./QrCodeSection\";\nimport { ImageSection } from \"./ImageSection\";\nimport { cn } from \"../lib/cn\";\n\nconst DEFAULT_APPSTORE_URL =\n \"https://apps.apple.com/app/wecommerce/id1564463740\";\nconst DEFAULT_PLAYSTORE_URL =\n \"https://play.google.com/store/apps/details?id=com.fluid.crm\";\n\nexport interface AppDownloadScreenProps {\n companyId: number;\n appstoreUrl?: string | null;\n playstoreUrl?: string | null;\n logoUrl?: string | null;\n screenshotUrl?: string | null;\n appName?: string;\n className?: string;\n}\n\nexport function AppDownloadScreen({\n companyId,\n appstoreUrl,\n playstoreUrl,\n logoUrl,\n screenshotUrl,\n appName,\n className,\n}: AppDownloadScreenProps) {\n const resolvedAppstoreUrl = appstoreUrl?.trim() || DEFAULT_APPSTORE_URL;\n const resolvedPlaystoreUrl = playstoreUrl?.trim() || DEFAULT_PLAYSTORE_URL;\n\n return (\n <div\n className={cn(\"flex h-full items-center justify-center p-4\", className)}\n >\n <div className=\"bg-muted relative mx-4 w-full max-w-6xl overflow-hidden rounded-xl px-6 shadow-xl\">\n <div className=\"grid h-150 w-full grid-cols-1 lg:grid-cols-2\">\n {/* Left side - Images */}\n <ImageSection\n logoUrl={logoUrl}\n screenshotUrl={screenshotUrl}\n appName={appName}\n />\n\n {/* Right side - Content */}\n <div className=\"space-y-2 pt-8 pb-8\">\n <h1 className=\"mt-12 text-left text-[32px] leading-tight font-black text-gray-900\">\n EVERYTHING YOU NEED\n </h1>\n <h1 className=\"-mt-2 text-left text-[32px] leading-tight font-black text-gray-900\">\n AT YOUR FINGERTIPS\n </h1>\n <p className=\"-mt-1 text-left text-[14px] leading-relaxed text-gray-600\">\n Everything you need at your fingertips. Run your business from one\n place while on the go. Share, message, sell, and manage from the\n mobile app.\n </p>\n\n <h3 className=\"mt-16 text-left text-[12px] font-bold text-gray-900\">\n Download the App\n </h3>\n\n <AppStoreButtons\n appstoreUrl={resolvedAppstoreUrl}\n playstoreUrl={resolvedPlaystoreUrl}\n />\n\n <QrCodeSection companyId={companyId} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { AppDownloadScreen as AppDownloadScreenUI } from \"@fluid-app/portal-app-download-ui\";\nimport { useCurrentUser } from \"../hooks/use-current-user\";\n\nexport const appDownloadScreenPropertySchema = {\n widgetType: \"AppDownloadScreen\",\n displayName: \"App Download Screen\",\n fields: [],\n} as const satisfies WidgetPropertySchema;\n\nexport function AppDownloadScreen(): React.JSX.Element {\n const { data: user } = useCurrentUser();\n\n return (\n <AppDownloadScreenUI\n companyId={user?.company?.id ?? 0}\n appstoreUrl={user?.company?.appstore_url}\n playstoreUrl={user?.company?.playstore_url}\n logoUrl={user?.company?.logo_url}\n />\n );\n}\n"],"mappings":";;;;;;AAOA,SAAS,YAAY;AACnB,QACE,oBAAC,OAAD;EACE,OAAM;EACN,SAAQ;EACR,MAAK;EACL,WAAU;YAEV,oBAAC,QAAD,EAAM,GAAE,ubAAwb,CAAA;EAC5b,CAAA;;AAIV,SAAS,iBAAiB;AACxB,QACE,oBAAC,OAAD;EACE,OAAM;EACN,SAAQ;EACR,MAAK;EACL,WAAU;YAEV,oBAAC,QAAD,EAAM,GAAE,0PAA2P,CAAA;EAC/P,CAAA;;AAIV,SAAgB,gBAAgB,EAC9B,aACA,gBACuB;AACvB,QACE,qBAAC,OAAD;EACE,WAAW,cAAc,eAAe,gBAAgB;YAD1D,CAGE,oBAAC,KAAD;GACE,MAAM;GACN,QAAO;GACP,KAAI;GACJ,WAAU;aAEV,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,qBAAC,OAAD;KAAK,WAAU;eAAf,CACE,oB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ACC,qBAAD;EACE,WAAW,MAAM,SAAS,MAAM;EAChC,aAAa,MAAM,SAAS;EAC5B,cAAc,MAAM,SAAS;EAC7B,SAAS,MAAM,SAAS;EACxB,CAAA"}
1
+ {"version":3,"file":"AppDownloadScreen-pm8fLxZX.mjs","names":["AppDownloadScreen","AppDownloadScreenUI"],"sources":["../../app-download-ui/src/components/AppStoreButtons.tsx","../../app-download-ui/src/components/QrCodeSection.tsx","../../app-download-ui/src/components/ImageSection.tsx","../../app-download-ui/src/lib/cn.ts","../../app-download-ui/src/components/AppDownloadScreen.tsx","../src/screens/AppDownloadScreen.tsx"],"sourcesContent":["import { ExternalLink } from \"lucide-react\";\n\nexport interface AppStoreButtonsProps {\n appstoreUrl: string;\n playstoreUrl?: string;\n}\n\nfunction AppleIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 384 512\"\n fill=\"currentColor\"\n className=\"size-5\"\n >\n <path d=\"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-62.1 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z\" />\n </svg>\n );\n}\n\nfunction GooglePlayIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n fill=\"currentColor\"\n className=\"size-5\"\n >\n <path d=\"M325.3 234.3L104.6 13l280.8 161.2-60.1 60.1zM47 0C34 6.8 25.3 19.2 25.3 35.3v441.3c0 16.1 8.7 28.5 21.7 35.3l256.6-256L47 0zm425.2 225.6l-58.9-34.1-65.7 64.5 65.7 64.5 60.1-34.1c18-14.3 18-46.5-1.2-60.8zM104.6 499l280.8-161.2-60.1-60.1L104.6 499z\" />\n </svg>\n );\n}\n\nexport function AppStoreButtons({\n appstoreUrl,\n playstoreUrl,\n}: AppStoreButtonsProps) {\n return (\n <div\n className={`grid gap-4 ${playstoreUrl ? \"grid-cols-2\" : \"grid-cols-1\"}`}\n >\n <a\n href={appstoreUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <AppleIcon />\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Open\n <br />\n App Store\n </div>\n </div>\n <div className=\"flex items-start\">\n <ExternalLink className=\"size-4\" />\n </div>\n </div>\n </a>\n\n {playstoreUrl && (\n <a\n href={playstoreUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <GooglePlayIcon />\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Open\n <br />\n Play Store\n </div>\n </div>\n <div className=\"flex items-start\">\n <ExternalLink className=\"size-4\" />\n </div>\n </div>\n </a>\n )}\n </div>\n );\n}\n","export interface QrCodeSectionProps {\n companyId: number;\n}\n\nexport function QrCodeSection({ companyId }: QrCodeSectionProps) {\n const redirectUrl = `https://api.fluid.app/mobile_app_download/${companyId}`;\n const qrCodeUrl = `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(redirectUrl)}`;\n\n return (\n <a\n href={redirectUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"block cursor-pointer rounded-sm border bg-white px-4 py-4 text-gray-900 transition-colors hover:bg-gray-50\"\n >\n <div className=\"flex items-end justify-between\">\n <div className=\"flex flex-col items-baseline\">\n <div className=\"mt-1 text-left text-xs font-semibold\">\n Scan to\n <br />\n Download\n </div>\n </div>\n <div className=\"flex\">\n <img\n src={qrCodeUrl}\n alt=\"QR code for mobile app download\"\n className=\"h-16 w-16\"\n loading=\"lazy\"\n />\n </div>\n </div>\n </a>\n );\n}\n","const DEFAULT_IMAGE =\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/iphone_product.png\";\n\nconst DEFAULT_LOGO =\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png\";\n\nexport interface ImageSectionProps {\n logoUrl?: string | null;\n screenshotUrl?: string | null;\n appName?: string;\n}\n\nexport function ImageSection({\n logoUrl,\n screenshotUrl,\n appName = \"App\",\n}: ImageSectionProps) {\n return (\n <div className=\"flex flex-col overflow-hidden\">\n <div className=\"-mb-px flex flex-1 flex-col\">\n <div className=\"flex h-20 px-3 pt-8\">\n <img\n src={logoUrl || DEFAULT_LOGO}\n alt={appName}\n width={150}\n height={150}\n className=\"object-contain\"\n />\n </div>\n <div\n className={\n screenshotUrl\n ? \"mt-8 flex flex-1 items-end justify-start\"\n : \"-ml-20 flex flex-1 items-end justify-start\"\n }\n >\n <img\n src={screenshotUrl || DEFAULT_IMAGE}\n alt=\"Mobile app interface\"\n width={480}\n height={500}\n className=\"h-full w-auto object-cover\"\n />\n </div>\n </div>\n </div>\n );\n}\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { AppStoreButtons } from \"./AppStoreButtons\";\nimport { QrCodeSection } from \"./QrCodeSection\";\nimport { ImageSection } from \"./ImageSection\";\nimport { cn } from \"../lib/cn\";\n\nconst DEFAULT_APPSTORE_URL =\n \"https://apps.apple.com/app/wecommerce/id1564463740\";\nconst DEFAULT_PLAYSTORE_URL =\n \"https://play.google.com/store/apps/details?id=com.fluid.crm\";\n\nexport interface AppDownloadScreenProps {\n companyId: number;\n appstoreUrl?: string | null;\n playstoreUrl?: string | null;\n logoUrl?: string | null;\n screenshotUrl?: string | null;\n appName?: string;\n className?: string;\n}\n\nexport function AppDownloadScreen({\n companyId,\n appstoreUrl,\n playstoreUrl,\n logoUrl,\n screenshotUrl,\n appName,\n className,\n}: AppDownloadScreenProps) {\n const resolvedAppstoreUrl = appstoreUrl?.trim() || DEFAULT_APPSTORE_URL;\n const resolvedPlaystoreUrl = playstoreUrl?.trim() || DEFAULT_PLAYSTORE_URL;\n\n return (\n <div\n className={cn(\"flex h-full items-center justify-center p-4\", className)}\n >\n <div className=\"bg-muted relative mx-4 w-full max-w-6xl overflow-hidden rounded-xl px-6 shadow-xl\">\n <div className=\"grid h-150 w-full grid-cols-1 lg:grid-cols-2\">\n {/* Left side - Images */}\n <ImageSection\n logoUrl={logoUrl}\n screenshotUrl={screenshotUrl}\n appName={appName}\n />\n\n {/* Right side - Content */}\n <div className=\"space-y-2 pt-8 pb-8\">\n <h1 className=\"mt-12 text-left text-[32px] leading-tight font-black text-gray-900\">\n EVERYTHING YOU NEED\n </h1>\n <h1 className=\"-mt-2 text-left text-[32px] leading-tight font-black text-gray-900\">\n AT YOUR FINGERTIPS\n </h1>\n <p className=\"-mt-1 text-left text-[14px] leading-relaxed text-gray-600\">\n Everything you need at your fingertips. Run your business from one\n place while on the go. Share, message, sell, and manage from the\n mobile app.\n </p>\n\n <h3 className=\"mt-16 text-left text-[12px] font-bold text-gray-900\">\n Download the App\n </h3>\n\n <AppStoreButtons\n appstoreUrl={resolvedAppstoreUrl}\n playstoreUrl={resolvedPlaystoreUrl}\n />\n\n <QrCodeSection companyId={companyId} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { AppDownloadScreen as AppDownloadScreenUI } from \"@fluid-app/portal-app-download-ui\";\nimport { useCurrentUser } from \"../hooks/use-current-user\";\n\nexport const appDownloadScreenPropertySchema = {\n widgetType: \"AppDownloadScreen\",\n displayName: \"App Download Screen\",\n fields: [],\n} as const satisfies WidgetPropertySchema;\n\nexport function AppDownloadScreen(): React.JSX.Element {\n const { data: user } = useCurrentUser();\n\n return (\n <AppDownloadScreenUI\n companyId={user?.company?.id ?? 0}\n appstoreUrl={user?.company?.appstore_url}\n playstoreUrl={user?.company?.playstore_url}\n logoUrl={user?.company?.logo_url}\n />\n );\n}\n"],"mappings":";;;;;;AAOA,SAAS,YAAY;AACnB,QACE,oBAAC,OAAD;EACE,OAAM;EACN,SAAQ;EACR,MAAK;EACL,WAAU;YAEV,oBAAC,QAAD,EAAM,GAAE,ubAAwb,CAAA;EAC5b,CAAA;;AAIV,SAAS,iBAAiB;AACxB,QACE,oBAAC,OAAD;EACE,OAAM;EACN,SAAQ;EACR,MAAK;EACL,WAAU;YAEV,oBAAC,QAAD,EAAM,GAAE,0PAA2P,CAAA;EAC/P,CAAA;;AAIV,SAAgB,gBAAgB,EAC9B,aACA,gBACuB;AACvB,QACE,qBAAC,OAAD;EACE,WAAW,cAAc,eAAe,gBAAgB;YAD1D,CAGE,oBAAC,KAAD;GACE,MAAM;GACN,QAAO;GACP,KAAI;GACJ,WAAU;aAEV,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,qBAAC,OAAD;KAAK,WAAU;eAAf,CACE,oBAAC,WAAD,EAAa,CAAA,EACb,qBAAC,OAAD;MAAK,WAAU;gBAAf;OAAsD;OAEpD,oBAAC,MAAD,EAAM,CAAA;;OAEF;QACF;QACN,oBAAC,OAAD;KAAK,WAAU;eACb,oBAAC,cAAD,EAAc,WAAU,UAAW,CAAA;KAC/B,CAAA,CACF;;GACJ,CAAA,EAEH,gBACC,oBAAC,KAAD;GACE,MAAM;GACN,QAAO;GACP,KAAI;GACJ,WAAU;aAEV,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,qBAAC,OAAD;KAAK,WAAU;eAAf,CACE,oBAA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9B,MAAM,uBACJ;AACF,MAAM,wBACJ;AAYF,SAAgBA,oBAAkB,EAChC,WACA,aACA,cACA,SACA,eACA,SACA,aACyB;CACzB,MAAM,sBAAsB,aAAa,MAAM,IAAI;CACnD,MAAM,uBAAuB,cAAc,MAAM,IAAI;AAErD,QACE,oBAAC,OAAD;EACE,WAAW,GAAG,+CAA+C,UAAU;YAEvE,oBAAC,OAAD;GAAK,WAAU;aACb,qBAAC,OAAD;IAAK,WAAU;cAAf,CAEE,oBAAC,cAAD;KACW;KACM;KACN;KACT,CAAA,EAGF,qBAAC,OAAD;KAAK,WAAU;eAAf;MACE,oBAAC,MAAD;OAAI,WAAU;iBAAqE;OAE9E,CAAA;MACL,oBAAC,MAAD;OAAI,WAAU;iBAAqE;OAE9E,CAAA;MACL,oBAAC,KAAD;OAAG,WAAU;iBAA4D;OAIrE,CAAA;MAEJ,oBAAC,MAAD;OAAI,WAAU;iBAAsD;OAE/D,CAAA;MAEL,oBAAC,iBAAD;OACE,aAAa;OACb,cAAc;OACd,CAAA;MAEF,oBAAC,eAAD,EAA0B,WAAa,CAAA;MACnC;OACF;;GACF,CAAA;EACF,CAAA;;;;ACpEV,MAAa,kCAAkC;CAC7C,YAAY;CACZ,aAAa;CACb,QAAQ,EAAE;CACX;AAED,SAAgB,oBAAuC;CACrD,MAAM,EAAE,MAAM,SAAS,gBAAgB;AAEvC,QACE,oBAACC,qBAAD;EACE,WAAW,MAAM,SAAS,MAAM;EAChC,aAAa,MAAM,SAAS;EAC5B,cAAc,MAAM,SAAS;EAC7B,SAAS,MAAM,SAAS;EACxB,CAAA"}
@@ -3,7 +3,7 @@ import { c as getButtonSizeField, i as getBorderColorField$1, l as getColorField
3
3
  import { t as purify } from "./purify.es-BiyaWMrt.mjs";
4
4
  import { dn as Button } from "./src-Bh-9OV8i.mjs";
5
5
  import { t as ScrollArrows } from "./scroll-arrows-D9DfrbI-.mjs";
6
- import { r as getMediaPropsFromWidgetSchema, t as MediaRenderer } from "./MediaRenderer-CY2gR7hk.mjs";
6
+ import { r as getMediaPropsFromWidgetSchema, t as MediaRenderer } from "./MediaRenderer-B3R-Q6Qt.mjs";
7
7
  import { useCallback, useEffect, useState } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { getHeightField } from "@fluid-app/portal-core/registries";
@@ -467,4 +467,4 @@ const carouselWidgetPropertySchema = {
467
467
  //#endregion
468
468
  export { CarouselWidget_exports as n, carouselWidgetPropertySchema as r, CarouselWidget as t };
469
469
 
470
- //# sourceMappingURL=CarouselWidget-lx6QKa-q.mjs.map
470
+ //# sourceMappingURL=CarouselWidget-BGdjG-xz.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselWidget-lx6QKa-q.mjs","names":["borderWidthClasses","borderColorClasses","DOMPurify","getBorderRadiusField","getBorderWidthField","getBorderColorField"],"sources":["../../widgets/src/widgets/CarouselWidget.tsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport { Button } from \"@fluid-app/ui-primitives\";\nimport { ScrollArrows } from \"../ui/scroll-arrows\";\nimport type { ComponentProps } from \"react\";\nimport { useEffect, useState, useCallback } from \"react\";\nimport type React from \"react\";\nimport {\n MediaRenderer,\n getMediaPropsFromWidgetSchema,\n} from \"../components/MediaRenderer\";\nimport type {\n WidgetSchema,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n AlignOptions,\n FontSizeOptions,\n PaddingOptions,\n ButtonSizeOptions,\n} from \"@fluid-app/portal-core/types\";\nimport {\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getButtonSizeField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\n\nconst DEFAULT_SLIDES: CarouselSlide[] = [];\n\ntype CarouselSlide = {\n id: string;\n content: WidgetSchema;\n title?: string;\n description?: string;\n buttonEnabled?: boolean;\n buttonText?: string;\n buttonVariant?:\n | \"default\"\n | \"secondary\"\n | \"outline\"\n | \"destructive\"\n | \"ghost\"\n | \"link\";\n buttonLink?: string;\n};\n\ntype CarouselWidgetProps = ComponentProps<\"div\"> & {\n slides?: CarouselSlide[];\n autoScrollInterval?: number;\n enableAutoScroll?: boolean;\n\n // Layout\n align?: AlignOptions;\n carouselHeight?: string;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n\n // Text Styling\n headerSize?: FontSizeOptions;\n headerColor?: ColorOptions;\n textSize?: FontSizeOptions;\n textColor?: ColorOptions;\n textWidth?: string;\n\n // Button\n showButton?: boolean;\n buttonColor?: ColorOptions;\n buttonSize?: ButtonSizeOptions;\n\n // Overlay\n overlayEnabled?: boolean;\n overlayType?: \"solid\" | \"gradient\";\n overlayIntensity?: number;\n};\n\nexport function CarouselWidget({\n slides = DEFAULT_SLIDES,\n autoScrollInterval = 3000,\n enableAutoScroll = false,\n carouselHeight = \"400px\",\n align = { vertical: \"bottom\", horizontal: \"left\" },\n overlayIntensity = 40,\n borderRadius = \"none\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 0,\n textWidth = \"100%\",\n headerSize = \"lg\",\n headerColor = \"background\",\n textSize = \"md\",\n textColor = \"background\",\n showButton = true,\n buttonColor = \"background\",\n buttonSize = \"default\",\n overlayEnabled = true,\n overlayType = \"solid\",\n className,\n ...props\n}: CarouselWidgetProps): React.JSX.Element {\n const [currentIndex, setCurrentIndex] = useState(0);\n const [isHovered, setIsHovered] = useState(false);\n\n const hasSlides = slides.length > 0;\n const totalSlides = slides.length;\n\n const goToNext = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === totalSlides - 1) {\n return 0;\n }\n return prev + 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToPrevious = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === 0) {\n return totalSlides - 1;\n }\n return prev - 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToSlide = useCallback(\n (index: number) => {\n if (!hasSlides) return;\n if (index >= 0 && index < totalSlides) {\n setCurrentIndex(index);\n }\n },\n [hasSlides, totalSlides],\n );\n\n // Auto-scroll effect\n useEffect(() => {\n if (!enableAutoScroll || !hasSlides || isHovered) return;\n\n const intervalId = setInterval(() => {\n goToNext();\n }, autoScrollInterval);\n\n return () => clearInterval(intervalId);\n }, [enableAutoScroll, autoScrollInterval, hasSlides, isHovered, goToNext]);\n\n // Reset to first slide if slides change\n useEffect(() => {\n if (currentIndex >= totalSlides && totalSlides > 0) {\n setCurrentIndex(0);\n }\n }, [totalSlides, currentIndex]);\n\n if (!hasSlides) {\n return (\n <div\n className={`rounded-${borderRadius} ${className} w-full overflow-hidden`}\n style={{ minHeight: carouselHeight }}\n {...props}\n >\n <div\n className=\"bg-muted flex h-full w-full items-center justify-center\"\n style={{ minHeight: carouselHeight }}\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <div className=\"text-4xl\">🎠</div>\n <p className=\"text-sm\">No slides added</p>\n <p className=\"text-muted-foreground/70 text-xs\">\n Add slides to create a carousel\n </p>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ minHeight: carouselHeight }}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n {...props}\n >\n {/* Slides Container */}\n <div\n className=\"relative h-full w-full\"\n style={{ minHeight: carouselHeight }}\n >\n <div\n className=\"flex h-full transition-transform duration-500 ease-in-out\"\n style={{\n transform: `translateX(-${currentIndex * 100}%)`,\n }}\n >\n {slides.map((slide) => (\n <div\n key={slide.id}\n className=\"relative h-full w-full flex-shrink-0\"\n style={{ minWidth: \"100%\", minHeight: carouselHeight }}\n >\n {/* Background image/content layer */}\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n {...getMediaPropsFromWidgetSchema(slide.content)}\n />\n </div>\n\n {/* Dark overlay for text readability */}\n {overlayEnabled && (\n <div\n className={`absolute inset-0 z-9 ${\n overlayType === \"gradient\"\n ? \"bg-gradient-to-t from-black to-transparent\"\n : \"bg-black\"\n }`}\n style={{\n opacity:\n (Number(String(overlayIntensity).replace(\"%\", \"\")) ||\n 40) / 100,\n }}\n />\n )}\n\n {/* Content box */}\n <div\n className={`absolute inset-x-0 z-10 flex px-3 ${\n align.horizontal === \"left\"\n ? \"justify-start\"\n : align.horizontal === \"center\"\n ? \"justify-center\"\n : \"justify-end\"\n } ${\n align.vertical === \"top\"\n ? \"top-0 pt-13\"\n : align.vertical === \"center\"\n ? \"top-1/2 -translate-y-1/2\"\n : \"bottom-0 pb-13\"\n }`}\n >\n <div\n className={`p-${padding} flex flex-col gap-3`}\n style={{ maxWidth: textWidth }}\n >\n {/* Heading and text */}\n <div className={`flex flex-col text-${align.horizontal}`}>\n {slide.title && (\n <h2\n className={`font-header mb-2 leading-tight font-bold text-${headerColor} text-${headerSize === \"md\" ? \"base\" : headerSize}`}\n >\n {slide.title}\n </h2>\n )}\n {slide.description && (\n <div\n className={`leading-snug text-${textColor} text-${textSize === \"md\" ? \"base\" : textSize} line-clamp-2`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(slide.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>\n\n {/* Button */}\n {slide.buttonText && slide.buttonEnabled && showButton && (\n <div className={`text-${align.horizontal}`}>\n <Button\n size={buttonSize}\n className={`rounded-md py-1 font-semibold bg-${buttonColor} text-${buttonColor}-foreground hover:bg-${buttonColor}/90`}\n asChild\n >\n <a href={slide.buttonLink}>{slide.buttonText}</a>\n </Button>\n </div>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n {/* Dots and Navigation */}\n {totalSlides > 1 && (\n <div\n className={`p-${padding} absolute bottom-0 z-10 flex w-full items-center justify-between ${align.horizontal === \"center\" ? \"h-full\" : \"\"}`}\n >\n {/* Pagination dots - always at bottom */}\n <div\n className={`flex items-center ${\n align.horizontal === \"center\"\n ? `p-${padding} absolute inset-x-0 bottom-3 justify-center`\n : \"\"\n }`}\n >\n <div\n className={`flex items-center gap-2 ${\n align.horizontal === \"center\" ? \"justify-center\" : \"\"\n }`}\n >\n {slides.map((_, index) => (\n <button\n key={`dot-${index}`}\n className={`h-[6px] w-[6px] rounded-full transition-colors ${\n index === currentIndex\n ? \"bg-background\"\n : \"bg-background/40 hover:bg-background/60\"\n }`}\n onClick={() => goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : \"false\"}\n />\n ))}\n </div>\n </div>\n\n {/* Navigation arrows - position changes based on alignment */}\n <div\n className={`flex items-center gap-[10px] ${\n align.horizontal === \"center\"\n ? `absolute inset-x-0 top-1/2 justify-between px-${padding}`\n : \"\"\n }`}\n >\n <ScrollArrows onPrevious={goToPrevious} onNext={goToNext} />\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport const carouselWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CarouselWidget\",\n displayName: \"Carousel\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"slides\"],\n fields: [\n // Styling tab - Text Styling group\n getFontSizeField({\n defaultValue: \"lg\",\n key: \"headerSize\",\n label: \"Header Font Size\",\n description: \"Font size for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"headerColor\",\n label: \"Header Color\",\n description: \"Color variant for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Text Styling\",\n },\n getFontSizeField({\n defaultValue: \"md\",\n key: \"textSize\",\n label: \"Text Font Size\",\n description: \"Font size for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Color variant for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n // Styling tab - Layout group\n {\n key: \"align\",\n label: \"Alignment\",\n type: \"alignment\",\n description: \"Alignment of the carousel content\",\n defaultValue: { vertical: \"bottom\", horizontal: \"left\" },\n options: {\n verticalEnabled: true,\n horizontalEnabled: true,\n },\n tab: \"styling\",\n group: \"Layout\",\n },\n {\n key: \"textWidth\",\n label: \"Content Width\",\n type: \"cssUnit\",\n description: \"Maximum width for slide content\",\n defaultValue: \"100%\",\n allowedUnits: [\"px\", \"rem\", \"%\"],\n defaultUnit: \"%\",\n minByUnit: { px: 50, rem: 3, \"%\": 10 },\n maxByUnit: { px: 1200, rem: 75, \"%\": 100 },\n stepByUnit: { px: 10, rem: 1, \"%\": 1 },\n tab: \"styling\",\n group: \"Layout\",\n },\n // Styling tab - Design group\n getHeightField({\n key: \"carouselHeight\",\n label: \"Carousel Height\",\n description: \"Height of the carousel\",\n defaultValue: \"400px\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getBorderRadiusField({\n defaultValue: \"md\",\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the carousel\",\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 getPaddingField({\n defaultValue: 4,\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding for the carousel\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"overlayEnabled\",\n label: \"Enable Overlay\",\n type: \"boolean\",\n description: \"Add background overlay to slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"overlayType\",\n label: \"Overlay Type\",\n type: \"buttonGroup\",\n description: \"Type of overlay to add to the slide content\",\n defaultValue: \"gradient\",\n options: [\n { label: \"Solid\", value: \"solid\" },\n { label: \"Gradient\", value: \"gradient\" },\n ],\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"overlayIntensity\",\n label: \"Overlay Intensity\",\n type: \"slider\",\n description: \"Opacity of the overlay background (0-100)\",\n min: 0,\n max: 100,\n step: 5,\n defaultValue: 50,\n unit: \"%\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"showButton\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Display the button in slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n defaultValue: \"primary\",\n key: \"buttonColor\",\n label: \"Button Color\",\n description: \"Color variant for the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n getButtonSizeField({\n defaultValue: \"default\",\n key: \"buttonSize\",\n label: \"Button Size\",\n description: \"Size of the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n // Behavior tab - Auto-Scroll group\n {\n key: \"enableAutoScroll\",\n label: \"Enable Auto-Scroll\",\n type: \"boolean\",\n description: \"Automatically advance to the next slide\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n },\n {\n key: \"autoScrollInterval\",\n label: \"Auto-Scroll Interval (ms)\",\n type: \"number\",\n description: \"Time in milliseconds between automatic slide transitions\",\n min: 1000,\n max: 10000,\n step: 500,\n defaultValue: 3000,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n requiresKeyToBeTrue: \"enableAutoScroll\",\n },\n // Data tab - Data Configuration group\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n // Per-item configuration schema for custom data sources\n itemConfigSchema: {\n description: \"Configure settings for this slide\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title for this slide\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description for this slide\",\n rows: 3,\n },\n {\n key: \"buttonEnabled\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Show the button in the slide\",\n defaultValue: false,\n },\n {\n key: \"buttonText\",\n label: \"Button Text\",\n type: \"text\",\n description: \"Text to display on the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n {\n key: \"buttonLink\",\n label: \"Button Link\",\n type: \"text\",\n description: \"URL for the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;AAoCA,MAAM,iBAAkC,EAAE;AAkD1C,SAAgB,eAAe,EAC7B,SAAS,gBACT,qBAAqB,KACrB,mBAAmB,OACnB,iBAAiB,SACjB,QAAQ;CAAE,UAAU;CAAU,YAAY;CAAQ,EAClD,mBAAmB,IACnB,eAAe,QACf,cAAc,QACd,cAAc,SACd,UAAU,GACV,YAAY,QACZ,aAAa,MACb,cAAc,cACd,WAAW,MACX,YAAY,cACZ,aAAa,MACb,cAAc,cACd,aAAa,WACb,iBAAiB,MACjB,cAAc,SACd,WACA,GAAG,SACsC;CACzC,MAAM,CAAC,cAAc,mBAAmB,SAAS,EAAE;CACnD,MAAM,CAAC,W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;GACR,CAAC;EACFC,sBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,gBAAgB;GACd,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAS,OAAO;IAAS,EAClC;IAAE,OAAO;IAAY,OAAO;IAAY,CACzC;GACD,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,MAAM;GACN,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,mBAAmB;GACjB,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAEF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;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;GACP,qBAAqB;GACtB;EAED;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CAED,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;IACb,cAAc;IACf;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACF;EACF;CACF"}
1
+ {"version":3,"file":"CarouselWidget-BGdjG-xz.mjs","names":["borderWidthClasses","borderColorClasses","DOMPurify","getBorderRadiusField","getBorderWidthField","getBorderColorField"],"sources":["../../widgets/src/widgets/CarouselWidget.tsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport { Button } from \"@fluid-app/ui-primitives\";\nimport { ScrollArrows } from \"../ui/scroll-arrows\";\nimport type { ComponentProps } from \"react\";\nimport { useEffect, useState, useCallback } from \"react\";\nimport type React from \"react\";\nimport {\n MediaRenderer,\n getMediaPropsFromWidgetSchema,\n} from \"../components/MediaRenderer\";\nimport type {\n WidgetSchema,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n AlignOptions,\n FontSizeOptions,\n PaddingOptions,\n ButtonSizeOptions,\n} from \"@fluid-app/portal-core/types\";\nimport {\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getButtonSizeField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\n\nconst DEFAULT_SLIDES: CarouselSlide[] = [];\n\ntype CarouselSlide = {\n id: string;\n content: WidgetSchema;\n title?: string;\n description?: string;\n buttonEnabled?: boolean;\n buttonText?: string;\n buttonVariant?:\n | \"default\"\n | \"secondary\"\n | \"outline\"\n | \"destructive\"\n | \"ghost\"\n | \"link\";\n buttonLink?: string;\n};\n\ntype CarouselWidgetProps = ComponentProps<\"div\"> & {\n slides?: CarouselSlide[];\n autoScrollInterval?: number;\n enableAutoScroll?: boolean;\n\n // Layout\n align?: AlignOptions;\n carouselHeight?: string;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n\n // Text Styling\n headerSize?: FontSizeOptions;\n headerColor?: ColorOptions;\n textSize?: FontSizeOptions;\n textColor?: ColorOptions;\n textWidth?: string;\n\n // Button\n showButton?: boolean;\n buttonColor?: ColorOptions;\n buttonSize?: ButtonSizeOptions;\n\n // Overlay\n overlayEnabled?: boolean;\n overlayType?: \"solid\" | \"gradient\";\n overlayIntensity?: number;\n};\n\nexport function CarouselWidget({\n slides = DEFAULT_SLIDES,\n autoScrollInterval = 3000,\n enableAutoScroll = false,\n carouselHeight = \"400px\",\n align = { vertical: \"bottom\", horizontal: \"left\" },\n overlayIntensity = 40,\n borderRadius = \"none\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 0,\n textWidth = \"100%\",\n headerSize = \"lg\",\n headerColor = \"background\",\n textSize = \"md\",\n textColor = \"background\",\n showButton = true,\n buttonColor = \"background\",\n buttonSize = \"default\",\n overlayEnabled = true,\n overlayType = \"solid\",\n className,\n ...props\n}: CarouselWidgetProps): React.JSX.Element {\n const [currentIndex, setCurrentIndex] = useState(0);\n const [isHovered, setIsHovered] = useState(false);\n\n const hasSlides = slides.length > 0;\n const totalSlides = slides.length;\n\n const goToNext = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === totalSlides - 1) {\n return 0;\n }\n return prev + 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToPrevious = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === 0) {\n return totalSlides - 1;\n }\n return prev - 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToSlide = useCallback(\n (index: number) => {\n if (!hasSlides) return;\n if (index >= 0 && index < totalSlides) {\n setCurrentIndex(index);\n }\n },\n [hasSlides, totalSlides],\n );\n\n // Auto-scroll effect\n useEffect(() => {\n if (!enableAutoScroll || !hasSlides || isHovered) return;\n\n const intervalId = setInterval(() => {\n goToNext();\n }, autoScrollInterval);\n\n return () => clearInterval(intervalId);\n }, [enableAutoScroll, autoScrollInterval, hasSlides, isHovered, goToNext]);\n\n // Reset to first slide if slides change\n useEffect(() => {\n if (currentIndex >= totalSlides && totalSlides > 0) {\n setCurrentIndex(0);\n }\n }, [totalSlides, currentIndex]);\n\n if (!hasSlides) {\n return (\n <div\n className={`rounded-${borderRadius} ${className} w-full overflow-hidden`}\n style={{ minHeight: carouselHeight }}\n {...props}\n >\n <div\n className=\"bg-muted flex h-full w-full items-center justify-center\"\n style={{ minHeight: carouselHeight }}\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <div className=\"text-4xl\">🎠</div>\n <p className=\"text-sm\">No slides added</p>\n <p className=\"text-muted-foreground/70 text-xs\">\n Add slides to create a carousel\n </p>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ minHeight: carouselHeight }}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n {...props}\n >\n {/* Slides Container */}\n <div\n className=\"relative h-full w-full\"\n style={{ minHeight: carouselHeight }}\n >\n <div\n className=\"flex h-full transition-transform duration-500 ease-in-out\"\n style={{\n transform: `translateX(-${currentIndex * 100}%)`,\n }}\n >\n {slides.map((slide) => (\n <div\n key={slide.id}\n className=\"relative h-full w-full flex-shrink-0\"\n style={{ minWidth: \"100%\", minHeight: carouselHeight }}\n >\n {/* Background image/content layer */}\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n {...getMediaPropsFromWidgetSchema(slide.content)}\n />\n </div>\n\n {/* Dark overlay for text readability */}\n {overlayEnabled && (\n <div\n className={`absolute inset-0 z-9 ${\n overlayType === \"gradient\"\n ? \"bg-gradient-to-t from-black to-transparent\"\n : \"bg-black\"\n }`}\n style={{\n opacity:\n (Number(String(overlayIntensity).replace(\"%\", \"\")) ||\n 40) / 100,\n }}\n />\n )}\n\n {/* Content box */}\n <div\n className={`absolute inset-x-0 z-10 flex px-3 ${\n align.horizontal === \"left\"\n ? \"justify-start\"\n : align.horizontal === \"center\"\n ? \"justify-center\"\n : \"justify-end\"\n } ${\n align.vertical === \"top\"\n ? \"top-0 pt-13\"\n : align.vertical === \"center\"\n ? \"top-1/2 -translate-y-1/2\"\n : \"bottom-0 pb-13\"\n }`}\n >\n <div\n className={`p-${padding} flex flex-col gap-3`}\n style={{ maxWidth: textWidth }}\n >\n {/* Heading and text */}\n <div className={`flex flex-col text-${align.horizontal}`}>\n {slide.title && (\n <h2\n className={`font-header mb-2 leading-tight font-bold text-${headerColor} text-${headerSize === \"md\" ? \"base\" : headerSize}`}\n >\n {slide.title}\n </h2>\n )}\n {slide.description && (\n <div\n className={`leading-snug text-${textColor} text-${textSize === \"md\" ? \"base\" : textSize} line-clamp-2`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(slide.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>\n\n {/* Button */}\n {slide.buttonText && slide.buttonEnabled && showButton && (\n <div className={`text-${align.horizontal}`}>\n <Button\n size={buttonSize}\n className={`rounded-md py-1 font-semibold bg-${buttonColor} text-${buttonColor}-foreground hover:bg-${buttonColor}/90`}\n asChild\n >\n <a href={slide.buttonLink}>{slide.buttonText}</a>\n </Button>\n </div>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n {/* Dots and Navigation */}\n {totalSlides > 1 && (\n <div\n className={`p-${padding} absolute bottom-0 z-10 flex w-full items-center justify-between ${align.horizontal === \"center\" ? \"h-full\" : \"\"}`}\n >\n {/* Pagination dots - always at bottom */}\n <div\n className={`flex items-center ${\n align.horizontal === \"center\"\n ? `p-${padding} absolute inset-x-0 bottom-3 justify-center`\n : \"\"\n }`}\n >\n <div\n className={`flex items-center gap-2 ${\n align.horizontal === \"center\" ? \"justify-center\" : \"\"\n }`}\n >\n {slides.map((_, index) => (\n <button\n key={`dot-${index}`}\n className={`h-[6px] w-[6px] rounded-full transition-colors ${\n index === currentIndex\n ? \"bg-background\"\n : \"bg-background/40 hover:bg-background/60\"\n }`}\n onClick={() => goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : \"false\"}\n />\n ))}\n </div>\n </div>\n\n {/* Navigation arrows - position changes based on alignment */}\n <div\n className={`flex items-center gap-[10px] ${\n align.horizontal === \"center\"\n ? `absolute inset-x-0 top-1/2 justify-between px-${padding}`\n : \"\"\n }`}\n >\n <ScrollArrows onPrevious={goToPrevious} onNext={goToNext} />\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport const carouselWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CarouselWidget\",\n displayName: \"Carousel\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"slides\"],\n fields: [\n // Styling tab - Text Styling group\n getFontSizeField({\n defaultValue: \"lg\",\n key: \"headerSize\",\n label: \"Header Font Size\",\n description: \"Font size for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"headerColor\",\n label: \"Header Color\",\n description: \"Color variant for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Text Styling\",\n },\n getFontSizeField({\n defaultValue: \"md\",\n key: \"textSize\",\n label: \"Text Font Size\",\n description: \"Font size for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Color variant for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n // Styling tab - Layout group\n {\n key: \"align\",\n label: \"Alignment\",\n type: \"alignment\",\n description: \"Alignment of the carousel content\",\n defaultValue: { vertical: \"bottom\", horizontal: \"left\" },\n options: {\n verticalEnabled: true,\n horizontalEnabled: true,\n },\n tab: \"styling\",\n group: \"Layout\",\n },\n {\n key: \"textWidth\",\n label: \"Content Width\",\n type: \"cssUnit\",\n description: \"Maximum width for slide content\",\n defaultValue: \"100%\",\n allowedUnits: [\"px\", \"rem\", \"%\"],\n defaultUnit: \"%\",\n minByUnit: { px: 50, rem: 3, \"%\": 10 },\n maxByUnit: { px: 1200, rem: 75, \"%\": 100 },\n stepByUnit: { px: 10, rem: 1, \"%\": 1 },\n tab: \"styling\",\n group: \"Layout\",\n },\n // Styling tab - Design group\n getHeightField({\n key: \"carouselHeight\",\n label: \"Carousel Height\",\n description: \"Height of the carousel\",\n defaultValue: \"400px\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getBorderRadiusField({\n defaultValue: \"md\",\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the carousel\",\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 getPaddingField({\n defaultValue: 4,\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding for the carousel\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"overlayEnabled\",\n label: \"Enable Overlay\",\n type: \"boolean\",\n description: \"Add background overlay to slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"overlayType\",\n label: \"Overlay Type\",\n type: \"buttonGroup\",\n description: \"Type of overlay to add to the slide content\",\n defaultValue: \"gradient\",\n options: [\n { label: \"Solid\", value: \"solid\" },\n { label: \"Gradient\", value: \"gradient\" },\n ],\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"overlayIntensity\",\n label: \"Overlay Intensity\",\n type: \"slider\",\n description: \"Opacity of the overlay background (0-100)\",\n min: 0,\n max: 100,\n step: 5,\n defaultValue: 50,\n unit: \"%\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"showButton\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Display the button in slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n defaultValue: \"primary\",\n key: \"buttonColor\",\n label: \"Button Color\",\n description: \"Color variant for the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n getButtonSizeField({\n defaultValue: \"default\",\n key: \"buttonSize\",\n label: \"Button Size\",\n description: \"Size of the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n // Behavior tab - Auto-Scroll group\n {\n key: \"enableAutoScroll\",\n label: \"Enable Auto-Scroll\",\n type: \"boolean\",\n description: \"Automatically advance to the next slide\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n },\n {\n key: \"autoScrollInterval\",\n label: \"Auto-Scroll Interval (ms)\",\n type: \"number\",\n description: \"Time in milliseconds between automatic slide transitions\",\n min: 1000,\n max: 10000,\n step: 500,\n defaultValue: 3000,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n requiresKeyToBeTrue: \"enableAutoScroll\",\n },\n // Data tab - Data Configuration group\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n // Per-item configuration schema for custom data sources\n itemConfigSchema: {\n description: \"Configure settings for this slide\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title for this slide\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description for this slide\",\n rows: 3,\n },\n {\n key: \"buttonEnabled\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Show the button in the slide\",\n defaultValue: false,\n },\n {\n key: \"buttonText\",\n label: \"Button Text\",\n type: \"text\",\n description: \"Text to display on the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n {\n key: \"buttonLink\",\n label: \"Button Link\",\n type: \"text\",\n description: \"URL for the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;AAoCA,MAAM,iBAAkC,EAAE;AAkD1C,SAAgB,eAAe,EAC7B,SAAS,gBACT,qBAAqB,KACrB,mBAAmB,OACnB,iBAAiB,SACjB,QAAQ;CAAE,UAAU;CAAU,YAAY;CAAQ,EAClD,mBAAmB,IACnB,eAAe,QACf,cAAc,QACd,cAAc,SACd,UAAU,GACV,YAAY,QACZ,aAAa,MACb,cAAc,cACd,WAAW,MACX,YAAY,cACZ,aAAa,MACb,cAAc,cACd,aAAa,WACb,iBAAiB,MACjB,cAAc,SACd,WACA,GAAG,SACsC;CACzC,MAAM,CAAC,cAAc,mBAAmB,SAAS,EAAE;CACnD,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CAEjD,MAAM,YAAY,OAAO,SAAS;CAClC,MAAM,cAAc,OAAO;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;GACL,OAAO;GACR,CAAC;EACF,gBAAgB;GACd,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAS,OAAO;IAAS,EAClC;IAAE,OAAO;IAAY,OAAO;IAAY,CACzC;GACD,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,MAAM;GACN,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD,cAAc;GACZ,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,mBAAmB;GACjB,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAEF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;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;GACP,qBAAqB;GACtB;EAED;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CAED,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;IACb,cAAc;IACf;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACF;EACF;CACF"}
@@ -3,6 +3,6 @@ require("./fields-7guHEnCH.cjs");
3
3
  require("./purify.es-BNrhJaiC.cjs");
4
4
  require("./src-DqIS-4ns.cjs");
5
5
  require("./scroll-arrows-BNDly6uT.cjs");
6
- require("./MediaRenderer-CkMwv5q1.cjs");
7
- const require_CarouselWidget = require("./CarouselWidget-C_Bpw7nB.cjs");
6
+ require("./MediaRenderer-CRKJcPD9.cjs");
7
+ const require_CarouselWidget = require("./CarouselWidget-DgskhtDP.cjs");
8
8
  exports.carouselWidgetPropertySchema = require_CarouselWidget.carouselWidgetPropertySchema;
@@ -2,7 +2,7 @@ require("./chunk-DAgNkxik.cjs");
2
2
  const require_purify_es = require("./purify.es-BNrhJaiC.cjs");
3
3
  const require_src = require("./src-DqIS-4ns.cjs");
4
4
  const require_scroll_arrows = require("./scroll-arrows-BNDly6uT.cjs");
5
- const require_MediaRenderer = require("./MediaRenderer-CkMwv5q1.cjs");
5
+ const require_MediaRenderer = require("./MediaRenderer-CRKJcPD9.cjs");
6
6
  let react = require("react");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
8
  let _fluid_app_portal_core_registries = require("@fluid-app/portal-core/registries");
@@ -473,4 +473,4 @@ Object.defineProperty(exports, "carouselWidgetPropertySchema", {
473
473
  }
474
474
  });
475
475
 
476
- //# sourceMappingURL=CarouselWidget-C_Bpw7nB.cjs.map
476
+ //# sourceMappingURL=CarouselWidget-DgskhtDP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselWidget-C_Bpw7nB.cjs","names":["borderWidthClasses","borderColorClasses","MediaRenderer","getMediaPropsFromWidgetSchema","DOMPurify","Button","ScrollArrows"],"sources":["../../widgets/src/widgets/CarouselWidget.tsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport { Button } from \"@fluid-app/ui-primitives\";\nimport { ScrollArrows } from \"../ui/scroll-arrows\";\nimport type { ComponentProps } from \"react\";\nimport { useEffect, useState, useCallback } from \"react\";\nimport type React from \"react\";\nimport {\n MediaRenderer,\n getMediaPropsFromWidgetSchema,\n} from \"../components/MediaRenderer\";\nimport type {\n WidgetSchema,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n AlignOptions,\n FontSizeOptions,\n PaddingOptions,\n ButtonSizeOptions,\n} from \"@fluid-app/portal-core/types\";\nimport {\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getButtonSizeField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\n\nconst DEFAULT_SLIDES: CarouselSlide[] = [];\n\ntype CarouselSlide = {\n id: string;\n content: WidgetSchema;\n title?: string;\n description?: string;\n buttonEnabled?: boolean;\n buttonText?: string;\n buttonVariant?:\n | \"default\"\n | \"secondary\"\n | \"outline\"\n | \"destructive\"\n | \"ghost\"\n | \"link\";\n buttonLink?: string;\n};\n\ntype CarouselWidgetProps = ComponentProps<\"div\"> & {\n slides?: CarouselSlide[];\n autoScrollInterval?: number;\n enableAutoScroll?: boolean;\n\n // Layout\n align?: AlignOptions;\n carouselHeight?: string;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n\n // Text Styling\n headerSize?: FontSizeOptions;\n headerColor?: ColorOptions;\n textSize?: FontSizeOptions;\n textColor?: ColorOptions;\n textWidth?: string;\n\n // Button\n showButton?: boolean;\n buttonColor?: ColorOptions;\n buttonSize?: ButtonSizeOptions;\n\n // Overlay\n overlayEnabled?: boolean;\n overlayType?: \"solid\" | \"gradient\";\n overlayIntensity?: number;\n};\n\nexport function CarouselWidget({\n slides = DEFAULT_SLIDES,\n autoScrollInterval = 3000,\n enableAutoScroll = false,\n carouselHeight = \"400px\",\n align = { vertical: \"bottom\", horizontal: \"left\" },\n overlayIntensity = 40,\n borderRadius = \"none\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 0,\n textWidth = \"100%\",\n headerSize = \"lg\",\n headerColor = \"background\",\n textSize = \"md\",\n textColor = \"background\",\n showButton = true,\n buttonColor = \"background\",\n buttonSize = \"default\",\n overlayEnabled = true,\n overlayType = \"solid\",\n className,\n ...props\n}: CarouselWidgetProps): React.JSX.Element {\n const [currentIndex, setCurrentIndex] = useState(0);\n const [isHovered, setIsHovered] = useState(false);\n\n const hasSlides = slides.length > 0;\n const totalSlides = slides.length;\n\n const goToNext = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === totalSlides - 1) {\n return 0;\n }\n return prev + 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToPrevious = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === 0) {\n return totalSlides - 1;\n }\n return prev - 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToSlide = useCallback(\n (index: number) => {\n if (!hasSlides) return;\n if (index >= 0 && index < totalSlides) {\n setCurrentIndex(index);\n }\n },\n [hasSlides, totalSlides],\n );\n\n // Auto-scroll effect\n useEffect(() => {\n if (!enableAutoScroll || !hasSlides || isHovered) return;\n\n const intervalId = setInterval(() => {\n goToNext();\n }, autoScrollInterval);\n\n return () => clearInterval(intervalId);\n }, [enableAutoScroll, autoScrollInterval, hasSlides, isHovered, goToNext]);\n\n // Reset to first slide if slides change\n useEffect(() => {\n if (currentIndex >= totalSlides && totalSlides > 0) {\n setCurrentIndex(0);\n }\n }, [totalSlides, currentIndex]);\n\n if (!hasSlides) {\n return (\n <div\n className={`rounded-${borderRadius} ${className} w-full overflow-hidden`}\n style={{ minHeight: carouselHeight }}\n {...props}\n >\n <div\n className=\"bg-muted flex h-full w-full items-center justify-center\"\n style={{ minHeight: carouselHeight }}\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <div className=\"text-4xl\">🎠</div>\n <p className=\"text-sm\">No slides added</p>\n <p className=\"text-muted-foreground/70 text-xs\">\n Add slides to create a carousel\n </p>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ minHeight: carouselHeight }}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n {...props}\n >\n {/* Slides Container */}\n <div\n className=\"relative h-full w-full\"\n style={{ minHeight: carouselHeight }}\n >\n <div\n className=\"flex h-full transition-transform duration-500 ease-in-out\"\n style={{\n transform: `translateX(-${currentIndex * 100}%)`,\n }}\n >\n {slides.map((slide) => (\n <div\n key={slide.id}\n className=\"relative h-full w-full flex-shrink-0\"\n style={{ minWidth: \"100%\", minHeight: carouselHeight }}\n >\n {/* Background image/content layer */}\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n {...getMediaPropsFromWidgetSchema(slide.content)}\n />\n </div>\n\n {/* Dark overlay for text readability */}\n {overlayEnabled && (\n <div\n className={`absolute inset-0 z-9 ${\n overlayType === \"gradient\"\n ? \"bg-gradient-to-t from-black to-transparent\"\n : \"bg-black\"\n }`}\n style={{\n opacity:\n (Number(String(overlayIntensity).replace(\"%\", \"\")) ||\n 40) / 100,\n }}\n />\n )}\n\n {/* Content box */}\n <div\n className={`absolute inset-x-0 z-10 flex px-3 ${\n align.horizontal === \"left\"\n ? \"justify-start\"\n : align.horizontal === \"center\"\n ? \"justify-center\"\n : \"justify-end\"\n } ${\n align.vertical === \"top\"\n ? \"top-0 pt-13\"\n : align.vertical === \"center\"\n ? \"top-1/2 -translate-y-1/2\"\n : \"bottom-0 pb-13\"\n }`}\n >\n <div\n className={`p-${padding} flex flex-col gap-3`}\n style={{ maxWidth: textWidth }}\n >\n {/* Heading and text */}\n <div className={`flex flex-col text-${align.horizontal}`}>\n {slide.title && (\n <h2\n className={`font-header mb-2 leading-tight font-bold text-${headerColor} text-${headerSize === \"md\" ? \"base\" : headerSize}`}\n >\n {slide.title}\n </h2>\n )}\n {slide.description && (\n <div\n className={`leading-snug text-${textColor} text-${textSize === \"md\" ? \"base\" : textSize} line-clamp-2`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(slide.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>\n\n {/* Button */}\n {slide.buttonText && slide.buttonEnabled && showButton && (\n <div className={`text-${align.horizontal}`}>\n <Button\n size={buttonSize}\n className={`rounded-md py-1 font-semibold bg-${buttonColor} text-${buttonColor}-foreground hover:bg-${buttonColor}/90`}\n asChild\n >\n <a href={slide.buttonLink}>{slide.buttonText}</a>\n </Button>\n </div>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n {/* Dots and Navigation */}\n {totalSlides > 1 && (\n <div\n className={`p-${padding} absolute bottom-0 z-10 flex w-full items-center justify-between ${align.horizontal === \"center\" ? \"h-full\" : \"\"}`}\n >\n {/* Pagination dots - always at bottom */}\n <div\n className={`flex items-center ${\n align.horizontal === \"center\"\n ? `p-${padding} absolute inset-x-0 bottom-3 justify-center`\n : \"\"\n }`}\n >\n <div\n className={`flex items-center gap-2 ${\n align.horizontal === \"center\" ? \"justify-center\" : \"\"\n }`}\n >\n {slides.map((_, index) => (\n <button\n key={`dot-${index}`}\n className={`h-[6px] w-[6px] rounded-full transition-colors ${\n index === currentIndex\n ? \"bg-background\"\n : \"bg-background/40 hover:bg-background/60\"\n }`}\n onClick={() => goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : \"false\"}\n />\n ))}\n </div>\n </div>\n\n {/* Navigation arrows - position changes based on alignment */}\n <div\n className={`flex items-center gap-[10px] ${\n align.horizontal === \"center\"\n ? `absolute inset-x-0 top-1/2 justify-between px-${padding}`\n : \"\"\n }`}\n >\n <ScrollArrows onPrevious={goToPrevious} onNext={goToNext} />\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport const carouselWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CarouselWidget\",\n displayName: \"Carousel\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"slides\"],\n fields: [\n // Styling tab - Text Styling group\n getFontSizeField({\n defaultValue: \"lg\",\n key: \"headerSize\",\n label: \"Header Font Size\",\n description: \"Font size for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"headerColor\",\n label: \"Header Color\",\n description: \"Color variant for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Text Styling\",\n },\n getFontSizeField({\n defaultValue: \"md\",\n key: \"textSize\",\n label: \"Text Font Size\",\n description: \"Font size for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Color variant for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n // Styling tab - Layout group\n {\n key: \"align\",\n label: \"Alignment\",\n type: \"alignment\",\n description: \"Alignment of the carousel content\",\n defaultValue: { vertical: \"bottom\", horizontal: \"left\" },\n options: {\n verticalEnabled: true,\n horizontalEnabled: true,\n },\n tab: \"styling\",\n group: \"Layout\",\n },\n {\n key: \"textWidth\",\n label: \"Content Width\",\n type: \"cssUnit\",\n description: \"Maximum width for slide content\",\n defaultValue: \"100%\",\n allowedUnits: [\"px\", \"rem\", \"%\"],\n defaultUnit: \"%\",\n minByUnit: { px: 50, rem: 3, \"%\": 10 },\n maxByUnit: { px: 1200, rem: 75, \"%\": 100 },\n stepByUnit: { px: 10, rem: 1, \"%\": 1 },\n tab: \"styling\",\n group: \"Layout\",\n },\n // Styling tab - Design group\n getHeightField({\n key: \"carouselHeight\",\n label: \"Carousel Height\",\n description: \"Height of the carousel\",\n defaultValue: \"400px\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getBorderRadiusField({\n defaultValue: \"md\",\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the carousel\",\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 getPaddingField({\n defaultValue: 4,\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding for the carousel\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"overlayEnabled\",\n label: \"Enable Overlay\",\n type: \"boolean\",\n description: \"Add background overlay to slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"overlayType\",\n label: \"Overlay Type\",\n type: \"buttonGroup\",\n description: \"Type of overlay to add to the slide content\",\n defaultValue: \"gradient\",\n options: [\n { label: \"Solid\", value: \"solid\" },\n { label: \"Gradient\", value: \"gradient\" },\n ],\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"overlayIntensity\",\n label: \"Overlay Intensity\",\n type: \"slider\",\n description: \"Opacity of the overlay background (0-100)\",\n min: 0,\n max: 100,\n step: 5,\n defaultValue: 50,\n unit: \"%\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"showButton\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Display the button in slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n defaultValue: \"primary\",\n key: \"buttonColor\",\n label: \"Button Color\",\n description: \"Color variant for the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n getButtonSizeField({\n defaultValue: \"default\",\n key: \"buttonSize\",\n label: \"Button Size\",\n description: \"Size of the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n // Behavior tab - Auto-Scroll group\n {\n key: \"enableAutoScroll\",\n label: \"Enable Auto-Scroll\",\n type: \"boolean\",\n description: \"Automatically advance to the next slide\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n },\n {\n key: \"autoScrollInterval\",\n label: \"Auto-Scroll Interval (ms)\",\n type: \"number\",\n description: \"Time in milliseconds between automatic slide transitions\",\n min: 1000,\n max: 10000,\n step: 500,\n defaultValue: 3000,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n requiresKeyToBeTrue: \"enableAutoScroll\",\n },\n // Data tab - Data Configuration group\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n // Per-item configuration schema for custom data sources\n itemConfigSchema: {\n description: \"Configure settings for this slide\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title for this slide\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description for this slide\",\n rows: 3,\n },\n {\n key: \"buttonEnabled\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Show the button in the slide\",\n defaultValue: false,\n },\n {\n key: \"buttonText\",\n label: \"Button Text\",\n type: \"text\",\n description: \"Text to display on the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n {\n key: \"buttonLink\",\n label: \"Button Link\",\n type: \"text\",\n description: \"URL for the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;AAoCA,MAAM,iBAAkC,EAAE;AAkD1C,SAAgB,eAAe,EAC7B,SAAS,gBACT,qBAAqB,KACrB,mBAAmB,OACnB,iBAAiB,SACjB,QAAQ;CAAE,UAAU;CAAU,YAAY;CAAQ,EAClD,mBAAmB,IACnB,eAAe,QACf,cAAc,QACd,cAAc,SACd,UAAU,GACV,YAAY,QACZ,aAAa,MACb,cAAc,cACd,WAAW,MACX,YAAY,cACZ,aAAa,MACb,cAAc,cACd,aAAa,WACb,iBAAiB,MACjB,cAAc,SACd,WACA,GAAG,SACsC;CACzC,MAAM,CAAC,cAAc,oBAAA,GAAA,MAAA,UAA4B,EAAE;CACnD,MAAM,CAAC,WAAW,iBAAA,GAAA,MAAA,UAAyB,MAAM;CAEjD,MAAM,YAAY,OAAO,SAAS;CAClC,MAAM,cAAc,OAAO;CAE3B,MAAM,YAAA,GAAA,MAAA,mBAA6B;AACjC,MAAI,CAAC,UAAW;AAChB,mBAAiB,SAAS;AACxB,OAAI,SAAS,cAAc,EACzB,QAAO;AAET,UAAO,OAAO;IACd;IACD,CAAC,WAAW,YAAY,CAAC;CAE5B,MAAM,gBAAA,GAAA,MAAA,mBAAiC;AACrC,MAAI,CAAC,UAAW;AAChB,mBAAiB,SAAS;AACxB,OAAI,SAAS,EACX,QAAO,cAAc;AAEvB,UAAO,OAAO;IACd;IACD,CAAC,WAAW,YAAY,CAAC;CAE5B,MAAM,aAAA,GAAA,MAAA,cACH,U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GACnB,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;yDACc;GACd,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAS,OAAO;IAAS,EAClC;IAAE,OAAO;IAAY,OAAO;IAAY,CACzC;GACD,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,MAAM;GACN,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;uDACa;GACZ,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;4DACiB;GACjB,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAEF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;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;GACP,qBAAqB;GACtB;EAED;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CAED,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;IACb,cAAc;IACf;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACF;EACF;CACF"}
1
+ {"version":3,"file":"CarouselWidget-DgskhtDP.cjs","names":["borderWidthClasses","borderColorClasses","MediaRenderer","getMediaPropsFromWidgetSchema","DOMPurify","Button","ScrollArrows"],"sources":["../../widgets/src/widgets/CarouselWidget.tsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport { Button } from \"@fluid-app/ui-primitives\";\nimport { ScrollArrows } from \"../ui/scroll-arrows\";\nimport type { ComponentProps } from \"react\";\nimport { useEffect, useState, useCallback } from \"react\";\nimport type React from \"react\";\nimport {\n MediaRenderer,\n getMediaPropsFromWidgetSchema,\n} from \"../components/MediaRenderer\";\nimport type {\n WidgetSchema,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n AlignOptions,\n FontSizeOptions,\n PaddingOptions,\n ButtonSizeOptions,\n} from \"@fluid-app/portal-core/types\";\nimport {\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n getButtonSizeField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\n\nconst DEFAULT_SLIDES: CarouselSlide[] = [];\n\ntype CarouselSlide = {\n id: string;\n content: WidgetSchema;\n title?: string;\n description?: string;\n buttonEnabled?: boolean;\n buttonText?: string;\n buttonVariant?:\n | \"default\"\n | \"secondary\"\n | \"outline\"\n | \"destructive\"\n | \"ghost\"\n | \"link\";\n buttonLink?: string;\n};\n\ntype CarouselWidgetProps = ComponentProps<\"div\"> & {\n slides?: CarouselSlide[];\n autoScrollInterval?: number;\n enableAutoScroll?: boolean;\n\n // Layout\n align?: AlignOptions;\n carouselHeight?: string;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n padding?: PaddingOptions;\n\n // Text Styling\n headerSize?: FontSizeOptions;\n headerColor?: ColorOptions;\n textSize?: FontSizeOptions;\n textColor?: ColorOptions;\n textWidth?: string;\n\n // Button\n showButton?: boolean;\n buttonColor?: ColorOptions;\n buttonSize?: ButtonSizeOptions;\n\n // Overlay\n overlayEnabled?: boolean;\n overlayType?: \"solid\" | \"gradient\";\n overlayIntensity?: number;\n};\n\nexport function CarouselWidget({\n slides = DEFAULT_SLIDES,\n autoScrollInterval = 3000,\n enableAutoScroll = false,\n carouselHeight = \"400px\",\n align = { vertical: \"bottom\", horizontal: \"left\" },\n overlayIntensity = 40,\n borderRadius = \"none\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n padding = 0,\n textWidth = \"100%\",\n headerSize = \"lg\",\n headerColor = \"background\",\n textSize = \"md\",\n textColor = \"background\",\n showButton = true,\n buttonColor = \"background\",\n buttonSize = \"default\",\n overlayEnabled = true,\n overlayType = \"solid\",\n className,\n ...props\n}: CarouselWidgetProps): React.JSX.Element {\n const [currentIndex, setCurrentIndex] = useState(0);\n const [isHovered, setIsHovered] = useState(false);\n\n const hasSlides = slides.length > 0;\n const totalSlides = slides.length;\n\n const goToNext = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === totalSlides - 1) {\n return 0;\n }\n return prev + 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToPrevious = useCallback(() => {\n if (!hasSlides) return;\n setCurrentIndex((prev) => {\n if (prev === 0) {\n return totalSlides - 1;\n }\n return prev - 1;\n });\n }, [hasSlides, totalSlides]);\n\n const goToSlide = useCallback(\n (index: number) => {\n if (!hasSlides) return;\n if (index >= 0 && index < totalSlides) {\n setCurrentIndex(index);\n }\n },\n [hasSlides, totalSlides],\n );\n\n // Auto-scroll effect\n useEffect(() => {\n if (!enableAutoScroll || !hasSlides || isHovered) return;\n\n const intervalId = setInterval(() => {\n goToNext();\n }, autoScrollInterval);\n\n return () => clearInterval(intervalId);\n }, [enableAutoScroll, autoScrollInterval, hasSlides, isHovered, goToNext]);\n\n // Reset to first slide if slides change\n useEffect(() => {\n if (currentIndex >= totalSlides && totalSlides > 0) {\n setCurrentIndex(0);\n }\n }, [totalSlides, currentIndex]);\n\n if (!hasSlides) {\n return (\n <div\n className={`rounded-${borderRadius} ${className} w-full overflow-hidden`}\n style={{ minHeight: carouselHeight }}\n {...props}\n >\n <div\n className=\"bg-muted flex h-full w-full items-center justify-center\"\n style={{ minHeight: carouselHeight }}\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <div className=\"text-4xl\">🎠</div>\n <p className=\"text-sm\">No slides added</p>\n <p className=\"text-muted-foreground/70 text-xs\">\n Add slides to create a carousel\n </p>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ minHeight: carouselHeight }}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n {...props}\n >\n {/* Slides Container */}\n <div\n className=\"relative h-full w-full\"\n style={{ minHeight: carouselHeight }}\n >\n <div\n className=\"flex h-full transition-transform duration-500 ease-in-out\"\n style={{\n transform: `translateX(-${currentIndex * 100}%)`,\n }}\n >\n {slides.map((slide) => (\n <div\n key={slide.id}\n className=\"relative h-full w-full flex-shrink-0\"\n style={{ minWidth: \"100%\", minHeight: carouselHeight }}\n >\n {/* Background image/content layer */}\n <div className=\"absolute inset-0 h-full w-full\">\n <MediaRenderer\n {...getMediaPropsFromWidgetSchema(slide.content)}\n />\n </div>\n\n {/* Dark overlay for text readability */}\n {overlayEnabled && (\n <div\n className={`absolute inset-0 z-9 ${\n overlayType === \"gradient\"\n ? \"bg-gradient-to-t from-black to-transparent\"\n : \"bg-black\"\n }`}\n style={{\n opacity:\n (Number(String(overlayIntensity).replace(\"%\", \"\")) ||\n 40) / 100,\n }}\n />\n )}\n\n {/* Content box */}\n <div\n className={`absolute inset-x-0 z-10 flex px-3 ${\n align.horizontal === \"left\"\n ? \"justify-start\"\n : align.horizontal === \"center\"\n ? \"justify-center\"\n : \"justify-end\"\n } ${\n align.vertical === \"top\"\n ? \"top-0 pt-13\"\n : align.vertical === \"center\"\n ? \"top-1/2 -translate-y-1/2\"\n : \"bottom-0 pb-13\"\n }`}\n >\n <div\n className={`p-${padding} flex flex-col gap-3`}\n style={{ maxWidth: textWidth }}\n >\n {/* Heading and text */}\n <div className={`flex flex-col text-${align.horizontal}`}>\n {slide.title && (\n <h2\n className={`font-header mb-2 leading-tight font-bold text-${headerColor} text-${headerSize === \"md\" ? \"base\" : headerSize}`}\n >\n {slide.title}\n </h2>\n )}\n {slide.description && (\n <div\n className={`leading-snug text-${textColor} text-${textSize === \"md\" ? \"base\" : textSize} line-clamp-2`}\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(slide.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>\n\n {/* Button */}\n {slide.buttonText && slide.buttonEnabled && showButton && (\n <div className={`text-${align.horizontal}`}>\n <Button\n size={buttonSize}\n className={`rounded-md py-1 font-semibold bg-${buttonColor} text-${buttonColor}-foreground hover:bg-${buttonColor}/90`}\n asChild\n >\n <a href={slide.buttonLink}>{slide.buttonText}</a>\n </Button>\n </div>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n {/* Dots and Navigation */}\n {totalSlides > 1 && (\n <div\n className={`p-${padding} absolute bottom-0 z-10 flex w-full items-center justify-between ${align.horizontal === \"center\" ? \"h-full\" : \"\"}`}\n >\n {/* Pagination dots - always at bottom */}\n <div\n className={`flex items-center ${\n align.horizontal === \"center\"\n ? `p-${padding} absolute inset-x-0 bottom-3 justify-center`\n : \"\"\n }`}\n >\n <div\n className={`flex items-center gap-2 ${\n align.horizontal === \"center\" ? \"justify-center\" : \"\"\n }`}\n >\n {slides.map((_, index) => (\n <button\n key={`dot-${index}`}\n className={`h-[6px] w-[6px] rounded-full transition-colors ${\n index === currentIndex\n ? \"bg-background\"\n : \"bg-background/40 hover:bg-background/60\"\n }`}\n onClick={() => goToSlide(index)}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : \"false\"}\n />\n ))}\n </div>\n </div>\n\n {/* Navigation arrows - position changes based on alignment */}\n <div\n className={`flex items-center gap-[10px] ${\n align.horizontal === \"center\"\n ? `absolute inset-x-0 top-1/2 justify-between px-${padding}`\n : \"\"\n }`}\n >\n <ScrollArrows onPrevious={goToPrevious} onNext={goToNext} />\n </div>\n </div>\n )}\n </div>\n );\n}\n\nexport const carouselWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"CarouselWidget\",\n displayName: \"Carousel\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"slides\"],\n fields: [\n // Styling tab - Text Styling group\n getFontSizeField({\n defaultValue: \"lg\",\n key: \"headerSize\",\n label: \"Header Font Size\",\n description: \"Font size for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"headerColor\",\n label: \"Header Color\",\n description: \"Color variant for the slide header\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Text Styling\",\n },\n getFontSizeField({\n defaultValue: \"md\",\n key: \"textSize\",\n label: \"Text Font Size\",\n description: \"Font size for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n getColorField({\n defaultValue: \"background\",\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Color variant for the slide text\",\n tab: \"styling\",\n group: \"Text Styling\",\n }),\n // Styling tab - Layout group\n {\n key: \"align\",\n label: \"Alignment\",\n type: \"alignment\",\n description: \"Alignment of the carousel content\",\n defaultValue: { vertical: \"bottom\", horizontal: \"left\" },\n options: {\n verticalEnabled: true,\n horizontalEnabled: true,\n },\n tab: \"styling\",\n group: \"Layout\",\n },\n {\n key: \"textWidth\",\n label: \"Content Width\",\n type: \"cssUnit\",\n description: \"Maximum width for slide content\",\n defaultValue: \"100%\",\n allowedUnits: [\"px\", \"rem\", \"%\"],\n defaultUnit: \"%\",\n minByUnit: { px: 50, rem: 3, \"%\": 10 },\n maxByUnit: { px: 1200, rem: 75, \"%\": 100 },\n stepByUnit: { px: 10, rem: 1, \"%\": 1 },\n tab: \"styling\",\n group: \"Layout\",\n },\n // Styling tab - Design group\n getHeightField({\n key: \"carouselHeight\",\n label: \"Carousel Height\",\n description: \"Height of the carousel\",\n defaultValue: \"400px\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator2\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getBorderRadiusField({\n defaultValue: \"md\",\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Rounded corners for the carousel\",\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 getPaddingField({\n defaultValue: 4,\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding for the carousel\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"overlayEnabled\",\n label: \"Enable Overlay\",\n type: \"boolean\",\n description: \"Add background overlay to slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"overlayType\",\n label: \"Overlay Type\",\n type: \"buttonGroup\",\n description: \"Type of overlay to add to the slide content\",\n defaultValue: \"gradient\",\n options: [\n { label: \"Solid\", value: \"solid\" },\n { label: \"Gradient\", value: \"gradient\" },\n ],\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"overlayIntensity\",\n label: \"Overlay Intensity\",\n type: \"slider\",\n description: \"Opacity of the overlay background (0-100)\",\n min: 0,\n max: 100,\n step: 5,\n defaultValue: 50,\n unit: \"%\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"showButton\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Display the button in slide content\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n defaultValue: \"primary\",\n key: \"buttonColor\",\n label: \"Button Color\",\n description: \"Color variant for the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n getButtonSizeField({\n defaultValue: \"default\",\n key: \"buttonSize\",\n label: \"Button Size\",\n description: \"Size of the slide button\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"showButton\",\n }),\n // Behavior tab - Auto-Scroll group\n {\n key: \"enableAutoScroll\",\n label: \"Enable Auto-Scroll\",\n type: \"boolean\",\n description: \"Automatically advance to the next slide\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n },\n {\n key: \"autoScrollInterval\",\n label: \"Auto-Scroll Interval (ms)\",\n type: \"number\",\n description: \"Time in milliseconds between automatic slide transitions\",\n min: 1000,\n max: 10000,\n step: 500,\n defaultValue: 3000,\n tab: \"behavior\",\n group: \"Auto-Scroll\",\n requiresKeyToBeTrue: \"enableAutoScroll\",\n },\n // Data tab - Data Configuration group\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n },\n ],\n // Per-item configuration schema for custom data sources\n itemConfigSchema: {\n description: \"Configure settings for this slide\",\n fields: [\n {\n key: \"title\",\n label: \"Custom Title\",\n type: \"text\",\n description: \"Override the item's title for this slide\",\n },\n {\n key: \"description\",\n label: \"Custom Description\",\n type: \"textarea\",\n description: \"Override the item's description for this slide\",\n rows: 3,\n },\n {\n key: \"buttonEnabled\",\n label: \"Show Button\",\n type: \"boolean\",\n description: \"Show the button in the slide\",\n defaultValue: false,\n },\n {\n key: \"buttonText\",\n label: \"Button Text\",\n type: \"text\",\n description: \"Text to display on the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n {\n key: \"buttonLink\",\n label: \"Button Link\",\n type: \"text\",\n description: \"URL for the slide button\",\n requiresKeyToBeTrue: \"buttonEnabled\",\n },\n ],\n },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;AAoCA,MAAM,iBAAkC,EAAE;AAkD1C,SAAgB,eAAe,EAC7B,SAAS,gBACT,qBAAqB,KACrB,mBAAmB,OACnB,iBAAiB,SACjB,QAAQ;CAAE,UAAU;CAAU,YAAY;CAAQ,EAClD,mBAAmB,IACnB,eAAe,QACf,cAAc,QACd,cAAc,SACd,UAAU,GACV,YAAY,QACZ,aAAa,MACb,cAAc,cACd,WAAW,MACX,YAAY,cACZ,aAAa,MACb,cAAc,cACd,aAAa,WACb,iBAAiB,MACjB,cAAc,SACd,WACA,GAAG,SACsC;CACzC,MAAM,CAAC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AM;GACN,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;uDACa;GACZ,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;4DACiB;GACjB,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAEF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;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;GACP,qBAAqB;GACtB;EAED;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACR;EACF;CAED,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;IACb,cAAc;IACf;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACD;IACE,KAAK;IACL,OAAO;IACP,MAAM;IACN,aAAa;IACb,qBAAqB;IACtB;GACF;EACF;CACF"}
@@ -1,5 +1,5 @@
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_parse_api_errors = require("./parse-api-errors-CAnpE2_r.cjs");
4
4
  const require_src = require("./src-DqIS-4ns.cjs");
5
5
  const require_ScreenHeaderContext = require("./ScreenHeaderContext-eyKPyDoQ.cjs");
@@ -4368,4 +4368,4 @@ Object.defineProperty(exports, "contactsScreenPropertySchema", {
4368
4368
  }
4369
4369
  });
4370
4370
 
4371
- //# sourceMappingURL=ContactsScreen-IAGjo08W.cjs.map
4371
+ //# sourceMappingURL=ContactsScreen-B3k1fVQx.cjs.map