@ttt-productions/notification-core 0.15.0 → 0.15.2
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/react/components/NotificationHistoryList.d.ts +1 -1
- package/dist/react/components/NotificationHistoryList.d.ts.map +1 -1
- package/dist/react/components/NotificationHistoryList.js +6 -6
- package/dist/react/components/NotificationHistoryList.js.map +1 -1
- package/dist/react/components/NotificationList.d.ts +1 -1
- package/dist/react/components/NotificationList.d.ts.map +1 -1
- package/dist/react/components/NotificationList.js +44 -7
- package/dist/react/components/NotificationList.js.map +1 -1
- package/dist/schemas.d.ts +52 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +55 -0
- package/dist/schemas.js.map +1 -0
- package/dist/server/observed-generation.d.ts +2 -2
- package/dist/server/observed-generation.js +2 -2
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -3
- package/src/styles/notifications.css +22 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export type { NotificationDoc, PendingNotification, NotificationCategoryConfig, NotificationTypeConfig, NotificationSystemConfig, UseActiveNotificationsOptions, UseNotificationHistoryOptions, NotificationHistoryItem, UseUnreadCountOptions, UseArchiveNotificationOptions, UseArchiveAllNotificationsOptions, ArchiveAllJobStatus, EnqueueArchiveAllResult, ArchiveAllJobSnapshot, ArchiveAllPollResult, NotificationRowActions, NotificationListProps, NotificationHistoryListProps, NotificationEmptyStateProps, NotificationUnreadBadgeProps, } from './types.js';
|
|
2
|
+
export { NotificationDocSchema, PendingNotificationSchema } from './schemas.js';
|
|
2
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,EAC7B,iCAAiC,EACjC,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,EAC7B,iCAAiC,EACjC,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// Runtime schemas for the generic notification doc shapes (notification-core owns
|
|
2
|
+
// these; consuming apps compose them instead of hand-mirroring). Server- and
|
|
3
|
+
// UI-safe (zod only, no React/firebase).
|
|
4
|
+
export { NotificationDocSchema, PendingNotificationSchema } from './schemas.js';
|
|
2
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuBA,kFAAkF;AAClF,6EAA6E;AAC7E,yCAAyC;AACzC,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -5,5 +5,5 @@ import type { NotificationHistoryListProps } from '../../types.js';
|
|
|
5
5
|
* re-archive, so the row exposes no `archive` action. Any per-row control (e.g. an
|
|
6
6
|
* ArrowRight "go to") is rendered by the consumer via `renderRowAction`.
|
|
7
7
|
*/
|
|
8
|
-
export declare function NotificationHistoryList({ config, userId, category, pageSize, staleTime, emptyText, renderRowAction, }: NotificationHistoryListProps): import("react").JSX.Element;
|
|
8
|
+
export declare function NotificationHistoryList({ config, userId, category, pageSize, staleTime, emptyText, title, renderRowAction, }: NotificationHistoryListProps): import("react").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=NotificationHistoryList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationHistoryList.d.ts","sourceRoot":"","sources":["../../../src/react/components/NotificationHistoryList.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAA2B,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAE5F;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,eAAe,GAChB,EAAE,4BAA4B,+
|
|
1
|
+
{"version":3,"file":"NotificationHistoryList.d.ts","sourceRoot":"","sources":["../../../src/react/components/NotificationHistoryList.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAA2B,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAE5F;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,KAAK,EACL,eAAe,GAChB,EAAE,4BAA4B,+BA2E9B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
|
-
import { Badge, Button } from '@ttt-productions/ui-core/react';
|
|
4
|
+
import { Badge, Button, Separator } from '@ttt-productions/ui-core/react';
|
|
5
5
|
import { useNotificationHistory } from '../hooks/useNotificationHistory.js';
|
|
6
6
|
import { NotificationEmptyState } from './NotificationEmptyState.js';
|
|
7
7
|
import { formatRelativeTime } from './relative-time.js';
|
|
@@ -11,7 +11,7 @@ import { formatRelativeTime } from './relative-time.js';
|
|
|
11
11
|
* re-archive, so the row exposes no `archive` action. Any per-row control (e.g. an
|
|
12
12
|
* ArrowRight "go to") is rendered by the consumer via `renderRowAction`.
|
|
13
13
|
*/
|
|
14
|
-
export function NotificationHistoryList({ config, userId, category, pageSize, staleTime, emptyText, renderRowAction, }) {
|
|
14
|
+
export function NotificationHistoryList({ config, userId, category, pageSize, staleTime, emptyText, title, renderRowAction, }) {
|
|
15
15
|
const { data: notifications, isLoading, hasNextPage, nextPage, } = useNotificationHistory({
|
|
16
16
|
config,
|
|
17
17
|
userId,
|
|
@@ -20,8 +20,8 @@ export function NotificationHistoryList({ config, userId, category, pageSize, st
|
|
|
20
20
|
staleTime,
|
|
21
21
|
});
|
|
22
22
|
const getTypeIcon = useCallback((type) => config.types[type]?.icon ?? '🔔', [config]);
|
|
23
|
-
return (
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
return (_jsxs("div", { className: "ntf-list ntf-list-history", children: [title != null && (_jsxs(_Fragment, { children: [_jsx("div", { className: "ntf-list-header ntf-list-header-read-only", children: _jsx("div", { className: "ntf-list-title", children: title }) }), _jsx(Separator, {})] })), _jsx("div", { className: "ntf-list-body", children: isLoading ? (_jsx("div", { className: "ntf-loading", children: "Loading..." })) : !notifications || notifications.length === 0 ? (_jsx(NotificationEmptyState, { text: emptyText })) : (_jsxs(_Fragment, { children: [notifications.map((notification) => {
|
|
24
|
+
return (_jsxs("div", { className: "ntf-item ntf-item-archived", children: [_jsx("div", { className: "ntf-item-icon", children: getTypeIcon(notification.type) }), _jsxs("div", { className: "ntf-item-content", children: [_jsx("div", { className: "ntf-item-title", children: notification.title }), _jsx("div", { className: "ntf-item-message", children: notification.message }), _jsx("div", { className: "ntf-item-timestamp", children: formatRelativeTime(notification.archivedAt) })] }), notification.count > 1 && (_jsx("div", { className: "ntf-item-count", children: _jsxs(Badge, { variant: "secondary", children: ["\u00D7", notification.count] }) })), renderRowAction && (_jsx("div", { className: "ntf-item-row-action", children: renderRowAction(notification, {}) }))] }, notification.archiveOccurrenceId));
|
|
25
|
+
}), hasNextPage && (_jsx("div", { className: "ntf-list-footer", children: _jsx(Button, { variant: "ghost", size: "sm", onClick: nextPage, children: "Load more" }) }))] })) })] }));
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=NotificationHistoryList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationHistoryList.js","sourceRoot":"","sources":["../../../src/react/components/NotificationHistoryList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationHistoryList.js","sourceRoot":"","sources":["../../../src/react/components/NotificationHistoryList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EA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AgB,YAAE,YAAY,CAAC,KAAK,GAAO,EAC1D,cAAK,SAAS,EAAC,kBAAkB,YAAE,YAAY,CAAC,OAAO,GAAO,EAC9D,cAAK,SAAS,EAAC,oBAAoB,YAChC,kBAAkB,CAAC,YAAY,CAAC,UAAU,CAAC,GACxC,IACF,EACL,YAAY,CAAC,KAAK,GAAG,CAAC,IAAI,CACzB,cAAK,SAAS,EAAC,gBAAgB,YAC7B,MAAC,KAAK,IAAC,OAAO,EAAC,WAAW,uBAAG,YAAY,CAAC,KAAK,IAAS,GACpD,CACP,EACA,eAAe,IAAI,CAClB,cAAK,SAAS,EAAC,qBAAqB,YACjC,eAAe,CAAC,YAAY,EAAE,EAAE,CAAC,GAC9B,CACP,KApBI,YAAY,CAAC,mBAAmB,CAqBjC,CACP,CAAC;wBACJ,CAAC,CAAC,EACD,WAAW,IAAI,CACd,cAAK,SAAS,EAAC,iBAAiB,YAC9B,KAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,QAAQ,0BAE1C,GACL,CACP,IACA,CACJ,GACG,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -2,5 +2,5 @@ import type { NotificationListProps } from '../../types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Scrollable list of active notifications with click-to-archive and clear-all.
|
|
4
4
|
*/
|
|
5
|
-
export declare function NotificationList({ config, userId, category, archiveFn, enqueueArchiveAllFn, getArchiveAllStatusFn, onClearAll, refetchInterval, emptyText, renderRowAction, }: NotificationListProps): import("react").JSX.Element;
|
|
5
|
+
export declare function NotificationList({ config, userId, category, archiveFn, enqueueArchiveAllFn, getArchiveAllStatusFn, title, onClearAll, refetchInterval, emptyText, renderRowAction, }: NotificationListProps): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=NotificationList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationList.d.ts","sourceRoot":"","sources":["../../../src/react/components/NotificationList.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAmB,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE7E;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,qBAAqB,EACrB,UAAU,EACV,eAAe,EACf,SAAS,EACT,eAAe,GAChB,EAAE,qBAAqB,+
|
|
1
|
+
{"version":3,"file":"NotificationList.d.ts","sourceRoot":"","sources":["../../../src/react/components/NotificationList.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAmB,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE7E;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,EACL,UAAU,EACV,eAAe,EACf,SAAS,EACT,eAAe,GAChB,EAAE,qBAAqB,+BA4KvB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useState } from 'react';
|
|
3
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
4
4
|
import { Badge, Button, Separator } from '@ttt-productions/ui-core/react';
|
|
5
5
|
import { useActiveNotifications } from '../hooks/useActiveNotifications.js';
|
|
6
6
|
import { useArchiveNotification } from '../hooks/useArchiveNotification.js';
|
|
@@ -10,7 +10,7 @@ import { formatRelativeTime } from './relative-time.js';
|
|
|
10
10
|
/**
|
|
11
11
|
* Scrollable list of active notifications with click-to-archive and clear-all.
|
|
12
12
|
*/
|
|
13
|
-
export function NotificationList({ config, userId, category, archiveFn, enqueueArchiveAllFn, getArchiveAllStatusFn, onClearAll, refetchInterval, emptyText, renderRowAction, }) {
|
|
13
|
+
export function NotificationList({ config, userId, category, archiveFn, enqueueArchiveAllFn, getArchiveAllStatusFn, title, onClearAll, refetchInterval, emptyText, renderRowAction, }) {
|
|
14
14
|
const { data: notifications, isLoading, hasNextPage, nextPage, } = useActiveNotifications({
|
|
15
15
|
config,
|
|
16
16
|
userId,
|
|
@@ -34,34 +34,71 @@ export function NotificationList({ config, userId, category, archiveFn, enqueueA
|
|
|
34
34
|
// with an explicit terminal result (`complete` | `incomplete` | `failed`) and only rejects on a
|
|
35
35
|
// hard enqueue/poll throw.
|
|
36
36
|
const [clearIncomplete, setClearIncomplete] = useState(false);
|
|
37
|
+
const [pendingArchiveIds, setPendingArchiveIds] = useState(() => new Set());
|
|
38
|
+
const [pendingClearAllIds, setPendingClearAllIds] = useState(() => new Set());
|
|
39
|
+
// Successful archive requests stay visibly pending until the authoritative
|
|
40
|
+
// active-notification query removes each row. A callable response alone does
|
|
41
|
+
// not prove the listener/cache has reconciled yet.
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (!notifications)
|
|
44
|
+
return;
|
|
45
|
+
const activeIds = new Set(notifications.map((notification) => notification.id));
|
|
46
|
+
const keepActive = (current) => {
|
|
47
|
+
const next = new Set([...current].filter((id) => activeIds.has(id)));
|
|
48
|
+
return next.size === current.size ? current : next;
|
|
49
|
+
};
|
|
50
|
+
setPendingArchiveIds(keepActive);
|
|
51
|
+
setPendingClearAllIds(keepActive);
|
|
52
|
+
}, [notifications]);
|
|
53
|
+
const archiveOne = useCallback(async (notificationId) => {
|
|
54
|
+
setPendingArchiveIds((current) => {
|
|
55
|
+
const next = new Set(current);
|
|
56
|
+
next.add(notificationId);
|
|
57
|
+
return next;
|
|
58
|
+
});
|
|
59
|
+
try {
|
|
60
|
+
await archiveMutation.mutateAsync(notificationId);
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
setPendingArchiveIds((current) => {
|
|
64
|
+
const next = new Set(current);
|
|
65
|
+
next.delete(notificationId);
|
|
66
|
+
return next;
|
|
67
|
+
});
|
|
68
|
+
throw error;
|
|
69
|
+
}
|
|
70
|
+
}, [archiveMutation]);
|
|
37
71
|
const handleClearAll = useCallback(async () => {
|
|
38
72
|
setClearIncomplete(false);
|
|
73
|
+
setPendingClearAllIds(new Set((notifications ?? []).map((notification) => notification.id)));
|
|
39
74
|
let result;
|
|
40
75
|
try {
|
|
41
76
|
result = await archiveAllMutation.mutateAsync();
|
|
42
77
|
}
|
|
43
78
|
catch {
|
|
44
79
|
// Hard failure (enqueue/poll threw): do not fire onClearAll; surface the retry affordance.
|
|
80
|
+
setPendingClearAllIds(new Set());
|
|
45
81
|
setClearIncomplete(true);
|
|
46
82
|
return;
|
|
47
83
|
}
|
|
48
84
|
if (!result.complete) {
|
|
49
85
|
// Job terminated without fully draining the category (incomplete/failed) — keep the
|
|
50
86
|
// notifications and prompt a retry.
|
|
87
|
+
setPendingClearAllIds(new Set());
|
|
51
88
|
setClearIncomplete(true);
|
|
52
89
|
return;
|
|
53
90
|
}
|
|
54
91
|
onClearAll?.();
|
|
55
|
-
}, [archiveAllMutation, onClearAll]);
|
|
92
|
+
}, [archiveAllMutation, notifications, onClearAll]);
|
|
56
93
|
const getTypeIcon = useCallback((type) => {
|
|
57
94
|
const typeConfig = config.types[type];
|
|
58
95
|
return typeConfig?.icon ?? '🔔';
|
|
59
96
|
}, [config]);
|
|
60
97
|
const hasNotifications = !!notifications && notifications.length > 0;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
98
|
+
const isClearAllPending = archiveAllMutation.isPending || pendingClearAllIds.size > 0;
|
|
99
|
+
return (_jsxs("div", { className: "ntf-list", children: [_jsxs("div", { className: "ntf-list-header", children: [title != null && _jsx("div", { className: "ntf-list-title", children: title }), _jsx(Button, { className: "ntf-list-clear-all", variant: "ghost", size: "sm", onClick: handleClearAll, disabled: !hasNotifications || isClearAllPending, children: isClearAllPending ? 'Clearing...' : 'Clear All' }), clearIncomplete && !isClearAllPending && (_jsx("div", { className: "ntf-list-clear-error", role: "status", children: "Some notifications remain \u2014 try again." }))] }), _jsx(Separator, {}), _jsx("div", { className: "ntf-list-body", children: isLoading ? (_jsx("div", { className: "ntf-loading", children: "Loading..." })) : !notifications || notifications.length === 0 ? (_jsx(NotificationEmptyState, { text: emptyText })) : (_jsxs(_Fragment, { children: [notifications.map((notification) => (_jsxs("div", { className: "ntf-item", children: [_jsx("div", { className: "ntf-item-icon", children: getTypeIcon(notification.type) }), _jsxs("div", { className: "ntf-item-content", children: [_jsx("div", { className: "ntf-item-title", children: notification.title }), _jsx("div", { className: "ntf-item-message", children: notification.message }), _jsx("div", { className: "ntf-item-timestamp", children: formatRelativeTime(notification.updatedAt) })] }), notification.count > 1 && (_jsx("div", { className: "ntf-item-count", children: _jsxs(Badge, { variant: "secondary", children: ["\u00D7", notification.count] }) })), renderRowAction && (_jsx("div", { className: "ntf-item-row-action", children: renderRowAction(notification, {
|
|
100
|
+
archive: () => archiveOne(notification.id),
|
|
101
|
+
isArchivePending: pendingClearAllIds.has(notification.id) || pendingArchiveIds.has(notification.id),
|
|
65
102
|
}) }))] }, notification.id))), hasNextPage && (_jsx("div", { className: "ntf-list-footer", children: _jsx(Button, { variant: "ghost", size: "sm", onClick: nextPage, children: "Load more" }) }))] })) })] }));
|
|
66
103
|
}
|
|
67
104
|
//# sourceMappingURL=NotificationList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationList.js","sourceRoot":"","sources":["../../../src/react/components/NotificationList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationList.js","sourceRoot":"","sources":["../../../src/react/components/NotificationList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gCAA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AS,EAAC,oBAAoB,YAChC,kBAAkB,CAAC,YAAY,CAAC,SAAS,CAAC,GACvC,IACF,EACL,YAAY,CAAC,KAAK,GAAG,CAAC,IAAI,CACzB,cAAK,SAAS,EAAC,gBAAgB,YAC7B,MAAC,KAAK,IAAC,OAAO,EAAC,WAAW,uBAAG,YAAY,CAAC,KAAK,IAAS,GACpD,CACP,EACA,eAAe,IAAI,CAClB,cAAK,SAAS,EAAC,qBAAqB,YACjC,eAAe,CAAC,YAAY,EAAE;wCAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;wCAC1C,gBAAgB,EACd,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,iBAAiB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;qCACpF,CAAC,GACE,CACP,KAxBO,YAAY,CAAC,EAAE,CAyBnB,CACP,CAAC,EACD,WAAW,IAAI,CACd,cAAK,SAAS,EAAC,iBAAiB,YAC9B,KAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,QAAQ,0BAE1C,GACL,CACP,IACA,CACJ,GACK,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ttt-productions/notification-core — Zod schemas
|
|
3
|
+
*
|
|
4
|
+
* Runtime validation schemas for the generic notification document shapes whose
|
|
5
|
+
* TypeScript types live in `./types.ts`. notification-core OWNS these shapes, so
|
|
6
|
+
* it owns their schemas too — the consuming app (e.g. `@ttt-productions/ttt-core`)
|
|
7
|
+
* composes these rather than hand-mirroring them, so the schema can never drift
|
|
8
|
+
* from the type.
|
|
9
|
+
*
|
|
10
|
+
* The interfaces in `./types.ts` remain the documented public type API. Each
|
|
11
|
+
* schema is compile-time-checked against its interface via
|
|
12
|
+
* `satisfies z.ZodType<Shape>` — a shape drift between the interface and the
|
|
13
|
+
* schema fails the build here.
|
|
14
|
+
*
|
|
15
|
+
* zod-only, no React/firebase: safe for both server (Cloud Functions) and UI.
|
|
16
|
+
*/
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
/**
|
|
19
|
+
* Active notification document (`NotificationDoc`). Same shape for both the user
|
|
20
|
+
* and admin active collections.
|
|
21
|
+
*/
|
|
22
|
+
export declare const NotificationDocSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
type: z.ZodString;
|
|
25
|
+
dedupKey: z.ZodString;
|
|
26
|
+
category: z.ZodString;
|
|
27
|
+
targetUserId: z.ZodNullable<z.ZodString>;
|
|
28
|
+
title: z.ZodString;
|
|
29
|
+
message: z.ZodString;
|
|
30
|
+
count: z.ZodNumber;
|
|
31
|
+
latestActorIds: z.ZodArray<z.ZodString>;
|
|
32
|
+
targetPath: z.ZodOptional<z.ZodString>;
|
|
33
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
34
|
+
seenAt: z.ZodNumber;
|
|
35
|
+
activityGeneration: z.ZodOptional<z.ZodString>;
|
|
36
|
+
seenAtGeneration: z.ZodOptional<z.ZodString>;
|
|
37
|
+
createdAt: z.ZodNumber;
|
|
38
|
+
updatedAt: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
/**
|
|
41
|
+
* Pending notification (`PendingNotification`) — queue item for the batch processor.
|
|
42
|
+
*/
|
|
43
|
+
export declare const PendingNotificationSchema: z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
type: z.ZodString;
|
|
46
|
+
category: z.ZodString;
|
|
47
|
+
targetUserId: z.ZodNullable<z.ZodString>;
|
|
48
|
+
actorId: z.ZodString;
|
|
49
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
50
|
+
createdAt: z.ZodNumber;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;iBAoBK,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;iBAQK,CAAC"}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ttt-productions/notification-core — Zod schemas
|
|
3
|
+
*
|
|
4
|
+
* Runtime validation schemas for the generic notification document shapes whose
|
|
5
|
+
* TypeScript types live in `./types.ts`. notification-core OWNS these shapes, so
|
|
6
|
+
* it owns their schemas too — the consuming app (e.g. `@ttt-productions/ttt-core`)
|
|
7
|
+
* composes these rather than hand-mirroring them, so the schema can never drift
|
|
8
|
+
* from the type.
|
|
9
|
+
*
|
|
10
|
+
* The interfaces in `./types.ts` remain the documented public type API. Each
|
|
11
|
+
* schema is compile-time-checked against its interface via
|
|
12
|
+
* `satisfies z.ZodType<Shape>` — a shape drift between the interface and the
|
|
13
|
+
* schema fails the build here.
|
|
14
|
+
*
|
|
15
|
+
* zod-only, no React/firebase: safe for both server (Cloud Functions) and UI.
|
|
16
|
+
*/
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
/**
|
|
19
|
+
* Active notification document (`NotificationDoc`). Same shape for both the user
|
|
20
|
+
* and admin active collections.
|
|
21
|
+
*/
|
|
22
|
+
export const NotificationDocSchema = z.object({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
type: z.string(),
|
|
25
|
+
dedupKey: z.string(),
|
|
26
|
+
category: z.string(),
|
|
27
|
+
targetUserId: z.string().nullable(),
|
|
28
|
+
title: z.string(),
|
|
29
|
+
message: z.string(),
|
|
30
|
+
count: z.number(),
|
|
31
|
+
latestActorIds: z.array(z.string()),
|
|
32
|
+
// Absent on linkless types (no defaultTargetPath in the type config).
|
|
33
|
+
targetPath: z.string().optional(),
|
|
34
|
+
metadata: z.record(z.string(), z.unknown()),
|
|
35
|
+
seenAt: z.number(),
|
|
36
|
+
// Opaque per-generation token rotated on create / material re-light. Optional on
|
|
37
|
+
// the legacy active doc shape; the ledger materializer always sets it.
|
|
38
|
+
activityGeneration: z.string().optional(),
|
|
39
|
+
seenAtGeneration: z.string().optional(),
|
|
40
|
+
createdAt: z.number(),
|
|
41
|
+
updatedAt: z.number(),
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Pending notification (`PendingNotification`) — queue item for the batch processor.
|
|
45
|
+
*/
|
|
46
|
+
export const PendingNotificationSchema = z.object({
|
|
47
|
+
id: z.string(),
|
|
48
|
+
type: z.string(),
|
|
49
|
+
category: z.string(),
|
|
50
|
+
targetUserId: z.string().nullable(),
|
|
51
|
+
actorId: z.string(),
|
|
52
|
+
metadata: z.record(z.string(), z.unknown()),
|
|
53
|
+
createdAt: z.number(),
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;I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Hash`)
|
|
12
|
-
* via its own canonical hash (
|
|
13
|
-
* only the transactional state machine, not the id formulas.
|
|
12
|
+
* via its own canonical hash (in the consuming app's core package) and passes the
|
|
13
|
+
* refs in; this module owns only the transactional state machine, not the id formulas.
|
|
14
14
|
*/
|
|
15
15
|
import type { ServerFirestore, ServerDocRef, ServerTransaction } from './types.js';
|
|
16
16
|
export type MarkSeenOutcome = 'seen' | 'generation-mismatch' | 'missing';
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* replay return the stored result and touch nothing.
|
|
10
10
|
*
|
|
11
11
|
* GENERIC: the app constructs the deterministic ids (`historyRef`, `payloadHash`)
|
|
12
|
-
* via its own canonical hash (
|
|
13
|
-
* only the transactional state machine, not the id formulas.
|
|
12
|
+
* via its own canonical hash (in the consuming app's core package) and passes the
|
|
13
|
+
* refs in; this module owns only the transactional state machine, not the id formulas.
|
|
14
14
|
*/
|
|
15
15
|
/**
|
|
16
16
|
* Set `seenAt`/`seenAtGeneration` ONLY if the card's current `activityGeneration`
|
package/dist/types.d.ts
CHANGED
|
@@ -283,6 +283,8 @@ export interface UseArchiveAllNotificationsOptions {
|
|
|
283
283
|
*/
|
|
284
284
|
export interface NotificationRowActions {
|
|
285
285
|
archive?: () => Promise<void>;
|
|
286
|
+
/** True while this row is archiving, including a category-wide Clear All. */
|
|
287
|
+
isArchivePending?: boolean;
|
|
286
288
|
}
|
|
287
289
|
export interface NotificationListProps {
|
|
288
290
|
config: NotificationSystemConfig;
|
|
@@ -305,6 +307,8 @@ export interface NotificationListProps {
|
|
|
305
307
|
* it to its status callable / job-doc read.
|
|
306
308
|
*/
|
|
307
309
|
getArchiveAllStatusFn: (jobId: string) => Promise<ArchiveAllJobSnapshot>;
|
|
310
|
+
/** Left-aligned title for the active-list header. */
|
|
311
|
+
title?: ReactNode;
|
|
308
312
|
onClearAll?: () => void;
|
|
309
313
|
refetchInterval?: number;
|
|
310
314
|
emptyText?: string;
|
|
@@ -323,6 +327,8 @@ export interface NotificationHistoryListProps {
|
|
|
323
327
|
pageSize?: number;
|
|
324
328
|
staleTime?: number;
|
|
325
329
|
emptyText?: string;
|
|
330
|
+
/** Left-aligned title for the read-only archived-list header. */
|
|
331
|
+
title?: ReactNode;
|
|
326
332
|
/**
|
|
327
333
|
* Per-row control slot for archived rows. The row is inert; archived rows are
|
|
328
334
|
* read-only (no re-archive), so `actions.archive` is absent — the consumer
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IAGjB,4DAA4D;IAC5D,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAGhB,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IAGzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGlC;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,uBAAuB;IACvB,SAAS,EAAE,MAAM,CA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AAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttt-productions/notification-core",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Shared notification system for TTT Productions apps — active/history two-tier architecture with dedup, batch processing, and themed UI components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,10 +37,13 @@
|
|
|
37
37
|
"typecheck": "tsc --noEmit",
|
|
38
38
|
"prepublishOnly": "npm run build"
|
|
39
39
|
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"zod": "^4.4.3"
|
|
42
|
+
},
|
|
40
43
|
"peerDependencies": {
|
|
41
44
|
"@tanstack/react-query": ">=5.0.0",
|
|
42
45
|
"@ttt-productions/query-core": "^0.14.0",
|
|
43
|
-
"@ttt-productions/ui-core": "^0.11.
|
|
46
|
+
"@ttt-productions/ui-core": "^0.11.4",
|
|
44
47
|
"firebase": ">=12.0.0",
|
|
45
48
|
"react": ">=19.0.0",
|
|
46
49
|
"react-dom": ">=19.0.0"
|
|
@@ -68,7 +71,7 @@
|
|
|
68
71
|
"devDependencies": {
|
|
69
72
|
"@tanstack/react-query": "^5.0.0",
|
|
70
73
|
"@ttt-productions/query-core": "^0.14.0",
|
|
71
|
-
"@ttt-productions/ui-core": "^0.11.
|
|
74
|
+
"@ttt-productions/ui-core": "^0.11.4",
|
|
72
75
|
"@types/react": "^19.0.0",
|
|
73
76
|
"@types/react-dom": "^19.0.0",
|
|
74
77
|
"firebase": "^11.0.0",
|
|
@@ -21,16 +21,34 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.ntf-list-header {
|
|
24
|
-
display:
|
|
24
|
+
display: grid;
|
|
25
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
25
26
|
align-items: center;
|
|
26
|
-
|
|
27
|
+
gap: 0.25rem 0.75rem;
|
|
27
28
|
padding: 0.25rem 0.5rem;
|
|
28
29
|
border-bottom: 1px solid hsl(var(--border));
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
.ntf-list-title {
|
|
33
|
+
min-width: 0;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
text-overflow: ellipsis;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
font-size: 0.875rem;
|
|
38
|
+
font-weight: 700;
|
|
39
|
+
color: hsl(var(--foreground));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ntf-list-clear-all {
|
|
43
|
+
grid-column: 2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ntf-list-header-read-only .ntf-list-title {
|
|
47
|
+
grid-column: 1 / -1;
|
|
48
|
+
}
|
|
49
|
+
|
|
31
50
|
.ntf-list-clear-error {
|
|
32
|
-
|
|
33
|
-
margin-right: auto;
|
|
51
|
+
grid-column: 1 / -1;
|
|
34
52
|
font-size: 0.8125rem;
|
|
35
53
|
color: hsl(var(--destructive));
|
|
36
54
|
}
|