@novu/react 2.6.6 → 3.0.0-canary.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 (186) hide show
  1. package/dist/cjs/components/Bell.cjs +63 -0
  2. package/dist/cjs/components/Bell.cjs.map +1 -0
  3. package/dist/cjs/components/Bell.d.cts +12 -0
  4. package/dist/cjs/components/Inbox.cjs +198 -0
  5. package/dist/cjs/components/Inbox.cjs.map +1 -0
  6. package/dist/cjs/components/Inbox.d.cts +9 -0
  7. package/dist/cjs/components/InboxContent.cjs +94 -0
  8. package/dist/cjs/components/InboxContent.cjs.map +1 -0
  9. package/dist/cjs/components/InboxContent.d.cts +16 -0
  10. package/dist/cjs/components/Mounter.cjs +51 -0
  11. package/dist/cjs/components/Mounter.cjs.map +1 -0
  12. package/dist/cjs/components/Mounter.d.cts +11 -0
  13. package/dist/cjs/components/Notifications.cjs +88 -0
  14. package/dist/cjs/components/Notifications.cjs.map +1 -0
  15. package/dist/cjs/components/Notifications.d.cts +14 -0
  16. package/dist/cjs/components/NovuUI.cjs +60 -0
  17. package/dist/cjs/components/NovuUI.cjs.map +1 -0
  18. package/dist/cjs/components/NovuUI.d.cts +12 -0
  19. package/dist/cjs/components/Preferences.cjs +54 -0
  20. package/dist/cjs/components/Preferences.cjs.map +1 -0
  21. package/dist/cjs/components/Preferences.d.cts +5 -0
  22. package/dist/cjs/components/Renderer.cjs +70 -0
  23. package/dist/cjs/components/Renderer.cjs.map +1 -0
  24. package/dist/cjs/components/Renderer.d.cts +8 -0
  25. package/dist/cjs/components/index.cjs +35 -0
  26. package/dist/cjs/components/index.cjs.map +1 -0
  27. package/dist/cjs/components/index.d.cts +11 -0
  28. package/dist/cjs/context/NovuUIContext.cjs +40 -0
  29. package/dist/cjs/context/NovuUIContext.cjs.map +1 -0
  30. package/dist/cjs/context/NovuUIContext.d.cts +14 -0
  31. package/dist/cjs/context/RendererContext.cjs +40 -0
  32. package/dist/cjs/context/RendererContext.cjs.map +1 -0
  33. package/dist/cjs/context/RendererContext.d.cts +15 -0
  34. package/dist/cjs/hooks/NovuProvider.cjs +101 -0
  35. package/dist/cjs/hooks/NovuProvider.cjs.map +1 -0
  36. package/dist/cjs/hooks/NovuProvider.d.cts +20 -0
  37. package/dist/cjs/hooks/index.cjs +40 -0
  38. package/dist/cjs/hooks/index.cjs.map +1 -0
  39. package/dist/cjs/hooks/index.d.cts +7 -0
  40. package/dist/cjs/hooks/internal/useBrowserTabsChannel.cjs +52 -0
  41. package/dist/cjs/hooks/internal/useBrowserTabsChannel.cjs.map +1 -0
  42. package/dist/cjs/hooks/internal/useBrowserTabsChannel.d.cts +8 -0
  43. package/dist/cjs/hooks/internal/useDataRef.cjs +36 -0
  44. package/dist/cjs/hooks/internal/useDataRef.cjs.map +1 -0
  45. package/dist/cjs/hooks/internal/useDataRef.d.cts +5 -0
  46. package/dist/cjs/hooks/internal/useWebsocketEvent.cjs +57 -0
  47. package/dist/cjs/hooks/internal/useWebsocketEvent.cjs.map +1 -0
  48. package/dist/cjs/hooks/internal/useWebsocketEvent.d.cts +8 -0
  49. package/dist/cjs/hooks/useCounts.cjs +104 -0
  50. package/dist/cjs/hooks/useCounts.cjs.map +1 -0
  51. package/dist/cjs/hooks/useCounts.d.cts +21 -0
  52. package/dist/cjs/hooks/useNotifications.cjs +121 -0
  53. package/dist/cjs/hooks/useNotifications.cjs.map +1 -0
  54. package/dist/cjs/hooks/useNotifications.d.cts +34 -0
  55. package/dist/cjs/hooks/usePreferences.cjs +80 -0
  56. package/dist/cjs/hooks/usePreferences.cjs.map +1 -0
  57. package/dist/cjs/hooks/usePreferences.d.cts +19 -0
  58. package/dist/cjs/index.cjs +27 -0
  59. package/dist/cjs/index.cjs.map +1 -0
  60. package/dist/cjs/index.d.cts +14 -0
  61. package/dist/cjs/server/index.cjs +92 -0
  62. package/dist/cjs/server/index.cjs.map +1 -0
  63. package/dist/cjs/server/index.d.cts +29 -0
  64. package/dist/cjs/themes/index.cjs +25 -0
  65. package/dist/cjs/themes/index.cjs.map +1 -0
  66. package/dist/cjs/utils/createContextAndHook.cjs +63 -0
  67. package/dist/cjs/utils/createContextAndHook.cjs.map +1 -0
  68. package/dist/cjs/utils/createContextAndHook.d.cts +19 -0
  69. package/dist/cjs/utils/requestLock.cjs +52 -0
  70. package/dist/cjs/utils/requestLock.cjs.map +1 -0
  71. package/dist/cjs/utils/requestLock.d.cts +3 -0
  72. package/dist/cjs/utils/types.cjs +19 -0
  73. package/dist/cjs/utils/types.cjs.map +1 -0
  74. package/dist/cjs/utils/types.d.cts +54 -0
  75. package/dist/client/{index.d.mts → components/index.d.mts} +23 -6
  76. package/dist/client/{index.d.ts → components/index.d.ts} +23 -6
  77. package/dist/client/{index.js → components/index.js} +92 -8
  78. package/dist/client/components/index.js.map +1 -0
  79. package/dist/client/{index.mjs → components/index.mjs} +77 -8
  80. package/dist/client/components/index.mjs.map +1 -0
  81. package/dist/{hooks → client/hooks}/index.js +8 -0
  82. package/dist/client/hooks/index.js.map +1 -0
  83. package/dist/client/hooks/index.mjs.map +1 -0
  84. package/dist/client/themes/index.d.ts +1 -0
  85. package/dist/{themes → client/themes}/index.js +4 -0
  86. package/dist/client/themes/index.js.map +1 -0
  87. package/dist/client/themes/index.mjs.map +1 -0
  88. package/dist/esm/components/Bell.d.ts +12 -0
  89. package/dist/esm/components/Bell.js +28 -0
  90. package/dist/esm/components/Bell.js.map +1 -0
  91. package/dist/esm/components/Inbox.d.ts +9 -0
  92. package/dist/esm/components/Inbox.js +163 -0
  93. package/dist/esm/components/Inbox.js.map +1 -0
  94. package/dist/esm/components/InboxContent.d.ts +16 -0
  95. package/dist/esm/components/InboxContent.js +59 -0
  96. package/dist/esm/components/InboxContent.js.map +1 -0
  97. package/dist/esm/components/Mounter.d.ts +11 -0
  98. package/dist/esm/components/Mounter.js +26 -0
  99. package/dist/esm/components/Mounter.js.map +1 -0
  100. package/dist/esm/components/Notifications.d.ts +14 -0
  101. package/dist/esm/components/Notifications.js +53 -0
  102. package/dist/esm/components/Notifications.js.map +1 -0
  103. package/dist/esm/components/NovuUI.d.ts +12 -0
  104. package/dist/esm/components/NovuUI.js +35 -0
  105. package/dist/esm/components/NovuUI.js.map +1 -0
  106. package/dist/esm/components/Preferences.d.ts +5 -0
  107. package/dist/esm/components/Preferences.js +19 -0
  108. package/dist/esm/components/Preferences.js.map +1 -0
  109. package/dist/esm/components/Renderer.d.ts +8 -0
  110. package/dist/esm/components/Renderer.js +44 -0
  111. package/dist/esm/components/Renderer.js.map +1 -0
  112. package/dist/esm/components/index.d.ts +11 -0
  113. package/dist/esm/components/index.js +8 -0
  114. package/dist/esm/components/index.js.map +1 -0
  115. package/dist/esm/context/NovuUIContext.d.ts +14 -0
  116. package/dist/esm/context/NovuUIContext.js +13 -0
  117. package/dist/esm/context/NovuUIContext.js.map +1 -0
  118. package/dist/esm/context/RendererContext.d.ts +15 -0
  119. package/dist/esm/context/RendererContext.js +13 -0
  120. package/dist/esm/context/RendererContext.js.map +1 -0
  121. package/dist/esm/hooks/NovuProvider.d.ts +20 -0
  122. package/dist/esm/hooks/NovuProvider.js +73 -0
  123. package/dist/esm/hooks/NovuProvider.js.map +1 -0
  124. package/dist/esm/hooks/index.d.ts +7 -0
  125. package/dist/esm/hooks/index.js +10 -0
  126. package/dist/esm/hooks/index.js.map +1 -0
  127. package/dist/esm/hooks/internal/useBrowserTabsChannel.d.ts +8 -0
  128. package/dist/esm/hooks/internal/useBrowserTabsChannel.js +27 -0
  129. package/dist/esm/hooks/internal/useBrowserTabsChannel.js.map +1 -0
  130. package/dist/esm/hooks/internal/useDataRef.d.ts +5 -0
  131. package/dist/esm/hooks/internal/useDataRef.js +11 -0
  132. package/dist/esm/hooks/internal/useDataRef.js.map +1 -0
  133. package/dist/esm/hooks/internal/useWebsocketEvent.d.ts +8 -0
  134. package/dist/esm/hooks/internal/useWebsocketEvent.js +32 -0
  135. package/dist/esm/hooks/internal/useWebsocketEvent.js.map +1 -0
  136. package/dist/esm/hooks/useCounts.d.ts +21 -0
  137. package/dist/esm/hooks/useCounts.js +76 -0
  138. package/dist/esm/hooks/useCounts.js.map +1 -0
  139. package/dist/esm/hooks/useNotifications.d.ts +34 -0
  140. package/dist/esm/hooks/useNotifications.js +96 -0
  141. package/dist/esm/hooks/useNotifications.js.map +1 -0
  142. package/dist/esm/hooks/usePreferences.d.ts +19 -0
  143. package/dist/esm/hooks/usePreferences.js +55 -0
  144. package/dist/esm/hooks/usePreferences.js.map +1 -0
  145. package/dist/esm/index.d.ts +14 -0
  146. package/dist/esm/index.js +4 -0
  147. package/dist/esm/index.js.map +1 -0
  148. package/dist/esm/server/index.d.ts +29 -0
  149. package/dist/esm/server/index.js +56 -0
  150. package/dist/esm/server/index.js.map +1 -0
  151. package/dist/esm/themes/index.d.ts +1 -0
  152. package/dist/esm/themes/index.js +3 -0
  153. package/dist/esm/themes/index.js.map +1 -0
  154. package/dist/esm/utils/createContextAndHook.d.ts +19 -0
  155. package/dist/esm/utils/createContextAndHook.js +27 -0
  156. package/dist/esm/utils/createContextAndHook.js.map +1 -0
  157. package/dist/esm/utils/requestLock.d.ts +3 -0
  158. package/dist/esm/utils/requestLock.js +27 -0
  159. package/dist/esm/utils/requestLock.js.map +1 -0
  160. package/dist/esm/utils/types.d.ts +54 -0
  161. package/dist/esm/utils/types.js +1 -0
  162. package/dist/esm/utils/types.js.map +1 -0
  163. package/dist/server/{server.d.mts → index.d.mts} +26 -5
  164. package/dist/server/{server.d.ts → index.d.ts} +26 -5
  165. package/dist/server/{server.js → index.js} +17 -20
  166. package/dist/server/index.js.map +1 -0
  167. package/dist/server/{server.mjs → index.mjs} +16 -19
  168. package/dist/server/index.mjs.map +1 -0
  169. package/hooks/package.json +3 -3
  170. package/package.json +61 -39
  171. package/server/package.json +5 -0
  172. package/themes/package.json +3 -3
  173. package/dist/client/index.js.map +0 -1
  174. package/dist/client/index.mjs.map +0 -1
  175. package/dist/hooks/index.js.map +0 -1
  176. package/dist/hooks/index.mjs.map +0 -1
  177. package/dist/server/server.js.map +0 -1
  178. package/dist/server/server.mjs.map +0 -1
  179. package/dist/themes/index.js.map +0 -1
  180. package/dist/themes/index.mjs.map +0 -1
  181. /package/dist/{themes/index.d.mts → cjs/themes/index.d.cts} +0 -0
  182. /package/dist/{hooks → client/hooks}/index.d.mts +0 -0
  183. /package/dist/{hooks → client/hooks}/index.d.ts +0 -0
  184. /package/dist/{hooks → client/hooks}/index.mjs +0 -0
  185. /package/dist/{themes/index.d.ts → client/themes/index.d.mts} +0 -0
  186. /package/dist/{themes → client/themes}/index.mjs +0 -0
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/server/index.tsx
22
+ var server_exports = {};
23
+ __export(server_exports, {
24
+ Bell: () => Bell,
25
+ Inbox: () => Inbox,
26
+ InboxContent: () => InboxContent,
27
+ Notifications: () => Notifications,
28
+ NovuProvider: () => NovuProvider,
29
+ Preferences: () => Preferences,
30
+ useCounts: () => useCounts,
31
+ useNotifications: () => useNotifications,
32
+ useNovu: () => useNovu,
33
+ usePreferences: () => usePreferences
34
+ });
35
+ module.exports = __toCommonJS(server_exports);
36
+ __reExport(server_exports, require("../utils/types.cjs"), module.exports);
37
+ function Inbox(props) {
38
+ }
39
+ function InboxContent() {
40
+ }
41
+ function Notifications() {
42
+ }
43
+ function Preferences() {
44
+ }
45
+ function Bell() {
46
+ }
47
+ function NovuProvider(props) {
48
+ }
49
+ function useNovu() {
50
+ return null;
51
+ }
52
+ function useCounts(_) {
53
+ return {
54
+ isLoading: false,
55
+ isFetching: false,
56
+ refetch: () => Promise.resolve()
57
+ };
58
+ }
59
+ function useNotifications(_) {
60
+ return {
61
+ isLoading: false,
62
+ isFetching: false,
63
+ hasMore: false,
64
+ readAll: () => Promise.resolve({ data: void 0, error: void 0 }),
65
+ archiveAll: () => Promise.resolve({ data: void 0, error: void 0 }),
66
+ archiveAllRead: () => Promise.resolve({ data: void 0, error: void 0 }),
67
+ refetch: () => Promise.resolve(),
68
+ fetchMore: () => Promise.resolve()
69
+ };
70
+ }
71
+ function usePreferences(_) {
72
+ return {
73
+ isLoading: false,
74
+ isFetching: false,
75
+ refetch: () => Promise.resolve()
76
+ };
77
+ }
78
+ // Annotate the CommonJS export names for ESM import in node:
79
+ 0 && (module.exports = {
80
+ Bell,
81
+ Inbox,
82
+ InboxContent,
83
+ Notifications,
84
+ NovuProvider,
85
+ Preferences,
86
+ useCounts,
87
+ useNotifications,
88
+ useNovu,
89
+ usePreferences,
90
+ ...require("../utils/types.cjs")
91
+ });
92
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/server/index.tsx"],"sourcesContent":["import type { InboxProps } from '../components/Inbox';\nimport type {\n UseNotificationsProps,\n UseNotificationsResult,\n UsePreferencesProps,\n UsePreferencesResult,\n} from '../hooks';\nimport type { NovuProviderProps } from '../hooks/NovuProvider';\nimport type { UseCountsProps, UseCountsResult } from '../hooks/useCounts';\n\nexport * from '../utils/types';\n\n/**\n * Exporting all components from the components folder\n * as empty functions to fix build errors in SSR\n * This will be replaced with actual components\n * when we implement the SSR components in @novu/js/ui\n */\nexport function Inbox(props: InboxProps) {}\n\nexport function InboxContent() {}\n\nexport function Notifications() {}\n\nexport function Preferences() {}\n\nexport function Bell() {}\n\nexport function NovuProvider(props: NovuProviderProps) {}\n\nexport function useNovu() {\n return null;\n}\n\nexport function useCounts(_: UseCountsProps): UseCountsResult {\n return {\n isLoading: false,\n isFetching: false,\n refetch: () => Promise.resolve(),\n };\n}\n\nexport function useNotifications(_: UseNotificationsProps): UseNotificationsResult {\n return {\n isLoading: false,\n isFetching: false,\n hasMore: false,\n readAll: () => Promise.resolve({ data: undefined, error: undefined }),\n archiveAll: () => Promise.resolve({ data: undefined, error: undefined }),\n archiveAllRead: () => Promise.resolve({ data: undefined, error: undefined }),\n refetch: () => Promise.resolve(),\n fetchMore: () => Promise.resolve(),\n };\n}\n\nexport function usePreferences(_: UsePreferencesProps): UsePreferencesResult {\n return {\n isLoading: false,\n isFetching: false,\n refetch: () => Promise.resolve(),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,2BAAc,+BAVd;AAkBO,SAAS,MAAM,OAAmB;AAAC;AAEnC,SAAS,eAAe;AAAC;AAEzB,SAAS,gBAAgB;AAAC;AAE1B,SAAS,cAAc;AAAC;AAExB,SAAS,OAAO;AAAC;AAEjB,SAAS,aAAa,OAA0B;AAAC;AAEjD,SAAS,UAAU;AACxB,SAAO;AACT;AAEO,SAAS,UAAU,GAAoC;AAC5D,SAAO;AAAA,IACL,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,SAAS,MAAM,QAAQ,QAAQ;AAAA,EACjC;AACF;AAEO,SAAS,iBAAiB,GAAkD;AACjF,SAAO;AAAA,IACL,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,SAAS,MAAM,QAAQ,QAAQ,EAAE,MAAM,QAAW,OAAO,OAAU,CAAC;AAAA,IACpE,YAAY,MAAM,QAAQ,QAAQ,EAAE,MAAM,QAAW,OAAO,OAAU,CAAC;AAAA,IACvE,gBAAgB,MAAM,QAAQ,QAAQ,EAAE,MAAM,QAAW,OAAO,OAAU,CAAC;AAAA,IAC3E,SAAS,MAAM,QAAQ,QAAQ;AAAA,IAC/B,WAAW,MAAM,QAAQ,QAAQ;AAAA,EACnC;AACF;AAEO,SAAS,eAAe,GAA8C;AAC3E,SAAO;AAAA,IACL,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,SAAS,MAAM,QAAQ,QAAQ;AAAA,EACjC;AACF;","names":[]}
@@ -0,0 +1,29 @@
1
+ import { InboxProps } from '../components/Inbox.cjs';
2
+ import { UseNotificationsProps, UseNotificationsResult } from '../hooks/useNotifications.cjs';
3
+ import { UsePreferencesProps, UsePreferencesResult } from '../hooks/usePreferences.cjs';
4
+ import { UseCountsProps, UseCountsResult } from '../hooks/useCounts.cjs';
5
+ import { NovuProviderProps } from '../hooks/NovuProvider.cjs';
6
+ export { BaseProps, BellRenderer, BodyRenderer, DefaultInboxProps, DefaultProps, NoRendererProps, NotificationRendererProps, NotificationsRenderer, SubjectBodyRendererProps, SubjectRenderer, WithChildrenProps } from '../utils/types.cjs';
7
+ export { Notification } from '@novu/js/ui';
8
+ import 'react/jsx-runtime';
9
+ import 'react';
10
+ import '@novu/js';
11
+
12
+ /**
13
+ * Exporting all components from the components folder
14
+ * as empty functions to fix build errors in SSR
15
+ * This will be replaced with actual components
16
+ * when we implement the SSR components in @novu/js/ui
17
+ */
18
+ declare function Inbox(props: InboxProps): void;
19
+ declare function InboxContent(): void;
20
+ declare function Notifications(): void;
21
+ declare function Preferences(): void;
22
+ declare function Bell(): void;
23
+ declare function NovuProvider(props: NovuProviderProps): void;
24
+ declare function useNovu(): null;
25
+ declare function useCounts(_: UseCountsProps): UseCountsResult;
26
+ declare function useNotifications(_: UseNotificationsProps): UseNotificationsResult;
27
+ declare function usePreferences(_: UsePreferencesProps): UsePreferencesResult;
28
+
29
+ export { Bell, Inbox, InboxContent, Notifications, NovuProvider, Preferences, useCounts, useNotifications, useNovu, usePreferences };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/themes/index.ts
18
+ var themes_exports = {};
19
+ module.exports = __toCommonJS(themes_exports);
20
+ __reExport(themes_exports, require("@novu/js/themes"), module.exports);
21
+ // Annotate the CommonJS export names for ESM import in node:
22
+ 0 && (module.exports = {
23
+ ...require("@novu/js/themes")
24
+ });
25
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/themes/index.ts"],"sourcesContent":["export * from '@novu/js/themes';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAc,4BAAd;","names":[]}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/utils/createContextAndHook.ts
31
+ var createContextAndHook_exports = {};
32
+ __export(createContextAndHook_exports, {
33
+ assertContextExists: () => assertContextExists,
34
+ createContextAndHook: () => createContextAndHook
35
+ });
36
+ module.exports = __toCommonJS(createContextAndHook_exports);
37
+ var import_react = __toESM(require("react"), 1);
38
+ function assertContextExists(contextVal, msgOrCtx) {
39
+ if (!contextVal) {
40
+ throw typeof msgOrCtx === "string" ? new Error(msgOrCtx) : new Error(`${msgOrCtx.displayName} not found`);
41
+ }
42
+ }
43
+ var createContextAndHook = (displayName, options) => {
44
+ const { assertCtxFn = assertContextExists } = options || {};
45
+ const Ctx = import_react.default.createContext(void 0);
46
+ Ctx.displayName = displayName;
47
+ const useCtx = () => {
48
+ const ctx = import_react.default.useContext(Ctx);
49
+ assertCtxFn(ctx, `Component must be wrapped with ${Ctx.displayName}`);
50
+ return ctx.value;
51
+ };
52
+ const useCtxWithoutGuarantee = () => {
53
+ const ctx = import_react.default.useContext(Ctx);
54
+ return ctx ? ctx.value : {};
55
+ };
56
+ return [Ctx, useCtx, useCtxWithoutGuarantee];
57
+ };
58
+ // Annotate the CommonJS export names for ESM import in node:
59
+ 0 && (module.exports = {
60
+ assertContextExists,
61
+ createContextAndHook
62
+ });
63
+ //# sourceMappingURL=createContextAndHook.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utils/createContextAndHook.ts"],"sourcesContent":["import React from 'react';\n\nexport function assertContextExists(contextVal: unknown, msgOrCtx: string | React.Context<any>): asserts contextVal {\n if (!contextVal) {\n throw typeof msgOrCtx === 'string' ? new Error(msgOrCtx) : new Error(`${msgOrCtx.displayName} not found`);\n }\n}\n\ntype Options = { assertCtxFn?: (v: unknown, msg: string) => void };\ntype ContextOf<T> = React.Context<{ value: T } | undefined>;\ntype UseCtxFn<T> = () => T;\n\n/**\n * Creates and returns a Context and two hooks that return the context value.\n * The Context type is derived from the type passed in by the user.\n * The first hook returned guarantees that the context exists so the returned value is always CtxValue\n * The second hook makes no guarantees, so the returned value can be CtxValue | undefined\n */\nexport const createContextAndHook = <CtxVal>(\n displayName: string,\n options?: Options\n): [ContextOf<CtxVal>, UseCtxFn<CtxVal>, UseCtxFn<CtxVal | Partial<CtxVal>>] => {\n const { assertCtxFn = assertContextExists } = options || {};\n const Ctx = React.createContext<{ value: CtxVal } | undefined>(undefined);\n Ctx.displayName = displayName;\n\n const useCtx = () => {\n const ctx = React.useContext(Ctx);\n assertCtxFn(ctx, `Component must be wrapped with ${Ctx.displayName}`);\n\n return (ctx as any).value as CtxVal;\n };\n\n const useCtxWithoutGuarantee = () => {\n const ctx = React.useContext(Ctx);\n\n return ctx ? ctx.value : {};\n };\n\n return [Ctx, useCtx, useCtxWithoutGuarantee];\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAEX,SAAS,oBAAoB,YAAqB,UAA2D;AAClH,MAAI,CAAC,YAAY;AACf,UAAM,OAAO,aAAa,WAAW,IAAI,MAAM,QAAQ,IAAI,IAAI,MAAM,GAAG,SAAS,WAAW,YAAY;AAAA,EAC1G;AACF;AAYO,IAAM,uBAAuB,CAClC,aACA,YAC8E;AAC9E,QAAM,EAAE,cAAc,oBAAoB,IAAI,WAAW,CAAC;AAC1D,QAAM,MAAM,aAAAA,QAAM,cAA6C,MAAS;AACxE,MAAI,cAAc;AAElB,QAAM,SAAS,MAAM;AACnB,UAAM,MAAM,aAAAA,QAAM,WAAW,GAAG;AAChC,gBAAY,KAAK,kCAAkC,IAAI,WAAW,EAAE;AAEpE,WAAQ,IAAY;AAAA,EACtB;AAEA,QAAM,yBAAyB,MAAM;AACnC,UAAM,MAAM,aAAAA,QAAM,WAAW,GAAG;AAEhC,WAAO,MAAM,IAAI,QAAQ,CAAC;AAAA,EAC5B;AAEA,SAAO,CAAC,KAAK,QAAQ,sBAAsB;AAC7C;","names":["React"]}
@@ -0,0 +1,19 @@
1
+ import React__default from 'react';
2
+
3
+ declare function assertContextExists(contextVal: unknown, msgOrCtx: string | React__default.Context<any>): asserts contextVal;
4
+ type Options = {
5
+ assertCtxFn?: (v: unknown, msg: string) => void;
6
+ };
7
+ type ContextOf<T> = React__default.Context<{
8
+ value: T;
9
+ } | undefined>;
10
+ type UseCtxFn<T> = () => T;
11
+ /**
12
+ * Creates and returns a Context and two hooks that return the context value.
13
+ * The Context type is derived from the type passed in by the user.
14
+ * The first hook returned guarantees that the context exists so the returned value is always CtxValue
15
+ * The second hook makes no guarantees, so the returned value can be CtxValue | undefined
16
+ */
17
+ declare const createContextAndHook: <CtxVal>(displayName: string, options?: Options) => [ContextOf<CtxVal>, UseCtxFn<CtxVal>, UseCtxFn<CtxVal | Partial<CtxVal>>];
18
+
19
+ export { assertContextExists, createContextAndHook };
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/requestLock.ts
21
+ var requestLock_exports = {};
22
+ __export(requestLock_exports, {
23
+ requestLock: () => requestLock
24
+ });
25
+ module.exports = __toCommonJS(requestLock_exports);
26
+ function requestLock(id, cb) {
27
+ if (!("locks" in navigator)) {
28
+ cb(id);
29
+ return () => {
30
+ };
31
+ }
32
+ let isFulfilled = false;
33
+ let promiseResolve;
34
+ const promise = new Promise((resolve) => {
35
+ promiseResolve = resolve;
36
+ });
37
+ navigator.locks.request(id, () => {
38
+ if (!isFulfilled) {
39
+ cb(id);
40
+ }
41
+ return promise;
42
+ });
43
+ return () => {
44
+ isFulfilled = true;
45
+ promiseResolve();
46
+ };
47
+ }
48
+ // Annotate the CommonJS export names for ESM import in node:
49
+ 0 && (module.exports = {
50
+ requestLock
51
+ });
52
+ //# sourceMappingURL=requestLock.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utils/requestLock.ts"],"sourcesContent":["export function requestLock(id: string, cb: (id: string) => void) {\n // Check if the Lock API is available\n if (!('locks' in navigator)) {\n // If Lock API is not available, immediately invoke the callback and return a no-op function\n cb(id);\n return () => {};\n }\n\n let isFulfilled = false;\n let promiseResolve: () => void;\n\n const promise = new Promise<void>((resolve) => {\n promiseResolve = resolve;\n });\n\n navigator.locks.request(id, () => {\n if (!isFulfilled) {\n cb(id);\n }\n\n return promise;\n });\n\n return () => {\n isFulfilled = true;\n promiseResolve();\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,YAAY,IAAY,IAA0B;AAEhE,MAAI,EAAE,WAAW,YAAY;AAE3B,OAAG,EAAE;AACL,WAAO,MAAM;AAAA,IAAC;AAAA,EAChB;AAEA,MAAI,cAAc;AAClB,MAAI;AAEJ,QAAM,UAAU,IAAI,QAAc,CAAC,YAAY;AAC7C,qBAAiB;AAAA,EACnB,CAAC;AAED,YAAU,MAAM,QAAQ,IAAI,MAAM;AAChC,QAAI,CAAC,aAAa;AAChB,SAAG,EAAE;AAAA,IACP;AAEA,WAAO;AAAA,EACT,CAAC;AAED,SAAO,MAAM;AACX,kBAAc;AACd,mBAAe;AAAA,EACjB;AACF;","names":[]}
@@ -0,0 +1,3 @@
1
+ declare function requestLock(id: string, cb: (id: string) => void): () => void;
2
+
3
+ export { requestLock };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/utils/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
19
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utils/types.ts"],"sourcesContent":["import type {\n Notification,\n NotificationClickHandler,\n NotificationActionClickHandler,\n Tab,\n Appearance,\n Localization,\n RouterPush,\n PreferencesFilter,\n InboxProps,\n} from '@novu/js/ui';\n\nexport type NotificationsRenderer = (notification: Notification) => React.ReactNode;\nexport type SubjectRenderer = (notification: Notification) => React.ReactNode;\nexport type BodyRenderer = (notification: Notification) => React.ReactNode;\nexport type BellRenderer = (unreadCount: number) => React.ReactNode;\n\nexport type DefaultInboxProps = {\n open?: boolean;\n renderNotification?: NotificationsRenderer;\n renderSubject?: SubjectRenderer;\n renderBody?: BodyRenderer;\n renderBell?: BellRenderer;\n onNotificationClick?: NotificationClickHandler;\n onPrimaryActionClick?: NotificationActionClickHandler;\n onSecondaryActionClick?: NotificationActionClickHandler;\n placement?: InboxProps['placement'];\n placementOffset?: InboxProps['placementOffset'];\n};\n\nexport type BaseProps = {\n applicationIdentifier: string;\n subscriberId: string;\n subscriberHash?: string;\n backendUrl?: string;\n socketUrl?: string;\n appearance?: Appearance;\n localization?: Localization;\n tabs?: Array<Tab>;\n preferencesFilter?: PreferencesFilter;\n routerPush?: RouterPush;\n};\n\nexport type NotificationRendererProps = {\n renderNotification: NotificationsRenderer;\n renderSubject?: never;\n renderBody?: never;\n};\n\nexport type SubjectBodyRendererProps = {\n renderNotification?: never;\n renderSubject?: SubjectRenderer;\n renderBody?: BodyRenderer;\n};\n\nexport type NoRendererProps = {\n renderNotification?: undefined;\n renderSubject?: undefined;\n renderBody?: undefined;\n};\n\nexport type DefaultProps = BaseProps &\n DefaultInboxProps & {\n children?: never;\n } & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);\n\nexport type WithChildrenProps = BaseProps & {\n children: React.ReactNode;\n};\n\nexport type { Notification };\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,54 @@
1
+ import { Notification, NotificationClickHandler, NotificationActionClickHandler, InboxProps, Appearance, Localization, Tab, PreferencesFilter, RouterPush } from '@novu/js/ui';
2
+ export { Notification } from '@novu/js/ui';
3
+
4
+ type NotificationsRenderer = (notification: Notification) => React.ReactNode;
5
+ type SubjectRenderer = (notification: Notification) => React.ReactNode;
6
+ type BodyRenderer = (notification: Notification) => React.ReactNode;
7
+ type BellRenderer = (unreadCount: number) => React.ReactNode;
8
+ type DefaultInboxProps = {
9
+ open?: boolean;
10
+ renderNotification?: NotificationsRenderer;
11
+ renderSubject?: SubjectRenderer;
12
+ renderBody?: BodyRenderer;
13
+ renderBell?: BellRenderer;
14
+ onNotificationClick?: NotificationClickHandler;
15
+ onPrimaryActionClick?: NotificationActionClickHandler;
16
+ onSecondaryActionClick?: NotificationActionClickHandler;
17
+ placement?: InboxProps['placement'];
18
+ placementOffset?: InboxProps['placementOffset'];
19
+ };
20
+ type BaseProps = {
21
+ applicationIdentifier: string;
22
+ subscriberId: string;
23
+ subscriberHash?: string;
24
+ backendUrl?: string;
25
+ socketUrl?: string;
26
+ appearance?: Appearance;
27
+ localization?: Localization;
28
+ tabs?: Array<Tab>;
29
+ preferencesFilter?: PreferencesFilter;
30
+ routerPush?: RouterPush;
31
+ };
32
+ type NotificationRendererProps = {
33
+ renderNotification: NotificationsRenderer;
34
+ renderSubject?: never;
35
+ renderBody?: never;
36
+ };
37
+ type SubjectBodyRendererProps = {
38
+ renderNotification?: never;
39
+ renderSubject?: SubjectRenderer;
40
+ renderBody?: BodyRenderer;
41
+ };
42
+ type NoRendererProps = {
43
+ renderNotification?: undefined;
44
+ renderSubject?: undefined;
45
+ renderBody?: undefined;
46
+ };
47
+ type DefaultProps = BaseProps & DefaultInboxProps & {
48
+ children?: never;
49
+ } & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
50
+ type WithChildrenProps = BaseProps & {
51
+ children: React.ReactNode;
52
+ };
53
+
54
+ export type { BaseProps, BellRenderer, BodyRenderer, DefaultInboxProps, DefaultProps, NoRendererProps, NotificationRendererProps, NotificationsRenderer, SubjectBodyRendererProps, SubjectRenderer, WithChildrenProps };
@@ -5,10 +5,14 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { Novu, NovuOptions, Notification as Notification$1, NovuError, Preference, NotificationFilter } from '@novu/js';
6
6
 
7
7
  type NotificationsRenderer = (notification: Notification) => React.ReactNode;
8
+ type SubjectRenderer = (notification: Notification) => React.ReactNode;
9
+ type BodyRenderer = (notification: Notification) => React.ReactNode;
8
10
  type BellRenderer = (unreadCount: number) => React.ReactNode;
9
11
  type DefaultInboxProps = {
10
12
  open?: boolean;
11
13
  renderNotification?: NotificationsRenderer;
14
+ renderSubject?: SubjectRenderer;
15
+ renderBody?: BodyRenderer;
12
16
  renderBell?: BellRenderer;
13
17
  onNotificationClick?: NotificationClickHandler;
14
18
  onPrimaryActionClick?: NotificationActionClickHandler;
@@ -28,9 +32,24 @@ type BaseProps = {
28
32
  preferencesFilter?: PreferencesFilter;
29
33
  routerPush?: RouterPush;
30
34
  };
35
+ type NotificationRendererProps = {
36
+ renderNotification: NotificationsRenderer;
37
+ renderSubject?: never;
38
+ renderBody?: never;
39
+ };
40
+ type SubjectBodyRendererProps = {
41
+ renderNotification?: never;
42
+ renderSubject?: SubjectRenderer;
43
+ renderBody?: BodyRenderer;
44
+ };
45
+ type NoRendererProps = {
46
+ renderNotification?: undefined;
47
+ renderSubject?: undefined;
48
+ renderBody?: undefined;
49
+ };
31
50
  type DefaultProps = BaseProps & DefaultInboxProps & {
32
51
  children?: never;
33
- };
52
+ } & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
34
53
  type WithChildrenProps = BaseProps & {
35
54
  children: React.ReactNode;
36
55
  };
@@ -48,23 +67,21 @@ declare const Inbox: React$1.MemoExoticComponent<(props: InboxProps) => react_js
48
67
  declare const Preferences: () => react_jsx_runtime.JSX.Element;
49
68
 
50
69
  type NotificationProps = {
51
- renderNotification?: NotificationsRenderer;
52
70
  onNotificationClick?: NotificationClickHandler;
53
71
  onPrimaryActionClick?: NotificationActionClickHandler;
54
72
  onSecondaryActionClick?: NotificationActionClickHandler;
55
- };
73
+ } & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
56
74
  declare const Notifications: React$1.ComponentType<NotificationProps & {
57
75
  children?: React$1.ReactNode | undefined;
58
76
  }>;
