@fluid-app/portal-sdk 0.1.280 → 0.1.281

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 (72) hide show
  1. package/dist/{ContactsScreen-D42uVkfI.mjs → ContactsScreen-CMETL0o1.mjs} +33 -36
  2. package/dist/ContactsScreen-CMETL0o1.mjs.map +1 -0
  3. package/dist/{ContactsScreen-CVUFwHD0.cjs → ContactsScreen-CNM9nqb1.cjs} +33 -36
  4. package/dist/ContactsScreen-CNM9nqb1.cjs.map +1 -0
  5. package/dist/{ContactsScreen-BWgTp9z6.cjs → ContactsScreen-CZLLBgUB.cjs} +2 -2
  6. package/dist/{MessagingScreen-ihaUzGp0.mjs → MessagingScreen-BvVhwvm8.mjs} +2 -2
  7. package/dist/{MessagingScreen-CE8MTQxn.cjs → MessagingScreen-C3yCIWo4.cjs} +41 -62
  8. package/dist/MessagingScreen-C3yCIWo4.cjs.map +1 -0
  9. package/dist/{MessagingScreen-r73abdKa.mjs → MessagingScreen-C7W5-K1N.mjs} +41 -62
  10. package/dist/{MessagingScreen-r73abdKa.mjs.map → MessagingScreen-C7W5-K1N.mjs.map} +1 -1
  11. package/dist/{MessagingScreen-DIbrm4HW.cjs → MessagingScreen-sc1u2IwX.cjs} +2 -2
  12. package/dist/{MySiteScreen-B1_Xx5-L.cjs → MySiteScreen-BiRsdk3F.cjs} +5 -10
  13. package/dist/MySiteScreen-BiRsdk3F.cjs.map +1 -0
  14. package/dist/{MySiteScreen-Dx8wYdv3.mjs → MySiteScreen-CfCr1_w0.mjs} +5 -10
  15. package/dist/{MySiteScreen-Dx8wYdv3.mjs.map → MySiteScreen-CfCr1_w0.mjs.map} +1 -1
  16. package/dist/{MySiteScreen-CFyr06DP.cjs → MySiteScreen-D2ivRa2e.cjs} +2 -2
  17. package/dist/{OrdersScreen-RNTW7SCI.mjs → OrdersScreen-BCFfxurP.mjs} +2 -2
  18. package/dist/{OrdersScreen-BQKy-1vC.cjs → OrdersScreen-CSkiK7j8.cjs} +13 -15
  19. package/dist/OrdersScreen-CSkiK7j8.cjs.map +1 -0
  20. package/dist/{OrdersScreen-C-32UkcG.cjs → OrdersScreen-DOCdTWOx.cjs} +2 -2
  21. package/dist/{OrdersScreen-9wp4AWDC.mjs → OrdersScreen-NzGaufXO.mjs} +13 -15
  22. package/dist/OrdersScreen-NzGaufXO.mjs.map +1 -0
  23. package/dist/{ProfileScreen-OZZ9Zcab.mjs → ProfileScreen-CkRFE_jb.mjs} +5 -6
  24. package/dist/{ProfileScreen-OZZ9Zcab.mjs.map → ProfileScreen-CkRFE_jb.mjs.map} +1 -1
  25. package/dist/{ProfileScreen-BdMZsorI.mjs → ProfileScreen-Cm4WZ54w.mjs} +2 -2
  26. package/dist/{ProfileScreen-BvIfbjnw.cjs → ProfileScreen-Dacb369p.cjs} +5 -6
  27. package/dist/ProfileScreen-Dacb369p.cjs.map +1 -0
  28. package/dist/{ProfileScreen-BrdjkmQd.cjs → ProfileScreen-zzk5SGP5.cjs} +2 -2
  29. package/dist/ScreenHeaderContext-CsfhnuJk.cjs +86 -0
  30. package/dist/ScreenHeaderContext-CsfhnuJk.cjs.map +1 -0
  31. package/dist/ScreenHeaderContext-Dn12BZyj.mjs +62 -0
  32. package/dist/ScreenHeaderContext-Dn12BZyj.mjs.map +1 -0
  33. package/dist/{ShareablesScreen-BP1Ed_Sv.cjs → ShareablesScreen-BwFmwYNG.cjs} +2 -2
  34. package/dist/{ShareablesScreen-DwxcReCu.cjs → ShareablesScreen-C6pCPvmx.cjs} +1101 -1144
  35. package/dist/ShareablesScreen-C6pCPvmx.cjs.map +1 -0
  36. package/dist/{ShareablesScreen-tq0taJJe.mjs → ShareablesScreen-kr2RL4FN.mjs} +2 -2
  37. package/dist/{ShareablesScreen-C5ZRdX-y.mjs → ShareablesScreen-uMQYLpTv.mjs} +1101 -1144
  38. package/dist/ShareablesScreen-uMQYLpTv.mjs.map +1 -0
  39. package/dist/{ShopScreen-B-OBQ2S7.mjs → ShopScreen-BqDNPM7i.mjs} +36 -47
  40. package/dist/{ShopScreen-B-OBQ2S7.mjs.map → ShopScreen-BqDNPM7i.mjs.map} +1 -1
  41. package/dist/{ShopScreen-Cn94XVxx.mjs → ShopScreen-CpCBdW0Z.mjs} +2 -2
  42. package/dist/{ShopScreen-zdvCwxBT.cjs → ShopScreen-DRnPRtV7.cjs} +36 -47
  43. package/dist/ShopScreen-DRnPRtV7.cjs.map +1 -0
  44. package/dist/{ShopScreen-CQDkeQrR.cjs → ShopScreen-SN91S9Ao.cjs} +2 -2
  45. package/dist/{SubscriptionsScreen-CRHHXzrB.cjs → SubscriptionsScreen-D4C8a7-e.cjs} +13 -15
  46. package/dist/SubscriptionsScreen-D4C8a7-e.cjs.map +1 -0
  47. package/dist/{SubscriptionsScreen-Dx7Evic_.mjs → SubscriptionsScreen-DCeby11T.mjs} +13 -15
  48. package/dist/SubscriptionsScreen-DCeby11T.mjs.map +1 -0
  49. package/dist/{SubscriptionsScreen-DH10SUZK.cjs → SubscriptionsScreen-DzwK-Sck.cjs} +2 -2
  50. package/dist/index.cjs +35 -34
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.cts.map +1 -1
  53. package/dist/index.d.mts.map +1 -1
  54. package/dist/index.mjs +35 -34
  55. package/dist/index.mjs.map +1 -1
  56. package/package.json +18 -18
  57. package/dist/ContactsScreen-CVUFwHD0.cjs.map +0 -1
  58. package/dist/ContactsScreen-D42uVkfI.mjs.map +0 -1
  59. package/dist/MessagingScreen-CE8MTQxn.cjs.map +0 -1
  60. package/dist/MySiteScreen-B1_Xx5-L.cjs.map +0 -1
  61. package/dist/OrdersScreen-9wp4AWDC.mjs.map +0 -1
  62. package/dist/OrdersScreen-BQKy-1vC.cjs.map +0 -1
  63. package/dist/ProfileScreen-BvIfbjnw.cjs.map +0 -1
  64. package/dist/ScreenHeaderContext-BDjNSUfr.mjs +0 -85
  65. package/dist/ScreenHeaderContext-BDjNSUfr.mjs.map +0 -1
  66. package/dist/ScreenHeaderContext-PbjwAMeB.cjs +0 -109
  67. package/dist/ScreenHeaderContext-PbjwAMeB.cjs.map +0 -1
  68. package/dist/ShareablesScreen-C5ZRdX-y.mjs.map +0 -1
  69. package/dist/ShareablesScreen-DwxcReCu.cjs.map +0 -1
  70. package/dist/ShopScreen-zdvCwxBT.cjs.map +0 -1
  71. package/dist/SubscriptionsScreen-CRHHXzrB.cjs.map +0 -1
  72. package/dist/SubscriptionsScreen-Dx7Evic_.mjs.map +0 -1
@@ -2,7 +2,7 @@ import { A as playlists_list, C as pages_show, D as playlists_items_list, E as p
2
2
  import { l as enrollment_packs_list, u as enrollment_packs_show } from "./portal_tenant-l4a-eX2B.mjs";
3
3
  import { n as usePortalTenantClient } from "./PortalTenantClientProvider-BF-1Fy27.mjs";
4
4
  import { $ as DialogDescription, B as DropdownMenuContent, C as SelectContent, Cn as cn, Ct as Checkbox, E as SelectValue, F as FormItem, G as DropdownMenuSeparator, I as FormLabel, J as DropdownMenuSubTrigger, K as DropdownMenuSub, L as FormMessage, M as Form, N as FormControl, P as FormField, Q as DialogContent, R as Label, S as Select, Sn as useZodForm, T as SelectTrigger, V as DropdownMenuItem, X as Dialog, Y as DropdownMenuTrigger, _n as AlertDialogTitle, a as Textarea, an as BreadcrumbLink, at as Popover, c as TabsTrigger, cn as BreadcrumbSeparator, d as Spinner, dn as AlertDialogAction, f as fluidToast, fn as AlertDialogCancel, gn as AlertDialogHeader, gt as Card, h as Skeleton, hn as AlertDialogFooter, i as TooltipTrigger, in as BreadcrumbItem, it as DialogTitle, k as Input, l as Switch, ln as Badge, m as Slider, mn as AlertDialogDescription, n as TooltipContent, nt as DialogOverlay, o as Tabs, on as BreadcrumbList, ot as PopoverContent, pn as AlertDialogContent, q as DropdownMenuSubContent, r as TooltipProvider, rn as Breadcrumb, rt as DialogPortal, s as TabsList, sn as BreadcrumbPage, st as PopoverTrigger, t as Tooltip, tt as DialogHeader, un as AlertDialog, vn as Button, vt as CardContent, w as SelectItem, x as Separator, yn as Content, z as DropdownMenu } from "./src-Dk1FJOX0.mjs";
5
- import { n as useScreenHeaderActions, r as useScreenHeaderBreadcrumbs } from "./ScreenHeaderContext-BDjNSUfr.mjs";
5
+ import { n as ScreenHeaderBreadcrumbs, t as ScreenHeaderActions } from "./ScreenHeaderContext-Dn12BZyj.mjs";
6
6
  import { t as useStore } from "./use-store-BnHhQDYo.mjs";
7
7
  import { t as useAccount } from "./use-account-B201ntr4.mjs";
8
8
  import { n as useAppNavigation } from "./AppNavigationContext-DNomMUij.mjs";
@@ -768,13 +768,6 @@ const SORT_OPTIONS$1 = [
768
768
  function ProductsScreen({ countryCode, fetchProducts: fetchPortalProducts, onNavigate }) {
769
769
  const client = useShareablesClient();
770
770
  const { navigate } = useShareablesUI();
771
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
772
- className: "text-lg",
773
- children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
774
- className: "font-semibold",
775
- children: "Products"
776
- }) })
777
- }) }), []));
778
771
  const [searchTerm, setSearchTerm] = useState("");
779
772
  const [debouncedSearch, setDebouncedSearch] = useState("");
780
773
  const [sortValue, setSortValue] = useState("created_at_desc");
@@ -855,7 +848,13 @@ function ProductsScreen({ countryCode, fetchProducts: fetchPortalProducts, onNav
855
848
  className: "bg-destructive/10 text-destructive rounded-lg px-3 py-2",
856
849
  children: "Failed to load products. Please try again."
857
850
  })] });
858
- return /* @__PURE__ */ jsx(ShareableListLayout, {
851
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
852
+ className: "text-lg",
853
+ children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
854
+ className: "font-semibold",
855
+ children: "Products"
856
+ }) })
857
+ }) }) }), /* @__PURE__ */ jsx(ShareableListLayout, {
859
858
  isLoading,
860
859
  isEmpty: !error && products.length === 0 && !isFetchingNextPage && !hasNextPage,
861
860
  emptyMessage: debouncedSearch ? "No products match your search." : "No products available.",
@@ -898,7 +897,7 @@ function ProductsScreen({ countryCode, fetchProducts: fetchPortalProducts, onNav
898
897
  onClick: () => navigate(`product/${product.id}`)
899
898
  }, product.id))
900
899
  })
901
- });
900
+ })] });
902
901
  }
903
902
  //#endregion
904
903
  //#region ../../shareables/ui/src/components/SharePage/SharePageImageDisplay.tsx
@@ -1528,28 +1527,6 @@ function ProductDetailScreen({ productId, countryCode, fetchProduct: fetchPortal
1528
1527
  const displayTitle = portalProduct?.name || legacyProduct?.title || "";
1529
1528
  const productImage = portalProduct?.images?.[0]?.url || legacyProduct?.image_url || "";
1530
1529
  const displayDescription = portalProduct?.description || legacyProduct?.description || legacyProduct?.stripped || "";
1531
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
1532
- className: "text-lg",
1533
- children: [
1534
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
1535
- href: "#",
1536
- onClick: (e) => {
1537
- e.preventDefault();
1538
- (onBack ?? (() => navigate("products")))();
1539
- },
1540
- children: "Products"
1541
- }) }),
1542
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
1543
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
1544
- className: "font-semibold",
1545
- children: displayTitle || "Product"
1546
- }) })
1547
- ]
1548
- }) }), [
1549
- displayTitle,
1550
- onBack,
1551
- navigate
1552
- ]));
1553
1530
  const displayPrice = (() => {
1554
1531
  if (legacyProduct?.display_price) return legacyProduct.display_price;
1555
1532
  const price = portalProduct?.price ?? legacyProduct?.price;
@@ -1582,7 +1559,24 @@ function ProductDetailScreen({ productId, countryCode, fetchProduct: fetchPortal
1582
1559
  const handleMediaItemClick = useCallback((mediaItem) => {
1583
1560
  onNavigate?.("media", String(mediaItem.id));
1584
1561
  }, [onNavigate]);
1585
- return /* @__PURE__ */ jsxs(ShareableDetailLayout, {
1562
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
1563
+ className: "text-lg",
1564
+ children: [
1565
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
1566
+ href: "#",
1567
+ onClick: (e) => {
1568
+ e.preventDefault();
1569
+ (onBack ?? (() => navigate("products")))();
1570
+ },
1571
+ children: "Products"
1572
+ }) }),
1573
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
1574
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
1575
+ className: "font-semibold",
1576
+ children: displayTitle || "Product"
1577
+ }) })
1578
+ ]
1579
+ }) }) }), /* @__PURE__ */ jsxs(ShareableDetailLayout, {
1586
1580
  isLoading: isLoadingProduct,
1587
1581
  notFound: !product,
1588
1582
  notFoundMessage: "Product not found or failed to load.",
@@ -1650,7 +1644,7 @@ function ProductDetailScreen({ productId, countryCode, fetchProduct: fetchPortal
1650
1644
  relateable_type: "Product"
1651
1645
  })
1652
1646
  })]
1653
- });
1647
+ })] });
1654
1648
  }
1655
1649
  //#endregion
1656
1650
  //#region ../../shareables/ui/src/components/OwnerFilterTabs.tsx
@@ -1723,18 +1717,6 @@ function MediaListingScreen(_props) {
1723
1717
  const queryClient = useQueryClient();
1724
1718
  const { navigate, readOnly, showToast } = useShareablesUI();
1725
1719
  const [pendingDeleteId, setPendingDeleteId] = useState(null);
1726
- useScreenHeaderActions(useMemo(() => readOnly ? null : /* @__PURE__ */ jsxs(Button, {
1727
- onClick: () => navigate("media/new"),
1728
- size: "sm",
1729
- children: [/* @__PURE__ */ jsx(Plus, { className: "mr-1 h-4 w-4" }), "Add Media"]
1730
- }), [navigate, readOnly]));
1731
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
1732
- className: "text-lg",
1733
- children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
1734
- className: "font-semibold",
1735
- children: "Media"
1736
- }) })
1737
- }) }), []));
1738
1720
  const [searchTerm, setSearchTerm] = useState("");
1739
1721
  const [debouncedSearch, setDebouncedSearch] = useState("");
1740
1722
  const [sortValue, setSortValue] = useState("newest");
@@ -1882,80 +1864,95 @@ function MediaListingScreen(_props) {
1882
1864
  className: "bg-destructive/10 text-destructive rounded-lg px-3 py-2",
1883
1865
  children: ["Error: ", error.message]
1884
1866
  })] });
