@fluid-app/portal-sdk 0.1.244 → 0.1.246

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 (115) hide show
  1. package/dist/{AppDownloadScreen-DQR40F0y.mjs → AppDownloadScreen-DPnbWP5G.mjs} +1 -1
  2. package/dist/{AppDownloadScreen-DQR40F0y.mjs.map → AppDownloadScreen-DPnbWP5G.mjs.map} +1 -1
  3. package/dist/{AppDownloadScreen-BXnl23_d.cjs → AppDownloadScreen-Og_iMsw5.cjs} +1 -1
  4. package/dist/{AppDownloadScreen-BXnl23_d.cjs.map → AppDownloadScreen-Og_iMsw5.cjs.map} +1 -1
  5. package/dist/{AppNavigationContext-C1-hd9Rw.cjs → AppNavigationContext-BDs1cOuG.cjs} +1 -1
  6. package/dist/{AppNavigationContext-C1-hd9Rw.cjs.map → AppNavigationContext-BDs1cOuG.cjs.map} +1 -1
  7. package/dist/{AppNavigationContext-Dvc0yoZF.mjs → AppNavigationContext-DNod9mf6.mjs} +1 -1
  8. package/dist/{AppNavigationContext-Dvc0yoZF.mjs.map → AppNavigationContext-DNod9mf6.mjs.map} +1 -1
  9. package/dist/{ContactsScreen-Cj0_VI0d.cjs → ContactsScreen-CZ2hrMqf.cjs} +6 -6
  10. package/dist/{ContactsScreen-Cj0_VI0d.cjs.map → ContactsScreen-CZ2hrMqf.cjs.map} +1 -1
  11. package/dist/{ContactsScreen-CMBERzKU.mjs → ContactsScreen-DuhDzRtI.mjs} +6 -6
  12. package/dist/{ContactsScreen-CMBERzKU.mjs.map → ContactsScreen-DuhDzRtI.mjs.map} +1 -1
  13. package/dist/{ContactsScreen-CH_P8WxC.cjs → ContactsScreen-Dv1SJNBo.cjs} +5 -5
  14. package/dist/{InfiniteScrollSentinel-DeIL8UkW.cjs → InfiniteScrollSentinel-BaPx1tjC.cjs} +1 -1
  15. package/dist/{InfiniteScrollSentinel-DeIL8UkW.cjs.map → InfiniteScrollSentinel-BaPx1tjC.cjs.map} +1 -1
  16. package/dist/{InfiniteScrollSentinel-B_clNL9Y.mjs → InfiniteScrollSentinel-D0XRJi51.mjs} +1 -1
  17. package/dist/{InfiniteScrollSentinel-B_clNL9Y.mjs.map → InfiniteScrollSentinel-D0XRJi51.mjs.map} +1 -1
  18. package/dist/{MessagingScreen-KYx6DSMx.cjs → MessagingScreen-BwI0RShj.cjs} +3 -3
  19. package/dist/{MessagingScreen-vb5P-7jP.mjs → MessagingScreen-DiSZ7fyd.mjs} +3 -3
  20. package/dist/{MessagingScreen-vb5P-7jP.mjs.map → MessagingScreen-DiSZ7fyd.mjs.map} +1 -1
  21. package/dist/{MessagingScreen-CCbgNRp1.cjs → MessagingScreen-WCeHWGlX.cjs} +5 -5
  22. package/dist/{MessagingScreen-CCbgNRp1.cjs.map → MessagingScreen-WCeHWGlX.cjs.map} +1 -1
  23. package/dist/{MySiteScreen-B_16cPgD.cjs → MySiteScreen-Bdd7a6Hy.cjs} +3 -2
  24. package/dist/MySiteScreen-CK84vXa9.mjs +301 -0
  25. package/dist/MySiteScreen-CK84vXa9.mjs.map +1 -0
  26. package/dist/MySiteScreen-zfajm9da.cjs +309 -0
  27. package/dist/MySiteScreen-zfajm9da.cjs.map +1 -0
  28. package/dist/{OrdersScreen-CQGCZLYf.cjs → OrdersScreen-BLs1xTv7.cjs} +4 -4
  29. package/dist/{OrdersScreen-BxaJw-Kq.cjs → OrdersScreen-BbS7Alby.cjs} +3 -3
  30. package/dist/{OrdersScreen-BxaJw-Kq.cjs.map → OrdersScreen-BbS7Alby.cjs.map} +1 -1
  31. package/dist/{OrdersScreen-CPKRShbP.mjs → OrdersScreen-b-ZC4_NI.mjs} +3 -3
  32. package/dist/{OrdersScreen-CPKRShbP.mjs.map → OrdersScreen-b-ZC4_NI.mjs.map} +1 -1
  33. package/dist/{PortalProductsApiProvider-BIZg_c4Y.mjs → PortalProductsApiProvider-BFdHFvog.mjs} +1 -1
  34. package/dist/{PortalProductsApiProvider-BIZg_c4Y.mjs.map → PortalProductsApiProvider-BFdHFvog.mjs.map} +1 -1
  35. package/dist/{PortalProductsApiProvider-DL8nl7To.cjs → PortalProductsApiProvider-CkS7OIGt.cjs} +1 -1
  36. package/dist/{PortalProductsApiProvider-DL8nl7To.cjs.map → PortalProductsApiProvider-CkS7OIGt.cjs.map} +1 -1
  37. package/dist/{ProfileScreen-BT0iys-q.cjs → ProfileScreen-BfvdQa0q.cjs} +114 -33
  38. package/dist/ProfileScreen-BfvdQa0q.cjs.map +1 -0
  39. package/dist/{ProfileScreen-CZAIUM2a.mjs → ProfileScreen-CRLf8oDe.mjs} +116 -35
  40. package/dist/ProfileScreen-CRLf8oDe.mjs.map +1 -0
  41. package/dist/{ProfileScreen-CKcdtroU.cjs → ProfileScreen-Za3ZIWPO.cjs} +4 -2
  42. package/dist/{SearchSort-CeJqRK2c.cjs → SearchSort-BP2ktxyN.cjs} +1 -1
  43. package/dist/{SearchSort-CeJqRK2c.cjs.map → SearchSort-BP2ktxyN.cjs.map} +1 -1
  44. package/dist/{SearchSort-CFHU38Er.mjs → SearchSort-CokMCrhy.mjs} +1 -1
  45. package/dist/{SearchSort-CFHU38Er.mjs.map → SearchSort-CokMCrhy.mjs.map} +1 -1
  46. package/dist/{ShareablesScreen-sieWBlAl.mjs → ShareablesScreen-BZZ-RT71.mjs} +8 -8
  47. package/dist/{ShareablesScreen-sieWBlAl.mjs.map → ShareablesScreen-BZZ-RT71.mjs.map} +1 -1
  48. package/dist/{ShareablesScreen-A69L0Nok.cjs → ShareablesScreen-BxOKbuuU.cjs} +20 -20
  49. package/dist/{ShareablesScreen-A69L0Nok.cjs.map → ShareablesScreen-BxOKbuuU.cjs.map} +1 -1
  50. package/dist/{ShareablesScreen-BUYG-mjj.cjs → ShareablesScreen-CsDxLODp.cjs} +7 -7
  51. package/dist/{ShopScreen-sLUTgIcQ.mjs → ShopScreen-BG1pxd2D.mjs} +4 -4
  52. package/dist/{ShopScreen-sLUTgIcQ.mjs.map → ShopScreen-BG1pxd2D.mjs.map} +1 -1
  53. package/dist/{ShopScreen-DVpCo-OV.cjs → ShopScreen-BigHJ5wE.cjs} +3 -3
  54. package/dist/{ShopScreen-Dm85_rMp.cjs → ShopScreen-S6rBaoWM.cjs} +4 -4
  55. package/dist/{ShopScreen-Dm85_rMp.cjs.map → ShopScreen-S6rBaoWM.cjs.map} +1 -1
  56. package/dist/{SubscriptionsScreen-DrDSwMXS.cjs → SubscriptionsScreen-B88_dLfE.cjs} +9 -9
  57. package/dist/{SubscriptionsScreen-DrDSwMXS.cjs.map → SubscriptionsScreen-B88_dLfE.cjs.map} +1 -1
  58. package/dist/{SubscriptionsScreen-CXM2zmF7.mjs → SubscriptionsScreen-DK9-h3Cz.mjs} +8 -8
  59. package/dist/{SubscriptionsScreen-CXM2zmF7.mjs.map → SubscriptionsScreen-DK9-h3Cz.mjs.map} +1 -1
  60. package/dist/{SubscriptionsScreen-t5wtDGfB.cjs → SubscriptionsScreen-dhnfYn4L.cjs} +5 -5
  61. package/dist/{UpgradeScreen-DUvg-WZv.cjs → UpgradeScreen-Bl9lb32K.cjs} +1 -1
  62. package/dist/{UpgradeScreen-DAKe_hiv.cjs → UpgradeScreen-C-hFDAR2.cjs} +1 -1
  63. package/dist/{UpgradeScreen-DAKe_hiv.cjs.map → UpgradeScreen-C-hFDAR2.cjs.map} +1 -1
  64. package/dist/{UpgradeScreen-DnGnWVTf.mjs → UpgradeScreen-X6j0_625.mjs} +1 -1
  65. package/dist/{UpgradeScreen-DnGnWVTf.mjs.map → UpgradeScreen-X6j0_625.mjs.map} +1 -1
  66. package/dist/{MySiteScreen-CUyJteDm.cjs → components-BKADyCYp.cjs} +42 -466
  67. package/dist/components-BKADyCYp.cjs.map +1 -0
  68. package/dist/{MySiteScreen-CN0ZDBgy.mjs → components-CjgEvBYG.mjs} +6 -470
  69. package/dist/components-CjgEvBYG.mjs.map +1 -0
  70. package/dist/{dist-PbA1vxAz.mjs → dist-BstXVe25.mjs} +1 -1
  71. package/dist/{dist-PbA1vxAz.mjs.map → dist-BstXVe25.mjs.map} +1 -1
  72. package/dist/{dist-o2cjwzIa.mjs → dist-CTLDCXCc.mjs} +2 -2
  73. package/dist/{dist-o2cjwzIa.mjs.map → dist-CTLDCXCc.mjs.map} +1 -1
  74. package/dist/{dist-BQZkLGL6.cjs → dist-DJAHGHHi.cjs} +1 -19
  75. package/dist/{dist-BQZkLGL6.cjs.map → dist-DJAHGHHi.cjs.map} +1 -1
  76. package/dist/{dist-DbRTQ2QF.cjs → dist-D_3_ZuC5.cjs} +1 -1
  77. package/dist/{dist-DbRTQ2QF.cjs.map → dist-D_3_ZuC5.cjs.map} +1 -1
  78. package/dist/{dist-myuZC8sf.cjs → dist-vhBaFZ9L.cjs} +2 -2
  79. package/dist/{dist-myuZC8sf.cjs.map → dist-vhBaFZ9L.cjs.map} +1 -1
  80. package/dist/{es-UfEBhcZD.cjs → es-B5heQ57j.cjs} +1 -1
  81. package/dist/{es-UfEBhcZD.cjs.map → es-B5heQ57j.cjs.map} +1 -1
  82. package/dist/{fluid-pay-api-adapter-eNT8m0xB.mjs → fluid-pay-api-adapter-CJ7-I8k-.mjs} +673 -381
  83. package/dist/fluid-pay-api-adapter-CJ7-I8k-.mjs.map +1 -0
  84. package/dist/{fluid-pay-api-adapter-BszgrFL6.cjs → fluid-pay-api-adapter-D63KLi5c.cjs} +700 -378
  85. package/dist/fluid-pay-api-adapter-D63KLi5c.cjs.map +1 -0
  86. package/dist/{format-CytB2M00.cjs → format-CLUjV1oR.cjs} +1 -1
  87. package/dist/{format-CytB2M00.cjs.map → format-CLUjV1oR.cjs.map} +1 -1
  88. package/dist/index.cjs +123 -172
  89. package/dist/index.cjs.map +1 -1
  90. package/dist/index.d.cts.map +1 -1
  91. package/dist/index.d.mts.map +1 -1
  92. package/dist/index.mjs +122 -171
  93. package/dist/index.mjs.map +1 -1
  94. package/dist/{order-status-badge-DHyaK6mU.cjs → order-status-badge-BKvLeVsM.cjs} +3 -3
  95. package/dist/{order-status-badge-DHyaK6mU.cjs.map → order-status-badge-BKvLeVsM.cjs.map} +1 -1
  96. package/dist/{order-status-badge-Dmo8lLnt.mjs → order-status-badge-xuJ732eH.mjs} +3 -3
  97. package/dist/{order-status-badge-Dmo8lLnt.mjs.map → order-status-badge-xuJ732eH.mjs.map} +1 -1
  98. package/dist/{query-keys-oQKvV4jp.mjs → query-keys-8SVs82aF.mjs} +1 -1
  99. package/dist/{query-keys-elu0svUd.cjs.map → query-keys-8SVs82aF.mjs.map} +1 -1
  100. package/dist/{query-keys-elu0svUd.cjs → query-keys-e9EEoWxN.cjs} +1 -1
  101. package/dist/{query-keys-oQKvV4jp.mjs.map → query-keys-e9EEoWxN.cjs.map} +1 -1
  102. package/dist/{sortable.esm-C8G00cCP.mjs → sortable.esm-C8riJ_zv.mjs} +2 -14
  103. package/dist/{sortable.esm-C8G00cCP.mjs.map → sortable.esm-C8riJ_zv.mjs.map} +1 -1
  104. package/dist/{use-account-C1X-VLY-.cjs → use-account-D6Z9hkDX.cjs} +2 -2
  105. package/dist/{use-account-C1X-VLY-.cjs.map → use-account-D6Z9hkDX.cjs.map} +1 -1
  106. package/dist/{use-account-C76sphlu.mjs → use-account-DsTz5BlS.mjs} +2 -2
  107. package/dist/{use-account-C76sphlu.mjs.map → use-account-DsTz5BlS.mjs.map} +1 -1
  108. package/package.json +18 -17
  109. package/styles/packages.css +1 -0
  110. package/dist/MySiteScreen-CN0ZDBgy.mjs.map +0 -1
  111. package/dist/MySiteScreen-CUyJteDm.cjs.map +0 -1
  112. package/dist/ProfileScreen-BT0iys-q.cjs.map +0 -1
  113. package/dist/ProfileScreen-CZAIUM2a.mjs.map +0 -1
  114. package/dist/fluid-pay-api-adapter-BszgrFL6.cjs.map +0 -1
  115. package/dist/fluid-pay-api-adapter-eNT8m0xB.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -25,8 +25,8 @@ import "./MediaRenderer-DMdb_5xw.mjs";
