@fluid-app/portal-sdk 0.1.159 → 0.1.161

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 (78) hide show
  1. package/README.md +2 -196
  2. package/dist/{FluidProvider-Cqf2kmUc.mjs → FluidProvider-B00jTGTH.mjs} +1510 -1624
  3. package/dist/FluidProvider-B00jTGTH.mjs.map +1 -0
  4. package/dist/{FluidProvider-Bc-3uN7M.cjs → FluidProvider-BtGi2jJt.cjs} +1458 -1614
  5. package/dist/FluidProvider-BtGi2jJt.cjs.map +1 -0
  6. package/dist/{MessagingScreen-BGqIn-c2.cjs → MessagingScreen-BRCUJDDZ.cjs} +2 -2
  7. package/dist/{MessagingScreen-CbmuvlH6.mjs → MessagingScreen-BWpSXB8Q.mjs} +2 -2
  8. package/dist/{MessagingScreen-CbmuvlH6.mjs.map → MessagingScreen-BWpSXB8Q.mjs.map} +1 -1
  9. package/dist/{MessagingScreen-CBPjP4du.cjs → MessagingScreen-C_OLIWCC.cjs} +2 -2
  10. package/dist/{MessagingScreen-CBPjP4du.cjs.map → MessagingScreen-C_OLIWCC.cjs.map} +1 -1
  11. package/dist/{MySiteScreen-DSDLDnCN.cjs → MySiteScreen-B90qzZPe.cjs} +2 -2
  12. package/dist/{MySiteScreen-Cl6nuU99.cjs → MySiteScreen-DLuHDXB1.cjs} +2 -2
  13. package/dist/{MySiteScreen-Cl6nuU99.cjs.map → MySiteScreen-DLuHDXB1.cjs.map} +1 -1
  14. package/dist/{MySiteScreen-BT1PBPsH.mjs → MySiteScreen-VaOB-vWk.mjs} +2 -2
  15. package/dist/{MySiteScreen-BT1PBPsH.mjs.map → MySiteScreen-VaOB-vWk.mjs.map} +1 -1
  16. package/dist/ProductsScreen-B8OynxlP.cjs +13 -0
  17. package/dist/{ProductsScreen-4WRrJcvw.mjs → ProductsScreen-CbVSNv1l.mjs} +3 -5
  18. package/dist/ProductsScreen-CbVSNv1l.mjs.map +1 -0
  19. package/dist/{ProductsScreen-BCs3YKVk.cjs → ProductsScreen-D1bw4ZIH.cjs} +3 -5
  20. package/dist/ProductsScreen-D1bw4ZIH.cjs.map +1 -0
  21. package/dist/ProductsScreen-Pq3j09nI.mjs +11 -0
  22. package/dist/{ProfileScreen-BgyrIQdL.mjs → ProfileScreen-BCHljkWD.mjs} +2 -2
  23. package/dist/{ProfileScreen-BgyrIQdL.mjs.map → ProfileScreen-BCHljkWD.mjs.map} +1 -1
  24. package/dist/{ProfileScreen-B0KNWXpV.cjs → ProfileScreen-Bf-lYNzz.cjs} +2 -2
  25. package/dist/{ProfileScreen-DLLLRNB2.cjs → ProfileScreen-ksdtbydb.cjs} +2 -2
  26. package/dist/{ProfileScreen-DLLLRNB2.cjs.map → ProfileScreen-ksdtbydb.cjs.map} +1 -1
  27. package/dist/{ShareablesScreen-ySSwCVSI.cjs → ShareablesScreen-6wgiwi_9.cjs} +3 -5
  28. package/dist/ShareablesScreen-6wgiwi_9.cjs.map +1 -0
  29. package/dist/{ShareablesScreen-B8cmh8JC.mjs → ShareablesScreen-BLCukNTk.mjs} +3 -5
  30. package/dist/{ShareablesScreen-B8cmh8JC.mjs.map → ShareablesScreen-BLCukNTk.mjs.map} +1 -1
  31. package/dist/ShareablesScreen-CM9OH-Nx.mjs +11 -0
  32. package/dist/ShareablesScreen-rmLcUhbL.cjs +13 -0
  33. package/dist/{ShopScreen-DhMo8bvP.cjs → ShopScreen-8KKwwjka.cjs} +3 -3
  34. package/dist/{ShopScreen-DhMo8bvP.cjs.map → ShopScreen-8KKwwjka.cjs.map} +1 -1
  35. package/dist/{ShopScreen-BkvyW0pE.cjs → ShopScreen-CjEbB3Q7.cjs} +2 -2
  36. package/dist/{ShopScreen-BFFGYwdV.mjs → ShopScreen-Dn5LwwYD.mjs} +3 -3
  37. package/dist/{ShopScreen-BFFGYwdV.mjs.map → ShopScreen-Dn5LwwYD.mjs.map} +1 -1
  38. package/dist/{SubscriptionsScreen-RScBCcY0.cjs → SubscriptionsScreen-B16wPAoA.cjs} +2 -2
  39. package/dist/SubscriptionsScreen-B16wPAoA.cjs.map +1 -0
  40. package/dist/{SubscriptionsScreen-CiNR7JUC.mjs → SubscriptionsScreen-B4cTlgDU.mjs} +2 -2
  41. package/dist/SubscriptionsScreen-B4cTlgDU.mjs.map +1 -0
  42. package/dist/{SubscriptionsScreen-DMh-GE6n.cjs → SubscriptionsScreen-nRUMdnx7.cjs} +1 -1
  43. package/dist/{dist-Bg8UyHyM.cjs → dist-lO2OG0T5.cjs} +1 -1
  44. package/dist/{dist-Bg8UyHyM.cjs.map → dist-lO2OG0T5.cjs.map} +1 -1
  45. package/dist/index.cjs +134 -143
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.d.cts +444 -655
  48. package/dist/index.d.cts.map +1 -1
  49. package/dist/index.d.mts +444 -655
  50. package/dist/index.d.mts.map +1 -1
  51. package/dist/index.mjs +127 -130
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/{sortable.esm-Cz-CP2N8.mjs → sortable.esm-DSrWP4x9.mjs} +1 -1
  54. package/dist/{sortable.esm-Cz-CP2N8.mjs.map → sortable.esm-DSrWP4x9.mjs.map} +1 -1
  55. package/dist/{use-portal-products-client-BmlUixy4.cjs → use-portal-products-client-BHSBT64s.cjs} +2 -2
  56. package/dist/use-portal-products-client-BHSBT64s.cjs.map +1 -0
  57. package/dist/{use-portal-products-client-DQK9nFxT.mjs → use-portal-products-client-tbqk6XUq.mjs} +2 -2
  58. package/dist/use-portal-products-client-tbqk6XUq.mjs.map +1 -0
  59. package/dist/{use-portal-shareables-api-KVPj0Jfr.mjs → use-portal-shareables-api-B9B4XTjw.mjs} +107 -201
  60. package/dist/use-portal-shareables-api-B9B4XTjw.mjs.map +1 -0
  61. package/dist/{use-portal-shareables-api-D5D6uIJy.cjs → use-portal-shareables-api-MBl0d0eQ.cjs} +106 -206
  62. package/dist/use-portal-shareables-api-MBl0d0eQ.cjs.map +1 -0
  63. package/package.json +13 -13
  64. package/dist/FluidProvider-Bc-3uN7M.cjs.map +0 -1
  65. package/dist/FluidProvider-Cqf2kmUc.mjs.map +0 -1
  66. package/dist/ProductsScreen-4WRrJcvw.mjs.map +0 -1
  67. package/dist/ProductsScreen-BCs3YKVk.cjs.map +0 -1
  68. package/dist/ProductsScreen-BR9TN4So.cjs +0 -48
  69. package/dist/ProductsScreen-Da6eWJ_c.mjs +0 -46
  70. package/dist/ShareablesScreen-DW0wCYOj.mjs +0 -46
  71. package/dist/ShareablesScreen-DbPJOtCF.cjs +0 -48
  72. package/dist/ShareablesScreen-ySSwCVSI.cjs.map +0 -1
  73. package/dist/SubscriptionsScreen-CiNR7JUC.mjs.map +0 -1
  74. package/dist/SubscriptionsScreen-RScBCcY0.cjs.map +0 -1
  75. package/dist/use-portal-products-client-BmlUixy4.cjs.map +0 -1
  76. package/dist/use-portal-products-client-DQK9nFxT.mjs.map +0 -1
  77. package/dist/use-portal-shareables-api-D5D6uIJy.cjs.map +0 -1
  78. package/dist/use-portal-shareables-api-KVPj0Jfr.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./es-Bstiidl5.mjs";