1885
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ShareableListLayout, {
1886
- isLoading,
1887
- isEmpty: !error && filteredItems.length === 0 && !isFetchingNextPage && !hasNextPage,
1888
- emptyMessage: getFilteredEmptyMessage({
1889
- searchTerm: debouncedSearch,
1890
- ownerFilter,
1891
- hasOtherFilters: kindFilter !== "all",
1892
- entityName: "media",
1893
- defaultMessage: "No media available."
1894
- }),
1895
- filters: filterBar,
1896
- footer,
1897
- sentinelRef,
1898
- loadingFilterShape: "search-view",
1899
- children: viewMode === "grid" ? /* @__PURE__ */ jsx("div", {
1900
- className: SHAREABLE_GRID_CLASS,
1901
- children: filteredItems.map((item) => {
1902
- const canEdit = !readOnly && item.owner_type === "user";
1903
- return /* @__PURE__ */ jsxs("div", {
1904
- className: "relative",
1905
- children: [/* @__PURE__ */ jsx(ShareItemCard, {
1906
- title: item.title ?? "",
1867
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1868
+ /* @__PURE__ */ jsx(ScreenHeaderActions, { children: readOnly ? null : /* @__PURE__ */ jsxs(Button, {
1869
+ onClick: () => navigate("media/new"),
1870
+ size: "sm",
1871
+ children: [/* @__PURE__ */ jsx(Plus, { className: "mr-1 h-4 w-4" }), "Add Media"]
1872
+ }) }),
1873
+ /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
1874
+ className: "text-lg",
1875
+ children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
1876
+ className: "font-semibold",
1877
+ children: "Media"
1878
+ }) })
1879
+ }) }) }),
1880
+ /* @__PURE__ */ jsx(ShareableListLayout, {
1881
+ isLoading,
1882
+ isEmpty: !error && filteredItems.length === 0 && !isFetchingNextPage && !hasNextPage,
1883
+ emptyMessage: getFilteredEmptyMessage({
1884
+ searchTerm: debouncedSearch,
1885
+ ownerFilter,
1886
+ hasOtherFilters: kindFilter !== "all",
1887
+ entityName: "media",
1888
+ defaultMessage: "No media available."
1889
+ }),
1890
+ filters: filterBar,
1891
+ footer,
1892
+ sentinelRef,
1893
+ loadingFilterShape: "search-view",
1894
+ children: viewMode === "grid" ? /* @__PURE__ */ jsx("div", {
1895
+ className: SHAREABLE_GRID_CLASS,
1896
+ children: filteredItems.map((item) => {
1897
+ const canEdit = !readOnly && item.owner_type === "user";
1898
+ return /* @__PURE__ */ jsxs("div", {
1899
+ className: "relative",
1900
+ children: [/* @__PURE__ */ jsx(ShareItemCard, {
1901
+ title: item.title ?? "",
1902
+ imageUrl: item.image_url,
1903
+ href: `media/${item.id}`,
1904
+ badge: { text: getMediaKindLabel(item.kind) },
1905
+ isVideo: item.kind === "video",
1906
+ subtitle: /* @__PURE__ */ jsxs("span", {
1907
+ className: "flex items-center gap-1.5",
1908
+ children: [getMediaKindLabel(item.kind), item.owner_type === "user" && /* @__PURE__ */ jsx(Badge, {
1909
+ variant: "secondary",
1910
+ className: "px-1.5 py-0 text-[10px] leading-4",
1911
+ children: "My Media"
1912
+ })]
1913
+ })
1914
+ }), canEdit && /* @__PURE__ */ jsx("div", {
1915
+ className: "absolute top-2 right-2",
1916
+ children: /* @__PURE__ */ jsx(MediaRowActionsMenu, { onDelete: () => setPendingDeleteId(item.id) })
1917
+ })]
1918
+ }, item.id);
1919
+ })
1920
+ }) : /* @__PURE__ */ jsx("div", {
1921
+ className: SHAREABLE_LIST_CLASS,
1922
+ children: filteredItems.map((item) => {
1923
+ const canEdit = !readOnly && item.owner_type === "user";
1924
+ return /* @__PURE__ */ jsx(ShareableListRow, {
1907
1925
  imageUrl: item.image_url,
1908
- href: `media/${item.id}`,
1909
- badge: { text: getMediaKindLabel(item.kind) },
1910
- isVideo: item.kind === "video",
1911
- subtitle: /* @__PURE__ */ jsxs("span", {
1912
- className: "flex items-center gap-1.5",
1913
- children: [getMediaKindLabel(item.kind), item.owner_type === "user" && /* @__PURE__ */ jsx(Badge, {
1914
- variant: "secondary",
1915
- className: "px-1.5 py-0 text-[10px] leading-4",
1916
- children: "My Media"
1917
- })]
1918
- })
1919
- }), canEdit && /* @__PURE__ */ jsx("div", {
1920
- className: "absolute top-2 right-2",
1921
- children: /* @__PURE__ */ jsx(MediaRowActionsMenu, { onDelete: () => setPendingDeleteId(item.id) })
1922
- })]
1923
- }, item.id);
1924
- })
1925
- }) : /* @__PURE__ */ jsx("div", {
1926
- className: SHAREABLE_LIST_CLASS,
1927
- children: filteredItems.map((item) => {
1928
- const canEdit = !readOnly && item.owner_type === "user";
1929
- return /* @__PURE__ */ jsx(ShareableListRow, {
1930
- imageUrl: item.image_url,
1931
- imageAlt: item.title ?? "",
1932
- title: item.title ?? "Untitled",
1933
- subtitle: /* @__PURE__ */ jsxs(Fragment$1, { children: [getMediaKindLabel(item.kind), item.owner_type === "user" && /* @__PURE__ */ jsx(Badge, {
1934
- variant: "secondary",
1935
- className: "px-1.5 py-0 text-[10px] leading-4",
1936
- children: "My Media"
1937
- })] }),
1938
- onClick: () => navigate(`media/${item.id}`),
1939
- trailing: canEdit && /* @__PURE__ */ jsx(MediaRowActionsMenu, { onDelete: () => setPendingDeleteId(item.id) })
1940
- }, item.id);
1926
+ imageAlt: item.title ?? "",
1927
+ title: item.title ?? "Untitled",
1928
+ subtitle: /* @__PURE__ */ jsxs(Fragment$1, { children: [getMediaKindLabel(item.kind), item.owner_type === "user" && /* @__PURE__ */ jsx(Badge, {
1929
+ variant: "secondary",
1930
+ className: "px-1.5 py-0 text-[10px] leading-4",
1931
+ children: "My Media"
1932
+ })] }),
1933
+ onClick: () => navigate(`media/${item.id}`),
1934
+ trailing: canEdit && /* @__PURE__ */ jsx(MediaRowActionsMenu, { onDelete: () => setPendingDeleteId(item.id) })
1935
+ }, item.id);
1936
+ })
1941
1937
  })
1938
+ }),
1939
+ /* @__PURE__ */ jsx(AlertDialog, {
1940
+ open: pendingDeleteId !== null,
1941
+ onOpenChange: (open) => !open && setPendingDeleteId(null),
1942
+ children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete this media?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This removes the item from your media library. Shared links that point to it will stop working." })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
1943
+ disabled: isDeleting,
1944
+ children: "Cancel"
1945
+ }), /* @__PURE__ */ jsx(AlertDialogAction, {
1946
+ onClick: (e) => {
1947
+ e.preventDefault();
1948
+ confirmDelete();
1949
+ },
1950
+ disabled: isDeleting,
1951
+ className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1952
+ children: isDeleting ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Delete"
1953
+ })] })] })
1942
1954
  })
1943
- }), /* @__PURE__ */ jsx(AlertDialog, {
1944
- open: pendingDeleteId !== null,
1945
- onOpenChange: (open) => !open && setPendingDeleteId(null),
1946
- children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete this media?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This removes the item from your media library. Shared links that point to it will stop working." })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
1947
- disabled: isDeleting,
1948
- children: "Cancel"
1949
- }), /* @__PURE__ */ jsx(AlertDialogAction, {
1950
- onClick: (e) => {
1951
- e.preventDefault();
1952
- confirmDelete();
1953
- },
1954
- disabled: isDeleting,
1955
- className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1956
- children: isDeleting ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Delete"
1957
- })] })] })
1958
- })] });
1955
+ ] });
1959
1956
  }
1960
1957
  //#endregion
1961
1958
  //#region ../../shareables/ui/src/components/SharePage/TaggedProductsList.tsx
@@ -2096,85 +2093,75 @@ function MediaDetailScreen({ mediaId, onNavigate, onBack }) {
2096
2093
  const displayImage = mediaItem?.image_url || "";
2097
2094
  const displayVideo = mediaItem?.video_url || "";
2098
2095
  const isVideo = mediaItem?.kind === "video" && !!displayVideo;
2099
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
2100
- className: "text-lg",
2101
- children: [
2102
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
2103
- href: "#",
2104
- onClick: (e) => {
2105
- e.preventDefault();
2106
- (onBack ?? (() => navigate("media")))();
2107
- },
2108
- children: "Media"
2109
- }) }),
2110
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
2111
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
2112
- className: "block max-w-[60vw] truncate align-bottom font-semibold md:max-w-[60ch]",
2113
- children: displayTitle || "Media"
2114
- }) })
2115
- ]
2116
- }) }), [
2117
- displayTitle,
2118
- onBack,
2119
- navigate
2120
- ]));
2121
- useScreenHeaderActions(useMemo(() => {
2122
- if (readOnly || !mediaItem || mediaItem.owner_type !== "user") return null;
2123
- return /* @__PURE__ */ jsxs(Button, {
2096
+ const badgeLabel = getBadgeLabel(mediaItem?.kind ?? null);
2097
+ const rawDescription = mediaItem?.description?.body || mediaItem?.stripped || "";
2098
+ const downloadUrl = isVideo ? displayVideo : mediaItem?.pdf_url || displayImage;
2099
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
2100
+ /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
2101
+ className: "text-lg",
2102
+ children: [
2103
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
2104
+ href: "#",
2105
+ onClick: (e) => {
2106
+ e.preventDefault();
2107
+ (onBack ?? (() => navigate("media")))();
2108
+ },
2109
+ children: "Media"
2110
+ }) }),
2111
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
2112
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
2113
+ className: "block max-w-[60vw] truncate align-bottom font-semibold md:max-w-[60ch]",
2114
+ children: displayTitle || "Media"
2115
+ }) })
2116
+ ]
2117
+ }) }) }),
2118
+ /* @__PURE__ */ jsx(ScreenHeaderActions, { children: readOnly || !mediaItem || mediaItem.owner_type !== "user" ? null : /* @__PURE__ */ jsxs(Button, {
2124
2119
  size: "sm",
2125
2120
  variant: "outline",
2126
2121
  onClick: () => navigate(`media/${mediaId}/edit`),
2127
2122
  className: "flex items-center gap-1.5",
2128
2123
  children: [/* @__PURE__ */ jsx(Pencil, { className: "h-3.5 w-3.5" }), "Edit"]
2129
- });
2130
- }, [
2131
- readOnly,
2132
- mediaItem,
2133
- navigate,
2134
- mediaId
2135
- ]));
2136
- const badgeLabel = getBadgeLabel(mediaItem?.kind ?? null);
2137
- const rawDescription = mediaItem?.description?.body || mediaItem?.stripped || "";
2138
- const downloadUrl = isVideo ? displayVideo : mediaItem?.pdf_url || displayImage;
2139
- return /* @__PURE__ */ jsx(ShareableDetailLayout, {
2140
- isLoading,
2141
- notFound: !mediaItem,
2142
- notFoundMessage: "Media not found or failed to load.",
2143
- title: displayTitle,
2144
- description: rawDescription,
2145
- containerHeightClass: "md:h-[calc(95vh-140px)]",
2146
- image: /* @__PURE__ */ jsxs("div", {
2147
- className: "relative h-full overflow-hidden",
2148
- children: [/* @__PURE__ */ jsx(SharePageImageDisplay, {
2149
- displayImage,
2124
+ }) }),
2125
+ /* @__PURE__ */ jsx(ShareableDetailLayout, {
2126
+ isLoading,
2127
+ notFound: !mediaItem,
2128
+ notFoundMessage: "Media not found or failed to load.",
2129
+ title: displayTitle,
2130
+ description: rawDescription,
2131
+ containerHeightClass: "md:h-[calc(95vh-140px)]",
2132
+ image: /* @__PURE__ */ jsxs("div", {
2133
+ className: "relative h-full overflow-hidden",
2134
+ children: [/* @__PURE__ */ jsx(SharePageImageDisplay, {
2135
+ displayImage,
2136
+ displayTitle,
2137
+ displayVideo: isVideo ? displayVideo : void 0,
2138
+ isVideo,
2139
+ badgeLabel,
2140
+ rounded: true,
2141
+ showBadge: false
2142
+ }), /* @__PURE__ */ jsx("span", {
2143
+ className: "bg-background/80 text-foreground absolute top-3 right-3 z-0 inline-flex h-8 items-center rounded-full px-3 text-xs font-medium shadow-md backdrop-blur-sm",
2144
+ children: badgeLabel
2145
+ })]
2146
+ }),
2147
+ actions: /* @__PURE__ */ jsx(AssetActions, {
2148
+ downloadUrl: downloadUrl || null,
2150
2149
  displayTitle,
2151
- displayVideo: isVideo ? displayVideo : void 0,
2150
+ shareLink: shareLinkError ? null : shareLink || null,
2151
+ shareLinkLoading,
2152
2152
  isVideo,
2153
- badgeLabel,
2154
- rounded: true,
2155
- showBadge: false
2156
- }), /* @__PURE__ */ jsx("span", {
2157
- className: "bg-background/80 text-foreground absolute top-3 right-3 z-0 inline-flex h-8 items-center rounded-full px-3 text-xs font-medium shadow-md backdrop-blur-sm",
2158
- children: badgeLabel
2159
- })]
2160
- }),
2161
- actions: /* @__PURE__ */ jsx(AssetActions, {
2162
- downloadUrl: downloadUrl || null,
2163
- displayTitle,
2164
- shareLink: shareLinkError ? null : shareLink || null,
2165
- shareLinkLoading,
2166
- isVideo,
2167
- relateableId: Number(mediaId),
2168
- relateableType: "Medium"
2169
- }),
2170
- children: taggedProducts.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Separator, { className: "bg-foreground my-4" }), /* @__PURE__ */ jsx("div", {
2171
- className: "bg-background rounded-lg",
2172
- children: /* @__PURE__ */ jsx(TaggedProductsList, {
2173
- products: taggedProducts,
2174
- onProductClick: (productId) => onNavigate?.("product", String(productId))
2175
- })
2176
- })] })
2177
- });
2153
+ relateableId: Number(mediaId),
2154
+ relateableType: "Medium"
2155
+ }),
2156
+ children: taggedProducts.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Separator, { className: "bg-foreground my-4" }), /* @__PURE__ */ jsx("div", {
2157
+ className: "bg-background rounded-lg",
2158
+ children: /* @__PURE__ */ jsx(TaggedProductsList, {
2159
+ products: taggedProducts,
2160
+ onProductClick: (productId) => onNavigate?.("product", String(productId))
2161
+ })
2162
+ })] })
2163
+ })
2164
+ ] });
2178
2165
  }
2179
2166
  //#endregion
2180
2167
  //#region ../../file-picker/core/src/query-keys.ts
@@ -8763,42 +8750,47 @@ function MediaEditScreen({ mediaId, onNavigate: _onNavigate, onBack }) {
8763
8750
  } };
8764
8751
  }, [filePickerApi, showToast]);
8765
8752
  const displayTitle = mediaItem?.title ?? "";
