@intlayer/analytics 9.7.0 → 9.7.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.
Files changed (64) hide show
  1. package/dist/cjs/core/AnalyticsClient.cjs +9 -10
  2. package/dist/cjs/core/abTesting.cjs +2 -3
  3. package/dist/cjs/core/eventBuffer.cjs +1 -2
  4. package/dist/cjs/core/globalManager.cjs +1 -2
  5. package/dist/cjs/core/index.cjs +8 -8
  6. package/dist/cjs/core/initAnalyticsClient.cjs +3 -4
  7. package/dist/cjs/core/publicToken.cjs +1 -2
  8. package/dist/cjs/core/sampling.cjs +2 -3
  9. package/dist/cjs/core/session.cjs +1 -2
  10. package/dist/cjs/core/transport.cjs +1 -2
  11. package/dist/cjs/events/contentExposure.cjs +1 -2
  12. package/dist/cjs/index.cjs +10 -10
  13. package/dist/cjs/isEnabled.cjs +2 -3
  14. package/dist/cjs/utils/hash.cjs +1 -2
  15. package/dist/cjs/utils/idle.cjs +1 -2
  16. package/dist/cjs/utils/isBot.cjs +1 -2
  17. package/dist/esm/core/AnalyticsClient.mjs +2 -3
  18. package/dist/esm/core/abTesting.mjs +1 -2
  19. package/dist/esm/core/eventBuffer.mjs +1 -2
  20. package/dist/esm/core/globalManager.mjs +1 -2
  21. package/dist/esm/core/index.mjs +3 -3
  22. package/dist/esm/core/initAnalyticsClient.mjs +1 -2
  23. package/dist/esm/core/publicToken.mjs +1 -2
  24. package/dist/esm/core/sampling.mjs +1 -2
  25. package/dist/esm/core/session.mjs +1 -2
  26. package/dist/esm/core/transport.mjs +1 -2
  27. package/dist/esm/events/contentExposure.mjs +1 -2
  28. package/dist/esm/index.mjs +2 -2
  29. package/dist/esm/isEnabled.mjs +1 -2
  30. package/dist/esm/utils/hash.mjs +1 -2
  31. package/dist/esm/utils/idle.mjs +1 -2
  32. package/dist/esm/utils/isBot.mjs +1 -2
  33. package/dist/types/core/AnalyticsClient.d.ts +0 -2
  34. package/dist/types/core/AnalyticsClient.d.ts.map +1 -1
  35. package/dist/types/core/abTesting.d.ts +0 -2
  36. package/dist/types/core/abTesting.d.ts.map +1 -1
  37. package/dist/types/core/eventBuffer.d.ts +0 -2
  38. package/dist/types/core/eventBuffer.d.ts.map +1 -1
  39. package/dist/types/core/globalManager.d.ts +0 -2
  40. package/dist/types/core/globalManager.d.ts.map +1 -1
  41. package/dist/types/core/index.d.ts +1 -1
  42. package/dist/types/core/initAnalyticsClient.d.ts +0 -2
  43. package/dist/types/core/initAnalyticsClient.d.ts.map +1 -1
  44. package/dist/types/core/publicToken.d.ts +0 -2
  45. package/dist/types/core/publicToken.d.ts.map +1 -1
  46. package/dist/types/core/sampling.d.ts +0 -2
  47. package/dist/types/core/sampling.d.ts.map +1 -1
  48. package/dist/types/core/session.d.ts +0 -2
  49. package/dist/types/core/session.d.ts.map +1 -1
  50. package/dist/types/core/transport.d.ts +0 -2
  51. package/dist/types/core/transport.d.ts.map +1 -1
  52. package/dist/types/core/types.d.ts +0 -2
  53. package/dist/types/core/types.d.ts.map +1 -1
  54. package/dist/types/events/contentExposure.d.ts +0 -2
  55. package/dist/types/events/contentExposure.d.ts.map +1 -1
  56. package/dist/types/isEnabled.d.ts +0 -2
  57. package/dist/types/isEnabled.d.ts.map +1 -1
  58. package/dist/types/utils/hash.d.ts +0 -2
  59. package/dist/types/utils/hash.d.ts.map +1 -1
  60. package/dist/types/utils/idle.d.ts +0 -2
  61. package/dist/types/utils/idle.d.ts.map +1 -1
  62. package/dist/types/utils/isBot.d.ts +0 -2
  63. package/dist/types/utils/isBot.d.ts.map +1 -1
  64. package/package.json +6 -6
@@ -1,14 +1,14 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_utils_isBot = require('../utils/isBot.cjs');
3
- const require_utils_idle = require('../utils/idle.cjs');
4
- const require_core_abTesting = require('./abTesting.cjs');
5
- const require_core_eventBuffer = require('./eventBuffer.cjs');
6
- const require_core_publicToken = require('./publicToken.cjs');
7
- const require_core_sampling = require('./sampling.cjs');
8
- const require_core_session = require('./session.cjs');
9
- const require_core_transport = require('./transport.cjs');
2
+ const require_utils_idle = require("../utils/idle.cjs");
3
+ const require_utils_isBot = require("../utils/isBot.cjs");
4
+ const require_core_abTesting = require("./abTesting.cjs");
5
+ const require_core_eventBuffer = require("./eventBuffer.cjs");
6
+ const require_core_publicToken = require("./publicToken.cjs");
7
+ const require_core_sampling = require("./sampling.cjs");
8
+ const require_core_session = require("./session.cjs");
9
+ const require_core_transport = require("./transport.cjs");
10
10
 
11
- //#region src/core/AnalyticsClient.ts
11
+ // src/core/AnalyticsClient.ts
12
12
  /** Default flush cadence — one network request per 20 seconds. */
13
13
  const DEFAULT_FLUSH_INTERVAL = 2e4;
14
14
  /** Default cap on distinct buffered events before an early flush. */
@@ -192,7 +192,6 @@ const createAnalyticsClient = (config) => {
192
192
  };
193
193
  };
194
194
 
195
- //#endregion
196
195
  exports.DEFAULT_FLUSH_INTERVAL = DEFAULT_FLUSH_INTERVAL;
197
196
  exports.DEFAULT_MAX_BUFFER_SIZE = DEFAULT_MAX_BUFFER_SIZE;
198
197
  exports.DEFAULT_SAMPLE_RATE = DEFAULT_SAMPLE_RATE;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_utils_hash = require('../utils/hash.cjs');
