@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.
Files changed (171) hide show
  1. package/README.md +6 -1
  2. package/dist/adapter-BSKx9WQ7.mjs +4 -0
  3. package/dist/{index-CT5SCLzW.d.mts → adapter-C6JmOyYo.d.mts} +6 -9
  4. package/dist/{adapter-gQ2SNKZq.mjs → adapter-C9cR4AcY.mjs} +248 -5
  5. package/dist/adapter-Chznb9Ju.mjs +4 -0
  6. package/dist/{adapter-DlX3FA3A.d.mts → adapter-Cr7Bl4la.d.mts} +3 -7
  7. package/dist/adapter-D8zizQVP.mjs +4 -0
  8. package/dist/adapter-DgBBe_BW.d.mts +17 -0
  9. package/dist/adapter-Dzyrlbz7.d.mts +98 -0
  10. package/dist/adapter-o8r-2vUn.d.mts +11 -0
  11. package/dist/adapters-B25KaYU4.mjs +2 -0
  12. package/dist/adapters-BcddLSNs.mjs +4 -0
  13. package/dist/adapters-D64TORDu.mjs +2 -0
  14. package/dist/adapters-Dv74Jk6A.mjs +5 -0
  15. package/dist/adapters-t6QC-zE8.mjs +3 -0
  16. package/dist/browser/index.js +5167 -597
  17. package/dist/components/index.d.mts +3 -3
  18. package/dist/components/index.mjs +2 -2
  19. package/dist/{components-CqDewYTU.mjs → components-BWxMSWr7.mjs} +3780 -417
  20. package/dist/composables/index.d.mts +19 -19
  21. package/dist/composables/index.mjs +31 -29
  22. package/dist/{consola-BdgyPEfx.d.mts → consola-Crr4qbeI.d.mts} +2 -2
  23. package/dist/{consola-Ceox8BWi.mjs → consola-DYvbPNbF.mjs} +3 -1
  24. package/dist/constants/index.d.mts +1 -1
  25. package/dist/constants/index.mjs +2 -2
  26. package/dist/{createDataTable-rXBqGglI.mjs → createDataTable-DDr2yY-A.mjs} +30 -29
  27. package/dist/{createGroup-BU4olYtB.mjs → createGroup-BSGtfBUE.mjs} +3 -3
  28. package/dist/{createRegistry-Dl-bSSTr.mjs → createRegistry-Db_juawd.mjs} +78 -41
  29. package/dist/{createSelection-Csaa-C8p.mjs → createSelection-BeKZMxha.mjs} +3 -3
  30. package/dist/{createSingle-8xbHAIpY.mjs → createSingle-Dms2efxr.mjs} +1 -1
  31. package/dist/{createTokens-lNg2M_P_.mjs → createTokens-B1lwHZvO.mjs} +2 -2
  32. package/dist/data-table/adapters/client/index.d.mts +2 -2
  33. package/dist/data-table/adapters/client/index.mjs +2 -2
  34. package/dist/data-table/adapters/index.d.mts +5 -5
  35. package/dist/data-table/adapters/index.mjs +6 -6
  36. package/dist/data-table/adapters/server/index.d.mts +2 -2
  37. package/dist/data-table/adapters/server/index.mjs +2 -2
  38. package/dist/data-table/adapters/virtual/index.d.mts +2 -2
  39. package/dist/data-table/adapters/virtual/index.mjs +2 -2
  40. package/dist/data-table/index.d.mts +6 -6
  41. package/dist/data-table/index.mjs +6 -6
  42. package/dist/date/index.d.mts +3 -3
  43. package/dist/date/index.mjs +11 -4
  44. package/dist/features/adapters/flagsmith/index.d.mts +2 -2
  45. package/dist/features/adapters/flagsmith/index.mjs +2 -2
  46. package/dist/features/adapters/launchdarkly/index.d.mts +2 -2
  47. package/dist/features/adapters/launchdarkly/index.mjs +2 -2
  48. package/dist/features/adapters/posthog/index.d.mts +2 -2
  49. package/dist/features/adapters/posthog/index.mjs +2 -2
  50. package/dist/features/index.d.mts +3 -3
  51. package/dist/features/index.mjs +2 -1
  52. package/dist/{flagsmith-Dbh1h8WF.mjs → flagsmith-Cu93hUIF.mjs} +6 -4
  53. package/dist/{index-BzFHTW59.d.mts → flagsmith-ygKMImos.d.mts} +4 -4
  54. package/dist/{globals-CKdzjeLe.mjs → globals-BAe6tA_x.mjs} +1 -1
  55. package/dist/{index-GOpjKzaJ.d.mts → index-B3-FstpY.d.mts} +25 -2
  56. package/dist/{index-BJGcVy7e.d.mts → index-BA7YU2xY.d.mts} +5 -5
  57. package/dist/{index-BxKMMWnQ.d.mts → index-BfpLkDR_.d.mts} +1113 -74
  58. package/dist/{index-DE3bWw11.d.mts → index-Cw04PFVO.d.mts} +92 -48
  59. package/dist/index-DewYtDsc.d.mts +4 -0
  60. package/dist/{index-B7cqgTBL.d.mts → index-jQPkwo3G.d.mts} +598 -363
  61. package/dist/index.d.mts +23 -23
  62. package/dist/index.mjs +35 -33
  63. package/dist/json/attributes.json +57 -1
  64. package/dist/json/importMap.json +16 -0
  65. package/dist/json/tags.json +29 -0
  66. package/dist/json/web-types.json +181 -3
  67. package/dist/launchdarkly-BJR4vbbV.d.mts +13 -0
  68. package/dist/{launchdarkly-BKtW-idu.mjs → launchdarkly-CLGtJCsI.mjs} +6 -4
  69. package/dist/locale/adapters/index.d.mts +3 -3
  70. package/dist/locale/adapters/index.mjs +4 -3
  71. package/dist/locale/adapters/v0/index.d.mts +2 -2
  72. package/dist/locale/adapters/v0/index.mjs +2 -2
  73. package/dist/locale/adapters/vue-i18n/index.d.mts +3 -3
  74. package/dist/locale/adapters/vue-i18n/index.mjs +4 -2
  75. package/dist/locale/index.d.mts +4 -4
  76. package/dist/locale/index.mjs +4 -3
  77. package/dist/logger/adapters/consola/index.d.mts +1 -1
  78. package/dist/logger/adapters/consola/index.mjs +1 -1
  79. package/dist/logger/adapters/index.d.mts +5 -5
  80. package/dist/logger/adapters/index.mjs +6 -5
  81. package/dist/logger/adapters/pino/index.d.mts +1 -1
  82. package/dist/logger/adapters/pino/index.mjs +1 -1
  83. package/dist/logger/adapters/v0/index.d.mts +2 -2
  84. package/dist/logger/adapters/v0/index.mjs +2 -2
  85. package/dist/logger/index.d.mts +6 -6
  86. package/dist/logger/index.mjs +6 -5
  87. package/dist/{memory-CeSQE-QV.d.mts → memory-B0w39kno.d.mts} +9 -9
  88. package/dist/{memory-oYBvtkgx.mjs → memory-BMpJcQjQ.mjs} +13 -3
  89. package/dist/notifications/index.d.mts +30 -4
  90. package/dist/notifications/index.mjs +187 -126
  91. package/dist/palettes/ant/index.d.mts +1 -1
  92. package/dist/palettes/index.d.mts +3 -3
  93. package/dist/palettes/leonardo/generate/index.mjs +5 -1
  94. package/dist/palettes/material/index.d.mts +1 -1
  95. package/dist/palettes/md1/index.d.mts +1 -1
  96. package/dist/palettes/md2/index.d.mts +1 -1
  97. package/dist/palettes/radix/index.d.mts +1 -1
  98. package/dist/palettes/tailwind/index.d.mts +1 -1
  99. package/dist/permissions/adapters/index.d.mts +2 -2
  100. package/dist/permissions/adapters/index.mjs +3 -3
  101. package/dist/permissions/adapters/v0/index.d.mts +2 -2
  102. package/dist/permissions/adapters/v0/index.mjs +2 -2
  103. package/dist/permissions/index.d.mts +2 -2
  104. package/dist/permissions/index.mjs +3 -3
  105. package/dist/{pino-9L79n6y6.mjs → pino-CIcYlW3u.mjs} +3 -1
  106. package/dist/{pino-DNfCEb0p.d.mts → pino-NmR7X0s4.d.mts} +2 -2
  107. package/dist/{posthog-DZNnPXxS.mjs → posthog-B3go2aCh.mjs} +7 -5
  108. package/dist/posthog-CQntUXFO.d.mts +13 -0
  109. package/dist/rules/index.d.mts +1 -1
  110. package/dist/rules/index.mjs +1 -1
  111. package/dist/{server-3ilWFwqe.d.mts → server-DQK305lc.d.mts} +5 -5
  112. package/dist/{server-y7zLSCSx.mjs → server-ZFXbgQoY.mjs} +4 -3
  113. package/dist/storage/adapters/index.d.mts +3 -3
  114. package/dist/storage/adapters/index.mjs +2 -2
  115. package/dist/storage/adapters/memory/index.d.mts +2 -2
  116. package/dist/storage/adapters/memory/index.mjs +2 -2
  117. package/dist/storage/index.d.mts +4 -4
  118. package/dist/storage/index.mjs +3 -3
  119. package/dist/theme/adapters/index.d.mts +2 -2
  120. package/dist/theme/adapters/index.mjs +4 -4
  121. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  122. package/dist/theme/adapters/unhead/index.mjs +1 -1
  123. package/dist/theme/adapters/v0/index.d.mts +1 -1
  124. package/dist/theme/adapters/v0/index.mjs +1 -1
  125. package/dist/theme/index.d.mts +1 -1
  126. package/dist/theme/index.mjs +3 -3
  127. package/dist/types/index.d.mts +1 -1
  128. package/dist/{unhead-DZiD-4Tx.mjs → unhead-dPyVkgiJ.mjs} +2 -2
  129. package/dist/{useClickOutside-CmCUD_Pf.mjs → useClickOutside-B8naChaQ.mjs} +1405 -288
  130. package/dist/{useFeatures-ZIvzzuEV.mjs → useFeatures-x2iKp0C8.mjs} +7 -10
  131. package/dist/{useLocale-DTJx3aKR.mjs → useLocale-BUms59Bw.mjs} +6 -6
  132. package/dist/{useLogger-BBTcMN61.mjs → useLogger-DPSSa-YR.mjs} +4 -4
  133. package/dist/{useNotifications-H4knpvNw.mjs → useNotifications-BPTmZWQy.mjs} +22 -11
  134. package/dist/{usePermissions-B_G12Dwd.mjs → usePermissions-CTi-3pBk.mjs} +6 -6
  135. package/dist/{useRules--7Qoo60I.mjs → useRules-DNhljkyO.mjs} +2 -2
  136. package/dist/{useTheme-Co05TEeD.mjs → useTheme-3vW3kFNg.mjs} +5 -5
  137. package/dist/utilities/index.d.mts +2 -2
  138. package/dist/utilities/index.mjs +27 -2
  139. package/dist/{v0-DrOub-e1.d.mts → v0-CRGArJim.d.mts} +4 -4
  140. package/dist/{v0-D0Mh3EVG.mjs → v0-CotC1PiS.mjs} +5 -3
  141. package/dist/{v0-Dq3zhexO.mjs → v0-DAlKpCR8.mjs} +3 -4
  142. package/dist/{v0-D7Fm2C3Y.d.mts → v0-DDELiSI6.d.mts} +3 -3
  143. package/dist/v0-DYsCJPIu.d.mts +8 -0
  144. package/dist/{v0-BrTEO5sv.mjs → v0-DadOcxFI.mjs} +2 -2
  145. package/dist/{v0-Bmow1q_x.mjs → v0-Dvu8fMl3.mjs} +3 -3
  146. package/dist/{v0-DeiZuexg.mjs → v0-YJQoTLsp.mjs} +6 -4
  147. package/dist/virtual-BqCRw0ly.d.mts +8 -0
  148. package/dist/{virtual-C0yHf1DC.mjs → virtual-Dnno49F8.mjs} +3 -4
  149. package/package.json +10 -10
  150. package/dist/adapter-58IvIfAZ.d.mts +0 -96
  151. package/dist/adapter-BvWEd9w-.d.mts +0 -17
  152. package/dist/adapter-Dhq68tz0.d.mts +0 -11
  153. package/dist/adapters-BJ5n7rgh.mjs +0 -3
  154. package/dist/adapters-BnKW0BF_.mjs +0 -2
  155. package/dist/adapters-CBrvizWb.mjs +0 -4
  156. package/dist/adapters-CMJGA1k7.mjs +0 -2
  157. package/dist/adapters-Dse4bPxk.mjs +0 -5
  158. package/dist/createPagination-CHF7SmmK.mjs +0 -247
  159. package/dist/index-1XdASTjp.d.mts +0 -13
  160. package/dist/index-C6rdXZ7j.d.mts +0 -11
  161. package/dist/index-Dp1HjBxJ.d.mts +0 -13
  162. package/dist/v0-CdusXjY_.d.mts +0 -8
  163. package/dist/virtual-D4fckewC.d.mts +0 -8
  164. /package/dist/{adapter-Be9zUc-n.mjs → adapter-oM18AdUc.mjs} +0 -0
  165. /package/dist/{htmlElements-D4oMQZPJ.mjs → htmlElements-CHXZfsZu.mjs} +0 -0
  166. /package/dist/{index-CFhUdAHM.d.mts → index-CKKoxA9V.d.mts} +0 -0
  167. /package/dist/{index-DuddF-NR.d.mts → index-CLR1QMM3.d.mts} +0 -0
  168. /package/dist/{index-BgCkepP_.d.mts → index-DJQwYeyx.d.mts} +0 -0
  169. /package/dist/{index-CROz1VSV.d.mts → index-DWfPppPU.d.mts} +0 -0
  170. /package/dist/{index-DTvqw22G.d.mts → index-H_hl6-4b.d.mts} +0 -0
  171. /package/dist/{toArray-as9BWxBK.mjs → toArray-CD2-OxAz.mjs} +0 -0