8766
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
8767
- className: "text-lg",
8768
- children: [
8769
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
8770
- href: "#",
8771
- onClick: (e) => {
8772
- e.preventDefault();
8773
- (onBack ?? (() => navigate("media")))();
8774
- },
8775
- children: "Media"
8776
- }) }),
8777
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
8778
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
8779
- href: "#",
8780
- onClick: (e) => {
8781
- e.preventDefault();
8782
- navigate(`media/${mediaId}`);
8783
- },
8784
- className: "block max-w-[40vw] truncate align-bottom md:max-w-[60ch]",
8785
- children: displayTitle || "Media"
8786
- }) }),
8787
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
8788
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
8789
- className: "font-semibold",
8790
- children: "Edit"
8791
- }) })
8792
- ]
8793
- }) }), [
8794
- displayTitle,
8795
- onBack,
8796
- navigate,
8797
- mediaId
8798
- ]));
8799
- useScreenHeaderActions(useMemo(() => {
8800
- if (readOnly || !mediaItem) return null;
8801
- return /* @__PURE__ */ jsxs("div", {
8753
+ if (isLoading) return /* @__PURE__ */ jsx("div", {
8754
+ className: "flex items-center justify-center py-16",
8755
+ children: /* @__PURE__ */ jsx(Spinner, { className: "size-8" })
8756
+ });
8757
+ if (!mediaItem) return /* @__PURE__ */ jsx("div", {
8758
+ className: "flex flex-col items-center justify-center py-16",
8759
+ children: /* @__PURE__ */ jsx("p", {
8760
+ className: "text-destructive text-sm",
8761
+ children: "Media not found or failed to load."
8762
+ })
8763
+ });
8764
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
8765
+ /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
8766
+ className: "text-lg",
8767
+ children: [
8768
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
8769
+ href: "#",
8770
+ onClick: (e) => {
8771
+ e.preventDefault();
8772
+ (onBack ?? (() => navigate("media")))();
8773
+ },
8774
+ children: "Media"
8775
+ }) }),
8776
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
8777
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
8778
+ href: "#",
8779
+ onClick: (e) => {
8780
+ e.preventDefault();
8781
+ navigate(`media/${mediaId}`);
8782
+ },
8783
+ className: "block max-w-[40vw] truncate align-bottom md:max-w-[60ch]",
8784
+ children: displayTitle || "Media"
8785
+ }) }),
8786
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
8787
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
8788
+ className: "font-semibold",
8789
+ children: "Edit"
8790
+ }) })
8791
+ ]
8792
+ }) }) }),
8793
+ /* @__PURE__ */ jsx(ScreenHeaderActions, { children: readOnly || !mediaItem ? null : /* @__PURE__ */ jsxs("div", {
8802
8794
  className: "flex items-center gap-2",
8803
8795
  children: [/* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
8804
8796
  asChild: true,
@@ -8821,407 +8813,390 @@ function MediaEditScreen({ mediaId, onNavigate: _onNavigate, onBack }) {
8821
8813
  size: "sm",
8822
8814
  children: isSaving ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Save"
8823
8815
  })]
8824
- });
8825
- }, [
8826
- readOnly,
8827
- mediaItem,
8828
- isDirty,
8829
- isSaving,
8830
- handleSave
8831
- ]));
8832
- if (isLoading) return /* @__PURE__ */ jsx("div", {
8833
- className: "flex items-center justify-center py-16",
8834
- children: /* @__PURE__ */ jsx(Spinner, { className: "size-8" })
8835
- });
8836
- if (!mediaItem) return /* @__PURE__ */ jsx("div", {
8837
- className: "flex flex-col items-center justify-center py-16",
8838
- children: /* @__PURE__ */ jsx("p", {
8839
- className: "text-destructive text-sm",
8840
- children: "Media not found or failed to load."
8841
- })
8842
- });
8843
- return /* @__PURE__ */ jsxs("div", {
8844
- className: "flex flex-col gap-4 px-4 pt-4 pb-24 md:px-10 md:py-6",
8845
- children: [
8846
- /* @__PURE__ */ jsx("div", {
8847
- className: "mx-auto flex w-full max-w-5xl items-center gap-3",
8848
- children: /* @__PURE__ */ jsx("h1", {
8849
- className: "text-foreground text-xl font-semibold break-words",
8850
- children: editState.title || displayTitle || "Media"
8851
- })
8852
- }),
8853
- /* @__PURE__ */ jsxs("div", {
8854
- className: "mx-auto grid w-full max-w-5xl grid-cols-1 gap-6 md:grid-cols-[3fr_1fr]",
8855
- children: [/* @__PURE__ */ jsxs("div", {
8856
- className: "space-y-6",
8857
- children: [
8858
- /* @__PURE__ */ jsxs("div", {
8859
- className: "border-border bg-card rounded-lg border p-4 md:p-5",
8860
- children: [
8861
- /* @__PURE__ */ jsxs("div", {
8862
- className: "mb-4 flex flex-wrap items-center justify-between gap-2",
8863
- children: [/* @__PURE__ */ jsx("h3", {
8864
- className: "text-foreground text-base font-semibold",
8865
- children: "Media"
8866
- }), /* @__PURE__ */ jsxs("div", {
8867
- className: "flex flex-wrap items-center gap-2",
8868
- children: [!readOnly && filePickerContextValue && filePickerApi && /* @__PURE__ */ jsx(Button, {
8869
- onClick: () => setIsPickerOpen(true),
8870
- variant: "outline",
8871
- size: "sm",
8872
- children: "Replace Media"
8873
- }), !readOnly && /* @__PURE__ */ jsxs(Button, {
8874
- variant: "outline",
8875
- size: "sm",
8876
- onClick: () => setIsCtaModalOpen(true),
8877
- className: editState.ctaEnabled ? "border-primary text-primary" : "",
8878
- children: ["CTA Button: ", editState.ctaEnabled ? "On" : "Off"]
8879
- })]
8880
- })]
8881
- }),
8882
- /* @__PURE__ */ jsx(CurrentMediaPreview, {
8883
- mediaItem,
8884
- pendingFileUrl: pendingMediaFile ? pendingMediaFile.file_url : null,
8885
- pendingKind: pendingMediaFile ? deriveUpdateFieldsFromResult(pendingMediaFile).kind : null
8886
- }),
8887
- (() => {
8888
- const pendingKind = pendingMediaFile ? deriveUpdateFieldsFromResult(pendingMediaFile).kind : null;
8889
- const rawContentFormat = mediaItem.content_format;
8890
- const effectiveKind = pendingKind ?? rawContentFormat ?? mediaItem.kind;
8891
- const effectiveVideoUrl = pendingKind === "video" ? pendingMediaFile?.file_url : mediaItem.video_url;
8892
- if (readOnly) return null;
8893
- if (effectiveKind === "video" && effectiveVideoUrl) return /* @__PURE__ */ jsxs("div", {
8894
- className: "border-border mt-4 border-t pt-4",
8895
- children: [/* @__PURE__ */ jsx(VideoThumbnailSelector, {
8896
- videoUrl: effectiveVideoUrl,
8897
- thumbnailUrl: pendingThumbnail ?? mediaItem.image_url,
8898
- onThumbnailCaptured: async (blob) => {
8899
- if (!uploadThumbnail) {
8900
- showToast({
8901
- title: "Thumbnail capture is not available in this context",
8902
- type: "error"
8903
- });
8904
- return;
8905
- }
8906
- try {
8907
- setPendingThumbnail(await uploadThumbnail(blob, `thumbnail-${mediaId}.jpg`));
8908
- } catch (error) {
8909
- showToast({
8910
- title: "Failed to upload thumbnail",
8911
- type: "error",
8912
- error
8913
- });
8914
- }
8915
- },
8916
- onThumbnailSelected: () => setIsThumbnailPickerOpen(true)
8917
- }), pendingThumbnail && /* @__PURE__ */ jsx("p", {
8918
- className: "text-muted-foreground mt-1.5 text-xs",
8919
- children: "Pending — save to apply"
8816
+ }) }),
8817
+ /* @__PURE__ */ jsxs("div", {
8818
+ className: "flex flex-col gap-4 px-4 pt-4 pb-24 md:px-10 md:py-6",
8819
+ children: [
8820
+ /* @__PURE__ */ jsx("div", {
8821
+ className: "mx-auto flex w-full max-w-5xl items-center gap-3",
8822
+ children: /* @__PURE__ */ jsx("h1", {
8823
+ className: "text-foreground text-xl font-semibold break-words",
8824
+ children: editState.title || displayTitle || "Media"
8825
+ })
8826
+ }),
8827
+ /* @__PURE__ */ jsxs("div", {
8828
+ className: "mx-auto grid w-full max-w-5xl grid-cols-1 gap-6 md:grid-cols-[3fr_1fr]",
8829
+ children: [/* @__PURE__ */ jsxs("div", {
8830
+ className: "space-y-6",
8831
+ children: [
8832
+ /* @__PURE__ */ jsxs("div", {
8833
+ className: "border-border bg-card rounded-lg border p-4 md:p-5",
8834
+ children: [
8835
+ /* @__PURE__ */ jsxs("div", {
8836
+ className: "mb-4 flex flex-wrap items-center justify-between gap-2",
8837
+ children: [/* @__PURE__ */ jsx("h3", {
8838
+ className: "text-foreground text-base font-semibold",
8839
+ children: "Media"
8840
+ }), /* @__PURE__ */ jsxs("div", {
8841
+ className: "flex flex-wrap items-center gap-2",
8842
+ children: [!readOnly && filePickerContextValue && filePickerApi && /* @__PURE__ */ jsx(Button, {
8843
+ onClick: () => setIsPickerOpen(true),
8844
+ variant: "outline",
8845
+ size: "sm",
8846
+ children: "Replace Media"
8847
+ }), !readOnly && /* @__PURE__ */ jsxs(Button, {
8848
+ variant: "outline",
8849
+ size: "sm",
8850
+ onClick: () => setIsCtaModalOpen(true),
8851
+ className: editState.ctaEnabled ? "border-primary text-primary" : "",
8852
+ children: ["CTA Button: ", editState.ctaEnabled ? "On" : "Off"]
8853
+ })]
8920
8854
  })]
8921
- });
8922
- if (effectiveKind === "pdf") {
8923
- const currentThumbnail = pendingThumbnail ?? mediaItem.image_url;
8924
- return /* @__PURE__ */ jsxs("div", {
8855
+ }),
8856
+ /* @__PURE__ */ jsx(CurrentMediaPreview, {
8857
+ mediaItem,
8858
+ pendingFileUrl: pendingMediaFile ? pendingMediaFile.file_url : null,
8859
+ pendingKind: pendingMediaFile ? deriveUpdateFieldsFromResult(pendingMediaFile).kind : null
8860
+ }),
8861
+ (() => {
8862
+ const pendingKind = pendingMediaFile ? deriveUpdateFieldsFromResult(pendingMediaFile).kind : null;
8863
+ const rawContentFormat = mediaItem.content_format;
8864
+ const effectiveKind = pendingKind ?? rawContentFormat ?? mediaItem.kind;
8865
+ const effectiveVideoUrl = pendingKind === "video" ? pendingMediaFile?.file_url : mediaItem.video_url;
8866
+ if (readOnly) return null;
8867
+ if (effectiveKind === "video" && effectiveVideoUrl) return /* @__PURE__ */ jsxs("div", {
8925
8868
  className: "border-border mt-4 border-t pt-4",
8926
- children: [/* @__PURE__ */ jsxs("div", {
8927
- className: "space-y-3",
8928
- children: [/* @__PURE__ */ jsx("label", {
8929
- className: "text-foreground mb-1.5 block text-sm font-medium",
8930
- children: "Thumbnail"
8931
- }), currentThumbnail ? /* @__PURE__ */ jsx(ThumbnailWithMeta, {
8932
- src: currentThumbnail,
8933
- onReplace: () => setIsThumbnailPickerOpen(true)
8934
- }) : /* @__PURE__ */ jsxs("div", {
8935
- className: "flex items-center gap-4",
8936
- children: [/* @__PURE__ */ jsx("div", {
8937
- className: "bg-muted flex h-28 w-48 shrink-0 items-center justify-center rounded-md border",
8938
- children: /* @__PURE__ */ jsx(ImageIcon, { className: "text-muted-foreground h-8 w-8" })
8939
- }), /* @__PURE__ */ jsxs("div", {
8940
- className: "min-w-0 flex-1",
8941
- children: [/* @__PURE__ */ jsx("p", {
8942
- className: "text-muted-foreground mb-2 text-sm",
8943
- children: "No thumbnail set"
8944
- }), /* @__PURE__ */ jsxs(Button, {
8945
- variant: "outline",
8946
- size: "sm",
8947
- onClick: () => setIsThumbnailPickerOpen(true),
8948
- className: "gap-1.5",
8949
- children: [/* @__PURE__ */ jsx(ImageIcon, { className: "h-3.5 w-3.5" }), "Select New Image"]
8950
- })]
8951
- })]
8952
- })]
8869
+ children: [/* @__PURE__ */ jsx(VideoThumbnailSelector, {
8870
+ videoUrl: effectiveVideoUrl,
8871
+ thumbnailUrl: pendingThumbnail ?? mediaItem.image_url,
8872
+ onThumbnailCaptured: async (blob) => {
8873
+ if (!uploadThumbnail) {
8874
+ showToast({
8875
+ title: "Thumbnail capture is not available in this context",
8876
+ type: "error"
8877
+ });
8878
+ return;
8879
+ }
8880
+ try {
8881
+ setPendingThumbnail(await uploadThumbnail(blob, `thumbnail-${mediaId}.jpg`));
8882
+ } catch (error) {
8883
+ showToast({
8884
+ title: "Failed to upload thumbnail",
8885
+ type: "error",
8886
+ error
8887
+ });
8888
+ }
8889
+ },
8890
+ onThumbnailSelected: () => setIsThumbnailPickerOpen(true)
8953
8891
  }), pendingThumbnail && /* @__PURE__ */ jsx("p", {
8954
8892
  className: "text-muted-foreground mt-1.5 text-xs",
8955
8893
  children: "Pending — save to apply"
8956
8894
  })]
8957
8895
  });
8958
- }
8959
- return null;
8960
- })()
8961
- ]
8962
- }),
8963
- /* @__PURE__ */ jsxs("div", {
8964
- className: "border-border bg-card rounded-lg border p-4 md:p-5",
8965
- children: [/* @__PURE__ */ jsx("h3", {
8966
- className: "text-foreground mb-4 text-base font-semibold",
8967
- children: "Media Details"
8968
- }), /* @__PURE__ */ jsxs("div", {
8969
- className: "flex flex-col gap-4",
8970
- children: [/* @__PURE__ */ jsxs("div", {
8971
- className: "flex flex-col gap-1.5",
8972
- children: [/* @__PURE__ */ jsxs(Label, {
8973
- htmlFor: "media-title",
8974
- children: ["Title ", /* @__PURE__ */ jsx("span", {
8975
- className: "text-destructive",
8976
- children: "*"
8977
- })]
8978
- }), readOnly ? /* @__PURE__ */ jsx("p", {
8979
- className: "text-foreground text-sm",
8980
- children: displayTitle
8981
- }) : /* @__PURE__ */ jsx(Input, {
8982
- id: "media-title",
8983
- value: editState.title,
8984
- onChange: (e) => setEditState((s) => ({
8985
- ...s,
8986
- title: e.target.value
8987
- })),
8988
- placeholder: "Enter media title"
8989
- })]
8990
- }), /* @__PURE__ */ jsxs("div", {
8991
- className: "flex flex-col gap-1.5",
8992
- children: [/* @__PURE__ */ jsx(Label, { children: "Description" }), readOnly ? /* @__PURE__ */ jsx("p", {
8993
- className: "text-foreground/70 text-sm leading-relaxed",
8994
- children: stripTags(editState.description)
8995
- }) : /* @__PURE__ */ jsx(RichTextEditor, {
8996
- value: editState.description,
8997
- onChange: (val) => setEditState((s) => ({
8998
- ...s,
8999
- description: val
9000
- })),
9001
- placeholder: "Start writing..."
9002
- })]
9003
- })]
9004
- })]
9005
- }),
9006
- /* @__PURE__ */ jsx(MediaProductTagging, {
9007
- products: taggedProducts,
9008
- onAddProduct: async (productId) => {
9009
- if (!mediaProductsApi) return;
9010
- try {
9011
- await mediaProductsApi.addMediaProduct(Number(mediaId), { id: productId });
9012
- await refetchProducts();
9013
- } catch (error) {
9014
- showToast({
9015
- title: `Failed to add product: ${error instanceof Error ? error.message : "Unknown error"}`,
9016
- type: "error",
9017
- error
9018
- });
9019
- }
9020
- },
9021
- onRemoveProduct: async (productId) => {
9022
- if (!mediaProductsApi) return;
9023
- try {
9024
- await mediaProductsApi.removeMediaProduct(Number(mediaId), productId);
9025
- await refetchProducts();
9026
- } catch (error) {
9027
- showToast({
9028
- title: `Failed to remove product: ${error instanceof Error ? error.message : "Unknown error"}`,
9029
- type: "error",
9030
- error
9031
- });
9032
- }
9033
- },
9034
- onSearchProducts: searchProducts ?? (async () => ({
9035
- products: [],
9036
- nextCursor: null
9037
- })),
9038
- disabled: readOnly || !mediaProductsApi
9039
- })
9040
- ]
9041
- }), /* @__PURE__ */ jsx("div", {
9042
- className: "space-y-6",
9043
- children: /* @__PURE__ */ jsxs("div", {
9044
- className: "border-border bg-card rounded-lg border p-4 md:p-5",
9045
- children: [
8896
+ if (effectiveKind === "pdf") {
8897
+ const currentThumbnail = pendingThumbnail ?? mediaItem.image_url;
8898
+ return /* @__PURE__ */ jsxs("div", {
8899
+ className: "border-border mt-4 border-t pt-4",
8900
+ children: [/* @__PURE__ */ jsxs("div", {
8901
+ className: "space-y-3",
8902
+ children: [/* @__PURE__ */ jsx("label", {
8903
+ className: "text-foreground mb-1.5 block text-sm font-medium",
8904
+ children: "Thumbnail"
8905
+ }), currentThumbnail ? /* @__PURE__ */ jsx(ThumbnailWithMeta, {
8906
+ src: currentThumbnail,
8907
+ onReplace: () => setIsThumbnailPickerOpen(true)
8908
+ }) : /* @__PURE__ */ jsxs("div", {
8909
+ className: "flex items-center gap-4",
8910
+ children: [/* @__PURE__ */ jsx("div", {
8911
+ className: "bg-muted flex h-28 w-48 shrink-0 items-center justify-center rounded-md border",
8912
+ children: /* @__PURE__ */ jsx(ImageIcon, { className: "text-muted-foreground h-8 w-8" })
8913
+ }), /* @__PURE__ */ jsxs("div", {
8914
+ className: "min-w-0 flex-1",
8915
+ children: [/* @__PURE__ */ jsx("p", {
8916
+ className: "text-muted-foreground mb-2 text-sm",
8917
+ children: "No thumbnail set"
8918
+ }), /* @__PURE__ */ jsxs(Button, {
8919
+ variant: "outline",
8920
+ size: "sm",
8921
+ onClick: () => setIsThumbnailPickerOpen(true),
8922
+ className: "gap-1.5",
8923
+ children: [/* @__PURE__ */ jsx(ImageIcon, { className: "h-3.5 w-3.5" }), "Select New Image"]
8924
+ })]
8925
+ })]
8926
+ })]
8927
+ }), pendingThumbnail && /* @__PURE__ */ jsx("p", {
8928
+ className: "text-muted-foreground mt-1.5 text-xs",
8929
+ children: "Pending save to apply"
8930
+ })]
8931
+ });
8932
+ }
8933
+ return null;
8934
+ })()
8935
+ ]
8936
+ }),
9046
8937
  /* @__PURE__ */ jsxs("div", {
9047
- className: "mb-4 flex items-center justify-between",
8938
+ className: "border-border bg-card rounded-lg border p-4 md:p-5",
9048
8939
  children: [/* @__PURE__ */ jsx("h3", {
9049
- className: "text-foreground text-base font-semibold",
9050
- children: "SEO And Link Sharing"
9051
- }), !readOnly && /* @__PURE__ */ jsx(Button, {
9052
- variant: "ghost",
9053
- size: "sm",
9054
- onClick: () => setSeoExpanded((prev) => !prev),
9055
- children: seoExpanded ? "Done" : "Edit"
9056
- })]
9057
- }),
9058
- (() => {
9059
- const seoThumbnailUrl = (pendingMediaFile ? deriveUpdateFieldsFromResult(pendingMediaFile) : null)?.image_url ?? pendingThumbnail ?? mediaItem?.image_url;
9060
- return /* @__PURE__ */ jsxs("div", {
9061
- className: "bg-muted/40 border-border mb-4 rounded-md border p-3",
8940
+ className: "text-foreground mb-4 text-base font-semibold",
8941
+ children: "Media Details"
8942
+ }), /* @__PURE__ */ jsxs("div", {
8943
+ className: "flex flex-col gap-4",
9062
8944
  children: [/* @__PURE__ */ jsxs("div", {
9063
- className: "mb-2 flex items-center gap-2",
9064
- children: [seoThumbnailUrl ? /* @__PURE__ */ jsx("img", {
9065
- src: seoThumbnailUrl,
9066
- alt: "SEO preview",
9067
- className: "h-8 w-8 shrink-0 rounded object-cover"
9068
- }) : /* @__PURE__ */ jsx("div", {
9069
- className: "bg-muted flex h-8 w-8 items-center justify-center rounded",
9070
- children: /* @__PURE__ */ jsx(ImageIcon, { className: "text-muted-foreground h-4 w-4" })
9071
- }), /* @__PURE__ */ jsxs("div", {
9072
- className: "min-w-0 flex-1",
9073
- children: [/* @__PURE__ */ jsx("p", {
9074
- className: "text-foreground truncate text-xs font-medium",
9075
- children: editState.seoTitle || displayTitle || "Your page title"
9076
- }), /* @__PURE__ */ jsx("p", {
9077
- className: "text-muted-foreground truncate text-xs",
9078
- children: mediaItem?.preview_link ?? mediaItem?.canonical_url ?? "yoursite.com/media/..."
9079
- })]
9080
- })]
9081
- }), editState.seoDescription && /* @__PURE__ */ jsx("p", {
9082
- className: "text-muted-foreground line-clamp-2 text-xs",
9083
- children: editState.seoDescription
9084
- })]
9085
- });
9086
- })(),
9087
- seoExpanded && /* @__PURE__ */ jsxs("div", {
9088
- className: "flex flex-col gap-4",
9089
- children: [
9090
- /* @__PURE__ */ jsxs("div", {
9091
8945
  className: "flex flex-col gap-1.5",
9092
- children: [/* @__PURE__ */ jsx(Label, {
9093
- htmlFor: "seo-title",
9094
- children: "SEO Title"
9095
- }), /* @__PURE__ */ jsx(Input, {
9096
- id: "seo-title",
9097
- value: editState.seoTitle,
8946
+ children: [/* @__PURE__ */ jsxs(Label, {
8947
+ htmlFor: "media-title",
8948
+ children: ["Title ", /* @__PURE__ */ jsx("span", {
8949
+ className: "text-destructive",
8950
+ children: "*"
8951
+ })]
8952
+ }), readOnly ? /* @__PURE__ */ jsx("p", {
8953
+ className: "text-foreground text-sm",
8954
+ children: displayTitle
8955
+ }) : /* @__PURE__ */ jsx(Input, {
8956
+ id: "media-title",
8957
+ value: editState.title,
9098
8958
  onChange: (e) => setEditState((s) => ({
9099
8959
  ...s,
9100
- seoTitle: e.target.value
8960
+ title: e.target.value
9101
8961
  })),
9102
- placeholder: "Page title for search engines"
8962
+ placeholder: "Enter media title"
9103
8963
  })]
9104
- }),
9105
- /* @__PURE__ */ jsxs("div", {
8964
+ }), /* @__PURE__ */ jsxs("div", {
9106
8965
  className: "flex flex-col gap-1.5",
9107
- children: [/* @__PURE__ */ jsx(Label, {
9108
- htmlFor: "seo-description",
9109
- children: "SEO Description"
9110
- }), /* @__PURE__ */ jsx(Textarea, {
9111
- id: "seo-description",
9112
- value: editState.seoDescription,
9113
- onChange: (e) => setEditState((s) => ({
8966
+ children: [/* @__PURE__ */ jsx(Label, { children: "Description" }), readOnly ? /* @__PURE__ */ jsx("p", {
8967
+ className: "text-foreground/70 text-sm leading-relaxed",
8968
+ children: stripTags(editState.description)
8969
+ }) : /* @__PURE__ */ jsx(RichTextEditor, {
8970
+ value: editState.description,
8971
+ onChange: (val) => setEditState((s) => ({
9114
8972
  ...s,
9115
- seoDescription: e.target.value
8973
+ description: val
9116
8974
  })),
9117
- placeholder: "Description for search engines",
9118
- rows: 3
8975
+ placeholder: "Start writing..."
9119
8976
  })]
9120
- }),
9121
- /* @__PURE__ */ jsxs("div", {
9122
- className: "flex items-center justify-between gap-3",
8977
+ })]
8978
+ })]
8979
+ }),
8980
+ /* @__PURE__ */ jsx(MediaProductTagging, {
8981
+ products: taggedProducts,
8982
+ onAddProduct: async (productId) => {
8983
+ if (!mediaProductsApi) return;
8984
+ try {
8985
+ await mediaProductsApi.addMediaProduct(Number(mediaId), { id: productId });
8986
+ await refetchProducts();
8987
+ } catch (error) {
8988
+ showToast({
8989
+ title: `Failed to add product: ${error instanceof Error ? error.message : "Unknown error"}`,
8990
+ type: "error",
8991
+ error
8992
+ });
8993
+ }
8994
+ },
8995
+ onRemoveProduct: async (productId) => {
8996
+ if (!mediaProductsApi) return;
8997
+ try {
8998
+ await mediaProductsApi.removeMediaProduct(Number(mediaId), productId);
8999
+ await refetchProducts();
9000
+ } catch (error) {
9001
+ showToast({
9002
+ title: `Failed to remove product: ${error instanceof Error ? error.message : "Unknown error"}`,
9003
+ type: "error",
9004
+ error
9005
+ });
9006
+ }
9007
+ },
9008
+ onSearchProducts: searchProducts ?? (async () => ({
9009
+ products: [],
9010
+ nextCursor: null
9011
+ })),
9012
+ disabled: readOnly || !mediaProductsApi
9013
+ })
9014
+ ]
9015
+ }), /* @__PURE__ */ jsx("div", {
9016
+ className: "space-y-6",
9017
+ children: /* @__PURE__ */ jsxs("div", {
9018
+ className: "border-border bg-card rounded-lg border p-4 md:p-5",
9019
+ children: [
9020
+ /* @__PURE__ */ jsxs("div", {
9021
+ className: "mb-4 flex items-center justify-between",
9022
+ children: [/* @__PURE__ */ jsx("h3", {
9023
+ className: "text-foreground text-base font-semibold",
9024
+ children: "SEO And Link Sharing"
9025
+ }), !readOnly && /* @__PURE__ */ jsx(Button, {
9026
+ variant: "ghost",
9027
+ size: "sm",
9028
+ onClick: () => setSeoExpanded((prev) => !prev),
9029
+ children: seoExpanded ? "Done" : "Edit"
9030
+ })]
9031
+ }),
9032
+ (() => {
9033
+ const seoThumbnailUrl = (pendingMediaFile ? deriveUpdateFieldsFromResult(pendingMediaFile) : null)?.image_url ?? pendingThumbnail ?? mediaItem?.image_url;
9034
+ return /* @__PURE__ */ jsxs("div", {
9035
+ className: "bg-muted/40 border-border mb-4 rounded-md border p-3",
9123
9036
  children: [/* @__PURE__ */ jsxs("div", {
9124
- className: "flex flex-col gap-0.5",
9125
- children: [/* @__PURE__ */ jsx("span", {
9126
- className: "text-foreground text-sm font-medium",
9127
- children: "Block Crawlers"
9128
- }), /* @__PURE__ */ jsx("span", {
9129
- className: "text-muted-foreground text-xs",
9130
- children: "Prevent search engines from indexing"
9037
+ className: "mb-2 flex items-center gap-2",
9038
+ children: [seoThumbnailUrl ? /* @__PURE__ */ jsx("img", {
9039
+ src: seoThumbnailUrl,
9040
+ alt: "SEO preview",
9041
+ className: "h-8 w-8 shrink-0 rounded object-cover"
9042
+ }) : /* @__PURE__ */ jsx("div", {
9043
+ className: "bg-muted flex h-8 w-8 items-center justify-center rounded",
9044
+ children: /* @__PURE__ */ jsx(ImageIcon, { className: "text-muted-foreground h-4 w-4" })
9045
+ }), /* @__PURE__ */ jsxs("div", {
9046
+ className: "min-w-0 flex-1",
9047
+ children: [/* @__PURE__ */ jsx("p", {
9048
+ className: "text-foreground truncate text-xs font-medium",
9049
+ children: editState.seoTitle || displayTitle || "Your page title"
9050
+ }), /* @__PURE__ */ jsx("p", {
9051
+ className: "text-muted-foreground truncate text-xs",
9052
+ children: mediaItem?.preview_link ?? mediaItem?.canonical_url ?? "yoursite.com/media/..."
9053
+ })]
9131
9054
  })]
9132
- }), /* @__PURE__ */ jsx(Switch, {
9133
- checked: editState.blockCrawler,
9134
- onCheckedChange: (checked) => setEditState((s) => ({
9135
- ...s,
9136
- blockCrawler: checked
9137
- })),
9138
- "aria-label": "Block search engine crawlers"
9055
+ }), editState.seoDescription && /* @__PURE__ */ jsx("p", {
9056
+ className: "text-muted-foreground line-clamp-2 text-xs",
9057
+ children: editState.seoDescription
9139
9058
  })]
9140
- })
9141
- ]
9142
- })
9143
- ]
9144
- })
9145
- })]
9146
- }),
9147
- /* @__PURE__ */ jsx(AlertDialog, {
9148
- open: isDeleteOpen,
9149
- onOpenChange: setIsDeleteOpen,
9150
- children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete Media" }), /* @__PURE__ */ jsxs(AlertDialogDescription, { children: [
9151
- "Are you sure you want to delete “",
9152
- displayTitle,
9153
- "”? This action cannot be undone."
9154
- ] })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
9155
- disabled: isDeleting,
9156
- children: "Cancel"
9157
- }), /* @__PURE__ */ jsx(AlertDialogAction, {
9158
- onClick: handleDelete,
9159
- disabled: isDeleting,
9160
- className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
9161
- children: isDeleting ? "Deleting..." : "Delete"
9162
- })] })] })
9163
- }),
9164
- /* @__PURE__ */ jsx(CtaModal, {
9165
- open: isCtaModalOpen,
9166
- onOpenChange: setIsCtaModalOpen,
9167
- ctaEnabled: editState.ctaEnabled,
9168
- ctaType: editState.ctaType,
9169
- ctaButtonText: editState.ctaButtonText,
9170
- ctaUrl: editState.ctaUrl,
9171
- onDone: (ctaState) => {
9172
- setEditState((s) => ({
9173
- ...s,
9174
- ctaEnabled: ctaState.enabled,
9175
- ctaType: ctaState.type,
9176
- ctaButtonText: ctaState.buttonText,
9177
- ctaUrl: ctaState.url
9178
- }));
9179
- }
9180
- }),
9181
- filePickerContextValue && filePickerApi && /* @__PURE__ */ jsx(FilePickerApiProvider, {
9182
- api: filePickerApi,
9183
- children: /* @__PURE__ */ jsx(FilePickerProvider, {
9184
- value: filePickerContextValue,
9185
- children: /* @__PURE__ */ jsx(FilePicker, {
9186
- open: isPickerOpen,
9187
- onFilesSelected: handleFilesSelected,
9188
- onClose: () => setIsPickerOpen(false),
9189
- config: {
9190
- maxFiles: 1,
9191
- allowedMethods: [
9192
- "dam",
9193
- "upload",
9194
- "url"
9059
+ });
9060
+ })(),
9061
+ seoExpanded && /* @__PURE__ */ jsxs("div", {
9062
+ className: "flex flex-col gap-4",
9063
+ children: [
9064
+ /* @__PURE__ */ jsxs("div", {
9065
+ className: "flex flex-col gap-1.5",
9066
+ children: [/* @__PURE__ */ jsx(Label, {
9067
+ htmlFor: "seo-title",
9068
+ children: "SEO Title"
9069
+ }), /* @__PURE__ */ jsx(Input, {
9070
+ id: "seo-title",
9071
+ value: editState.seoTitle,
9072
+ onChange: (e) => setEditState((s) => ({
9073
+ ...s,
9074
+ seoTitle: e.target.value
9075
+ })),
9076
+ placeholder: "Page title for search engines"
9077
+ })]
9078
+ }),
9079
+ /* @__PURE__ */ jsxs("div", {
9080
+ className: "flex flex-col gap-1.5",
9081
+ children: [/* @__PURE__ */ jsx(Label, {
9082
+ htmlFor: "seo-description",
9083
+ children: "SEO Description"
9084
+ }), /* @__PURE__ */ jsx(Textarea, {
9085
+ id: "seo-description",
9086
+ value: editState.seoDescription,
9087
+ onChange: (e) => setEditState((s) => ({
9088
+ ...s,
9089
+ seoDescription: e.target.value
9090
+ })),
9091
+ placeholder: "Description for search engines",
9092
+ rows: 3
9093
+ })]
9094
+ }),
9095
+ /* @__PURE__ */ jsxs("div", {
9096
+ className: "flex items-center justify-between gap-3",
9097
+ children: [/* @__PURE__ */ jsxs("div", {
9098
+ className: "flex flex-col gap-0.5",
9099
+ children: [/* @__PURE__ */ jsx("span", {
9100
+ className: "text-foreground text-sm font-medium",
9101
+ children: "Block Crawlers"
9102
+ }), /* @__PURE__ */ jsx("span", {
9103
+ className: "text-muted-foreground text-xs",
9104
+ children: "Prevent search engines from indexing"
9105
+ })]
9106
+ }), /* @__PURE__ */ jsx(Switch, {
9107
+ checked: editState.blockCrawler,
9108
+ onCheckedChange: (checked) => setEditState((s) => ({
9109
+ ...s,
9110
+ blockCrawler: checked
9111
+ })),
9112
+ "aria-label": "Block search engine crawlers"
9113
+ })]
9114
+ })
9115
+ ]
9116
+ })
9195
9117
  ]
9196
- }
9118
+ })
9119
+ })]
9120
+ }),
9121
+ /* @__PURE__ */ jsx(AlertDialog, {
9122
+ open: isDeleteOpen,
9123
+ onOpenChange: setIsDeleteOpen,
9124
+ children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete Media" }), /* @__PURE__ */ jsxs(AlertDialogDescription, { children: [
9125
+ "Are you sure you want to delete “",
9126
+ displayTitle,
9127
+ "”? This action cannot be undone."
9128
+ ] })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
9129
+ disabled: isDeleting,
9130
+ children: "Cancel"
9131
+ }), /* @__PURE__ */ jsx(AlertDialogAction, {
9132
+ onClick: handleDelete,
9133
+ disabled: isDeleting,
9134
+ className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
9135
+ children: isDeleting ? "Deleting..." : "Delete"
9136
+ })] })] })
9137
+ }),
9138
+ /* @__PURE__ */ jsx(CtaModal, {
9139
+ open: isCtaModalOpen,
9140
+ onOpenChange: setIsCtaModalOpen,
9141
+ ctaEnabled: editState.ctaEnabled,
9142
+ ctaType: editState.ctaType,
9143
+ ctaButtonText: editState.ctaButtonText,
9144
+ ctaUrl: editState.ctaUrl,
9145
+ onDone: (ctaState) => {
9146
+ setEditState((s) => ({
9147
+ ...s,
9148
+ ctaEnabled: ctaState.enabled,
9149
+ ctaType: ctaState.type,
9150
+ ctaButtonText: ctaState.buttonText,
9151
+ ctaUrl: ctaState.url
9152
+ }));
9153
+ }
9154
+ }),
9155
+ filePickerContextValue && filePickerApi && /* @__PURE__ */ jsx(FilePickerApiProvider, {
9156
+ api: filePickerApi,
9157
+ children: /* @__PURE__ */ jsx(FilePickerProvider, {
9158
+ value: filePickerContextValue,
9159
+ children: /* @__PURE__ */ jsx(FilePicker, {
9160
+ open: isPickerOpen,
9161
+ onFilesSelected: handleFilesSelected,
9162
+ onClose: () => setIsPickerOpen(false),
9163
+ config: {
9164
+ maxFiles: 1,
9165
+ allowedMethods: [
9166
+ "dam",
9167
+ "upload",
9168
+ "url"
9169
+ ]
9170
+ }
9171
+ })
9197
9172
  })
9198
- })
9199
- }),
9200
- filePickerContextValue && filePickerApi && /* @__PURE__ */ jsx(FilePickerApiProvider, {
9201
- api: filePickerApi,
9202
- children: /* @__PURE__ */ jsx(FilePickerProvider, {
9203
- value: filePickerContextValue,
9204
- children: /* @__PURE__ */ jsx(FilePicker, {
9205
- open: isThumbnailPickerOpen,
9206
- onFilesSelected: (results) => {
9207
- const result = results[0];
9208
- if (result) setPendingThumbnail(result.file_url);
9209
- setIsThumbnailPickerOpen(false);
9210
- },
9211
- onClose: () => setIsThumbnailPickerOpen(false),
9212
- config: {
9213
- maxFiles: 1,
9214
- allowedMethods: [
9215
- "dam",
9216
- "upload",
9217
- "url"
9218
- ]
9219
- }
9173
+ }),
9174
+ filePickerContextValue && filePickerApi && /* @__PURE__ */ jsx(FilePickerApiProvider, {
9175
+ api: filePickerApi,
9176
+ children: /* @__PURE__ */ jsx(FilePickerProvider, {
9177
+ value: filePickerContextValue,
9178
+ children: /* @__PURE__ */ jsx(FilePicker, {
9179
+ open: isThumbnailPickerOpen,
9180
+ onFilesSelected: (results) => {
9181
+ const result = results[0];
9182
+ if (result) setPendingThumbnail(result.file_url);
9183
+ setIsThumbnailPickerOpen(false);
9184
+ },
9185
+ onClose: () => setIsThumbnailPickerOpen(false),
9186
+ config: {
9187
+ maxFiles: 1,
9188
+ allowedMethods: [
9189
+ "dam",
9190
+ "upload",
9191
+ "url"
9192
+ ]
9193
+ }
9194
+ })
9220
9195
  })
9221
9196
  })
9222
- })
9223
- ]
9224
- });
9197
+ ]
9198
+ })
9199
+ ] });
9225
9200
  }