2
- import { $ as deleteDatabase, A as DEFAULT_SPACING, B as resolveTheme, C as transformThemes, D as DEFAULT_FONT_FAMILIES, E as DEFAULT_COLORS, F as deriveDarkVariant, G as SHADE_STEPS, H as FONT_SIZE_KEYS, I as generateShades, L as getForegroundColor, M as DEFAULT_THEME_NAME, N as getDefaultThemeDefinition, O as DEFAULT_FONT_SIZES, P as generateThemeCSS, Q as createPersister, R as mergeDarkOverrides, S as getActiveThemeId, T as serialiseTheme, U as RADIUS_KEYS, V as FONT_FAMILY_KEYS, W as SEMANTIC_COLOR_NAMES, X as useAppDefinitionApi, Z as useFluidOsApi, _ as toScreenDefinition, a as createScreen, b as removeTheme, c as FluidThemeProvider, d as createFluidClient, f as isApiError, g as normalizeComponentTree, h as toNavigationItem, i as widgetPropertySchemas, j as DEFAULT_THEME_ID, k as DEFAULT_RADII, l as useThemeContext, m as transformManifestToRepAppData, n as useFluidContext, o as createWidgetFromShareable, p as toRawManifest, r as DEFAULT_SDK_WIDGET_REGISTRY, s as createWidgetRegistry, t as FluidProvider, u as ApiError, v as applyTheme, w as deserialiseTheme, x as buildThemeDefinition, y as removeAllThemes, z as parseColor } from "./FluidProvider-Cqf2kmUc.mjs";
2
+ import { A as mergeDarkOverrides, C as DEFAULT_THEME_ID, D as deriveDarkVariant, E as generateThemeCSS, F as RADIUS_KEYS, G as createPersister, I as SEMANTIC_COLOR_NAMES, K as deleteDatabase, L as SHADE_STEPS, M as resolveTheme, N as FONT_FAMILY_KEYS, O as generateShades, P as FONT_SIZE_KEYS, R as ApiError, S as DEFAULT_SPACING, T as getDefaultThemeDefinition, U as useAppDefinitionApi, W as useFluidOsApi, _ as serialiseTheme, a as createScreen, b as DEFAULT_FONT_SIZES, c as FluidThemeProvider, d as removeAllThemes, f as removeTheme, g as deserialiseTheme, h as transformThemes, i as widgetPropertySchemas, j as parseColor, k as getForegroundColor, l as useThemeContext, m as getActiveThemeId, n as useFluidContext, o as createWidgetFromShareable, p as buildThemeDefinition, r as DEFAULT_SDK_WIDGET_REGISTRY, s as createWidgetRegistry, t as FluidProvider, u as applyTheme, v as DEFAULT_COLORS, w as DEFAULT_THEME_NAME, x as DEFAULT_RADII, y as DEFAULT_FONT_FAMILIES, z as isApiError } from "./FluidProvider-B00jTGTH.mjs";
3
3
  import "./account-api-context-R4VVlZdv.mjs";
