@notificationapi/react 0.0.24 → 0.0.26

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 (48) hide show
  1. package/dist/assets/AntdIcon.js +200 -0
  2. package/dist/assets/Notification.js +118 -119
  3. package/dist/assets/PurePanel.js +69 -0
  4. package/dist/assets/RightOutlined.js +13 -0
  5. package/dist/assets/button.js +19 -18
  6. package/dist/assets/channelUtils.js +77 -0
  7. package/dist/assets/colors.js +8534 -9304
  8. package/dist/assets/index.js +16 -15
  9. package/dist/assets/index2.js +33 -32
  10. package/dist/assets/index3.js +722 -8531
  11. package/dist/assets/index4.js +8408 -0
  12. package/dist/assets/pickAttrs.js +42 -0
  13. package/dist/components/Notifications/Inbox.d.ts +3 -7
  14. package/dist/components/Notifications/Inbox.js +6250 -8
  15. package/dist/components/Notifications/InboxHeader.d.ts +1 -1
  16. package/dist/components/Notifications/InboxHeader.js +8 -7
  17. package/dist/components/Notifications/Notification.d.ts +2 -5
  18. package/dist/components/Notifications/Notification.js +3 -4
  19. package/dist/components/Notifications/NotificationCounter.d.ts +2 -2
  20. package/dist/components/Notifications/NotificationFeed.d.ts +4 -5
  21. package/dist/components/Notifications/NotificationFeed.js +28 -26
  22. package/dist/components/Notifications/NotificationLauncher.d.ts +1 -6
  23. package/dist/components/Notifications/NotificationLauncher.js +16 -18
  24. package/dist/components/Notifications/NotificationPopup.d.ts +5 -9
  25. package/dist/components/Notifications/NotificationPopup.js +119 -12
  26. package/dist/components/Notifications/UnreadBadge.d.ts +4 -7
  27. package/dist/components/Notifications/UnreadBadge.js +8 -10
  28. package/dist/components/Notifications/index.js +5 -5
  29. package/dist/components/Notifications/interface.d.ts +46 -0
  30. package/dist/components/Notifications/interface.js +19 -0
  31. package/dist/components/Preferences/NotificationPreferencesInline.d.ts +1 -1
  32. package/dist/components/Preferences/NotificationPreferencesInline.js +1 -1
  33. package/dist/components/Preferences/NotificationPreferencesPopup.js +1503 -4
  34. package/dist/components/Preferences/PreferenceInput.d.ts +5 -4
  35. package/dist/components/Preferences/PreferenceInput.js +1435 -4
  36. package/dist/components/Preferences/Preferences.d.ts +1 -4
  37. package/dist/components/Preferences/Preferences.js +579 -8
  38. package/dist/components/Preferences/channelUtils.d.ts +4 -0
  39. package/dist/components/Preferences/channelUtils.js +8 -0
  40. package/dist/components/Preferences/index.js +1 -1
  41. package/dist/components/Provider/index.d.ts +8 -2
  42. package/dist/components/Provider/index.js +162 -135
  43. package/dist/main.d.ts +2 -2
  44. package/dist/main.js +9 -9
  45. package/package.json +5 -2
  46. package/dist/assets/Inbox.js +0 -6363
  47. package/dist/assets/NotificationPreferencesPopup.js +0 -1562
  48. package/dist/assets/Preferences.js +0 -2120
@@ -1,24 +1,24 @@
1
- import { jsx as M } from "react/jsx-runtime";
2
- import { createContext as $, useState as N, useEffect as E, useContext as U } from "react";
3
- const j = async (e, o, d, r, f, g, l) => {
4
- const h = T(r, f, g), u = await fetch(
5
- `https://${o}/${r}/users/${encodeURIComponent(
1
+ import { jsx as H } from "react/jsx-runtime";
2
+ import { createContext as B, useState as N, useCallback as A, useMemo as G, useRef as m, useEffect as L, useContext as J } from "react";
3
+ const _ = async (e, c, a, r, f, I, h) => {
4
+ const g = z(r, f, I), l = await fetch(
5
+ `https://${c}/${r}/users/${encodeURIComponent(
6
6
  f
7
- )}/${d}`,
7
+ )}/${a}`,
8
8
  {
9
9
  method: e,
10
- body: JSON.stringify(l),
10
+ body: JSON.stringify(h),
11
11
  headers: {
12
- Authorization: `Basic ${h}`
12
+ Authorization: `Basic ${g}`
13
13
  }
14
14
  }
