@ninetailed/experience.js-next 7.6.0-beta.1 → 7.6.0-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.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
@@ -2,36 +2,22 @@ import { useNinetailed, NinetailedProvider as NinetailedProvider$1 } from '@nine
2
2
  export * from '@ninetailed/experience.js-react';
3
3
  export * from '@ninetailed/experience.js-plugin-ssr';
4
4
  export { decodeExperienceVariantsMap } from '@ninetailed/experience.js';
5
- import { jsxs, jsx } from 'react/jsx-runtime';
6
5
  import { useRef, useEffect } from 'react';
7
6
  import { useRouter } from 'next/router';
8
7
  import { logger } from '@ninetailed/experience.js-shared';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
9
 
10
- /******************************************************************************
11
- Copyright (c) Microsoft Corporation.
12
-
13
- Permission to use, copy, modify, and/or distribute this software for any
14
- purpose with or without fee is hereby granted.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
17
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
19
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
20
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
21
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
- PERFORMANCE OF THIS SOFTWARE.
23
- ***************************************************************************** */
24
-
25
- function __rest(s, e) {
26
- var t = {};
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
- t[p] = s[p];
29
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
- t[p[i]] = s[p[i]];
33
- }
34
- return t;
10
+ function _objectWithoutPropertiesLoose(source, excluded) {
11
+ if (source == null) return {};
12
+ var target = {};
13
+ var sourceKeys = Object.keys(source);
14
+ var key, i;
15
+ for (i = 0; i < sourceKeys.length; i++) {
16
+ key = sourceKeys[i];
17
+ if (excluded.indexOf(key) >= 0) continue;
18
+ target[key] = source[key];
19
+ }
20
+ return target;
35
21
  }
36
22
 
37
23
  const Tracker = ({
@@ -72,17 +58,19 @@ const Tracker = ({
72
58
  return null;
73
59
  };
74
60
 
75
- const NinetailedProvider = _a => {
76
- var {
61
+ const _excluded = ["children"],
62
+ _excluded2 = ["onRouteChange"];
63
+ const NinetailedProvider = _ref => {
64
+ let {
77
65
  children
78
- } = _a,
79
- props = __rest(_a, ["children"]);
66
+ } = _ref,
67
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
80
68
  const {
81
69
  onRouteChange
82
70
  } = props,
83
- providerProps = __rest(props, ["onRouteChange"]);
84
- return jsxs(NinetailedProvider$1, Object.assign({}, providerProps, {
85
- children: [jsx(Tracker, {
71
+ providerProps = _objectWithoutPropertiesLoose(props, _excluded2);
72
+ return /*#__PURE__*/jsxs(NinetailedProvider$1, Object.assign({}, providerProps, {
73
+ children: [/*#__PURE__*/jsx(Tracker, {
86
74
  onRouteChange: onRouteChange
87
75
  }), children]
88
76
  }));
package/package.json CHANGED
@@ -1,19 +1,29 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js-next",
3
- "version": "7.6.0-beta.1",
3
+ "version": "7.6.0-beta.2",
4
+ "description": "Ninetailed SDK for Next.js",
4
5
  "peerDependencies": {
5
6
  "next": ">=9.0.0",
6
7
  "react": ">=16.8.0"
7
8
  },
8
- "license": "BSL-1.1",
9
- "module": "./index.js",
10
- "main": "./index.cjs",
11
- "type": "module",
12
- "types": "./src/index.d.ts",
13
9
  "dependencies": {
14
- "@ninetailed/experience.js": "7.6.0-beta.1",
15
- "@ninetailed/experience.js-plugin-ssr": "7.5.0",
16
- "@ninetailed/experience.js-react": "7.6.0-beta.1",
17
- "@ninetailed/experience.js-shared": "7.6.0-beta.1"
18
- }
10
+ "@ninetailed/experience.js-react": "*",
11
+ "@ninetailed/experience.js-plugin-ssr": "*",
12
+ "@ninetailed/experience.js": "*",
13
+ "@ninetailed/experience.js-shared": "*"
14
+ },
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/ninetailed-inc/experience.js.git",
19
+ "directory": "packages/sdks/nextjs"
20
+ },
21
+ "keywords": [
22
+ "nextjs",
23
+ "ninetailed",
24
+ "personalization",
25
+ "a/b testing"
26
+ ],
27
+ "module": "./index.esm.js",
28
+ "main": "./index.cjs.js"
19
29
  }
File without changes