9226
9201
  //#endregion
9227
9202
  //#region ../../shareables/ui/src/components/screens/MediaCreateScreen.tsx
@@ -9266,24 +9241,6 @@ function FilePreview({ result, mediaType }) {
9266
9241
  function MediaCreateScreen({ onNavigate, onBack }) {
9267
9242
  const { navigate, showToast, filePickerApi } = useShareablesUI();
9268
9243
  const user = useShareablesUser();
9269
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
9270
- className: "text-lg",
9271
- children: [
9272
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
9273
- href: "#",
9274
- onClick: (e) => {
9275
- e.preventDefault();
9276
- (onBack ?? (() => navigate("media")))();
9277
- },
9278
- children: "Media"
9279
- }) }),
9280
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
9281
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
9282
- className: "font-semibold",
9283
- children: "New Media"
9284
- }) })
9285
- ]
9286
- }) }), [onBack, navigate]));
9287
9244
  const [title, setTitle] = useState("");
9288
9245
  const [description, setDescription] = useState("");
9289
9246
  const [active] = useState(true);
@@ -9370,12 +9327,6 @@ function MediaCreateScreen({ onNavigate, onBack }) {
9370
9327
  seoDescription,
9371
9328
  seoBlockCrawler
9372
9329
  ]);
9373
- useScreenHeaderActions(useMemo(() => /* @__PURE__ */ jsx(Button, {
9374
- onClick: handleSave,
9375
- disabled: isCreating,
9376
- size: "sm",
9377
- children: isCreating ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Save"
9378
- }), [handleSave, isCreating]));
9379
9330
  const handleFilesSelected = useCallback((results) => {
9380
9331
  const result = results[0];
9381
9332
  if (!result) return;
@@ -9398,222 +9349,248 @@ function MediaCreateScreen({ onNavigate, onBack }) {
9398
9349
  dismiss: () => {}
9399
9350
  } };
9400
9351
  }, [filePickerApi, showToast]);