4
4
  import "./mysite-api-context-C7eiw7TO.mjs";
5
5
  import "./countries-api-context-D0dubtHy.mjs";
@@ -19,7 +19,7 @@ import { r as calendarWidgetPropertySchema, t as CalendarWidget } from "./Calend
19
19
  import { r as cardWidgetPropertySchema, t as CardWidget } from "./CardWidget-DrOQVT6K.mjs";
20
20
  import "./purify.es-MQBOoEgB.mjs";
21
21
  import { an as Button, at as Popover, ct as Collapsible, lt as CollapsibleContent, ot as PopoverContent, st as PopoverTrigger, ut as CollapsibleTrigger } from "./src-BsT7Sq_P.mjs";
22
- import { a as useMessagingConfig, i as createFluidFileUploader, o as useMessagingAuth, r as messagingScreenPropertySchema, t as MessagingScreen } from "./MessagingScreen-CbmuvlH6.mjs";
22
+ import { a as useMessagingConfig, i as createFluidFileUploader, o as useMessagingAuth, r as messagingScreenPropertySchema, t as MessagingScreen } from "./MessagingScreen-BWpSXB8Q.mjs";
23
23
  import "./scroll-arrows-EzuBEkDF.mjs";
24
24
  import "./MediaRenderer-Or2bLge-.mjs";
25
25
  import { r as carouselWidgetPropertySchema, t as CarouselWidget } from "./CarouselWidget-DxutHcbM.mjs";
@@ -42,7 +42,7 @@ import { i as useScreenHeaderContext, t as ScreenHeaderProvider } from "./Screen
42
42
  import { t as useAccount } from "./use-account-BJhzTl2j.mjs";
43
43
  import { i as CoreScreenPlaceholder, r as customersScreenPropertySchema, t as CustomersScreen } from "./CustomersScreen-DbaqP6jd.mjs";
44
44
  import { n as useAppNavigation, t as AppNavigationProvider } from "./AppNavigationContext-D29xW9Ua.mjs";
45
- import { r as profileScreenPropertySchema, t as ProfileScreen } from "./ProfileScreen-BgyrIQdL.mjs";
45
+ import { r as profileScreenPropertySchema, t as ProfileScreen } from "./ProfileScreen-BCHljkWD.mjs";
46
46
  import "./dist-CkIGP8my.mjs";
47
47
  import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-BOp7_5HV.mjs";
48
48
  import "./SearchSort-Bsnis-kb.mjs";
@@ -50,13 +50,13 @@ import "./order-status-badge-DEuMgKkP.mjs";
50
50
  import "./src-DAC9DwXZ.mjs";
51
51
  import "./dist-C9vpl_rR.mjs";
