@novu/react 3.0.0-canary.0 → 3.0.0-canary.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.
- package/dist/cjs/hooks/NovuProvider.cjs +1 -1
- package/dist/cjs/server/index.cjs +3 -0
- package/dist/cjs/server/index.cjs.map +1 -1
- package/dist/cjs/server/index.d.cts +3 -3
- package/dist/esm/hooks/NovuProvider.js +1 -1
- package/dist/esm/server/index.d.ts +3 -3
- package/dist/esm/server/index.js +3 -0
- package/dist/esm/server/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -29,7 +29,7 @@ module.exports = __toCommonJS(NovuProvider_exports);
|
|
|
29
29
|
var import_js = require("@novu/js");
|
|
30
30
|
var import_react = require("react");
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
-
var version = "
|
|
32
|
+
var version = "2.6.6";
|
|
33
33
|
var name = "@novu/react";
|
|
34
34
|
var baseUserAgent = `${name}@${version}`;
|
|
35
35
|
var NovuContext = (0, import_react.createContext)(void 0);
|
|
@@ -34,7 +34,9 @@ __export(server_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(server_exports);
|
|
36
36
|
__reExport(server_exports, require("../utils/types.cjs"), module.exports);
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
38
|
function Inbox(props) {
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: props.children });
|
|
38
40
|
}
|
|
39
41
|
function InboxContent() {
|
|
40
42
|
}
|
|
@@ -45,6 +47,7 @@ function Preferences() {
|
|
|
45
47
|
function Bell() {
|
|
46
48
|
}
|
|
47
49
|
function NovuProvider(props) {
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: props.children });
|
|
48
51
|
}
|
|
49
52
|
function useNovu() {
|
|
50
53
|
return null;
|
|
@@ -1 +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;
|
|
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 return <>{props.children}</>;\n}\n\nexport function InboxContent() {}\n\nexport function Notifications() {}\n\nexport function Preferences() {}\n\nexport function Bell() {}\n\nexport function NovuProvider(props: NovuProviderProps) {\n return <>{props.children}</>;\n}\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;AAmBS;AADF,SAAS,MAAM,OAAmB;AACvC,SAAO,2EAAG,gBAAM,UAAS;AAC3B;AAEO,SAAS,eAAe;AAAC;AAEzB,SAAS,gBAAgB;AAAC;AAE1B,SAAS,cAAc;AAAC;AAExB,SAAS,OAAO;AAAC;AAEjB,SAAS,aAAa,OAA0B;AACrD,SAAO,2EAAG,gBAAM,UAAS;AAC3B;AAEO,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":[]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { InboxProps } from '../components/Inbox.cjs';
|
|
2
3
|
import { UseNotificationsProps, UseNotificationsResult } from '../hooks/useNotifications.cjs';
|
|
3
4
|
import { UsePreferencesProps, UsePreferencesResult } from '../hooks/usePreferences.cjs';
|
|
@@ -5,7 +6,6 @@ import { UseCountsProps, UseCountsResult } from '../hooks/useCounts.cjs';
|
|
|
5
6
|
import { NovuProviderProps } from '../hooks/NovuProvider.cjs';
|
|
6
7
|
export { BaseProps, BellRenderer, BodyRenderer, DefaultInboxProps, DefaultProps, NoRendererProps, NotificationRendererProps, NotificationsRenderer, SubjectBodyRendererProps, SubjectRenderer, WithChildrenProps } from '../utils/types.cjs';
|
|
7
8
|
export { Notification } from '@novu/js/ui';
|
|
8
|
-
import 'react/jsx-runtime';
|
|
9
9
|
import 'react';
|
|
10
10
|
import '@novu/js';
|
|
11
11
|
|
|
@@ -15,12 +15,12 @@ import '@novu/js';
|
|
|
15
15
|
* This will be replaced with actual components
|
|
16
16
|
* when we implement the SSR components in @novu/js/ui
|
|
17
17
|
*/
|
|
18
|
-
declare function Inbox(props: InboxProps):
|
|
18
|
+
declare function Inbox(props: InboxProps): react_jsx_runtime.JSX.Element;
|
|
19
19
|
declare function InboxContent(): void;
|
|
20
20
|
declare function Notifications(): void;
|
|
21
21
|
declare function Preferences(): void;
|
|
22
22
|
declare function Bell(): void;
|
|
23
|
-
declare function NovuProvider(props: NovuProviderProps):
|
|
23
|
+
declare function NovuProvider(props: NovuProviderProps): react_jsx_runtime.JSX.Element;
|
|
24
24
|
declare function useNovu(): null;
|
|
25
25
|
declare function useCounts(_: UseCountsProps): UseCountsResult;
|
|
26
26
|
declare function useNotifications(_: UseNotificationsProps): UseNotificationsResult;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Novu } from "@novu/js";
|
|
3
3
|
import { createContext, useContext, useMemo } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
var version = "
|
|
5
|
+
var version = "2.6.6";
|
|
6
6
|
var name = "@novu/react";
|
|
7
7
|
var baseUserAgent = `${name}@${version}`;
|
|
8
8
|
var NovuContext = createContext(void 0);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { InboxProps } from '../components/Inbox.js';
|
|
2
3
|
import { UseNotificationsProps, UseNotificationsResult } from '../hooks/useNotifications.js';
|
|
3
4
|
import { UsePreferencesProps, UsePreferencesResult } from '../hooks/usePreferences.js';
|
|
@@ -5,7 +6,6 @@ import { UseCountsProps, UseCountsResult } from '../hooks/useCounts.js';
|
|
|
5
6
|
import { NovuProviderProps } from '../hooks/NovuProvider.js';
|
|
6
7
|
export { BaseProps, BellRenderer, BodyRenderer, DefaultInboxProps, DefaultProps, NoRendererProps, NotificationRendererProps, NotificationsRenderer, SubjectBodyRendererProps, SubjectRenderer, WithChildrenProps } from '../utils/types.js';
|
|
7
8
|
export { Notification } from '@novu/js/ui';
|
|
8
|
-
import 'react/jsx-runtime';
|
|
9
9
|
import 'react';
|
|
10
10
|
import '@novu/js';
|
|
11
11
|
|
|
@@ -15,12 +15,12 @@ import '@novu/js';
|
|
|
15
15
|
* This will be replaced with actual components
|
|
16
16
|
* when we implement the SSR components in @novu/js/ui
|
|
17
17
|
*/
|
|
18
|
-
declare function Inbox(props: InboxProps):
|
|
18
|
+
declare function Inbox(props: InboxProps): react_jsx_runtime.JSX.Element;
|
|
19
19
|
declare function InboxContent(): void;
|
|
20
20
|
declare function Notifications(): void;
|
|
21
21
|
declare function Preferences(): void;
|
|
22
22
|
declare function Bell(): void;
|
|
23
|
-
declare function NovuProvider(props: NovuProviderProps):
|
|
23
|
+
declare function NovuProvider(props: NovuProviderProps): react_jsx_runtime.JSX.Element;
|
|
24
24
|
declare function useNovu(): null;
|
|
25
25
|
declare function useCounts(_: UseCountsProps): UseCountsResult;
|
|
26
26
|
declare function useNotifications(_: UseNotificationsProps): UseNotificationsResult;
|
package/dist/esm/server/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// src/server/index.tsx
|
|
2
2
|
export * from "../utils/types.js";
|
|
3
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
4
|
function Inbox(props) {
|
|
5
|
+
return /* @__PURE__ */ jsx(Fragment, { children: props.children });
|
|
4
6
|
}
|
|
5
7
|
function InboxContent() {
|
|
6
8
|
}
|
|
@@ -11,6 +13,7 @@ function Preferences() {
|
|
|
11
13
|
function Bell() {
|
|
12
14
|
}
|
|
13
15
|
function NovuProvider(props) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Fragment, { children: props.children });
|
|
14
17
|
}
|
|
15
18
|
function useNovu() {
|
|
16
19
|
return null;
|
|
@@ -1 +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":";AAUA,cAAc;
|
|
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 return <>{props.children}</>;\n}\n\nexport function InboxContent() {}\n\nexport function Notifications() {}\n\nexport function Preferences() {}\n\nexport function Bell() {}\n\nexport function NovuProvider(props: NovuProviderProps) {\n return <>{props.children}</>;\n}\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":";AAUA,cAAc;AASL;AADF,SAAS,MAAM,OAAmB;AACvC,SAAO,gCAAG,gBAAM,UAAS;AAC3B;AAEO,SAAS,eAAe;AAAC;AAEzB,SAAS,gBAAgB;AAAC;AAE1B,SAAS,cAAc;AAAC;AAExB,SAAS,OAAO;AAAC;AAEjB,SAAS,aAAa,OAA0B;AACrD,SAAO,gCAAG,gBAAM,UAAS;AAC3B;AAEO,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":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novu/react",
|
|
3
|
-
"version": "3.0.0-canary.
|
|
3
|
+
"version": "3.0.0-canary.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/novuhq/novu",
|
|
@@ -79,12 +79,6 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"scripts": {
|
|
83
|
-
"build:watch": "tsup --watch",
|
|
84
|
-
"build": "tsup && pnpm run check-exports",
|
|
85
|
-
"lint": "eslint src",
|
|
86
|
-
"check-exports": "attw --pack ."
|
|
87
|
-
},
|
|
88
82
|
"browserslist": {
|
|
89
83
|
"production": [
|
|
90
84
|
">0.2%",
|
|
@@ -116,11 +110,17 @@
|
|
|
116
110
|
}
|
|
117
111
|
},
|
|
118
112
|
"dependencies": {
|
|
119
|
-
"@novu/js": "3.0.0-canary.
|
|
113
|
+
"@novu/js": "3.0.0-canary.1"
|
|
120
114
|
},
|
|
121
115
|
"nx": {
|
|
122
116
|
"tags": [
|
|
123
117
|
"type:package"
|
|
124
118
|
]
|
|
119
|
+
},
|
|
120
|
+
"scripts": {
|
|
121
|
+
"build:watch": "tsup --watch",
|
|
122
|
+
"build": "tsup && pnpm run check-exports",
|
|
123
|
+
"lint": "eslint src",
|
|
124
|
+
"check-exports": "attw --pack ."
|
|
125
125
|
}
|
|
126
|
-
}
|
|
126
|
+
}
|