9401
- return /* @__PURE__ */ jsxs("div", {
9402
- className: "flex flex-col gap-4 px-4 py-4 md:px-10 md:py-6",
9403
- children: [
9404
- /* @__PURE__ */ jsx("div", {
9405
- className: "mx-auto flex w-full max-w-5xl items-center gap-3",
9406
- children: /* @__PURE__ */ jsx("h1", {
9407
- className: "text-foreground text-xl font-semibold",
9408
- children: title.trim() || "New Media"
9409
- })
9410
- }),
9411
- /* @__PURE__ */ jsxs("div", {
9412
- className: "mx-auto grid w-full max-w-5xl gap-6 md:grid-cols-[3fr_1fr]",
9413
- children: [/* @__PURE__ */ jsxs("div", {
9414
- className: "space-y-6",
9352
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
9353
+ /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
9354
+ className: "text-lg",
9355
+ children: [
9356
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
9357
+ href: "#",
9358
+ onClick: (e) => {
9359
+ e.preventDefault();
9360
+ (onBack ?? (() => navigate("media")))();
9361
+ },
9362
+ children: "Media"
9363
+ }) }),
9364
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
9365
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
9366
+ className: "font-semibold",
9367
+ children: "New Media"
9368
+ }) })
9369
+ ]
9370
+ }) }) }),
9371
+ /* @__PURE__ */ jsx(ScreenHeaderActions, { children: /* @__PURE__ */ jsx(Button, {
9372
+ onClick: handleSave,
9373
+ disabled: isCreating,
9374
+ size: "sm",
9375
+ children: isCreating ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Save"
9376
+ }) }),
9377
+ /* @__PURE__ */ jsxs("div", {
9378
+ className: "flex flex-col gap-4 px-4 py-4 md:px-10 md:py-6",
9379
+ children: [
9380
+ /* @__PURE__ */ jsx("div", {
9381
+ className: "mx-auto flex w-full max-w-5xl items-center gap-3",
9382
+ children: /* @__PURE__ */ jsx("h1", {
9383
+ className: "text-foreground text-xl font-semibold",
9384
+ children: title.trim() || "New Media"
9385
+ })
9386
+ }),
9387
+ /* @__PURE__ */ jsxs("div", {
9388
+ className: "mx-auto grid w-full max-w-5xl gap-6 md:grid-cols-[3fr_1fr]",
9415
9389
  children: [/* @__PURE__ */ jsxs("div", {
9416
- className: "border-border bg-card rounded-lg border p-5",
9390
+ className: "space-y-6",
9417
9391
  children: [/* @__PURE__ */ jsxs("div", {
9418
- className: "mb-4 flex items-center justify-between",
9419
- children: [/* @__PURE__ */ jsx("h3", {
9420
- className: "text-foreground text-base font-semibold",
9421
- children: "Media"
9422
- }), /* @__PURE__ */ jsxs("div", {
9423
- className: "flex items-center gap-2",
9424
- children: [/* @__PURE__ */ jsx(Button, {
9392
+ className: "border-border bg-card rounded-lg border p-5",
9393
+ children: [/* @__PURE__ */ jsxs("div", {
9394
+ className: "mb-4 flex items-center justify-between",
9395
+ children: [/* @__PURE__ */ jsx("h3", {
9396
+ className: "text-foreground text-base font-semibold",
9397
+ children: "Media"
9398
+ }), /* @__PURE__ */ jsxs("div", {
9399
+ className: "flex items-center gap-2",
9400
+ children: [/* @__PURE__ */ jsx(Button, {
9401
+ onClick: () => setIsPickerOpen(true),
9402
+ variant: "outline",
9403
+ size: "sm",
9404
+ disabled: !filePickerApi,
9405
+ children: "Select Media"
9406
+ }), /* @__PURE__ */ jsxs(Button, {
9407
+ variant: "outline",
9408
+ size: "sm",
9409
+ onClick: () => setIsCtaModalOpen(true),
9410
+ className: ctaEnabled ? "border-primary text-primary" : "",
9411
+ children: ["CTA Button: ", ctaEnabled ? "On" : "Off"]
9412
+ })]
9413
+ })]
9414
+ }), selectedResult && mediaType ? /* @__PURE__ */ jsxs("div", {
9415
+ className: "flex flex-col gap-3",
9416
+ children: [/* @__PURE__ */ jsx(FilePreview, {
9417
+ result: selectedResult,
9418
+ mediaType
9419
+ }), /* @__PURE__ */ jsx(Button, {
9425
9420
  onClick: () => setIsPickerOpen(true),
9426
9421
  variant: "outline",
9427
9422
  size: "sm",
9428
- disabled: !filePickerApi,
9429
- children: "Select Media"
9430
- }), /* @__PURE__ */ jsxs(Button, {
9431
- variant: "outline",
9432
- size: "sm",
9433
- onClick: () => setIsCtaModalOpen(true),
9434
- className: ctaEnabled ? "border-primary text-primary" : "",
9435
- children: ["CTA Button: ", ctaEnabled ? "On" : "Off"]
9423
+ className: "w-fit",
9424
+ children: "Replace"
9436
9425
  })]
9437
- })]
9438
- }), selectedResult && mediaType ? /* @__PURE__ */ jsxs("div", {
9439
- className: "flex flex-col gap-3",
9440
- children: [/* @__PURE__ */ jsx(FilePreview, {
9441
- result: selectedResult,
9442
- mediaType
9443
- }), /* @__PURE__ */ jsx(Button, {
9426
+ }) : /* @__PURE__ */ jsxs("button", {
9427
+ type: "button",
9444
9428
  onClick: () => setIsPickerOpen(true),
9445
- variant: "outline",
9446
- size: "sm",
9447
- className: "w-fit",
9448
- children: "Replace"
9449
- })]
9450
- }) : /* @__PURE__ */ jsxs("button", {
9451
- type: "button",
9452
- onClick: () => setIsPickerOpen(true),
9453
- disabled: !filePickerApi,
9454
- className: "border-border text-muted-foreground hover:bg-muted/30 flex h-40 w-full flex-col items-center justify-center gap-2 rounded-lg border border-dashed transition-colors disabled:cursor-not-allowed disabled:opacity-50",
9455
- children: [/* @__PURE__ */ jsx(Upload, { className: "h-6 w-6" }), /* @__PURE__ */ jsx("span", {
9456
- className: "text-sm",
9457
- children: "No media uploaded. Click to upload an image, video, or PDF."
9429
+ disabled: !filePickerApi,
9430
+ className: "border-border text-muted-foreground hover:bg-muted/30 flex h-40 w-full flex-col items-center justify-center gap-2 rounded-lg border border-dashed transition-colors disabled:cursor-not-allowed disabled:opacity-50",
9431
+ children: [/* @__PURE__ */ jsx(Upload, { className: "h-6 w-6" }), /* @__PURE__ */ jsx("span", {
9432
+ className: "text-sm",
9433
+ children: "No media uploaded. Click to upload an image, video, or PDF."
9434
+ })]
9458
9435
  })]
9459
- })]
9460
- }), /* @__PURE__ */ jsxs("div", {
9461
- className: "border-border bg-card rounded-lg border p-5",
9462
- children: [/* @__PURE__ */ jsx("h3", {
9463
- className: "text-foreground mb-4 text-base font-semibold",
9464
- children: "Media Details"
9465
9436
  }), /* @__PURE__ */ jsxs("div", {
9466
- className: "flex flex-col gap-4",
9467
- children: [/* @__PURE__ */ jsxs("div", {
9468
- className: "flex flex-col gap-1.5",
9469
- children: [/* @__PURE__ */ jsxs(Label, {
9470
- htmlFor: "media-title",
9471
- children: ["Title ", /* @__PURE__ */ jsx("span", {
9472
- className: "text-destructive",
9473
- children: "*"
9474
- })]
9475
- }), /* @__PURE__ */ jsx(Input, {
9476
- id: "media-title",
9477
- value: title,
9478
- onChange: (e) => setTitle(e.target.value),
9479
- placeholder: "Enter media title",
9480
- required: true
9481
- })]
9437
+ className: "border-border bg-card rounded-lg border p-5",
9438
+ children: [/* @__PURE__ */ jsx("h3", {
9439
+ className: "text-foreground mb-4 text-base font-semibold",
9440
+ children: "Media Details"
9482
9441
  }), /* @__PURE__ */ jsxs("div", {
9483
- className: "flex flex-col gap-1.5",
9484
- children: [/* @__PURE__ */ jsx(Label, { children: "Description" }), /* @__PURE__ */ jsx(RichTextEditor, {
9485
- value: description,
9486
- onChange: setDescription,
9487
- placeholder: "Start writing..."
9488
- })]
9489
- })]
9490
- })]
9491
- })]
9492
- }), /* @__PURE__ */ jsx("div", {
9493
- className: "space-y-6",
9494
- children: /* @__PURE__ */ jsxs("div", {
9495
- className: "border-border bg-card rounded-lg border p-5",
9496
- children: [
9497
- /* @__PURE__ */ jsxs("div", {
9498
- className: "mb-4 flex items-center justify-between",
9499
- children: [/* @__PURE__ */ jsx("h3", {
9500
- className: "text-foreground text-base font-semibold",
9501
- children: "SEO And Link Sharing"
9502
- }), /* @__PURE__ */ jsx(Button, {
9503
- variant: "ghost",
9504
- size: "sm",
9505
- onClick: () => setSeoExpanded((prev) => !prev),
9506
- children: seoExpanded ? "Done" : "Edit"
9507
- })]
9508
- }),
9509
- /* @__PURE__ */ jsxs("div", {
9510
- className: "bg-muted/40 border-border mb-4 rounded-md border p-3",
9442
+ className: "flex flex-col gap-4",
9511
9443
  children: [/* @__PURE__ */ jsxs("div", {
9512
- className: "mb-2 flex items-center gap-2",
9513
- children: [/* @__PURE__ */ jsx("div", {
9514
- className: "bg-muted flex h-8 w-8 items-center justify-center rounded",
9515
- children: /* @__PURE__ */ jsx(ImageIcon, { className: "text-muted-foreground h-4 w-4" })
9516
- }), /* @__PURE__ */ jsxs("div", {
9517
- className: "min-w-0 flex-1",
9518
- children: [/* @__PURE__ */ jsx("p", {
9519
- className: "text-foreground truncate text-xs font-medium",
9520
- children: seoTitle || "Your page title"
9521
- }), /* @__PURE__ */ jsx("p", {
9522
- className: "text-muted-foreground truncate text-xs",
9523
- children: "yoursite.com/media/..."
9444
+ className: "flex flex-col gap-1.5",
9445
+ children: [/* @__PURE__ */ jsxs(Label, {
9446
+ htmlFor: "media-title",
9447
+ children: ["Title ", /* @__PURE__ */ jsx("span", {
9448
+ className: "text-destructive",
9449
+ children: "*"
9524
9450
  })]
9451
+ }), /* @__PURE__ */ jsx(Input, {
9452
+ id: "media-title",
9453
+ value: title,
9454
+ onChange: (e) => setTitle(e.target.value),
9455
+ placeholder: "Enter media title",
9456
+ required: true
9457
+ })]
9458
+ }), /* @__PURE__ */ jsxs("div", {
9459
+ className: "flex flex-col gap-1.5",
9460
+ children: [/* @__PURE__ */ jsx(Label, { children: "Description" }), /* @__PURE__ */ jsx(RichTextEditor, {
9461
+ value: description,
9462
+ onChange: setDescription,
9463
+ placeholder: "Start writing..."
9525
9464
  })]
9526
- }), seoDescription && /* @__PURE__ */ jsx("p", {
9527
- className: "text-muted-foreground line-clamp-2 text-xs",
9528
- children: seoDescription
9529
9465
  })]
9530
- }),
9531
- seoExpanded && /* @__PURE__ */ jsxs("div", {
9532
- className: "flex flex-col gap-4",
9533
- children: [
9534
- /* @__PURE__ */ jsxs("div", {
9535
- className: "flex flex-col gap-1.5",
9536
- children: [/* @__PURE__ */ jsx(Label, {
9537
- htmlFor: "seo-title",
9538
- children: "SEO Title"
9539
- }), /* @__PURE__ */ jsx(Input, {
9540
- id: "seo-title",
9541
- value: seoTitle,
9542
- onChange: (e) => setSeoTitle(e.target.value),
9543
- placeholder: "Page title for search engines"
9544
- })]
9545
- }),
9546
- /* @__PURE__ */ jsxs("div", {
9547
- className: "flex flex-col gap-1.5",
9548
- children: [/* @__PURE__ */ jsx(Label, {
9549
- htmlFor: "seo-description",
9550
- children: "SEO Description"
9551
- }), /* @__PURE__ */ jsx(Textarea, {
9552
- id: "seo-description",
9553
- value: seoDescription,
9554
- onChange: (e) => setSeoDescription(e.target.value),
9555
- placeholder: "Description for search engines",
9556
- rows: 3
9466
+ })]
9467
+ })]
9468
+ }), /* @__PURE__ */ jsx("div", {
9469
+ className: "space-y-6",
9470
+ children: /* @__PURE__ */ jsxs("div", {
9471
+ className: "border-border bg-card rounded-lg border p-5",
9472
+ children: [
9473
+ /* @__PURE__ */ jsxs("div", {
9474
+ className: "mb-4 flex items-center justify-between",
9475
+ children: [/* @__PURE__ */ jsx("h3", {
9476
+ className: "text-foreground text-base font-semibold",
9477
+ children: "SEO And Link Sharing"
9478
+ }), /* @__PURE__ */ jsx(Button, {
9479
+ variant: "ghost",
9480
+ size: "sm",
9481
+ onClick: () => setSeoExpanded((prev) => !prev),
9482
+ children: seoExpanded ? "Done" : "Edit"
9483
+ })]
9484
+ }),
9485
+ /* @__PURE__ */ jsxs("div", {
9486
+ className: "bg-muted/40 border-border mb-4 rounded-md border p-3",
9487
+ children: [/* @__PURE__ */ jsxs("div", {
9488
+ className: "mb-2 flex items-center gap-2",
9489
+ children: [/* @__PURE__ */ jsx("div", {
9490
+ className: "bg-muted flex h-8 w-8 items-center justify-center rounded",
9491
+ children: /* @__PURE__ */ jsx(ImageIcon, { className: "text-muted-foreground h-4 w-4" })
9492
+ }), /* @__PURE__ */ jsxs("div", {
9493
+ className: "min-w-0 flex-1",
9494
+ children: [/* @__PURE__ */ jsx("p", {
9495
+ className: "text-foreground truncate text-xs font-medium",
9496
+ children: seoTitle || "Your page title"
9497
+ }), /* @__PURE__ */ jsx("p", {
9498
+ className: "text-muted-foreground truncate text-xs",
9499
+ children: "yoursite.com/media/..."
9500
+ })]
9557
9501
  })]
9558
- }),
9559
- /* @__PURE__ */ jsxs("div", {
9560
- className: "flex items-center justify-between gap-3",
9561
- children: [/* @__PURE__ */ jsxs("div", {
9562
- className: "flex flex-col gap-0.5",
9563
- children: [/* @__PURE__ */ jsx("span", {
9564
- className: "text-foreground text-sm font-medium",
9565
- children: "Block Crawlers"
9566
- }), /* @__PURE__ */ jsx("span", {
9567
- className: "text-muted-foreground text-xs",
9568
- children: "Prevent search engines from indexing"
9502
+ }), seoDescription && /* @__PURE__ */ jsx("p", {
9503
+ className: "text-muted-foreground line-clamp-2 text-xs",
9504
+ children: seoDescription
9505
+ })]
9506
+ }),
9507
+ seoExpanded && /* @__PURE__ */ jsxs("div", {
9508
+ className: "flex flex-col gap-4",
9509
+ children: [
9510
+ /* @__PURE__ */ jsxs("div", {
9511
+ className: "flex flex-col gap-1.5",
9512
+ children: [/* @__PURE__ */ jsx(Label, {
9513
+ htmlFor: "seo-title",
9514
+ children: "SEO Title"
9515
+ }), /* @__PURE__ */ jsx(Input, {
9516
+ id: "seo-title",
9517
+ value: seoTitle,
9518
+ onChange: (e) => setSeoTitle(e.target.value),
9519
+ placeholder: "Page title for search engines"
9520
+ })]
9521
+ }),
9522
+ /* @__PURE__ */ jsxs("div", {
9523
+ className: "flex flex-col gap-1.5",
9524
+ children: [/* @__PURE__ */ jsx(Label, {
9525
+ htmlFor: "seo-description",
9526
+ children: "SEO Description"
9527
+ }), /* @__PURE__ */ jsx(Textarea, {
9528
+ id: "seo-description",
9529
+ value: seoDescription,
9530
+ onChange: (e) => setSeoDescription(e.target.value),
9531
+ placeholder: "Description for search engines",
9532
+ rows: 3
9533
+ })]
9534
+ }),
9535
+ /* @__PURE__ */ jsxs("div", {
9536
+ className: "flex items-center justify-between gap-3",
9537
+ children: [/* @__PURE__ */ jsxs("div", {
9538
+ className: "flex flex-col gap-0.5",
9539
+ children: [/* @__PURE__ */ jsx("span", {
9540
+ className: "text-foreground text-sm font-medium",
9541
+ children: "Block Crawlers"
9542
+ }), /* @__PURE__ */ jsx("span", {
9543
+ className: "text-muted-foreground text-xs",
9544
+ children: "Prevent search engines from indexing"
9545
+ })]
9546
+ }), /* @__PURE__ */ jsx(Switch, {
9547
+ checked: seoBlockCrawler,
9548
+ onCheckedChange: setSeoBlockCrawler,
9549
+ "aria-label": "Block search engine crawlers"
9569
9550
  })]
9570
- }), /* @__PURE__ */ jsx(Switch, {
9571
- checked: seoBlockCrawler,
9572
- onCheckedChange: setSeoBlockCrawler,
9573
- "aria-label": "Block search engine crawlers"
9574
- })]
9575
- })
9576
- ]
9577
- })
9578
- ]
9579
- })
9580
- })]
9581
- }),
9582
- /* @__PURE__ */ jsx(CtaModal, {
9583
- open: isCtaModalOpen,
9584
- onOpenChange: setIsCtaModalOpen,
9585
- ctaEnabled,
9586
- ctaType,
9587
- ctaButtonText,
9588
- ctaUrl,
9589
- onDone: (ctaState) => {
9590
- setCtaEnabled(ctaState.enabled);
9591
- setCtaType(ctaState.type);
9592
- setCtaButtonText(ctaState.buttonText);
9593
- setCtaUrl(ctaState.url);
9594
- }
9595
- }),
9596
- filePickerContextValue && filePickerApi && /* @__PURE__ */ jsx(FilePickerApiProvider, {
9597
- api: filePickerApi,
9598
- children: /* @__PURE__ */ jsx(FilePickerProvider, {
9599
- value: filePickerContextValue,
9600
- children: /* @__PURE__ */ jsx(FilePicker, {
9601
- open: isPickerOpen,
9602
- onFilesSelected: handleFilesSelected,
9603
- onClose: () => setIsPickerOpen(false),
9604
- config: {
9605
- maxFiles: 1,
9606
- allowedMethods: [
9607
- "dam",
9608
- "upload",
9609
- "url"
9551
+ })
9552
+ ]
9553
+ })
9610
9554
  ]
9611
- }
9555
+ })
9556
+ })]
9557
+ }),
9558
+ /* @__PURE__ */ jsx(CtaModal, {
9559
+ open: isCtaModalOpen,
9560
+ onOpenChange: setIsCtaModalOpen,
9561
+ ctaEnabled,
9562
+ ctaType,
9563
+ ctaButtonText,
9564
+ ctaUrl,
9565
+ onDone: (ctaState) => {
9566
+ setCtaEnabled(ctaState.enabled);
9567
+ setCtaType(ctaState.type);
9568
+ setCtaButtonText(ctaState.buttonText);
9569
+ setCtaUrl(ctaState.url);
9570
+ }
9571
+ }),
9572
+ filePickerContextValue && filePickerApi && /* @__PURE__ */ jsx(FilePickerApiProvider, {
9573
+ api: filePickerApi,
9574
+ children: /* @__PURE__ */ jsx(FilePickerProvider, {
9575
+ value: filePickerContextValue,
9576
+ children: /* @__PURE__ */ jsx(FilePicker, {
9577
+ open: isPickerOpen,
9578
+ onFilesSelected: handleFilesSelected,
9579
+ onClose: () => setIsPickerOpen(false),
9580
+ config: {
9581
+ maxFiles: 1,
9582
+ allowedMethods: [
9583
+ "dam",
9584
+ "upload",
9585
+ "url"
9586
+ ]
9587
+ }
9588
+ })
9612
9589
  })
9613
9590
  })
9614
- })
9615
- ]
9616
- });
9591
+ ]
9592
+ })
9593
+ ] });
9617
9594
  }
9618
9595
  //#endregion
9619
9596
  //#region ../../shareables/ui/src/components/playlists/PlaylistCard.tsx
@@ -9763,18 +9740,6 @@ function PlaylistsListingScreen(_props) {
9763
9740
  const api = useShareablesApi();
9764
9741
  const { navigate, showToast, user, onToggleFavorite, onDeletePlaylist, readOnly } = useShareablesUI();
9765
9742
  const queryClient = useQueryClient();
9766
- useScreenHeaderActions(useMemo(() => readOnly ? null : /* @__PURE__ */ jsxs(Button, {
9767
- onClick: () => navigate("playlists/new"),
9768
- size: "sm",
9769
- children: [/* @__PURE__ */ jsx(Plus, { className: "mr-1 h-4 w-4" }), "Create Playlist"]
9770
- }), [navigate, readOnly]));
9771
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
9772
- className: "text-lg",
9773
- children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
9774
- className: "font-semibold",
9775
- children: "Playlists"
9776
- }) })
9777
- }) }), []));
9778
9743
  const [searchTerm, setSearchTerm] = useState("");
