@fluid-app/portal-sdk 0.1.56 → 0.1.57

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 (111) hide show
  1. package/dist/{AppDownloadScreen-8nMV5KuQ.cjs → AppDownloadScreen-B3e3QH3E.cjs} +1 -1
  2. package/dist/{AppDownloadScreen-DL0cL6Hp.mjs → AppDownloadScreen-COuwjUfa.mjs} +1 -1
  3. package/dist/{AppDownloadScreen-DL0cL6Hp.mjs.map → AppDownloadScreen-COuwjUfa.mjs.map} +1 -1
  4. package/dist/{AppDownloadScreen-D9xFGiXb.mjs → AppDownloadScreen-DMTYrxWg.mjs} +1 -1
  5. package/dist/{AppDownloadScreen-BuxFOvdk.cjs → AppDownloadScreen-yDs-QtRS.cjs} +1 -1
  6. package/dist/{AppDownloadScreen-BuxFOvdk.cjs.map → AppDownloadScreen-yDs-QtRS.cjs.map} +1 -1
  7. package/dist/{ContactsScreen-uBuFHvAZ.mjs → ContactsScreen-1q6YYzXK.mjs} +190 -94
  8. package/dist/ContactsScreen-1q6YYzXK.mjs.map +1 -0
  9. package/dist/{ContactsScreen-DrfjJQRJ.cjs → ContactsScreen-BocpRIYk.cjs} +5 -3
  10. package/dist/{ContactsScreen-CsxYVQl_.cjs → ContactsScreen-EaQc1fQf.cjs} +190 -94
  11. package/dist/ContactsScreen-EaQc1fQf.cjs.map +1 -0
  12. package/dist/{ContactsScreen-BisspUdZ.mjs → ContactsScreen-U_UzEe8A.mjs} +5 -3
  13. package/dist/{MySiteScreen-BXotJdL4.cjs → MySiteScreen-BQDG1MIf.cjs} +3 -2
  14. package/dist/{MySiteScreen-DUTxskBE.mjs → MySiteScreen-BWE6kZNh.mjs} +24 -6
  15. package/dist/{MySiteScreen-DUTxskBE.mjs.map → MySiteScreen-BWE6kZNh.mjs.map} +1 -1
  16. package/dist/{MySiteScreen-C2M1r6n2.mjs → MySiteScreen-CMbbIem9.mjs} +3 -2
  17. package/dist/{MySiteScreen-DYtd8N1P.cjs → MySiteScreen-Dq34cH33.cjs} +23 -5
  18. package/dist/MySiteScreen-Dq34cH33.cjs.map +1 -0
  19. package/dist/{OrdersScreen-Cs6cia9e.mjs → OrdersScreen-Bez4E8IX.mjs} +3 -2
  20. package/dist/{OrdersScreen-2wR8W6ga.cjs → OrdersScreen-DFIm1noJ.cjs} +3 -2
  21. package/dist/{OrdersScreen-aJSG8C3f.mjs → OrdersScreen-DkMmE8c3.mjs} +79 -30
  22. package/dist/OrdersScreen-DkMmE8c3.mjs.map +1 -0
  23. package/dist/{OrdersScreen-BR7xTUEo.cjs → OrdersScreen-DvtDjt3L.cjs} +80 -31
  24. package/dist/OrdersScreen-DvtDjt3L.cjs.map +1 -0
  25. package/dist/{ProductsScreen-BiRq2hq5.cjs → ProductsScreen-BFsfS9XW.cjs} +5 -4
  26. package/dist/{ProductsScreen-C8rWxWSG.mjs → ProductsScreen-CNnlXg_I.mjs} +2 -2
  27. package/dist/{ProductsScreen-C8rWxWSG.mjs.map → ProductsScreen-CNnlXg_I.mjs.map} +1 -1
  28. package/dist/{ProductsScreen-C01TYRnt.mjs → ProductsScreen-CnywvrZt.mjs} +5 -4
  29. package/dist/{ProductsScreen-C2-Gmgf1.cjs → ProductsScreen-DO54qQyx.cjs} +2 -2
  30. package/dist/{ProductsScreen-C2-Gmgf1.cjs.map → ProductsScreen-DO54qQyx.cjs.map} +1 -1
  31. package/dist/{ProfileScreen-DC2pOZLZ.mjs → ProfileScreen-8nnWzPcP.mjs} +2 -1
  32. package/dist/{ProfileScreen-BHi41b6m.cjs → ProfileScreen-B6SwwR14.cjs} +2 -1
  33. package/dist/{ProfileScreen-DavG-OrZ.mjs → ProfileScreen-D4x5J95V.mjs} +10 -2
  34. package/dist/{ProfileScreen-DavG-OrZ.mjs.map → ProfileScreen-D4x5J95V.mjs.map} +1 -1
  35. package/dist/{ProfileScreen-BUQUWmWq.cjs → ProfileScreen-D5_7MMej.cjs} +9 -1
  36. package/dist/{ProfileScreen-BUQUWmWq.cjs.map → ProfileScreen-D5_7MMej.cjs.map} +1 -1
  37. package/dist/ScreenHeaderContext-CrdfLGKk.mjs +85 -0
  38. package/dist/ScreenHeaderContext-CrdfLGKk.mjs.map +1 -0
  39. package/dist/ScreenHeaderContext-eyKPyDoQ.cjs +109 -0
  40. package/dist/ScreenHeaderContext-eyKPyDoQ.cjs.map +1 -0
  41. package/dist/{ShareablesScreen-C_3E2Pgn.mjs → ShareablesScreen-2smGe_qj.mjs} +5 -4
  42. package/dist/{ShareablesScreen-BKPaCLC0.cjs → ShareablesScreen-CH9044d8.cjs} +3 -3
  43. package/dist/{ShareablesScreen-BKPaCLC0.cjs.map → ShareablesScreen-CH9044d8.cjs.map} +1 -1
  44. package/dist/{ShareablesScreen-BWrujM32.mjs → ShareablesScreen-DfGkgR72.mjs} +3 -3
  45. package/dist/{ShareablesScreen-BWrujM32.mjs.map → ShareablesScreen-DfGkgR72.mjs.map} +1 -1
  46. package/dist/{ShareablesScreen-BhcfHM0D.cjs → ShareablesScreen-vrbI04Hy.cjs} +5 -4
  47. package/dist/{ShopScreen-DwS8lZAC.cjs → ShopScreen-CHvoeAxg.cjs} +2 -1
  48. package/dist/{ShopScreen-DrRNRm1t.mjs → ShopScreen-CJY1sx1J.mjs} +2 -1
  49. package/dist/{ShopScreen-BvK9eQIi.cjs → ShopScreen-CrbD5rZR.cjs} +10 -2
  50. package/dist/{ShopScreen-BvK9eQIi.cjs.map → ShopScreen-CrbD5rZR.cjs.map} +1 -1
  51. package/dist/{ShopScreen-CG9l5JrT.mjs → ShopScreen-DwtVHSml.mjs} +11 -3
  52. package/dist/{ShopScreen-CG9l5JrT.mjs.map → ShopScreen-DwtVHSml.mjs.map} +1 -1
  53. package/dist/{SubscriptionsScreen-DV1yVAAc.mjs → SubscriptionsScreen-5NaNwpQ1.mjs} +108 -60
  54. package/dist/SubscriptionsScreen-5NaNwpQ1.mjs.map +1 -0
  55. package/dist/{SubscriptionsScreen-BB_c_4Q-.cjs → SubscriptionsScreen-BMVXP9cv.cjs} +4 -2
  56. package/dist/{SubscriptionsScreen-C4BJWeWK.mjs → SubscriptionsScreen-BmtUMKkL.mjs} +4 -2
  57. package/dist/{SubscriptionsScreen-DPOQbKs6.cjs → SubscriptionsScreen-vcSqCDso.cjs} +111 -63
  58. package/dist/SubscriptionsScreen-vcSqCDso.cjs.map +1 -0
  59. package/dist/{UpgradeScreen-D0WA4npm.cjs → UpgradeScreen-BbP-0Pcg.cjs} +1 -1
  60. package/dist/{UpgradeScreen-D0WA4npm.cjs.map → UpgradeScreen-BbP-0Pcg.cjs.map} +1 -1
  61. package/dist/{UpgradeScreen-N5cE1bG7.mjs → UpgradeScreen-D7LfdVSJ.mjs} +1 -1
  62. package/dist/{UpgradeScreen-N5cE1bG7.mjs.map → UpgradeScreen-D7LfdVSJ.mjs.map} +1 -1
  63. package/dist/{UpgradeScreen-C_rLnLD1.cjs → UpgradeScreen-DJKNVL-O.cjs} +1 -1
  64. package/dist/{dist-CayuD99K.mjs → dist-Cl4FsM3V.mjs} +1 -1
  65. package/dist/{dist-CayuD99K.mjs.map → dist-Cl4FsM3V.mjs.map} +1 -1
  66. package/dist/{dist-CSYoMydt.cjs → dist-Cs6PV1Tf.cjs} +1 -1
  67. package/dist/{dist-CSYoMydt.cjs.map → dist-Cs6PV1Tf.cjs.map} +1 -1
  68. package/dist/{dist-DxvUzsnh.cjs → dist-oTn1xy1Z.cjs} +1 -1
  69. package/dist/{dist-DxvUzsnh.cjs.map → dist-oTn1xy1Z.cjs.map} +1 -1
  70. package/dist/index.cjs +38 -36
  71. package/dist/index.cjs.map +1 -1
  72. package/dist/index.d.cts.map +1 -1
  73. package/dist/index.d.mts.map +1 -1
  74. package/dist/index.mjs +36 -34
  75. package/dist/index.mjs.map +1 -1
  76. package/dist/{src-BZnlJmdg.mjs → order-detail-DkMYJvzl.mjs} +1 -1
  77. package/dist/order-detail-DkMYJvzl.mjs.map +1 -0
  78. package/dist/{src-DIkOTlgf.cjs → order-detail-JVq0-ps1.cjs} +1 -1
  79. package/dist/order-detail-JVq0-ps1.cjs.map +1 -0
  80. package/dist/{products-B3q5DFx1.cjs → products-BtHCYNv6.cjs} +1 -1
  81. package/dist/{products-B3q5DFx1.cjs.map → products-BtHCYNv6.cjs.map} +1 -1
  82. package/dist/{products-Dkwd_Bh0.mjs → products-DCO1hF_Q.mjs} +1 -1
  83. package/dist/{products-Dkwd_Bh0.mjs.map → products-DCO1hF_Q.mjs.map} +1 -1
  84. package/dist/{sortable.esm-DFTEWOHN.mjs → sortable.esm-DreCqRxJ.mjs} +1 -1
  85. package/dist/{sortable.esm-DFTEWOHN.mjs.map → sortable.esm-DreCqRxJ.mjs.map} +1 -1
  86. package/dist/{src-B7MRMtgx.cjs → src-BYyxE-aF.cjs} +1 -1
  87. package/dist/{src-B7MRMtgx.cjs.map → src-BYyxE-aF.cjs.map} +1 -1
  88. package/dist/src-BakNjVTk.mjs +1 -0
  89. package/dist/{src-CEouYGbQ.mjs → src-CzK-t4_m.mjs} +192 -245
  90. package/dist/src-CzK-t4_m.mjs.map +1 -0
  91. package/dist/{src-DdlLVUFj.cjs → src-D1poJLOQ.cjs} +197 -262
  92. package/dist/src-D1poJLOQ.cjs.map +1 -0
  93. package/dist/src-DL_WTpu5.cjs +1 -0
  94. package/dist/{src-MTAap-Xx.mjs → src-sa7B0kBg.mjs} +1 -1
  95. package/dist/{src-MTAap-Xx.mjs.map → src-sa7B0kBg.mjs.map} +1 -1
  96. package/dist/{use-customer-account-D0zro9w6.cjs → use-customer-account-BRdjIAmX.cjs} +1 -1
  97. package/dist/{use-customer-account-D0zro9w6.cjs.map → use-customer-account-BRdjIAmX.cjs.map} +1 -1
  98. package/dist/{use-customer-account-CT3yrTXm.mjs → use-customer-account-CgmmbLJd.mjs} +1 -1
  99. package/dist/{use-customer-account-CT3yrTXm.mjs.map → use-customer-account-CgmmbLJd.mjs.map} +1 -1
  100. package/package.json +11 -11
  101. package/dist/ContactsScreen-CsxYVQl_.cjs.map +0 -1
  102. package/dist/ContactsScreen-uBuFHvAZ.mjs.map +0 -1
  103. package/dist/MySiteScreen-DYtd8N1P.cjs.map +0 -1
  104. package/dist/OrdersScreen-BR7xTUEo.cjs.map +0 -1
  105. package/dist/OrdersScreen-aJSG8C3f.mjs.map +0 -1
  106. package/dist/SubscriptionsScreen-DPOQbKs6.cjs.map +0 -1
  107. package/dist/SubscriptionsScreen-DV1yVAAc.mjs.map +0 -1
  108. package/dist/src-BZnlJmdg.mjs.map +0 -1
  109. package/dist/src-CEouYGbQ.mjs.map +0 -1
  110. package/dist/src-DIkOTlgf.cjs.map +0 -1
  111. package/dist/src-DdlLVUFj.cjs.map +0 -1
