@amplifyup/sdk 0.1.48 → 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/dist/react.d.mts CHANGED
@@ -5,8 +5,6 @@ import React, { ReactNode } from 'react';
5
5
  export { AmplifyRenderer } from './AmplifyRenderer.mjs';
6
6
  export { Q as QueryContentError, e as QueryContentOptions, k as QueryFilter, l as QueryFilterOp, i as QueryPagination, h as QueryResult, m as QuerySort, j as QuerySpec, S as SelectVariantsError, a as SelectVariantsOptions, b as SelectVariantsResult, n as nextPageSpec, q as queryContent, d as searchSpec, s as selectVariants } from './query-CWFb7rSm.mjs';
7
7
  export { i as isComposerPreview, a as isPreviewRequest, b as isWorkingContentRequest } from './preview-_vHmzRen.mjs';
8
- export { fetchPageConfigServer } from './server.mjs';
9
- import './reservedRoutes-aGgViBDM.mjs';
10
8
 
11
9
  type RenderComponentContext = {
12
10
  /** Unique layout-tree node id — required when multiple instances share a component type. */
@@ -93,7 +91,7 @@ declare function Field({ name, fallback, className, render, }: {
93
91
  fallback?: ReactNode;
94
92
  className?: string;
95
93
  render?: (value: any) => ReactNode;
96
- }): string | number | true | Iterable<React.ReactNode> | react_jsx_runtime.JSX.Element | null;
94
+ }): string | number | true | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | null;
97
95
  /**
98
96
  * RichText - Renders a markdown (or HTML string) field as formatted HTML.
99
97
  *
package/dist/react.d.ts CHANGED
@@ -5,8 +5,6 @@ import React, { ReactNode } from 'react';
5
5
  export { AmplifyRenderer } from './AmplifyRenderer.js';
6
6
  export { Q as QueryContentError, e as QueryContentOptions, k as QueryFilter, l as QueryFilterOp, i as QueryPagination, h as QueryResult, m as QuerySort, j as QuerySpec, S as SelectVariantsError, a as SelectVariantsOptions, b as SelectVariantsResult, n as nextPageSpec, q as queryContent, d as searchSpec, s as selectVariants } from './query-L7zSmLFX.js';
7
7
  export { i as isComposerPreview, a as isPreviewRequest, b as isWorkingContentRequest } from './preview-_vHmzRen.js';
8
- export { fetchPageConfigServer } from './server.js';
9
- import './reservedRoutes-aGgViBDM.js';
10
8
 
11
9
  type RenderComponentContext = {
12
10
  /** Unique layout-tree node id — required when multiple instances share a component type. */
@@ -93,7 +91,7 @@ declare function Field({ name, fallback, className, render, }: {
93
91
  fallback?: ReactNode;
94
92
  className?: string;
95
93
  render?: (value: any) => ReactNode;
96
- }): string | number | true | Iterable<React.ReactNode> | react_jsx_runtime.JSX.Element | null;
94
+ }): string | number | true | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | null;
97
95
  /**
98
96
  * RichText - Renders a markdown (or HTML string) field as formatted HTML.
99
97
  *
package/dist/react.js CHANGED
@@ -4635,61 +4635,6 @@ function AmplifyPageContent({
4635
4635
  }
4636
4636
  );
4637
4637
  }
4638
-
4639
- // src/server.tsx
4640
- var AMPLIFY_DEFAULT_REVALIDATE = 60;
4641
- async function fetchPageConfigServer(route, trackingId, preview = false, options) {
4642
- const target = resolveAmplifyUpTarget({
4643
- configTarget: options?.target
4644
- });
4645
- const { orchestratorUrl, edgeUrl } = resolveAmplifyUpUrls(target);
4646
- const previewFlag = preview || (options?.searchParams ? isPreviewRequest(options.searchParams) : false);
4647
- const workingFlag = options?.searchParams ? isWorkingContentRequest(options.searchParams) : false;
4648
- const fetchOrchestratorPage = async (pageRoute, isPreview) => {
4649
- const params = new URLSearchParams({
4650
- route: pageRoute,
4651
- trackingId
4652
- });
4653
- if (isPreview) params.set("preview", "true");
4654
- if (workingFlag) params.set("working", "true");
4655
- if (options?.searchParams) {
4656
- const sp = options.searchParams instanceof URLSearchParams ? options.searchParams : new URLSearchParams(
4657
- Object.entries(options.searchParams).flatMap(
4658
- ([k, v]) => v == null ? [] : Array.isArray(v) ? v.map((item) => [k, item]) : [[k, v]]
4659
- )
4660
- );
4661
- const zoneId = sp.get("zoneId");
4662
- const compositionId = sp.get("compositionId");
4663
- if (zoneId) params.set("zoneId", zoneId);
4664
- if (compositionId) params.set("compositionId", compositionId);
4665
- }
4666
- const url = `${orchestratorUrl}/api/layout/provider?${params.toString()}`;
4667
- try {
4668
- const res = await fetch(url, {
4669
- cache: "no-store",
4670
- headers: { Accept: "application/json" }
4671
- });
4672
- if (!res.ok) return null;
4673
- const data = await res.json();
4674
- return data.page || null;
4675
- } catch {
4676
- return null;
4677
- }
4678
- };
4679
- const result = await fetchContent({
4680
- route,
4681
- trackingId,
4682
- anonId: options?.anonId,
4683
- siteId: options?.siteId,
4684
- preview: previewFlag,
4685
- orchestratorUrl,
4686
- edgeUrl,
4687
- fetchOrchestratorPage,
4688
- revalidate: previewFlag ? void 0 : options?.revalidate ?? AMPLIFY_DEFAULT_REVALIDATE,
4689
- variantKeys: previewFlag ? void 0 : options?.variantKeys
4690
- });
4691
- return result.pageConfig;
4692
- }
4693
4638
  var usePathname = null;
4694
4639
  if (typeof window !== "undefined") {
4695
4640
  try {
@@ -4906,7 +4851,6 @@ exports.QueryContentError = QueryContentError;
4906
4851
  exports.RichText = RichText;
4907
4852
  exports.SelectVariantsError = SelectVariantsError;
4908
4853
  exports.Slot = Slot;
4909
- exports.fetchPageConfigServer = fetchPageConfigServer;
4910
4854
  exports.isComposerPreview = isComposerPreview;
4911
4855
  exports.isPreviewRequest = isPreviewRequest;
4912
4856
  exports.isWorkingContentRequest = isWorkingContentRequest;