@@ -1,6 +1,34 @@
1
- import { t as IN_BROWSER } from "../globals-CKdzjeLe.mjs";
2
- import { i as useNotifications, n as createNotificationsContext, r as createNotificationsPlugin, t as createNotifications } from "../useNotifications-H4knpvNw.mjs";
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
- function createKnockAdapter(feed) {
16
- const items = /* @__PURE__ */ new Map();
17
- let ctx;
18
- let onReceived;
19
- let onPage;
20
- let onRead;
21
- let onArchived;
22
- return {
23
- setup(_ctx) {
24
- ctx = _ctx;
25
- onReceived = (data) => {
26
- const payload = data;
27
- if (!payload?.items) return;
28
- for (const item of payload.items) {
29
- if (items.has(item.id)) continue;
30
- items.set(item.id, item);
31
- ctx.send(mapItem$1(item));
32
- }
33
- };
34
- onPage = (data) => {
35
- const payload = data;
36
- if (!payload?.items) return;
37
- for (const item of payload.items) {
38
- if (items.has(item.id)) continue;
39
- items.set(item.id, item);
40
- ctx.register(mapItem$1(item));
41
- }
42
- };
43
- feed.on("items.received.realtime", onReceived);
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
- onRead = (data) => {
50
- const item = items.get(String(data));
51
- if (item) feed.markAsRead(item).catch(noop$1);
52
- };
53
- onArchived = (data) => {
54
- const item = items.get(String(data));
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
- function createNovuAdapter(novu, options = {}) {
93
- const resolveSeverity = options.severity ?? defaultSeverity;
94
- const ids = /* @__PURE__ */ new Set();
95
- let ctx;
96
- let disposed = false;
97
- const unsubscribers = [];
98
- let onRead;
99
- let onUnread;
100
- let onSeen;
101
- let onArchived;
102
- let onUnarchived;
103
- return {
104
- setup(_ctx) {
105
- ctx = _ctx;
106
- disposed = false;
107
- const unsub = novu.on("notifications.notification_received", (data) => {
108
- const item = data;
109
- if (disposed || !item?.id || ids.has(item.id)) return;
110
- ids.add(item.id);
111
- ctx.send(mapItem(item, resolveSeverity));
112
- });
113
- unsubscribers.push(unsub);
114
- if (IN_BROWSER) novu.notifications.list({ limit: 30 }).then(({ data }) => {
115
- if (disposed) return;
116
- for (const item of data?.notifications ?? []) {
117
- if (!item.id || ids.has(item.id)) continue;
118
- ids.add(item.id);
119
- ctx.register(mapItem(item, resolveSeverity));
120
- }
121
- }).catch(noop);
122
- onRead = (data) => {
123
- const id = String(data);
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
- ids.clear();
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 { createKnockAdapter, createNotifications, createNotificationsContext, createNotificationsPlugin, createNovuAdapter, useNotifications };
225
+ export { KnockNotificationsAdapter, NotificationsAdapter, NovuNotificationsAdapter, createNotifications, createNotificationsContext, createNotificationsPlugin, useNotifications };
@@ -1,4 +1,4 @@
1
- import { r as TokenCollection } from "../../index-DE3bWw11.mjs";
1
+ import { r as TokenCollection } from "../../index-Cw04PFVO.mjs";
2
2
 
3
3
  //#region src/palettes/ant/index.d.ts
4
4
  declare const ant: TokenCollection;
@@ -1,6 +1,6 @@
1
- import { a as ID } from "../index-DuddF-NR.mjs";
2
- import { r as TokenCollection } from "../index-DE3bWw11.mjs";
3
- import { f as ThemeRecord } from "../index-BxKMMWnQ.mjs";
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 (entry && typeof entry === "object" && "values" in entry) {
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,4 +1,4 @@
1
- import { r as TokenCollection } from "../../index-DE3bWw11.mjs";
1
+ import { r as TokenCollection } from "../../index-Cw04PFVO.mjs";
2
2
 
3
3
  //#region src/palettes/material/index.d.ts
4
4
  declare const material: TokenCollection;
@@ -1,4 +1,4 @@
1
- import { r as TokenCollection } from "../../index-DE3bWw11.mjs";
1
+ import { r as TokenCollection } from "../../index-Cw04PFVO.mjs";
2
2
 
3
3
  //#region src/palettes/md1/index.d.ts
4
4
  declare const md1: TokenCollection;
@@ -1,4 +1,4 @@
1
- import { r as TokenCollection } from "../../index-DE3bWw11.mjs";
1
+ import { r as TokenCollection } from "../../index-Cw04PFVO.mjs";
2
2
 
3
3
  //#region src/palettes/md2/index.d.ts
4
4
  declare const md2: TokenCollection;
@@ -1,4 +1,4 @@
1
- import { r as TokenCollection } from "../../index-DE3bWw11.mjs";
1
+ import { r as TokenCollection } from "../../index-Cw04PFVO.mjs";
2
2
 
3
3
  //#region src/palettes/radix/index.d.ts
4
4
  declare const radix: TokenCollection;
@@ -1,4 +1,4 @@
1
- import { r as TokenCollection } from "../../index-DE3bWw11.mjs";
1
+ import { r as TokenCollection } from "../../index-Cw04PFVO.mjs";
2
2
 
3
3
  //#region src/palettes/tailwind/index.d.ts
4
4
  declare const tailwind: TokenCollection;
@@ -1,2 +1,2 @@
1
- import { Mt as Vuetify0PermissionAdapter, Nt as PermissionAdapter, Pt as PermissionAdapterInterface } from "../../index-BxKMMWnQ.mjs";
2
- export { PermissionAdapter, PermissionAdapterInterface, Vuetify0PermissionAdapter };
1
+ import { Mt as PermissionsAdapter, jt as V0PermissionsAdapter } from "../../index-BfpLkDR_.mjs";
2
+ export { PermissionsAdapter, V0PermissionsAdapter };
@@ -1,3 +1,3 @@
1
- import { n as PermissionAdapter, t as Vuetify0PermissionAdapter } from "../../v0-Bmow1q_x.mjs";
2
- import "../../adapters-CMJGA1k7.mjs";
3
- export { PermissionAdapter, Vuetify0PermissionAdapter };
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 { Mt as Vuetify0PermissionAdapter } from "../../../index-BxKMMWnQ.mjs";
2
- export { Vuetify0PermissionAdapter };
1
+ import { jt as V0PermissionsAdapter } from "../../../index-BfpLkDR_.mjs";
2
+ export { V0PermissionsAdapter };
@@ -1,2 +1,2 @@
1
- import { t as Vuetify0PermissionAdapter } from "../../../v0-Bmow1q_x.mjs";
2
- export { Vuetify0PermissionAdapter };
1
+ import { t as V0PermissionsAdapter } from "../../../v0-Dvu8fMl3.mjs";
2
+ export { V0PermissionsAdapter };
@@ -1,2 +1,2 @@
1
- import { At as createPermissionsPlugin, Ct as PermissionContext, Dt as PermissionTicket, Et as PermissionPluginOptions, Nt as PermissionAdapter, Ot as createPermissions, Pt as PermissionAdapterInterface, Tt as PermissionOptions, jt as usePermissions, kt as createPermissionsContext, wt as PermissionContextOptions } from "../index-BxKMMWnQ.mjs";
2
- export { PermissionAdapter, PermissionAdapterInterface, PermissionContext, PermissionContextOptions, PermissionOptions, PermissionPluginOptions, PermissionTicket, createPermissions, createPermissionsContext, createPermissionsPlugin, usePermissions };
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 PermissionAdapter } from "../v0-Bmow1q_x.mjs";
2
- import { i as usePermissions, n as createPermissionsContext, r as createPermissionsPlugin, t as createPermissions } from "../usePermissions-B_G12Dwd.mjs";
3
- export { PermissionAdapter, createPermissions, createPermissionsContext, createPermissionsPlugin, usePermissions };
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-Dhq68tz0.mjs";
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 implements LoggerAdapter {
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-CKdzjeLe.mjs";
1
+ import { t as IN_BROWSER } from "./globals-BAe6tA_x.mjs";
2
2
  import { isBoolean, isNullOrUndefined } from "./utilities/index.mjs";
3
- //#region src/composables/useFeatures/adapters/posthog/index.ts
3
+ import { t as FeaturesAdapter } from "./adapter-BSKx9WQ7.mjs";
4
+ //#region src/composables/useFeatures/adapters/posthog.ts
4
5
  /**
5
- * @module PostHogFeatureAdapter
6
+ * @module PostHogFeaturesAdapter
6
7
  *
7
8
  * @remarks
8
9
  * PostHog adapter for feature flags.
9
10
  */
10
- var PostHogFeatureAdapter = class {
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 { PostHogFeatureAdapter as t };
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 };
@@ -1,2 +1,2 @@
1
- import { Sa as isStandardSchema, _a as createRulesContext, ba as useRules, da as RuleAliases, ea as FormValidationRule, fa as RuleInput, ga as createRules, ha as RulesOptions, ma as RulesContextOptions, pa as RulesContext, ua as RuleAlias, va as createRulesFallback, xa as StandardSchemaV1, ya as createRulesPlugin } from "../index-BxKMMWnQ.mjs";
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 };
@@ -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--7Qoo60I.mjs";
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 { i as DataTableAdapterResult, n as DataTableAdapterContext, r as DataTableAdapterInterface } from "./adapter-DlX3FA3A.mjs";
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 ServerAdapterOptions {
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 ServerAdapter<T extends Record<string, unknown>> implements DataTableAdapterInterface<T> {
13
+ declare class ServerDataTableAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
14
14
  private options;
15
- constructor(options: ServerAdapterOptions);
15
+ constructor(options: ServerDataTableAdapterOptions);
16
16
  setup(context: DataTableAdapterContext<T>): DataTableAdapterResult<T>;
17
17
  }
18
18
  //#endregion
19
- export { ServerAdapterOptions as n, ServerAdapter as t };
19
+ export { ServerDataTableAdapterOptions as n, ServerDataTableAdapter as t };
@@ -1,4 +1,4 @@
1
- import { t as createPagination } from "./createPagination-CHF7SmmK.mjs";
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 ServerAdapter = class {
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 { ServerAdapter as t };
44
+ export { ServerDataTableAdapter as t };
@@ -1,3 +1,3 @@
1
- import { t as MemoryAdapter } from "../../memory-CeSQE-QV.mjs";
2
- import { n as StorageType, t as StorageAdapter } from "../../index-C6rdXZ7j.mjs";
3
- export { MemoryAdapter, StorageAdapter, StorageType };
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 MemoryAdapter } from "../../memory-oYBvtkgx.mjs";
2
- export { MemoryAdapter };
1
+ import { n as StorageAdapter, t as MemoryStorageAdapter } from "../../memory-BMpJcQjQ.mjs";
2
+ export { MemoryStorageAdapter, StorageAdapter };
@@ -1,2 +1,2 @@
1
- import { t as MemoryAdapter } from "../../../memory-CeSQE-QV.mjs";
2
- export { MemoryAdapter };
1
+ import { t as MemoryStorageAdapter } from "../../../memory-B0w39kno.mjs";
2
+ export { MemoryStorageAdapter };
@@ -1,2 +1,2 @@
1
- import { t as MemoryAdapter } from "../../../memory-oYBvtkgx.mjs";
2
- export { MemoryAdapter };
1
+ import { t as MemoryStorageAdapter } from "../../../memory-BMpJcQjQ.mjs";
2
+ export { MemoryStorageAdapter };