9779
9744
  const [debouncedSearch, setDebouncedSearch] = useState("");
9780
9745
  const [sortValue, setSortValue] = useState("title");
@@ -9979,115 +9944,131 @@ function PlaylistsListingScreen(_props) {
9979
9944
  className: "bg-destructive/10 text-destructive rounded-lg px-3 py-2",
9980
9945
  children: ["Error: ", error.message]
9981
9946
  })] });
9982
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ShareableListLayout, {
9983
- isLoading,
9984
- filters: filterBar,
9985
- isEmpty: filteredPlaylists.length === 0 && !isFetchingNextPage && !hasNextPage,
9986
- emptyMessage: getFilteredEmptyMessage({
9987
- searchTerm,
9988
- ownerFilter,
9989
- entityName: "playlists",
9990
- defaultMessage: "There are no playlists available at the moment."
9991
- }),
9992
- footer,
9993
- sentinelRef: observerTarget,
9994
- loadingFilterShape: "search-view",
9995
- children: viewMode === "grid" ? /* @__PURE__ */ jsx("div", {
9996
- className: GRID_CLASS,
9997
- children: filteredPlaylists.map((playlist) => {
9998
- const firstItem = playlist.items?.[0];
9999
- const imageUrl = playlist.image_url ?? firstItem?.image_url ?? firstItem?.relateable?.image_url ?? firstItem?.relateable?.compressed_image_url;
10000
- const itemCount = playlist.items_count ?? playlist.items?.length ?? 0;
10001
- const canEdit = !readOnly && playlist.user_id === user?.id;
10002
- return /* @__PURE__ */ jsx(PlaylistCard, {
10003
- title: playlist.title || "Untitled Playlist",
10004
- imageUrl,
10005
- href: `playlists/${playlist.id}`,
10006
- itemCount,
10007
- isFavorited: playlist.is_favorited,
10008
- isSelectable: true,
10009
- isSelected: selectedIds.has(playlist.id),
10010
- canEdit,
10011
- onSelectionChange: (selected) => handleToggleSelection(playlist.id, selected),
10012
- onToggleFavorite: onToggleFavorite ? () => handleFavorite(playlist.id) : void 0,
10013
- onEdit: () => handleEdit(playlist.id),
10014
- onDelete: onDeletePlaylist ? () => setPendingDeleteId(playlist.id) : void 0
10015
- }, playlist.id);
10016
- })
10017
- }) : /* @__PURE__ */ jsx("div", {
10018
- className: SHAREABLE_LIST_CLASS,
10019
- children: filteredPlaylists.map((playlist) => {
10020
- const firstItem = playlist.items?.[0];
10021
- const imageUrl = playlist.image_url ?? firstItem?.image_url ?? firstItem?.relateable?.image_url ?? firstItem?.relateable?.compressed_image_url;
10022
- const itemCount = playlist.items_count ?? playlist.items?.length ?? 0;
10023
- const canEdit = !readOnly && playlist.user_id === user?.id;
10024
- const isSelected = selectedIds.has(playlist.id);
10025
- const title = playlist.title || "Untitled Playlist";
10026
- return /* @__PURE__ */ jsx(ShareableListRow, {
10027
- imageUrl,
10028
- title,
10029
- subtitle: /* @__PURE__ */ jsxs(Badge, {
10030
- variant: "secondary",
10031
- className: "px-1.5 py-0 text-[10px] leading-4",
10032
- children: [
10033
- itemCount,
10034
- " ",
10035
- itemCount === 1 ? "item" : "items"
10036
- ]
10037
- }),
10038
- onClick: () => navigate(`playlists/${playlist.id}`),
10039
- leading: /* @__PURE__ */ jsx(Checkbox, {
10040
- checked: isSelected,
10041
- onCheckedChange: (checked) => handleToggleSelection(playlist.id, checked === true),
10042
- "aria-label": `Select ${title}`
10043
- }),
10044
- trailing: /* @__PURE__ */ jsxs(Fragment$1, { children: [onToggleFavorite && /* @__PURE__ */ jsx("button", {
10045
- type: "button",
10046
- onClick: () => handleFavorite(playlist.id),
10047
- "aria-label": playlist.is_favorited ? "Unfavorite" : "Favorite",
10048
- className: "hover:bg-muted-foreground/10 flex h-8 w-8 items-center justify-center rounded-md transition-colors",
10049
- children: /* @__PURE__ */ jsx(Heart, { className: cn("h-4 w-4 transition-colors", playlist.is_favorited ? "fill-destructive text-destructive" : "text-muted-foreground") })
10050
- }), canEdit && /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
10051
- asChild: true,
10052
- children: /* @__PURE__ */ jsx(Button, {
10053
- variant: "ghost",
10054
- size: "sm",
10055
- className: "h-8 w-8 p-0",
10056
- "aria-label": "Playlist actions",
10057
- children: /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4" })
10058
- })
10059
- }), /* @__PURE__ */ jsxs(DropdownMenuContent, {
10060
- align: "end",
10061
- children: [/* @__PURE__ */ jsxs(DropdownMenuItem, {
10062
- onClick: () => handleEdit(playlist.id),
10063
- children: [/* @__PURE__ */ jsx(Pencil, { className: "mr-2 h-4 w-4" }), "Edit"]
10064
- }), onDeletePlaylist && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(DropdownMenuSeparator, {}), /* @__PURE__ */ jsxs(DropdownMenuItem, {
10065
- variant: "destructive",
10066
- onClick: () => setPendingDeleteId(playlist.id),
10067
- children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" }), "Delete"]
10068
- })] })]
10069
- })] })] })
10070
- }, playlist.id);
9947
+ const isEmpty = filteredPlaylists.length === 0 && !isFetchingNextPage && !hasNextPage;
9948
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
9949
+ /* @__PURE__ */ jsx(ScreenHeaderActions, { children: readOnly ? null : /* @__PURE__ */ jsxs(Button, {
9950
+ onClick: () => navigate("playlists/new"),
9951
+ size: "sm",
9952
+ children: [/* @__PURE__ */ jsx(Plus, { className: "mr-1 h-4 w-4" }), "Create Playlist"]
9953
+ }) }),
9954
+ /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
9955
+ className: "text-lg",
9956
+ children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
9957
+ className: "font-semibold",
9958
+ children: "Playlists"
9959
+ }) })
9960
+ }) }) }),
9961
+ /* @__PURE__ */ jsx(ShareableListLayout, {
9962
+ isLoading,
9963
+ filters: filterBar,
9964
+ isEmpty,
9965
+ emptyMessage: getFilteredEmptyMessage({
9966
+ searchTerm,
9967
+ ownerFilter,
9968
+ entityName: "playlists",
9969
+ defaultMessage: "There are no playlists available at the moment."
9970
+ }),
9971
+ footer,
9972
+ sentinelRef: observerTarget,
9973
+ loadingFilterShape: "search-view",
9974
+ children: viewMode === "grid" ? /* @__PURE__ */ jsx("div", {
9975
+ className: GRID_CLASS,
9976
+ children: filteredPlaylists.map((playlist) => {
9977
+ const firstItem = playlist.items?.[0];
9978
+ const imageUrl = playlist.image_url ?? firstItem?.image_url ?? firstItem?.relateable?.image_url ?? firstItem?.relateable?.compressed_image_url;
9979
+ const itemCount = playlist.items_count ?? playlist.items?.length ?? 0;
9980
+ const canEdit = !readOnly && playlist.user_id === user?.id;
9981
+ return /* @__PURE__ */ jsx(PlaylistCard, {
9982
+ title: playlist.title || "Untitled Playlist",
9983
+ imageUrl,
9984
+ href: `playlists/${playlist.id}`,
9985
+ itemCount,
9986
+ isFavorited: playlist.is_favorited,
9987
+ isSelectable: true,
9988
+ isSelected: selectedIds.has(playlist.id),
9989
+ canEdit,
9990
+ onSelectionChange: (selected) => handleToggleSelection(playlist.id, selected),
9991
+ onToggleFavorite: onToggleFavorite ? () => handleFavorite(playlist.id) : void 0,
9992
+ onEdit: () => handleEdit(playlist.id),
9993
+ onDelete: onDeletePlaylist ? () => setPendingDeleteId(playlist.id) : void 0
9994
+ }, playlist.id);
9995
+ })
9996
+ }) : /* @__PURE__ */ jsx("div", {
9997
+ className: SHAREABLE_LIST_CLASS,
9998
+ children: filteredPlaylists.map((playlist) => {
9999
+ const firstItem = playlist.items?.[0];
10000
+ const imageUrl = playlist.image_url ?? firstItem?.image_url ?? firstItem?.relateable?.image_url ?? firstItem?.relateable?.compressed_image_url;
10001
+ const itemCount = playlist.items_count ?? playlist.items?.length ?? 0;
10002
+ const canEdit = !readOnly && playlist.user_id === user?.id;
10003
+ const isSelected = selectedIds.has(playlist.id);
10004
+ const title = playlist.title || "Untitled Playlist";
10005
+ return /* @__PURE__ */ jsx(ShareableListRow, {
10006
+ imageUrl,
10007
+ title,
10008
+ subtitle: /* @__PURE__ */ jsxs(Badge, {
10009
+ variant: "secondary",
10010
+ className: "px-1.5 py-0 text-[10px] leading-4",
10011
+ children: [
10012
+ itemCount,
10013
+ " ",
10014
+ itemCount === 1 ? "item" : "items"
10015
+ ]
10016
+ }),
10017
+ onClick: () => navigate(`playlists/${playlist.id}`),
10018
+ leading: /* @__PURE__ */ jsx(Checkbox, {
10019
+ checked: isSelected,
10020
+ onCheckedChange: (checked) => handleToggleSelection(playlist.id, checked === true),
10021
+ "aria-label": `Select ${title}`
10022
+ }),
10023
+ trailing: /* @__PURE__ */ jsxs(Fragment$1, { children: [onToggleFavorite && /* @__PURE__ */ jsx("button", {
10024
+ type: "button",
10025
+ onClick: () => handleFavorite(playlist.id),
10026
+ "aria-label": playlist.is_favorited ? "Unfavorite" : "Favorite",
10027
+ className: "hover:bg-muted-foreground/10 flex h-8 w-8 items-center justify-center rounded-md transition-colors",
10028
+ children: /* @__PURE__ */ jsx(Heart, { className: cn("h-4 w-4 transition-colors", playlist.is_favorited ? "fill-destructive text-destructive" : "text-muted-foreground") })
10029
+ }), canEdit && /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
10030
+ asChild: true,
10031
+ children: /* @__PURE__ */ jsx(Button, {
10032
+ variant: "ghost",
10033
+ size: "sm",
10034
+ className: "h-8 w-8 p-0",
10035
+ "aria-label": "Playlist actions",
10036
+ children: /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4" })
10037
+ })
10038
+ }), /* @__PURE__ */ jsxs(DropdownMenuContent, {
10039
+ align: "end",
10040
+ children: [/* @__PURE__ */ jsxs(DropdownMenuItem, {
10041
+ onClick: () => handleEdit(playlist.id),
10042
+ children: [/* @__PURE__ */ jsx(Pencil, { className: "mr-2 h-4 w-4" }), "Edit"]
10043
+ }), onDeletePlaylist && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(DropdownMenuSeparator, {}), /* @__PURE__ */ jsxs(DropdownMenuItem, {
10044
+ variant: "destructive",
10045
+ onClick: () => setPendingDeleteId(playlist.id),
10046
+ children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" }), "Delete"]
10047
+ })] })]
10048
+ })] })] })
10049
+ }, playlist.id);
10050
+ })
10071
10051
  })
