@nexly/core 0.13.0 → 0.15.0
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/nexly-base.d.ts +5 -4
- package/dist/nexly-base.d.ts.map +1 -1
- package/dist/nexly-base.js +4 -1
- package/package.json +1 -1
package/dist/nexly-base.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type NexlyInit = {
|
|
|
18
18
|
client?: NexlyClient;
|
|
19
19
|
};
|
|
20
20
|
/** Allowed event types. The backend rejects any other value. */
|
|
21
|
-
export type NexlyEventType = 'pageview' | 'engagement' | 'custom';
|
|
21
|
+
export type NexlyEventType = 'pageview' | 'engagement' | 'custom' | 'navigation';
|
|
22
22
|
export type NexlyEventInput = {
|
|
23
23
|
name: string;
|
|
24
24
|
type: NexlyEventType | string;
|
|
@@ -34,7 +34,10 @@ export type NexlyEventInput = {
|
|
|
34
34
|
* - {@link collectEventContext} — per-event volatile metadata (path, visitor/session IDs, viewport).
|
|
35
35
|
* - {@link collectSessionContext} — session-stable metadata (OS, locale, screen).
|
|
36
36
|
* - {@link getDefaultPath} — current path / screen name.
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
|
+
* Engagement listeners (`startEngagement`) are declared on platform subclasses
|
|
39
|
+
* that support them (`@nexly/web`, `@nexly/react-native`). Server runtimes
|
|
40
|
+
* (`@nexly/node`) intentionally omit them.
|
|
38
41
|
*/
|
|
39
42
|
export declare abstract class NexlyBase {
|
|
40
43
|
private static _instance;
|
|
@@ -64,8 +67,6 @@ export declare abstract class NexlyBase {
|
|
|
64
67
|
protected abstract collectSessionContext(): Record<string, unknown>;
|
|
65
68
|
/** Current path (web) or screen name (native). */
|
|
66
69
|
abstract getDefaultPath(): string;
|
|
67
|
-
/** Start platform-specific engagement tracking. Returns a cleanup function. */
|
|
68
|
-
abstract startEngagement(): () => void;
|
|
69
70
|
/**
|
|
70
71
|
* Sends a page view (`event_name` / `event_type`: `pageview`) with full context.
|
|
71
72
|
*/
|
package/dist/nexly-base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nexly-base.d.ts","sourceRoot":"","sources":["../src/nexly-base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAI1E,eAAO,MAAM,mBAAmB,qCAAqC,CAAA;AAErE,sGAAsG;AACtG,MAAM,MAAM,SAAS,GAAG;IACtB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAED,gEAAgE;AAChE,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,YAAY,GAAG,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"nexly-base.d.ts","sourceRoot":"","sources":["../src/nexly-base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAI1E,eAAO,MAAM,mBAAmB,qCAAqC,CAAA;AAErE,sGAAsG;AACtG,MAAM,MAAM,SAAS,GAAG;IACtB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAED,gEAAgE;AAChE,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,YAAY,CAAA;AAEhF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,c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G;IACH,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO;IAYtC,OAAO,CAAC,QAAQ;CA4BjB"}
|
package/dist/nexly-base.js
CHANGED
|
@@ -8,7 +8,10 @@ export const DEFAULT_COLLECT_URL = 'https://gate.nexly.to/v1/collect';
|
|
|
8
8
|
* - {@link collectEventContext} — per-event volatile metadata (path, visitor/session IDs, viewport).
|
|
9
9
|
* - {@link collectSessionContext} — session-stable metadata (OS, locale, screen).
|
|
10
10
|
* - {@link getDefaultPath} — current path / screen name.
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* Engagement listeners (`startEngagement`) are declared on platform subclasses
|
|
13
|
+
* that support them (`@nexly/web`, `@nexly/react-native`). Server runtimes
|
|
14
|
+
* (`@nexly/node`) intentionally omit them.
|
|
12
15
|
*/
|
|
13
16
|
export class NexlyBase {
|
|
14
17
|
static _instance = null;
|