25
25
  import { r as carouselWidgetPropertySchema, t as CarouselWidget } from "./CarouselWidget-Cn5P4FVN.mjs";
26
26
  import { r as catchUpWidgetPropertySchema, t as CatchUpWidget } from "./CatchUpWidget-B9CI7lq0.mjs";
27
27
  import { At as CardTitle, C as Skeleton$1, Dn as Button, Dt as CardDescription, Fn as cn$1, Ot as CardFooter, _t as CollapsibleContent, gt as Collapsible, ht as PopoverTrigger, kt as CardHeader, mt as PopoverContent, pt as Popover, vt as CollapsibleTrigger, wt as Card, x as Toaster } from "./src-pgBBOcJa.mjs";
28
- import { a as useMessagingConfig, i as createFluidFileUploader, o as useMessagingAuth, r as messagingScreenPropertySchema, t as MessagingScreen } from "./MessagingScreen-vb5P-7jP.mjs";
29
- import { r as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-CXM2zmF7.mjs";
28
+ import { a as useMessagingConfig, i as createFluidFileUploader, o as useMessagingAuth, r as messagingScreenPropertySchema, t as MessagingScreen } from "./MessagingScreen-DiSZ7fyd.mjs";
29
+ import { r as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-DK9-h3Cz.mjs";
30
30
  import { r as chartWidgetPropertySchema, t as ChartWidget } from "./ChartWidget-obje-Xj9.mjs";
31
31
  import { r as containerWidgetPropertySchema, t as ContainerWidget } from "./ContainerWidget-DNenbORS.mjs";
32
32
  import { r as imageWidgetPropertySchema, t as ImageWidget } from "./ImageWidget-vNWT_O1E.mjs";
@@ -47,24 +47,25 @@ import { r as videoWidgetPropertySchema, t as VideoWidget } from "./VideoWidget-
47
47
  import { i as useScreenHeaderContext, t as ScreenHeaderProvider } from "./ScreenHeaderContext-Cemdo7bM.mjs";
48
48
  import { t as useStore } from "./use-store-C2KBIS41.mjs";
49
49
  import { i as CoreScreenPlaceholder, r as customersScreenPropertySchema, t as CustomersScreen } from "./CustomersScreen-BJOBG5f5.mjs";
50
- import { n as useAppNavigation, t as AppNavigationProvider } from "./AppNavigationContext-Dvc0yoZF.mjs";
51
- import { t as useAccount } from "./use-account-C76sphlu.mjs";
52
- import "./fluid-pay-api-adapter-eNT8m0xB.mjs";
53
- import { r as profileScreenPropertySchema, t as ProfileScreen } from "./ProfileScreen-CZAIUM2a.mjs";
54
- import "./dist-PbA1vxAz.mjs";
55
- import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-CMBERzKU.mjs";
56
- import "./SearchSort-CFHU38Er.mjs";
57
- import "./InfiniteScrollSentinel-B_clNL9Y.mjs";
58
- import "./dist-o2cjwzIa.mjs";
59
- import "./order-status-badge-Dmo8lLnt.mjs";
60
- import { r as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-CPKRShbP.mjs";
61
- import "./sortable.esm-C8G00cCP.mjs";
62
- import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-CN0ZDBgy.mjs";
63
- import { r as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-sieWBlAl.mjs";
64
- import "./PortalProductsApiProvider-BIZg_c4Y.mjs";
65
- import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-sLUTgIcQ.mjs";
66
- import "./UpgradeScreen-DnGnWVTf.mjs";
67
- import "./AppDownloadScreen-DQR40F0y.mjs";
50
+ import { t as useAccount } from "./use-account-DsTz5BlS.mjs";
51
+ import { n as useAppNavigation, t as AppNavigationProvider } from "./AppNavigationContext-DNod9mf6.mjs";
52
+ import "./fluid-pay-api-adapter-CJ7-I8k-.mjs";
53
+ import "./sortable.esm-C8riJ_zv.mjs";
54
+ import "./components-CjgEvBYG.mjs";
55
+ import { r as profileScreenPropertySchema, t as ProfileScreen } from "./ProfileScreen-CRLf8oDe.mjs";
56
+ import "./dist-BstXVe25.mjs";
57
+ import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-DuhDzRtI.mjs";
58
+ import "./SearchSort-CokMCrhy.mjs";
59
+ import "./InfiniteScrollSentinel-D0XRJi51.mjs";
60
+ import "./dist-CTLDCXCc.mjs";
61
+ import "./order-status-badge-xuJ732eH.mjs";
62
+ import { r as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-b-ZC4_NI.mjs";
63
+ import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-CK84vXa9.mjs";
64
+ import { r as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-BZZ-RT71.mjs";
65
+ import "./PortalProductsApiProvider-BFdHFvog.mjs";
66
+ import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-BG1pxd2D.mjs";
67
+ import "./UpgradeScreen-X6j0_625.mjs";
68
+ import "./AppDownloadScreen-DPnbWP5G.mjs";
68
69
  import * as React$1 from "react";
69
70
  import { Component, StrictMode, Suspense, createContext, forwardRef, lazy, memo, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
70
71
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
@@ -1167,7 +1168,7 @@ function ScreenHeader({ title }) {
1167
1168
  }
1168
1169
  //#endregion
1169
1170
  //#region ../react/src/components/RepIcon.tsx
1170
- const ICON_MAP$1 = {
1171
+ const ICON_MAP = {
1171
1172
  "address-card": ContactRound,
1172
1173
  "arrows-repeat": Repeat,
1173
1174
  bell: Bell,
@@ -1203,7 +1204,7 @@ const ICON_MAP$1 = {
1203
1204
  users: Users
1204
1205
  };
1205
1206
  function RepIcon({ name, className }) {
1206
- return /* @__PURE__ */ jsx(ICON_MAP$1[name] ?? File, { className });
1207
+ return /* @__PURE__ */ jsx(ICON_MAP[name] ?? File, { className });
1207
1208
  }
1208
1209
  //#endregion
1209
1210
  //#region ../core/src/navigation/navigation-storage.ts
@@ -1864,18 +1865,67 @@ function SdkCompanySwitcher() {
1864
1865
  });
1865
1866
  }
1866
1867
  //#endregion
1867
- //#region ../core/src/navigation/account-manage.ts
1868
- const ACCOUNT_MANAGE_SLUGS = [
1869
- "profile",
1870
- "orders",
1871
- "subscriptions"
1872
- ];
1873
- /** Account manage tabs with labels derived from SYSTEM_NAVIGATION_ITEMS. */
1874
- const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
1875
- key: slug,
1876
- label: SYSTEM_NAVIGATION_ITEMS[slug].label,
1877
- slug
1878
- }));
1868
+ //#region ../core/src/navigation/slug-utils.ts
1869
+ /**
1870
+ * Extract all slugs from a navigation tree, sorted by segment count descending.
1871
+ * Longest slugs first enables greedy prefix matching (e.g. "share/playlists"
1872
+ * is checked before "share").
1873
+ */
1874
+ function collectNavSlugs(items) {
1875
+ const slugs = [];
1876
+ for (const item of items) {
1877
+ if (item.slug) slugs.push(normalizeSlug(item.slug));
1878
+ for (const child of item.children ?? []) if (child.slug) slugs.push(normalizeSlug(child.slug));
1879
+ }
1880
+ return [...slugs].sort((a, b) => b.split("/").length - a.split("/").length);
1881
+ }
1882
+ /**
1883
+ * Find the longest registered nav slug that is a prefix of `fullSlug`.
1884
+ * Uses segment-boundary checking to prevent "shop" from matching "shopping".
1885
+ */
1886
+ function matchSlugPrefix(fullSlug, navSlugs) {
1887
+ const normalized = normalizeSlug(fullSlug);
1888
+ if (!normalized) return void 0;
1889
+ for (const navSlug of navSlugs) {
1890
+ if (normalized === navSlug) return {
1891
+ matchedSlug: navSlug,
1892
+ rest: ""
1893
+ };
1894
+ if (normalized.startsWith(navSlug + "/")) return {
1895
+ matchedSlug: navSlug,
1896
+ rest: normalized.slice(navSlug.length + 1)
1897
+ };
1898
+ }
1899
+ }
1900
+ /**
1901
+ * Extract the slug portion from a full pathname by stripping the basePath prefix.
1902
+ * Returns an empty string when the pathname equals the basePath exactly.
1903
+ *
1904
+ * Examples:
1905
+ * extractSlugFromPathname("/contacts/123", "/") → "contacts/123"
1906
+ * extractSlugFromPathname("/portal/contacts", "/portal") → "contacts"
1907
+ * extractSlugFromPathname("/portal", "/portal") → ""
1908
+ * extractSlugFromPathname("/", "/") → ""
1909
+ */
1910
+ function extractSlugFromPathname(pathname, basePath) {
1911
+ if (basePath === "/") return pathname.replace(/^\//, "");
1912
+ if (pathname.startsWith(basePath)) return pathname.slice(basePath.length).replace(/^\//, "");
1913
+ return pathname.replace(/^\//, "");
1914
+ }
1915
+ /**
1916
+ * Generate a URL-safe slug from a human-readable name. Mirrors the admin
1917
+ * builder's `generateSlugFromName` so a navigation item authored as
1918
+ * `slugifyName(screen.name)` can be matched back to the screen at runtime
1919
+ * even when the screen's own `slug` is opaque (e.g. `screen-{uuid}`).
1920
+ */
1921
+ function slugifyName(name) {
1922
+ return name.toLowerCase().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
1923
+ }
1924
+ function isSlugInSection(item, currentSlug, navSlugs) {
1925
+ const baseSlug = matchSlugPrefix(currentSlug, navSlugs)?.matchedSlug ?? normalizeSlug(currentSlug);
1926
+ if (normalizeSlug(item.slug) === baseSlug) return true;
1927
+ return item.children?.some((child) => normalizeSlug(child.slug) === baseSlug) ?? false;
1928
+ }
1879
1929
  //#endregion
1880
1930
  //#region src/shell/go-back-or-home.ts
1881
1931
  /**
@@ -2023,66 +2073,18 @@ function BuilderScreenViewImpl({ screen, className }) {
2023
2073
  }
2024
2074
  const BuilderScreenView = memo(BuilderScreenViewImpl);
2025
2075
  //#endregion
2026
- //#region src/account/account-management-layout.tsx
2027
- const ICON_MAP = {
2028
- profile: User,
2029
- orders: PackageOpen,
2030
- subscriptions: Repeat
2031
- };
2032
- const NAV_ITEMS = ACCOUNT_MANAGE_TABS.map((tab) => ({
2033
- ...tab,
2034
- icon: ICON_MAP[tab.key]
2035
- }));
2036
- function getActiveTab(slug) {
2037
- const root = slug.split("/")[0];
2038
- if (root === "orders") return "orders";
2039
- if (root === "subscriptions") return "subscriptions";
2040
- return "profile";
2041
- }
2042
- function AccountManageLayout({ children }) {
2043
- const { currentSlug, navigate } = useAppNavigation();
2044
- const activeTab = getActiveTab(currentSlug);
2045
- return /* @__PURE__ */ jsxs("div", {
2046
- className: "flex flex-col md:flex-row",
2047
- children: [
2048
- /* @__PURE__ */ jsx("nav", {
2049
- className: "flex gap-1 overflow-x-auto border-b px-4 py-2 md:hidden",
2050
- children: NAV_ITEMS.map(({ key, slug, label, icon: Icon }) => /* @__PURE__ */ jsxs("button", {
2051
- type: "button",
2052
- onClick: () => navigate(slug),
2053
- className: `flex items-center gap-2 rounded-md px-3 py-2 text-sm font-medium whitespace-nowrap ${activeTab === key ? "bg-sidebar-primary text-sidebar-primary-foreground" : "hover:bg-sidebar-primary hover:text-sidebar-primary-foreground"}`,
2054
- children: [/* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }), label]
2055
- }, key))
2056
- }),
2057
- /* @__PURE__ */ jsx("nav", {
2058
- className: "hidden w-48 shrink-0 flex-col gap-1 p-4 md:flex",
2059
- children: NAV_ITEMS.map(({ key, slug, label, icon: Icon }) => /* @__PURE__ */ jsxs("button", {
2060
- type: "button",
2061
- onClick: () => navigate(slug),
2062
- className: `flex items-center gap-2 rounded-md px-3 py-2 text-left text-sm font-medium ${activeTab === key ? "bg-sidebar-primary text-sidebar-primary-foreground" : "hover:bg-sidebar-primary hover:text-sidebar-primary-foreground"}`,
2063
- children: [/* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }), label]
2064
- }, key))
2065
- }),
2066
- /* @__PURE__ */ jsx("div", {
2067
- className: "min-w-0 flex-1",
2068
- children
2069
- })
2070
- ]
2071
- });
2072
- }
2073
- //#endregion
2074
2076
  //#region src/shell/system-screen-map.ts
2075
- const ProfileScreen$1 = lazy(() => import("./ProfileScreen-CZAIUM2a.mjs").then((n) => n.n).then((m) => ({ default: m.ProfileScreen })));
2076
- const OrdersScreen$1 = lazy(() => import("./OrdersScreen-CPKRShbP.mjs").then((n) => n.n).then((m) => ({ default: m.OrdersScreen })));
2077
- const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-CXM2zmF7.mjs").then((n) => n.n).then((m) => ({ default: m.SubscriptionsScreen })));
2078
- const MessagingScreen$1 = lazy(() => import("./MessagingScreen-vb5P-7jP.mjs").then((n) => n.n).then((m) => ({ default: m.MessagingScreen })));
2079
- const ContactsScreen$1 = lazy(() => import("./ContactsScreen-CMBERzKU.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
2080
- const ShopScreen$1 = lazy(() => import("./ShopScreen-sLUTgIcQ.mjs").then((n) => n.n).then((m) => ({ default: m.ShopScreen })));
2077
+ const ProfileScreen$1 = lazy(() => import("./ProfileScreen-CRLf8oDe.mjs").then((n) => n.n).then((m) => ({ default: m.ProfileScreen })));
2078
+ const OrdersScreen$1 = lazy(() => import("./OrdersScreen-b-ZC4_NI.mjs").then((n) => n.n).then((m) => ({ default: m.OrdersScreen })));
2079
+ const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-DK9-h3Cz.mjs").then((n) => n.n).then((m) => ({ default: m.SubscriptionsScreen })));
2080
+ const MessagingScreen$1 = lazy(() => import("./MessagingScreen-DiSZ7fyd.mjs").then((n) => n.n).then((m) => ({ default: m.MessagingScreen })));
2081
+ const ContactsScreen$1 = lazy(() => import("./ContactsScreen-DuhDzRtI.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
2082
+ const ShopScreen$1 = lazy(() => import("./ShopScreen-BG1pxd2D.mjs").then((n) => n.n).then((m) => ({ default: m.ShopScreen })));
2081
2083
  const CustomersScreen$1 = lazy(() => import("./CustomersScreen-BJOBG5f5.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
2082
- const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-sieWBlAl.mjs").then((n) => n.n).then((m) => ({ default: m.ShareablesScreen })));
2083
- const MySiteScreen$1 = lazy(() => import("./MySiteScreen-CN0ZDBgy.mjs").then((n) => n.n).then((m) => ({ default: m.MySiteScreen })));
2084
- const UpgradeScreen = lazy(() => import("./UpgradeScreen-DnGnWVTf.mjs").then((n) => n.t).then((m) => ({ default: m.UpgradeScreen })));
2085
- const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-DQR40F0y.mjs").then((n) => n.t).then((m) => ({ default: m.AppDownloadScreen })));
2084
+ const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-BZZ-RT71.mjs").then((n) => n.n).then((m) => ({ default: m.ShareablesScreen })));
2085
+ const MySiteScreen$1 = lazy(() => import("./MySiteScreen-CK84vXa9.mjs").then((n) => n.n).then((m) => ({ default: m.MySiteScreen })));
2086
+ const UpgradeScreen = lazy(() => import("./UpgradeScreen-X6j0_625.mjs").then((n) => n.t).then((m) => ({ default: m.UpgradeScreen })));
2087
+ const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-DPnbWP5G.mjs").then((n) => n.t).then((m) => ({ default: m.AppDownloadScreen })));
2086
2088
  const SYSTEM_SLUG_SCREEN_MAP = {
2087
2089
  profile: ProfileScreen$1,
2088
2090
  account: ProfileScreen$1,
@@ -2122,7 +2124,6 @@ function findScreenByPrefix(slug) {
2122
2124
  }
2123
2125
  //#endregion
2124
2126
  //#region src/shell/PageRouter.tsx
2125
- const ACCOUNT_SLUGS = new Set([...ACCOUNT_MANAGE_SLUGS, "account"]);
2126
2127
  /**
2127
2128
  * Returns true if any nav slug resolves to the given system screen component.
2128
2129
  * Lets detail routes (e.g. `share/product/:id`) render when their listing
@@ -2141,7 +2142,14 @@ function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlu
2141
2142
  }, [screens]);
2142
2143
  const screenBySlug = useMemo(() => {
2143
2144
  if (!screens || screens.length === 0) return void 0;
2144
- return new Map(screens.filter((s) => s.slug).map((s) => [s.slug, s]));
2145
+ const map = /* @__PURE__ */ new Map();
2146
+ for (const s of screens) if (s.slug) map.set(s.slug, s);
2147
+ for (const s of screens) {
2148
+ if (!s.name) continue;
2149
+ const nameSlug = slugifyName(s.name);
2150
+ if (nameSlug && !map.has(nameSlug)) map.set(nameSlug, s);
2151
+ }
2152
+ return map;
2145
2153
  }, [screens]);
2146
2154
  const builderScreen = useMemo(() => {
2147
2155
  if (currentNavItem?.screen_id && screenById) {
@@ -2171,75 +2179,18 @@ function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlu
2171
2179
  }
2172
2180
  const SystemScreen = SYSTEM_SLUG_SCREEN_MAP[baseSlug] ?? findScreenByPrefix(currentSlug);
2173
2181
  const systemScreenInNav = navSlugs === void 0 || SystemScreen !== void 0 && (ALWAYS_AVAILABLE_SYSTEM_SCREENS.has(SystemScreen) || isSystemScreenCoveredByNav(SystemScreen, navSlugs));
2174
- if (SystemScreen && systemScreenInNav) {
2175
- const content = /* @__PURE__ */ jsx(Suspense, {
2176
- fallback: /* @__PURE__ */ jsx("div", {
2177
- className: "flex h-full items-center justify-center",
2178
- children: /* @__PURE__ */ jsx("div", { className: "border-primary h-8 w-8 animate-spin rounded-full border-2 border-t-transparent" })
2179
- }),
2180
- children: /* @__PURE__ */ jsx(SystemScreen, {})
2181
- });
2182
- if (ACCOUNT_SLUGS.has(baseSlug)) return /* @__PURE__ */ jsx(AccountManageLayout, { children: content });
2183
- return content;
2184
- }
2182
+ if (SystemScreen && systemScreenInNav) return /* @__PURE__ */ jsx(Suspense, {
2183
+ fallback: /* @__PURE__ */ jsx("div", {
2184
+ className: "flex h-full items-center justify-center",
2185
+ children: /* @__PURE__ */ jsx("div", { className: "border-primary h-8 w-8 animate-spin rounded-full border-2 border-t-transparent" })
2186
+ }),
2187
+ children: /* @__PURE__ */ jsx(SystemScreen, {})
2188
+ });
2185
2189
  if (isSystemNavigationItem(baseSlug)) return /* @__PURE__ */ jsx(CoreScreenPlaceholder, { name: currentNavItem?.label ?? baseSlug });
2186
2190
  if (builderScreen) return /* @__PURE__ */ jsx(BuilderScreenView, { screen: builderScreen });
2187
2191
  return /* @__PURE__ */ jsx(ScreenNotFound, { name: currentNavItem?.label ?? currentSlug });
2188
2192
  }
2189
2193
  //#endregion
2190
- //#region ../core/src/navigation/slug-utils.ts
2191
- /**
2192
- * Extract all slugs from a navigation tree, sorted by segment count descending.
2193
- * Longest slugs first enables greedy prefix matching (e.g. "share/playlists"
2194
- * is checked before "share").
2195
- */
2196
- function collectNavSlugs(items) {
2197
- const slugs = [];
2198
- for (const item of items) {
2199
- if (item.slug) slugs.push(normalizeSlug(item.slug));
2200
- for (const child of item.children ?? []) if (child.slug) slugs.push(normalizeSlug(child.slug));
2201
- }
2202
- return [...slugs].sort((a, b) => b.split("/").length - a.split("/").length);
2203
- }
2204
- /**
2205
- * Find the longest registered nav slug that is a prefix of `fullSlug`.
2206
- * Uses segment-boundary checking to prevent "shop" from matching "shopping".
2207
- */
2208
- function matchSlugPrefix(fullSlug, navSlugs) {
2209
- const normalized = normalizeSlug(fullSlug);
2210
- if (!normalized) return void 0;
2211
- for (const navSlug of navSlugs) {
2212
- if (normalized === navSlug) return {
2213
- matchedSlug: navSlug,
2214
- rest: ""
2215
- };
2216
- if (normalized.startsWith(navSlug + "/")) return {
2217
- matchedSlug: navSlug,
2218
- rest: normalized.slice(navSlug.length + 1)
2219
- };
2220
- }
2221
- }
2222
- /**
2223
- * Extract the slug portion from a full pathname by stripping the basePath prefix.
2224
- * Returns an empty string when the pathname equals the basePath exactly.
2225
- *
2226
- * Examples:
2227
- * extractSlugFromPathname("/contacts/123", "/") → "contacts/123"
2228
- * extractSlugFromPathname("/portal/contacts", "/portal") → "contacts"
2229
- * extractSlugFromPathname("/portal", "/portal") → ""
2230
- * extractSlugFromPathname("/", "/") → ""
2231
- */
2232
- function extractSlugFromPathname(pathname, basePath) {
2233
- if (basePath === "/") return pathname.replace(/^\//, "");
2234
- if (pathname.startsWith(basePath)) return pathname.slice(basePath.length).replace(/^\//, "");
2235
- return pathname.replace(/^\//, "");
2236
- }
2237
- function isSlugInSection(item, currentSlug, navSlugs) {
2238
- const baseSlug = matchSlugPrefix(currentSlug, navSlugs)?.matchedSlug ?? normalizeSlug(currentSlug);
2239
- if (normalizeSlug(item.slug) === baseSlug) return true;
2240
- return item.children?.some((child) => normalizeSlug(child.slug) === baseSlug) ?? false;
2241
- }
2242
- //#endregion
2243
2194
  //#region src/shell/AppShellErrorBoundary.tsx
2244
2195
  var AppShellErrorBoundary = class extends Component {
2245
2196
  state = { error: null };
@@ -2493,7 +2444,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
2493
2444
  const navSlugs = useMemo(() => collectNavSlugs(filteredNavItems), [filteredNavItems]);
2494
2445
  const allNavSlugs = useMemo(() => {
2495
2446
  const mobileSlugs = collectNavSlugs(filteredMobileNavItems);
2496
- return Array.from(new Set([...navSlugs, ...mobileSlugs]));
2447
+ return Array.from(new Set([...navSlugs, ...mobileSlugs])).sort((a, b) => b.split("/").length - a.split("/").length);
2497
2448
  }, [navSlugs, filteredMobileNavItems]);
2498
2449
  const [themeMode, setThemeMode] = useState(getInitialThemeMode);
2499
2450
  const handleThemeModeChange = useCallback((mode) => {
@@ -2599,11 +2550,11 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
2599
2550
  if (typeof orderToken === "string" && orderToken) handleNavigate(`orders/${orderToken}`);
2600
2551
  }, [handleNavigate]);
2601
2552
  const resolvedSidebarFooter = useMemo(() => sidebarFooter !== void 0 ? sidebarFooter : /* @__PURE__ */ jsx(SdkLogoutButton, { onLogout: logout }), [sidebarFooter, logout]);
2602
- const slugMatch = useMemo(() => matchSlugPrefix(activeSlug, navSlugs), [activeSlug, navSlugs]);
2553
+ const slugMatch = useMemo(() => matchSlugPrefix(activeSlug, allNavSlugs), [activeSlug, allNavSlugs]);
2603
2554
  const baseSlug = slugMatch?.matchedSlug ?? normalizeSlug(activeSlug);
2604
2555
  const restParams = slugMatch?.rest ?? "";
2605
2556
  const mobileSecondLevelTabs = findCurrentSection(filteredMobileNavItems, baseSlug)?.children ?? [];
2606
- const currentNavItem = findNavItem(filteredNavItems, baseSlug);
2557
+ const currentNavItem = findNavItem(filteredNavItems, baseSlug) ?? findNavItem(filteredMobileNavItems, baseSlug);
2607
2558
  const screenTitle = currentNavItem?.label || screens?.find((s) => s.id === currentNavItem?.screen_id)?.name || void 0;
2608
2559
  const content = /* @__PURE__ */ jsx(AppShellErrorBoundary, { children: typeof children === "function" ? children({
2609
2560
  currentSlug: activeSlug,
@@ -3775,17 +3726,17 @@ z.object({
3775
3726
  //#endregion
3776
3727
  //#region src/screens/index.ts
3777
3728
  const screenPropertySchemas = {
3778
- ProfileScreen: () => import("./ProfileScreen-CZAIUM2a.mjs").then((n) => n.n).then((m) => m.profileScreenPropertySchema),
3779
- MessagingScreen: () => import("./MessagingScreen-vb5P-7jP.mjs").then((n) => n.n).then((m) => m.messagingScreenPropertySchema),
3780
- ContactsScreen: () => import("./ContactsScreen-CMBERzKU.mjs").then((n) => n.n).then((m) => m.contactsScreenPropertySchema),
3781
- OrdersScreen: () => import("./OrdersScreen-CPKRShbP.mjs").then((n) => n.n).then((m) => m.ordersScreenPropertySchema),
3782
- SubscriptionsScreen: () => import("./SubscriptionsScreen-CXM2zmF7.mjs").then((n) => n.n).then((m) => m.subscriptionsScreenPropertySchema),
3729
+ ProfileScreen: () => import("./ProfileScreen-CRLf8oDe.mjs").then((n) => n.n).then((m) => m.profileScreenPropertySchema),
3730
+ MessagingScreen: () => import("./MessagingScreen-DiSZ7fyd.mjs").then((n) => n.n).then((m) => m.messagingScreenPropertySchema),
3731
+ ContactsScreen: () => import("./ContactsScreen-DuhDzRtI.mjs").then((n) => n.n).then((m) => m.contactsScreenPropertySchema),
3732
+ OrdersScreen: () => import("./OrdersScreen-b-ZC4_NI.mjs").then((n) => n.n).then((m) => m.ordersScreenPropertySchema),
3733
+ SubscriptionsScreen: () => import("./SubscriptionsScreen-DK9-h3Cz.mjs").then((n) => n.n).then((m) => m.subscriptionsScreenPropertySchema),
3783
3734
  CustomersScreen: () => import("./CustomersScreen-BJOBG5f5.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
3784
- MySiteScreen: () => import("./MySiteScreen-CN0ZDBgy.mjs").then((n) => n.n).then((m) => m.mySiteScreenPropertySchema),
3785
- ShareablesScreen: () => import("./ShareablesScreen-sieWBlAl.mjs").then((n) => n.n).then((m) => m.shareablesScreenPropertySchema),
3786
- ShopScreen: () => import("./ShopScreen-sLUTgIcQ.mjs").then((n) => n.n).then((m) => m.shopScreenPropertySchema),
3787
- UpgradeScreen: () => import("./UpgradeScreen-DnGnWVTf.mjs").then((n) => n.t).then((m) => m.upgradeScreenPropertySchema),
3788
- AppDownloadScreen: () => import("./AppDownloadScreen-DQR40F0y.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema)
3735
+ MySiteScreen: () => import("./MySiteScreen-CK84vXa9.mjs").then((n) => n.n).then((m) => m.mySiteScreenPropertySchema),
3736
+ ShareablesScreen: () => import("./ShareablesScreen-BZZ-RT71.mjs").then((n) => n.n).then((m) => m.shareablesScreenPropertySchema),
3737
+ ShopScreen: () => import("./ShopScreen-BG1pxd2D.mjs").then((n) => n.n).then((m) => m.shopScreenPropertySchema),
3738
+ UpgradeScreen: () => import("./UpgradeScreen-X6j0_625.mjs").then((n) => n.t).then((m) => m.upgradeScreenPropertySchema),
3739
+ AppDownloadScreen: () => import("./AppDownloadScreen-DPnbWP5G.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema)
3789
3740
  };
3790
3741
  /**
3791
3742
  * Core page template IDs