2
+ const require_utils_hash = require("../utils/hash.cjs");
3
3
 
4
- //#region src/core/abTesting.ts
4
+ // src/core/abTesting.ts
5
5
  /**
6
6
  * Deterministically assigns a variant to a session for a given experiment.
7
7
  *
@@ -39,6 +39,5 @@ const assignVariant = (sessionId, experimentKey, variants, weights) => {
39
39
  return variants[variants.length - 1];
40
40
  };
41
41
 
42
- //#endregion
43
42
  exports.assignVariant = assignVariant;
44
43
  //# sourceMappingURL=abTesting.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/core/eventBuffer.ts
2
+ // src/core/eventBuffer.ts
3
3
  /** Field separator for coalescing keys — never present in content keys. */
4
4
  const KEY_SEPARATOR = "";
5
5
  /**
@@ -62,6 +62,5 @@ const createEventBuffer = ({ max }) => {
62
62
  };
63
63
  };
64
64
 
65
- //#endregion
66
65
  exports.createEventBuffer = createEventBuffer;
67
66
  //# sourceMappingURL=eventBuffer.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/core/globalManager.ts
2
+ // src/core/globalManager.ts
3
3
  /**
4
4
  * Key on `window` used to share the client singleton across multiple module
5
5
  * instances. When bundlers include `@intlayer/analytics` more than once (e.g.
@@ -54,7 +54,6 @@ const decrementAnalyticsClientRefCount = () => {
54
54
  return globals[REF_COUNT_KEY];
55
55
  };
56
56
 
57
- //#endregion
58
57
  exports.decrementAnalyticsClientRefCount = decrementAnalyticsClientRefCount;
59
58
  exports.getGlobalAnalyticsClient = getGlobalAnalyticsClient;
60
59
  exports.incrementAnalyticsClientRefCount = incrementAnalyticsClientRefCount;
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_core_abTesting = require('./abTesting.cjs');
3
- const require_core_eventBuffer = require('./eventBuffer.cjs');
4
- const require_core_sampling = require('./sampling.cjs');
5
- const require_core_session = require('./session.cjs');
6
- const require_core_transport = require('./transport.cjs');
7
- const require_core_AnalyticsClient = require('./AnalyticsClient.cjs');
8
- const require_core_globalManager = require('./globalManager.cjs');
9
- const require_core_initAnalyticsClient = require('./initAnalyticsClient.cjs');
2
+ const require_core_AnalyticsClient = require("./AnalyticsClient.cjs");
3
+ const require_core_abTesting = require("./abTesting.cjs");
4
+ const require_core_eventBuffer = require("./eventBuffer.cjs");
5
+ const require_core_globalManager = require("./globalManager.cjs");
6
+ const require_core_initAnalyticsClient = require("./initAnalyticsClient.cjs");
7
+ const require_core_sampling = require("./sampling.cjs");
8
+ const require_core_session = require("./session.cjs");
9
+ const require_core_transport = require("./transport.cjs");
10
10
 
11
11
  exports.DEFAULT_FLUSH_INTERVAL = require_core_AnalyticsClient.DEFAULT_FLUSH_INTERVAL;
12
12
  exports.DEFAULT_MAX_BUFFER_SIZE = require_core_AnalyticsClient.DEFAULT_MAX_BUFFER_SIZE;
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_core_AnalyticsClient = require('./AnalyticsClient.cjs');
3
- const require_core_globalManager = require('./globalManager.cjs');
2
+ const require_core_AnalyticsClient = require("./AnalyticsClient.cjs");
3
+ const require_core_globalManager = require("./globalManager.cjs");
4
4
  let _intlayer_config_built = require("@intlayer/config/built");
5
5
 
6
- //#region src/core/initAnalyticsClient.ts
6
+ // src/core/initAnalyticsClient.ts
7
7
  /**
8
8
  * Initializes the Intlayer analytics client singleton.
9
9
  *
@@ -45,7 +45,6 @@ const stopAnalyticsClient = () => {
45
45
  require_core_globalManager.setGlobalAnalyticsClient(null);
46
46
  };
47
47
 
48
- //#endregion
49
48
  exports.initAnalyticsClient = initAnalyticsClient;
50
49
  exports.stopAnalyticsClient = stopAnalyticsClient;
51
50
  //# sourceMappingURL=initAnalyticsClient.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/core/publicToken.ts
2
+ // src/core/publicToken.ts
3
3
  /**
4
4
  * Short-lived ingest token used to authorise analytics batches.
5
5
  *
@@ -99,6 +99,5 @@ const createPublicTokenManager = ({ backendURL, clientId }) => {
99
99
  };
100
100
  };
101
101
 
102
- //#endregion
103
102
  exports.createPublicTokenManager = createPublicTokenManager;
104
103
  //# sourceMappingURL=publicToken.cjs.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_utils_hash = require('../utils/hash.cjs');
2
+ const require_utils_hash = require("../utils/hash.cjs");
3
3
 
4
- //#region src/core/sampling.ts
4
+ // src/core/sampling.ts
5
5
  /**
6
6
  * Deterministic per-session sampling gate. Using the session id (rather than a
7
7
  * fresh random draw per event) means a sampled-in session reports *all* of its
@@ -23,6 +23,5 @@ const isSampledIn = (sessionId, sampleRate) => {
23
23
  return require_utils_hash.hashString(sessionId) / 4294967295 < sampleRate;
24
24
  };
25
25
 
26
- //#endregion
27
26
  exports.isSampledIn = isSampledIn;
28
27
  //# sourceMappingURL=sampling.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/core/session.ts
2
+ // src/core/session.ts
3
3
  /**
4
4
  * Anonymous, per-tab session identity. Stored in `sessionStorage` so it is
5
5
  * cleared when the tab closes and is never shared across sites — no durable
@@ -36,6 +36,5 @@ const getSessionId = () => {
36
36
  }
37
37
  };
38
38
 
39
- //#endregion
40
39
  exports.getSessionId = getSessionId;
41
40
  //# sourceMappingURL=session.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/core/transport.ts
2
+ // src/core/transport.ts
3
3
  /**
4
4
  * Sends a batch of events to the backend. Every path is non-blocking and
5
5
  * no-throw — analytics must never break, slow, or delay the host application.
@@ -47,6 +47,5 @@ const sendEvents = (endpoint, body, { useBeacon = false, token } = {}) => {
47
47
  }
48
48
  };
49
49
 
50
- //#endregion
51
50
  exports.sendEvents = sendEvents;
52
51
  //# sourceMappingURL=transport.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/events/contentExposure.ts
2
+ // src/events/contentExposure.ts
3
3
  /**
4
4
  * Serializes a `KeyPath[]` into a compact, stable string used both as the
5
5
  * coalescing key in the buffer and as the stored `keyPath` on the wire.
@@ -32,7 +32,6 @@ const buildContentExposure = (params) => ({
32
32
  variant: params.variant
33
33
  });
34
34
 
35
- //#endregion
36
35
  exports.buildContentExposure = buildContentExposure;
37
36
  exports.serializeKeyPath = serializeKeyPath;
38
37
  //# sourceMappingURL=contentExposure.cjs.map
@@ -1,14 +1,14 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_utils_isBot = require('./utils/isBot.cjs');
3
- const require_core_abTesting = require('./core/abTesting.cjs');
4
- const require_core_eventBuffer = require('./core/eventBuffer.cjs');
5
- const require_core_sampling = require('./core/sampling.cjs');
6
- const require_core_session = require('./core/session.cjs');
7
- const require_core_transport = require('./core/transport.cjs');
8
- const require_core_AnalyticsClient = require('./core/AnalyticsClient.cjs');
9
- const require_core_globalManager = require('./core/globalManager.cjs');
10
- const require_core_initAnalyticsClient = require('./core/initAnalyticsClient.cjs');
11
- const require_events_contentExposure = require('./events/contentExposure.cjs');
2
+ const require_events_contentExposure = require("./events/contentExposure.cjs");
3
+ const require_core_abTesting = require("./core/abTesting.cjs");
4
+ const require_core_eventBuffer = require("./core/eventBuffer.cjs");
5
+ const require_core_sampling = require("./core/sampling.cjs");
6
+ const require_core_session = require("./core/session.cjs");
7
+ const require_core_transport = require("./core/transport.cjs");
8
+ const require_core_AnalyticsClient = require("./core/AnalyticsClient.cjs");
9
+ const require_core_globalManager = require("./core/globalManager.cjs");
10
+ const require_core_initAnalyticsClient = require("./core/initAnalyticsClient.cjs");
11
+ const require_utils_isBot = require("./utils/isBot.cjs");
12
12
 
13
13
  exports.BOT_USER_AGENT_PATTERN = require_utils_isBot.BOT_USER_AGENT_PATTERN;
14
14
  exports.DEFAULT_FLUSH_INTERVAL = require_core_AnalyticsClient.DEFAULT_FLUSH_INTERVAL;
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_utils_isBot = require('./utils/isBot.cjs');
2
+ const require_utils_isBot = require("./utils/isBot.cjs");
3
3
  let _intlayer_config_built = require("@intlayer/config/built");
4
4
 
5
- //#region src/isEnabled.ts
5
+ // src/isEnabled.ts
6
6
  /**
7
7
  * Compile-time kill switch. Bundlers replace `process.env.INTLAYER_ANALYTICS_ENABLED`
8
8
  * (set to `'false'` by `@intlayer/config` unless `analytics.enabled` is `true`
@@ -27,6 +27,5 @@ const TREE_SHAKE_ANALYTICS = process.env.INTLAYER_ANALYTICS_ENABLED === "false";
27
27
  */
