@fluid-app/portal-sdk 0.1.757 → 0.1.759

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.
@@ -4,8 +4,10 @@ import "./use-mysite-portal-D9B-L9GK.mjs";
4
4
  import "./MobileBottomSheet-D-qqYn5c.mjs";
5
5
  import "./translations-CdgcVe_2.mjs";
6
6
  import "./translation-api-context-factory-CEC_UpZg.mjs";
7
+ import "./use-account-_6m6foYx.mjs";
7
8
  import "./ResponsiveDialog-BNXqmNe_.mjs";
8
9
  import "./translation-adapter-BGwgAecf.mjs";
10
+ import "./AppNavigationContext-BnYj4Pjp.mjs";
9
11
  import "./sidebar-BqTwYEfE.mjs";
10
12
  import "./ScreenHeaderContext-D7jhJX8j.mjs";
11
13
  import { n as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-DVkLcPnn.mjs";
@@ -23,6 +23,7 @@ import "./widgets-api-context-CLw35iC_.mjs";
23
23
  import "./EmbedWidget-C4xIr6S7.mjs";
24
24
  import "./PointsWidget-BE6o4vk3.mjs";
25
25
  import "./task-composer-form-DZ5bGOj2.mjs";
26
+ import "./use-account-_6m6foYx.mjs";
26
27
  import "./translation-api-context-DO_ynrG9.mjs";
27
28
  import "./LayoutWidget-B6461Gji.mjs";
28
29
  import "./registries-DJe9dUTb.mjs";
@@ -66,6 +67,8 @@ import "./ShopWidget-EeUNcE3M.mjs";
66
67
  import "./translation-adapter-C37avOSN.mjs";
67
68
  import "./translation-adapter-D4UNUw8I.mjs";
68
69
  import "./translation-adapter-BGwgAecf.mjs";
70
+ import "./AppNavigationContext-BnYj4Pjp.mjs";
71
+ import "./use-store-jLETls7H.mjs";
69
72
  import "./ScreenHeaderContext-D7jhJX8j.mjs";
70
73
  import { n as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-CIQgu0mm.mjs";
71
74
  export { OrdersScreen, ordersScreenPropertySchema };
@@ -23,6 +23,7 @@ import "./widgets-api-context-CLw35iC_.mjs";
23
23
  import "./EmbedWidget-C4xIr6S7.mjs";
24
24
  import "./PointsWidget-BE6o4vk3.mjs";
25
25
  import "./task-composer-form-DZ5bGOj2.mjs";
26
+ import "./use-account-_6m6foYx.mjs";
26
27
  import "./translation-api-context-DO_ynrG9.mjs";
27
28
  import "./LayoutWidget-B6461Gji.mjs";
28
29
  import "./registries-DJe9dUTb.mjs";
@@ -66,6 +67,8 @@ import "./ShopWidget-EeUNcE3M.mjs";
66
67
  import "./translation-adapter-C37avOSN.mjs";
67
68
  import "./translation-adapter-D4UNUw8I.mjs";
68
69
  import "./translation-adapter-BGwgAecf.mjs";
70
+ import "./AppNavigationContext-BnYj4Pjp.mjs";
71
+ import "./use-store-jLETls7H.mjs";
69
72
  import "./sidebar-BqTwYEfE.mjs";
70
73
  import "./ScreenHeaderContext-D7jhJX8j.mjs";
71
74
  import "./use-portal-card-add-3ds-flow-BEgDKY5T.mjs";
@@ -9,10 +9,13 @@ import "./SearchSort-DNPRaJdd.mjs";
9
9
  import "./use-share-link-BXkLSIn6.mjs";
10
10
  import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-BCHY-GrB.mjs";
11
11
  import "./translation-api-context-factory-CEC_UpZg.mjs";
12
+ import "./use-account-_6m6foYx.mjs";
12
13
  import "./purify.es-BvLQOUHj.mjs";
13
14
  import "./MobileActionSheet-DWrKALrm.mjs";
14
15
  import "./ResponsiveDialog-BNXqmNe_.mjs";
15
16
  import "./translation-adapter-C37avOSN.mjs";
17
+ import "./AppNavigationContext-BnYj4Pjp.mjs";
18
+ import "./use-store-jLETls7H.mjs";
16
19
  import "./ScreenHeaderContext-D7jhJX8j.mjs";
17
20
  import "./dist-D8bAvP_X.mjs";
18
21
  import "./es-C23yRFfb.mjs";
@@ -7,6 +7,8 @@ import "./translation-api-context-factory-CEC_UpZg.mjs";
7
7
  import "./translation-api-context-DO_ynrG9.mjs";
8
8
  import "./use-can-show-volume-iLX3muBs.mjs";
9
9
  import "./MobileActionSheet-DWrKALrm.mjs";
10
+ import "./AppNavigationContext-BnYj4Pjp.mjs";
11
+ import "./use-store-jLETls7H.mjs";
10
12
  import "./ScreenHeaderContext-D7jhJX8j.mjs";
11
13
  import { n as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-CcKeCb2C.mjs";
12
14
  export { ShopScreen, shopScreenPropertySchema };
@@ -23,6 +23,7 @@ import "./widgets-api-context-CLw35iC_.mjs";
23
23
  import "./EmbedWidget-C4xIr6S7.mjs";
24
24
  import "./PointsWidget-BE6o4vk3.mjs";
25
25
  import "./task-composer-form-DZ5bGOj2.mjs";
26
+ import "./use-account-_6m6foYx.mjs";
26
27
  import "./translation-api-context-DO_ynrG9.mjs";
27
28
  import "./LayoutWidget-B6461Gji.mjs";
28
29
  import "./registries-DJe9dUTb.mjs";
@@ -66,6 +67,8 @@ import "./ShopWidget-EeUNcE3M.mjs";
66
67
  import "./translation-adapter-C37avOSN.mjs";
67
68
  import "./translation-adapter-D4UNUw8I.mjs";
68
69
  import "./translation-adapter-BGwgAecf.mjs";
70
+ import "./AppNavigationContext-BnYj4Pjp.mjs";
71
+ import "./use-store-jLETls7H.mjs";
69
72
  import "./sidebar-BqTwYEfE.mjs";
70
73
  import "./ScreenHeaderContext-D7jhJX8j.mjs";
71
74
  import "./use-portal-card-add-3ds-flow-BEgDKY5T.mjs";
package/dist/index.cjs CHANGED
@@ -76,7 +76,7 @@ const require_AppNavigationContext = require("./AppNavigationContext-WjLfoRRa.cj
76
76
  const require_self = require("./self-tqHX6Y6b.cjs");
77
77
  const require_use_store = require("./use-store-DFwGIM83.cjs");
78
78
  const require_sidebar = require("./sidebar-BnZL8dM6.cjs");
79
- const require_MessagingScreen = require("./MessagingScreen-Bg6b4oU5.cjs");
79
+ const require_MessagingScreen = require("./MessagingScreen-CmOAd2El.cjs");
80
80
  const require_use_navigation_parent = require("./use-navigation-parent-CuoRPElx.cjs");
81
81
  const require_ScreenHeaderContext = require("./ScreenHeaderContext-fJKG4BUl.cjs");
82
82
  const require_ShopScreen = require("./ShopScreen-Uc5SeGyb.cjs");
@@ -2154,7 +2154,7 @@ function resolveMemberTypePage(registry, memberTypeSlug, currentSlug, baseSlug)
2154
2154
  const ProfileScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProfileScreen-BmQXLvco.cjs")).then((m) => ({ default: m.ProfileScreen })));
2155
2155
  const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./OrdersScreen-DNZi4pqX.cjs")).then((m) => ({ default: m.OrdersScreen })));
2156
2156
  const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-bUnvHm8y.cjs")).then((m) => ({ default: m.SubscriptionsScreen })));
2157
- const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-CxX8SKBi.cjs")).then((m) => ({ default: m.MessagingScreen })));
2157
+ const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen--KcXmW3f.cjs")).then((m) => ({ default: m.MessagingScreen })));
2158
2158
  const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-J8cS9Y97.cjs")).then((m) => ({ default: m.ContactsScreen })));
2159
2159
  const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-BY0IkRGH.cjs")).then((m) => ({ default: m.ShopScreen })));
2160
2160
  const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-Bs8sOzV-.cjs")).then((m) => ({ default: m.CustomersScreen })));
@@ -4764,7 +4764,7 @@ const CORE_PAGE_IDS = {
4764
4764
  //#region src/screens/index.ts
4765
4765
  const screenPropertySchemas = {
4766
4766
  ProfileScreen: () => Promise.resolve().then(() => require("./ProfileScreen-BmQXLvco.cjs")).then((m) => m.profileScreenPropertySchema),
4767
- MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-CxX8SKBi.cjs")).then((m) => m.messagingScreenPropertySchema),
4767
+ MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen--KcXmW3f.cjs")).then((m) => m.messagingScreenPropertySchema),
4768
4768
  ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-J8cS9Y97.cjs")).then((m) => m.contactsScreenPropertySchema),
4769
4769
  OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-DNZi4pqX.cjs")).then((m) => m.ordersScreenPropertySchema),
4770
4770
  SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-bUnvHm8y.cjs")).then((m) => m.subscriptionsScreenPropertySchema),
package/dist/index.mjs CHANGED
@@ -74,7 +74,7 @@ import { n as useAppNavigation, t as AppNavigationProvider } from "./AppNavigati
74
74
  import { Rt as implementPortalFunction, ft as queryDropletData } from "./self-D_k0BD0Z.mjs";
75
75
  import { t as useStore } from "./use-store-jLETls7H.mjs";
76
76
  import { a as SidebarGroupLabel, c as SidebarMenu, d as SidebarMenuSub, f as SidebarProvider, i as SidebarFooter, l as SidebarMenuButton, n as SidebarContent, o as SidebarHeader, p as useSidebar, s as SidebarInset, t as Sidebar, u as SidebarMenuItem } from "./sidebar-BqTwYEfE.mjs";
77
- import { a as BottomNavVisibilityProvider, i as useMessagingAuth, n as messagingScreenPropertySchema, o as useBottomNavHidden, r as useMessagingConfig, t as MessagingScreen } from "./MessagingScreen-CnwSwV_P.mjs";
77
+ import { a as BottomNavVisibilityProvider, i as useMessagingAuth, n as messagingScreenPropertySchema, o as useBottomNavHidden, r as useMessagingConfig, t as MessagingScreen } from "./MessagingScreen-V95LvJRO.mjs";
78
78
  import { a as internalSlugFromHref, c as slugifyName, d as isRepOnlySlug, f as isSystemNavigationItem, i as extractSlugFromPathname, l as SYSTEM_NAVIGATION_ITEMS, o as isSlugInSection, p as normalizeSlug, r as collectNavSlugs, s as matchSlugPrefix, u as getSystemNavigationBySection } from "./use-navigation-parent-CkKAOfUB.mjs";
79
79
  import { a as useScreenHeaderSlotRefs, i as ScreenHeaderProvider, r as ScreenHeaderMobileActionsSlot } from "./ScreenHeaderContext-D7jhJX8j.mjs";
80
80
  import { a as CartScript, i as CartWidget, n as shopScreenPropertySchema, r as CartButton, t as ShopScreen } from "./ShopScreen-CcKeCb2C.mjs";
@@ -2149,15 +2149,15 @@ function resolveMemberTypePage(registry, memberTypeSlug, currentSlug, baseSlug)
2149
2149
  }
2150
2150
  //#endregion
2151
2151
  //#region src/shell/system-screen-map.ts
2152
- const ProfileScreen$1 = lazy(() => import("./ProfileScreen-DhUgEkY_.mjs").then((m) => ({ default: m.ProfileScreen })));
2153
- const OrdersScreen$1 = lazy(() => import("./OrdersScreen-D3ZCCBFS.mjs").then((m) => ({ default: m.OrdersScreen })));
2154
- const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-CIiwoJ7N.mjs").then((m) => ({ default: m.SubscriptionsScreen })));
2155
- const MessagingScreen$1 = lazy(() => import("./MessagingScreen-02gtaS2n.mjs").then((m) => ({ default: m.MessagingScreen })));
2156
- const ContactsScreen$1 = lazy(() => import("./ContactsScreen-ChjOLSBG.mjs").then((m) => ({ default: m.ContactsScreen })));
2157
- const ShopScreen$1 = lazy(() => import("./ShopScreen-BOZMHTg7.mjs").then((m) => ({ default: m.ShopScreen })));
2152
+ const ProfileScreen$1 = lazy(() => import("./ProfileScreen-Dn0n65gh.mjs").then((m) => ({ default: m.ProfileScreen })));
2153
+ const OrdersScreen$1 = lazy(() => import("./OrdersScreen-BnytWV-r.mjs").then((m) => ({ default: m.OrdersScreen })));
2154
+ const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-Du4vPWXN.mjs").then((m) => ({ default: m.SubscriptionsScreen })));
2155
+ const MessagingScreen$1 = lazy(() => import("./MessagingScreen-ChHlTJTp.mjs").then((m) => ({ default: m.MessagingScreen })));
2156
+ const ContactsScreen$1 = lazy(() => import("./ContactsScreen-Ebdoc4TE.mjs").then((m) => ({ default: m.ContactsScreen })));
2157
+ const ShopScreen$1 = lazy(() => import("./ShopScreen-Bf4llXAm.mjs").then((m) => ({ default: m.ShopScreen })));
2158
2158
  const CustomersScreen$1 = lazy(() => import("./CustomersScreen-DhTSmyD-.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
2159
- const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-DkMNBP5z.mjs").then((m) => ({ default: m.ShareablesScreen })));
2160
- const MySiteScreen$1 = lazy(() => import("./MySiteScreen-Dhkz5x3e.mjs").then((m) => ({ default: m.MySiteScreen })));
2159
+ const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-B8bGc4Fo.mjs").then((m) => ({ default: m.ShareablesScreen })));
2160
+ const MySiteScreen$1 = lazy(() => import("./MySiteScreen-VbMhoDhP.mjs").then((m) => ({ default: m.MySiteScreen })));
2161
2161
  const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-DrU6K0hA.mjs").then((n) => n.t).then((m) => ({ default: m.AppDownloadScreen })));
2162
2162
  const ActivityScreen$1 = lazy(() => import("./ActivityScreen-DsEMt2GY.mjs").then((n) => n.n).then((m) => ({ default: m.ActivityScreen })));
2163
2163
  const SCREEN_FOR_SLUG = {
@@ -4761,15 +4761,15 @@ const CORE_PAGE_IDS = {
4761
4761
  //#endregion
4762
4762
  //#region src/screens/index.ts
4763
4763
  const screenPropertySchemas = {
4764
- ProfileScreen: () => import("./ProfileScreen-DhUgEkY_.mjs").then((m) => m.profileScreenPropertySchema),
4765
- MessagingScreen: () => import("./MessagingScreen-02gtaS2n.mjs").then((m) => m.messagingScreenPropertySchema),
4766
- ContactsScreen: () => import("./ContactsScreen-ChjOLSBG.mjs").then((m) => m.contactsScreenPropertySchema),
4767
- OrdersScreen: () => import("./OrdersScreen-D3ZCCBFS.mjs").then((m) => m.ordersScreenPropertySchema),
4768
- SubscriptionsScreen: () => import("./SubscriptionsScreen-CIiwoJ7N.mjs").then((m) => m.subscriptionsScreenPropertySchema),
4764
+ ProfileScreen: () => import("./ProfileScreen-Dn0n65gh.mjs").then((m) => m.profileScreenPropertySchema),
4765
+ MessagingScreen: () => import("./MessagingScreen-ChHlTJTp.mjs").then((m) => m.messagingScreenPropertySchema),
4766
+ ContactsScreen: () => import("./ContactsScreen-Ebdoc4TE.mjs").then((m) => m.contactsScreenPropertySchema),
4767
+ OrdersScreen: () => import("./OrdersScreen-BnytWV-r.mjs").then((m) => m.ordersScreenPropertySchema),
4768
+ SubscriptionsScreen: () => import("./SubscriptionsScreen-Du4vPWXN.mjs").then((m) => m.subscriptionsScreenPropertySchema),
4769
4769
  CustomersScreen: () => import("./CustomersScreen-DhTSmyD-.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
4770
- MySiteScreen: () => import("./MySiteScreen-Dhkz5x3e.mjs").then((m) => m.mySiteScreenPropertySchema),
4771
- ShareablesScreen: () => import("./ShareablesScreen-DkMNBP5z.mjs").then((m) => m.shareablesScreenPropertySchema),
4772
- ShopScreen: () => import("./ShopScreen-BOZMHTg7.mjs").then((m) => m.shopScreenPropertySchema),
4770
+ MySiteScreen: () => import("./MySiteScreen-VbMhoDhP.mjs").then((m) => m.mySiteScreenPropertySchema),
4771
+ ShareablesScreen: () => import("./ShareablesScreen-B8bGc4Fo.mjs").then((m) => m.shareablesScreenPropertySchema),
4772
+ ShopScreen: () => import("./ShopScreen-Bf4llXAm.mjs").then((m) => m.shopScreenPropertySchema),
4773
4773
  AppDownloadScreen: () => import("./AppDownloadScreen-DrU6K0hA.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema),
4774
4774
  ActivityScreen: () => import("./ActivityScreen-DsEMt2GY.mjs").then((n) => n.n).then((m) => m.activityScreenPropertySchema)
4775
4775
  };
@@ -20,6 +20,7 @@ import "../widgets-api-context-CLw35iC_.mjs";
20
20
  import "../EmbedWidget-C4xIr6S7.mjs";
21
21
  import "../PointsWidget-BE6o4vk3.mjs";
22
22
  import "../task-composer-form-DZ5bGOj2.mjs";
23
+ import "../use-account-_6m6foYx.mjs";
23
24
  import "../LayoutWidget-B6461Gji.mjs";
24
25
  import { y as isPropertyFieldType } from "../registries-DJe9dUTb.mjs";
25
26
  import "../fields-Dn82VSlh.mjs";
@@ -59,6 +60,8 @@ import "../ToDoWidget-CZbDVCGv.mjs";
59
60
  import "../ResponsiveDialog-BNXqmNe_.mjs";
60
61
  import "../VideoWidget-Cyidb63K.mjs";
61
62
  import "../ShopWidget-EeUNcE3M.mjs";
63
+ import "../AppNavigationContext-BnYj4Pjp.mjs";
64
+ import "../use-store-jLETls7H.mjs";
62
65
  //#region src/utils/build-remote-widget-plugin-manifests.ts
63
66
  const REMOTE_WIDGET_PACKAGE_CATEGORY_PREFIX = "custom-widget-package";
64
67
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"build-remote-widget-plugin-manifests.mjs","names":[],"sources":["../../src/utils/build-remote-widget-plugin-manifests.ts"],"sourcesContent":["import type { ComponentType } from \"react\";\nimport { createRemoteWidgetCapabilityGrants } from \"@fluid-app/portal-core/remote-widget-capability-grants\";\nimport {\n isPropertyFieldType,\n type PropertyField,\n type WidgetManifest,\n} from \"@fluid-app/portal-core/registries\";\nimport type {\n RemoteDomWidgetDefinition,\n RemoteDomWidgetPackageDescriptor,\n} from \"@fluid-app/portal-core/remote-dom-widget-package\";\nimport {\n projectRemoteWidgetPackages,\n type RemoteDomWidgetRegistryOptions,\n type WidgetRegistryWarningSink,\n} from \"../widgets/remote/host/build-widget-registry\";\n\nconst REMOTE_WIDGET_PACKAGE_CATEGORY_PREFIX = \"custom-widget-package\";\n\nexport interface RemoteWidgetPluginHostOptions extends RemoteDomWidgetRegistryOptions {\n readonly warningSink?: WidgetRegistryWarningSink;\n}\n\n/**\n * Projects accepted canonical packages into builder manifests using the same\n * package-atomic acceptance pass as the runtime registry.\n */\nexport function buildRemoteWidgetPluginManifests(\n packages: readonly RemoteDomWidgetPackageDescriptor[],\n hostOptions: RemoteWidgetPluginHostOptions = {},\n): WidgetManifest[] {\n const { warningSink, ...registryOptions } = hostOptions;\n const projection = projectRemoteWidgetPackages(\n {},\n packages,\n registryOptions,\n warningSink ?? console.warn,\n );\n return projection.acceptedWidgets.map(\n ({ remotePackage, widget, component }) =>\n toWidgetManifest(remotePackage, widget, component),\n );\n}\n\nexport function getRemoteWidgetPackageCategoryId(\n remotePackage: Pick<RemoteDomWidgetPackageDescriptor, \"packageId\" | \"source\">,\n): string {\n return [\n REMOTE_WIDGET_PACKAGE_CATEGORY_PREFIX,\n remotePackage.source,\n encodeURIComponent(remotePackage.packageId),\n ].join(\":\");\n}\n\nfunction toWidgetManifest(\n remotePackage: RemoteDomWidgetPackageDescriptor,\n widget: RemoteDomWidgetDefinition,\n component: ComponentType<Record<string, unknown>>,\n): WidgetManifest {\n const resizable = toResizable(widget.resizable);\n const capabilityGrants = createRemoteWidgetCapabilityGrants(\n remotePackage,\n widget,\n );\n return {\n manifestVersion: 1,\n type: widget.type,\n component,\n displayName: widget.displayName,\n description: widget.description,\n icon: widget.icon,\n category: getRemoteWidgetPackageCategoryId(remotePackage),\n propertySchema: normalizePropertySchema(widget),\n defaultProps: { ...widget.defaultProps },\n minSdkVersion: widget.minSdkVersion,\n ...(resizable === undefined ? {} : { resizable }),\n ...(capabilityGrants === undefined ? {} : { capabilityGrants }),\n };\n}\n\nfunction normalizePropertySchema(\n widget: RemoteDomWidgetDefinition,\n): WidgetManifest[\"propertySchema\"] {\n const fields = Array.isArray(widget.propertySchema.fields)\n ? widget.propertySchema.fields.filter(isPropertyField)\n : [];\n return {\n ...widget.propertySchema,\n widgetType: widget.type,\n displayName:\n typeof widget.propertySchema.displayName === \"string\"\n ? widget.propertySchema.displayName\n : widget.displayName,\n fields,\n } as WidgetManifest[\"propertySchema\"];\n}\n\nfunction toResizable(\n resizable: RemoteDomWidgetDefinition[\"resizable\"],\n): WidgetManifest[\"resizable\"] {\n if (resizable === false) return undefined;\n if (resizable === true || resizable === \"both\") {\n return { horizontal: true, vertical: true };\n }\n return resizable === \"horizontal\" ? { horizontal: true } : { vertical: true };\n}\n\nfunction isPropertyField(value: unknown): value is PropertyField {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"key\" in value &&\n typeof value.key === \"string\" &&\n \"label\" in value &&\n typeof value.label === \"string\" &&\n \"type\" in value &&\n typeof value.type === \"string\" &&\n isPropertyFieldType(value.type)\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,wCAAwC;;;;;AAU9C,SAAgB,iCACd,UACA,cAA6C,EAAE,EAC7B;CAClB,MAAM,EAAE,aAAa,GAAG,oBAAoB;AAO5C,QANmB,4BACjB,EAAE,EACF,UACA,iBACA,eAAe,QAAQ,KACxB,CACiB,gBAAgB,KAC/B,EAAE,eAAe,QAAQ,gBACxB,iBAAiB,eAAe,QAAQ,UAAU,CACrD;;AAGH,SAAgB,iCACd,eACQ;AACR,QAAO;EACL;EACA,cAAc;EACd,mBAAmB,cAAc,UAAU;EAC5C,CAAC,KAAK,IAAI;;AAGb,SAAS,iBACP,eACA,QACA,WACgB;CAChB,MAAM,YAAY,YAAY,OAAO,UAAU;CAC/C,MAAM,mBAAmB,mCACvB,eACA,OACD;AACD,QAAO;EACL,iBAAiB;EACjB,MAAM,OAAO;EACb;EACA,aAAa,OAAO;EACpB,aAAa,OAAO;EACpB,MAAM,OAAO;EACb,UAAU,iCAAiC,cAAc;EACzD,gBAAgB,wBAAwB,OAAO;EAC/C,cAAc,EAAE,GAAG,OAAO,cAAc;EACxC,eAAe,OAAO;EACtB,GAAI,cAAc,KAAA,IAAY,EAAE,GAAG,EAAE,WAAW;EAChD,GAAI,qBAAqB,KAAA,IAAY,EAAE,GAAG,EAAE,kBAAkB;EAC/D;;AAGH,SAAS,wBACP,QACkC;CAClC,MAAM,SAAS,MAAM,QAAQ,OAAO,eAAe,OAAO,GACtD,OAAO,eAAe,OAAO,OAAO,gBAAgB,GACpD,EAAE;AACN,QAAO;EACL,GAAG,OAAO;EACV,YAAY,OAAO;EACnB,aACE,OAAO,OAAO,eAAe,gBAAgB,WACzC,OAAO,eAAe,cACtB,OAAO;EACb;EACD;;AAGH,SAAS,YACP,WAC6B;AAC7B,KAAI,cAAc,MAAO,QAAO,KAAA;AAChC,KAAI,cAAc,QAAQ,cAAc,OACtC,QAAO;EAAE,YAAY;EAAM,UAAU;EAAM;AAE7C,QAAO,cAAc,eAAe,EAAE,YAAY,MAAM,GAAG,EAAE,UAAU,MAAM;;AAG/E,SAAS,gBAAgB,OAAwC;AAC/D,QACE,OAAO,UAAU,YACjB,UAAU,QACV,SAAS,SACT,OAAO,MAAM,QAAQ,YACrB,WAAW,SACX,OAAO,MAAM,UAAU,YACvB,UAAU,SACV,OAAO,MAAM,SAAS,YACtB,oBAAoB,MAAM,KAAK"}
1
+ {"version":3,"file":"build-remote-widget-plugin-manifests.mjs","names":[],"sources":["../../src/utils/build-remote-widget-plugin-manifests.ts"],"sourcesContent":["import type { ComponentType } from \"react\";\nimport { createRemoteWidgetCapabilityGrants } from \"@fluid-app/portal-core/remote-widget-capability-grants\";\nimport {\n isPropertyFieldType,\n type PropertyField,\n type WidgetManifest,\n} from \"@fluid-app/portal-core/registries\";\nimport type {\n RemoteDomWidgetDefinition,\n RemoteDomWidgetPackageDescriptor,\n} from \"@fluid-app/portal-core/remote-dom-widget-package\";\nimport {\n projectRemoteWidgetPackages,\n type RemoteDomWidgetRegistryOptions,\n type WidgetRegistryWarningSink,\n} from \"../widgets/remote/host/build-widget-registry\";\n\nconst REMOTE_WIDGET_PACKAGE_CATEGORY_PREFIX = \"custom-widget-package\";\n\nexport interface RemoteWidgetPluginHostOptions extends RemoteDomWidgetRegistryOptions {\n readonly warningSink?: WidgetRegistryWarningSink;\n}\n\n/**\n * Projects accepted canonical packages into builder manifests using the same\n * package-atomic acceptance pass as the runtime registry.\n */\nexport function buildRemoteWidgetPluginManifests(\n packages: readonly RemoteDomWidgetPackageDescriptor[],\n hostOptions: RemoteWidgetPluginHostOptions = {},\n): WidgetManifest[] {\n const { warningSink, ...registryOptions } = hostOptions;\n const projection = projectRemoteWidgetPackages(\n {},\n packages,\n registryOptions,\n warningSink ?? console.warn,\n );\n return projection.acceptedWidgets.map(\n ({ remotePackage, widget, component }) =>\n toWidgetManifest(remotePackage, widget, component),\n );\n}\n\nexport function getRemoteWidgetPackageCategoryId(\n remotePackage: Pick<RemoteDomWidgetPackageDescriptor, \"packageId\" | \"source\">,\n): string {\n return [\n REMOTE_WIDGET_PACKAGE_CATEGORY_PREFIX,\n remotePackage.source,\n encodeURIComponent(remotePackage.packageId),\n ].join(\":\");\n}\n\nfunction toWidgetManifest(\n remotePackage: RemoteDomWidgetPackageDescriptor,\n widget: RemoteDomWidgetDefinition,\n component: ComponentType<Record<string, unknown>>,\n): WidgetManifest {\n const resizable = toResizable(widget.resizable);\n const capabilityGrants = createRemoteWidgetCapabilityGrants(\n remotePackage,\n widget,\n );\n return {\n manifestVersion: 1,\n type: widget.type,\n component,\n displayName: widget.displayName,\n description: widget.description,\n icon: widget.icon,\n category: getRemoteWidgetPackageCategoryId(remotePackage),\n propertySchema: normalizePropertySchema(widget),\n defaultProps: { ...widget.defaultProps },\n minSdkVersion: widget.minSdkVersion,\n ...(resizable === undefined ? {} : { resizable }),\n ...(capabilityGrants === undefined ? {} : { capabilityGrants }),\n };\n}\n\nfunction normalizePropertySchema(\n widget: RemoteDomWidgetDefinition,\n): WidgetManifest[\"propertySchema\"] {\n const fields = Array.isArray(widget.propertySchema.fields)\n ? widget.propertySchema.fields.filter(isPropertyField)\n : [];\n return {\n ...widget.propertySchema,\n widgetType: widget.type,\n displayName:\n typeof widget.propertySchema.displayName === \"string\"\n ? widget.propertySchema.displayName\n : widget.displayName,\n fields,\n } as WidgetManifest[\"propertySchema\"];\n}\n\nfunction toResizable(\n resizable: RemoteDomWidgetDefinition[\"resizable\"],\n): WidgetManifest[\"resizable\"] {\n if (resizable === false) return undefined;\n if (resizable === true || resizable === \"both\") {\n return { horizontal: true, vertical: true };\n }\n return resizable === \"horizontal\" ? { horizontal: true } : { vertical: true };\n}\n\nfunction isPropertyField(value: unknown): value is PropertyField {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"key\" in value &&\n typeof value.key === \"string\" &&\n \"label\" in value &&\n typeof value.label === \"string\" &&\n \"type\" in value &&\n typeof value.type === \"string\" &&\n isPropertyFieldType(value.type)\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,wCAAwC;;;;;AAU9C,SAAgB,iCACd,UACA,cAA6C,EAAE,EAC7B;CAClB,MAAM,EAAE,aAAa,GAAG,oBAAoB;AAO5C,QANmB,4BACjB,EAAE,EACF,UACA,iBACA,eAAe,QAAQ,KACxB,CACiB,gBAAgB,KAC/B,EAAE,eAAe,QAAQ,gBACxB,iBAAiB,eAAe,QAAQ,UAAU,CACrD;;AAGH,SAAgB,iCACd,eACQ;AACR,QAAO;EACL;EACA,cAAc;EACd,mBAAmB,cAAc,UAAU;EAC5C,CAAC,KAAK,IAAI;;AAGb,SAAS,iBACP,eACA,QACA,WACgB;CAChB,MAAM,YAAY,YAAY,OAAO,UAAU;CAC/C,MAAM,mBAAmB,mCACvB,eACA,OACD;AACD,QAAO;EACL,iBAAiB;EACjB,MAAM,OAAO;EACb;EACA,aAAa,OAAO;EACpB,aAAa,OAAO;EACpB,MAAM,OAAO;EACb,UAAU,iCAAiC,cAAc;EACzD,gBAAgB,wBAAwB,OAAO;EAC/C,cAAc,EAAE,GAAG,OAAO,cAAc;EACxC,eAAe,OAAO;EACtB,GAAI,cAAc,KAAA,IAAY,EAAE,GAAG,EAAE,WAAW;EAChD,GAAI,qBAAqB,KAAA,IAAY,EAAE,GAAG,EAAE,kBAAkB;EAC/D;;AAGH,SAAS,wBACP,QACkC;CAClC,MAAM,SAAS,MAAM,QAAQ,OAAO,eAAe,OAAO,GACtD,OAAO,eAAe,OAAO,OAAO,gBAAgB,GACpD,EAAE;AACN,QAAO;EACL,GAAG,OAAO;EACV,YAAY,OAAO;EACnB,aACE,OAAO,OAAO,eAAe,gBAAgB,WACzC,OAAO,eAAe,cACtB,OAAO;EACb;EACD;;AAGH,SAAS,YACP,WAC6B;AAC7B,KAAI,cAAc,MAAO,QAAO,KAAA;AAChC,KAAI,cAAc,QAAQ,cAAc,OACtC,QAAO;EAAE,YAAY;EAAM,UAAU;EAAM;AAE7C,QAAO,cAAc,eAAe,EAAE,YAAY,MAAM,GAAG,EAAE,UAAU,MAAM;;AAG/E,SAAS,gBAAgB,OAAwC;AAC/D,QACE,OAAO,UAAU,YACjB,UAAU,QACV,SAAS,SACT,OAAO,MAAM,QAAQ,YACrB,WAAW,SACX,OAAO,MAAM,UAAU,YACvB,UAAU,SACV,OAAO,MAAM,SAAS,YACtB,oBAAoB,MAAM,KAAK"}
@@ -20,6 +20,7 @@ import "../widgets-api-context-CLw35iC_.mjs";
20
20
  import "../EmbedWidget-C4xIr6S7.mjs";
21
21
  import "../PointsWidget-BE6o4vk3.mjs";
22
22
  import "../task-composer-form-DZ5bGOj2.mjs";
23
+ import "../use-account-_6m6foYx.mjs";
23
24
  import "../LayoutWidget-B6461Gji.mjs";
24
25
  import "../registries-DJe9dUTb.mjs";
25
26
  import "../fields-Dn82VSlh.mjs";
@@ -59,4 +60,6 @@ import "../ToDoWidget-CZbDVCGv.mjs";
59
60
  import "../ResponsiveDialog-BNXqmNe_.mjs";
60
61
  import "../VideoWidget-Cyidb63K.mjs";
61
62
  import "../ShopWidget-EeUNcE3M.mjs";
63
+ import "../AppNavigationContext-BnYj4Pjp.mjs";
64
+ import "../use-store-jLETls7H.mjs";
62
65
  export { buildNavigateHandler, buildRemoteWidgetRegistry, isBuiltInWidgetType, projectRemoteWidgetPackages };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-app/portal-sdk",
3
- "version": "0.1.757",
3
+ "version": "0.1.759",
4
4
  "description": "SDK for building custom Fluid portals",
5
5
  "files": [
6
6
  "authoring",