@ninetailed/experience.js-react 3.0.2-beta.1 → 3.0.2-beta.2

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/index.cjs CHANGED
@@ -2821,10 +2821,13 @@ const Experience = _a => {
2821
2821
  }
2822
2822
  }, [status, experience, profile]);
2823
2823
  if (!hasVariants) {
2824
- return jsxRuntime.jsx(Component, Object.assign({}, passthroughProps, baseline));
2824
+ return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2825
+ key: baseline.id
2826
+ }));
2825
2827
  }
2826
2828
  if (status === 'loading') {
2827
- return jsxRuntime.jsx(LoadingComponent, Object.assign({}, baseline, {
2829
+ return /*#__PURE__*/React.createElement(LoadingComponent, Object.assign({}, baseline, {
2830
+ key: baseline.id,
2828
2831
  passthroughProps: passthroughProps,
2829
2832
  experiences: experiences,
2830
2833
  component: Component
package/index.js CHANGED
@@ -2808,10 +2808,13 @@ const Experience = _a => {
2808
2808
  }
2809
2809
  }, [status, experience, profile]);
2810
2810
  if (!hasVariants) {
2811
- return jsx(Component, Object.assign({}, passthroughProps, baseline));
2811
+ return /*#__PURE__*/createElement$1(Component, Object.assign({}, passthroughProps, baseline, {
2812
+ key: baseline.id
2813
+ }));
2812
2814
  }
2813
2815
  if (status === 'loading') {
2814
- return jsx(LoadingComponent, Object.assign({}, baseline, {
2816
+ return /*#__PURE__*/createElement$1(LoadingComponent, Object.assign({}, baseline, {
2817
+ key: baseline.id,
2815
2818
  passthroughProps: passthroughProps,
2816
2819
  experiences: experiences,
2817
2820
  component: Component
@@ -12,5 +12,5 @@ export declare const ESRProvider: React.FC<PropsWithChildren<ESRProviderProps>>;
12
12
  export declare const useESR: () => {
13
13
  experienceVariantsMap: Record<string, number>;
14
14
  };
15
- export declare const ESRLoadingComponent: <P extends Record<string, unknown> & Reference>({ experiences, component: Component, passthroughProps, ...baseline }: ExperienceBaseProps<P, Partial<P>, Pick<P, Exclude<keyof P, keyof P>> & Reference>) => JSX.Element;
15
+ export declare const ESRLoadingComponent: <P, PassThroughProps extends Partial<P> = Partial<P>, Variant extends Pick<P, Exclude<keyof P, keyof PassThroughProps>> & Reference = Pick<P, Exclude<keyof P, keyof PassThroughProps>> & Reference>({ experiences, component: Component, passthroughProps, ...baseline }: ExperienceBaseProps<P, PassThroughProps, Variant>) => JSX.Element;
16
16
  export {};
@@ -14,7 +14,7 @@ export declare type ExperienceBaseProps<P, PassThroughProps extends Partial<P>,
14
14
  passthroughProps?: PassThroughProps;
15
15
  };
16
16
  export declare type ExperienceLoadingComponent<P, PassThroughProps extends Partial<P>, Variant extends Pick<P, Exclude<keyof P, keyof PassThroughProps>> & Reference> = React.ComponentType<ExperienceBaseProps<P, PassThroughProps, Variant>>;
17
- export declare type ExperienceProps<P, PassThroughProps extends Partial<P>, Variant extends Pick<P, Exclude<keyof P, keyof PassThroughProps>> & Reference> = ExperienceBaseProps<P, PassThroughProps, Variant> & {
17
+ export declare type ExperienceProps<P, PassThroughProps extends Partial<P> = Partial<P>, Variant extends Pick<P, Exclude<keyof P, keyof PassThroughProps>> & Reference = Pick<P, Exclude<keyof P, keyof PassThroughProps>> & Reference> = ExperienceBaseProps<P, PassThroughProps, Variant> & {
18
18
  experiences: ExperienceConfiguration<Variant>[];
19
19
  component: React.ComponentType<P>;
20
20
  loadingComponent?: ExperienceLoadingComponent<P, PassThroughProps, Variant>;
@@ -1,3 +1,3 @@
1
- export declare type Baseline<P extends Record<string, unknown> = Record<string, unknown>> = P & {
1
+ export declare type Baseline<P extends object = object> = P & {
2
2
  id: string;
3
3
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js-react",
3
- "version": "3.0.2-beta.1",
3
+ "version": "3.0.2-beta.2",
4
4
  "peerDependencies": {
5
5
  "react": ">=16.8.0"
6
6
  },
@@ -8,9 +8,9 @@
8
8
  "@analytics/google-analytics": "0.5.3",
9
9
  "react-visibility-sensor": "5.1.1",
10
10
  "lodash": "4.17.21",
11
- "@ninetailed/experience.js": "3.0.2-beta.1",
11
+ "@ninetailed/experience.js": "3.0.2-beta.2",
12
12
  "react-intersection-observer": "8.34.0",
13
- "@ninetailed/experience.js-shared": "3.0.2-beta.1",
13
+ "@ninetailed/experience.js-shared": "3.0.2-beta.2",
14
14
  "analytics": "0.8.1"
15
15
  },
16
16
  "module": "./index.js",