@amplifyup/sdk 0.1.47 → 0.1.49
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/README.md +1 -1
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/react.d.mts +0 -2
- package/dist/react.d.ts +0 -2
- package/dist/react.js +0 -56
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1 -56
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.mjs
CHANGED
|
@@ -4629,61 +4629,6 @@ function AmplifyPageContent({
|
|
|
4629
4629
|
}
|
|
4630
4630
|
);
|
|
4631
4631
|
}
|
|
4632
|
-
|
|
4633
|
-
// src/server.tsx
|
|
4634
|
-
var AMPLIFY_DEFAULT_REVALIDATE = 60;
|
|
4635
|
-
async function fetchPageConfigServer(route, trackingId, preview = false, options) {
|
|
4636
|
-
const target = resolveAmplifyUpTarget({
|
|
4637
|
-
configTarget: options?.target
|
|
4638
|
-
});
|
|
4639
|
-
const { orchestratorUrl, edgeUrl } = resolveAmplifyUpUrls(target);
|
|
4640
|
-
const previewFlag = preview || (options?.searchParams ? isPreviewRequest(options.searchParams) : false);
|
|
4641
|
-
const workingFlag = options?.searchParams ? isWorkingContentRequest(options.searchParams) : false;
|
|
4642
|
-
const fetchOrchestratorPage = async (pageRoute, isPreview) => {
|
|
4643
|
-
const params = new URLSearchParams({
|
|
4644
|
-
route: pageRoute,
|
|
4645
|
-
trackingId
|
|
4646
|
-
});
|
|
4647
|
-
if (isPreview) params.set("preview", "true");
|
|
4648
|
-
if (workingFlag) params.set("working", "true");
|
|
4649
|
-
if (options?.searchParams) {
|
|
4650
|
-
const sp = options.searchParams instanceof URLSearchParams ? options.searchParams : new URLSearchParams(
|
|
4651
|
-
Object.entries(options.searchParams).flatMap(
|
|
4652
|
-
([k, v]) => v == null ? [] : Array.isArray(v) ? v.map((item) => [k, item]) : [[k, v]]
|
|
4653
|
-
)
|
|
4654
|
-
);
|
|
4655
|
-
const zoneId = sp.get("zoneId");
|
|
4656
|
-
const compositionId = sp.get("compositionId");
|
|
4657
|
-
if (zoneId) params.set("zoneId", zoneId);
|
|
4658
|
-
if (compositionId) params.set("compositionId", compositionId);
|
|
4659
|
-
}
|
|
4660
|
-
const url = `${orchestratorUrl}/api/layout/provider?${params.toString()}`;
|
|
4661
|
-
try {
|
|
4662
|
-
const res = await fetch(url, {
|
|
4663
|
-
cache: "no-store",
|
|
4664
|
-
headers: { Accept: "application/json" }
|
|
4665
|
-
});
|
|
4666
|
-
if (!res.ok) return null;
|
|
4667
|
-
const data = await res.json();
|
|
4668
|
-
return data.page || null;
|
|
4669
|
-
} catch {
|
|
4670
|
-
return null;
|
|
4671
|
-
}
|
|
4672
|
-
};
|
|
4673
|
-
const result = await fetchContent({
|
|
4674
|
-
route,
|
|
4675
|
-
trackingId,
|
|
4676
|
-
anonId: options?.anonId,
|
|
4677
|
-
siteId: options?.siteId,
|
|
4678
|
-
preview: previewFlag,
|
|
4679
|
-
orchestratorUrl,
|
|
4680
|
-
edgeUrl,
|
|
4681
|
-
fetchOrchestratorPage,
|
|
4682
|
-
revalidate: previewFlag ? void 0 : options?.revalidate ?? AMPLIFY_DEFAULT_REVALIDATE,
|
|
4683
|
-
variantKeys: previewFlag ? void 0 : options?.variantKeys
|
|
4684
|
-
});
|
|
4685
|
-
return result.pageConfig;
|
|
4686
|
-
}
|
|
4687
4632
|
var usePathname = null;
|
|
4688
4633
|
if (typeof window !== "undefined") {
|
|
4689
4634
|
try {
|
|
@@ -4890,6 +4835,6 @@ function useAmplifyUp() {
|
|
|
4890
4835
|
return context;
|
|
4891
4836
|
}
|
|
4892
4837
|
|
|
4893
|
-
export { AmplifyPageContent, AmplifyRenderer, AmplifyUpProvider, ComponentContextProvider, Field, Image, QueryContentError, RichText, SelectVariantsError, Slot,
|
|
4838
|
+
export { AmplifyPageContent, AmplifyRenderer, AmplifyUpProvider, ComponentContextProvider, Field, Image, QueryContentError, RichText, SelectVariantsError, Slot, isComposerPreview, isPreviewRequest, isWorkingContentRequest, nextPageSpec, queryContent, searchSpec, selectVariants, useAmplifyUp, useComponentProps, useLiveComposerProps };
|
|
4894
4839
|
//# sourceMappingURL=react.mjs.map
|
|
4895
4840
|
//# sourceMappingURL=react.mjs.map
|