28
28
  const isEnabled = !TREE_SHAKE_ANALYTICS && _intlayer_config_built.analytics?.enabled === true && Boolean(_intlayer_config_built.editor?.clientId) && typeof window !== "undefined" && window.self === window.top && !require_utils_isBot.isBotEnvironment();
29
29
 
30
- //#endregion
31
30
  exports.isEnabled = isEnabled;
32
31
  //# sourceMappingURL=isEnabled.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/utils/hash.ts
2
+ // src/utils/hash.ts
3
3
  /**
4
4
  * FNV-1a 32-bit string hash. Small, fast, dependency-free, and stable across
5
5
  * runtimes — good enough for deterministic A/B bucketing and session seeding
@@ -20,6 +20,5 @@ const hashString = (input) => {
20
20
  return hash >>> 0;
21
21
  };
22
22
 
23
- //#endregion
24
23
  exports.hashString = hashString;
25
24
  //# sourceMappingURL=hash.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/utils/idle.ts
2
+ // src/utils/idle.ts
3
3
  /**
4
4
  * Runs a callback when the browser is idle, without blocking first render.
5
5
  * Falls back to a short `setTimeout` where `requestIdleCallback` is unavailable
@@ -20,6 +20,5 @@ const onIdle = (callback) => {
20
20
  setTimeout(callback, 1);
21
21
  };
22
22
 
23
- //#endregion
24
23
  exports.onIdle = onIdle;
25
24
  //# sourceMappingURL=idle.cjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- //#region src/utils/isBot.ts
2
+ // src/utils/isBot.ts
3
3
  /**
4
4
  * Bot / automation detection.
5
5
  *
@@ -82,7 +82,6 @@ const isBotEnvironment = () => {
82
82
  return isBotUserAgent(navigator.userAgent);
83
83
  };
84
84
 
85
- //#endregion
86
85
  exports.BOT_USER_AGENT_PATTERN = BOT_USER_AGENT_PATTERN;
87
86
  exports.isBotEnvironment = isBotEnvironment;
88
87
  exports.isBotUserAgent = isBotUserAgent;
@@ -1,5 +1,5 @@
1
- import { isBotEnvironment } from "../utils/isBot.mjs";
2
1
  import { onIdle } from "../utils/idle.mjs";
2
+ import { isBotEnvironment } from "../utils/isBot.mjs";
3
3
  import { assignVariant } from "./abTesting.mjs";
4
4
  import { createEventBuffer } from "./eventBuffer.mjs";
5
5
  import { createPublicTokenManager } from "./publicToken.mjs";
@@ -7,7 +7,7 @@ import { isSampledIn } from "./sampling.mjs";
7
7
  import { getSessionId } from "./session.mjs";
8
8
  import { sendEvents } from "./transport.mjs";
9
9
 
10
- //#region src/core/AnalyticsClient.ts
10
+ // src/core/AnalyticsClient.ts
11
11
  /** Default flush cadence — one network request per 20 seconds. */
12
12
  const DEFAULT_FLUSH_INTERVAL = 2e4;
13
13
  /** Default cap on distinct buffered events before an early flush. */
@@ -191,6 +191,5 @@ const createAnalyticsClient = (config) => {
191
191
  };
192
192
  };
193
193
 
