@amplifyup/sdk 0.2.3 → 0.2.5

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.
@@ -1,6 +1,5 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ComponentType, ReactNode } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
3
  import { P as PageConfig } from './types-ffQNIQCK.js';
5
4
 
6
5
  declare const REGISTRY_BRAND: unique symbol;
@@ -41,7 +40,7 @@ interface AmplifyRendererProps {
41
40
  */
42
41
  composerPreview?: boolean;
43
42
  }
44
- declare function AmplifyRendererInner(rendererProps: AmplifyRendererProps): react_jsx_runtime.JSX.Element | null;
45
- declare const AmplifyRenderer: react.MemoExoticComponent<typeof AmplifyRendererInner>;
43
+ declare function AmplifyRendererInner(rendererProps: AmplifyRendererProps): React.JSX.Element | null;
44
+ declare const AmplifyRenderer: React.MemoExoticComponent<typeof AmplifyRendererInner>;
46
45
 
47
46
  export { AmplifyRenderer as A, type ComponentRegistry as C, defineComponentRegistry as d };
@@ -1,6 +1,5 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ComponentType, ReactNode } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
3
  import { P as PageConfig } from './types-ffQNIQCK.mjs';
5
4
 
6
5
  declare const REGISTRY_BRAND: unique symbol;
@@ -41,7 +40,7 @@ interface AmplifyRendererProps {
41
40
  */
42
41
  composerPreview?: boolean;
43
42
  }
44
- declare function AmplifyRendererInner(rendererProps: AmplifyRendererProps): react_jsx_runtime.JSX.Element | null;
45
- declare const AmplifyRenderer: react.MemoExoticComponent<typeof AmplifyRendererInner>;
43
+ declare function AmplifyRendererInner(rendererProps: AmplifyRendererProps): React.JSX.Element | null;
44
+ declare const AmplifyRenderer: React.MemoExoticComponent<typeof AmplifyRendererInner>;
46
45
 
47
46
  export { AmplifyRenderer as A, type ComponentRegistry as C, defineComponentRegistry as d };
@@ -1,4 +1,3 @@
1
1
  import 'react';
2
- import 'react/jsx-runtime';
3
- export { A as AmplifyRenderer } from './AmplifyRenderer-CPUr9Bkc.mjs';
2
+ export { A as AmplifyRenderer } from './AmplifyRenderer-eGtn5k9_.mjs';
4
3
  import './types-ffQNIQCK.mjs';
@@ -1,4 +1,3 @@
1
1
  import 'react';
2
- import 'react/jsx-runtime';
3
- export { A as AmplifyRenderer } from './AmplifyRenderer-BNWBrFQN.js';
2
+ export { A as AmplifyRenderer } from './AmplifyRenderer-CTwblDs3.js';
4
3
  import './types-ffQNIQCK.js';
@@ -433,7 +433,7 @@ function isComposerPreview() {
433
433
  }
434
434
 
435
435
  // src/field-envelope.ts
436
- var FIELDS_BRAND = Symbol("amplifyup.fields");
436
+ var FIELDS_BRAND = /* @__PURE__ */ Symbol("amplifyup.fields");
437
437
  var IDENTIFIER_KEYS = /* @__PURE__ */ new Set([
438
438
  "id",
439
439
  "_id",
@@ -3546,7 +3546,6 @@ function getSDK(adapter) {
3546
3546
  sdkInstance.ensureWindowBridge();
3547
3547
  return sdkInstance;
3548
3548
  }
3549
- var trackContentView = (contentId, contentType, properties) => getSDK().trackContentView(contentId, contentType, properties);
3550
3549
  var refreshEventTracking = () => getSDK().refreshEventTracking();
3551
3550
  getSDK();
3552
3551
  var PageContentRegistryContext = react.createContext(null);
@@ -3706,7 +3705,7 @@ function ComponentContextProvider({
3706
3705
  const next = hydratePageResourceProps(props || {}, getPageResourceFields());
3707
3706
  return /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, { value: { slots, props: next, layoutNodeId, componentId }, children });
3708
3707
  }
3709
- var REGISTRY_BRAND = Symbol.for("amplifyup.componentRegistry");
3708
+ var REGISTRY_BRAND = /* @__PURE__ */ Symbol.for("amplifyup.componentRegistry");
3710
3709
  var isComponentRegistry = (value) => !!value && typeof value === "object" && value[REGISTRY_BRAND] === true;
3711
3710
  var warnedMissing = /* @__PURE__ */ new Set();
3712
3711
  var warnMissingOnce = (componentId) => {
@@ -3891,32 +3890,6 @@ function AmplifyRendererInner(rendererProps) {
3891
3890
  const error = serverPageConfig ? null : clientHook.error;
3892
3891
  const contentSource = clientHook.source;
3893
3892
  const [variantCache, setVariantCache] = react.useState({});
3894
- react.useEffect(() => {
3895
- if (typeof window !== "undefined") {
3896
- if (window.__AMPLIFYUP_PREVIEW_MODE__ === true) {
3897
- return;
3898
- }
3899
- if (window.location.pathname.includes("/api/pages/proxy")) {
3900
- return;
3901
- }
3902
- if (window.self !== window.top) {
3903
- return;
3904
- }
3905
- const urlParams = new URLSearchParams(window.location.search);
3906
- if (urlParams.get("preview") === "true" || urlParams.get("visualEditor") === "true") {
3907
- return;
3908
- }
3909
- if (window.location.href.includes("preview=true") || window.location.href.includes("visualEditor=true")) {
3910
- return;
3911
- }
3912
- }
3913
- if (pageConfig && pageConfig.id !== "default") {
3914
- trackContentView(pageConfig.id, "page", {
3915
- route: pageConfig.route,
3916
- title: pageConfig.title
3917
- });
3918
- }
3919
- }, [pageConfig]);
3920
3893
  react.useEffect(() => {
3921
3894
  if (!pageConfig?.eventTracking?.length) return;
3922
3895
  const sdk = getSDK();