10072
- })
10073
- }), /* @__PURE__ */ jsx(AlertDialog, {
10074
- open: pendingDeleteId !== null,
10075
- onOpenChange: (open) => {
10076
- if (!open && !isDeleting) setPendingDeleteId(null);
10077
- },
10078
- children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete this playlist?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This removes the playlist from your library. Shared links that point to it will stop working." })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
10079
- disabled: isDeleting,
10080
- children: "Cancel"
10081
- }), /* @__PURE__ */ jsx(AlertDialogAction, {
10082
- onClick: (e) => {
10083
- e.preventDefault();
10084
- confirmDelete();
10052
+ }),
10053
+ /* @__PURE__ */ jsx(AlertDialog, {
10054
+ open: pendingDeleteId !== null,
10055
+ onOpenChange: (open) => {
10056
+ if (!open && !isDeleting) setPendingDeleteId(null);
10085
10057
  },
10086
- disabled: isDeleting,
10087
- className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
10088
- children: isDeleting ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Delete"
10089
- })] })] })
10090
- })] });
10058
+ children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete this playlist?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This removes the playlist from your library. Shared links that point to it will stop working." })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
10059
+ disabled: isDeleting,
10060
+ children: "Cancel"
10061
+ }), /* @__PURE__ */ jsx(AlertDialogAction, {
10062
+ onClick: (e) => {
10063
+ e.preventDefault();
10064
+ confirmDelete();
10065
+ },
10066
+ disabled: isDeleting,
10067
+ className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
10068
+ children: isDeleting ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Delete"
10069
+ })] })] })
10070
+ })
10071
+ ] });
10091
10072
  }
10092
10073
  //#endregion
10093
10074
  //#region ../../shareables/ui/src/constants.ts
@@ -10260,40 +10241,6 @@ function PlaylistDetailScreen({ playlistId, onNavigate }) {
10260
10241
  const playlist = playlistResponse?.playlist;
10261
10242
  const canEdit = !readOnly && playlist?.user_id === user?.id;
10262
10243
  const displayTitle = playlist?.title || "";
10263
- useScreenHeaderActions(useMemo(() => {
10264
- if (!canEdit) return null;
10265
- return /* @__PURE__ */ jsx("div", {
10266
- className: "flex items-center gap-2",
10267
- children: /* @__PURE__ */ jsxs(Button, {
10268
- variant: "outline",
10269
- size: "sm",
10270
- onClick: () => navigate(`playlists/${playlistId}/edit`),
10271
- children: [/* @__PURE__ */ jsx(Pencil, { className: "mr-1 h-3.5 w-3.5" }), "Edit"]
10272
- })
10273
- });
10274
- }, [
10275
- canEdit,
10276
- navigate,
10277
- playlistId
10278
- ]));
10279
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
10280
- className: "text-lg",
10281
- children: [
10282
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
10283
- href: "#",
10284
- onClick: (e) => {
10285
- e.preventDefault();
10286
- navigate("playlists");
10287
- },
10288
- children: "Playlists"
10289
- }) }),
10290
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
10291
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
10292
- className: "block max-w-[60vw] truncate align-bottom font-semibold md:max-w-[60ch]",
10293
- children: displayTitle || "Playlist"
10294
- }) })
10295
- ]
10296
- }) }), [displayTitle, navigate]));
10297
10244
  const taggedProducts = playlist?.items?.filter((item) => item.relateable_type === "Product" || item.relateable_type === "EnrollmentPack").map((item) => item.relateable).filter((p) => !!p) || [];
10298
10245
  const playableItems = playlist?.items?.filter((item) => item.relateable_type === "Medium" || item.relateable_type === "Page") ?? [];
10299
10246
  const selectedPlaylistItem = playableItems[selectedPlaylistItemIndex] ?? playableItems[0];
@@ -10302,49 +10249,78 @@ function PlaylistDetailScreen({ playlistId, onNavigate }) {
10302
10249
  const selectedKind = selectedPlaylistItem?.kind ?? selectedPlaylistItem?.relateable?.kind;
10303
10250
  const displayVideo = selectedKind === "video" ? selectedPlaylistItem?.video_url ?? selectedPlaylistItem?.relateable?.video_url ?? void 0 : void 0;
10304
10251
  const isVideo = selectedKind === "video" && !!displayVideo;
10305
- return /* @__PURE__ */ jsxs(ShareableDetailLayout, {
10306
- isLoading,
10307
- notFound: !playlist,
10308
- notFoundMessage: "Playlist not found or failed to load.",
10309
- title: displayTitle,
10310
- description: displayDescription,
10311
- image: /* @__PURE__ */ jsx("div", {
10312
- className: "relative h-full overflow-hidden rounded-2xl",
10313
- children: /* @__PURE__ */ jsx(SharePageImageDisplay, {
10314
- displayImage,
10252
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
10253
+ /* @__PURE__ */ jsx(ScreenHeaderActions, { children: canEdit ? /* @__PURE__ */ jsx("div", {
10254
+ className: "flex items-center gap-2",
10255
+ children: /* @__PURE__ */ jsxs(Button, {
10256
+ variant: "outline",
10257
+ size: "sm",
10258
+ onClick: () => navigate(`playlists/${playlistId}/edit`),
10259
+ children: [/* @__PURE__ */ jsx(Pencil, { className: "mr-1 h-3.5 w-3.5" }), "Edit"]
10260
+ })
10261
+ }) : null }),
10262
+ /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
10263
+ className: "text-lg",
10264
+ children: [
10265
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
10266
+ href: "#",
10267
+ onClick: (e) => {
10268
+ e.preventDefault();
10269
+ navigate("playlists");
10270
+ },
10271
+ children: "Playlists"
10272
+ }) }),
10273
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
10274
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
10275
+ className: "block max-w-[60vw] truncate align-bottom font-semibold md:max-w-[60ch]",
10276
+ children: displayTitle || "Playlist"
10277
+ }) })
10278
+ ]
10279
+ }) }) }),
10280
+ /* @__PURE__ */ jsxs(ShareableDetailLayout, {
10281
+ isLoading,
10282
+ notFound: !playlist,
10283
+ notFoundMessage: "Playlist not found or failed to load.",
10284
+ title: displayTitle,
10285
+ description: displayDescription,
10286
+ image: /* @__PURE__ */ jsx("div", {
10287
+ className: "relative h-full overflow-hidden rounded-2xl",
10288
+ children: /* @__PURE__ */ jsx(SharePageImageDisplay, {
10289
+ displayImage,
10290
+ displayTitle,
10291
+ displayVideo,
10292
+ isVideo,
10293
+ badgeLabel: "Playlist"
10294
+ })
10295
+ }),
10296
+ actions: /* @__PURE__ */ jsx(AssetActions, {
10297
+ downloadUrl: null,
10315
10298
  displayTitle,
10316
- displayVideo,
10299
+ shareLink: shareLinkError ? null : shareLink || null,
10300
+ shareLinkLoading,
10317
10301
  isVideo,
10318
- badgeLabel: "Playlist"
10319
- })
10320
- }),
10321
- actions: /* @__PURE__ */ jsx(AssetActions, {
10322
- downloadUrl: null,
10323
- displayTitle,
10324
- shareLink: shareLinkError ? null : shareLink || null,
10325
- shareLinkLoading,
10326
- isVideo,
10327
- relateableId: Number(playlistId),
10328
- relateableType: "Library"
10329
- }),
10330
- children: [/* @__PURE__ */ jsx(Separator, { className: "border-foreground my-4" }), /* @__PURE__ */ jsxs("div", {
10331
- className: "bg-background rounded-lg",
10332
- children: [/* @__PURE__ */ jsx(TaggedProductsList, {
10333
- products: taggedProducts,
10334
- onProductClick: (productId) => onNavigate?.("product", String(productId))
10335
- }), /* @__PURE__ */ jsx(PlaylistItemsList, {
10336
- items: playableItems,
10337
- onSelectItem: setSelectedPlaylistItemIndex,
10338
- selectedItemIndex: selectedPlaylistItemIndex,
10339
- onNavigateToItem: (itemId, relateableType) => {
10340
- if (!NAVIGABLE_RELATEABLE_TYPES.has(relateableType ?? "")) return;
10341
- if (relateableType === "Product") onNavigate?.("product", String(itemId));
10342
- else if (relateableType === "Page") onNavigate?.("page", String(itemId));
10343
- else if (relateableType === "Medium") onNavigate?.("media", String(itemId));
10344
- }
10302
+ relateableId: Number(playlistId),
10303
+ relateableType: "Library"
10304
+ }),
10305
+ children: [/* @__PURE__ */ jsx(Separator, { className: "border-foreground my-4" }), /* @__PURE__ */ jsxs("div", {
10306
+ className: "bg-background rounded-lg",
10307
+ children: [/* @__PURE__ */ jsx(TaggedProductsList, {
10308
+ products: taggedProducts,
10309
+ onProductClick: (productId) => onNavigate?.("product", String(productId))
10310
+ }), /* @__PURE__ */ jsx(PlaylistItemsList, {
10311
+ items: playableItems,
10312
+ onSelectItem: setSelectedPlaylistItemIndex,
10313
+ selectedItemIndex: selectedPlaylistItemIndex,
10314
+ onNavigateToItem: (itemId, relateableType) => {
10315
+ if (!NAVIGABLE_RELATEABLE_TYPES.has(relateableType ?? "")) return;
10316
+ if (relateableType === "Product") onNavigate?.("product", String(itemId));
10317
+ else if (relateableType === "Page") onNavigate?.("page", String(itemId));
10318
+ else if (relateableType === "Medium") onNavigate?.("media", String(itemId));
10319
+ }
10320
+ })]
10345
10321
  })]
10346
- })]
10347
- });
10322
+ })
10323
+ ] });
10348
10324
  }