59
77
 
60
78
  type InboxContentProps = {
61
- renderNotification?: NotificationsRenderer;
62
79
  onNotificationClick?: NotificationClickHandler;
63
80
  onPrimaryActionClick?: NotificationActionClickHandler;
64
81
  onSecondaryActionClick?: NotificationActionClickHandler;
65
82
  initialPage?: InboxPage;
66
83
  hideNav?: boolean;
67
- };
84
+ } & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
68
85
  declare const InboxContent: React$1.ComponentType<InboxContentProps & {
69
86
  children?: React$1.ReactNode | undefined;
70
87
  }>;
@@ -148,4 +165,4 @@ type UseCountsResult = {
148
165
  };
149
166
  declare const useCounts: (props: UseCountsProps) => UseCountsResult;
150
167
 
151
- export { type BaseProps, Bell, type BellProps, type BellRenderer, type DefaultInboxProps, type DefaultProps, Inbox, InboxContent, type InboxContentProps, type InboxProps, InternalNovuProvider, type NotificationProps, Notifications, type NotificationsRenderer, NovuProvider, Preferences, type UseNotificationsProps, type WithChildrenProps, useCounts, useNotifications, useNovu, usePreferences, useUnsafeNovu };
168
+ export { type BaseProps, Bell, type BellProps, type BellRenderer, type BodyRenderer, type DefaultInboxProps, type DefaultProps, Inbox, InboxContent, type InboxContentProps, type InboxProps, InternalNovuProvider, type NoRendererProps, type NotificationProps, type NotificationRendererProps, Notifications, type NotificationsRenderer, NovuProvider, Preferences, type SubjectBodyRendererProps, type SubjectRenderer, type UseNotificationsProps, type WithChildrenProps, useCounts, useNotifications, useNovu, usePreferences, useUnsafeNovu };
@@ -5,10 +5,14 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { Novu, NovuOptions, Notification as Notification$1, NovuError, Preference, NotificationFilter } from '@novu/js';
6
6
 