15
15
  );
16
16
  try {
17
- return await u.json();
17
+ return await l.json();
18
18
  } catch {
19
19
  return;
20
20
  }
21
- }, T = (e, o, d) => btoa(d ? e + ":" + o + ":" + d : e + ":" + o), D = {
21
+ }, z = (e, c, a) => btoa(a ? e + ":" + c + ":" + a : e + ":" + c), M = {
22
22
  host: "api.notificationapi.com",
23
23
  websocketHost: "ws.notificationapi.com",
24
24
  userId: "",
@@ -31,43 +31,43 @@ const j = async (e, o, d, r, f, g, l) => {
31
31
  onNewInAppNotifications: void 0,
32
32
  keepWebSocketAliveForSeconds: 86400
33
33
  // 24 hours
34
- }, n = {
35
- config: D,
34
+ }, i = {
35
+ config: M,
36
36
  init: function(e) {
37
- return this.config = { ...D, ...e }, {
37
+ return this.config = { ...M, ...e }, {
38
38
  ...this
39
39
  };
40
40
  },
41
41
  rest: {
42
- generic: function(e, o, d) {
43
- return j(
42
+ generic: function(e, c, a) {
43
+ return _(
44
44
  e,
45
- n.config.host,
46
- o,
47
- n.config.clientId,
48
- n.config.userId,
49
- n.config.hashedUserId,
50
- d
45
+ i.config.host,
46
+ c,
47
+ i.config.clientId,
48
+ i.config.userId,
49
+ i.config.hashedUserId,
50
+ a
51
51
  );
52
52
  },
53
- getNotifications: function(e, o) {
54
- return n.rest.generic(
53
+ getNotifications: function(e, c) {
54
+ return i.rest.generic(
55
55
  "GET",
56
- `notifications/INAPP_WEB?count=${o}&before=${e}`
56
+ `notifications/INAPP_WEB?count=${c}&before=${e}`
57
57
  );
58
58
  },
59
59
  patchNotifications: function(e) {
60
- return n.rest.generic(
60
+ return i.rest.generic(
61
61
  "PATCH",
62
62
  "notifications/INAPP_WEB",
63
63
  e
64
64
  );
65
65
  },
66
66
  getPreferences: function() {
67
- return n.rest.generic("GET", "preferences");
67
+ return i.rest.generic("GET", "preferences");
68
68
  },
69
69
  postPreferences: function(e) {
70
- return n.rest.generic(
70
+ return i.rest.generic(
71
71
  "POST",
72
72
  "preferences",
73
73
  e
@@ -77,64 +77,67 @@ const j = async (e, o, d, r, f, g, l) => {
77
77
  websocket: {
78
78
  object: void 0,
79
79
  connect: function() {
80
- let e = `wss://${n.config.websocketHost}?userId=${n.config.userId}&envId=${n.config.clientId}`;
81
- return n.config.hashedUserId && (e += `&userIdHash=${n.config.hashedUserId}`), n.websocket.object = new WebSocket(e), n.websocket.object.onmessage = (o) => {
82
- const d = JSON.parse(o.data);
83
- if (!(!d || !d.route) && d.route === "inapp_web/new_notifications") {
84
- const r = d;
85
- n.config.onNewInAppNotifications && n.config.onNewInAppNotifications(
80
+ let e = `wss://${i.config.websocketHost}?userId=${encodeURIComponent(i.config.userId)}&envId=${i.config.clientId}`;
81
+ return i.config.hashedUserId && (e += `&userIdHash=${encodeURIComponent(i.config.hashedUserId)}`), i.websocket.object = new WebSocket(e), i.websocket.object.onmessage = (c) => {
82
+ const a = JSON.parse(c.data);
83
+ if (!(!a || !a.route) && a.route === "inapp_web/new_notifications") {
84
+ const r = a;
85
+ i.config.onNewInAppNotifications && i.config.onNewInAppNotifications(
86
86
  r.payload.notifications
87
87
  );
88
88
  }
89
- }, n.websocket.object;
89
+ }, i.websocket.object;
90
90
  },
91
91
  disconnect: function(e) {
92
- var o;
93
- n.websocket.object && ((o = n.websocket.object) == null || o.close(), e && e(n.websocket.object));
92
+ var c;
93
+ i.websocket.object && ((c = i.websocket.object) == null || c.close(), e && e(i.websocket.object));
94
94
  }
95
95
  },
96
96
  openWebSocket: function() {
97
- return n.websocket.connect(() => {
98
- setTimeout(() => {
99
- this.websocket.disconnect(() => {
100
- this.websocket.connect();
101
- });
102
- }, 54e4);
97
+ return i.websocket.connect(() => {
98
+ setTimeout(
99
+ () => {
100
+ this.websocket.disconnect(() => {
101
+ this.websocket.connect();
102
+ });
103
+ },
104
+ 54e4
105
+ );
103
106
  });
104
107
  },
105
108
  getInAppNotifications: async (e) => {
106
- const o = e.maxCountNeeded || n.config.getInAppDefaultCount, d = e.oldestNeeded || n.config.getInAppDefaultOldest;
107
- let r = [], f = e.before, g = !0, l = !0;
108
- for (; l; ) {
109
- const h = (await n.rest.getNotifications(
109
+ const c = e.maxCountNeeded || i.config.getInAppDefaultCount, a = e.oldestNeeded || i.config.getInAppDefaultOldest;
110
+ let r = [], f = e.before, I = !0, h = !0;
111
+ for (; h; ) {
112
+ const g = (await i.rest.getNotifications(
110
113
  f,
111
- o
114
+ c
112
115
  )).notifications.filter(
113
- (u) => !r.find((w) => w.id === u.id)
116
+ (l) => !r.find((p) => p.id === l.id)
114
117
  );
115
- f = h.reduce(
116
- (u, w) => u < w.date ? u : w.date,
118
+ f = g.reduce(
119
+ (l, p) => l < p.date ? l : p.date,
117
120
  e.before
118
- ), r = [...r, ...h], g = h.length > 0, l = !0, (!g || r.length >= o || f < d) && (l = !1);
121
+ ), r = [...r, ...g], I = g.length > 0, h = !0, (!I || r.length >= c || f < a) && (h = !1);
119
122
  }
120
123
  return {
121
124
  items: r,
122
- hasMore: g,
125
+ hasMore: I,
123
126
  oldestReceived: f
124
127
  };
125
128
  },
126
129
  updateInAppNotifications: async (e) => {
127
- const o = {
130
+ const c = {
128
131
  trackingIds: e.ids
129
132
  };
130
- return e.archived === !0 ? o.archived = (/* @__PURE__ */ new Date()).toISOString() : e.archived === !1 && (o.archived = null), e.clicked === !0 ? o.clicked = (/* @__PURE__ */ new Date()).toISOString() : e.clicked === !1 && (o.clicked = null), e.opened === !0 ? o.opened = (/* @__PURE__ */ new Date()).toISOString() : e.opened === !1 && (o.opened = null), n.rest.patchNotifications(o);
133
+ return e.archived === !0 ? c.archived = (/* @__PURE__ */ new Date()).toISOString() : e.archived === !1 && (c.archived = null), e.clicked === !0 ? c.clicked = (/* @__PURE__ */ new Date()).toISOString() : e.clicked === !1 && (c.clicked = null), e.opened === !0 ? c.opened = (/* @__PURE__ */ new Date()).toISOString() : e.opened === !1 && (c.opened = null), i.rest.patchNotifications(c);
131
134
  },
132
- getPreferences: async () => n.rest.getPreferences(),
133
- updateDeliveryOption: async (e) => n.rest.postPreferences([e])
134
- }, m = $(
135
+ getPreferences: async () => i.rest.getPreferences(),
136
+ updateDeliveryOption: async (e) => i.rest.postPreferences([e])
137
+ }, U = B(
135
138
  void 0
136
- ), W = (e) => {
137
- const d = {
139
+ ), F = (e) => {
140
+ const a = {
138
141
  ...{
139
142
  apiURL: "https://api.notificationapi.com",
140
143
  wsURL: "wss://ws.notificationapi.com",
@@ -142,118 +145,142 @@ const j = async (e, o, d, r, f, g, l) => {
142
145
  initialLoadMaxAge: new Date((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 3))
143
146
  },
144
147
  ...e
145
- }, [r, f] = N(), [g, l] = N(), [h, u] = N(!1), [w, S] = N((/* @__PURE__ */ new Date()).toISOString()), [v, b] = N(!0), A = (c) => {
148
+ }, [r, f] = N(), [I, h] = N(), [g, l] = N(!1), [p, D] = N((/* @__PURE__ */ new Date()).toISOString()), [b, v] = N(!0), S = A((o) => {
146
149
  const s = (/* @__PURE__ */ new Date()).toISOString();
147
- f((i) => (c = c.filter((t) => !(t.expDate && new Date(t.expDate * 1e3).toISOString() > s || t.date > s)), i ? [
148
- ...c.filter((t) => !i.find((a) => a.id === t.id)),
149
- ...i
150
- ] : c));
151
- }, p = n.init({
150
+ f((t) => (o = o.filter((n) => !(n.expDate && new Date(n.expDate * 1e3).toISOString() > s || n.date > s)), t ? [
151
+ ...o.filter((n) => !t.find((d) => d.id === n.id)),
152
+ ...t
153
+ ] : o));
154
+ }, []), u = G(() => i.init({
152
155
  clientId: e.clientId,
153
156
  userId: e.userId,
154
157
  hashedUserId: e.hashedUserId,
155
- onNewInAppNotifications: (c) => {
156
- A(c);
158
+ onNewInAppNotifications: (o) => {
159
+ S(o);
157
160
  }
158
- }), k = async (c) => {
159
- if (!c && !v || !c && h)
160
- return;
161
- u(!0);
162
- const s = await p.rest.getNotifications(
163
- c ? (/* @__PURE__ */ new Date()).toISOString() : w,
164
- c ? d.initialLoadMaxCount : 1e3
165
- );
166
- S(s.oldestReceived), b(s.couldLoadMore), A(s.notifications), u(!1);
167
- }, O = async (c) => {
161
+ }), [
162
+ e.clientId,
163
+ e.userId,
164
+ e.hashedUserId,
165
+ S
166
+ ]), P = A(
167
+ async (o, s) => {
168
+ const t = await u.rest.getNotifications(o, s);
169
+ D(t.oldestReceived), v(t.couldLoadMore), S(t.notifications);
170
+ },
171
+ [S, u.rest]
172
+ ), y = m(b), C = m(g), O = m(p);
173
+ L(() => {
174
+ y.current = b, C.current = g, O.current = p;
175
+ }, [b, g, p]);
176
+ const k = A(
177
+ async (o) => {
178
+ if (!(!o && (!y.current || C.current))) {
179
+ l(!0);
180
+ try {
181
+ await P(
182
+ o ? (/* @__PURE__ */ new Date()).toISOString() : O.current,
183
+ o ? a.initialLoadMaxCount : 1e3
184
+ );
185
+ } finally {
186
+ l(!1);
187
+ }
188
+ }
189
+ },
190
+ [a.initialLoadMaxCount, P]
191
+ ), R = async (o) => {
168
192
  if (!r)
169
193
  return;
170
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = r.filter((t) => c.includes(t.id) && !t.clicked).map((t) => t.id);
171
- p.updateInAppNotifications({ ids: i, clicked: !0 }), f((t) => {
172
- if (!t)
194
+ const s = (/* @__PURE__ */ new Date()).toISOString(), t = r.filter((n) => o.includes(n.id) && !n.clicked).map((n) => n.id);
195
+ u.updateInAppNotifications({ ids: t, clicked: !0 }), f((n) => {
196
+ if (!n)
173
197
  return [];
174
- const a = [...t];
175
- return a.filter((I) => i.includes(I.id)).forEach((I) => {
176
- I.clicked = s;
177
- }), a;
198
+ const d = [...n];
199
+ return d.filter((w) => t.includes(w.id)).forEach((w) => {
200
+ w.clicked = s;
201
+ }), d;
178
202
  });
179
- }, P = async () => {
203
+ }, $ = async () => {
180
204
  if (!r)
181
205
  return;
182
- const c = (/* @__PURE__ */ new Date()).toISOString(), s = r.filter((i) => !i.opened || !i.seen).map((i) => i.id);
183
- s.length !== 0 && (p.updateInAppNotifications({
206
+ const o = (/* @__PURE__ */ new Date()).toISOString(), s = r.filter((t) => !t.opened || !t.seen).map((t) => t.id);
207
+ s.length !== 0 && (u.updateInAppNotifications({
184
208
  ids: s,
185
209
  opened: !0
186
- }), f((i) => {
187
- if (!i)
210
+ }), f((t) => {
211
+ if (!t)
188
212
  return [];
189
- const t = [...i];
190
- return t.filter((a) => s.includes(a.id)).forEach((a) => {
191
- a.opened = c, a.seen = !0;
192
- }), t;
213
+ const n = [...t];
214
+ return n.filter((d) => s.includes(d.id)).forEach((d) => {
215
+ d.opened = o, d.seen = !0;
216
+ }), n;
193
217
  }));
194
- }, y = async (c) => {
218
+ }, E = async (o) => {
195
219
  if (!r)
196
220
  return;
197
- const s = r.filter((i) => i.archived && (c === "ALL" || c.includes(i.id))).map((i) => i.id);
198
- s.length !== 0 && (p.updateInAppNotifications({
221
+ const s = r.filter((t) => t.archived && (o === "ALL" || o.includes(t.id))).map((t) => t.id);
222
+ s.length !== 0 && (u.updateInAppNotifications({
199
223
  ids: s,
200
224
  archived: !1
201
- }), f((i) => {
202
- if (!i)
225
+ }), f((t) => {
226
+ if (!t)
203
227
  return [];
204
- const t = [...i];
205
- return t.filter((a) => s.includes(a.id)).forEach((a) => {
206
- a.archived = void 0;
207
- }), t;
228
+ const n = [...t];
229
+ return n.filter((d) => s.includes(d.id)).forEach((d) => {
230
+ d.archived = void 0;
231
+ }), n;
208
232
  }));
209
- }, C = async (c) => {
233
+ }, j = async (o) => {
210
234
  if (!r)
211
235
  return;
212
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = r.filter((t) => !t.archived && (c === "ALL" || c.includes(t.id))).map((t) => t.id);
213
- i.length !== 0 && (p.updateInAppNotifications({ ids: i, archived: !0 }), f((t) => {
214
- if (!t)
236
+ const s = (/* @__PURE__ */ new Date()).toISOString(), t = r.filter((n) => !n.archived && (o === "ALL" || o.includes(n.id))).map((n) => n.id);
237
+ t.length !== 0 && (u.updateInAppNotifications({ ids: t, archived: !0 }), f((n) => {
238
+ if (!n)
215
239
  return [];
216
- const a = [...t];
217
- return a.filter((I) => i.includes(I.id)).forEach((I) => {
218
- I.archived = s;
219
- }), a;
240
+ const d = [...n];
241
+ return d.filter((w) => t.includes(w.id)).forEach((w) => {
242
+ w.archived = s;
243
+ }), d;
220
244
  }));
221
- }, x = (c, s, i, t) => {
222
- p.updateDeliveryOption({
223
- notificationId: c,
245
+ }, T = (o, s, t, n) => x([
246
+ {
247
+ notificationId: o,
224
248
  channel: s,
225
- delivery: i,
226
- subNotificationId: t
227
- }).then(() => {
228
- p.getPreferences().then((a) => {
229
- l(a);
249
+ delivery: t,
250
+ subNotificationId: n
251
+ }
252
+ ]), x = (o) => {
253
+ u.rest.postPreferences(o).then(() => {
254
+ u.getPreferences().then((s) => {
255
+ h(s);
230
256
  });
231
257
  });
232
258
  };
233
- E(() => {
234
- f([]), u(!1), l(void 0), S((/* @__PURE__ */ new Date()).toISOString()), b(!0), k(!0), p.openWebSocket(), p.getPreferences().then((c) => {
235
- l(c);
259
+ L(() => {
260
+ f([]), l(!1), h(void 0), D((/* @__PURE__ */ new Date()).toISOString()), v(!0), k(!0), u.openWebSocket(), u.getPreferences().then((o) => {
261
+ h(o);
236
262
  });
237
- }, [e]);
238
- const L = {
263
+ }, [u, k]);
264
+ const W = {
239
265
  notifications: r,
240
- preferences: g,
266
+ preferences: I,
241
267
  loadNotifications: k,
242
- markAsOpened: P,
243
- markAsArchived: C,
244
- markAsUnarchived: y,
245
- markAsClicked: O,
246
- updateDelivery: x
268
+ markAsOpened: $,
269
+ markAsArchived: j,
270
+ markAsUnarchived: E,
271
+ markAsClicked: R,
272
+ updateDelivery: T,
273
+ updateDeliveries: x
247
274
  };
248
- return /* @__PURE__ */ M(m.Provider, { value: L, children: e.children });
249
- }, H = () => {
250
- const e = U(m);
275
+ return /* @__PURE__ */ H(U.Provider, { value: W, children: e.children });
276
+ }, q = () => {
277
+ const e = J(U);
251
278
  if (!e)
252
279
  throw new Error("useMyContext must be used within a MyProvider");
253
280
  return e;
254
281
  };
255
- W.useNotificationAPIContext = H;
282
+ F.useNotificationAPIContext = q;
256
283
  export {
257
- m as NotificationAPIContext,
258
- W as NotificationAPIProvider
284
+ U as NotificationAPIContext,
285
+ F as NotificationAPIProvider
259
286
  };
package/dist/main.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { NotificationFeed, NotificationPopup, NotificationLauncher, NotificationCounter, } from './components/Notifications';
2
- export { NotificationPreferencesInline, NotificationPreferencesPopup, } from './components/Preferences';
1
+ export { NotificationFeed, NotificationPopup, NotificationLauncher, NotificationCounter } from './components/Notifications';
2
+ export { NotificationPreferencesInline, NotificationPreferencesPopup } from './components/Preferences';
3
3
  export { NotificationAPIProvider } from './components/Provider';
package/dist/main.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { NotificationFeed as r } from "./components/Notifications/NotificationFeed.js";
2
- import { N as e } from "./assets/Inbox.js";
2
+ import { NotificationPopup as e } from "./components/Notifications/NotificationPopup.js";
3
3
  import { NotificationLauncher as n } from "./components/Notifications/NotificationLauncher.js";
4
- import { NotificationCounter as a } from "./components/Notifications/NotificationCounter.js";
5
- import { N } from "./assets/NotificationPreferencesPopup.js";
6
- import { NotificationPreferencesInline as x } from "./components/Preferences/NotificationPreferencesInline.js";
7
- import { NotificationAPIProvider as s } from "./components/Provider/index.js";
4
+ import { NotificationCounter as c } from "./components/Notifications/NotificationCounter.js";
5
+ import { NotificationPreferencesPopup as m } from "./components/Preferences/NotificationPreferencesPopup.js";
6
+ import { NotificationPreferencesInline as N } from "./components/Preferences/NotificationPreferencesInline.js";
7
+ import { NotificationAPIProvider as u } from "./components/Provider/index.js";
8
8
  export {
9
- s as NotificationAPIProvider,
10
- a as NotificationCounter,
9
+ u as NotificationAPIProvider,
10
+ c as NotificationCounter,
11
11
  r as NotificationFeed,
12
12
  n as NotificationLauncher,
13
13
  e as NotificationPopup,
14
- x as NotificationPreferencesInline,
15
- N as NotificationPreferencesPopup
14
+ N as NotificationPreferencesInline,
15
+ m as NotificationPreferencesPopup
16
16
  };
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@notificationapi/react",
3
3
  "private": false,
4
- "version": "0.0.24",
4
+ "version": "0.0.26",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
8
8
  "build": "tsc --p ./tsconfig.build.json && vite build",
9
9
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10
+ "format": "prettier --write \"{src,lib}/**/*.{ts,tsx,js,jsx,json,css,md,html}\"",
11
+ "prettier-check": "prettier --check \"{src,lib}/**/*.{ts,tsx,js,jsx,json,css,md,html}\"",
10
12
  "preview": "vite preview",
11
13
  "prepublishOnly": "npm run build"
12
14
  },
@@ -25,6 +27,7 @@
25
27
  "eslint": "^8.57.0",
26
28
  "eslint-plugin-react-hooks": "^4.6.0",
27
29
  "eslint-plugin-react-refresh": "^0.4.6",
30
+ "prettier": "^3.3.3",
28
31
  "glob": "^10.4.1",
29
32
  "typescript": "^5.2.2",
30
33
  "vite": "^5.2.0",
@@ -40,7 +43,7 @@
40
43
  "**/*.css"
41
44
  ],
42
45
  "dependencies": {
43
- "@notificationapi/core": "^0.0.7",
46
+ "@notificationapi/core": "^0.0.8",
44
47
  "antd": "^5.17.4",
45
48
  "javascript-time-ago": "^2.5.10",
46
49
  "liquidjs": "^10.14.0",