10349
10325
  //#endregion
10350
10326
  //#region ../../shareables/ui/src/components/playlists/form/PlaylistFormProvider.tsx
@@ -10540,78 +10516,72 @@ function PlaylistFormHeader({ playlistId, isEditMode, onSubmit, isSaving }) {
10540
10516
  setIsDeleteOpen(false);
10541
10517
  }
10542
10518
  };
10543
- useScreenHeaderActions(useMemo(() => /* @__PURE__ */ jsxs("div", {
10544
- className: "flex items-center gap-2",
10545
- children: [playlistId && onDeletePlaylist && /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
10546
- asChild: true,
10547
- children: /* @__PURE__ */ jsx(Button, {
10548
- variant: "outline",
10519
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
10520
+ /* @__PURE__ */ jsx(ScreenHeaderActions, { children: /* @__PURE__ */ jsxs("div", {
10521
+ className: "flex items-center gap-2",
10522
+ children: [playlistId && onDeletePlaylist && /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
10523
+ asChild: true,
10524
+ children: /* @__PURE__ */ jsx(Button, {
10525
+ variant: "outline",
10526
+ size: "sm",
10527
+ className: "h-8 w-8 p-0",
10528
+ "aria-label": "Playlist actions",
10529
+ disabled: isMutating,
10530
+ children: /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4" })
10531
+ })
10532
+ }), /* @__PURE__ */ jsx(DropdownMenuContent, {
10533
+ align: "end",
10534
+ children: /* @__PURE__ */ jsxs(DropdownMenuItem, {
10535
+ onClick: () => setIsDeleteOpen(true),
10536
+ className: "text-destructive focus:text-destructive",
10537
+ children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" }), "Delete"]
10538
+ })
10539
+ })] }), /* @__PURE__ */ jsx(Button, {
10540
+ onClick: () => {
10541
+ onSubmit().catch(() => {});
10542
+ },
10543
+ disabled: isMutating || !isDirty || !isFormValid,
10549
10544
  size: "sm",
10550
- className: "h-8 w-8 p-0",
10551
- "aria-label": "Playlist actions",
10552
- disabled: isMutating,
10553
- children: /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4" })
10554
- })
10555
- }), /* @__PURE__ */ jsx(DropdownMenuContent, {
10556
- align: "end",
10557
- children: /* @__PURE__ */ jsxs(DropdownMenuItem, {
10558
- onClick: () => setIsDeleteOpen(true),
10559
- className: "text-destructive focus:text-destructive",
10560
- children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" }), "Delete"]
10561
- })
10562
- })] }), /* @__PURE__ */ jsx(Button, {
10563
- onClick: () => {
10564
- onSubmit().catch(() => {});
10545
+ children: isSaving ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Save"
10546
+ })]
10547
+ }) }),
10548
+ /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
10549
+ className: "text-lg",
10550
+ children: [
10551
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
10552
+ href: "#",
10553
+ onClick: (e) => {
10554
+ e.preventDefault();
10555
+ navigate("playlists");
10556
+ },
10557
+ children: "Playlists"
10558
+ }) }),
10559
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
10560
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
10561
+ className: "font-semibold",
10562
+ children: isEditMode ? "Edit Playlist" : "New Playlist"
10563
+ }) })
10564
+ ]
10565
+ }) }) }),
10566
+ /* @__PURE__ */ jsx(AlertDialog, {
10567
+ open: isDeleteOpen,
10568
+ onOpenChange: (open) => {
10569
+ if (!open && !isDeleting) setIsDeleteOpen(false);
10565
10570
  },
10566
- disabled: isMutating || !isDirty || !isFormValid,
10567
- size: "sm",
10568
- children: isSaving ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Save"
10569
- })]
10570
- }), [
10571
- playlistId,
10572
- onDeletePlaylist,
10573
- isMutating,
10574
- isDirty,
10575
- isFormValid,
10576
- isSaving,
10577
- onSubmit
10578
- ]));
10579
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
10580
- className: "text-lg",
10581
- children: [
10582
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
10583
- href: "#",
10571
+ children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete this playlist?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This removes the playlist from your library. Shared links that point to it will stop working." })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
10572
+ disabled: isDeleting,
10573
+ children: "Cancel"
10574
+ }), /* @__PURE__ */ jsx(AlertDialogAction, {
10584
10575
  onClick: (e) => {
10585
10576
  e.preventDefault();
10586
- navigate("playlists");
10577
+ handleDelete();
10587
10578
  },
10588
- children: "Playlists"
10589
- }) }),
10590
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
10591
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
10592
- className: "font-semibold",
10593
- children: isEditMode ? "Edit Playlist" : "New Playlist"
10594
- }) })
10595
- ]
10596
- }) }), [isEditMode, navigate]));
10597
- return /* @__PURE__ */ jsx(AlertDialog, {
10598
- open: isDeleteOpen,
10599
- onOpenChange: (open) => {
10600
- if (!open && !isDeleting) setIsDeleteOpen(false);
10601
- },
10602
- children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Delete this playlist?" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This removes the playlist from your library. Shared links that point to it will stop working." })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
10603
- disabled: isDeleting,
10604
- children: "Cancel"
10605
- }), /* @__PURE__ */ jsx(AlertDialogAction, {
10606
- onClick: (e) => {
10607
- e.preventDefault();
10608
- handleDelete();
10609
- },
10610
- disabled: isDeleting,
10611
- className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
10612
- children: isDeleting ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Delete"
10613
- })] })] })
10614
- });
10579
+ disabled: isDeleting,
10580
+ className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
10581
+ children: isDeleting ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Delete"
10582
+ })] })] })
10583
+ })
10584
+ ] });
10615
10585
  }
10616
10586
  //#endregion
10617
10587
  //#region ../../shareables/ui/src/components/playlists/form/PlaylistFormDetails.tsx
@@ -11295,42 +11265,6 @@ function PlaylistFormContent({ playlistId, playlist, isEditMode, itemsToUse, onB
11295
11265
  const { form, updateField, validateForm } = usePlaylistForm();
11296
11266
  const playlistTitle = form.title || "";
11297
11267
  const slugValue = form.slug ?? "";
11298
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
11299
- className: "text-lg",
11300
- children: [/* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
11301
- href: "#",
11302
- onClick: (e) => {
11303
- e.preventDefault();
11304
- (onBack ?? (() => navigate("playlists")))();
11305
- },
11306
- children: "Playlists"
11307
- }) }), isEditMode ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
11308
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
11309
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
11310
- href: "#",
11311
- onClick: (e) => {
11312
- e.preventDefault();
11313
- navigate(`playlists/${playlistId}`);
11314
- },
11315
- className: "block max-w-[40vw] truncate align-bottom md:max-w-[60ch]",
11316
- children: playlistTitle || "Playlist"
11317
- }) }),
11318
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
11319
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
11320
- className: "font-semibold",
11321
- children: "Edit"
11322
- }) })
11323
- ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(BreadcrumbSeparator, {}), /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
11324
- className: "font-semibold",
11325
- children: "New Playlist"
11326
- }) })] })]
11327
- }) }), [
11328
- isEditMode,
11329
- playlistTitle,
11330
- onBack,
11331
- navigate,
11332
- playlistId
11333
- ]));
11334
11268
  useEffect(() => {
11335
11269
  const isCustomSlug = form.custom_slug || playlist?.custom_slug || false;
11336
11270
  if (playlistTitle && !isCustomSlug) {
@@ -11457,6 +11391,36 @@ function PlaylistFormContent({ playlistId, playlist, isEditMode, itemsToUse, onB
11457
11391
  await onSaveForm();
11458
11392
  };
11459
11393
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
11394
+ /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
11395
+ className: "text-lg",
11396
+ children: [/* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
11397
+ href: "#",
11398
+ onClick: (e) => {
11399
+ e.preventDefault();
11400
+ (onBack ?? (() => navigate("playlists")))();
11401
+ },
11402
+ children: "Playlists"
11403
+ }) }), isEditMode ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
11404
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
11405
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
11406
+ href: "#",
11407
+ onClick: (e) => {
11408
+ e.preventDefault();
11409
+ navigate(`playlists/${playlistId}`);
11410
+ },
11411
+ className: "block max-w-[40vw] truncate align-bottom md:max-w-[60ch]",
11412
+ children: playlistTitle || "Playlist"
11413
+ }) }),
11414
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
11415
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
11416
+ className: "font-semibold",
11417
+ children: "Edit"
11418
+ }) })
11419
+ ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(BreadcrumbSeparator, {}), /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
11420
+ className: "font-semibold",
11421
+ children: "New Playlist"
11422
+ }) })] })]
11423
+ }) }) }),
11460
11424
  renderHeaderSlot?.({
11461
11425
  onSubmit: handleSubmit,
11462
11426
  isSaving,
@@ -11532,13 +11496,6 @@ const DEFAULT_IMAGE$1 = "https://assets.fluid.app/fluid-admin/images/we-commerce
11532
11496
  function FilesListingScreen({ onNavigate }) {
11533
11497
  const api = useShareablesApi();
11534
11498
  const renderImage = useRenderImage();
11535
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
11536
- className: "text-lg",
11537
- children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
11538
- className: "font-semibold",
11539
- children: "Files"
11540
- }) })
11541
- }) }), []));
11542
11499
  const [searchTerm, setSearchTerm] = useState("");
11543
11500
  const [debouncedSearch, setDebouncedSearch] = useState("");
11544
11501
  useEffect(() => {
@@ -11576,7 +11533,13 @@ function FilesListingScreen({ onNavigate }) {
11576
11533
  className: "bg-destructive/10 text-destructive rounded-lg px-3 py-2",
11577
11534
  children: "Failed to load files. Please try again."
11578
11535
  })] });
11579
- return /* @__PURE__ */ jsx(ShareableListLayout, {
11536
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
11537
+ className: "text-lg",
11538
+ children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
11539
+ className: "font-semibold",
11540
+ children: "Files"
11541
+ }) })
11542
+ }) }) }), /* @__PURE__ */ jsx(ShareableListLayout, {
11580
11543
  isLoading,
11581
11544
  isEmpty: !error && files.length === 0 && !isFetchingNextPage && !hasNextPage,
11582
11545
  emptyMessage: debouncedSearch ? `No files match "${debouncedSearch}". Try a different search term.` : "No files available.",
@@ -11644,7 +11607,7 @@ function FilesListingScreen({ onNavigate }) {
11644
11607
  }, file.id);
11645
11608
  })
11646
11609
  })
11647
- });
11610
+ })] });
11648
11611
  }
11649
11612
  //#endregion
11650
11613
  //#region ../../shareables/ui/src/components/screens/PagesListingScreen.tsx
@@ -11656,13 +11619,6 @@ function toApiSort(value) {
11656
11619
  function PagesListingScreen({ onNavigate }) {
11657
11620
  const api = useShareablesApi();
11658
11621
  const renderImage = useRenderImage();
11659
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
11660
- className: "text-lg",
11661
- children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
11662
- className: "font-semibold",
11663
- children: "Pages"
11664
- }) })
11665
- }) }), []));
11666
11622
  const [searchTerm, setSearchTerm] = useState("");
11667
11623
  const [debouncedSearch, setDebouncedSearch] = useState("");
11668
11624
  const [sortValue, setSortValue] = useState("newest");
@@ -11706,7 +11662,13 @@ function PagesListingScreen({ onNavigate }) {
11706
11662
  hasNextPage,
11707
11663
  isFetchingNextPage
11708
11664
  ]);
11709
- return /* @__PURE__ */ jsx(ShareableListLayout, {
11665
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
11666
+ className: "text-lg",
11667
+ children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
11668
+ className: "font-semibold",
11669
+ children: "Pages"
11670
+ }) })
11671
+ }) }) }), /* @__PURE__ */ jsx(ShareableListLayout, {
11710
11672
  isLoading,
11711
11673
  error,
11712
11674
  errorMessage: "Failed to load pages. Please try again.",
@@ -11785,7 +11747,7 @@ function PagesListingScreen({ onNavigate }) {
11785
11747
  }, page.id);
11786
11748
  })
11787
11749
  })
11788
- });
11750
+ })] });
11789
11751
  }
11790
11752
  //#endregion
11791
11753
  //#region ../../shareables/ui/src/components/screens/PageDetailScreen.tsx
@@ -11804,7 +11766,7 @@ function PageDetailScreen({ pageId, onBack }) {
11804
11766
  id: page?.id,
11805
11767
  share_link: pageResponse?.share_link ?? void 0
11806
11768
  }, "Page");
11807
- useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
11769
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
11808
11770
  className: "text-lg",
11809
11771
  children: [
11810
11772
  /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
@@ -11821,12 +11783,7 @@ function PageDetailScreen({ pageId, onBack }) {
11821
11783
  children: displayTitle || "Page"
11822
11784
  }) })
11823
11785
  ]
11824
- }) }), [
11825
- displayTitle,
11826
- onBack,
11827
- navigate
11828
- ]));
11829
- return /* @__PURE__ */ jsx(ShareableDetailLayout, {
11786
+ }) }) }), /* @__PURE__ */ jsx(ShareableDetailLayout, {
11830
11787
  isLoading,
11831
11788
  notFound: !page && !isLoading,
11832
11789
  notFoundMessage: "Page not found or failed to load.",
@@ -11857,7 +11814,7 @@ function PageDetailScreen({ pageId, onBack }) {
11857
11814
  relateableId: page.id,
11858
11815
  relateableType: "Page"
11859
11816
  })
11860
- });
11817
+ })] });
11861
11818
  }
11862
11819
  //#endregion
11863
11820
  //#region ../../shareables/ui/src/components/ShareablesApp.tsx
@@ -13481,4 +13438,4 @@ const shareablesScreenPropertySchema = {
13481
13438
  //#endregion
13482
13439
  export { shareablesScreenPropertySchema as n, ShareablesScreen as t };
13483
13440
 
13484
- //# sourceMappingURL=ShareablesScreen-C5ZRdX-y.mjs.map
13441
+ //# sourceMappingURL=ShareablesScreen-uMQYLpTv.mjs.map