@@ -1,10 +1,11 @@
1
1
  import { $ as DropdownMenuSubTrigger, A as SelectContent, B as FormControl, Ct as CardContent, Dt as Checkbox, G as Label, H as FormItem, I as Input, J as DropdownMenuItem, Jt as BreadcrumbLink, K as DropdownMenu, Kt as Breadcrumb, M as SelectTrigger, N as SelectValue, O as Separator, Q as DropdownMenuSubContent, Qt as Badge, U as FormLabel, V as FormField, W as FormMessage, X as DropdownMenuSeparator, Xt as BreadcrumbPage, Yt as BreadcrumbList, Z as DropdownMenuSub, Zt as BreadcrumbSeparator, at as DialogFooter, b as Slider, ct as DialogPortal, dn as Button, dt as PopoverContent, et as DropdownMenuTrigger, fn as Content, ft as PopoverTrigger, g as Switch, i as TooltipTrigger, it as DialogDescription, j as SelectItem, k as Select, lt as DialogTitle, n as TooltipContent, ot as DialogHeader, q as DropdownMenuContent, qt as BreadcrumbItem, r as TooltipProvider, rt as DialogContent, st as DialogOverlay, t as Tooltip, tt as Dialog, ut as Popover, v as Spinner, vn as useZodForm, x as Skeleton, xt as Card, yn as cn, z as Form } from "./src-Bh-9OV8i.mjs";