7
7
  type NotificationsRenderer = (notification: Notification) => React.ReactNode;
8
+ type SubjectRenderer = (notification: Notification) => React.ReactNode;
9
+ type BodyRenderer = (notification: Notification) => React.ReactNode;
8
10
  type BellRenderer = (unreadCount: number) => React.ReactNode;
9
11
  type DefaultInboxProps = {
10
12
  open?: boolean;
11
13
  renderNotification?: NotificationsRenderer;
14
+ renderSubject?: SubjectRenderer;
15
+ renderBody?: BodyRenderer;
12
16
  renderBell?: BellRenderer;
13
17
  onNotificationClick?: NotificationClickHandler;
14
18
  onPrimaryActionClick?: NotificationActionClickHandler;
@@ -28,9 +32,24 @@ type BaseProps = {
28
32
  preferencesFilter?: PreferencesFilter;
29
33
  routerPush?: RouterPush;
30
34
  };
35
+ type NotificationRendererProps = {
36
+ renderNotification: NotificationsRenderer;
37
+ renderSubject?: never;
38
+ renderBody?: never;
39
+ };
40
+ type SubjectBodyRendererProps = {
41
+ renderNotification?: never;
42
+ renderSubject?: SubjectRenderer;
43
+ renderBody?: BodyRenderer;
44
+ };
45
+ type NoRendererProps = {
46
+ renderNotification?: undefined;
47
+ renderSubject?: undefined;
48
+ renderBody?: undefined;
49
+ };
31
50
  type DefaultProps = BaseProps & DefaultInboxProps & {
32
51
  children?: never;
33
- };
52
+ } & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
34
53
  type WithChildrenProps = BaseProps & {
35
54
  children: React.ReactNode;
36
55
  };
