@vuetify/v0 1.0.0-alpha.2 → 1.0.0-alpha.4
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/README.md +6 -1
- package/dist/adapter-BSKx9WQ7.mjs +4 -0
- package/dist/{index-CT5SCLzW.d.mts → adapter-C6JmOyYo.d.mts} +6 -9
- package/dist/{adapter-gQ2SNKZq.mjs → adapter-C9cR4AcY.mjs} +248 -5
- package/dist/adapter-Chznb9Ju.mjs +4 -0
- package/dist/{adapter-DlX3FA3A.d.mts → adapter-Cr7Bl4la.d.mts} +3 -7
- package/dist/adapter-D8zizQVP.mjs +4 -0
- package/dist/adapter-DgBBe_BW.d.mts +17 -0
- package/dist/adapter-Dzyrlbz7.d.mts +98 -0
- package/dist/adapter-o8r-2vUn.d.mts +11 -0
- package/dist/adapters-B25KaYU4.mjs +2 -0
- package/dist/adapters-BcddLSNs.mjs +4 -0
- package/dist/adapters-D64TORDu.mjs +2 -0
- package/dist/adapters-Dv74Jk6A.mjs +5 -0
- package/dist/adapters-t6QC-zE8.mjs +3 -0
- package/dist/browser/index.js +5167 -597
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.mjs +2 -2
- package/dist/{components-CqDewYTU.mjs → components-BWxMSWr7.mjs} +3780 -417
- package/dist/composables/index.d.mts +19 -19
- package/dist/composables/index.mjs +31 -29
- package/dist/{consola-BdgyPEfx.d.mts → consola-Crr4qbeI.d.mts} +2 -2
- package/dist/{consola-Ceox8BWi.mjs → consola-DYvbPNbF.mjs} +3 -1
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +2 -2
- package/dist/{createDataTable-rXBqGglI.mjs → createDataTable-DDr2yY-A.mjs} +30 -29
- package/dist/{createGroup-BU4olYtB.mjs → createGroup-BSGtfBUE.mjs} +3 -3
- package/dist/{createRegistry-Dl-bSSTr.mjs → createRegistry-Db_juawd.mjs} +78 -41
- package/dist/{createSelection-Csaa-C8p.mjs → createSelection-BeKZMxha.mjs} +3 -3
- package/dist/{createSingle-8xbHAIpY.mjs → createSingle-Dms2efxr.mjs} +1 -1
- package/dist/{createTokens-lNg2M_P_.mjs → createTokens-B1lwHZvO.mjs} +2 -2
- package/dist/data-table/adapters/client/index.d.mts +2 -2
- package/dist/data-table/adapters/client/index.mjs +2 -2
- package/dist/data-table/adapters/index.d.mts +5 -5
- package/dist/data-table/adapters/index.mjs +6 -6
- package/dist/data-table/adapters/server/index.d.mts +2 -2
- package/dist/data-table/adapters/server/index.mjs +2 -2
- package/dist/data-table/adapters/virtual/index.d.mts +2 -2
- package/dist/data-table/adapters/virtual/index.mjs +2 -2
- package/dist/data-table/index.d.mts +6 -6
- package/dist/data-table/index.mjs +6 -6
- package/dist/date/index.d.mts +3 -3
- package/dist/date/index.mjs +11 -4
- package/dist/features/adapters/flagsmith/index.d.mts +2 -2
- package/dist/features/adapters/flagsmith/index.mjs +2 -2
- package/dist/features/adapters/launchdarkly/index.d.mts +2 -2
- package/dist/features/adapters/launchdarkly/index.mjs +2 -2
- package/dist/features/adapters/posthog/index.d.mts +2 -2
- package/dist/features/adapters/posthog/index.mjs +2 -2
- package/dist/features/index.d.mts +3 -3
- package/dist/features/index.mjs +2 -1
- package/dist/{flagsmith-Dbh1h8WF.mjs → flagsmith-Cu93hUIF.mjs} +6 -4
- package/dist/{index-BzFHTW59.d.mts → flagsmith-ygKMImos.d.mts} +4 -4
- package/dist/{globals-CKdzjeLe.mjs → globals-BAe6tA_x.mjs} +1 -1
- package/dist/{index-GOpjKzaJ.d.mts → index-B3-FstpY.d.mts} +25 -2
- package/dist/{index-BJGcVy7e.d.mts → index-BA7YU2xY.d.mts} +5 -5
- package/dist/{index-BxKMMWnQ.d.mts → index-BfpLkDR_.d.mts} +1113 -74
- package/dist/{index-DE3bWw11.d.mts → index-Cw04PFVO.d.mts} +92 -48
- package/dist/index-DewYtDsc.d.mts +4 -0
- package/dist/{index-B7cqgTBL.d.mts → index-jQPkwo3G.d.mts} +598 -363
- package/dist/index.d.mts +23 -23
- package/dist/index.mjs +35 -33
- package/dist/json/attributes.json +57 -1
- package/dist/json/importMap.json +16 -0
- package/dist/json/tags.json +29 -0
- package/dist/json/web-types.json +181 -3
- package/dist/launchdarkly-BJR4vbbV.d.mts +13 -0
- package/dist/{launchdarkly-BKtW-idu.mjs → launchdarkly-CLGtJCsI.mjs} +6 -4
- package/dist/locale/adapters/index.d.mts +3 -3
- package/dist/locale/adapters/index.mjs +4 -3
- package/dist/locale/adapters/v0/index.d.mts +2 -2
- package/dist/locale/adapters/v0/index.mjs +2 -2
- package/dist/locale/adapters/vue-i18n/index.d.mts +3 -3
- package/dist/locale/adapters/vue-i18n/index.mjs +4 -2
- package/dist/locale/index.d.mts +4 -4
- package/dist/locale/index.mjs +4 -3
- package/dist/logger/adapters/consola/index.d.mts +1 -1
- package/dist/logger/adapters/consola/index.mjs +1 -1
- package/dist/logger/adapters/index.d.mts +5 -5
- package/dist/logger/adapters/index.mjs +6 -5
- package/dist/logger/adapters/pino/index.d.mts +1 -1
- package/dist/logger/adapters/pino/index.mjs +1 -1
- package/dist/logger/adapters/v0/index.d.mts +2 -2
- package/dist/logger/adapters/v0/index.mjs +2 -2
- package/dist/logger/index.d.mts +6 -6
- package/dist/logger/index.mjs +6 -5
- package/dist/{memory-CeSQE-QV.d.mts → memory-B0w39kno.d.mts} +9 -9
- package/dist/{memory-oYBvtkgx.mjs → memory-BMpJcQjQ.mjs} +13 -3
- package/dist/notifications/index.d.mts +30 -4
- package/dist/notifications/index.mjs +187 -126
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +3 -3
- package/dist/palettes/leonardo/generate/index.mjs +5 -1
- package/dist/palettes/material/index.d.mts +1 -1
- package/dist/palettes/md1/index.d.mts +1 -1
- package/dist/palettes/md2/index.d.mts +1 -1
- package/dist/palettes/radix/index.d.mts +1 -1
- package/dist/palettes/tailwind/index.d.mts +1 -1
- package/dist/permissions/adapters/index.d.mts +2 -2
- package/dist/permissions/adapters/index.mjs +3 -3
- package/dist/permissions/adapters/v0/index.d.mts +2 -2
- package/dist/permissions/adapters/v0/index.mjs +2 -2
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +3 -3
- package/dist/{pino-9L79n6y6.mjs → pino-CIcYlW3u.mjs} +3 -1
- package/dist/{pino-DNfCEb0p.d.mts → pino-NmR7X0s4.d.mts} +2 -2
- package/dist/{posthog-DZNnPXxS.mjs → posthog-B3go2aCh.mjs} +7 -5
- package/dist/posthog-CQntUXFO.d.mts +13 -0
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/{server-3ilWFwqe.d.mts → server-DQK305lc.d.mts} +5 -5
- package/dist/{server-y7zLSCSx.mjs → server-ZFXbgQoY.mjs} +4 -3
- package/dist/storage/adapters/index.d.mts +3 -3
- package/dist/storage/adapters/index.mjs +2 -2
- package/dist/storage/adapters/memory/index.d.mts +2 -2
- package/dist/storage/adapters/memory/index.mjs +2 -2
- package/dist/storage/index.d.mts +4 -4
- package/dist/storage/index.mjs +3 -3
- package/dist/theme/adapters/index.d.mts +2 -2
- package/dist/theme/adapters/index.mjs +4 -4
- package/dist/theme/adapters/unhead/index.d.mts +1 -1
- package/dist/theme/adapters/unhead/index.mjs +1 -1
- package/dist/theme/adapters/v0/index.d.mts +1 -1
- package/dist/theme/adapters/v0/index.mjs +1 -1
- package/dist/theme/index.d.mts +1 -1
- package/dist/theme/index.mjs +3 -3
- package/dist/types/index.d.mts +1 -1
- package/dist/{unhead-DZiD-4Tx.mjs → unhead-dPyVkgiJ.mjs} +2 -2
- package/dist/{useClickOutside-CmCUD_Pf.mjs → useClickOutside-B8naChaQ.mjs} +1405 -288
- package/dist/{useFeatures-ZIvzzuEV.mjs → useFeatures-x2iKp0C8.mjs} +7 -10
- package/dist/{useLocale-DTJx3aKR.mjs → useLocale-BUms59Bw.mjs} +6 -6
- package/dist/{useLogger-BBTcMN61.mjs → useLogger-DPSSa-YR.mjs} +4 -4
- package/dist/{useNotifications-H4knpvNw.mjs → useNotifications-BPTmZWQy.mjs} +22 -11
- package/dist/{usePermissions-B_G12Dwd.mjs → usePermissions-CTi-3pBk.mjs} +6 -6
- package/dist/{useRules--7Qoo60I.mjs → useRules-DNhljkyO.mjs} +2 -2
- package/dist/{useTheme-Co05TEeD.mjs → useTheme-3vW3kFNg.mjs} +5 -5
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +27 -2
- package/dist/{v0-DrOub-e1.d.mts → v0-CRGArJim.d.mts} +4 -4
- package/dist/{v0-D0Mh3EVG.mjs → v0-CotC1PiS.mjs} +5 -3
- package/dist/{v0-Dq3zhexO.mjs → v0-DAlKpCR8.mjs} +3 -4
- package/dist/{v0-D7Fm2C3Y.d.mts → v0-DDELiSI6.d.mts} +3 -3
- package/dist/v0-DYsCJPIu.d.mts +8 -0
- package/dist/{v0-BrTEO5sv.mjs → v0-DadOcxFI.mjs} +2 -2
- package/dist/{v0-Bmow1q_x.mjs → v0-Dvu8fMl3.mjs} +3 -3
- package/dist/{v0-DeiZuexg.mjs → v0-YJQoTLsp.mjs} +6 -4
- package/dist/virtual-BqCRw0ly.d.mts +8 -0
- package/dist/{virtual-C0yHf1DC.mjs → virtual-Dnno49F8.mjs} +3 -4
- package/package.json +10 -10
- package/dist/adapter-58IvIfAZ.d.mts +0 -96
- package/dist/adapter-BvWEd9w-.d.mts +0 -17
- package/dist/adapter-Dhq68tz0.d.mts +0 -11
- package/dist/adapters-BJ5n7rgh.mjs +0 -3
- package/dist/adapters-BnKW0BF_.mjs +0 -2
- package/dist/adapters-CBrvizWb.mjs +0 -4
- package/dist/adapters-CMJGA1k7.mjs +0 -2
- package/dist/adapters-Dse4bPxk.mjs +0 -5
- package/dist/createPagination-CHF7SmmK.mjs +0 -247
- package/dist/index-1XdASTjp.d.mts +0 -13
- package/dist/index-C6rdXZ7j.d.mts +0 -11
- package/dist/index-Dp1HjBxJ.d.mts +0 -13
- package/dist/v0-CdusXjY_.d.mts +0 -8
- package/dist/virtual-D4fckewC.d.mts +0 -8
- /package/dist/{adapter-Be9zUc-n.mjs → adapter-oM18AdUc.mjs} +0 -0
- /package/dist/{htmlElements-D4oMQZPJ.mjs → htmlElements-CHXZfsZu.mjs} +0 -0
- /package/dist/{index-CFhUdAHM.d.mts → index-CKKoxA9V.d.mts} +0 -0
- /package/dist/{index-DuddF-NR.d.mts → index-CLR1QMM3.d.mts} +0 -0
- /package/dist/{index-BgCkepP_.d.mts → index-DJQwYeyx.d.mts} +0 -0
- /package/dist/{index-CROz1VSV.d.mts → index-DWfPppPU.d.mts} +0 -0
- /package/dist/{index-DTvqw22G.d.mts → index-H_hl6-4b.d.mts} +0 -0
- /package/dist/{toArray-as9BWxBK.mjs → toArray-CD2-OxAz.mjs} +0 -0
|
@@ -1,6 +1,34 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "../globals-
|
|
2
|
-
import { i as useNotifications, n as createNotificationsContext, r as createNotificationsPlugin, t as createNotifications } from "../useNotifications-
|
|
1
|
+
import { t as IN_BROWSER } from "../globals-BAe6tA_x.mjs";
|
|
2
|
+
import { i as useNotifications, n as createNotificationsContext, r as createNotificationsPlugin, t as createNotifications } from "../useNotifications-BPTmZWQy.mjs";
|
|
3
|
+
//#region src/composables/useNotifications/adapters/adapter.ts
|
|
4
|
+
var NotificationsAdapter = class {};
|
|
5
|
+
//#endregion
|
|
3
6
|
//#region src/composables/useNotifications/adapters/knock.ts
|
|
7
|
+
/**
|
|
8
|
+
* @module KnockNotificationsAdapter
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* Knock adapter for useNotifications.
|
|
12
|
+
* Bridges a Knock feed instance with the notification system.
|
|
13
|
+
*
|
|
14
|
+
* Inbound: Maps real-time feed events to ctx.send()
|
|
15
|
+
* Outbound: Listens to notification:read and notification:archived
|
|
16
|
+
* events and calls feed.markAsRead/markAsArchived
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* import Knock from '@knocklabs/client'
|
|
21
|
+
* import { KnockNotificationsAdapter } from '#v0/composables/useNotifications/adapters/knock'
|
|
22
|
+
*
|
|
23
|
+
* const knock = new Knock(KNOCK_PUBLIC_API_KEY)
|
|
24
|
+
* knock.authenticate(userId)
|
|
25
|
+
* const feed = knock.feeds.initialize(KNOCK_FEED_CHANNEL_ID)
|
|
26
|
+
*
|
|
27
|
+
* app.use(createNotificationsPlugin({
|
|
28
|
+
* adapter: new KnockNotificationsAdapter(feed),
|
|
29
|
+
* }))
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
4
32
|
function noop$1() {}
|
|
5
33
|
function mapItem$1(item) {
|
|
6
34
|
const subject = item.blocks?.find((b) => b.name === "subject")?.rendered;
|
|
@@ -12,64 +40,93 @@ function mapItem$1(item) {
|
|
|
12
40
|
data: item.data
|
|
13
41
|
};
|
|
14
42
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
feed.on("items.received.page", onPage);
|
|
45
|
-
if (IN_BROWSER) {
|
|
46
|
-
feed.listenForUpdates();
|
|
47
|
-
feed.fetch().catch(noop$1);
|
|
43
|
+
var KnockNotificationsAdapter = class extends NotificationsAdapter {
|
|
44
|
+
items = /* @__PURE__ */ new Map();
|
|
45
|
+
ctx;
|
|
46
|
+
onReceived;
|
|
47
|
+
onPage;
|
|
48
|
+
onRead;
|
|
49
|
+
onArchived;
|
|
50
|
+
constructor(feed) {
|
|
51
|
+
super();
|
|
52
|
+
this.feed = feed;
|
|
53
|
+
}
|
|
54
|
+
setup(_ctx) {
|
|
55
|
+
this.ctx = _ctx;
|
|
56
|
+
this.onReceived = (data) => {
|
|
57
|
+
const payload = data;
|
|
58
|
+
if (!payload?.items) return;
|
|
59
|
+
for (const item of payload.items) {
|
|
60
|
+
if (this.items.has(item.id)) continue;
|
|
61
|
+
this.items.set(item.id, item);
|
|
62
|
+
this.ctx.send(mapItem$1(item));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
this.onPage = (data) => {
|
|
66
|
+
const payload = data;
|
|
67
|
+
if (!payload?.items) return;
|
|
68
|
+
for (const item of payload.items) {
|
|
69
|
+
if (this.items.has(item.id)) continue;
|
|
70
|
+
this.items.set(item.id, item);
|
|
71
|
+
this.ctx.register(mapItem$1(item));
|
|
48
72
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (item) feed.markAsArchived(item).catch(noop$1);
|
|
56
|
-
};
|
|
57
|
-
ctx.on("notification:read", onRead);
|
|
58
|
-
ctx.on("notification:archived", onArchived);
|
|
59
|
-
},
|
|
60
|
-
dispose() {
|
|
61
|
-
if (!ctx) return;
|
|
62
|
-
feed.off("items.received.realtime", onReceived);
|
|
63
|
-
feed.off("items.received.page", onPage);
|
|
64
|
-
ctx.off("notification:read", onRead);
|
|
65
|
-
ctx.off("notification:archived", onArchived);
|
|
66
|
-
items.clear();
|
|
67
|
-
feed.teardown();
|
|
73
|
+
};
|
|
74
|
+
this.feed.on("items.received.realtime", this.onReceived);
|
|
75
|
+
this.feed.on("items.received.page", this.onPage);
|
|
76
|
+
if (IN_BROWSER) {
|
|
77
|
+
this.feed.listenForUpdates();
|
|
78
|
+
this.feed.fetch().catch(noop$1);
|
|
68
79
|
}
|
|
69
|
-
|
|
70
|
-
|
|
80
|
+
this.onRead = (data) => {
|
|
81
|
+
const item = this.items.get(String(data.id));
|
|
82
|
+
if (item) this.feed.markAsRead(item).catch(noop$1);
|
|
83
|
+
};
|
|
84
|
+
this.onArchived = (data) => {
|
|
85
|
+
const item = this.items.get(String(data.id));
|
|
86
|
+
if (item) this.feed.markAsArchived(item).catch(noop$1);
|
|
87
|
+
};
|
|
88
|
+
this.ctx.on("notification:read", this.onRead);
|
|
89
|
+
this.ctx.on("notification:archived", this.onArchived);
|
|
90
|
+
}
|
|
91
|
+
dispose() {
|
|
92
|
+
if (!this.ctx) return;
|
|
93
|
+
this.feed.off("items.received.realtime", this.onReceived);
|
|
94
|
+
this.feed.off("items.received.page", this.onPage);
|
|
95
|
+
this.ctx.off("notification:read", this.onRead);
|
|
96
|
+
this.ctx.off("notification:archived", this.onArchived);
|
|
97
|
+
this.items.clear();
|
|
98
|
+
this.feed.teardown();
|
|
99
|
+
}
|
|
100
|
+
};
|
|
71
101
|
//#endregion
|
|
72
102
|
//#region src/composables/useNotifications/adapters/novu.ts
|
|
103
|
+
/**
|
|
104
|
+
* @module NovuNotificationsAdapter
|
|
105
|
+
*
|
|
106
|
+
* @remarks
|
|
107
|
+
* Novu adapter for useNotifications.
|
|
108
|
+
* Bridges a Novu client instance with the notification system.
|
|
109
|
+
*
|
|
110
|
+
* Inbound: Seeds registry from novu.notifications.list() on setup,
|
|
111
|
+
* then listens to notifications.notification_received for real-time updates.
|
|
112
|
+
* Outbound: Listens to notification lifecycle events and calls the Novu API
|
|
113
|
+
* (read, unread, seen, archive, unarchive).
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* import { Novu } from '@novu/js'
|
|
118
|
+
* import { NovuNotificationsAdapter } from '@vuetify/v0/notifications'
|
|
119
|
+
*
|
|
120
|
+
* const novu = new Novu({
|
|
121
|
+
* subscriberId: userId,
|
|
122
|
+
* applicationIdentifier: import.meta.env.VITE_NOVU_APP_ID,
|
|
123
|
+
* })
|
|
124
|
+
*
|
|
125
|
+
* app.use(createNotificationsPlugin({
|
|
126
|
+
* adapter: new NovuNotificationsAdapter(novu),
|
|
127
|
+
* }))
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
73
130
|
const DEFAULT_SEVERITY_MAP = {
|
|
74
131
|
critical: "error",
|
|
75
132
|
high: "error",
|
|
@@ -89,76 +146,80 @@ function mapItem(item, resolveSeverity) {
|
|
|
89
146
|
severity: item.severity ? resolveSeverity(item.severity) : void 0
|
|
90
147
|
};
|
|
91
148
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (ids.has(id)) novu.notifications.read({ notificationId: id }).catch(noop);
|
|
125
|
-
};
|
|
126
|
-
onUnread = (data) => {
|
|
127
|
-
const id = String(data);
|
|
128
|
-
if (ids.has(id)) novu.notifications.unread({ notificationId: id }).catch(noop);
|
|
129
|
-
};
|
|
130
|
-
onSeen = (data) => {
|
|
131
|
-
const id = String(data);
|
|
132
|
-
if (ids.has(id)) novu.notifications.seenAll({ notificationIds: [id] }).catch(noop);
|
|
133
|
-
};
|
|
134
|
-
onArchived = (data) => {
|
|
135
|
-
const id = String(data);
|
|
136
|
-
if (ids.has(id)) novu.notifications.archive({ notificationId: id }).catch(noop);
|
|
137
|
-
};
|
|
138
|
-
onUnarchived = (data) => {
|
|
139
|
-
const id = String(data);
|
|
140
|
-
if (ids.has(id)) novu.notifications.unarchive({ notificationId: id }).catch(noop);
|
|
141
|
-
};
|
|
142
|
-
ctx.on("notification:read", onRead);
|
|
143
|
-
ctx.on("notification:unread", onUnread);
|
|
144
|
-
ctx.on("notification:seen", onSeen);
|
|
145
|
-
ctx.on("notification:archived", onArchived);
|
|
146
|
-
ctx.on("notification:unarchived", onUnarchived);
|
|
147
|
-
},
|
|
148
|
-
dispose() {
|
|
149
|
-
disposed = true;
|
|
150
|
-
for (const unsub of unsubscribers) unsub();
|
|
151
|
-
unsubscribers.length = 0;
|
|
152
|
-
if (ctx) {
|
|
153
|
-
if (onRead) ctx.off("notification:read", onRead);
|
|
154
|
-
if (onUnread) ctx.off("notification:unread", onUnread);
|
|
155
|
-
if (onSeen) ctx.off("notification:seen", onSeen);
|
|
156
|
-
if (onArchived) ctx.off("notification:archived", onArchived);
|
|
157
|
-
if (onUnarchived) ctx.off("notification:unarchived", onUnarchived);
|
|
149
|
+
var NovuNotificationsAdapter = class extends NotificationsAdapter {
|
|
150
|
+
resolveSeverity;
|
|
151
|
+
ids = /* @__PURE__ */ new Set();
|
|
152
|
+
ctx;
|
|
153
|
+
disposed = false;
|
|
154
|
+
unsubscribers = [];
|
|
155
|
+
onRead;
|
|
156
|
+
onUnread;
|
|
157
|
+
onSeen;
|
|
158
|
+
onArchived;
|
|
159
|
+
onUnarchived;
|
|
160
|
+
constructor(novu, options = {}) {
|
|
161
|
+
super();
|
|
162
|
+
this.novu = novu;
|
|
163
|
+
this.resolveSeverity = options.severity ?? defaultSeverity;
|
|
164
|
+
}
|
|
165
|
+
setup(_ctx) {
|
|
166
|
+
this.ctx = _ctx;
|
|
167
|
+
this.disposed = false;
|
|
168
|
+
const unsub = this.novu.on("notifications.notification_received", (data) => {
|
|
169
|
+
const item = data;
|
|
170
|
+
if (this.disposed || !item?.id || this.ids.has(item.id)) return;
|
|
171
|
+
this.ids.add(item.id);
|
|
172
|
+
this.ctx.send(mapItem(item, this.resolveSeverity));
|
|
173
|
+
});
|
|
174
|
+
this.unsubscribers.push(unsub);
|
|
175
|
+
if (IN_BROWSER) this.novu.notifications.list({ limit: 30 }).then(({ data }) => {
|
|
176
|
+
if (this.disposed) return;
|
|
177
|
+
for (const item of data?.notifications ?? []) {
|
|
178
|
+
if (!item.id || this.ids.has(item.id)) continue;
|
|
179
|
+
this.ids.add(item.id);
|
|
180
|
+
this.ctx.register(mapItem(item, this.resolveSeverity));
|
|
158
181
|
}
|
|
159
|
-
|
|
182
|
+
}).catch(noop);
|
|
183
|
+
this.onRead = (data) => {
|
|
184
|
+
const id = String(data.id);
|
|
185
|
+
if (this.ids.has(id)) this.novu.notifications.read({ notificationId: id }).catch(noop);
|
|
186
|
+
};
|
|
187
|
+
this.onUnread = (data) => {
|
|
188
|
+
const id = String(data.id);
|
|
189
|
+
if (this.ids.has(id)) this.novu.notifications.unread({ notificationId: id }).catch(noop);
|
|
190
|
+
};
|
|
191
|
+
this.onSeen = (data) => {
|
|
192
|
+
const id = String(data.id);
|
|
193
|
+
if (this.ids.has(id)) this.novu.notifications.seenAll({ notificationIds: [id] }).catch(noop);
|
|
194
|
+
};
|
|
195
|
+
this.onArchived = (data) => {
|
|
196
|
+
const id = String(data.id);
|
|
197
|
+
if (this.ids.has(id)) this.novu.notifications.archive({ notificationId: id }).catch(noop);
|
|
198
|
+
};
|
|
199
|
+
this.onUnarchived = (data) => {
|
|
200
|
+
const id = String(data.id);
|
|
201
|
+
if (this.ids.has(id)) this.novu.notifications.unarchive({ notificationId: id }).catch(noop);
|
|
202
|
+
};
|
|
203
|
+
this.ctx.on("notification:read", this.onRead);
|
|
204
|
+
this.ctx.on("notification:unread", this.onUnread);
|
|
205
|
+
this.ctx.on("notification:seen", this.onSeen);
|
|
206
|
+
this.ctx.on("notification:archived", this.onArchived);
|
|
207
|
+
this.ctx.on("notification:unarchived", this.onUnarchived);
|
|
208
|
+
}
|
|
209
|
+
dispose() {
|
|
210
|
+
this.disposed = true;
|
|
211
|
+
for (const unsub of this.unsubscribers) unsub();
|
|
212
|
+
this.unsubscribers.length = 0;
|
|
213
|
+
if (this.ctx) {
|
|
214
|
+
/* v8 ignore next 5 -- handlers always assigned during setup; guards are defensive */
|
|
215
|
+
if (this.onRead) this.ctx.off("notification:read", this.onRead);
|
|
216
|
+
if (this.onUnread) this.ctx.off("notification:unread", this.onUnread);
|
|
217
|
+
if (this.onSeen) this.ctx.off("notification:seen", this.onSeen);
|
|
218
|
+
if (this.onArchived) this.ctx.off("notification:archived", this.onArchived);
|
|
219
|
+
if (this.onUnarchived) this.ctx.off("notification:unarchived", this.onUnarchived);
|
|
160
220
|
}
|
|
161
|
-
|
|
162
|
-
}
|
|
221
|
+
this.ids.clear();
|
|
222
|
+
}
|
|
223
|
+
};
|
|
163
224
|
//#endregion
|
|
164
|
-
export {
|
|
225
|
+
export { KnockNotificationsAdapter, NotificationsAdapter, NovuNotificationsAdapter, createNotifications, createNotificationsContext, createNotificationsPlugin, useNotifications };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as ID } from "../index-
|
|
2
|
-
import { r as TokenCollection } from "../index-
|
|
3
|
-
import { f as ThemeRecord } from "../index-
|
|
1
|
+
import { a as ID } from "../index-CLR1QMM3.mjs";
|
|
2
|
+
import { r as TokenCollection } from "../index-Cw04PFVO.mjs";
|
|
3
|
+
import { f as ThemeRecord } from "../index-BfpLkDR_.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/palettes/index.d.ts
|
|
6
6
|
interface PaletteDefinition {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isArray, isObject } from "../../../utilities/index.mjs";
|
|
1
2
|
import { Color, Theme } from "@adobe/leonardo-contrast-colors";
|
|
2
3
|
//#region src/palettes/leonardo/generate/index.ts
|
|
3
4
|
const DEFAULT_RATIOS = [
|
|
@@ -12,7 +13,7 @@ const DEFAULT_RATIOS = [
|
|
|
12
13
|
const HEX_RE = /^#(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
13
14
|
function extractColors(entries) {
|
|
14
15
|
const colors = {};
|
|
15
|
-
for (const entry of entries) if (
|
|
16
|
+
for (const entry of entries) if (/* @__PURE__ */ isObject(entry) && "values" in entry && /* @__PURE__ */ isArray(entry.values)) {
|
|
16
17
|
const e = entry;
|
|
17
18
|
for (const v of e.values) colors[v.contrast] = v.value;
|
|
18
19
|
}
|
|
@@ -30,6 +31,7 @@ function mapSemanticColors(colors, ratios) {
|
|
|
30
31
|
delta = d;
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
/* v8 ignore next -- defensive fallbacks for when ratio table or colors map is empty */
|
|
33
35
|
return colors[closest] ?? Object.values(colors)[0] ?? "#000000";
|
|
34
36
|
}
|
|
35
37
|
const low1 = at(1.25);
|
|
@@ -99,6 +101,7 @@ function leonardo(seed, options = {}) {
|
|
|
99
101
|
"error-container": "#ffdad6",
|
|
100
102
|
"on-error-container": "#410002",
|
|
101
103
|
"background": "#ffffff",
|
|
104
|
+
/* v8 ignore next -- defensive fallback when lightSemantic lacks on-surface */
|
|
102
105
|
"on-background": lightSemantic["on-surface"] ?? "#000000"
|
|
103
106
|
}
|
|
104
107
|
},
|
|
@@ -111,6 +114,7 @@ function leonardo(seed, options = {}) {
|
|
|
111
114
|
"error-container": "#93000a",
|
|
112
115
|
"on-error-container": "#ffdad6",
|
|
113
116
|
"background": "#121212",
|
|
117
|
+
/* v8 ignore next -- defensive fallback when darkSemantic lacks on-surface */
|
|
114
118
|
"on-background": darkSemantic["on-surface"] ?? "#ffffff"
|
|
115
119
|
}
|
|
116
120
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Mt as
|
|
2
|
-
export {
|
|
1
|
+
import { Mt as PermissionsAdapter, jt as V0PermissionsAdapter } from "../../index-BfpLkDR_.mjs";
|
|
2
|
+
export { PermissionsAdapter, V0PermissionsAdapter };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import "../../adapters-
|
|
3
|
-
export {
|
|
1
|
+
import { n as PermissionsAdapter, t as V0PermissionsAdapter } from "../../v0-Dvu8fMl3.mjs";
|
|
2
|
+
import "../../adapters-D64TORDu.mjs";
|
|
3
|
+
export { PermissionsAdapter, V0PermissionsAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { jt as V0PermissionsAdapter } from "../../../index-BfpLkDR_.mjs";
|
|
2
|
+
export { V0PermissionsAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
export {
|
|
1
|
+
import { t as V0PermissionsAdapter } from "../../../v0-Dvu8fMl3.mjs";
|
|
2
|
+
export { V0PermissionsAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { At as
|
|
2
|
-
export {
|
|
1
|
+
import { At as usePermissions, Ct as PermissionContextOptions, Dt as createPermissions, Et as PermissionTicket, Mt as PermissionsAdapter, Ot as createPermissionsContext, St as PermissionContext, Tt as PermissionPluginOptions, kt as createPermissionsPlugin, wt as PermissionOptions } from "../index-BfpLkDR_.mjs";
|
|
2
|
+
export { PermissionContext, PermissionContextOptions, PermissionOptions, PermissionPluginOptions, PermissionTicket, PermissionsAdapter, createPermissions, createPermissionsContext, createPermissionsPlugin, usePermissions };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { i as usePermissions, n as createPermissionsContext, r as createPermissionsPlugin, t as createPermissions } from "../usePermissions-
|
|
3
|
-
export {
|
|
1
|
+
import { n as PermissionsAdapter } from "../v0-Dvu8fMl3.mjs";
|
|
2
|
+
import { i as usePermissions, n as createPermissionsContext, r as createPermissionsPlugin, t as createPermissions } from "../usePermissions-CTi-3pBk.mjs";
|
|
3
|
+
export { PermissionsAdapter, createPermissions, createPermissionsContext, createPermissionsPlugin, usePermissions };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { isObject } from "./utilities/index.mjs";
|
|
2
|
+
import { t as LoggerAdapter } from "./adapter-Chznb9Ju.mjs";
|
|
2
3
|
//#region src/composables/useLogger/adapters/pino.ts
|
|
3
|
-
var PinoLoggerAdapter = class {
|
|
4
|
+
var PinoLoggerAdapter = class extends LoggerAdapter {
|
|
4
5
|
pino;
|
|
5
6
|
constructor(pinoInstance) {
|
|
7
|
+
super();
|
|
6
8
|
if (!pinoInstance) throw new Error("Pino instance is required for PinoLoggerAdapter");
|
|
7
9
|
this.pino = pinoInstance;
|
|
8
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as LoggerAdapter } from "./adapter-
|
|
1
|
+
import { t as LoggerAdapter } from "./adapter-o8r-2vUn.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/composables/useLogger/adapters/pino.d.ts
|
|
4
4
|
/**
|
|
@@ -16,7 +16,7 @@ interface PinoInstance {
|
|
|
16
16
|
trace: (obj: Record<string, unknown>) => void;
|
|
17
17
|
fatal: (obj: Record<string, unknown>) => void;
|
|
18
18
|
}
|
|
19
|
-
declare class PinoLoggerAdapter
|
|
19
|
+
declare class PinoLoggerAdapter extends LoggerAdapter {
|
|
20
20
|
private pino;
|
|
21
21
|
constructor(pinoInstance: PinoInstance | null | undefined);
|
|
22
22
|
debug(message: string, ...args: unknown[]): void;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "./globals-
|
|
1
|
+
import { t as IN_BROWSER } from "./globals-BAe6tA_x.mjs";
|
|
2
2
|
import { isBoolean, isNullOrUndefined } from "./utilities/index.mjs";
|
|
3
|
-
|
|
3
|
+
import { t as FeaturesAdapter } from "./adapter-BSKx9WQ7.mjs";
|
|
4
|
+
//#region src/composables/useFeatures/adapters/posthog.ts
|
|
4
5
|
/**
|
|
5
|
-
* @module
|
|
6
|
+
* @module PostHogFeaturesAdapter
|
|
6
7
|
*
|
|
7
8
|
* @remarks
|
|
8
9
|
* PostHog adapter for feature flags.
|
|
9
10
|
*/
|
|
10
|
-
var
|
|
11
|
+
var PostHogFeaturesAdapter = class extends FeaturesAdapter {
|
|
11
12
|
constructor(client) {
|
|
13
|
+
super();
|
|
12
14
|
this.client = client;
|
|
13
15
|
}
|
|
14
16
|
setup(onUpdate) {
|
|
@@ -42,4 +44,4 @@ var PostHogFeatureAdapter = class {
|
|
|
42
44
|
disposeFn = () => {};
|
|
43
45
|
};
|
|
44
46
|
//#endregion
|
|
45
|
-
export {
|
|
47
|
+
export { PostHogFeaturesAdapter as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { n as FeaturesAdapterFlags, t as FeaturesAdapter } from "./adapter-C6JmOyYo.mjs";
|
|
2
|
+
import { PostHog } from "posthog-js";
|
|
3
|
+
|
|
4
|
+
//#region src/composables/useFeatures/adapters/posthog.d.ts
|
|
5
|
+
declare class PostHogFeaturesAdapter extends FeaturesAdapter {
|
|
6
|
+
private client;
|
|
7
|
+
constructor(client: PostHog);
|
|
8
|
+
setup(onUpdate: (flags: FeaturesAdapterFlags) => void): FeaturesAdapterFlags;
|
|
9
|
+
dispose(): void;
|
|
10
|
+
private disposeFn;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { PostHogFeaturesAdapter as t };
|
package/dist/rules/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $a as RulesContextOptions, Qa as RulesContext, Xa as RuleAliases, Ya as RuleAlias, Za as RuleInput, ao as useRules, eo as RulesOptions, io as createRulesPlugin, no as createRulesContext, oo as StandardSchemaV1, ro as createRulesFallback, so as isStandardSchema, to as createRules, za as FormValidationRule } from "../index-BfpLkDR_.mjs";
|
|
2
2
|
export { FormValidationRule, RuleAlias, RuleAliases, RuleInput, RulesContext, RulesContextOptions, RulesOptions, StandardSchemaV1, createRules, createRulesContext, createRulesFallback, createRulesPlugin, isStandardSchema, useRules };
|
package/dist/rules/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useRules, i as createRulesPlugin, n as createRulesContext, o as isStandardSchema, r as createRulesFallback, t as createRules } from "../useRules
|
|
1
|
+
import { a as useRules, i as createRulesPlugin, n as createRulesContext, o as isStandardSchema, r as createRulesFallback, t as createRules } from "../useRules-DNhljkyO.mjs";
|
|
2
2
|
export { createRules, createRulesContext, createRulesFallback, createRulesPlugin, isStandardSchema, useRules };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "./adapter-Cr7Bl4la.mjs";
|
|
2
2
|
import { MaybeRefOrGetter } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/composables/createDataTable/adapters/server.d.ts
|
|
5
|
-
interface
|
|
5
|
+
interface ServerDataTableAdapterOptions {
|
|
6
6
|
/** Total number of items on the server (for pagination calculation) */
|
|
7
7
|
total: MaybeRefOrGetter<number>;
|
|
8
8
|
/** Loading state (e.g., from useFetch) */
|
|
@@ -10,10 +10,10 @@ interface ServerAdapterOptions {
|
|
|
10
10
|
/** Error state from API */
|
|
11
11
|
error?: MaybeRefOrGetter<Error | null>;
|
|
12
12
|
}
|
|
13
|
-
declare class
|
|
13
|
+
declare class ServerDataTableAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
|
|
14
14
|
private options;
|
|
15
|
-
constructor(options:
|
|
15
|
+
constructor(options: ServerDataTableAdapterOptions);
|
|
16
16
|
setup(context: DataTableAdapterContext<T>): DataTableAdapterResult<T>;
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
|
-
export {
|
|
19
|
+
export { ServerDataTableAdapterOptions as n, ServerDataTableAdapter as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as createPagination, t as DataTableAdapter } from "./adapter-C9cR4AcY.mjs";
|
|
2
2
|
import { toRef, toValue, watch } from "vue";
|
|
3
3
|
//#region src/composables/createDataTable/adapters/server.ts
|
|
4
4
|
/**
|
|
@@ -12,9 +12,10 @@ import { toRef, toValue, watch } from "vue";
|
|
|
12
12
|
* The consumer is responsible for watching `search`, `sortBy`, and
|
|
13
13
|
* `pagination.page` to trigger API calls and update the `items` ref.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
15
|
+
var ServerDataTableAdapter = class extends DataTableAdapter {
|
|
16
16
|
options;
|
|
17
17
|
constructor(options) {
|
|
18
|
+
super();
|
|
18
19
|
this.options = options;
|
|
19
20
|
}
|
|
20
21
|
setup(context) {
|
|
@@ -40,4 +41,4 @@ var ServerAdapter = class {
|
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
43
|
//#endregion
|
|
43
|
-
export {
|
|
44
|
+
export { ServerDataTableAdapter as t };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
import { n as StorageAdapter, t as MemoryStorageAdapter } from "../../memory-B0w39kno.mjs";
|
|
2
|
+
import { t as StorageType } from "../../index-DewYtDsc.mjs";
|
|
3
|
+
export { MemoryStorageAdapter, StorageAdapter, StorageType };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
export {
|
|
1
|
+
import { n as StorageAdapter, t as MemoryStorageAdapter } from "../../memory-BMpJcQjQ.mjs";
|
|
2
|
+
export { MemoryStorageAdapter, StorageAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
export {
|
|
1
|
+
import { t as MemoryStorageAdapter } from "../../../memory-B0w39kno.mjs";
|
|
2
|
+
export { MemoryStorageAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
export {
|
|
1
|
+
import { t as MemoryStorageAdapter } from "../../../memory-BMpJcQjQ.mjs";
|
|
2
|
+
export { MemoryStorageAdapter };
|