@carlonicora/nextjs-jsonapi 6.1.0 → 6.2.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.
Files changed (67) hide show
  1. package/dist/{BlockNoteEditor-FZNU4YQT.mjs → BlockNoteEditor-D6VMXRZH.mjs} +4 -4
  2. package/dist/{BlockNoteEditor-SAU3G6H7.js → BlockNoteEditor-Q757ZLCO.js} +19 -19
  3. package/dist/{BlockNoteEditor-SAU3G6H7.js.map → BlockNoteEditor-Q757ZLCO.js.map} +1 -1
  4. package/dist/{BlockNoteViewer-6XDDVTN6.mjs → BlockNoteViewer-GI5LVQHZ.mjs} +2 -2
  5. package/dist/{BlockNoteViewer-7BTV7QQA.js → BlockNoteViewer-KG4CIJC5.js} +3 -3
  6. package/dist/{BlockNoteViewer-7BTV7QQA.js.map → BlockNoteViewer-KG4CIJC5.js.map} +1 -1
  7. package/dist/billing/index.js +491 -491
  8. package/dist/billing/index.mjs +3 -3
  9. package/dist/{chunk-F4JB7YAP.js → chunk-3P3IYUWQ.js} +8 -8
  10. package/dist/{chunk-F4JB7YAP.js.map → chunk-3P3IYUWQ.js.map} +1 -1
  11. package/dist/{chunk-U7DR5VDT.mjs → chunk-6PW3562E.mjs} +5 -5
  12. package/dist/{chunk-JVJS5RHB.mjs → chunk-CUNSPLOD.mjs} +2 -2
  13. package/dist/{chunk-T3YQ47EF.js → chunk-GSHMGL6N.js} +2 -1
  14. package/dist/chunk-GSHMGL6N.js.map +1 -0
  15. package/dist/{chunk-GFGKMUPZ.mjs → chunk-HLW3SUMD.mjs} +2 -2
  16. package/dist/{chunk-RYZYKG6W.mjs → chunk-MHBE4KQR.mjs} +2 -2
  17. package/dist/{chunk-USYZNWKS.mjs → chunk-QKDPCZ3G.mjs} +2 -1
  18. package/dist/{chunk-USYZNWKS.mjs.map → chunk-QKDPCZ3G.mjs.map} +1 -1
  19. package/dist/{chunk-TPZS46IM.js → chunk-S332ZCIE.js} +3 -3
  20. package/dist/{chunk-TPZS46IM.js.map → chunk-S332ZCIE.js.map} +1 -1
  21. package/dist/{chunk-MTI2UXDA.js → chunk-UEWDYVLW.js} +4 -4
  22. package/dist/{chunk-MTI2UXDA.js.map → chunk-UEWDYVLW.js.map} +1 -1
  23. package/dist/{chunk-IPYXT7MH.js → chunk-XQEYBESH.js} +868 -868
  24. package/dist/{chunk-IPYXT7MH.js.map → chunk-XQEYBESH.js.map} +1 -1
  25. package/dist/client/index.js +4 -4
  26. package/dist/client/index.mjs +3 -3
  27. package/dist/components/index.js +4 -4
  28. package/dist/components/index.mjs +3 -3
  29. package/dist/contexts/index.js +4 -4
  30. package/dist/contexts/index.mjs +3 -3
  31. package/dist/core/index.js +2 -2
  32. package/dist/core/index.mjs +1 -1
  33. package/dist/email-automations/index.js +92 -92
  34. package/dist/email-automations/index.mjs +3 -3
  35. package/dist/features/analytics/index.d.mts +9 -1
  36. package/dist/features/analytics/index.d.ts +9 -1
  37. package/dist/features/analytics/index.js +129 -127
  38. package/dist/features/analytics/index.js.map +1 -1
  39. package/dist/features/analytics/index.mjs +12 -10
  40. package/dist/features/analytics/index.mjs.map +1 -1
  41. package/dist/features/analytics/server.js +4 -4
  42. package/dist/features/analytics/server.mjs +2 -2
  43. package/dist/features/blog/index.js +150 -150
  44. package/dist/features/blog/index.mjs +3 -3
  45. package/dist/features/blog/server.js +16 -16
  46. package/dist/features/blog/server.mjs +1 -1
  47. package/dist/features/help/index.js +37 -37
  48. package/dist/features/help/index.mjs +3 -3
  49. package/dist/features/tokenusage/index.js +127 -127
  50. package/dist/features/tokenusage/index.mjs +4 -4
  51. package/dist/index.js +3 -3
  52. package/dist/index.mjs +2 -2
  53. package/dist/server/index.js +3 -3
  54. package/dist/server/index.mjs +2 -2
  55. package/package.json +1 -1
  56. package/src/features/analytics/components/AnalyticsTracker.tsx +22 -9
  57. package/src/features/analytics/components/__tests__/AnalyticsTracker.spec.tsx +67 -0
  58. package/src/features/analytics/data/__tests__/models.spec.ts +13 -0
  59. package/src/features/analytics/data/analytics-event.ts +1 -0
  60. package/src/features/analytics/data/analytics.types.ts +2 -0
  61. package/dist/chunk-T3YQ47EF.js.map +0 -1
  62. /package/dist/{BlockNoteEditor-FZNU4YQT.mjs.map → BlockNoteEditor-D6VMXRZH.mjs.map} +0 -0
  63. /package/dist/{BlockNoteViewer-6XDDVTN6.mjs.map → BlockNoteViewer-GI5LVQHZ.mjs.map} +0 -0
  64. /package/dist/{chunk-U7DR5VDT.mjs.map → chunk-6PW3562E.mjs.map} +0 -0
  65. /package/dist/{chunk-JVJS5RHB.mjs.map → chunk-CUNSPLOD.mjs.map} +0 -0
  66. /package/dist/{chunk-GFGKMUPZ.mjs.map → chunk-HLW3SUMD.mjs.map} +0 -0
  67. /package/dist/{chunk-RYZYKG6W.mjs.map → chunk-MHBE4KQR.mjs.map} +0 -0