52
52
  import { r as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-CaNiwSih.mjs";
53
- import { r as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-CiNR7JUC.mjs";
54
- import "./use-portal-shareables-api-KVPj0Jfr.mjs";
55
- import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-B8cmh8JC.mjs";
56
- import "./sortable.esm-Cz-CP2N8.mjs";
57
- import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-4WRrJcvw.mjs";
58
- import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-BT1PBPsH.mjs";
59
- import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-BFFGYwdV.mjs";
53
+ import { r as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-B4cTlgDU.mjs";
54
+ import "./use-portal-shareables-api-B9B4XTjw.mjs";
55
+ import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-BLCukNTk.mjs";
56
+ import "./sortable.esm-DSrWP4x9.mjs";
57
+ import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-CbVSNv1l.mjs";
58
+ import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-VaOB-vWk.mjs";
59
+ import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-Dn5LwwYD.mjs";
60
60
  import "./UpgradeScreen-D9WpmFa1.mjs";
61
61
  import "./AppDownloadScreen-1e6AaZ4X.mjs";
62
62
  import * as React$1 from "react";
@@ -1371,6 +1371,108 @@ function useCompanyScopedQueryKey() {
1371
1371
  };
1372
1372
  }
1373
1373
  //#endregion
1374
+ //#region src/transforms/screen-transforms.ts
1375
+ /**
1376
+ * Normalize component_tree to always be an array.
1377
+ * The API stores component_tree as a hash (object), but the frontend expects an array.
1378
+ */
1379
+ function normalizeComponentTree(componentTree) {
1380
+ if (!componentTree) return [];
1381
+ if (Array.isArray(componentTree)) return componentTree;
1382
+ if (typeof componentTree === "object") return [componentTree];
1383
+ return [];
1384
+ }
1385
+ /**
1386
+ * Convert a raw FluidOS screen to ScreenDefinition.
1387
+ * Normalizes component_tree and converts string IDs to numbers.
1388
+ */
1389
+ function toScreenDefinition(screen) {
1390
+ return {
1391
+ id: Number(screen.id),
1392
+ slug: screen.slug ?? "",
1393
+ name: screen.name ?? "",
1394
+ component_tree: normalizeComponentTree(screen.component_tree)
1395
+ };
1396
+ }
1397
+ //#endregion
1398
+ //#region src/transforms/navigation-transforms.ts
1399
+ /**
1400
+ * Convert a raw FluidOS navigation item to NavigationItem.
1401
+ * Recursively transforms children and sorts by position.
1402
+ */
1403
+ function toNavigationItem(item) {
1404
+ const children = (item.children ?? []).map(toNavigationItem).sort((a, b) => (a.position ?? 0) - (b.position ?? 0));
1405
+ return {
1406
+ id: Number(item.id),
1407
+ label: item.label ?? "Untitled",
1408
+ ...item.slug != null ? { slug: String(item.slug) } : {},
1409
+ ...item.icon != null ? { icon: String(item.icon) } : {},
1410
+ ...item.screen_id != null ? { screen_id: Number(item.screen_id) } : {},
1411
+ ...item.parent_id != null ? { parent_id: Number(item.parent_id) } : {},
1412
+ ...item.source != null ? { source: item.source } : {},
1413
+ position: item.position ?? 0,
1414
+ children
1415
+ };
1416
+ }
1417
+ //#endregion
1418
+ //#region src/transforms/index.ts
1419
+ /**
1420
+ * Convert a raw FluidOS API response to RawManifestResponse.
1421
+ *
1422
+ * The wire format includes `navigation_items` and full theme objects,
1423
+ * but the generated OpenAPI types differ (e.g. `navigation_tree`, `themes: number[]`).
1424
+ * This function bridges that gap so callers avoid `as unknown as` casts.
1425
+ */
1426
+ function toRawManifest(raw) {
1427
+ if (!raw.manifest) throw new Error("FluidOS API returned empty manifest");
1428
+ return raw;
1429
+ }
1430
+ /**
1431
+ * Transform a raw FluidOS manifest API response into RepAppData.
1432
+ *
1433
+ * This is the top-level transform used by `useFluidApp` and `useFluidProfile`.
1434
+ * It handles:
1435
+ * - Theme transformation (legacy and new formats)
1436
+ * - Screen normalization (component_tree array wrapping)
1437
+ * - Navigation item transformation (recursive with position sorting)
1438
+ */
1439
+ function transformManifestToRepAppData(response) {
1440
+ const manifest = response.manifest;
1441
+ const rawProfile = manifest.profile;
1442
+ const rawThemes = Array.isArray(rawProfile?.themes) ? rawProfile.themes : [];
1443
+ const screens = (manifest.screens ?? []).map((screen) => toScreenDefinition(screen));
1444
+ const navigationItems = (rawProfile?.navigation?.navigation_items ?? []).map(toNavigationItem);
1445
+ const nav = rawProfile?.navigation;
1446
+ const mobileNav = rawProfile?.mobile_navigation;
1447
+ const mobileNavigationItems = (mobileNav?.navigation_items ?? []).map(toNavigationItem);
1448
+ const activeThemeId = getActiveThemeId(rawThemes);
1449
+ return {
1450
+ definition_id: manifest.definition_id,
1451
+ published_version: manifest.published_version ?? 0,
1452
+ screens,
1453
+ profile: {
1454
+ name: rawProfile?.name ?? "Default",
1455
+ definition_id: rawProfile?.definition_id ?? manifest.definition_id,
1456
+ themes: transformThemes(rawThemes),
1457
+ ...activeThemeId !== void 0 ? { activeThemeId } : {},
1458
+ navigation: {
1459
+ definition_id: nav?.definition_id ?? manifest.definition_id,
1460
+ id: nav?.id ?? 0,
1461
+ name: nav?.name ?? "Main Navigation",
1462
+ navigation_items: navigationItems,
1463
+ screens
1464
+ },
1465
+ ...mobileNav ? { mobile_navigation: {
1466
+ definition_id: mobileNav.definition_id ?? manifest.definition_id,
1467
+ id: mobileNav.id ?? 0,
1468
+ name: mobileNav.name ?? "Mobile Navigation",
1469
+ navigation_items: mobileNavigationItems,
1470
+ screens
1471
+ } } : {}
1472
+ }
1473
+ };
1474
+ }
1475
+ //#endregion
1374
1476
  //#region src/hooks/use-fluid-app.ts
1375
1477
  /**
1376
1478
  * Base query key for full app data (fluidos endpoint).
@@ -2459,16 +2561,16 @@ function AccountManageLayout({ children }) {
2459
2561
  }
2460
2562
  //#endregion
2461
2563
  //#region src/shell/system-screen-map.ts
2462
- const ProfileScreen$1 = lazy(() => import("./ProfileScreen-BgyrIQdL.mjs").then((n) => n.n).then((m) => ({ default: m.ProfileScreen })));
2564
+ const ProfileScreen$1 = lazy(() => import("./ProfileScreen-BCHljkWD.mjs").then((n) => n.n).then((m) => ({ default: m.ProfileScreen })));
2463
2565
  const OrdersScreen$1 = lazy(() => import("./OrdersScreen-CaNiwSih.mjs").then((n) => n.n).then((m) => ({ default: m.OrdersScreen })));
2464
- const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-CiNR7JUC.mjs").then((n) => n.n).then((m) => ({ default: m.SubscriptionsScreen })));
2465
- const MessagingScreen$1 = lazy(() => import("./MessagingScreen-CbmuvlH6.mjs").then((n) => n.n).then((m) => ({ default: m.MessagingScreen })));
2566
+ const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-B4cTlgDU.mjs").then((n) => n.n).then((m) => ({ default: m.SubscriptionsScreen })));
2567
+ const MessagingScreen$1 = lazy(() => import("./MessagingScreen-BWpSXB8Q.mjs").then((n) => n.n).then((m) => ({ default: m.MessagingScreen })));
2466
2568
  const ContactsScreen$1 = lazy(() => import("./ContactsScreen-BOp7_5HV.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
2467
- const ShopScreen$1 = lazy(() => import("./ShopScreen-BFFGYwdV.mjs").then((n) => n.n).then((m) => ({ default: m.ShopScreen })));
2569
+ const ShopScreen$1 = lazy(() => import("./ShopScreen-Dn5LwwYD.mjs").then((n) => n.n).then((m) => ({ default: m.ShopScreen })));
2468
2570
  const CustomersScreen$1 = lazy(() => import("./CustomersScreen-DbaqP6jd.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
2469
- const ProductsScreen$1 = lazy(() => import("./ProductsScreen-Da6eWJ_c.mjs").then((m) => ({ default: m.ProductsScreen })));
2470
- const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-DW0wCYOj.mjs").then((m) => ({ default: m.ShareablesScreen })));
2471
- const MySiteScreen$1 = lazy(() => import("./MySiteScreen-BT1PBPsH.mjs").then((n) => n.n).then((m) => ({ default: m.MySiteScreen })));
2571
+ const ProductsScreen$1 = lazy(() => import("./ProductsScreen-Pq3j09nI.mjs").then((m) => ({ default: m.ProductsScreen })));
2572
+ const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-CM9OH-Nx.mjs").then((m) => ({ default: m.ShareablesScreen })));
2573
+ const MySiteScreen$1 = lazy(() => import("./MySiteScreen-VaOB-vWk.mjs").then((n) => n.n).then((m) => ({ default: m.MySiteScreen })));
2472
2574
  const UpgradeScreen = lazy(() => import("./UpgradeScreen-D9WpmFa1.mjs").then((n) => n.t).then((m) => ({ default: m.UpgradeScreen })));
2473
2575
  const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-1e6AaZ4X.mjs").then((n) => n.t).then((m) => ({ default: m.AppDownloadScreen })));
2474
2576
  const SYSTEM_SLUG_SCREEN_MAP = {
@@ -3017,29 +3119,6 @@ function createPortal(config = {}) {
3017
3119
  createRoot(rootElement).render(config.disableStrictMode ? tree : /* @__PURE__ */ jsx(StrictMode, { children: tree }));
3018
3120
  }