194
- //#endregion
195
194
  export { DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, MAX_EVENTS_PER_SEND, createAnalyticsClient };
196
195
  //# sourceMappingURL=AnalyticsClient.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { hashString } from "../utils/hash.mjs";
2
2
 
3
- //#region src/core/abTesting.ts
3
+ // src/core/abTesting.ts
4
4
  /**
5
5
  * Deterministically assigns a variant to a session for a given experiment.
6
6
  *
@@ -38,6 +38,5 @@ const assignVariant = (sessionId, experimentKey, variants, weights) => {
38
38
  return variants[variants.length - 1];
39
39
  };
40
40
 
41
- //#endregion
42
41
  export { assignVariant };
43
42
  //# sourceMappingURL=abTesting.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/core/eventBuffer.ts
1
+ // src/core/eventBuffer.ts
2
2
  /** Field separator for coalescing keys — never present in content keys. */
3
3
  const KEY_SEPARATOR = "";
4
4
  /**
@@ -61,6 +61,5 @@ const createEventBuffer = ({ max }) => {
61
61
  };
62
62
  };
63
63
 
64
- //#endregion
65
64
  export { createEventBuffer };
66
65
  //# sourceMappingURL=eventBuffer.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/core/globalManager.ts
1
+ // src/core/globalManager.ts
2
2
  /**
3
3
  * Key on `window` used to share the client singleton across multiple module
4
4
  * instances. When bundlers include `@intlayer/analytics` more than once (e.g.
@@ -53,6 +53,5 @@ const decrementAnalyticsClientRefCount = () => {
53
53
  return globals[REF_COUNT_KEY];
54
54
  };
55
55
 
56
- //#endregion
57
56
  export { decrementAnalyticsClientRefCount, getGlobalAnalyticsClient, incrementAnalyticsClientRefCount, setGlobalAnalyticsClient };
58
57
  //# sourceMappingURL=globalManager.mjs.map
@@ -1,10 +1,10 @@
1
+ import { DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, MAX_EVENTS_PER_SEND, createAnalyticsClient } from "./AnalyticsClient.mjs";
1
2
  import { assignVariant } from "./abTesting.mjs";
2
3
  import { createEventBuffer } from "./eventBuffer.mjs";
4
+ import { decrementAnalyticsClientRefCount, getGlobalAnalyticsClient, incrementAnalyticsClientRefCount, setGlobalAnalyticsClient } from "./globalManager.mjs";
5
+ import { initAnalyticsClient, stopAnalyticsClient } from "./initAnalyticsClient.mjs";
3
6
  import { isSampledIn } from "./sampling.mjs";
4
7
  import { getSessionId } from "./session.mjs";
5
8
  import { sendEvents } from "./transport.mjs";
6
- import { DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, MAX_EVENTS_PER_SEND, createAnalyticsClient } from "./AnalyticsClient.mjs";
7
- import { decrementAnalyticsClientRefCount, getGlobalAnalyticsClient, incrementAnalyticsClientRefCount, setGlobalAnalyticsClient } from "./globalManager.mjs";
8
- import { initAnalyticsClient, stopAnalyticsClient } from "./initAnalyticsClient.mjs";
9
9
 
10
10
  export { DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, MAX_EVENTS_PER_SEND, assignVariant, createAnalyticsClient, createEventBuffer, decrementAnalyticsClientRefCount, getGlobalAnalyticsClient, getSessionId, incrementAnalyticsClientRefCount, initAnalyticsClient, isSampledIn, sendEvents, setGlobalAnalyticsClient, stopAnalyticsClient };
@@ -2,7 +2,7 @@ import { DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, c
2
2
  import { decrementAnalyticsClientRefCount, getGlobalAnalyticsClient, incrementAnalyticsClientRefCount, setGlobalAnalyticsClient } from "./globalManager.mjs";
3
3
  import { analytics, editor } from "@intlayer/config/built";
4
4
 
5
- //#region src/core/initAnalyticsClient.ts
5
+ // src/core/initAnalyticsClient.ts
6
6
  /**
7
7
  * Initializes the Intlayer analytics client singleton.
8
8
  *
@@ -44,6 +44,5 @@ const stopAnalyticsClient = () => {
44
44
  setGlobalAnalyticsClient(null);
45
45
  };
46
46
 
47
- //#endregion
48
47
  export { initAnalyticsClient, stopAnalyticsClient };
49
48
  //# sourceMappingURL=initAnalyticsClient.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/core/publicToken.ts
1
+ // src/core/publicToken.ts
2
2
  /**
3
3
  * Short-lived ingest token used to authorise analytics batches.
4
4
  *
@@ -98,6 +98,5 @@ const createPublicTokenManager = ({ backendURL, clientId }) => {
98
98
  };
99
99
  };
100
100
 
101
- //#endregion
102
101
  export { createPublicTokenManager };
103
102
  //# sourceMappingURL=publicToken.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { hashString } from "../utils/hash.mjs";
2
2
 
3
- //#region src/core/sampling.ts
3
+ // src/core/sampling.ts
4
4
  /**
5
5
  * Deterministic per-session sampling gate. Using the session id (rather than a
6
6
  * fresh random draw per event) means a sampled-in session reports *all* of its
@@ -22,6 +22,5 @@ const isSampledIn = (sessionId, sampleRate) => {
22
22
  return hashString(sessionId) / 4294967295 < sampleRate;
23
23
  };
24
24
 
25
- //#endregion
26
25
  export { isSampledIn };
27
26
  //# sourceMappingURL=sampling.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/core/session.ts
1
+ // src/core/session.ts
2
2
  /**
3
3
  * Anonymous, per-tab session identity. Stored in `sessionStorage` so it is
4
4
  * cleared when the tab closes and is never shared across sites — no durable
@@ -35,6 +35,5 @@ const getSessionId = () => {
35
35
  }
36
36
  };
37
37
 
38
- //#endregion
39
38
  export { getSessionId };
40
39
  //# sourceMappingURL=session.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/core/transport.ts
1
+ // src/core/transport.ts
2
2
  /**
3
3
  * Sends a batch of events to the backend. Every path is non-blocking and
4
4
  * no-throw — analytics must never break, slow, or delay the host application.
@@ -46,6 +46,5 @@ const sendEvents = (endpoint, body, { useBeacon = false, token } = {}) => {
46
46
  }
47
47
  };
48
48
 
49
- //#endregion
50
49
  export { sendEvents };
51
50
  //# sourceMappingURL=transport.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/events/contentExposure.ts
1
+ // src/events/contentExposure.ts
2
2
  /**
3
3
  * Serializes a `KeyPath[]` into a compact, stable string used both as the
4
4
  * coalescing key in the buffer and as the stored `keyPath` on the wire.
@@ -31,6 +31,5 @@ const buildContentExposure = (params) => ({
31
31
  variant: params.variant
32
32
  });
33
33
 
34
- //#endregion
35
34
  export { buildContentExposure, serializeKeyPath };
36
35
  //# sourceMappingURL=contentExposure.mjs.map
@@ -1,4 +1,4 @@
1
- import { BOT_USER_AGENT_PATTERN, isBotEnvironment, isBotUserAgent } from "./utils/isBot.mjs";
1
+ import { buildContentExposure, serializeKeyPath } from "./events/contentExposure.mjs";
2
2
  import { assignVariant } from "./core/abTesting.mjs";
3
3
  import { createEventBuffer } from "./core/eventBuffer.mjs";
4
4
  import { isSampledIn } from "./core/sampling.mjs";
@@ -7,6 +7,6 @@ import { sendEvents } from "./core/transport.mjs";
7
7
  import { DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, MAX_EVENTS_PER_SEND, createAnalyticsClient } from "./core/AnalyticsClient.mjs";
8
8
  import { decrementAnalyticsClientRefCount, getGlobalAnalyticsClient, incrementAnalyticsClientRefCount, setGlobalAnalyticsClient } from "./core/globalManager.mjs";
9
9
  import { initAnalyticsClient, stopAnalyticsClient } from "./core/initAnalyticsClient.mjs";
10
- import { buildContentExposure, serializeKeyPath } from "./events/contentExposure.mjs";
10
+ import { BOT_USER_AGENT_PATTERN, isBotEnvironment, isBotUserAgent } from "./utils/isBot.mjs";
11
11
 
12
12
  export { BOT_USER_AGENT_PATTERN, DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, MAX_EVENTS_PER_SEND, assignVariant, buildContentExposure, createAnalyticsClient, createEventBuffer, decrementAnalyticsClientRefCount, getGlobalAnalyticsClient, getSessionId, incrementAnalyticsClientRefCount, initAnalyticsClient, isBotEnvironment, isBotUserAgent, isSampledIn, sendEvents, serializeKeyPath, setGlobalAnalyticsClient, stopAnalyticsClient };
@@ -1,7 +1,7 @@
1
1
  import { isBotEnvironment } from "./utils/isBot.mjs";
2
2
  import { analytics, editor } from "@intlayer/config/built";
3
3
 
4
- //#region src/isEnabled.ts
4
+ // src/isEnabled.ts
5
5
  /**
6
6
  * Compile-time kill switch. Bundlers replace `process.env.INTLAYER_ANALYTICS_ENABLED`
7
7
  * (set to `'false'` by `@intlayer/config` unless `analytics.enabled` is `true`
@@ -26,6 +26,5 @@ const TREE_SHAKE_ANALYTICS = process.env.INTLAYER_ANALYTICS_ENABLED === "false";
26
26
  */