@@ -11,7 +11,13 @@ import '../../types-Bq_UA8Lg.mjs';
11
11
  import 'lucide-react';
12
12
 
13
13
  type AnalyticsTrackerProps = {
14
- hasConsent: boolean;
14
+ /**
15
+ * `undefined` while the app has not read its consent store yet: the tracker sends
16
+ * nothing and leaves the visitor cookie alone. `false` when there is no consent
17
+ * (refused or not chosen yet): the cookie is cleared and page views go out without
18
+ * an id. Never pass `false` as a placeholder for "not read yet".
19
+ */
20
+ hasConsent?: boolean;
15
21
  resolveSection: (pathname: string) => "public" | "app";
16
22
  sensitivePrefixes?: string[];
17
23
  };
@@ -91,6 +97,8 @@ type AnalyticsEventInput = {
91
97
  utmContent?: string;
92
98
  visitorId?: string;
93
99
  screenWidth?: number;
100
+ /** True only on the event sent by the Accept click: the API adopts the open cookieless session. */
101
+ consentGranted?: boolean;
94
102
  };
95
103
  type AnalyticsSummaryInput = {
96
104
  id: string;
@@ -11,7 +11,13 @@ import '../../types-bsm8Fp55.js';
11
11
  import 'lucide-react';
12
12
 
13
13
  type AnalyticsTrackerProps = {
14
- hasConsent: boolean;
14
+ /**
15
+ * `undefined` while the app has not read its consent store yet: the tracker sends
16
+ * nothing and leaves the visitor cookie alone. `false` when there is no consent
17
+ * (refused or not chosen yet): the cookie is cleared and page views go out without
18
+ * an id. Never pass `false` as a placeholder for "not read yet".
19
+ */
20
+ hasConsent?: boolean;
15
21
  resolveSection: (pathname: string) => "public" | "app";
16
22
  sensitivePrefixes?: string[];
17
23
  };
@@ -91,6 +97,8 @@ type AnalyticsEventInput = {
91
97
  utmContent?: string;
92
98
  visitorId?: string;
93
99
  screenWidth?: number;
100
+ /** True only on the event sent by the Accept click: the API adopts the open cookieless session. */
101
+ consentGranted?: boolean;
94
102
  };
95
103
  type AnalyticsSummaryInput = {
96
104
  id: string;