2
+ import { n as useScreenHeaderActions, r as useScreenHeaderBreadcrumbs } from "./ScreenHeaderContext-CrdfLGKk.mjs";
2
3
  import { a as useEditor, o as Placeholder, r as EditorContent, t as StarterKit } from "./dist-CMGXkSgZ.mjs";
3
4
  import { t as useDropzone } from "./es-CrIkZTQ3.mjs";
4
- import { n as TextAlign, t as Underline } from "./dist-CayuD99K.mjs";
5
- import { a as createMedia, c as addItemToPlaylist, d as getPlaylists, f as removeItemsFromPlaylist, i as getFileResources, l as createPlaylist, n as createShareLink, o as getMedia, p as updatePlaylist, r as getProductMedia, s as getMediaById, u as getPlaylistById } from "./src-MTAap-Xx.mjs";
6
- import { n as listProducts, t as getProduct } from "./products-Dkwd_Bh0.mjs";
7
- import { a as verticalListSortingStrategy, c as PointerSensor, d as useSensors, f as CSS, i as useSortable, l as closestCenter, n as arrayMove, o as DndContext, r as sortableKeyboardCoordinates, s as KeyboardSensor, t as SortableContext, u as useSensor } from "./sortable.esm-DFTEWOHN.mjs";
5
+ import { n as TextAlign, t as Underline } from "./dist-Cl4FsM3V.mjs";
6
+ import { a as createMedia, c as addItemToPlaylist, d as getPlaylists, f as removeItemsFromPlaylist, i as getFileResources, l as createPlaylist, n as createShareLink, o as getMedia, p as updatePlaylist, r as getProductMedia, s as getMediaById, u as getPlaylistById } from "./src-sa7B0kBg.mjs";
7
+ import { n as listProducts, t as getProduct } from "./products-DCO1hF_Q.mjs";
8
+ import { a as verticalListSortingStrategy, c as PointerSensor, d as useSensors, f as CSS, i as useSortable, l as closestCenter, n as arrayMove, o as DndContext, r as sortableKeyboardCoordinates, s as KeyboardSensor, t as SortableContext, u as useSensor } from "./sortable.esm-DreCqRxJ.mjs";
8
9
  import React, { PureComponent, createContext, createRef, forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
9
10
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
10
11
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -12,86 +13,6 @@ import * as z$1 from "zod";
12
13
  import { z } from "zod";
13
14
  import { AlertTriangleIcon, AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowDownZA, ArrowRightIcon, ArrowUpAZ, ArrowUpDown, ArrowUpDownIcon, ArrowUpIcon, ArrowUpRight, CheckIcon, ChevronDownIcon, CirclePlay, CloudIcon, Copy, CropIcon, Download, DownloadIcon, EllipsisVerticalIcon, FileIcon, FileImage, FileText, FolderIcon, FolderPlusIcon, GripVertical, Heart, Image, ImageIcon, ImagesIcon, LaptopIcon, LayersIcon, LayoutGrid, LayoutGridIcon, LinkIcon, List, ListIcon, ListMusic, ListOrdered, LoaderIcon, Maximize, Menu, MinusIcon, MoreHorizontal, MoreVertical, MoveHorizontalIcon, Package, Pencil, Play, Plus, PlusIcon, RotateCwIcon, Search, SearchIcon, ShoppingBag, SlidersHorizontalIcon, Trash2, Trash2Icon, TypeIcon, Upload, UserIcon, Video, VideoIcon, X, XIcon } from "lucide-react";
14
15
  import { createPortal } from "react-dom";
15
- //#region ../react/src/shell/ScreenHeaderContext.tsx
16
- /**
17
- * Split into separate read/write contexts so that components calling
18
- * useScreenHeaderActions (writers) don't re-render when the actions
19
- * state changes — only the ScreenHeader (reader) re-renders.
20
- */
21
- const ScreenHeaderWriteContext = createContext(null);
22
- const ScreenHeaderReadContext = createContext(null);
23
- const ScreenHeaderBreadcrumbsWriteContext = createContext(null);
24
- const ScreenHeaderBreadcrumbsReadContext = createContext(null);
25
- function ScreenHeaderProvider({ children }) {
26
- const [actions, setActions] = useState(null);
27
- const [breadcrumbs, setBreadcrumbs] = useState(null);
28
- return /* @__PURE__ */ jsx(ScreenHeaderWriteContext.Provider, {
29
- value: setActions,
30
- children: /* @__PURE__ */ jsx(ScreenHeaderReadContext.Provider, {
31
- value: actions,
32
- children: /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbsWriteContext.Provider, {
33
- value: setBreadcrumbs,
34
- children: /* @__PURE__ */ jsx(ScreenHeaderBreadcrumbsReadContext.Provider, {
35
- value: breadcrumbs,
36
- children
37
- })
38
- })
39
- })
40
- });
41
- }
42
- /**
43
- * Sets actions to display in the ScreenHeader.
44
- * Returns `true` if inside a ScreenHeaderProvider (i.e., in the portal shell),
45
- * `false` otherwise. Pages can use this boolean to conditionally skip
46
- * rendering their own PageHeader.
47
- *
48
- * Cleans up actions on unmount so navigating away doesn't leave stale actions.
49
- */
50
- function useScreenHeaderActions(actions) {
51
- const setActions = useContext(ScreenHeaderWriteContext);
52
- const setActionsRef = useRef(setActions);
53
- setActionsRef.current = setActions;
54
- useEffect(() => {
55
- if (!setActions) return;
56
- setActions(actions);
57
- }, [actions, setActions]);
58
- useEffect(() => {
59
- return () => setActionsRef.current?.(null);
60
- }, []);
61
- return setActions !== null;
62
- }
63
- /**
64
- * Sets breadcrumbs to display in the ScreenHeader (in place of the plain title).
65
- * Returns `true` if inside a ScreenHeaderProvider (i.e., in the portal shell),
66
- * `false` otherwise.
67
- *
68
- * Cleans up breadcrumbs on unmount so navigating away doesn't leave stale breadcrumbs.
69
- */
70
- function useScreenHeaderBreadcrumbs(breadcrumbs) {
71
- const setBreadcrumbs = useContext(ScreenHeaderBreadcrumbsWriteContext);
72
- const setBreadcrumbsRef = useRef(setBreadcrumbs);
73
- setBreadcrumbsRef.current = setBreadcrumbs;
74
- useEffect(() => {
75
- if (!setBreadcrumbs) return;
76
- setBreadcrumbs(breadcrumbs);
77
- }, [breadcrumbs, setBreadcrumbs]);
78
- useEffect(() => {
79
- return () => setBreadcrumbsRef.current?.(null);
80
- }, []);
81
- return setBreadcrumbs !== null;
82
- }
83
- /**
84
- * Reads the current screen header actions and breadcrumbs. Used internally by ScreenHeader.
85
- */
86
- function useScreenHeaderContext() {
87
- const actions = useContext(ScreenHeaderReadContext);
88
- const breadcrumbs = useContext(ScreenHeaderBreadcrumbsReadContext);
89
- return {
90
- actions: actions ?? null,
91
- breadcrumbs: breadcrumbs ?? null
92
- };
93
- }
94
- //#endregion
95
16
  //#region ../../shareables/core/src/context.tsx