27
27
  const isEnabled = !TREE_SHAKE_ANALYTICS && analytics?.enabled === true && Boolean(editor?.clientId) && typeof window !== "undefined" && window.self === window.top && !isBotEnvironment();
28
28
 
29
- //#endregion
30
29
  export { isEnabled };
31
30
  //# sourceMappingURL=isEnabled.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/utils/hash.ts
1
+ // src/utils/hash.ts
2
2
  /**
3
3
  * FNV-1a 32-bit string hash. Small, fast, dependency-free, and stable across
4
4
  * runtimes — good enough for deterministic A/B bucketing and session seeding
@@ -19,6 +19,5 @@ const hashString = (input) => {
19
19
  return hash >>> 0;
20
20
  };
21
21
 
22
- //#endregion
23
22
  export { hashString };
24
23
  //# sourceMappingURL=hash.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/utils/idle.ts
1
+ // src/utils/idle.ts
2
2
  /**
3
3
  * Runs a callback when the browser is idle, without blocking first render.
4
4
  * Falls back to a short `setTimeout` where `requestIdleCallback` is unavailable
@@ -19,6 +19,5 @@ const onIdle = (callback) => {
19
19
  setTimeout(callback, 1);
20
20
  };
21
21
 
22
- //#endregion
23
22
  export { onIdle };
24
23
  //# sourceMappingURL=idle.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/utils/isBot.ts
1
+ // src/utils/isBot.ts
2
2
  /**
3
3
  * Bot / automation detection.
4
4
  *
@@ -81,6 +81,5 @@ const isBotEnvironment = () => {
81
81
  return isBotUserAgent(navigator.userAgent);
82
82
  };
83
83
 
84
- //#endregion
85
84
  export { BOT_USER_AGENT_PATTERN, isBotEnvironment, isBotUserAgent };
86
85
  //# sourceMappingURL=isBot.mjs.map
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsClientConfig, ContentExposureEvent, ConversionEvent, PageViewEvent, TrackableEvent } from "./types.js";
2
- //#region src/core/AnalyticsClient.d.ts
3
2
  /**
4
3
  * Caller-supplied fields for a page view. Everything is optional — the client
5
4
  * fills `url`, `locale`, viewport, and referrer from the environment when omitted.
@@ -59,5 +58,4 @@ export type AnalyticsClient = {
59
58
  * @returns A started-on-demand {@link AnalyticsClient}.
60
59
  */
61
60
  export declare const createAnalyticsClient: (config: AnalyticsClientConfig) => AnalyticsClient;
62
- //#endregion
63
61
  //# sourceMappingURL=AnalyticsClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsClient.d.ts","names":[],"sources":["../../../src/core/AnalyticsClient.ts"],"mappings":";;;;;;YAqBY;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;;qBAIE;;qBAEA;;qBAEA;;;;;qBAKA;;;;;YAQD;;EAEV,YAAY;;EAEZ,gBAAgB,QAAQ;;EAExB,uBACE,OAAO,KAAK,eAAe;;EAG7B,kBACE,OAAO,KAAK,eAAe;;EAG7B,aACE,uBACA,oBACA;;EAGF,QAAQ;;EAER;;EAEA;;;;;;;;;qBA+BW,wBAAqB,QACxB,0BACP"}