3019
3121
  //#endregion
3020
- //#region src/hooks/use-fluid-api.ts
3021
- /**
3022
- * Hook to access the Fluid API client
3023
- *
3024
- * @example
3025
- * ```tsx
3026
- * function RepProfile() {
3027
- * const api = useFluidApi();
3028
- *
3029
- * const { data: rep } = useQuery({
3030
- * queryKey: ["rep"],
3031
- * queryFn: () => api.reps.current(),
3032
- * });
3033
- *
3034
- * return <p>Hello, {rep?.first_name}</p>;
3035
- * }
3036
- * ```
3037
- */
3038
- function useFluidApi() {
3039
- const { client } = useFluidContext();
3040
- return client;
3041
- }
3042
- //#endregion
3043
3122
  //#region src/hooks/use-fluid-profile.ts
3044
3123
  /**
3045
3124
  * Base query key for profile data.
@@ -3088,53 +3167,6 @@ function useFluidProfile() {
3088
3167
  });
3089
3168
  }
3090
3169
  //#endregion
3091
- //#region src/hooks/use-fluid-permissions.ts
3092
- /**
3093
- * Base query key for permissions data.
3094
- * Kept for backwards compatibility — the runtime key used by the hook
3095
- * includes a company prefix via {@link useCompanyScopedQueryKey}.
3096
- */
3097
- const PERMISSIONS_QUERY_KEY = ["fluid", "permissions"];
3098
- /**
3099
- * Hook to fetch and check user permissions
3100
- *
3101
- * @example
3102
- * ```tsx
3103
- * function TeamSettings() {
3104
- * const { can, isSuperAdmin } = useFluidPermissions();
3105
- *
3106
- * if (!can("team", "manage")) {
3107
- * return <AccessDenied />;
3108
- * }
3109
- *
3110
- * return <TeamSettingsForm canDelete={can("team", "delete")} />;
3111
- * }
3112
- * ```
3113
- */
3114
- function useFluidPermissions() {
3115
- const api = useFluidApi();
3116
- const { scopeKey } = useCompanyScopedQueryKey();
3117
- const query = useQuery({
3118
- queryKey: scopeKey(PERMISSIONS_QUERY_KEY),
3119
- queryFn: () => api.permissions.get()
3120
- });
3121
- const permissions = query.data;
3122
- return {
3123
- query,
3124
- permissions,
3125
- can: useMemo(() => {
3126
- return (resource, action = "view") => {
3127
- if (!permissions) return false;
3128
- if (permissions.is_super_admin) return true;
3129
- const resourcePermissions = permissions.permissions[resource];
3130
- if (!resourcePermissions) return false;
3131
- return resourcePermissions[action] ?? false;
3132
- };
3133
- }, [permissions]),
3134
- isSuperAdmin: permissions?.is_super_admin ?? false
3135
- };
3136
- }
3137
- //#endregion
3138
3170
  //#region src/hooks/use-fluid-theme.ts