96
17
  const ShareablesCoreContext = createContext(null);
97
18
  function ShareablesCoreProvider({ config, children }) {
@@ -584,6 +505,13 @@ const PAGE_SIZE$3 = 24;
584
505
  const GRID_CLASS$3 = "grid grid-cols-1 gap-8 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-4";
585
506
  function ProductsScreen({ countryCode, onNavigate }) {
586
507
  const client = useShareablesClient();
508
+ useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
509
+ className: "text-lg",
510
+ children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
511
+ className: "font-semibold",
512
+ children: "Products"
513
+ }) })
514
+ }) }), []));
587
515
  const [searchTerm, setSearchTerm] = useState("");
588
516
  const [debouncedSearch, setDebouncedSearch] = useState("");
589
517
  const [sortDesc, setSortDesc] = useState(false);
@@ -663,10 +591,6 @@ function ProductsScreen({ countryCode, onNavigate }) {
663
591
  return /* @__PURE__ */ jsxs("div", {
664
592
  className: "space-y-6 px-4 py-4 md:px-10 md:py-6",
665
593
  children: [
666
- /* @__PURE__ */ jsx("h1", {
667
- className: "text-foreground text-lg font-semibold",
668
- children: "Products"
669
- }),
670
594
  /* @__PURE__ */ jsxs("div", {
671
595
  className: "flex items-center gap-3",
672
596
  children: [/* @__PURE__ */ jsxs("div", {
@@ -1159,7 +1083,7 @@ var MarketingAssetsGrid_default = React.memo(MarketingAssetsGrid);
1159
1083
  //#region ../../shareables/ui/src/components/screens/ProductDetailScreen.tsx
1160
1084
  function ProductDetailScreen({ productId, countryCode, onNavigate, onBack }) {
1161
1085
  const client = useShareablesClient();
1162
- const { showToast, onFileDownload } = useShareablesUI();
1086
+ const { navigate, showToast, onFileDownload } = useShareablesUI();
1163
1087
  const [activeTab, setActiveTab] = useState("All");
1164
1088
  const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false);
1165
1089
  const { data: productResponse, isLoading: isLoadingProduct } = useQuery({
@@ -1178,7 +1102,30 @@ function ProductDetailScreen({ productId, countryCode, onNavigate, onBack }) {
1178
1102
  const product = productResponse?.product;
1179
1103
  const displayTitle = product?.title || "";
1180
1104
  const displayImage = product?.image_url || "";
1181
- const strippedDescription = stripTags(product?.description || product?.stripped || "");
1105
+ const displayDescription = product?.description || product?.stripped || "";
1106
+ useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
1107
+ className: "text-lg",
1108
+ children: [
1109
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
1110
+ href: "#",
1111
+ onClick: (e) => {
1112
+ e.preventDefault();
1113
+ (onBack ?? (() => navigate("products")))();
1114
+ },
1115
+ children: "Products"
1116
+ }) }),
1117
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
1118
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
1119
+ className: "font-semibold",
1120
+ children: displayTitle || "Product"
1121
+ }) })
1122
+ ]
1123
+ }) }), [
1124
+ displayTitle,
1125
+ onBack,
1126
+ navigate
1127
+ ]));
1128
+ const strippedDescription = stripTags(displayDescription);
1182
1129
  const shouldShowReadMore = strippedDescription.length > 150;