1
+ {"version":3,"file":"AnalyticsClient.d.ts","names":[],"sources":["../../../src/core/AnalyticsClient.ts"],"mappings":";;;;;YAqBY;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;;qBAIE;;qBAEA;;qBAEA;;;;;qBAKA;;;;;YAQD;;EAEV,YAAY;;EAEZ,gBAAgB,QAAQ;;EAExB,uBACE,OAAO,KAAK,eAAe;;EAG7B,kBACE,OAAO,KAAK,eAAe;;EAG7B,aACE,uBACA,oBACA;;EAGF,QAAQ;;EAER;;EAEA;;;;;;;;;qBA+BW,wBAAqB,QACxB,0BACP"}
@@ -1,4 +1,3 @@
1
- //#region src/core/abTesting.d.ts
2
1
  /**
3
2
  * Deterministically assigns a variant to a session for a given experiment.
4
3
  *
@@ -18,5 +17,4 @@
18
17
  * assignVariant('sid-1', 'homepage-hero', ['a', 'b'], [9, 1]); // ~90% 'a'
19
18
  */
20
19
  export declare const assignVariant: (sessionId: string, experimentKey: string, variants: string[], weights?: number[]) => string;
21
- //#endregion
22
20
  //# sourceMappingURL=abTesting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"abTesting.d.ts","names":[],"sources":["../../../src/core/abTesting.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAoBa,gBAAa,mBACP,uBACI,oBACH"}
1
+ {"version":3,"file":"abTesting.d.ts","names":[],"sources":["../../../src/core/abTesting.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAoBa,gBAAa,mBACP,uBACI,oBACH"}
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsEvent } from "./types.js";
2
- //#region src/core/eventBuffer.d.ts
3
2
  /**
4
3
  * A bounded, coalescing in-memory buffer for analytics events.
5
4
  *
@@ -30,5 +29,4 @@ export type EventBuffer = {
30
29
  export declare const createEventBuffer: ({ max }: {
31
30
  max: number;
32
31
  }) => EventBuffer;
33
- //#endregion
34
32
  //# sourceMappingURL=eventBuffer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventBuffer.d.ts","names":[],"sources":["../../../src/core/eventBuffer.ts"],"mappings":";;;;;;;;;;;;;;YAgCY;;EAEV,OAAO,OAAO;;EAEd,aAAa;;EAEb;;;;;;;;;qBAUW,sBAAiB;EAAe;MAAgB"}
1
+ {"version":3,"file":"eventBuffer.d.ts","names":[],"sources":["../../../src/core/eventBuffer.ts"],"mappings":";;;;;;;;;;;;;YAgCY;;EAEV,OAAO,OAAO;;EAEd,aAAa;;EAEb;;;;;;;;;qBAUW,sBAAiB;EAAe;MAAgB"}
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsClient } from "./AnalyticsClient.js";
2
- //#region src/core/globalManager.d.ts
3
2
  /**
4
3
  * Returns the global analytics client, or `null` in SSR or before init.
5
4
  */
@@ -22,5 +21,4 @@ export declare const incrementAnalyticsClientRefCount: () => number;
22
21
  * @returns The count after decrementing (`0` in SSR, where nothing is stored).
23
22
  */
24
23
  export declare const decrementAnalyticsClientRefCount: () => number;
25
- //#endregion
26
24
  //# sourceMappingURL=globalManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"globalManager.d.ts","names":[],"sources":["../../../src/core/globalManager.ts"],"mappings":";;;;;qBA2Ba,gCAA+B;;;;;;qBAU/B,2BAAwB,QAC3B;;;;;;qBAWG;;;;;;qBAYA"}
1
+ {"version":3,"file":"globalManager.d.ts","names":[],"sources":["../../../src/core/globalManager.ts"],"mappings":";;;;qBA2Ba,gCAA+B;;;;;;qBAU/B,2BAAwB,QAC3B;;;;;;qBAWG;;;;;;qBAYA"}
@@ -1,4 +1,3 @@
1
- import { AnalyticsClientConfig, AnalyticsEvent, AnalyticsEventType, AnalyticsIngestBody, BaseAnalyticsEvent, ContentExposureEvent, ConversionEvent, PageViewEvent, TrackableEvent } from "./types.js";
2
1
  import { AnalyticsClient, DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, MAX_EVENTS_PER_SEND, PageViewInput, createAnalyticsClient } from "./AnalyticsClient.js";
3
2
  import { assignVariant } from "./abTesting.js";
4
3
  import { EventBuffer, createEventBuffer } from "./eventBuffer.js";
@@ -7,4 +6,5 @@ import { initAnalyticsClient, stopAnalyticsClient } from "./initAnalyticsClient.
7
6
  import { isSampledIn } from "./sampling.js";
8
7
  import { getSessionId } from "./session.js";
9
8
  import { sendEvents } from "./transport.js";
9
+ import { AnalyticsClientConfig, AnalyticsEvent, AnalyticsEventType, AnalyticsIngestBody, BaseAnalyticsEvent, ContentExposureEvent, ConversionEvent, PageViewEvent, TrackableEvent } from "./types.js";
10
10
  export { AnalyticsClient, AnalyticsClientConfig, AnalyticsEvent, AnalyticsEventType, AnalyticsIngestBody, BaseAnalyticsEvent, ContentExposureEvent, ConversionEvent, DEFAULT_FLUSH_INTERVAL, DEFAULT_MAX_BUFFER_SIZE, DEFAULT_SAMPLE_RATE, EventBuffer, MAX_EVENTS_PER_SEND, PageViewEvent, PageViewInput, TrackableEvent, assignVariant, createAnalyticsClient, createEventBuffer, decrementAnalyticsClientRefCount, getGlobalAnalyticsClient, getSessionId, incrementAnalyticsClientRefCount, initAnalyticsClient, isSampledIn, sendEvents, setGlobalAnalyticsClient, stopAnalyticsClient };
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsClient } from "./AnalyticsClient.js";
2
- //#region src/core/initAnalyticsClient.d.ts
3
2
  /**
4
3
  * Initializes the Intlayer analytics client singleton.
5
4
  *
@@ -22,5 +21,4 @@ export declare const initAnalyticsClient: () => AnalyticsClient;
22
21
  * `initAnalyticsClient` — never call it when init was skipped or cancelled.
23
22
  */
24
23
  export declare const stopAnalyticsClient: () => void;
25
- //#endregion
26
24
  //# sourceMappingURL=initAnalyticsClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"initAnalyticsClient.d.ts","names":[],"sources":["../../../src/core/initAnalyticsClient.ts"],"mappings":";;;;;;;;;;;;;;;qBA4Ba,2BAA0B;;;;;;;;qBA2B1B"}
