@dotcms/analytics 1.0.4-next.1 → 1.0.5-next.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.
@@ -4,6 +4,7 @@ import { DotCMSAnalyticsConfig } from '../../dotAnalytics/shared/dot-content-ana
4
4
  * Client bootstrapper for dotCMS Analytics in React/Next.
5
5
  * - No UI: initializes the analytics singleton from props or env config.
6
6
  * - If auto tracking is enabled, hooks into Next App Router to send page views.
7
+ * - Automatically wraps in Suspense boundary for Next.js App Router compatibility.
7
8
  *
8
9
  * @param props.config - Optional analytics configuration. If provided, overrides env config.
9
10
  */
@@ -1,10 +1,16 @@
1
- import { useMemo as r } from "react";
2
- import { useRouterTracker as n } from "../hook/useRouterTracker.js";
3
- import { initializeAnalytics as i } from "../internal/utils.js";
4
- function m({ config: t }) {
5
- const o = r(() => i(t), [t]), e = !!t.debug;
6
- return o && n(o, e), null;
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Suspense as e, useMemo as i } from "react";
3
+ import { useRouterTracker as l } from "../hook/useRouterTracker.js";
4
+ import { initializeAnalytics as u } from "../internal/utils.js";
5
+ function a({
6
+ config: t
7
+ }) {
8
+ const n = i(() => u(t), [t]), r = !!t.debug;
9
+ return n && l(n, r), null;
10
+ }
11
+ function p({ config: t }) {
12
+ return /* @__PURE__ */ o(e, { fallback: null, children: /* @__PURE__ */ o(a, { config: t }) });
7
13
  }
8
14
  export {
9
- m as DotContentAnalytics
15
+ p as DotContentAnalytics
10
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/analytics",
3
- "version": "1.0.4-next.1",
3
+ "version": "1.0.5-next.1",
4
4
  "description": "Official JavaScript library for Content Analytics with DotCMS.",
5
5
  "repository": {
6
6
  "type": "git",