@fluid-app/portal-sdk 0.1.648 → 0.1.649
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.
- package/dist/{ContactsScreen-u4E5QcGP.mjs → ContactsScreen-CuvDf6x7.mjs} +0 -2
- package/dist/{MessagingScreen-Cf_YGKPT.mjs → MessagingScreen-lOZAO_bK.mjs} +0 -3
- package/dist/{MySiteScreen-DQV9c0pt.mjs → MySiteScreen-DLjzvEki.mjs} +0 -2
- package/dist/{OrdersScreen-DVjefABy.mjs → OrdersScreen-B3jUsijU.mjs} +0 -3
- package/dist/{ProfileScreen-NAu20ojj.mjs → ProfileScreen-DZ-7HOsx.mjs} +0 -3
- package/dist/{ShareablesScreen-pJ_1paZu.mjs → ShareablesScreen-CLWE6k0f.mjs} +0 -3
- package/dist/{ShopScreen-CCC3Hunn.mjs → ShopScreen-XL3vx5XV.mjs} +0 -2
- package/dist/{SubscriptionsScreen-DI1wOLfz.mjs → SubscriptionsScreen-BcqROCUq.mjs} +0 -3
- package/dist/index.mjs +16 -16
- package/dist/utils/build-remote-widget-plugin-manifests.mjs +0 -3
- package/dist/utils/build-remote-widget-plugin-manifests.mjs.map +1 -1
- package/dist/utils/build-widget-registry.mjs +0 -3
- package/package.json +3 -3
|
@@ -7,10 +7,8 @@ import "./MobileBottomSheet-CF6wEDBi.mjs";
|
|
|
7
7
|
import "./static-dict-adapter-NEMVT_Ws.mjs";
|
|
8
8
|
import "./translation-api-context-factory-C0EbePkl.mjs";
|
|
9
9
|
import "./task-composer-form-TlFJ-M6U.mjs";
|
|
10
|
-
import "./use-account-CHPyFSMt.mjs";
|
|
11
10
|
import "./MobileActionSheet-BMiik5b4.mjs";
|
|
12
11
|
import "./ResponsiveDialog-rCN0eISF.mjs";
|
|
13
|
-
import "./AppNavigationContext-DTlEiEhX.mjs";
|
|
14
12
|
import "./sidebar-5XeY-wvI.mjs";
|
|
15
13
|
import "./ScreenHeaderContext-D7jhJX8j.mjs";
|
|
16
14
|
import "./dist-8m1ZI6iN.mjs";
|
|
@@ -23,7 +23,6 @@ import "./widgets-api-context-BrKBWyJZ.mjs";
|
|
|
23
23
|
import "./EmbedWidget-D6U3ArjA.mjs";
|
|
24
24
|
import "./PointsWidget-B1G1NLSI.mjs";
|
|
25
25
|
import "./task-composer-form-TlFJ-M6U.mjs";
|
|
26
|
-
import "./use-account-CHPyFSMt.mjs";
|
|
27
26
|
import "./translation-api-context-CYkmbwgU.mjs";
|
|
28
27
|
import "./LayoutWidget-Dg11I9Jc.mjs";
|
|
29
28
|
import "./registries-B3ZDv3YB.mjs";
|
|
@@ -68,8 +67,6 @@ import "./ShopWidget-1a_qsK7Q.mjs";
|
|
|
68
67
|
import "./translation-adapter-CQVG7XQ9.mjs";
|
|
69
68
|
import "./translation-adapter-C33Vlw5p.mjs";
|
|
70
69
|
import "./translation-adapter-DiqZ__tS.mjs";
|
|
71
|
-
import "./AppNavigationContext-DTlEiEhX.mjs";
|
|
72
|
-
import "./use-store-Cll-7n7D.mjs";
|
|
73
70
|
import "./sidebar-5XeY-wvI.mjs";
|
|
74
71
|
import "./ScreenHeaderContext-D7jhJX8j.mjs";
|
|
75
72
|
import "./dist-8m1ZI6iN.mjs";
|
|
@@ -4,10 +4,8 @@ import "./use-mysite-portal-BlOgU7cc.mjs";
|
|
|
4
4
|
import "./MobileBottomSheet-CF6wEDBi.mjs";
|
|
5
5
|
import "./static-dict-adapter-NEMVT_Ws.mjs";
|
|
6
6
|
import "./translation-api-context-factory-C0EbePkl.mjs";
|
|
7
|
-
import "./use-account-CHPyFSMt.mjs";
|
|
8
7
|
import "./ResponsiveDialog-rCN0eISF.mjs";
|
|
9
8
|
import "./translation-adapter-DiqZ__tS.mjs";
|
|
10
|
-
import "./AppNavigationContext-DTlEiEhX.mjs";
|
|
11
9
|
import "./sidebar-5XeY-wvI.mjs";
|
|
12
10
|
import "./ScreenHeaderContext-D7jhJX8j.mjs";
|
|
13
11
|
import { n as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-clbMwCTn.mjs";
|
|
@@ -23,7 +23,6 @@ import "./widgets-api-context-BrKBWyJZ.mjs";
|
|
|
23
23
|
import "./EmbedWidget-D6U3ArjA.mjs";
|
|
24
24
|
import "./PointsWidget-B1G1NLSI.mjs";
|
|
25
25
|
import "./task-composer-form-TlFJ-M6U.mjs";
|
|
26
|
-
import "./use-account-CHPyFSMt.mjs";
|
|
27
26
|
import "./translation-api-context-CYkmbwgU.mjs";
|
|
28
27
|
import "./LayoutWidget-Dg11I9Jc.mjs";
|
|
29
28
|
import "./registries-B3ZDv3YB.mjs";
|
|
@@ -67,8 +66,6 @@ import "./ShopWidget-1a_qsK7Q.mjs";
|
|
|
67
66
|
import "./translation-adapter-CQVG7XQ9.mjs";
|
|
68
67
|
import "./translation-adapter-C33Vlw5p.mjs";
|
|
69
68
|
import "./translation-adapter-DiqZ__tS.mjs";
|
|
70
|
-
import "./AppNavigationContext-DTlEiEhX.mjs";
|
|
71
|
-
import "./use-store-Cll-7n7D.mjs";
|
|
72
69
|
import "./ScreenHeaderContext-D7jhJX8j.mjs";
|
|
73
70
|
import { n as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-COIC2YS8.mjs";
|
|
74
71
|
export { OrdersScreen, ordersScreenPropertySchema };
|
|
@@ -23,7 +23,6 @@ import "./widgets-api-context-BrKBWyJZ.mjs";
|
|
|
23
23
|
import "./EmbedWidget-D6U3ArjA.mjs";
|
|
24
24
|
import "./PointsWidget-B1G1NLSI.mjs";
|
|
25
25
|
import "./task-composer-form-TlFJ-M6U.mjs";
|
|
26
|
-
import "./use-account-CHPyFSMt.mjs";
|
|
27
26
|
import "./translation-api-context-CYkmbwgU.mjs";
|
|
28
27
|
import "./LayoutWidget-Dg11I9Jc.mjs";
|
|
29
28
|
import "./registries-B3ZDv3YB.mjs";
|
|
@@ -67,8 +66,6 @@ import "./ShopWidget-1a_qsK7Q.mjs";
|
|
|
67
66
|
import "./translation-adapter-CQVG7XQ9.mjs";
|
|
68
67
|
import "./translation-adapter-C33Vlw5p.mjs";
|
|
69
68
|
import "./translation-adapter-DiqZ__tS.mjs";
|
|
70
|
-
import "./AppNavigationContext-DTlEiEhX.mjs";
|
|
71
|
-
import "./use-store-Cll-7n7D.mjs";
|
|
72
69
|
import "./sidebar-5XeY-wvI.mjs";
|
|
73
70
|
import "./ScreenHeaderContext-D7jhJX8j.mjs";
|
|
74
71
|
import "./use-portal-card-add-3ds-flow-8TsN9P2H.mjs";
|
|
@@ -9,13 +9,10 @@ import "./SearchSort-Dqnbfj_J.mjs";
|
|
|
9
9
|
import "./use-share-link-BXkLSIn6.mjs";
|
|
10
10
|
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-C4F-YERj.mjs";
|
|
11
11
|
import "./translation-api-context-factory-C0EbePkl.mjs";
|
|
12
|
-
import "./use-account-CHPyFSMt.mjs";
|
|
13
12
|
import "./purify.es-CUuPyFYH.mjs";
|
|
14
13
|
import "./MobileActionSheet-BMiik5b4.mjs";
|
|
15
14
|
import "./ResponsiveDialog-rCN0eISF.mjs";
|
|
16
15
|
import "./translation-adapter-CQVG7XQ9.mjs";
|
|
17
|
-
import "./AppNavigationContext-DTlEiEhX.mjs";
|
|
18
|
-
import "./use-store-Cll-7n7D.mjs";
|
|
19
16
|
import "./ScreenHeaderContext-D7jhJX8j.mjs";
|
|
20
17
|
import "./dist-8m1ZI6iN.mjs";
|
|
21
18
|
import "./es-FgoA0AYE.mjs";
|
|
@@ -7,8 +7,6 @@ import "./translation-api-context-factory-C0EbePkl.mjs";
|
|
|
7
7
|
import "./translation-api-context-CYkmbwgU.mjs";
|
|
8
8
|
import "./use-can-show-volume-DHaXTYGL.mjs";
|
|
9
9
|
import "./MobileActionSheet-BMiik5b4.mjs";
|
|
10
|
-
import "./AppNavigationContext-DTlEiEhX.mjs";
|
|
11
|
-
import "./use-store-Cll-7n7D.mjs";
|
|
12
10
|
import "./ScreenHeaderContext-D7jhJX8j.mjs";
|
|
13
11
|
import { n as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-DOR62nB-.mjs";
|
|
14
12
|
export { ShopScreen, shopScreenPropertySchema };
|
|
@@ -23,7 +23,6 @@ import "./widgets-api-context-BrKBWyJZ.mjs";
|
|
|
23
23
|
import "./EmbedWidget-D6U3ArjA.mjs";
|
|
24
24
|
import "./PointsWidget-B1G1NLSI.mjs";
|
|
25
25
|
import "./task-composer-form-TlFJ-M6U.mjs";
|
|
26
|
-
import "./use-account-CHPyFSMt.mjs";
|
|
27
26
|
import "./translation-api-context-CYkmbwgU.mjs";
|
|
28
27
|
import "./LayoutWidget-Dg11I9Jc.mjs";
|
|
29
28
|
import "./registries-B3ZDv3YB.mjs";
|
|
@@ -68,8 +67,6 @@ import "./ShopWidget-1a_qsK7Q.mjs";
|
|
|
68
67
|
import "./translation-adapter-CQVG7XQ9.mjs";
|
|
69
68
|
import "./translation-adapter-C33Vlw5p.mjs";
|
|
70
69
|
import "./translation-adapter-DiqZ__tS.mjs";
|
|
71
|
-
import "./AppNavigationContext-DTlEiEhX.mjs";
|
|
72
|
-
import "./use-store-Cll-7n7D.mjs";
|
|
73
70
|
import "./sidebar-5XeY-wvI.mjs";
|
|
74
71
|
import "./ScreenHeaderContext-D7jhJX8j.mjs";
|
|
75
72
|
import "./use-portal-card-add-3ds-flow-8TsN9P2H.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -2141,15 +2141,15 @@ function resolveMemberTypePage(registry, memberTypeSlug, currentSlug, baseSlug)
|
|
|
2141
2141
|
}
|
|
2142
2142
|
//#endregion
|
|
2143
2143
|
//#region src/shell/system-screen-map.ts
|
|
2144
|
-
const ProfileScreen$1 = lazy(() => import("./ProfileScreen-
|
|
2145
|
-
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-
|
|
2146
|
-
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-
|
|
2147
|
-
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-
|
|
2148
|
-
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-
|
|
2149
|
-
const ShopScreen$1 = lazy(() => import("./ShopScreen-
|
|
2144
|
+
const ProfileScreen$1 = lazy(() => import("./ProfileScreen-DZ-7HOsx.mjs").then((m) => ({ default: m.ProfileScreen })));
|
|
2145
|
+
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-B3jUsijU.mjs").then((m) => ({ default: m.OrdersScreen })));
|
|
2146
|
+
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-BcqROCUq.mjs").then((m) => ({ default: m.SubscriptionsScreen })));
|
|
2147
|
+
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-lOZAO_bK.mjs").then((m) => ({ default: m.MessagingScreen })));
|
|
2148
|
+
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-CuvDf6x7.mjs").then((m) => ({ default: m.ContactsScreen })));
|
|
2149
|
+
const ShopScreen$1 = lazy(() => import("./ShopScreen-XL3vx5XV.mjs").then((m) => ({ default: m.ShopScreen })));
|
|
2150
2150
|
const CustomersScreen$1 = lazy(() => import("./CustomersScreen-BpVaNCST.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
|
|
2151
|
-
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-
|
|
2152
|
-
const MySiteScreen$1 = lazy(() => import("./MySiteScreen-
|
|
2151
|
+
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-CLWE6k0f.mjs").then((m) => ({ default: m.ShareablesScreen })));
|
|
2152
|
+
const MySiteScreen$1 = lazy(() => import("./MySiteScreen-DLjzvEki.mjs").then((m) => ({ default: m.MySiteScreen })));
|
|
2153
2153
|
const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-Bsx6K7sU.mjs").then((n) => n.t).then((m) => ({ default: m.AppDownloadScreen })));
|
|
2154
2154
|
const ActivityScreen$1 = lazy(() => import("./ActivityScreen-D8z94G99.mjs").then((n) => n.n).then((m) => ({ default: m.ActivityScreen })));
|
|
2155
2155
|
const SCREEN_FOR_SLUG = {
|
|
@@ -4691,15 +4691,15 @@ const CORE_PAGE_IDS = {
|
|
|
4691
4691
|
//#endregion
|
|
4692
4692
|
//#region src/screens/index.ts
|
|
4693
4693
|
const screenPropertySchemas = {
|
|
4694
|
-
ProfileScreen: () => import("./ProfileScreen-
|
|
4695
|
-
MessagingScreen: () => import("./MessagingScreen-
|
|
4696
|
-
ContactsScreen: () => import("./ContactsScreen-
|
|
4697
|
-
OrdersScreen: () => import("./OrdersScreen-
|
|
4698
|
-
SubscriptionsScreen: () => import("./SubscriptionsScreen-
|
|
4694
|
+
ProfileScreen: () => import("./ProfileScreen-DZ-7HOsx.mjs").then((m) => m.profileScreenPropertySchema),
|
|
4695
|
+
MessagingScreen: () => import("./MessagingScreen-lOZAO_bK.mjs").then((m) => m.messagingScreenPropertySchema),
|
|
4696
|
+
ContactsScreen: () => import("./ContactsScreen-CuvDf6x7.mjs").then((m) => m.contactsScreenPropertySchema),
|
|
4697
|
+
OrdersScreen: () => import("./OrdersScreen-B3jUsijU.mjs").then((m) => m.ordersScreenPropertySchema),
|
|
4698
|
+
SubscriptionsScreen: () => import("./SubscriptionsScreen-BcqROCUq.mjs").then((m) => m.subscriptionsScreenPropertySchema),
|
|
4699
4699
|
CustomersScreen: () => import("./CustomersScreen-BpVaNCST.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
|
|
4700
|
-
MySiteScreen: () => import("./MySiteScreen-
|
|
4701
|
-
ShareablesScreen: () => import("./ShareablesScreen-
|
|
4702
|
-
ShopScreen: () => import("./ShopScreen-
|
|
4700
|
+
MySiteScreen: () => import("./MySiteScreen-DLjzvEki.mjs").then((m) => m.mySiteScreenPropertySchema),
|
|
4701
|
+
ShareablesScreen: () => import("./ShareablesScreen-CLWE6k0f.mjs").then((m) => m.shareablesScreenPropertySchema),
|
|
4702
|
+
ShopScreen: () => import("./ShopScreen-XL3vx5XV.mjs").then((m) => m.shopScreenPropertySchema),
|
|
4703
4703
|
AppDownloadScreen: () => import("./AppDownloadScreen-Bsx6K7sU.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema),
|
|
4704
4704
|
ActivityScreen: () => import("./ActivityScreen-D8z94G99.mjs").then((n) => n.n).then((m) => m.activityScreenPropertySchema)
|
|
4705
4705
|
};
|
|
@@ -20,7 +20,6 @@ import "../widgets-api-context-BrKBWyJZ.mjs";
|
|
|
20
20
|
import "../EmbedWidget-D6U3ArjA.mjs";
|
|
21
21
|
import "../PointsWidget-B1G1NLSI.mjs";
|
|
22
22
|
import "../task-composer-form-TlFJ-M6U.mjs";
|
|
23
|
-
import "../use-account-CHPyFSMt.mjs";
|
|
24
23
|
import "../LayoutWidget-Dg11I9Jc.mjs";
|
|
25
24
|
import { y as isPropertyFieldType } from "../registries-B3ZDv3YB.mjs";
|
|
26
25
|
import "../fields-CMXWk9iC.mjs";
|
|
@@ -60,8 +59,6 @@ import "../ToDoWidget-BNEKBOeO.mjs";
|
|
|
60
59
|
import "../ResponsiveDialog-rCN0eISF.mjs";
|
|
61
60
|
import "../VideoWidget-rp-m3CUi.mjs";
|
|
62
61
|
import "../ShopWidget-1a_qsK7Q.mjs";
|
|
63
|
-
import "../AppNavigationContext-DTlEiEhX.mjs";
|
|
64
|
-
import "../use-store-Cll-7n7D.mjs";
|
|
65
62
|
//#region src/utils/build-remote-widget-plugin-manifests.ts
|
|
66
63
|
const REMOTE_WIDGET_PACKAGE_CATEGORY_PREFIX = "custom-widget-package";
|
|
67
64
|
/**
|
|
@@ -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":"
|
|
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,7 +20,6 @@ import "../widgets-api-context-BrKBWyJZ.mjs";
|
|
|
20
20
|
import "../EmbedWidget-D6U3ArjA.mjs";
|
|
21
21
|
import "../PointsWidget-B1G1NLSI.mjs";
|
|
22
22
|
import "../task-composer-form-TlFJ-M6U.mjs";
|
|
23
|
-
import "../use-account-CHPyFSMt.mjs";
|
|
24
23
|
import "../LayoutWidget-Dg11I9Jc.mjs";
|
|
25
24
|
import "../registries-B3ZDv3YB.mjs";
|
|
26
25
|
import "../fields-CMXWk9iC.mjs";
|
|
@@ -60,6 +59,4 @@ import "../ToDoWidget-BNEKBOeO.mjs";
|
|
|
60
59
|
import "../ResponsiveDialog-rCN0eISF.mjs";
|
|
61
60
|
import "../VideoWidget-rp-m3CUi.mjs";
|
|
62
61
|
import "../ShopWidget-1a_qsK7Q.mjs";
|
|
63
|
-
import "../AppNavigationContext-DTlEiEhX.mjs";
|
|
64
|
-
import "../use-store-Cll-7n7D.mjs";
|
|
65
62
|
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.
|
|
3
|
+
"version": "0.1.649",
|
|
4
4
|
"description": "SDK for building custom Fluid portals",
|
|
5
5
|
"files": [
|
|
6
6
|
"authoring",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@fluid-app/widget-runtime": "0.1.
|
|
57
|
+
"@fluid-app/widget-runtime": "0.1.114",
|
|
58
58
|
"@radix-ui/react-slot": "^1.1.2",
|
|
59
59
|
"@remote-dom/react": "^1.2.2",
|
|
60
60
|
"class-variance-authority": "^0.7.1",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@fluid-app/address-fields": "0.1.0",
|
|
73
73
|
"@fluid-app/api-client-core": "0.1.0",
|
|
74
74
|
"@fluid-app/auth": "0.1.0",
|
|
75
|
-
"@fluid-app/cart-ui": "0.1.
|
|
75
|
+
"@fluid-app/cart-ui": "0.1.65",
|
|
76
76
|
"@fluid-app/company-switcher-ui": "0.1.0",
|
|
77
77
|
"@fluid-app/contacts-core": "0.1.0",
|
|
78
78
|
"@fluid-app/contacts-ui": "0.1.0",
|