1
+ {"version":3,"file":"initAnalyticsClient.d.ts","names":[],"sources":["../../../src/core/initAnalyticsClient.ts"],"mappings":";;;;;;;;;;;;;;qBA4Ba,2BAA0B;;;;;;;;qBA2B1B"}
@@ -1,4 +1,3 @@
1
- //#region src/core/publicToken.d.ts
2
1
  /**
3
2
  * Short-lived ingest token used to authorise analytics batches.
4
3
  *
@@ -43,5 +42,4 @@ export type PublicTokenManager = {
43
42
  * @returns A manager exposing a synchronous {@link PublicTokenManager.getToken}.
44
43
  */
45
44
  export declare const createPublicTokenManager: ({ backendURL, clientId }: PublicTokenManagerOptions) => PublicTokenManager;
46
- //#endregion
47
45
  //# sourceMappingURL=publicToken.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"publicToken.d.ts","names":[],"sources":["../../../src/core/publicToken.ts"],"mappings":";;;;;;;;;;;;;;;YAyDY;;EAEV;;EAEA;;;YAIU;;;;;EAKV;;;;;EAKA;;;;;;;;;;;;qBAaW,6BAAwB,YAAA,YAGlC,8BAA4B"}
1
+ {"version":3,"file":"publicToken.d.ts","names":[],"sources":["../../../src/core/publicToken.ts"],"mappings":";;;;;;;;;;;;;;YAyDY;;EAEV;;EAEA;;;YAIU;;;;;EAKV;;;;;EAKA;;;;;;;;;;;;qBAaW,6BAAwB,YAAA,YAGlC,8BAA4B"}
@@ -1,4 +1,3 @@
1
- //#region src/core/sampling.d.ts
2
1
  /**
3
2
  * Deterministic per-session sampling gate. Using the session id (rather than a
4
3
  * fresh random draw per event) means a sampled-in session reports *all* of its
@@ -15,5 +14,4 @@
15
14
  * isSampledIn('abc', 0.5); // stable per session
16
15
  */
17
16
  export declare const isSampledIn: (sessionId: string, sampleRate: number) => boolean;
18
- //#endregion
19
17
  //# sourceMappingURL=sampling.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampling.d.ts","names":[],"sources":["../../../src/core/sampling.ts"],"mappings":";;;;;;;;;;;;;;;;qBAiBa,cAAW,mBAAqB"}
1
+ {"version":3,"file":"sampling.d.ts","names":[],"sources":["../../../src/core/sampling.ts"],"mappings":";;;;;;;;;;;;;;;qBAiBa,cAAW,mBAAqB"}
@@ -1,4 +1,3 @@
1
- //#region src/core/session.d.ts
2
1
  /**
3
2
  * Anonymous, per-tab session identity. Stored in `sessionStorage` so it is
4
3
  * cleared when the tab closes and is never shared across sites — no durable
@@ -12,5 +11,4 @@
12
11
  * @returns The stable session id for the lifetime of the tab.
13
12
  */
14
13
  export declare const getSessionId: () => string;
15
- //#endregion
16
14
  //# sourceMappingURL=session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","names":[],"sources":["../../../src/core/session.ts"],"mappings":";;;;;;;;;;;;;qBAkCa"}
1
+ {"version":3,"file":"session.d.ts","names":[],"sources":["../../../src/core/session.ts"],"mappings":";;;;;;;;;;;;qBAkCa"}
@@ -1,5 +1,4 @@
1
1
  import { AnalyticsIngestBody } from "./types.js";
2
- //#region src/core/transport.d.ts
3
2
  /**
4
3
  * Sends a batch of events to the backend. Every path is non-blocking and
5
4
  * no-throw — analytics must never break, slow, or delay the host application.
@@ -27,5 +26,4 @@ export declare const sendEvents: (endpoint: string, body: AnalyticsIngestBody, {
27
26
  useBeacon?: boolean;
28
27
  token?: string;
29
28
  }) => boolean;
30
- //#endregion
31
29
  //# sourceMappingURL=transport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.ts","names":[],"sources":["../../../src/core/transport.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;qBAyBa,aAAU,kBACL,MACV,uBAAmB,WAAA;EACO;EAAqB"}
1
+ {"version":3,"file":"transport.d.ts","names":[],"sources":["../../../src/core/transport.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;qBAyBa,aAAU,kBACL,MACV,uBAAmB,WAAA;EACO;EAAqB"}
@@ -1,4 +1,3 @@
1
- //#region src/core/types.d.ts
2
1
  /**
3
2
  * Wire contract shared between the analytics client, `@intlayer/api`, and the
4
3
  * backend ingestion endpoint. Keys are intentionally short to keep the batched
@@ -120,5 +119,4 @@ export type AnalyticsClientConfig = {
120
119
  /** Fraction of content-exposure events to keep, 0..1. Defaults to 1. */
121
120
  sampleRate: number;
122
121
  };
123
- //#endregion
124
122
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/core/types.ts"],"mappings":";;;;;;;;;YASY;;;;YAQA;;EAEV;;EAEA;;EAEA;;;;;;YAOU,gBAAgB;EAC1B;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;YAQU,uBAAuB;EACjC;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;YAMU,kBAAkB;EAC5B;;EAEA;;EAEA;;EAEA;;EAEA;;;;;YAMU,iBACR,gBACA,uBACA;;;;;YAMQ,eAAe,UAAU,iBAAiB,kBAAkB,KACtE;;EAIA;;;;;YAMU;;;;;;;EAOV;;;;;;EAMA;;EAEA;;EAEA;;EAEA,QAAQ;;;;;;YAOE;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/core/types.ts"],"mappings":";;;;;;;;YASY;;;;YAQA;;EAEV;;EAEA;;EAEA;;;;;;YAOU,gBAAgB;EAC1B;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;YAQU,uBAAuB;EACjC;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;YAMU,kBAAkB;EAC5B;;EAEA;;EAEA;;EAEA;;EAEA;;;;;YAMU,iBACR,gBACA,uBACA;;;;;YAMQ,eAAe,UAAU,iBAAiB,kBAAkB,KACtE;;EAIA;;;;;YAMU;;;;;;;EAOV;;;;;;EAMA;;EAEA;;EAEA;;EAEA,QAAQ;;;;;;YAOE;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA"}
@@ -1,6 +1,5 @@
1
1
  import { ContentExposureEvent, TrackableEvent } from "../core/types.js";