3139
3171
  /**
3140
3172
  * Hook to access and control theme settings
@@ -3178,41 +3210,6 @@ function useFluidTheme() {
3178
3210
  };
3179
3211
  }
3180
3212
  //#endregion
3181
- //#region src/hooks/use-current-rep.ts
3182
- /**
3183
- * Base query key for current rep data.
3184
- * Kept for backwards compatibility — the runtime key used by the hook
3185
- * includes a company prefix via {@link useCompanyScopedQueryKey}.
3186
- */
3187
- const CURRENT_REP_QUERY_KEY = ["fluid", "currentRep"];
3188
- /**
3189
- * Hook to fetch the currently authenticated rep's profile
3190
- *
3191
- * @example
3192
- * ```tsx
3193
- * function RepHeader() {
3194
- * const { data: rep, isLoading } = useCurrentRep();
3195
- *
3196
- * if (isLoading) return <Skeleton />;
3197
- *
3198
- * return (
3199
- * <div>
3200
- * <Avatar src={rep?.avatar_url} />
3201
- * <span>{rep?.first_name} {rep?.last_name}</span>
3202
- * </div>
3203
- * );
3204
- * }
3205
- * ```
3206
- */
3207
- function useCurrentRep() {
3208
- const api = useFluidApi();
3209
- const { scopeKey } = useCompanyScopedQueryKey();
3210
- return useQuery({
3211
- queryKey: scopeKey(CURRENT_REP_QUERY_KEY),
3212
- queryFn: () => api.reps.current()
3213
- });
3214
- }
3215
- //#endregion
3216
3213
  //#region src/hooks/use-company-switch.ts
