@nexly/react-web 0.7.0 → 0.8.1

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 +1 @@
1
- {"version":3,"file":"nexly-provider.d.ts","sourceRoot":"","sources":["../src/nexly-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAiD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAIrF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,8FAA8F;IAC9F,SAAS,EAAE,MAAM,CAAA;IACjB,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,+HAA+H;IAC/H,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,KAAK,EACL,SAAS,EACT,YAAoB,EACpB,cAAsB,EACtB,QAAQ,GACT,EAAE,kBAAkB,2CAwBpB;AAED,sIAAsI;AACtI,wBAAgB,cAAc,IAAI,KAAK,GAAG,IAAI,CAE7C"}
1
+ {"version":3,"file":"nexly-provider.d.ts","sourceRoot":"","sources":["../src/nexly-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAiD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAIrF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,8FAA8F;IAC9F,SAAS,EAAE,MAAM,CAAA;IACjB,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,+HAA+H;IAC/H,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,KAAK,EACL,SAAS,EACT,YAAoB,EACpB,cAAsB,EACtB,QAAQ,GACT,EAAE,kBAAkB,2CA0BpB;AAED,sIAAsI;AACtI,wBAAgB,cAAc,IAAI,KAAK,GAAG,IAAI,CAE7C"}
@@ -4,9 +4,13 @@ import { createContext, useContext, useEffect, useMemo } from 'react';
4
4
  const NexlyClientContext = createContext(null);
5
5
  export function NexlyProvider({ collectUrl, appId, ingestKey, autoPageView = false, autoEngagement = false, children, }) {
6
6
  const client = useMemo(() => {
7
- const id = appId.trim();
8
- const k = ingestKey.trim();
7
+ const id = (appId ?? '').trim();
8
+ const k = (ingestKey ?? '').trim();
9
9
  if (!id || !k) {
10
+ if (!id)
11
+ console.warn('[Nexly] Missing appId — tracking is disabled.');
12
+ if (!k)
13
+ console.warn('[Nexly] Missing ingestKey — tracking is disabled.');
10
14
  return null;
11
15
  }
12
16
  return Nexly.init({ collectUrl, appId: id, key: k });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexly/react-web",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "React bindings for Nexly (@nexly/core): provider, client hook, engagement, optional auto pageview",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "react": "^18.0.0 || ^19.0.0"
40
40
  },
41
41
  "dependencies": {
42
- "@nexly/core": "0.7.0"
42
+ "@nexly/core": "0.8.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/react": "^19.2.14",