1183
1130
  const displayPrice = product?.display_price || (product?.price ? `$${product.price}` : void 0);
1184
1131
  const filteredMediaItems = (productMediaResponse?.media ?? []).filter((item) => {
@@ -1225,23 +1172,9 @@ function ProductDetailScreen({ productId, countryCode, onNavigate, onBack }) {
1225
1172
  children: "Product not found or failed to load."
1226
1173
  })
1227
1174
  });
1228
- return /* @__PURE__ */ jsxs("div", {
1175
+ return /* @__PURE__ */ jsx("div", {
1229
1176
  className: "flex flex-col gap-4 px-4 py-4 md:px-10 md:py-6",
1230
- children: [onBack && /* @__PURE__ */ jsxs("nav", {
1231
- className: "flex items-center gap-1.5 text-sm",
1232
- children: [/* @__PURE__ */ jsx("button", {
1233
- type: "button",
1234
- onClick: onBack,
1235
- className: "text-muted-foreground hover:text-foreground",
1236
- children: "Products"
1237
- }), displayTitle && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
1238
- className: "text-muted-foreground",
1239
- children: "/"
1240
- }), /* @__PURE__ */ jsx("span", {
1241
- className: "text-foreground font-medium",
1242
- children: displayTitle
1243
- })] })]
1244
- }), /* @__PURE__ */ jsxs("div", {
1177
+ children: /* @__PURE__ */ jsxs("div", {
1245
1178
  className: "mx-auto flex w-full max-w-480 flex-col gap-6 md:h-[calc(100vh-140px)] md:flex-row",
1246
1179
  children: [/* @__PURE__ */ jsx("div", {
1247
1180
  className: "aspect-square w-full md:aspect-auto md:h-full",
@@ -1326,7 +1259,7 @@ function ProductDetailScreen({ productId, countryCode, onNavigate, onBack }) {
1326
1259
  })
1327
1260
  ]
1328
1261
  })]
1329
- })]
1262
+ })
1330
1263
  });
1331
1264
  }
1332
1265
  //#endregion
@@ -1344,6 +1277,18 @@ function MediaListingScreen({ onNavigate }) {
1344
1277
  const client = useShareablesClient();
1345
1278
  const repContext = useRepContext();
1346
1279
  const { navigate } = useShareablesUI();
1280
+ useScreenHeaderActions(useMemo(() => /* @__PURE__ */ jsxs(Button, {
1281
+ onClick: () => navigate("media/new"),
1282
+ size: "sm",
1283
+ children: [/* @__PURE__ */ jsx(Plus, { className: "mr-1 h-4 w-4" }), "Add Media"]
1284
+ }), [navigate]));
1285
+ useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
1286
+ className: "text-lg",
1287
+ children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
1288
+ className: "font-semibold",
1289
+ children: "Media"
1290
+ }) })
1291
+ }) }), []));
1347
1292
  const [searchTerm, setSearchTerm] = useState("");
1348
1293
  const [debouncedSearch, setDebouncedSearch] = useState("");
1349
1294
  const [sortDesc, setSortDesc] = useState(false);