@@ -48,23 +67,21 @@ declare const Inbox: React$1.MemoExoticComponent<(props: InboxProps) => react_js
48
67
  declare const Preferences: () => react_jsx_runtime.JSX.Element;
49
68
 
50
69
  type NotificationProps = {
51
- renderNotification?: NotificationsRenderer;
52
70
  onNotificationClick?: NotificationClickHandler;
53
71
  onPrimaryActionClick?: NotificationActionClickHandler;
54
72
  onSecondaryActionClick?: NotificationActionClickHandler;
55
- };
73
+ } & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
56
74
  declare const Notifications: React$1.ComponentType<NotificationProps & {
57
75
  children?: React$1.ReactNode | undefined;
58
76
  }>;
59
77
 
60
78
  type InboxContentProps = {
61
- renderNotification?: NotificationsRenderer;
62
79
  onNotificationClick?: NotificationClickHandler;
63
80
  onPrimaryActionClick?: NotificationActionClickHandler;
64
81
  onSecondaryActionClick?: NotificationActionClickHandler;
65
82
  initialPage?: InboxPage;
66
83
  hideNav?: boolean;
67
- };
84
+ } & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
68
85
  declare const InboxContent: React$1.ComponentType<InboxContentProps & {
69
86
  children?: React$1.ReactNode | undefined;
70
87
  }>;
@@ -148,4 +165,4 @@ type UseCountsResult = {
148
165
  };
149
166
  declare const useCounts: (props: UseCountsProps) => UseCountsResult;
150
167
 
151
- export { type BaseProps, Bell, type BellProps, type BellRenderer, type DefaultInboxProps, type DefaultProps, Inbox, InboxContent, type InboxContentProps, type InboxProps, InternalNovuProvider, type NotificationProps, Notifications, type NotificationsRenderer, NovuProvider, Preferences, type UseNotificationsProps, type WithChildrenProps, useCounts, useNotifications, useNovu, usePreferences, useUnsafeNovu };
168
+ export { type BaseProps, Bell, type BellProps, type BellRenderer, type BodyRenderer, type DefaultInboxProps, type DefaultProps, Inbox, InboxContent, type InboxContentProps, type InboxProps, InternalNovuProvider, type NoRendererProps, type NotificationProps, type NotificationRendererProps, Notifications, type NotificationsRenderer, NovuProvider, Preferences, type SubjectBodyRendererProps, type SubjectRenderer, type UseNotificationsProps, type WithChildrenProps, useCounts, useNotifications, useNovu, usePreferences, useUnsafeNovu };