2
2
  import { KeyPath } from "@intlayer/types/keyPath";
3
- //#region src/events/contentExposure.d.ts
4
3
  /**
5
4
  * Serializes a `KeyPath[]` into a compact, stable string used both as the
6
5
  * coalescing key in the buffer and as the stored `keyPath` on the wire.
@@ -32,5 +31,4 @@ export declare const buildContentExposure: (params: {
32
31
  experimentKey?: string;
33
32
  variant?: string;
34
33
  }) => Omit<TrackableEvent<ContentExposureEvent>, 'type'>;
35
- //#endregion
36
34
  //# sourceMappingURL=contentExposure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contentExposure.d.ts","names":[],"sources":["../../../src/events/contentExposure.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAiBa,mBAAgB,SAAa;;;;;;;;;qBAa7B,uBAAoB;EAC/B;EACA,SAAS;EACT;EACA;EACA;EACA;MACE,KAAK,eAAe"}
1
+ {"version":3,"file":"contentExposure.d.ts","names":[],"sources":["../../../src/events/contentExposure.ts"],"mappings":";;;;;;;;;;;;;;;;qBAiBa,mBAAgB,SAAa;;;;;;;;;qBAa7B,uBAAoB;EAC/B;EACA,SAAS;EACT;EACA;EACA;EACA;MACE,KAAK,eAAe"}
@@ -1,4 +1,3 @@
1
- //#region src/isEnabled.d.ts
2
1
  /**
3
2
  * Runtime guard mirroring `@intlayer/editor`'s `isEnabled`, but inverted with
4
3
  * respect to the iframe: analytics runs for real end users on the **top**
@@ -14,5 +13,4 @@
14
13
  * - the visitor is not a bot, crawler or automation runtime.
15
14
  */
16
15
  export declare const isEnabled: boolean;
17
- //#endregion
18
16
  //# sourceMappingURL=isEnabled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isEnabled.d.ts","names":[],"sources":["../../src/isEnabled.ts"],"mappings":";;;;;;;;;;;;;;;qBA0Ba"}
1
+ {"version":3,"file":"isEnabled.d.ts","names":[],"sources":["../../src/isEnabled.ts"],"mappings":";;;;;;;;;;;;;;qBA0Ba"}
@@ -1,4 +1,3 @@
1
- //#region src/utils/hash.d.ts
2
1
  /**
3
2
  * FNV-1a 32-bit string hash. Small, fast, dependency-free, and stable across
4
3
  * runtimes — good enough for deterministic A/B bucketing and session seeding
@@ -11,5 +10,4 @@
11
10
  * hashString('session-1:homepage-hero'); // 3039336720
12
11
  */
13
12
  export declare const hashString: (input: string) => number;
14
- //#endregion
15
13
  //# sourceMappingURL=hash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hash.d.ts","names":[],"sources":["../../../src/utils/hash.ts"],"mappings":";;;;;;;;;;;;qBAWa,aAAU"}
1
+ {"version":3,"file":"hash.d.ts","names":[],"sources":["../../../src/utils/hash.ts"],"mappings":";;;;;;;;;;;qBAWa,aAAU"}
@@ -1,4 +1,3 @@
1
- //#region src/utils/idle.d.ts
2
1
  /**
3
2
  * Runs a callback when the browser is idle, without blocking first render.
4
3
  * Falls back to a short `setTimeout` where `requestIdleCallback` is unavailable
@@ -10,5 +9,4 @@
10
9
  * onIdle(() => attachVisibilityListeners());
11
10
  */
12
11
  export declare const onIdle: (callback: () => void) => void;
13
- //#endregion
14
12
  //# sourceMappingURL=idle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"idle.d.ts","names":[],"sources":["../../../src/utils/idle.ts"],"mappings":";;;;;;;;;;;qBAUa,SAAM"}
1
+ {"version":3,"file":"idle.d.ts","names":[],"sources":["../../../src/utils/idle.ts"],"mappings":";;;;;;;;;;qBAUa,SAAM"}
@@ -1,4 +1,3 @@
1
- //#region src/utils/isBot.d.ts
2
1
  /**
3
2
  * Bot / automation detection.
4
3
  *
@@ -49,5 +48,4 @@ export declare const isBotUserAgent: (userAgent?: string | null) => boolean;
49
48
  * if (isBotEnvironment()) return; // never start the client for a crawler
50
49
  */
51
50
  export declare const isBotEnvironment: () => boolean;
52
- //#endregion
53
51
  //# sourceMappingURL=isBot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isBot.d.ts","names":[],"sources":["../../../src/utils/isBot.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;qBA4Ba,wBAAsB;;;;;;;;;;;;;;;qBAiBtB,iBAAc;;;;;;;;;;;;;;qBAmCd"}
1
+ {"version":3,"file":"isBot.d.ts","names":[],"sources":["../../../src/utils/isBot.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;qBA4Ba,wBAAsB;;;;;;;;;;;;;;;qBAiBtB,iBAAc;;;;;;;;;;;;;;qBAmCd"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/analytics",
3
- "version": "9.7.0",
3
+ "version": "9.7.1",
4
4
  "private": false,
5
5
  "description": "Collects which Intlayer content is shown (page/locale + node-level) and powers content A/B testing. Optional, lazily-imported companion to @intlayer/editor.",
6
6
  "keywords": [
@@ -86,9 +86,9 @@
86
86
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
87
87
  },
88
88
  "dependencies": {
89
- "@intlayer/config": "9.6.0",
90
- "@intlayer/core": "9.7.0",
91
- "@intlayer/types": "9.7.0"
89
+ "@intlayer/config": "9.7.1",
90
+ "@intlayer/core": "9.7.1",
91
+ "@intlayer/types": "9.7.1"
92
92
  },
93
93
  "devDependencies": {
94
94
  "@types/node": "^26",
@@ -96,9 +96,9 @@
96
96
  "@utils/ts-config-types": "1.0.4",
97
97
  "@utils/tsdown-config": "1.0.4",
98
98
  "rimraf": "6.1.3",
99
- "tsdown": "0.23.0",
99
+ "tsdown": "0.23.4",
100
100
  "typescript": "7.0.2",
101
- "vitest": "5.0.3"
101
+ "vitest": "5.1.0"
102
102
  },
103
103
  "engines": {
104
104
  "node": ">=14.18"