@fluid-app/portal-sdk 0.1.207 → 0.1.209

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 (171) hide show
  1. package/dist/{AlertWidget-Nx31UmWK.cjs → AlertWidget-Bli5ni5t.cjs} +2 -2
  2. package/dist/{AlertWidget-Nx31UmWK.cjs.map → AlertWidget-Bli5ni5t.cjs.map} +1 -1
  3. package/dist/{AlertWidget-D1kyQEgu.mjs → AlertWidget-C0wnu4-c.mjs} +2 -2
  4. package/dist/{AlertWidget-D1kyQEgu.mjs.map → AlertWidget-C0wnu4-c.mjs.map} +1 -1
  5. package/dist/{BulletListWidget-CouwHMJt.cjs → BulletListWidget-BHkly6-D.cjs} +2 -2
  6. package/dist/{BulletListWidget-CouwHMJt.cjs.map → BulletListWidget-BHkly6-D.cjs.map} +1 -1
  7. package/dist/{BulletListWidget-CHWI28yY.mjs → BulletListWidget-DRxFyFKI.mjs} +2 -2
  8. package/dist/{BulletListWidget-CHWI28yY.mjs.map → BulletListWidget-DRxFyFKI.mjs.map} +1 -1
  9. package/dist/{CalendarWidget-BtKzQFeO.cjs → CalendarWidget-BcZNsVQo.cjs} +2 -2
  10. package/dist/{CalendarWidget-BtKzQFeO.cjs.map → CalendarWidget-BcZNsVQo.cjs.map} +1 -1
  11. package/dist/{CalendarWidget-CZUo7mPL.mjs → CalendarWidget-kZBErtwM.mjs} +2 -2
  12. package/dist/{CalendarWidget-CZUo7mPL.mjs.map → CalendarWidget-kZBErtwM.mjs.map} +1 -1
  13. package/dist/{CardWidget-DVi0NVhb.cjs → CardWidget-BAl-3dJF.cjs} +2 -2
  14. package/dist/{CardWidget-DVi0NVhb.cjs.map → CardWidget-BAl-3dJF.cjs.map} +1 -1
  15. package/dist/{CardWidget-BVYjwdua.cjs → CardWidget-CFtUC9RB.cjs} +2 -2
  16. package/dist/{CardWidget-Cx5_Z-lR.mjs → CardWidget-gcPNwuZk.mjs} +2 -2
  17. package/dist/{CardWidget-Cx5_Z-lR.mjs.map → CardWidget-gcPNwuZk.mjs.map} +1 -1
  18. package/dist/{CarouselWidget-DLqTBIrf.cjs → CarouselWidget-BWpRWnUV.cjs} +2 -2
  19. package/dist/{CarouselWidget-DLqTBIrf.cjs.map → CarouselWidget-BWpRWnUV.cjs.map} +1 -1
  20. package/dist/{CarouselWidget-BENYmIwu.cjs → CarouselWidget-CrQFcQdL.cjs} +2 -2
  21. package/dist/{CarouselWidget-D1yzBwlG.mjs → CarouselWidget-DPFJhHro.mjs} +2 -2
  22. package/dist/{CarouselWidget-D1yzBwlG.mjs.map → CarouselWidget-DPFJhHro.mjs.map} +1 -1
  23. package/dist/{CatchUpWidget-J2SPvIqy.mjs → CatchUpWidget-DGucqTrd.mjs} +2 -2
  24. package/dist/{CatchUpWidget-J2SPvIqy.mjs.map → CatchUpWidget-DGucqTrd.mjs.map} +1 -1
  25. package/dist/{CatchUpWidget-BmibiEkX.cjs → CatchUpWidget-sUlMDu2k.cjs} +2 -2
  26. package/dist/{CatchUpWidget-BmibiEkX.cjs.map → CatchUpWidget-sUlMDu2k.cjs.map} +1 -1
  27. package/dist/{ChartWidget-B0vgP7df.cjs → ChartWidget-C2fmc4-R.cjs} +2 -2
  28. package/dist/{ChartWidget-B0vgP7df.cjs.map → ChartWidget-C2fmc4-R.cjs.map} +1 -1
  29. package/dist/{ChartWidget-C5DS5HRm.mjs → ChartWidget-C9jaZaxZ.mjs} +2 -2
  30. package/dist/{ChartWidget-C5DS5HRm.mjs.map → ChartWidget-C9jaZaxZ.mjs.map} +1 -1
  31. package/dist/{ChartWidget-DzgRlcNX.cjs → ChartWidget-DOmPdTxL.cjs} +2 -2
  32. package/dist/{ContactsScreen-BXWnpPXj.cjs → ContactsScreen-BozwvGrb.cjs} +65 -7
  33. package/dist/{ContactsScreen-BXWnpPXj.cjs.map → ContactsScreen-BozwvGrb.cjs.map} +1 -1
  34. package/dist/{ContactsScreen-DSnGEWTK.cjs → ContactsScreen-By3ap4Bv.cjs} +1 -1
  35. package/dist/{ContactsScreen-C25kLBcG.mjs → ContactsScreen-CCsst8bb.mjs} +67 -9
  36. package/dist/ContactsScreen-CCsst8bb.mjs.map +1 -0
  37. package/dist/{ContainerWidget-jI3cpmAu.mjs → ContainerWidget-6XsVE_8u.mjs} +3 -3
  38. package/dist/{ContainerWidget-jI3cpmAu.mjs.map → ContainerWidget-6XsVE_8u.mjs.map} +1 -1
  39. package/dist/{ContainerWidget-gtjlMITv.cjs → ContainerWidget-CWVH8szT.cjs} +3 -3
  40. package/dist/{ContainerWidget-DNo8CkQ7.cjs → ContainerWidget-DWp7gOZM.cjs} +3 -3
  41. package/dist/{ContainerWidget-DNo8CkQ7.cjs.map → ContainerWidget-DWp7gOZM.cjs.map} +1 -1
  42. package/dist/{EmbedWidget-BSfycJxm.mjs → EmbedWidget-Buij0edW.mjs} +2 -2
  43. package/dist/{EmbedWidget-BSfycJxm.mjs.map → EmbedWidget-Buij0edW.mjs.map} +1 -1
  44. package/dist/{EmbedWidget-CLArhSmx.cjs → EmbedWidget-PIWoA9sU.cjs} +2 -2
  45. package/dist/{EmbedWidget-CLArhSmx.cjs.map → EmbedWidget-PIWoA9sU.cjs.map} +1 -1
  46. package/dist/{FluidProvider-5TV1VHtq.mjs → FluidProvider-BhXU4mXn.mjs} +47 -47
  47. package/dist/{FluidProvider-5TV1VHtq.mjs.map → FluidProvider-BhXU4mXn.mjs.map} +1 -1
  48. package/dist/{FluidProvider-DP-sbNiR.cjs → FluidProvider-CVYSJW9G.cjs} +47 -47
  49. package/dist/{FluidProvider-DP-sbNiR.cjs.map → FluidProvider-CVYSJW9G.cjs.map} +1 -1
  50. package/dist/{ImageWidget-B7ui4-KU.cjs → ImageWidget-DbV--wn4.cjs} +2 -2
  51. package/dist/{ImageWidget-B7ui4-KU.cjs.map → ImageWidget-DbV--wn4.cjs.map} +1 -1
  52. package/dist/{ImageWidget-DAoPOp3e.mjs → ImageWidget-DuqgiO55.mjs} +2 -2
  53. package/dist/{ImageWidget-DAoPOp3e.mjs.map → ImageWidget-DuqgiO55.mjs.map} +1 -1
  54. package/dist/{LayoutWidget-DHlXzqUk.cjs → LayoutWidget-BbABNLAR.cjs} +2 -2
  55. package/dist/{LayoutWidget-DHlXzqUk.cjs.map → LayoutWidget-BbABNLAR.cjs.map} +1 -1
  56. package/dist/{LayoutWidget-CQYR0aDO.mjs → LayoutWidget-CQeqonHh.mjs} +2 -2
  57. package/dist/{LayoutWidget-CQYR0aDO.mjs.map → LayoutWidget-CQeqonHh.mjs.map} +1 -1
  58. package/dist/{LayoutWidget-D5gh0ejr.cjs → LayoutWidget-DFMSbGrN.cjs} +2 -2
  59. package/dist/{LinkWidget-DfVu-3zf.cjs → LinkWidget-Cn_4oI1U.cjs} +2 -2
  60. package/dist/{LinkWidget-BfvepYU9.cjs → LinkWidget-DMdMfamp.cjs} +5 -2
  61. package/dist/{LinkWidget-BfvepYU9.cjs.map → LinkWidget-DMdMfamp.cjs.map} +1 -1
  62. package/dist/{LinkWidget-BNHPtYLx.mjs → LinkWidget-muhFoV50.mjs} +5 -2
  63. package/dist/{LinkWidget-BNHPtYLx.mjs.map → LinkWidget-muhFoV50.mjs.map} +1 -1
  64. package/dist/{ListWidget-Da-YzDAs.cjs → ListWidget-B5jPU4m1.cjs} +2 -2
  65. package/dist/{ListWidget-Da-YzDAs.cjs.map → ListWidget-B5jPU4m1.cjs.map} +1 -1
  66. package/dist/{ListWidget-BAf2Vfsx.cjs → ListWidget-C_FkCsCJ.cjs} +2 -2
  67. package/dist/{ListWidget-cJKGHqJD.mjs → ListWidget-DvZQjspc.mjs} +2 -2
  68. package/dist/{ListWidget-cJKGHqJD.mjs.map → ListWidget-DvZQjspc.mjs.map} +1 -1
  69. package/dist/MessagingScreen-CneT3yWA.cjs +45 -0
  70. package/dist/{MessagingScreen-BSksI6Nw.mjs → MessagingScreen-DZPzRM2a.mjs} +2 -2
  71. package/dist/{MessagingScreen-BSksI6Nw.mjs.map → MessagingScreen-DZPzRM2a.mjs.map} +1 -1
  72. package/dist/{MessagingScreen-D2G4zfez.cjs → MessagingScreen-lOhqghg5.cjs} +2 -2
  73. package/dist/{MessagingScreen-D2G4zfez.cjs.map → MessagingScreen-lOhqghg5.cjs.map} +1 -1
  74. package/dist/{MySiteScreen-DERelKhT.cjs → MySiteScreen-BPwzK-ks.cjs} +1 -1
  75. package/dist/{MySiteScreen-DUta9jeJ.mjs → MySiteScreen-Dz5htti5.mjs} +23 -3
  76. package/dist/MySiteScreen-Dz5htti5.mjs.map +1 -0
  77. package/dist/{MySiteScreen-WFFhf8WZ.cjs → MySiteScreen-aaL_vggP.cjs} +23 -3
  78. package/dist/MySiteScreen-aaL_vggP.cjs.map +1 -0
  79. package/dist/{MySiteWidget-ISV__1ng.cjs → MySiteWidget-C1OYAsZw.cjs} +2 -2
  80. package/dist/{MySiteWidget-ISV__1ng.cjs.map → MySiteWidget-C1OYAsZw.cjs.map} +1 -1
  81. package/dist/{MySiteWidget-D_XsC3n0.mjs → MySiteWidget-C6IZytLt.mjs} +2 -2
  82. package/dist/{MySiteWidget-D_XsC3n0.mjs.map → MySiteWidget-C6IZytLt.mjs.map} +1 -1
  83. package/dist/{NestedWidget-Bgrfl1S7.cjs → NestedWidget-B8ORvmp2.cjs} +2 -2
  84. package/dist/{NestedWidget-BBOHOg12.cjs → NestedWidget-BSNtbipH.cjs} +2 -2
  85. package/dist/{NestedWidget-BBOHOg12.cjs.map → NestedWidget-BSNtbipH.cjs.map} +1 -1
  86. package/dist/{NestedWidget-CGdxVlhr.mjs → NestedWidget-J9sJbt9s.mjs} +2 -2
  87. package/dist/{NestedWidget-CGdxVlhr.mjs.map → NestedWidget-J9sJbt9s.mjs.map} +1 -1
  88. package/dist/{PointsWidget-h0jqVXWf.cjs → PointsWidget-Bw08kgNE.cjs} +2 -2
  89. package/dist/{PointsWidget-h0jqVXWf.cjs.map → PointsWidget-Bw08kgNE.cjs.map} +1 -1
  90. package/dist/{PointsWidget-D8g-asFn.mjs → PointsWidget-CoDqvWC5.mjs} +2 -2
  91. package/dist/{PointsWidget-D8g-asFn.mjs.map → PointsWidget-CoDqvWC5.mjs.map} +1 -1
  92. package/dist/{PortalContentApiProvider-CAa1jYwz.mjs → PortalContentApiProvider-B-miOfQl.mjs} +7 -10
  93. package/dist/{PortalContentApiProvider-CAa1jYwz.mjs.map → PortalContentApiProvider-B-miOfQl.mjs.map} +1 -1
  94. package/dist/{PortalContentApiProvider-C5WzWC3k.cjs → PortalContentApiProvider-Cec9tth6.cjs} +7 -10
  95. package/dist/{PortalContentApiProvider-C5WzWC3k.cjs.map → PortalContentApiProvider-Cec9tth6.cjs.map} +1 -1
  96. package/dist/{ProductsScreen-BZG_hkqN.cjs → ProductsScreen-62Tzsdap.cjs} +2 -2
  97. package/dist/{ProductsScreen-BZG_hkqN.cjs.map → ProductsScreen-62Tzsdap.cjs.map} +1 -1
  98. package/dist/{ProductsScreen-DNXJ6Pml.mjs → ProductsScreen-CRSHQoVn.mjs} +2 -2
  99. package/dist/{ProductsScreen-DNXJ6Pml.mjs.map → ProductsScreen-CRSHQoVn.mjs.map} +1 -1
  100. package/dist/{ProductsScreen-dbTX6T_M.mjs → ProductsScreen-CRV1_NVf.mjs} +2 -2
  101. package/dist/{ProductsScreen-DfKQAJ8t.cjs → ProductsScreen-D1pyistU.cjs} +2 -2
  102. package/dist/{ProfileScreen-Mb6dPLPo.mjs → ProfileScreen-BVlyq4I8.mjs} +2 -2
  103. package/dist/{ProfileScreen-Mb6dPLPo.mjs.map → ProfileScreen-BVlyq4I8.mjs.map} +1 -1
  104. package/dist/ProfileScreen-CJlMCpIM.cjs +44 -0
  105. package/dist/{ProfileScreen-Xym_39QW.cjs → ProfileScreen-DToaxnsZ.cjs} +2 -2
  106. package/dist/{ProfileScreen-Xym_39QW.cjs.map → ProfileScreen-DToaxnsZ.cjs.map} +1 -1
  107. package/dist/{QuickShareWidget-C_p3tPs5.cjs → QuickShareWidget-DRbErOlt.cjs} +2 -2
  108. package/dist/{QuickShareWidget-C_p3tPs5.cjs.map → QuickShareWidget-DRbErOlt.cjs.map} +1 -1
  109. package/dist/{QuickShareWidget-rft-kn8a.mjs → QuickShareWidget-Dbjueevf.mjs} +2 -2
  110. package/dist/{QuickShareWidget-rft-kn8a.mjs.map → QuickShareWidget-Dbjueevf.mjs.map} +1 -1
  111. package/dist/RecentActivityWidget-C6qm5x9b.mjs +560 -0
  112. package/dist/RecentActivityWidget-C6qm5x9b.mjs.map +1 -0
  113. package/dist/RecentActivityWidget-Cw5Qxx_x.cjs +577 -0
  114. package/dist/RecentActivityWidget-Cw5Qxx_x.cjs.map +1 -0
  115. package/dist/{SeparatorWidget-_37ala5k.cjs → SeparatorWidget-CjVHbHzQ.cjs} +4 -2
  116. package/dist/{SeparatorWidget-_37ala5k.cjs.map → SeparatorWidget-CjVHbHzQ.cjs.map} +1 -1
  117. package/dist/{SeparatorWidget-C5kp4gzo.mjs → SeparatorWidget-Clm35u4g.mjs} +4 -2
  118. package/dist/{SeparatorWidget-C5kp4gzo.mjs.map → SeparatorWidget-Clm35u4g.mjs.map} +1 -1
  119. package/dist/{ShareablesScreen-Be0YXQ2y.mjs → ShareablesScreen-BZK_lSdi.mjs} +2 -2
  120. package/dist/{ShareablesScreen-Be0YXQ2y.mjs.map → ShareablesScreen-BZK_lSdi.mjs.map} +1 -1
  121. package/dist/{ShareablesScreen-vk_JZ-_9.cjs → ShareablesScreen-BlX1v88I.cjs} +2 -2
  122. package/dist/{ShareablesScreen-vk_JZ-_9.cjs.map → ShareablesScreen-BlX1v88I.cjs.map} +1 -1
  123. package/dist/{ShareablesScreen-CpFuhYs5.mjs → ShareablesScreen-Ce7kJAPw.mjs} +2 -2
  124. package/dist/{ShareablesScreen-B-q3ovAv.cjs → ShareablesScreen-DELGijpZ.cjs} +2 -2
  125. package/dist/ShopScreen-7s5O5oFR.cjs +46 -0
  126. package/dist/{ShopScreen-BOd8LD3L.mjs → ShopScreen-DAZC9E9E.mjs} +2 -2
  127. package/dist/{ShopScreen-BOd8LD3L.mjs.map → ShopScreen-DAZC9E9E.mjs.map} +1 -1
  128. package/dist/{ShopScreen-B92DRQkQ.cjs → ShopScreen-dkt4YuUO.cjs} +2 -2
  129. package/dist/{ShopScreen-B92DRQkQ.cjs.map → ShopScreen-dkt4YuUO.cjs.map} +1 -1
  130. package/dist/{TableWidget-C7qiWZc3.cjs → TableWidget-BA99kJpe.cjs} +2 -2
  131. package/dist/{TableWidget-DUnz9hrD.cjs → TableWidget-DCWm-ENc.cjs} +2 -2
  132. package/dist/{TableWidget-DUnz9hrD.cjs.map → TableWidget-DCWm-ENc.cjs.map} +1 -1
  133. package/dist/{TableWidget-BVufe18A.mjs → TableWidget-DVfzScu1.mjs} +2 -2
  134. package/dist/{TableWidget-BVufe18A.mjs.map → TableWidget-DVfzScu1.mjs.map} +1 -1
  135. package/dist/{TextWidget-WKDCwape.mjs → TextWidget-BsDMvSQy.mjs} +8 -2
  136. package/dist/TextWidget-BsDMvSQy.mjs.map +1 -0
  137. package/dist/{TextWidget--UgOcUQx.cjs → TextWidget-D9H9WUPH.cjs} +8 -2
  138. package/dist/TextWidget-D9H9WUPH.cjs.map +1 -0
  139. package/dist/{ToDoWidget-CG0s98ed.mjs → ToDoWidget-DvNBsmgz.mjs} +2 -2
  140. package/dist/{ToDoWidget-CG0s98ed.mjs.map → ToDoWidget-DvNBsmgz.mjs.map} +1 -1
  141. package/dist/{ToDoWidget-B2qEGt7v.cjs → ToDoWidget-x86UGKLQ.cjs} +2 -2
  142. package/dist/{ToDoWidget-B2qEGt7v.cjs.map → ToDoWidget-x86UGKLQ.cjs.map} +1 -1
  143. package/dist/{VideoWidget-CHuSla09.mjs → VideoWidget-BpKJv_pg.mjs} +2 -2
  144. package/dist/{VideoWidget-CHuSla09.mjs.map → VideoWidget-BpKJv_pg.mjs.map} +1 -1
  145. package/dist/{VideoWidget-sEVQcp9o.cjs → VideoWidget-CvDmuMnA.cjs} +2 -2
  146. package/dist/{VideoWidget-sEVQcp9o.cjs.map → VideoWidget-CvDmuMnA.cjs.map} +1 -1
  147. package/dist/index.cjs +47 -47
  148. package/dist/index.d.cts +18 -0
  149. package/dist/index.d.cts.map +1 -1
  150. package/dist/index.d.mts +18 -0
  151. package/dist/index.d.mts.map +1 -1
  152. package/dist/index.mjs +47 -47
  153. package/dist/{registries-GJMHub-Q.cjs → registries-CpUM406S.cjs} +9 -1
  154. package/dist/registries-CpUM406S.cjs.map +1 -0
  155. package/dist/{registries-CyjQkRM-.mjs → registries-DT36l-bR.mjs} +9 -1
  156. package/dist/registries-DT36l-bR.mjs.map +1 -0
  157. package/package.json +8 -8
  158. package/dist/ContactsScreen-C25kLBcG.mjs.map +0 -1
  159. package/dist/MessagingScreen-CXAzx8Ra.cjs +0 -45
  160. package/dist/MySiteScreen-DUta9jeJ.mjs.map +0 -1
  161. package/dist/MySiteScreen-WFFhf8WZ.cjs.map +0 -1
  162. package/dist/ProfileScreen-CBwwNrKI.cjs +0 -44
  163. package/dist/RecentActivityWidget-DxlhERm0.mjs +0 -377
  164. package/dist/RecentActivityWidget-DxlhERm0.mjs.map +0 -1
  165. package/dist/RecentActivityWidget-Ql-mGLEf.cjs +0 -394
  166. package/dist/RecentActivityWidget-Ql-mGLEf.cjs.map +0 -1
  167. package/dist/ShopScreen-BRN3JY4l.cjs +0 -46
  168. package/dist/TextWidget--UgOcUQx.cjs.map +0 -1
  169. package/dist/TextWidget-WKDCwape.mjs.map +0 -1
  170. package/dist/registries-CyjQkRM-.mjs.map +0 -1
  171. package/dist/registries-GJMHub-Q.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-9hOWP6kD.cjs");