@@ -1413,10 +1358,6 @@ function MediaListingScreen({ onNavigate }) {
1413
1358
  return /* @__PURE__ */ jsxs("div", {
1414
1359
  className: "space-y-6 px-4 py-4 md:px-10 md:py-6",
1415
1360
  children: [
1416
- /* @__PURE__ */ jsx("h1", {
1417
- className: "text-foreground text-lg font-semibold",
1418
- children: "Media"
1419
- }),
1420
1361
  /* @__PURE__ */ jsxs("div", {
1421
1362
  className: "flex items-center gap-3",
1422
1363
  children: [
@@ -1451,11 +1392,6 @@ function MediaListingScreen({ onNavigate }) {
1451
1392
  title: "Grid view",
1452
1393
  children: /* @__PURE__ */ jsx(LayoutGrid, { className: "h-4 w-4" })
1453
1394
  })]
1454
- }),
1455
- /* @__PURE__ */ jsxs(Button, {
1456
- onClick: () => navigate("media/new"),
1457
- size: "sm",
1458
- children: [/* @__PURE__ */ jsx(Plus, { className: "mr-1 h-4 w-4" }), "Add Media"]
1459
1395
  })
1460
1396
  ]
1461
1397
  }),
@@ -1524,7 +1460,7 @@ function getBadgeLabel(kind) {
1524
1460
  function MediaDetailScreen({ mediaId, onNavigate: _onNavigate, onBack }) {
1525
1461
  const client = useShareablesClient();
1526
1462
  const repContext = useRepContext();
1527
- const { showToast, onFileDownload } = useShareablesUI();
1463
+ const { navigate, showToast, onFileDownload } = useShareablesUI();
1528
1464
  const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false);
1529
1465
  const { data: mediaResponse, isLoading } = useQuery({
1530
1466
  queryKey: shareablesKeys.media.detail(Number(mediaId), repContext),
@@ -1536,6 +1472,28 @@ function MediaDetailScreen({ mediaId, onNavigate: _onNavigate, onBack }) {
1536
1472
  const displayImage = mediaItem?.image_url || "";
1537
1473
  const displayVideo = mediaItem?.video_url || "";
1538
1474
  const isVideo = mediaItem?.kind === "video" && !!displayVideo;
1475
+ useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
1476
+ className: "text-lg",
1477
+ children: [
1478
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
1479
+ href: "#",
1480
+ onClick: (e) => {
1481
+ e.preventDefault();
1482
+ (onBack ?? (() => navigate("media")))();
1483
+ },
1484
+ children: "Media"
1485
+ }) }),
1486
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
1487
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
1488
+ className: "font-semibold",
1489
+ children: displayTitle || "Media"
1490
+ }) })
1491
+ ]
1492
+ }) }), [
1493
+ displayTitle,
1494
+ onBack,
1495
+ navigate
1496
+ ]));
1539
1497
  const badgeLabel = getBadgeLabel(mediaItem?.kind ?? null);
1540
1498
  const strippedDescription = stripTags(mediaItem?.description?.body || mediaItem?.stripped || "");
1541
1499
  const shouldShowReadMore = strippedDescription.length > 150;
@@ -1567,23 +1525,9 @@ function MediaDetailScreen({ mediaId, onNavigate: _onNavigate, onBack }) {
1567
1525
  children: "Media not found or failed to load."
1568
1526
  })
1569
1527
  });
1570
- return /* @__PURE__ */ jsxs("div", {
1528
+ return /* @__PURE__ */ jsx("div", {
1571
1529
  className: "flex flex-col gap-4 px-4 py-4 md:px-10 md:py-6",
1572
- children: [onBack && /* @__PURE__ */ jsxs("nav", {
1573
- className: "flex items-center gap-1.5 text-sm",
1574
- children: [/* @__PURE__ */ jsx("button", {
1575
- type: "button",
1576
- onClick: onBack,
1577
- className: "text-muted-foreground hover:text-foreground",
1578
- children: "Media"
1579
- }), displayTitle && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
1580
- className: "text-muted-foreground",
1581
- children: "/"
1582
- }), /* @__PURE__ */ jsx("span", {
1583
- className: "text-foreground font-medium",
1584
- children: displayTitle
1585
- })] })]
1586
- }), /* @__PURE__ */ jsxs("div", {
1530
+ children: /* @__PURE__ */ jsxs("div", {
1587
1531
  className: "mx-auto flex w-full max-w-480 flex-col gap-6 md:h-[calc(100vh-140px)] md:flex-row",
1588
1532
  children: [/* @__PURE__ */ jsx("div", {
1589
1533
  className: "aspect-square w-full md:aspect-auto md:h-full",
@@ -1638,7 +1582,7 @@ function MediaDetailScreen({ mediaId, onNavigate: _onNavigate, onBack }) {
1638
1582
  ]
1639
1583
  })
1640
1584
  })]
1641
- })]
1585
+ })
1642
1586
  });
1643
1587
  }
1644
1588
  //#endregion
@@ -6548,8 +6492,26 @@ function FilePreview({ result, mediaType }) {
6548
6492
  });
6549
6493
  }
6550
6494
  function MediaCreateScreen({ onNavigate, onBack }) {
6551
- const { showToast, filePickerClient } = useShareablesUI();
6495
+ const { navigate, showToast, filePickerClient } = useShareablesUI();
6552
6496
  const user = useShareablesUser();
6497
+ useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
6498
+ className: "text-lg",
6499
+ children: [
6500
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, {
6501
+ href: "#",
6502
+ onClick: (e) => {
6503
+ e.preventDefault();
6504
+ (onBack ?? (() => navigate("media")))();
6505
+ },
6506
+ children: "Media"
6507
+ }) }),
6508
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
6509
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
6510
+ className: "font-semibold",
6511
+ children: "New Media"
6512
+ }) })
6513
+ ]
6514
+ }) }), [onBack, navigate]));
6553
6515
  const [title, setTitle] = useState("");
6554
6516
  const [description, setDescription] = useState("");
6555
6517
  const [active, setActive] = useState(true);
