@fluid-app/portal-sdk 0.1.127 → 0.1.129
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-BKOHursc.mjs.map +1 -1
- package/dist/ContactsScreen-DN8Qt2Ih.cjs.map +1 -1
- package/dist/{ShopScreen-B0VkBuQI.cjs → ShopScreen-8OQhLeLt.cjs} +1 -1
- package/dist/{ShopScreen-B4Tmn4pJ.cjs → ShopScreen-CHH0cx2P.cjs} +2 -2
- package/dist/{ShopScreen-B4Tmn4pJ.cjs.map → ShopScreen-CHH0cx2P.cjs.map} +1 -1
- package/dist/{ShopScreen-DJt1rKw3.mjs → ShopScreen-Yi9sOX_2.mjs} +2 -2
- package/dist/{ShopScreen-DJt1rKw3.mjs.map → ShopScreen-Yi9sOX_2.mjs.map} +1 -1
- package/dist/index.cjs +20 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1656 -1654
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1656 -1654
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +20 -18
- package/dist/index.mjs.map +1 -1
- package/dist/vite/index.cjs +44 -2
- package/dist/vite/index.cjs.map +1 -1
- package/dist/vite/index.d.cts +2 -2
- package/dist/vite/index.d.cts.map +1 -1
- package/dist/vite/index.d.mts +2 -2
- package/dist/vite/index.d.mts.map +1 -1
- package/dist/vite/index.mjs +44 -2
- package/dist/vite/index.mjs.map +1 -1
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -55,7 +55,7 @@ require("./src-BJdOxgpp.cjs");
|
|
|
55
55
|
require("./dist-BF_4vk1z.cjs");
|
|
56
56
|
const require_ProductsScreen = require("./ProductsScreen-C8UfVLRr.cjs");
|
|
57
57
|
const require_MySiteScreen = require("./MySiteScreen-nV8x9xyy.cjs");
|
|
58
|
-
const require_ShopScreen = require("./ShopScreen-
|
|
58
|
+
const require_ShopScreen = require("./ShopScreen-CHH0cx2P.cjs");
|
|
59
59
|
require("./UpgradeScreen-CKQhKJzK.cjs");
|
|
60
60
|
require("./AppDownloadScreen-DTxo4z3_.cjs");
|
|
61
61
|
let react = require("react");
|
|
@@ -3005,7 +3005,7 @@ const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => requir
|
|
|
3005
3005
|
const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-C2F3HNJS.cjs")).then((m) => ({ default: m.SubscriptionsScreen })));
|
|
3006
3006
|
const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-bzzXjQMu.cjs")).then((m) => ({ default: m.MessagingScreen })));
|
|
3007
3007
|
const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-FrVLbjGO.cjs")).then((m) => ({ default: m.ContactsScreen })));
|
|
3008
|
-
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-
|
|
3008
|
+
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-8OQhLeLt.cjs")).then((m) => ({ default: m.ShopScreen })));
|
|
3009
3009
|
const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-Bd9eK18y.cjs")).then((n) => n.CustomersScreen_exports).then((m) => ({ default: m.CustomersScreen })));
|
|
3010
3010
|
const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-BIYHPaBZ.cjs")).then((m) => ({ default: m.ProductsScreen })));
|
|
3011
3011
|
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-BrC5LGtU.cjs")).then((m) => ({ default: m.ShareablesScreen })));
|
|
@@ -3499,6 +3499,21 @@ function createDefaultAuthConfig(overrides) {
|
|
|
3499
3499
|
return { ...overrides };
|
|
3500
3500
|
}
|
|
3501
3501
|
//#endregion
|
|
3502
|
+
//#region src/utils/build-widget-registry.ts
|
|
3503
|
+
/**
|
|
3504
|
+
* Merges custom widget components from manifests into the default
|
|
3505
|
+
* SDK widget registry. Returns the default registry unchanged when
|
|
3506
|
+
* no custom widgets are provided (avoids unnecessary object creation).
|
|
3507
|
+
*/
|
|
3508
|
+
function buildWidgetRegistry(manifests) {
|
|
3509
|
+
if (manifests.length === 0) return require_FluidProvider.DEFAULT_SDK_WIDGET_REGISTRY;
|
|
3510
|
+
const customEntries = Object.fromEntries(manifests.map((m) => [m.type, m.component]));
|
|
3511
|
+
return {
|
|
3512
|
+
...require_FluidProvider.DEFAULT_SDK_WIDGET_REGISTRY,
|
|
3513
|
+
...customEntries
|
|
3514
|
+
};
|
|
3515
|
+
}
|
|
3516
|
+
//#endregion
|
|
3502
3517
|
//#region src/entry/create-portal.tsx
|
|
3503
3518
|
/**
|
|
3504
3519
|
* Bootstrap a Fluid portal with a single function call.
|
|
@@ -3538,6 +3553,7 @@ function createPortal(config = {}) {
|
|
|
3538
3553
|
if (!rootElement) throw new Error(`Portal root element "#${config.rootId ?? "root"}" not found`);
|
|
3539
3554
|
const fluidConfig = createDefaultFluidConfig(config.fluid);
|
|
3540
3555
|
const authConfig = createDefaultAuthConfig(config.auth);
|
|
3556
|
+
const widgetRegistry = config.customWidgets?.length ? buildWidgetRegistry(config.customWidgets) : void 0;
|
|
3541
3557
|
let app = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AppShell, {
|
|
3542
3558
|
customPages: config.customPages,
|
|
3543
3559
|
...config.shell
|
|
@@ -3550,6 +3566,7 @@ function createPortal(config = {}) {
|
|
|
3550
3566
|
config: authConfig,
|
|
3551
3567
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FluidProvider.FluidProvider, {
|
|
3552
3568
|
config: fluidConfig,
|
|
3569
|
+
widgetRegistry,
|
|
3553
3570
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RequireAuth, { children: app })
|
|
3554
3571
|
})
|
|
3555
3572
|
});
|
|
@@ -4468,7 +4485,7 @@ const screenPropertySchemas = {
|
|
|
4468
4485
|
ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-BIYHPaBZ.cjs")).then((m) => m.productsScreenPropertySchema),
|
|
4469
4486
|
MySiteScreen: () => Promise.resolve().then(() => require("./MySiteScreen-CYZpUYTn.cjs")).then((m) => m.mySiteScreenPropertySchema),
|
|
4470
4487
|
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-BrC5LGtU.cjs")).then((m) => m.shareablesScreenPropertySchema),
|
|
4471
|
-
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-
|
|
4488
|
+
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-8OQhLeLt.cjs")).then((m) => m.shopScreenPropertySchema),
|
|
4472
4489
|
UpgradeScreen: () => Promise.resolve().then(() => require("./UpgradeScreen-DchSU0sW.cjs")).then((m) => m.upgradeScreenPropertySchema),
|
|
4473
4490
|
AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-Chxavsr_.cjs")).then((m) => m.appDownloadScreenPropertySchema)
|
|
4474
4491
|
};
|
|
@@ -4742,21 +4759,6 @@ function registerCorePageTemplates() {
|
|
|
4742
4759
|
}
|
|
4743
4760
|
registerCorePageTemplates();
|
|
4744
4761
|
//#endregion
|
|
4745
|
-
//#region src/utils/build-widget-registry.ts
|
|
4746
|
-
/**
|
|
4747
|
-
* Merges custom widget components from manifests into the default
|
|
4748
|
-
* SDK widget registry. Returns the default registry unchanged when
|
|
4749
|
-
* no custom widgets are provided (avoids unnecessary object creation).
|
|
4750
|
-
*/
|
|
4751
|
-
function buildWidgetRegistry(manifests) {
|
|
4752
|
-
if (manifests.length === 0) return require_FluidProvider.DEFAULT_SDK_WIDGET_REGISTRY;
|
|
4753
|
-
const customEntries = Object.fromEntries(manifests.map((m) => [m.type, m.component]));
|
|
4754
|
-
return {
|
|
4755
|
-
...require_FluidProvider.DEFAULT_SDK_WIDGET_REGISTRY,
|
|
4756
|
-
...customEntries
|
|
4757
|
-
};
|
|
4758
|
-
}
|
|
4759
|
-
//#endregion
|
|
4760
4762
|
//#region src/shell/AppLink.tsx
|
|
4761
4763
|
/**
|
|
4762
4764
|
* SPA-aware link that renders a real `<a href>` for accessibility
|