3217
3214
  /**
3218
3215
  * Hook that handles company switching for the portal.
@@ -4030,16 +4027,16 @@ z.object({
4030
4027
  //#endregion
4031
4028
  //#region src/screens/index.ts
4032
4029
  const screenPropertySchemas = {
4033
- ProfileScreen: () => import("./ProfileScreen-BgyrIQdL.mjs").then((n) => n.n).then((m) => m.profileScreenPropertySchema),
4034
- MessagingScreen: () => import("./MessagingScreen-CbmuvlH6.mjs").then((n) => n.n).then((m) => m.messagingScreenPropertySchema),
4030
+ ProfileScreen: () => import("./ProfileScreen-BCHljkWD.mjs").then((n) => n.n).then((m) => m.profileScreenPropertySchema),
4031
+ MessagingScreen: () => import("./MessagingScreen-BWpSXB8Q.mjs").then((n) => n.n).then((m) => m.messagingScreenPropertySchema),
4035
4032
  ContactsScreen: () => import("./ContactsScreen-BOp7_5HV.mjs").then((n) => n.n).then((m) => m.contactsScreenPropertySchema),
4036
4033
  OrdersScreen: () => import("./OrdersScreen-CaNiwSih.mjs").then((n) => n.n).then((m) => m.ordersScreenPropertySchema),
4037
- SubscriptionsScreen: () => import("./SubscriptionsScreen-CiNR7JUC.mjs").then((n) => n.n).then((m) => m.subscriptionsScreenPropertySchema),
4034
+ SubscriptionsScreen: () => import("./SubscriptionsScreen-B4cTlgDU.mjs").then((n) => n.n).then((m) => m.subscriptionsScreenPropertySchema),
4038
4035
  CustomersScreen: () => import("./CustomersScreen-DbaqP6jd.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
4039
- ProductsScreen: () => import("./ProductsScreen-Da6eWJ_c.mjs").then((m) => m.productsScreenPropertySchema),
4040
- MySiteScreen: () => import("./MySiteScreen-BT1PBPsH.mjs").then((n) => n.n).then((m) => m.mySiteScreenPropertySchema),
4041
- ShareablesScreen: () => import("./ShareablesScreen-DW0wCYOj.mjs").then((m) => m.shareablesScreenPropertySchema),
4042
- ShopScreen: () => import("./ShopScreen-BFFGYwdV.mjs").then((n) => n.n).then((m) => m.shopScreenPropertySchema),
4036
+ ProductsScreen: () => import("./ProductsScreen-Pq3j09nI.mjs").then((m) => m.productsScreenPropertySchema),
4037
+ MySiteScreen: () => import("./MySiteScreen-VaOB-vWk.mjs").then((n) => n.n).then((m) => m.mySiteScreenPropertySchema),
4038
+ ShareablesScreen: () => import("./ShareablesScreen-CM9OH-Nx.mjs").then((m) => m.shareablesScreenPropertySchema),
4039
+ ShopScreen: () => import("./ShopScreen-Dn5LwwYD.mjs").then((n) => n.n).then((m) => m.shopScreenPropertySchema),
4043
4040
  UpgradeScreen: () => import("./UpgradeScreen-D9WpmFa1.mjs").then((n) => n.t).then((m) => m.upgradeScreenPropertySchema),
4044
4041
  AppDownloadScreen: () => import("./AppDownloadScreen-1e6AaZ4X.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema)
4045
4042
  };
@@ -4363,6 +4360,6 @@ const SCAFFOLD_MANIFEST = {
4363
4360
  ]
4364
4361
  };
4365
4362
  //#endregion
4366
- export { ACTIVITY_SLUGS, APP_DATA_QUERY_KEY, APP_DEFINITION_QUERY_KEY, AlertWidget, ApiError, AppLink, AppNavigationProvider, AppShell, BuilderScreenView, BulletListWidget, CORE_PAGE_IDS, CURRENT_REP_QUERY_KEY, CalendarWidget, CardWidget, CarouselWidget, CatchUpWidget, ChartWidget, ContactsScreen, ContainerWidget, CustomersScreen, DEFAULT_COLORS, DEFAULT_FONT_FAMILIES, DEFAULT_FONT_SIZES, DEFAULT_RADII, DEFAULT_SDK_WIDGET_REGISTRY, DEFAULT_SPACING, DEFAULT_THEME_ID, DEFAULT_THEME_NAME, EmbedWidget, FONT_FAMILY_KEYS, FONT_SIZE_KEYS, FluidProvider, FluidThemeProvider, ImageWidget, LayoutWidget, LinkWidget, ListWidget, MessagingScreen, MySiteScreen, MySiteWidget, NestedWidget, OrdersScreen, PAGE_CATEGORIES, PERMISSIONS_QUERY_KEY, PROFILE_QUERY_KEY, PROPERTY_FIELD_TYPES, PageRouter, PageTemplateProvider, PageTemplateRegistry, PointsWidget, ProductsScreen, ProfileScreen, QuickLinksDropdown, QuickShareWidget, RADIUS_KEYS, RecentActivityWidget, SCAFFOLD_MANIFEST, SEMANTIC_COLOR_NAMES, SHADE_STEPS, SdkCompanySwitcher, SdkHeader, SdkNavigation, SeparatorWidget, ShareablesScreen, ShopScreen, SpacerWidget, SubscriptionsScreen, TableWidget, TextWidget, ThemeModeProvider, ToDoWidget, USER_TYPES, VideoWidget, WIDGET_TYPE_NAMES, alertWidgetPropertySchema, applyTheme, assertDefined, assertNever, buildThemeDefinition, buildWidgetRegistry, bulletListWidgetPropertySchema, calendarWidgetPropertySchema, cardWidgetPropertySchema, carouselWidgetPropertySchema, catchUpWidgetPropertySchema, chartWidgetPropertySchema, collectNavSlugs, contactsScreenPropertySchema, containerWidgetPropertySchema, createCompanyQueryKey, createDefaultFluidConfig, createFluidClient, createFluidFileUploader, createPortal, createScreen, createWidgetFromShareable, createWidgetRegistry, customersScreenPropertySchema, deriveDarkVariant, deserialiseTheme, embedWidgetPropertySchema, extractSlugFromPathname, filterRepOnlyNavItems, gapValues, generateShades, generateThemeCSS, getActiveThemeId, getAvailablePageTemplates, getCorePageTemplates, getDefaultThemeDefinition, getForegroundColor, getOptionalPageTemplates, getProperty, getThemeModeAttribute, groupChildrenByColumn, hasData, imageWidgetPropertySchema, isActivitySlug, isApiError, isContactStatus, isErrorResult, isIdle, isLoading, isPropertyFieldType, isSlugInSection, isUserType, isWidgetType, isWidgetTypeName, layoutWidgetPropertySchema, linkWidgetPropertySchema, listWidgetPropertySchema, matchSlugPrefix, mergeDarkOverrides, messagingScreenPropertySchema, mySiteScreenPropertySchema, mySiteWidgetPropertySchema, nestedWidgetPropertySchema, normalizeComponentTree, ordersScreenPropertySchema, parseColor, pointsWidgetPropertySchema, productsScreenPropertySchema, profileScreenPropertySchema, quickShareWidgetPropertySchema, recentActivityWidgetPropertySchema, removeAllThemes, removeTheme, resolveNavigationPages, resolveTheme, screenPropertySchemas, sectionLayoutConfig, selectProperty, separatorWidgetPropertySchema, serialiseTheme, shareablesScreenPropertySchema, shopScreenPropertySchema, spacerWidgetPropertySchema, subscriptionsScreenPropertySchema, tableWidgetPropertySchema, textWidgetPropertySchema, toDoWidgetPropertySchema, toNavigationItem, toRawManifest, toScreenDefinition, transformManifestToRepAppData, transformThemes, useActivities, useAppDefinition, useAppDefinitionApi, useAppNavigation, useCalendarEvents, useCatchUps, useCompanyScopedQueryKey, useCompanySwitch, useContact, useContacts, useConversationMessages, useConversations, useCurrentRep, useFluidApi, useFluidApp, useFluidContext, useFluidPermissions, useFluidProfile, useFluidTheme, useLogout, useMessagingAuth, useMessagingConfig, useMySite, usePageTemplates, usePortalTenantClient, useResolvedPages, useThemeContext, useThemeMode, useTodos, validateNavigationPages, videoWidgetPropertySchema, widgetPropertySchemas };
4363
+ export { ACTIVITY_SLUGS, APP_DATA_QUERY_KEY, APP_DEFINITION_QUERY_KEY, AlertWidget, ApiError, AppLink, AppNavigationProvider, AppShell, BuilderScreenView, BulletListWidget, CORE_PAGE_IDS, CalendarWidget, CardWidget, CarouselWidget, CatchUpWidget, ChartWidget, ContactsScreen, ContainerWidget, CustomersScreen, DEFAULT_COLORS, DEFAULT_FONT_FAMILIES, DEFAULT_FONT_SIZES, DEFAULT_RADII, DEFAULT_SDK_WIDGET_REGISTRY, DEFAULT_SPACING, DEFAULT_THEME_ID, DEFAULT_THEME_NAME, EmbedWidget, FONT_FAMILY_KEYS, FONT_SIZE_KEYS, FluidProvider, FluidThemeProvider, ImageWidget, LayoutWidget, LinkWidget, ListWidget, MessagingScreen, MySiteScreen, MySiteWidget, NestedWidget, OrdersScreen, PAGE_CATEGORIES, PROFILE_QUERY_KEY, PROPERTY_FIELD_TYPES, PageRouter, PageTemplateProvider, PageTemplateRegistry, PointsWidget, ProductsScreen, ProfileScreen, QuickLinksDropdown, QuickShareWidget, RADIUS_KEYS, RecentActivityWidget, SCAFFOLD_MANIFEST, SEMANTIC_COLOR_NAMES, SHADE_STEPS, SdkCompanySwitcher, SdkHeader, SdkNavigation, SeparatorWidget, ShareablesScreen, ShopScreen, SpacerWidget, SubscriptionsScreen, TableWidget, TextWidget, ThemeModeProvider, ToDoWidget, USER_TYPES, VideoWidget, WIDGET_TYPE_NAMES, alertWidgetPropertySchema, applyTheme, assertDefined, assertNever, buildThemeDefinition, buildWidgetRegistry, bulletListWidgetPropertySchema, calendarWidgetPropertySchema, cardWidgetPropertySchema, carouselWidgetPropertySchema, catchUpWidgetPropertySchema, chartWidgetPropertySchema, collectNavSlugs, contactsScreenPropertySchema, containerWidgetPropertySchema, createCompanyQueryKey, createDefaultFluidConfig, createFluidFileUploader, createPortal, createScreen, createWidgetFromShareable, createWidgetRegistry, customersScreenPropertySchema, deriveDarkVariant, deserialiseTheme, embedWidgetPropertySchema, extractSlugFromPathname, filterRepOnlyNavItems, gapValues, generateShades, generateThemeCSS, getActiveThemeId, getAvailablePageTemplates, getCorePageTemplates, getDefaultThemeDefinition, getForegroundColor, getOptionalPageTemplates, getProperty, getThemeModeAttribute, groupChildrenByColumn, hasData, imageWidgetPropertySchema, isActivitySlug, isApiError, isContactStatus, isErrorResult, isIdle, isLoading, isPropertyFieldType, isSlugInSection, isUserType, isWidgetType, isWidgetTypeName, layoutWidgetPropertySchema, linkWidgetPropertySchema, listWidgetPropertySchema, matchSlugPrefix, mergeDarkOverrides, messagingScreenPropertySchema, mySiteScreenPropertySchema, mySiteWidgetPropertySchema, nestedWidgetPropertySchema, normalizeComponentTree, ordersScreenPropertySchema, parseColor, pointsWidgetPropertySchema, productsScreenPropertySchema, profileScreenPropertySchema, quickShareWidgetPropertySchema, recentActivityWidgetPropertySchema, removeAllThemes, removeTheme, resolveNavigationPages, resolveTheme, screenPropertySchemas, sectionLayoutConfig, selectProperty, separatorWidgetPropertySchema, serialiseTheme, shareablesScreenPropertySchema, shopScreenPropertySchema, spacerWidgetPropertySchema, subscriptionsScreenPropertySchema, tableWidgetPropertySchema, textWidgetPropertySchema, toDoWidgetPropertySchema, toNavigationItem, toRawManifest, toScreenDefinition, transformManifestToRepAppData, transformThemes, useActivities, useAppDefinition, useAppDefinitionApi, useAppNavigation, useCalendarEvents, useCatchUps, useCompanyScopedQueryKey, useCompanySwitch, useContact, useContacts, useConversationMessages, useConversations, useFluidApp, useFluidContext, useFluidProfile, useFluidTheme, useLogout, useMessagingAuth, useMessagingConfig, useMySite, usePageTemplates, usePortalTenantClient, useResolvedPages, useThemeContext, useThemeMode, useTodos, validateNavigationPages, videoWidgetPropertySchema, widgetPropertySchemas };
4367
4364
 
4368
4365
  //# sourceMappingURL=index.mjs.map