2
- const require_registries = require("./registries-GJMHub-Q.cjs");
2
+ const require_registries = require("./registries-CpUM406S.cjs");
3
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
4
  let lucide_react = require("lucide-react");
5
5
  //#region ../widgets/src/widgets/SeparatorWidget.tsx
@@ -102,6 +102,7 @@ const separatorWidgetPropertySchema = {
102
102
  options: [
103
103
  {
104
104
  icon: lucide_react.Ban,
105
+ ariaLabel: "No top margin",
105
106
  value: 0
106
107
  },
107
108
  {
@@ -136,6 +137,7 @@ const separatorWidgetPropertySchema = {
136
137
  options: [
137
138
  {
138
139
  icon: lucide_react.Ban,
140
+ ariaLabel: "No bottom margin",
139
141
  value: 0
140
142
  },
141
143
  {
@@ -183,4 +185,4 @@ Object.defineProperty(exports, "separatorWidgetPropertySchema", {
183
185
  }
184
186
  });
185
187
 
186
- //# sourceMappingURL=SeparatorWidget-_37ala5k.cjs.map
188
+ //# sourceMappingURL=SeparatorWidget-CjVHbHzQ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SeparatorWidget-_37ala5k.cjs","names":["getColorField","Ban"],"sources":["../../widgets/src/widgets/SeparatorWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ColorOptions } from \"@fluid-app/portal-core/types\";\nimport { Ban } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport { getColorField } from \"../core/fields\";\n\ntype SpacingOptions = 0 | 2 | 4 | 6 | 8 | 10;\n\ntype SeparatorWidgetProps = ComponentProps<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\";\n color?: ColorOptions;\n thickness?: `${number}px`;\n width?: `${number}%`;\n marginTop?: SpacingOptions;\n marginBottom?: SpacingOptions;\n};\n\nexport function SeparatorWidget({\n orientation = \"horizontal\",\n color = \"muted\",\n thickness = \"1px\",\n width = \"100%\",\n marginTop = 4,\n marginBottom = 4,\n className,\n style,\n ...props\n}: SeparatorWidgetProps): React.JSX.Element {\n const isHorizontal = orientation === \"horizontal\";\n\n return (\n <div\n className={`flex ${isHorizontal ? \"flex-row justify-center\" : \"h-full flex-col items-center\"} ${className ?? \"\"}`}\n style={{\n ...(isHorizontal\n ? {\n marginTop: `${marginTop * 4}px`,\n marginBottom: `${marginBottom * 4}px`,\n }\n : {\n paddingTop: `${marginTop * 4}px`,\n paddingBottom: `${marginBottom * 4}px`,\n }),\n ...style,\n }}\n aria-hidden=\"true\"\n {...props}\n >\n {isHorizontal ? (\n <div\n className={`bg-${color}`}\n style={{\n width,\n height: thickness,\n }}\n />\n ) : (\n <div\n className={`bg-${color}`}\n style={{\n width: thickness,\n height: \"100%\",\n }}\n />\n )}\n </div>\n );\n}\n\nexport const separatorWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"SeparatorWidget\",\n displayName: \"Separator\",\n fields: [\n {\n key: \"orientation\",\n label: \"Orientation\",\n type: \"select\",\n description: \"Direction of the separator line\",\n defaultValue: \"horizontal\",\n options: [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n ],\n group: \"Separator\",\n },\n getColorField({\n key: \"color\",\n label: \"Color\",\n description: \"Color of the separator line\",\n defaultValue: \"muted\",\n group: \"Separator\",\n }),\n {\n key: \"thickness\",\n label: \"Thickness\",\n type: \"cssUnit\",\n description: \"Thickness of the separator line\",\n defaultValue: \"1px\",\n allowedUnits: [\"px\"],\n minByUnit: { px: 1 },\n maxByUnit: { px: 20 },\n stepByUnit: { px: 1 },\n group: \"Separator\",\n },\n {\n key: \"width\",\n label: \"Width\",\n type: \"cssUnit\",\n description: \"Width of the separator\",\n defaultValue: \"100%\",\n allowedUnits: [\"%\"],\n defaultUnit: \"%\",\n minByUnit: { \"%\": 1 },\n maxByUnit: { \"%\": 100 },\n stepByUnit: { \"%\": 1 },\n group: \"Separator\",\n requiresKeyValue: { key: \"orientation\", value: \"horizontal\" },\n },\n {\n key: \"marginTop\",\n label: \"Margin Top\",\n type: \"buttonGroup\",\n description: \"Space above the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n {\n key: \"marginBottom\",\n label: \"Margin Bottom\",\n type: \"buttonGroup\",\n description: \"Space below the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;AAkBA,SAAgB,gBAAgB,EAC9B,cAAc,cACd,QAAQ,SACR,YAAY,OACZ,QAAQ,QACR,YAAY,GACZ,eAAe,GACf,WACA,OACA,GAAG,SACuC;CAC1C,MAAM,eAAe,gBAAgB;AAErC,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,WAAW,QAAQ,eAAe,4BAA4B,+BAA+B,GAAG,aAAa;EAC7G,OAAO;GACL,GAAI,eACA;IACE,WAAW,GAAG,YAAY,EAAE;IAC5B,cAAc,GAAG,eAAe,EAAE;IACnC,GACD;IACE,YAAY,GAAG,YAAY,EAAE;IAC7B,eAAe,GAAG,eAAe,EAAE;IACpC;GACL,GAAG;GACJ;EACD,eAAY;EACZ,GAAI;YAEH,eACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;GACE,WAAW,MAAM;GACjB,OAAO;IACL;IACA,QAAQ;IACT;GACD,CAAA,GAEF,iBAAA,GAAA,kBAAA,KAAC,OAAD;GACE,WAAW,MAAM;GACjB,OAAO;IACL,OAAO;IACP,QAAQ;IACT;GACD,CAAA;EAEA,CAAA;;AAIV,MAAa,gCAAsD;CACjE,YAAY;CACZ,aAAa;CACb,QAAQ;EACN;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAc,OAAO;IAAc,EAC5C;IAAE,OAAO;IAAY,OAAO;IAAY,CACzC;GACD,OAAO;GACR;EACDA,mBAAAA,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,cAAc,CAAC,KAAK;GACpB,WAAW,EAAE,IAAI,GAAG;GACpB,WAAW,EAAE,IAAI,IAAI;GACrB,YAAY,EAAE,IAAI,GAAG;GACrB,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,cAAc,CAAC,IAAI;GACnB,aAAa;GACb,WAAW,EAAE,KAAK,GAAG;GACrB,WAAW,EAAE,KAAK,KAAK;GACvB,YAAY,EAAE,KAAK,GAAG;GACtB,OAAO;GACP,kBAAkB;IAAE,KAAK;IAAe,OAAO;IAAc;GAC9D;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS;IACP;KAAE,MAAMC,aAAAA;KAAK,OAAO;KAAG;IACvB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAQ,OAAO;KAAI;IAC7B;GACD,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS;IACP;KAAE,MAAMA,aAAAA;KAAK,OAAO;KAAG;IACvB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAQ,OAAO;KAAI;IAC7B;GACD,OAAO;GACR;EACF;CACF"}
1
+ {"version":3,"file":"SeparatorWidget-CjVHbHzQ.cjs","names":["getColorField","Ban"],"sources":["../../widgets/src/widgets/SeparatorWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ColorOptions } from \"@fluid-app/portal-core/types\";\nimport { Ban } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport { getColorField } from \"../core/fields\";\n\ntype SpacingOptions = 0 | 2 | 4 | 6 | 8 | 10;\n\ntype SeparatorWidgetProps = ComponentProps<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\";\n color?: ColorOptions;\n thickness?: `${number}px`;\n width?: `${number}%`;\n marginTop?: SpacingOptions;\n marginBottom?: SpacingOptions;\n};\n\nexport function SeparatorWidget({\n orientation = \"horizontal\",\n color = \"muted\",\n thickness = \"1px\",\n width = \"100%\",\n marginTop = 4,\n marginBottom = 4,\n className,\n style,\n ...props\n}: SeparatorWidgetProps): React.JSX.Element {\n const isHorizontal = orientation === \"horizontal\";\n\n return (\n <div\n className={`flex ${isHorizontal ? \"flex-row justify-center\" : \"h-full flex-col items-center\"} ${className ?? \"\"}`}\n style={{\n ...(isHorizontal\n ? {\n marginTop: `${marginTop * 4}px`,\n marginBottom: `${marginBottom * 4}px`,\n }\n : {\n paddingTop: `${marginTop * 4}px`,\n paddingBottom: `${marginBottom * 4}px`,\n }),\n ...style,\n }}\n aria-hidden=\"true\"\n {...props}\n >\n {isHorizontal ? (\n <div\n className={`bg-${color}`}\n style={{\n width,\n height: thickness,\n }}\n />\n ) : (\n <div\n className={`bg-${color}`}\n style={{\n width: thickness,\n height: \"100%\",\n }}\n />\n )}\n </div>\n );\n}\n\nexport const separatorWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"SeparatorWidget\",\n displayName: \"Separator\",\n fields: [\n {\n key: \"orientation\",\n label: \"Orientation\",\n type: \"select\",\n description: \"Direction of the separator line\",\n defaultValue: \"horizontal\",\n options: [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n ],\n group: \"Separator\",\n },\n getColorField({\n key: \"color\",\n label: \"Color\",\n description: \"Color of the separator line\",\n defaultValue: \"muted\",\n group: \"Separator\",\n }),\n {\n key: \"thickness\",\n label: \"Thickness\",\n type: \"cssUnit\",\n description: \"Thickness of the separator line\",\n defaultValue: \"1px\",\n allowedUnits: [\"px\"],\n minByUnit: { px: 1 },\n maxByUnit: { px: 20 },\n stepByUnit: { px: 1 },\n group: \"Separator\",\n },\n {\n key: \"width\",\n label: \"Width\",\n type: \"cssUnit\",\n description: \"Width of the separator\",\n defaultValue: \"100%\",\n allowedUnits: [\"%\"],\n defaultUnit: \"%\",\n minByUnit: { \"%\": 1 },\n maxByUnit: { \"%\": 100 },\n stepByUnit: { \"%\": 1 },\n group: \"Separator\",\n requiresKeyValue: { key: \"orientation\", value: \"horizontal\" },\n },\n {\n key: \"marginTop\",\n label: \"Margin Top\",\n type: \"buttonGroup\",\n description: \"Space above the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, ariaLabel: \"No top margin\", value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n {\n key: \"marginBottom\",\n label: \"Margin Bottom\",\n type: \"buttonGroup\",\n description: \"Space below the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, ariaLabel: \"No bottom margin\", value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;AAkBA,SAAgB,gBAAgB,EAC9B,cAAc,cACd,QAAQ,SACR,YAAY,OACZ,QAAQ,QACR,YAAY,GACZ,eAAe,GACf,WACA,OACA,GAAG,SACuC;CAC1C,MAAM,eAAe,gBAAgB;AAErC,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,WAAW,QAAQ,eAAe,4BAA4B,+BAA+B,GAAG,aAAa;EAC7G,OAAO;GACL,GAAI,eACA;IACE,WAA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K,WAAW;KAAiB,OAAO;KAAG;IACnD;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAQ,OAAO;KAAI;IAC7B;GACD,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS;IACP;KAAE,MAAMA,aAAAA;KAAK,WAAW;KAAoB,OAAO;KAAG;IACtD;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAQ,OAAO;KAAI;IAC7B;GACD,OAAO;GACR;EACF;CACF"}
@@ -1,5 +1,5 @@
1
1
  import { r as __exportAll } from "./es-DmEK0Umf.mjs";
2
- import { l as getColorField } from "./registries-CyjQkRM-.mjs";
2
+ import { l as getColorField } from "./registries-DT36l-bR.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { Ban } from "lucide-react";
5
5
  //#region ../widgets/src/widgets/SeparatorWidget.tsx
@@ -102,6 +102,7 @@ const separatorWidgetPropertySchema = {
102
102
  options: [
103
103
  {
104
104
  icon: Ban,
105
+ ariaLabel: "No top margin",
105
106
  value: 0
106
107
  },
107
108
  {
@@ -136,6 +137,7 @@ const separatorWidgetPropertySchema = {
136
137
  options: [
137
138
  {
138
139
  icon: Ban,
140
+ ariaLabel: "No bottom margin",
139
141
  value: 0
140
142
  },
141
143
  {
@@ -166,4 +168,4 @@ const separatorWidgetPropertySchema = {
166
168
  //#endregion
167
169
  export { SeparatorWidget_exports as n, separatorWidgetPropertySchema as r, SeparatorWidget as t };
168
170
 
169
- //# sourceMappingURL=SeparatorWidget-C5kp4gzo.mjs.map
171
+ //# sourceMappingURL=SeparatorWidget-Clm35u4g.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SeparatorWidget-C5kp4gzo.mjs","names":[],"sources":["../../widgets/src/widgets/SeparatorWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ColorOptions } from \"@fluid-app/portal-core/types\";\nimport { Ban } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport { getColorField } from \"../core/fields\";\n\ntype SpacingOptions = 0 | 2 | 4 | 6 | 8 | 10;\n\ntype SeparatorWidgetProps = ComponentProps<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\";\n color?: ColorOptions;\n thickness?: `${number}px`;\n width?: `${number}%`;\n marginTop?: SpacingOptions;\n marginBottom?: SpacingOptions;\n};\n\nexport function SeparatorWidget({\n orientation = \"horizontal\",\n color = \"muted\",\n thickness = \"1px\",\n width = \"100%\",\n marginTop = 4,\n marginBottom = 4,\n className,\n style,\n ...props\n}: SeparatorWidgetProps): React.JSX.Element {\n const isHorizontal = orientation === \"horizontal\";\n\n return (\n <div\n className={`flex ${isHorizontal ? \"flex-row justify-center\" : \"h-full flex-col items-center\"} ${className ?? \"\"}`}\n style={{\n ...(isHorizontal\n ? {\n marginTop: `${marginTop * 4}px`,\n marginBottom: `${marginBottom * 4}px`,\n }\n : {\n paddingTop: `${marginTop * 4}px`,\n paddingBottom: `${marginBottom * 4}px`,\n }),\n ...style,\n }}\n aria-hidden=\"true\"\n {...props}\n >\n {isHorizontal ? (\n <div\n className={`bg-${color}`}\n style={{\n width,\n height: thickness,\n }}\n />\n ) : (\n <div\n className={`bg-${color}`}\n style={{\n width: thickness,\n height: \"100%\",\n }}\n />\n )}\n </div>\n );\n}\n\nexport const separatorWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"SeparatorWidget\",\n displayName: \"Separator\",\n fields: [\n {\n key: \"orientation\",\n label: \"Orientation\",\n type: \"select\",\n description: \"Direction of the separator line\",\n defaultValue: \"horizontal\",\n options: [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n ],\n group: \"Separator\",\n },\n getColorField({\n key: \"color\",\n label: \"Color\",\n description: \"Color of the separator line\",\n defaultValue: \"muted\",\n group: \"Separator\",\n }),\n {\n key: \"thickness\",\n label: \"Thickness\",\n type: \"cssUnit\",\n description: \"Thickness of the separator line\",\n defaultValue: \"1px\",\n allowedUnits: [\"px\"],\n minByUnit: { px: 1 },\n maxByUnit: { px: 20 },\n stepByUnit: { px: 1 },\n group: \"Separator\",\n },\n {\n key: \"width\",\n label: \"Width\",\n type: \"cssUnit\",\n description: \"Width of the separator\",\n defaultValue: \"100%\",\n allowedUnits: [\"%\"],\n defaultUnit: \"%\",\n minByUnit: { \"%\": 1 },\n maxByUnit: { \"%\": 100 },\n stepByUnit: { \"%\": 1 },\n group: \"Separator\",\n requiresKeyValue: { key: \"orientation\", value: \"horizontal\" },\n },\n {\n key: \"marginTop\",\n label: \"Margin Top\",\n type: \"buttonGroup\",\n description: \"Space above the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n {\n key: \"marginBottom\",\n label: \"Margin Bottom\",\n type: \"buttonGroup\",\n description: \"Space below the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;AAkBA,SAAgB,gBAAgB,EAC9B,cAAc,cACd,QAAQ,SACR,YAAY,OACZ,QAAQ,QACR,YAAY,GACZ,eAAe,GACf,WACA,OACA,GAAG,SACuC;CAC1C,M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K;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS;IACP;KAAE,MAAM;KAAK,OAAO;KAAG;IACvB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAQ,OAAO;KAAI;IAC7B;GACD,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS;IACP;KAAE,MAAM;KAAK,OAAO;KAAG;IACvB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAQ,OAAO;KAAI;IAC7B;GACD,OAAO;GACR;EACF;CACF"}
1
+ {"version":3,"file":"SeparatorWidget-Clm35u4g.mjs","names":[],"sources":["../../widgets/src/widgets/SeparatorWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ColorOptions } from \"@fluid-app/portal-core/types\";\nimport { Ban } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport { getColorField } from \"../core/fields\";\n\ntype SpacingOptions = 0 | 2 | 4 | 6 | 8 | 10;\n\ntype SeparatorWidgetProps = ComponentProps<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\";\n color?: ColorOptions;\n thickness?: `${number}px`;\n width?: `${number}%`;\n marginTop?: SpacingOptions;\n marginBottom?: SpacingOptions;\n};\n\nexport function SeparatorWidget({\n orientation = \"horizontal\",\n color = \"muted\",\n thickness = \"1px\",\n width = \"100%\",\n marginTop = 4,\n marginBottom = 4,\n className,\n style,\n ...props\n}: SeparatorWidgetProps): React.JSX.Element {\n const isHorizontal = orientation === \"horizontal\";\n\n return (\n <div\n className={`flex ${isHorizontal ? \"flex-row justify-center\" : \"h-full flex-col items-center\"} ${className ?? \"\"}`}\n style={{\n ...(isHorizontal\n ? {\n marginTop: `${marginTop * 4}px`,\n marginBottom: `${marginBottom * 4}px`,\n }\n : {\n paddingTop: `${marginTop * 4}px`,\n paddingBottom: `${marginBottom * 4}px`,\n }),\n ...style,\n }}\n aria-hidden=\"true\"\n {...props}\n >\n {isHorizontal ? (\n <div\n className={`bg-${color}`}\n style={{\n width,\n height: thickness,\n }}\n />\n ) : (\n <div\n className={`bg-${color}`}\n style={{\n width: thickness,\n height: \"100%\",\n }}\n />\n )}\n </div>\n );\n}\n\nexport const separatorWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"SeparatorWidget\",\n displayName: \"Separator\",\n fields: [\n {\n key: \"orientation\",\n label: \"Orientation\",\n type: \"select\",\n description: \"Direction of the separator line\",\n defaultValue: \"horizontal\",\n options: [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n ],\n group: \"Separator\",\n },\n getColorField({\n key: \"color\",\n label: \"Color\",\n description: \"Color of the separator line\",\n defaultValue: \"muted\",\n group: \"Separator\",\n }),\n {\n key: \"thickness\",\n label: \"Thickness\",\n type: \"cssUnit\",\n description: \"Thickness of the separator line\",\n defaultValue: \"1px\",\n allowedUnits: [\"px\"],\n minByUnit: { px: 1 },\n maxByUnit: { px: 20 },\n stepByUnit: { px: 1 },\n group: \"Separator\",\n },\n {\n key: \"width\",\n label: \"Width\",\n type: \"cssUnit\",\n description: \"Width of the separator\",\n defaultValue: \"100%\",\n allowedUnits: [\"%\"],\n defaultUnit: \"%\",\n minByUnit: { \"%\": 1 },\n maxByUnit: { \"%\": 100 },\n stepByUnit: { \"%\": 1 },\n group: \"Separator\",\n requiresKeyValue: { key: \"orientation\", value: \"horizontal\" },\n },\n {\n key: \"marginTop\",\n label: \"Margin Top\",\n type: \"buttonGroup\",\n description: \"Space above the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, ariaLabel: \"No top margin\", value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n {\n key: \"marginBottom\",\n label: \"Margin Bottom\",\n type: \"buttonGroup\",\n description: \"Space below the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, ariaLabel: \"No bottom margin\", value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;AAkBA,SAAgB,gBAAgB,EAC9B,cAAc,cACd,QAAQ,SACR,YAAY,OACZ,QAAQ,QACR,YAAY,GACZ,eAAe,GACf,WACA,OACA,GAAG,SACuC;CAC1C,MAAM,eAAe,gBAAgB;AAErC,QACE,oBAAC,OAAD;EACE,WAAW,QAAQ,eAAe,4BAA4B,+BAA+B,GAAG,aAAa;EAC7G,OAAO;GACL,GAAI,eACA;IACE,WAAW,GAAG,YAAY,EAAE;IAC5B,cAAc,GAAG,eAAe,EAAE;IACnC,GACD;IACE,YAAY,GAAG,YAAY,EAAE;IAC7B,eAAe,GAAG,eAAe,EAAE;IACpC;GACL,GAAG;GACJ;EACD,eAAY;EACZ,GAAI;YAEH,eACC,oBAAC,OAAD;GACE,WAAW,MAAM;GACjB,OAAO;IACL;IACA,QAAQ;IACT;GACD,CAAA,GAEF,oBAAC,OAAD;GACE,WAAW,MAAM;GACjB,OAAO;IACL,OAAO;IACP,QAAQ;IACT;GACD,CAAA;EAEA,CAAA;;AAIV,MAAa,gCAAsD;CACjE,YAAY;CACZ,aAAa;CACb,QAAQ;EACN;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OA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GACR;EACF;CACF"}
@@ -3,7 +3,7 @@ import { b as fluidToast } from "./src-BEx23d86.mjs";
3
3
  import { t as useAccount } from "./use-account-B16Tor2Q.mjs";
4
4
  import { t as useStore } from "./use-store-BnHhQDYo.mjs";
5
5
  import { n as useAppNavigation } from "./AppNavigationContext-BW3lSpfT.mjs";
6
- import { a as ShareablesApp, c as ShareablesCoreProvider, n as usePortalContentContext, o as useFilePickerApi, r as toggleFavorite, s as ShareablesUIProvider, t as PortalContentApiProvider } from "./PortalContentApiProvider-CAa1jYwz.mjs";
6
+ import { a as ShareablesApp, c as ShareablesCoreProvider, n as usePortalContentContext, o as useFilePickerApi, r as toggleFavorite, s as ShareablesUIProvider, t as PortalContentApiProvider } from "./PortalContentApiProvider-B-miOfQl.mjs";
7
7
  import { t as PortalProductsApiProvider } from "./PortalProductsApiProvider-DHni3Y1V.mjs";
8
8
  import { t as PORTAL_MYSITE_KEYS } from "./use-mysite-portal-axe_PFzR.mjs";
9
9
  import { useCallback, useMemo } from "react";
@@ -185,4 +185,4 @@ const shareablesScreenPropertySchema = {
185
185
  //#endregion
186
186
  export { shareablesScreenPropertySchema as n, ShareablesScreen as t };
187
187
 
188
- //# sourceMappingURL=ShareablesScreen-Be0YXQ2y.mjs.map
188
+ //# sourceMappingURL=ShareablesScreen-BZK_lSdi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShareablesScreen-Be0YXQ2y.mjs","names":[],"sources":["../src/screens/ShareablesScreen.tsx"],"sourcesContent":["import { useCallback, useMemo, type ComponentProps } from \"react\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { fluidToast } from \"@fluid-app/ui-primitives\";\nimport { PORTAL_MYSITE_KEYS } from \"@fluid-app/mysite-ui/portal/hooks/use-mysite-portal\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { ShareablesCoreProvider } from \"@fluid-app/shareables-core\";\nimport { ShareablesUIProvider, ShareablesApp } from \"@fluid-app/shareables-ui\";\nimport { useFilePickerApi } from \"@fluid-app/file-picker-core\";\nimport { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { useStore } from \"../hooks/use-store\";\nimport { PortalProductsApiProvider } from \"../products/PortalProductsApiProvider\";\nimport {\n PortalContentApiProvider,\n usePortalContentContext,\n} from \"../content/PortalContentApiProvider\";\nimport { toggleFavorite } from \"../adapters/content-api-adapter\";\nimport { usePortalTenantClient } from \"../providers/PortalTenantClientProvider\";\n\ntype ShareablesScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\n/**\n * Parse the current shareables sub-route from the full slug.\n *\n * System nav slugs are \"share/products\", \"share/media\", \"share/playlists\".\n * Detail pages append an ID: \"share/products/123\", \"share/media/456\".\n *\n * \"share/products\" → screen=\"products\", detailId=null\n * \"share/products/123\" → screen=\"products\", detailId=\"123\"\n * \"share/media/456\" → screen=\"media\", detailId=\"456\"\n * \"share/playlists\" → screen=\"playlists\", detailId=null\n * \"share/playlists/789\" → screen=\"playlists\", detailId=\"789\"\n * \"share/files\" → screen=\"files\", detailId=null\n * \"share\" → screen=null (default to products)\n */\nfunction parseShareablesRoute(currentSlug: string): {\n screen: string | null;\n detailId: string | null;\n action: string | null;\n} {\n // Strip the \"share\" prefix\n const slugWithoutPrefix = currentSlug.replace(/^share\\/?/, \"\");\n if (!slugWithoutPrefix) {\n return { screen: null, detailId: null, action: null };\n }\n\n const parts = slugWithoutPrefix.split(\"/\");\n const screen = parts[0] || null;\n const detailId = parts[1] || null;\n const action = parts[2] || null;\n return { screen, detailId, action };\n}\n\nexport function ShareablesScreen({\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: ShareablesScreenProps): React.JSX.Element {\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <PortalProductsApiProvider>\n <PortalContentApiProvider>\n <ShareablesScreenContent />\n </PortalContentApiProvider>\n </PortalProductsApiProvider>\n </div>\n );\n}\n\n/** Inner component rendered inside providers so hooks can access context. */\nfunction ShareablesScreenContent(): React.JSX.Element {\n const shareablesCtx = usePortalContentContext();\n const { productsApi: portalProductsApi } = shareablesCtx;\n const filePickerApi = useFilePickerApi();\n const { data: account } = useAccount();\n const { data: store } = useStore();\n const { currentSlug, navigate } = useAppNavigation();\n const isCustomer = account?.member_type === \"customer\";\n const client = usePortalTenantClient();\n const queryClient = useQueryClient();\n\n const fetchProducts = useCallback(\n async (search: string, cursor?: string, limit?: number, sort?: string) => {\n if (search) {\n return portalProductsApi.searchProducts(search, { cursor, limit });\n }\n return portalProductsApi.listProducts({ cursor, limit, sort });\n },\n [portalProductsApi],\n );\n\n const fetchProduct = useCallback(\n async (id: string | number) => portalProductsApi.getProduct(id),\n [portalProductsApi],\n );\n\n const { screen, detailId, action } = parseShareablesRoute(currentSlug);\n\n const handleNavigate = useCallback(\n (subScreen: string, id?: string) => {\n const path = id ? `share/${subScreen}/${id}` : `share/${subScreen}`;\n navigate(path);\n },\n [navigate],\n );\n\n const handleBack = useCallback(() => {\n if (detailId && screen) {\n navigate(`share/${screen}`);\n } else {\n navigate(\"share/products\");\n }\n }, [navigate, detailId, screen]);\n\n const coreConfig = useMemo(\n () => ({\n user: account ? { id: account.id } : null,\n repContext: true,\n }),\n [account],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: account\n ? {\n id: account.id,\n company: { logo_url: store?.logo_url ?? null },\n }\n : undefined,\n // TODO(portal-tenant): affiliate_id not available from /api/account\n affiliateId: null,\n basePath: \"\",\n navigate: (path: string) => {\n const cleanPath = path.replace(/^\\//, \"\");\n const prefixed = cleanPath.startsWith(\"share/\")\n ? cleanPath\n : `share/${cleanPath}`;\n navigate(prefixed);\n },\n showToast: (opts: {\n title: string;\n type: \"success\" | \"error\" | \"warning\";\n error?: unknown;\n }) => {\n fluidToast({ title: opts.title, type: opts.type });\n if (opts.error) console.error(\"[Shareables]\", opts.error);\n },\n filePickerApi,\n onToggleFavorite: async (params: {\n favoriteableId: number;\n favoriteableType: string;\n }) => {\n const result = await toggleFavorite(\n client,\n params.favoriteableId,\n params.favoriteableType,\n );\n void queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n return result;\n },\n onMySiteShare: async (params: {\n shareLink: string;\n relateable_id: number;\n relateable_type: string;\n }) => {\n await toggleFavorite(\n client,\n params.relateable_id,\n params.relateable_type,\n );\n void queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n onDeletePlaylist: isCustomer\n ? undefined\n : async (playlistId: number) => {\n await shareablesCtx.playlistsAdapter.deletePlaylist(playlistId);\n },\n mediaProductsApi: isCustomer\n ? undefined\n : shareablesCtx.mediaProductsAdapter,\n searchProducts: isCustomer\n ? undefined\n : async (\n query: string,\n options?: { cursor?: string | null; limit?: number },\n ) => {\n // Empty query → listProducts so the tag modal opens with\n // suggestions instead of a blank state. Non-empty → real search.\n // Both APIs forward cursor/limit so the tag modal can paginate.\n const limit = options?.limit ?? 25;\n const cursor = options?.cursor ?? undefined;\n const result =\n query.trim().length > 0\n ? await portalProductsApi.searchProducts(query, {\n cursor,\n limit,\n })\n : await portalProductsApi.listProducts({ cursor, limit });\n // Filter out products without an id — mapping an id-less record\n // to `id: 0` would let a subsequent add/remove tag operation\n // silently run on id=0 (confusing 404/422 at best, incorrect\n // mutation at worst).\n const mapped = (result.products ?? [])\n .map(\n (p: {\n id?: number;\n title?: string;\n name?: string;\n image_url?: string | null;\n price?: string | null;\n }) =>\n p.id != null\n ? {\n id: p.id,\n name: p.name ?? p.title ?? \"Untitled\",\n image_url: p.image_url ?? null,\n price: p.price ?? null,\n }\n : null,\n )\n .filter((p): p is NonNullable<typeof p> => p !== null);\n return {\n products: mapped,\n nextCursor: result.meta?.pagination?.next_cursor ?? null,\n };\n },\n readOnly: isCustomer,\n uploadThumbnail: isCustomer\n ? undefined\n : async (blob: Blob, filename: string) => {\n const formData = new FormData();\n formData.append(\"asset[name]\", filename);\n formData.append(\"asset[file]\", blob, filename);\n const response = await client.requestWithFormData<{\n asset?: { default_variant_url?: string | null };\n }>(\"/api/content/dam/assets\", formData);\n const url = response.asset?.default_variant_url;\n if (!url) {\n // DAM accepted the upload but didn't return a playable URL.\n // Throwing here lets the caller (MediaEditScreen catch handler)\n // surface a toast and keeps the pending thumbnail state clean —\n // returning \"\" silently would corrupt the save payload with an\n // empty thumbnail URL.\n throw new Error(\"Thumbnail upload succeeded but no URL returned\");\n }\n return url;\n },\n }),\n [\n account,\n store,\n navigate,\n filePickerApi,\n isCustomer,\n shareablesCtx.playlistsAdapter,\n shareablesCtx.mediaProductsAdapter,\n portalProductsApi,\n client,\n queryClient,\n ],\n );\n\n return (\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ShareablesApp\n screen={screen}\n detailId={detailId}\n action={action}\n companyLogoUrl={undefined}\n countryCode={undefined}\n fetchProducts={fetchProducts}\n fetchProduct={fetchProduct}\n onNavigate={handleNavigate}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\n );\n}\n\nexport const shareablesScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ShareablesScreen\",\n displayName: \"Shareables Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,SAAS,qBAAqB,aAI5B;CAEA,MAAM,oBAAoB,YAAY,QAAQ,aAAa,GAAG;AAC9D,KAAI,CAAC,kBACH,QAAO;EAAE,QAAQ;EAAM,UAAU;EAAM,QAA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MAC5C;MACA;MACD,CAAC,GACF,MAAM,kBAAkB,aAAa;MAAE;MAAQ;MAAO,CAAC;AAwB7D,YAAO;MACL,WApBc,OAAO,YAAY,EAAE,EAClC,KACE,MAOC,EAAE,MAAM,OACJ;OACE,IAAI,EAAE;OACN,MAAM,EAAE,QAAQ,EAAE,SAAS;OAC3B,WAAW,EAAE,aAAa;OAC1B,OAAO,EAAE,SAAS;OACnB,GACD,KACP,CACA,QAAQ,MAAkC,MAAM,KAAK;MAGtD,YAAY,OAAO,MAAM,YAAY,eAAe;MACrD;;IAEP,UAAU;IACV,iBAAiB,aACb,KAAA,IACA,OAAO,MAAY,aAAqB;KACtC,MAAM,WAAW,IAAI,UAAU;AAC/B,cAAS,OAAO,eAAe,SAAS;AACxC,cAAS,OAAO,eAAe,MAAM,SAAS;KAI9C,MAAM,OAHW,MAAM,OAAO,oBAE3B,2BAA2B,SAAS,EAClB,OAAO;AAC5B,SAAI,CAAC,IAMH,OAAM,IAAI,MAAM,iDAAiD;AAEnE,YAAO;;IAEd,GACD;IACE;IACA;IACA;IACA;IACA;IACA,cAAc;IACd,cAAc;IACd;IACA;IACA;IACD,CACF;aAKK,oBAAC,eAAD;IACU;IACE;IACF;IACR,gBAAgB,KAAA;IAChB,aAAa,KAAA;IACE;IACD;IACd,YAAY;IACZ,QAAQ;IACR,CAAA;GACmB,CAAA;EACA,CAAA;;AAI7B,MAAa,iCAAuD;CAClE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
1
+ {"version":3,"file":"ShareablesScreen-BZK_lSdi.mjs","names":[],"sources":["../src/screens/ShareablesScreen.tsx"],"sourcesContent":["import { useCallback, useMemo, type ComponentProps } from \"react\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { fluidToast } from \"@fluid-app/ui-primitives\";\nimport { PORTAL_MYSITE_KEYS } from \"@fluid-app/mysite-ui/portal/hooks/use-mysite-portal\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { ShareablesCoreProvider } from \"@fluid-app/shareables-core\";\nimport { ShareablesUIProvider, ShareablesApp } from \"@fluid-app/shareables-ui\";\nimport { useFilePickerApi } from \"@fluid-app/file-picker-core\";\nimport { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { useStore } from \"../hooks/use-store\";\nimport { PortalProductsApiProvider } from \"../products/PortalProductsApiProvider\";\nimport {\n PortalContentApiProvider,\n usePortalContentContext,\n} from \"../content/PortalContentApiProvider\";\nimport { toggleFavorite } from \"../adapters/content-api-adapter\";\nimport { usePortalTenantClient } from \"../providers/PortalTenantClientProvider\";\n\ntype ShareablesScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\n/**\n * Parse the current shareables sub-route from the full slug.\n *\n * System nav slugs are \"share/products\", \"share/media\", \"share/playlists\".\n * Detail pages append an ID: \"share/products/123\", \"share/media/456\".\n *\n * \"share/products\" → screen=\"products\", detailId=null\n * \"share/products/123\" → screen=\"products\", detailId=\"123\"\n * \"share/media/456\" → screen=\"media\", detailId=\"456\"\n * \"share/playlists\" → screen=\"playlists\", detailId=null\n * \"share/playlists/789\" → screen=\"playlists\", detailId=\"789\"\n * \"share/files\" → screen=\"files\", detailId=null\n * \"share\" → screen=null (default to products)\n */\nfunction parseShareablesRoute(currentSlug: string): {\n screen: string | null;\n detailId: string | null;\n action: string | null;\n} {\n // Strip the \"share\" prefix\n const slugWithoutPrefix = currentSlug.replace(/^share\\/?/, \"\");\n if (!slugWithoutPrefix) {\n return { screen: null, detailId: null, action: null };\n }\n\n const parts = slugWithoutPrefix.split(\"/\");\n const screen = parts[0] || null;\n const detailId = parts[1] || null;\n const action = parts[2] || null;\n return { screen, detailId, action };\n}\n\nexport function ShareablesScreen({\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: ShareablesScreenProps): React.JSX.Element {\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <PortalProductsApiProvider>\n <PortalContentApiProvider>\n <ShareablesScreenContent />\n </PortalContentApiProvider>\n </PortalProductsApiProvider>\n </div>\n );\n}\n\n/** Inner component rendered inside providers so hooks can access context. */\nfunction ShareablesScreenContent(): React.JSX.Element {\n const shareablesCtx = usePortalContentContext();\n const { productsApi: portalProductsApi } = shareablesCtx;\n const filePickerApi = useFilePickerApi();\n const { data: account } = useAccount();\n const { data: store } = useStore();\n const { currentSlug, navigate } = useAppNavigation();\n const isCustomer = account?.member_type === \"customer\";\n const client = usePortalTenantClient();\n const queryClient = useQueryClient();\n\n const fetchProducts = useCallback(\n async (search: string, cursor?: string, limit?: number, sort?: string) => {\n if (search) {\n return portalProductsApi.searchProducts(search, { cursor, limit });\n }\n return portalProductsApi.listProducts({ cursor, limit, sort });\n },\n [portalProductsApi],\n );\n\n const fetchProduct = useCallback(\n async (id: string | number) => portalProductsApi.getProduct(id),\n [portalProductsApi],\n );\n\n const { screen, detailId, action } = parseShareablesRoute(currentSlug);\n\n const handleNavigate = useCallback(\n (subScreen: string, id?: string) => {\n const path = id ? `share/${subScreen}/${id}` : `share/${subScreen}`;\n navigate(path);\n },\n [navigate],\n );\n\n const handleBack = useCallback(() => {\n if (detailId && screen) {\n navigate(`share/${screen}`);\n } else {\n navigate(\"share/products\");\n }\n }, [navigate, detailId, screen]);\n\n const coreConfig = useMemo(\n () => ({\n user: account ? { id: account.id } : null,\n repContext: true,\n }),\n [account],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: account\n ? {\n id: account.id,\n company: { logo_url: store?.logo_url ?? null },\n }\n : undefined,\n // TODO(portal-tenant): affiliate_id not available from /api/account\n affiliateId: null,\n basePath: \"\",\n navigate: (path: string) => {\n const cleanPath = path.replace(/^\\//, \"\");\n const prefixed = cleanPath.startsWith(\"share/\")\n ? cleanPath\n : `share/${cleanPath}`;\n navigate(prefixed);\n },\n showToast: (opts: {\n title: string;\n type: \"success\" | \"error\" | \"warning\";\n error?: unknown;\n }) => {\n fluidToast({ title: opts.title, type: opts.type });\n if (opts.error) console.error(\"[Shareables]\", opts.error);\n },\n filePickerApi,\n onToggleFavorite: async (params: {\n favoriteableId: number;\n favoriteableType: string;\n }) => {\n const result = await toggleFavorite(\n client,\n params.favoriteableId,\n params.favoriteableType,\n );\n void queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n return result;\n },\n onMySiteShare: async (params: {\n shareLink: string;\n relateable_id: number;\n relateable_type: string;\n }) => {\n await toggleFavorite(\n client,\n params.relateable_id,\n params.relateable_type,\n );\n void queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n onDeletePlaylist: isCustomer\n ? undefined\n : async (playlistId: number) => {\n await shareablesCtx.playlistsAdapter.deletePlaylist(playlistId);\n },\n mediaProductsApi: isCustomer\n ? undefined\n : shareablesCtx.mediaProductsAdapter,\n searchProducts: isCustomer\n ? undefined\n : async (\n query: string,\n options?: { cursor?: string | null; limit?: number },\n ) => {\n // Empty query → listProducts so the tag modal opens with\n // suggestions instead of a blank state. Non-empty → real search.\n // Both APIs forward cursor/limit so the tag modal can paginate.\n const limit = options?.limit ?? 25;\n const cursor = options?.cursor ?? undefined;\n const result =\n query.trim().length > 0\n ? await portalProductsApi.searchProducts(query, {\n cursor,\n limit,\n })\n : await portalProductsApi.listProducts({ cursor, limit });\n // Filter out products without an id — mapping an id-less record\n // to `id: 0` would let a subsequent add/remove tag operation\n // silently run on id=0 (confusing 404/422 at best, incorrect\n // mutation at worst).\n const mapped = (result.products ?? [])\n .map(\n (p: {\n id?: number;\n title?: string;\n name?: string;\n image_url?: string | null;\n price?: string | null;\n }) =>\n p.id != null\n ? {\n id: p.id,\n name: p.name ?? p.title ?? \"Untitled\",\n image_url: p.image_url ?? null,\n price: p.price ?? null,\n }\n : null,\n )\n .filter((p): p is NonNullable<typeof p> => p !== null);\n return {\n products: mapped,\n nextCursor: result.meta?.pagination?.next_cursor ?? null,\n };\n },\n readOnly: isCustomer,\n uploadThumbnail: isCustomer\n ? undefined\n : async (blob: Blob, filename: string) => {\n const formData = new FormData();\n formData.append(\"asset[name]\", filename);\n formData.append(\"asset[file]\", blob, filename);\n const response = await client.requestWithFormData<{\n asset?: { default_variant_url?: string | null };\n }>(\"/api/content/dam/assets\", formData);\n const url = response.asset?.default_variant_url;\n if (!url) {\n // DAM accepted the upload but didn't return a playable URL.\n // Throwing here lets the caller (MediaEditScreen catch handler)\n // surface a toast and keeps the pending thumbnail state clean —\n // returning \"\" silently would corrupt the save payload with an\n // empty thumbnail URL.\n throw new Error(\"Thumbnail upload succeeded but no URL returned\");\n }\n return url;\n },\n }),\n [\n account,\n store,\n navigate,\n filePickerApi,\n isCustomer,\n shareablesCtx.playlistsAdapter,\n shareablesCtx.mediaProductsAdapter,\n portalProductsApi,\n client,\n queryClient,\n ],\n );\n\n return (\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ShareablesApp\n screen={screen}\n detailId={detailId}\n action={action}\n companyLogoUrl={undefined}\n countryCode={undefined}\n fetchProducts={fetchProducts}\n fetchProduct={fetchProduct}\n onNavigate={handleNavigate}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\n );\n}\n\nexport const shareablesScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ShareablesScreen\",\n displayName: \"Shareables Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;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;KAIH,MAAM,QAAQ,SAAS,SAAS;KAChC,MAAM,SAAS,SAAS,UAAU,KAAA;KAClC,MAAM,SACJ,MAAM,MAAM,CAAC,SAAS,IAClB,MAAM,kBAAkB,eAAe,OAAO;MAC5C;MACA;MACD,CAAC,GACF,MAAM,kBAAkB,aAAa;MAAE;MAAQ;MAAO,CAAC;AAwB7D,YAAO;MACL,WApBc,OAAO,YAAY,EAAE,EAClC,KACE,MAOC,EAAE,MAAM,OACJ;OACE,IAAI,EAAE;OACN,MAAM,EAAE,QAAQ,EAAE,SAAS;OAC3B,WAAW,EAAE,aAAa;OAC1B,OAAO,EAAE,SAAS;OACnB,GACD,KACP,CACA,QAAQ,MAAkC,MAAM,KAAK;MAGtD,YAAY,OAAO,MAAM,YAAY,eAAe;MACrD;;IAEP,UAAU;IACV,iBAAiB,aACb,KAAA,IACA,OAAO,MAAY,aAAqB;KACtC,MAAM,WAAW,IAAI,UAAU;AAC/B,cAAS,OAAO,eAAe,SAAS;AACxC,cAAS,OAAO,eAAe,MAAM,SAAS;KAI9C,MAAM,OAHW,MAAM,OAAO,oBAE3B,2BAA2B,SAAS,EAClB,OAAO;AAC5B,SAAI,CAAC,IAMH,OAAM,IAAI,MAAM,iDAAiD;AAEnE,YAAO;;IAEd,GACD;IACE;IACA;IACA;IACA;IACA;IACA,cAAc;IACd,cAAc;IACd;IACA;IACA;IACD,CACF;aAKK,oBAAC,eAAD;IACU;IACE;IACF;IACR,gBAAgB,KAAA;IAChB,aAAa,KAAA;IACE;IACD;IACd,YAAY;IACZ,QAAQ;IACR,CAAA;GACmB,CAAA;EACA,CAAA;;AAI7B,MAAa,iCAAuD;CAClE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
@@ -4,7 +4,7 @@ const require_src = require("./src-D57IFKXU.cjs");
4
4
  const require_use_account = require("./use-account-C5QI6NSe.cjs");
5
5
  const require_use_store = require("./use-store-BLcehk1A.cjs");
6
6
  const require_AppNavigationContext = require("./AppNavigationContext-CbK8uCjS.cjs");
7
- const require_PortalContentApiProvider = require("./PortalContentApiProvider-C5WzWC3k.cjs");
7
+ const require_PortalContentApiProvider = require("./PortalContentApiProvider-Cec9tth6.cjs");
8
8
  const require_PortalProductsApiProvider = require("./PortalProductsApiProvider-Ca1oeTtJ.cjs");
9
9
  const require_use_mysite_portal = require("./use-mysite-portal-DzDYRU0u.cjs");
10
10
  let react = require("react");
@@ -197,4 +197,4 @@ Object.defineProperty(exports, "shareablesScreenPropertySchema", {
197
197
  }
198
198
  });
199
199
 
200
- //# sourceMappingURL=ShareablesScreen-vk_JZ-_9.cjs.map
200
+ //# sourceMappingURL=ShareablesScreen-BlX1v88I.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShareablesScreen-vk_JZ-_9.cjs","names":["PortalProductsApiProvider","PortalContentApiProvider","usePortalContentContext","useFilePickerApi","useAccount","useStore","useAppNavigation","usePortalTenantClient","ShareablesCoreProvider","ShareablesUIProvider","toggleFavorite","PORTAL_MYSITE_KEYS","ShareablesApp"],"sources":["../src/screens/ShareablesScreen.tsx"],"sourcesContent":["import { useCallback, useMemo, type ComponentProps } from \"react\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { fluidToast } from \"@fluid-app/ui-primitives\";\nimport { PORTAL_MYSITE_KEYS } from \"@fluid-app/mysite-ui/portal/hooks/use-mysite-portal\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { ShareablesCoreProvider } from \"@fluid-app/shareables-core\";\nimport { ShareablesUIProvider, ShareablesApp } from \"@fluid-app/shareables-ui\";\nimport { useFilePickerApi } from \"@fluid-app/file-picker-core\";\nimport { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { useStore } from \"../hooks/use-store\";\nimport { PortalProductsApiProvider } from \"../products/PortalProductsApiProvider\";\nimport {\n PortalContentApiProvider,\n usePortalContentContext,\n} from \"../content/PortalContentApiProvider\";\nimport { toggleFavorite } from \"../adapters/content-api-adapter\";\nimport { usePortalTenantClient } from \"../providers/PortalTenantClientProvider\";\n\ntype ShareablesScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\n/**\n * Parse the current shareables sub-route from the full slug.\n *\n * System nav slugs are \"share/products\", \"share/media\", \"share/playlists\".\n * Detail pages append an ID: \"share/products/123\", \"share/media/456\".\n *\n * \"share/products\" → screen=\"products\", detailId=null\n * \"share/products/123\" → screen=\"products\", detailId=\"123\"\n * \"share/media/456\" → screen=\"media\", detailId=\"456\"\n * \"share/playlists\" → screen=\"playlists\", detailId=null\n * \"share/playlists/789\" → screen=\"playlists\", detailId=\"789\"\n * \"share/files\" → screen=\"files\", detailId=null\n * \"share\" → screen=null (default to products)\n */\nfunction parseShareablesRoute(currentSlug: string): {\n screen: string | null;\n detailId: string | null;\n action: string | null;\n} {\n // Strip the \"share\" prefix\n const slugWithoutPrefix = currentSlug.replace(/^share\\/?/, \"\");\n if (!slugWithoutPrefix) {\n return { screen: null, detailId: null, action: null };\n }\n\n const parts = slugWithoutPrefix.split(\"/\");\n const screen = parts[0] || null;\n const detailId = parts[1] || null;\n const action = parts[2] || null;\n return { screen, detailId, action };\n}\n\nexport function ShareablesScreen({\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: ShareablesScreenProps): React.JSX.Element {\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <PortalProductsApiProvider>\n <PortalContentApiProvider>\n <ShareablesScreenContent />\n </PortalContentApiProvider>\n </PortalProductsApiProvider>\n </div>\n );\n}\n\n/** Inner component rendered inside providers so hooks can access context. */\nfunction ShareablesScreenContent(): React.JSX.Element {\n const shareablesCtx = usePortalContentContext();\n const { productsApi: portalProductsApi } = shareablesCtx;\n const filePickerApi = useFilePickerApi();\n const { data: account } = useAccount();\n const { data: store } = useStore();\n const { currentSlug, navigate } = useAppNavigation();\n const isCustomer = account?.member_type === \"customer\";\n const client = usePortalTenantClient();\n const queryClient = useQueryClient();\n\n const fetchProducts = useCallback(\n async (search: string, cursor?: string, limit?: number, sort?: string) => {\n if (search) {\n return portalProductsApi.searchProducts(search, { cursor, limit });\n }\n return portalProductsApi.listProducts({ cursor, limit, sort });\n },\n [portalProductsApi],\n );\n\n const fetchProduct = useCallback(\n async (id: string | number) => portalProductsApi.getProduct(id),\n [portalProductsApi],\n );\n\n const { screen, detailId, action } = parseShareablesRoute(currentSlug);\n\n const handleNavigate = useCallback(\n (subScreen: string, id?: string) => {\n const path = id ? `share/${subScreen}/${id}` : `share/${subScreen}`;\n navigate(path);\n },\n [navigate],\n );\n\n const handleBack = useCallback(() => {\n if (detailId && screen) {\n navigate(`share/${screen}`);\n } else {\n navigate(\"share/products\");\n }\n }, [navigate, detailId, screen]);\n\n const coreConfig = useMemo(\n () => ({\n user: account ? { id: account.id } : null,\n repContext: true,\n }),\n [account],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: account\n ? {\n id: account.id,\n company: { logo_url: store?.logo_url ?? null },\n }\n : undefined,\n // TODO(portal-tenant): affiliate_id not available from /api/account\n affiliateId: null,\n basePath: \"\",\n navigate: (path: string) => {\n const cleanPath = path.replace(/^\\//, \"\");\n const prefixed = cleanPath.startsWith(\"share/\")\n ? cleanPath\n : `share/${cleanPath}`;\n navigate(prefixed);\n },\n showToast: (opts: {\n title: string;\n type: \"success\" | \"error\" | \"warning\";\n error?: unknown;\n }) => {\n fluidToast({ title: opts.title, type: opts.type });\n if (opts.error) console.error(\"[Shareables]\", opts.error);\n },\n filePickerApi,\n onToggleFavorite: async (params: {\n favoriteableId: number;\n favoriteableType: string;\n }) => {\n const result = await toggleFavorite(\n client,\n params.favoriteableId,\n params.favoriteableType,\n );\n void queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n return result;\n },\n onMySiteShare: async (params: {\n shareLink: string;\n relateable_id: number;\n relateable_type: string;\n }) => {\n await toggleFavorite(\n client,\n params.relateable_id,\n params.relateable_type,\n );\n void queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n onDeletePlaylist: isCustomer\n ? undefined\n : async (playlistId: number) => {\n await shareablesCtx.playlistsAdapter.deletePlaylist(playlistId);\n },\n mediaProductsApi: isCustomer\n ? undefined\n : shareablesCtx.mediaProductsAdapter,\n searchProducts: isCustomer\n ? undefined\n : async (\n query: string,\n options?: { cursor?: string | null; limit?: number },\n ) => {\n // Empty query → listProducts so the tag modal opens with\n // suggestions instead of a blank state. Non-empty → real search.\n // Both APIs forward cursor/limit so the tag modal can paginate.\n const limit = options?.limit ?? 25;\n const cursor = options?.cursor ?? undefined;\n const result =\n query.trim().length > 0\n ? await portalProductsApi.searchProducts(query, {\n cursor,\n limit,\n })\n : await portalProductsApi.listProducts({ cursor, limit });\n // Filter out products without an id — mapping an id-less record\n // to `id: 0` would let a subsequent add/remove tag operation\n // silently run on id=0 (confusing 404/422 at best, incorrect\n // mutation at worst).\n const mapped = (result.products ?? [])\n .map(\n (p: {\n id?: number;\n title?: string;\n name?: string;\n image_url?: string | null;\n price?: string | null;\n }) =>\n p.id != null\n ? {\n id: p.id,\n name: p.name ?? p.title ?? \"Untitled\",\n image_url: p.image_url ?? null,\n price: p.price ?? null,\n }\n : null,\n )\n .filter((p): p is NonNullable<typeof p> => p !== null);\n return {\n products: mapped,\n nextCursor: result.meta?.pagination?.next_cursor ?? null,\n };\n },\n readOnly: isCustomer,\n uploadThumbnail: isCustomer\n ? undefined\n : async (blob: Blob, filename: string) => {\n const formData = new FormData();\n formData.append(\"asset[name]\", filename);\n formData.append(\"asset[file]\", blob, filename);\n const response = await client.requestWithFormData<{\n asset?: { default_variant_url?: string | null };\n }>(\"/api/content/dam/assets\", formData);\n const url = response.asset?.default_variant_url;\n if (!url) {\n // DAM accepted the upload but didn't return a playable URL.\n // Throwing here lets the caller (MediaEditScreen catch handler)\n // surface a toast and keeps the pending thumbnail state clean —\n // returning \"\" silently would corrupt the save payload with an\n // empty thumbnail URL.\n throw new Error(\"Thumbnail upload succeeded but no URL returned\");\n }\n return url;\n },\n }),\n [\n account,\n store,\n navigate,\n filePickerApi,\n isCustomer,\n shareablesCtx.playlistsAdapter,\n shareablesCtx.mediaProductsAdapter,\n portalProductsApi,\n client,\n queryClient,\n ],\n );\n\n return (\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ShareablesApp\n screen={screen}\n detailId={detailId}\n action={action}\n companyLogoUrl={undefined}\n countryCode={undefined}\n fetchProducts={fetchProducts}\n fetchProduct={fetchProduct}\n onNavigate={handleNavigate}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\n );\n}\n\nexport const shareablesScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ShareablesScreen\",\n displayName: \"Shareables Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,SAAS,qBAAqB,aAI5B;CAEA,MAAM,oBAAoB,YAAY,QAAQ,aAAa,GAAG;AAC9D,KAAI,CAAC,kBACH,QAAO;EAAE,QAAQ;EAAM,UAAU;EAAM,QAAQ;EAAM;CAGvD,MAAM,QAAQ,kBAAkB,MAAM,IAAI;AAI1C,QAAO;EAAE,QAHM,MAAM,MAAM;EAGV,UAFA,MAAM,MAAM;EAEF,QADZ,MAAM,MAAM;EACQ;;AAGrC,SAAgB,iBAAiB,EAE/B,YACA,WACA,aACA,SACA,cAE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G;KAIH,MAAM,QAAQ,SAAS,SAAS;KAChC,MAAM,SAAS,SAAS,UAAU,KAAA;KAClC,MAAM,SACJ,MAAM,MAAM,CAAC,SAAS,IAClB,MAAM,kBAAkB,eAAe,OAAO;MAC5C;MACA;MACD,CAAC,GACF,MAAM,kBAAkB,aAAa;MAAE;MAAQ;MAAO,CAAC;AAwB7D,YAAO;MACL,WApBc,OAAO,YAAY,EAAE,EAClC,KACE,MAOC,EAAE,MAAM,OACJ;OACE,IAAI,EAAE;OACN,MAAM,EAAE,QAAQ,EAAE,SAAS;OAC3B,WAAW,EAAE,aAAa;OAC1B,OAAO,EAAE,SAAS;OACnB,GACD,KACP,CACA,QAAQ,MAAkC,MAAM,KAAK;MAGtD,YAAY,OAAO,MAAM,YAAY,eAAe;MACrD;;IAEP,UAAU;IACV,iBAAiB,aACb,KAAA,IACA,OAAO,MAAY,aAAqB;KACtC,MAAM,WAAW,IAAI,UAAU;AAC/B,cAAS,OAAO,eAAe,SAAS;AACxC,cAAS,OAAO,eAAe,MAAM,SAAS;KAI9C,MAAM,OAHW,MAAM,OAAO,oBAE3B,2BAA2B,SAAS,EAClB,OAAO;AAC5B,SAAI,CAAC,IAMH,OAAM,IAAI,MAAM,iDAAiD;AAEnE,YAAO;;IAEd,GACD;IACE;IACA;IACA;IACA;IACA;IACA,cAAc;IACd,cAAc;IACd;IACA;IACA;IACD,CACF;aAKK,iBAAA,GAAA,kBAAA,KAACC,iCAAAA,eAAD;IACU;IACE;IACF;IACR,gBAAgB,KAAA;IAChB,aAAa,KAAA;IACE;IACD;IACd,YAAY;IACZ,QAAQ;IACR,CAAA;GACmB,CAAA;EACA,CAAA;;AAI7B,MAAa,iCAAuD;CAClE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
1
+ {"version":3,"file":"ShareablesScreen-BlX1v88I.cjs","names":["PortalProductsApiProvider","PortalContentApiProvider","usePortalContentContext","useFilePickerApi","useAccount","useStore","useAppNavigation","usePortalTenantClient","ShareablesCoreProvider","ShareablesUIProvider","toggleFavorite","PORTAL_MYSITE_KEYS","ShareablesApp"],"sources":["../src/screens/ShareablesScreen.tsx"],"sourcesContent":["import { useCallback, useMemo, type ComponentProps } from \"react\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { fluidToast } from \"@fluid-app/ui-primitives\";\nimport { PORTAL_MYSITE_KEYS } from \"@fluid-app/mysite-ui/portal/hooks/use-mysite-portal\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { ShareablesCoreProvider } from \"@fluid-app/shareables-core\";\nimport { ShareablesUIProvider, ShareablesApp } from \"@fluid-app/shareables-ui\";\nimport { useFilePickerApi } from \"@fluid-app/file-picker-core\";\nimport { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { useStore } from \"../hooks/use-store\";\nimport { PortalProductsApiProvider } from \"../products/PortalProductsApiProvider\";\nimport {\n PortalContentApiProvider,\n usePortalContentContext,\n} from \"../content/PortalContentApiProvider\";\nimport { toggleFavorite } from \"../adapters/content-api-adapter\";\nimport { usePortalTenantClient } from \"../providers/PortalTenantClientProvider\";\n\ntype ShareablesScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\n/**\n * Parse the current shareables sub-route from the full slug.\n *\n * System nav slugs are \"share/products\", \"share/media\", \"share/playlists\".\n * Detail pages append an ID: \"share/products/123\", \"share/media/456\".\n *\n * \"share/products\" → screen=\"products\", detailId=null\n * \"share/products/123\" → screen=\"products\", detailId=\"123\"\n * \"share/media/456\" → screen=\"media\", detailId=\"456\"\n * \"share/playlists\" → screen=\"playlists\", detailId=null\n * \"share/playlists/789\" → screen=\"playlists\", detailId=\"789\"\n * \"share/files\" → screen=\"files\", detailId=null\n * \"share\" → screen=null (default to products)\n */\nfunction parseShareablesRoute(currentSlug: string): {\n screen: string | null;\n detailId: string | null;\n action: string | null;\n} {\n // Strip the \"share\" prefix\n const slugWithoutPrefix = currentSlug.replace(/^share\\/?/, \"\");\n if (!slugWithoutPrefix) {\n return { screen: null, detailId: null, action: null };\n }\n\n const parts = slugWithoutPrefix.split(\"/\");\n const screen = parts[0] || null;\n const detailId = parts[1] || null;\n const action = parts[2] || null;\n return { screen, detailId, action };\n}\n\nexport function ShareablesScreen({\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: ShareablesScreenProps): React.JSX.Element {\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <PortalProductsApiProvider>\n <PortalContentApiProvider>\n <ShareablesScreenContent />\n </PortalContentApiProvider>\n </PortalProductsApiProvider>\n </div>\n );\n}\n\n/** Inner component rendered inside providers so hooks can access context. */\nfunction ShareablesScreenContent(): React.JSX.Element {\n const shareablesCtx = usePortalContentContext();\n const { productsApi: portalProductsApi } = shareablesCtx;\n const filePickerApi = useFilePickerApi();\n const { data: account } = useAccount();\n const { data: store } = useStore();\n const { currentSlug, navigate } = useAppNavigation();\n const isCustomer = account?.member_type === \"customer\";\n const client = usePortalTenantClient();\n const queryClient = useQueryClient();\n\n const fetchProducts = useCallback(\n async (search: string, cursor?: string, limit?: number, sort?: string) => {\n if (search) {\n return portalProductsApi.searchProducts(search, { cursor, limit });\n }\n return portalProductsApi.listProducts({ cursor, limit, sort });\n },\n [portalProductsApi],\n );\n\n const fetchProduct = useCallback(\n async (id: string | number) => portalProductsApi.getProduct(id),\n [portalProductsApi],\n );\n\n const { screen, detailId, action } = parseShareablesRoute(currentSlug);\n\n const handleNavigate = useCallback(\n (subScreen: string, id?: string) => {\n const path = id ? `share/${subScreen}/${id}` : `share/${subScreen}`;\n navigate(path);\n },\n [navigate],\n );\n\n const handleBack = useCallback(() => {\n if (detailId && screen) {\n navigate(`share/${screen}`);\n } else {\n navigate(\"share/products\");\n }\n }, [navigate, detailId, screen]);\n\n const coreConfig = useMemo(\n () => ({\n user: account ? { id: account.id } : null,\n repContext: true,\n }),\n [account],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: account\n ? {\n id: account.id,\n company: { logo_url: store?.logo_url ?? null },\n }\n : undefined,\n // TODO(portal-tenant): affiliate_id not available from /api/account\n affiliateId: null,\n basePath: \"\",\n navigate: (path: string) => {\n const cleanPath = path.replace(/^\\//, \"\");\n const prefixed = cleanPath.startsWith(\"share/\")\n ? cleanPath\n : `share/${cleanPath}`;\n navigate(prefixed);\n },\n showToast: (opts: {\n title: string;\n type: \"success\" | \"error\" | \"warning\";\n error?: unknown;\n }) => {\n fluidToast({ title: opts.title, type: opts.type });\n if (opts.error) console.error(\"[Shareables]\", opts.error);\n },\n filePickerApi,\n onToggleFavorite: async (params: {\n favoriteableId: number;\n favoriteableType: string;\n }) => {\n const result = await toggleFavorite(\n client,\n params.favoriteableId,\n params.favoriteableType,\n );\n void queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n return result;\n },\n onMySiteShare: async (params: {\n shareLink: string;\n relateable_id: number;\n relateable_type: string;\n }) => {\n await toggleFavorite(\n client,\n params.relateable_id,\n params.relateable_type,\n );\n void queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n onDeletePlaylist: isCustomer\n ? undefined\n : async (playlistId: number) => {\n await shareablesCtx.playlistsAdapter.deletePlaylist(playlistId);\n },\n mediaProductsApi: isCustomer\n ? undefined\n : shareablesCtx.mediaProductsAdapter,\n searchProducts: isCustomer\n ? undefined\n : async (\n query: string,\n options?: { cursor?: string | null; limit?: number },\n ) => {\n // Empty query → listProducts so the tag modal opens with\n // suggestions instead of a blank state. Non-empty → real search.\n // Both APIs forward cursor/limit so the tag modal can paginate.\n const limit = options?.limit ?? 25;\n const cursor = options?.cursor ?? undefined;\n const result =\n query.trim().length > 0\n ? await portalProductsApi.searchProducts(query, {\n cursor,\n limit,\n })\n : await portalProductsApi.listProducts({ cursor, limit });\n // Filter out products without an id — mapping an id-less record\n // to `id: 0` would let a subsequent add/remove tag operation\n // silently run on id=0 (confusing 404/422 at best, incorrect\n // mutation at worst).\n const mapped = (result.products ?? [])\n .map(\n (p: {\n id?: number;\n title?: string;\n name?: string;\n image_url?: string | null;\n price?: string | null;\n }) =>\n p.id != null\n ? {\n id: p.id,\n name: p.name ?? p.title ?? \"Untitled\",\n image_url: p.image_url ?? null,\n price: p.price ?? null,\n }\n : null,\n )\n .filter((p): p is NonNullable<typeof p> => p !== null);\n return {\n products: mapped,\n nextCursor: result.meta?.pagination?.next_cursor ?? null,\n };\n },\n readOnly: isCustomer,\n uploadThumbnail: isCustomer\n ? undefined\n : async (blob: Blob, filename: string) => {\n const formData = new FormData();\n formData.append(\"asset[name]\", filename);\n formData.append(\"asset[file]\", blob, filename);\n const response = await client.requestWithFormData<{\n asset?: { default_variant_url?: string | null };\n }>(\"/api/content/dam/assets\", formData);\n const url = response.asset?.default_variant_url;\n if (!url) {\n // DAM accepted the upload but didn't return a playable URL.\n // Throwing here lets the caller (MediaEditScreen catch handler)\n // surface a toast and keeps the pending thumbnail state clean —\n // returning \"\" silently would corrupt the save payload with an\n // empty thumbnail URL.\n throw new Error(\"Thumbnail upload succeeded but no URL returned\");\n }\n return url;\n },\n }),\n [\n account,\n store,\n navigate,\n filePickerApi,\n isCustomer,\n shareablesCtx.playlistsAdapter,\n shareablesCtx.mediaProductsAdapter,\n portalProductsApi,\n client,\n queryClient,\n ],\n );\n\n return (\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ShareablesApp\n screen={screen}\n detailId={detailId}\n action={action}\n companyLogoUrl={undefined}\n countryCode={undefined}\n fetchProducts={fetchProducts}\n fetchProduct={fetchProduct}\n onNavigate={handleNavigate}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\n );\n}\n\nexport const shareablesScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ShareablesScreen\",\n displayName: \"Shareables Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,SAAS,qBAAqB,aAI5B;CAEA,MAAM,oBAAoB,YAAY,QAAQ,aAAa,GAAG;AAC9D,KAAI,CAAC,kBACH,QAAO;EAAE,QAAQ;EAAM,UAAU;EAAM,QAAQ;EAAM;CAGvD,MAAM,QAAQ,kBAAkB,MAAM,IAAI;AAI1C,QAAO;EAAE,QAHM,MAAM,MAAM;EAGV,UAFA,MAAM,MAAM;EAEF,QADZ,MAAM,MAAM;EACQ;;AAGrC,SAAgB,iBAAiB,EAE/B,YACA,WACA,aACA,SACA,cAEA,GAAG,YACwC;AAC3C,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,GAAI;EAAU,WAAW,UAAU,SAAS,aAAa;YAC5D,iBAAA,GAAA,kBAAA,KAACA,kCAAAA,2BAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAACC,iCAAAA,0BAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAAC,yBAAD,EAA2B,CAAA,EACF,CAAA,EACD,CAAA;EACxB,CAAA;;;AAKV,SAAS,0BAA6C;CACpD,MAAM,gBAAgBC,iCAAAA,yBAAyB;CAC/C,MAAM,EAAE,aAAa,sBAAsB;CAC3C,MAAM,gBAAgBC,iCAAAA,kBAAkB;CACxC,MAAM,EAAE,MAAM,YAAYC,oBAAAA,YAAY;CACtC,MAAM,EAAE,MAAM,UAAUC,kBAAAA,UAAU;CAClC,MAAM,EAAE,aAAa,aAAaC,6BAAAA,kBAAkB;CAC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AI,UAAU;AAC/B,cAAS,OAAO,eAAe,SAAS;AACxC,cAAS,OAAO,eAAe,MAAM,SAAS;KAI9C,MAAM,OAHW,MAAM,OAAO,oBAE3B,2BAA2B,SAAS,EAClB,OAAO;AAC5B,SAAI,CAAC,IAMH,OAAM,IAAI,MAAM,iDAAiD;AAEnE,YAAO;;IAEd,GACD;IACE;IACA;IACA;IACA;IACA;IACA,cAAc;IACd,cAAc;IACd;IACA;IACA;IACD,CACF;aAKK,iBAAA,GAAA,kBAAA,KAACC,iCAAAA,eAAD;IACU;IACE;IACF;IACR,gBAAgB,KAAA;IAChB,aAAa,KAAA;IACE;IACD;IACd,YAAY;IACZ,QAAQ;IACR,CAAA;GACmB,CAAA;EACA,CAAA;;AAI7B,MAAa,iCAAuD;CAClE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
@@ -7,9 +7,9 @@ import "./ScreenHeaderContext-FYyYk97y.mjs";
7
7
  import "./dist-BETEuYfn.mjs";
8
8
  import "./SearchSort-TmuNOCwA.mjs";
9
9
  import "./dist-DBPpJ567.mjs";
10
- import "./PortalContentApiProvider-CAa1jYwz.mjs";
10
+ import "./PortalContentApiProvider-B-miOfQl.mjs";
11
11
  import "./sortable.esm-DFTEWOHN.mjs";
12
12
  import "./PortalProductsApiProvider-DHni3Y1V.mjs";
13
13
  import "./use-mysite-portal-axe_PFzR.mjs";
14
- import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-Be0YXQ2y.mjs";
14
+ import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-BZK_lSdi.mjs";
15
15
  export { ShareablesScreen, shareablesScreenPropertySchema };
@@ -8,10 +8,10 @@ require("./dist-CGuUUVNt.cjs");
8
8
  require("./es-DHLLltoR.cjs");
9
9
  require("./SearchSort-ztRXlRwu.cjs");
10
10
  require("./dist-DDZMFlal.cjs");
11
- require("./PortalContentApiProvider-C5WzWC3k.cjs");
11
+ require("./PortalContentApiProvider-Cec9tth6.cjs");
12
12
  require("./dist-DWs3-WOI.cjs");
13
13
  require("./PortalProductsApiProvider-Ca1oeTtJ.cjs");
14
14
  require("./use-mysite-portal-DzDYRU0u.cjs");
15
- const require_ShareablesScreen = require("./ShareablesScreen-vk_JZ-_9.cjs");
15
+ const require_ShareablesScreen = require("./ShareablesScreen-BlX1v88I.cjs");
16
16
  exports.ShareablesScreen = require_ShareablesScreen.ShareablesScreen;
17
17
  exports.shareablesScreenPropertySchema = require_ShareablesScreen.shareablesScreenPropertySchema;
@@ -0,0 +1,46 @@
1
+ require("./chunk-9hOWP6kD.cjs");
2
+ require("./FluidProvider-CVYSJW9G.cjs");
3
+ require("./ScreenRenderer-DfeRRgBO.cjs");
4
+ require("./account-api-context-DZP9IiGg.cjs");
5
+ require("./store-api-context-D1gZn22Z.cjs");
6
+ require("./mysite-api-context-CilZcDS4.cjs");
7
+ require("./src-BNcNh8fM.cjs");
8
+ require("./registry-context-RWj2xJlC.cjs");
9
+ require("./WidgetInteractionContext-Bd1hEEV2.cjs");
10
+ require("./EmbedWidget-PIWoA9sU.cjs");
11
+ require("./error-state-C-AalLnz.cjs");
12
+ require("./LayoutWidget-BbABNLAR.cjs");
13
+ require("./registries-CpUM406S.cjs");
14
+ require("./fields-C8gY9GlT.cjs");
15
+ require("./TextWidget-D9H9WUPH.cjs");
16
+ require("./AlertWidget-Bli5ni5t.cjs");
17
+ require("./BulletListWidget-BHkly6-D.cjs");
18
+ require("./CalendarWidget-BcZNsVQo.cjs");
19
+ require("./CardWidget-BAl-3dJF.cjs");
20
+ require("./purify.es-BQcWWtgQ.cjs");
21
+ require("./src-D57IFKXU.cjs");
22
+ require("./scroll-arrows-CzWtSS8l.cjs");
23
+ require("./MediaRenderer-CfgWd0cC.cjs");
24
+ require("./CarouselWidget-BWpRWnUV.cjs");
25
+ require("./CatchUpWidget-sUlMDu2k.cjs");
26
+ require("./ChartWidget-C2fmc4-R.cjs");
27
+ require("./ContainerWidget-DWp7gOZM.cjs");
28
+ require("./ImageWidget-DbV--wn4.cjs");
29
+ require("./LinkWidget-DMdMfamp.cjs");
30
+ require("./ListWidget-B5jPU4m1.cjs");
31
+ require("./MySiteWidget-C1OYAsZw.cjs");
32
+ require("./NestedWidget-BSNtbipH.cjs");
33
+ require("./PointsWidget-Bw08kgNE.cjs");
34
+ require("./QuickShareWidget-DRbErOlt.cjs");
35
+ require("./RecentActivityWidget-Cw5Qxx_x.cjs");
36
+ require("./SeparatorWidget-CjVHbHzQ.cjs");
37
+ require("./SpacerWidget-D9lOLPr5.cjs");
38
+ require("./TableWidget-DCWm-ENc.cjs");
39
+ require("./ToDoWidget-x86UGKLQ.cjs");
40
+ require("./VideoWidget-CvDmuMnA.cjs");
41
+ require("./ScreenHeaderContext-BXgWydjB.cjs");
42
+ require("./SearchSort-ztRXlRwu.cjs");
43
+ require("./PortalProductsApiProvider-Ca1oeTtJ.cjs");
44
+ const require_ShopScreen = require("./ShopScreen-dkt4YuUO.cjs");
45
+ exports.ShopScreen = require_ShopScreen.ShopScreen;
46
+ exports.shopScreenPropertySchema = require_ShopScreen.shopScreenPropertySchema;
@@ -1,5 +1,5 @@
1
1
  import { r as __exportAll } from "./es-DmEK0Umf.mjs";
2
- import { n as useFluidContext } from "./FluidProvider-5TV1VHtq.mjs";
2
+ import { n as useFluidContext } from "./FluidProvider-BhXU4mXn.mjs";
3
3
  import { $ as DropdownMenuSeparator, A as Select, C as Skeleton, En as Button, F as RadioGroup, I as RadioGroupItem, J as DropdownMenuContent, M as SelectItem, N as SelectTrigger, P as SelectValue, Q as DropdownMenuRadioItem, X as DropdownMenuLabel, Z as DropdownMenuRadioGroup, cn as Breadcrumb, dn as BreadcrumbList, fn as BreadcrumbPage, j as SelectContent, ln as BreadcrumbItem, pn as BreadcrumbSeparator, q as DropdownMenu, rt as DropdownMenuTrigger, un as BreadcrumbLink, wt as Card } from "./src-BEx23d86.mjs";
4
4
  import { n as useScreenHeaderActions, r as useScreenHeaderBreadcrumbs } from "./ScreenHeaderContext-FYyYk97y.mjs";
5
5
  import { t as useStore } from "./use-store-BnHhQDYo.mjs";
@@ -1144,4 +1144,4 @@ function ProductBreadcrumb({ productId }) {
1144
1144
  //#endregion
1145
1145
  export { ShopScreen_exports as n, shopScreenPropertySchema as r, ShopScreen as t };
1146
1146
 
1147
- //# sourceMappingURL=ShopScreen-BOd8LD3L.mjs.map
1147
+ //# sourceMappingURL=ShopScreen-DAZC9E9E.mjs.map