@@ -6641,123 +6603,101 @@ function MediaCreateScreen({ onNavigate, onBack }) {
6641
6603
  }, [filePickerClient, showToast]);
6642
6604
  return /* @__PURE__ */ jsxs("div", {
6643
6605
  className: "flex flex-col gap-4 px-4 py-4 md:px-10 md:py-6",
6644
- children: [
6645
- onBack && /* @__PURE__ */ jsxs("nav", {
6646
- className: "flex items-center gap-1.5 text-sm",
6647
- children: [
6648
- /* @__PURE__ */ jsx("button", {
6649
- type: "button",
6650
- onClick: onBack,
6651
- className: "text-muted-foreground hover:text-foreground",
6652
- children: "Media"
6653
- }),
6654
- /* @__PURE__ */ jsx("span", {
6655
- className: "text-muted-foreground",
6656
- children: "/"
6657
- }),
6658
- /* @__PURE__ */ jsx("span", {
6659
- className: "text-foreground font-medium",
6660
- children: "Add Media"
6661
- })
6662
- ]
6663
- }),
6664
- /* @__PURE__ */ jsxs("div", {
6665
- className: "mx-auto flex w-full max-w-lg flex-col gap-6",
6666
- children: [
6667
- /* @__PURE__ */ jsx("h1", {
6668
- className: "text-foreground text-[26px] leading-[1.2] font-semibold",
6669
- children: "Add Media"
6670
- }),
6671
- /* @__PURE__ */ jsxs("div", {
6606
+ children: [/* @__PURE__ */ jsxs("div", {
6607
+ className: "mx-auto flex w-full max-w-lg flex-col gap-6",
6608
+ children: [
6609
+ /* @__PURE__ */ jsx("h1", {
6610
+ className: "text-foreground text-[26px] leading-[1.2] font-semibold",
6611
+ children: "Add Media"
6612
+ }),
6613
+ /* @__PURE__ */ jsxs("div", {
6614
+ className: "flex flex-col gap-2",
6615
+ children: [/* @__PURE__ */ jsx("label", {
6616
+ className: "text-foreground text-sm font-medium",
6617
+ children: "File"
6618
+ }), selectedResult && mediaType ? /* @__PURE__ */ jsxs("div", {
6672
6619
  className: "flex flex-col gap-2",
6673
- children: [/* @__PURE__ */ jsx("label", {
6674
- className: "text-foreground text-sm font-medium",
6675
- children: "File"
6676
- }), selectedResult && mediaType ? /* @__PURE__ */ jsxs("div", {
6677
- className: "flex flex-col gap-2",
6678
- children: [/* @__PURE__ */ jsx(FilePreview, {
6679
- result: selectedResult,
6680
- mediaType
6681
- }), /* @__PURE__ */ jsx(Button, {
6682
- onClick: () => setIsPickerOpen(true),
6683
- variant: "outline",
6684
- size: "sm",
6685
- className: "w-fit",
6686
- children: "Change File"
6687
- })]
6688
- }) : /* @__PURE__ */ jsxs(Button, {
6620
+ children: [/* @__PURE__ */ jsx(FilePreview, {
6621
+ result: selectedResult,
6622
+ mediaType
6623
+ }), /* @__PURE__ */ jsx(Button, {
6689
6624
  onClick: () => setIsPickerOpen(true),
6690
6625
  variant: "outline",
6691
- className: "flex h-32 w-full flex-col items-center justify-center gap-2 border-dashed",
6692
- disabled: !filePickerClient,
6693
- children: [/* @__PURE__ */ jsx(Upload, { className: "text-muted-foreground h-6 w-6" }), /* @__PURE__ */ jsx("span", {
6694
- className: "text-muted-foreground text-sm",
6695
- children: "Select File"
6696
- })]
6626
+ size: "sm",
6627
+ className: "w-fit",
6628
+ children: "Change File"
6697
6629
  })]
6698
- }),
6699
- /* @__PURE__ */ jsxs("div", {
6700
- className: "flex flex-col gap-2",
6701
- children: [/* @__PURE__ */ jsxs("label", {
6702
- className: "text-foreground text-sm font-medium",
6703
- children: ["Title ", /* @__PURE__ */ jsx("span", {
6704
- className: "text-red-500",
6705
- children: "*"
6706
- })]
6707
- }), /* @__PURE__ */ jsx(Input, {
6708
- value: title,
6709
- onChange: (e) => setTitle(e.target.value),
6710
- placeholder: "Enter media title",
6711
- required: true
6630
+ }) : /* @__PURE__ */ jsxs(Button, {
6631
+ onClick: () => setIsPickerOpen(true),
6632
+ variant: "outline",
6633
+ className: "flex h-32 w-full flex-col items-center justify-center gap-2 border-dashed",
6634
+ disabled: !filePickerClient,
6635
+ children: [/* @__PURE__ */ jsx(Upload, { className: "text-muted-foreground h-6 w-6" }), /* @__PURE__ */ jsx("span", {
6636
+ className: "text-muted-foreground text-sm",
6637
+ children: "Select File"
6712
6638
  })]
6713
- }),
6714
- /* @__PURE__ */ jsxs("div", {
6715
- className: "flex flex-col gap-2",
6716
- children: [/* @__PURE__ */ jsxs("label", {
6717
- className: "text-foreground text-sm font-medium",
6718
- children: ["Description ", /* @__PURE__ */ jsx("span", {
6719
- className: "text-red-500",
6720
- children: "*"
6721
- })]
6722
- }), /* @__PURE__ */ jsx("textarea", {
6723
- value: description,
6724
- onChange: (e) => setDescription(e.target.value),
6725
- placeholder: "Enter description",
6726
- required: true,
6727
- rows: 3,
6728
- className: "border-input bg-background text-foreground placeholder:text-muted-foreground rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none"
6639
+ })]
6640
+ }),
6641
+ /* @__PURE__ */ jsxs("div", {
6642
+ className: "flex flex-col gap-2",
6643
+ children: [/* @__PURE__ */ jsxs("label", {
6644
+ className: "text-foreground text-sm font-medium",
6645
+ children: ["Title ", /* @__PURE__ */ jsx("span", {
6646
+ className: "text-red-500",
6647
+ children: "*"
6729
6648
  })]
6730
- }),
6731
- /* @__PURE__ */ jsxs("label", {
6732
- className: "flex items-center gap-3",
6733
- children: [/* @__PURE__ */ jsx("input", {
6734
- type: "checkbox",
6735
- checked: active,
6736
- onChange: (e) => setActive(e.target.checked),
6737
- className: "h-4 w-4 rounded"
6738
- }), /* @__PURE__ */ jsx("span", {
6739
- className: "text-foreground text-sm font-medium",
6740
- children: "Active"
6649
+ }), /* @__PURE__ */ jsx(Input, {
6650
+ value: title,
6651
+ onChange: (e) => setTitle(e.target.value),
6652
+ placeholder: "Enter media title",
6653
+ required: true
6654
+ })]
6655
+ }),
6656
+ /* @__PURE__ */ jsxs("div", {
6657
+ className: "flex flex-col gap-2",
6658
+ children: [/* @__PURE__ */ jsxs("label", {
6659
+ className: "text-foreground text-sm font-medium",
6660
+ children: ["Description ", /* @__PURE__ */ jsx("span", {
6661
+ className: "text-red-500",
6662
+ children: "*"
6741
6663
  })]
6742
- }),
6743
- /* @__PURE__ */ jsx(Button, {
6744
- onClick: handleSave,
6745
- disabled: isCreating,
6746
- className: "bg-foreground text-background hover:bg-foreground/70 flex h-10 w-full items-center justify-center rounded-lg px-4 transition-all",
6747
- children: isCreating ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Save Media"
6748
- })
6749
- ]
6750
- }),
6751
- filePickerContextValue && /* @__PURE__ */ jsx(FilePickerProvider, {
6752
- value: filePickerContextValue,
6753
- children: /* @__PURE__ */ jsx(FilePicker, {
6754
- open: isPickerOpen,
6755
- onFilesSelected: handleFilesSelected,
6756
- onClose: () => setIsPickerOpen(false),
6757
- config: { maxFiles: 1 }
6664
+ }), /* @__PURE__ */ jsx("textarea", {
6665
+ value: description,
6666
+ onChange: (e) => setDescription(e.target.value),
6667
+ placeholder: "Enter description",
6668
+ required: true,
6669
+ rows: 3,
6670
+ className: "border-input bg-background text-foreground placeholder:text-muted-foreground rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none"
6671
+ })]
6672
+ }),
6673
+ /* @__PURE__ */ jsxs("label", {
6674
+ className: "flex items-center gap-3",
6675
+ children: [/* @__PURE__ */ jsx("input", {
6676
+ type: "checkbox",
6677
+ checked: active,
6678
+ onChange: (e) => setActive(e.target.checked),
6679
+ className: "h-4 w-4 rounded"
6680
+ }), /* @__PURE__ */ jsx("span", {
6681
+ className: "text-foreground text-sm font-medium",
6682
+ children: "Active"
6683
+ })]
6684
+ }),
6685
+ /* @__PURE__ */ jsx(Button, {
6686
+ onClick: handleSave,
6687
+ disabled: isCreating,
6688
+ className: "bg-foreground text-background hover:bg-foreground/70 flex h-10 w-full items-center justify-center rounded-lg px-4 transition-all",
6689
+ children: isCreating ? /* @__PURE__ */ jsx(Spinner, { className: "size-4" }) : "Save Media"
6758
6690
  })
6691
+ ]
6692
+ }), filePickerContextValue && /* @__PURE__ */ jsx(FilePickerProvider, {
6693
+ value: filePickerContextValue,
6694
+ children: /* @__PURE__ */ jsx(FilePicker, {
6695
+ open: isPickerOpen,
6696
+ onFilesSelected: handleFilesSelected,
6697
+ onClose: () => setIsPickerOpen(false),
6698
+ config: { maxFiles: 1 }
6759
6699
  })
6760
- ]
6700
+ })]
6761
6701
  });
6762
6702
  }
6763
6703
  //#endregion
@@ -8815,6 +8755,13 @@ const DEFAULT_IMAGE = "https://assets.fluid.app/fluid-admin/images/we-commerce/w
8815
8755
  function FilesListingScreen({ onNavigate }) {
8816
8756
  const client = useShareablesClient();
8817
8757
  const renderImage = useRenderImage();
8758
+ useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, {
8759
+ className: "text-lg",
8760
+ children: /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
8761
+ className: "font-semibold",
8762
+ children: "Files"
8763
+ }) })
8764
+ }) }), []));
8818
8765
  const [searchTerm, setSearchTerm] = useState("");
8819
8766
  const [debouncedSearch, setDebouncedSearch] = useState("");
8820
8767
  const observerTarget = useRef(null);
@@ -9036,6 +8983,6 @@ function ProductsApp({ countryCode, companyLogoUrl, productId: controlledProduct
9036
8983
  });
9037
8984
  }
9038
8985
  //#endregion
9039
- export { ScreenHeaderProvider as a, ShareablesCoreProvider as i, ShareablesApp as n, useScreenHeaderContext as o, ShareablesUIProvider as r, ProductsApp as t };
8986
+ export { ShareablesCoreProvider as i, ShareablesApp as n, ShareablesUIProvider as r, ProductsApp as t };
9040
8987
 
9041
- //# sourceMappingURL=src-CEouYGbQ.mjs.map
8988
+ //# sourceMappingURL=src-CzK-t4_m.mjs.map