@vuetify/v0 1.0.0-alpha.3 → 1.0.0-alpha.5

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 +5 -0
  2. package/dist/adapter-B6IrPwib.d.mts +98 -0
  3. package/dist/adapter-BEJXp-ie.d.mts +11 -0
  4. package/dist/adapter-BFSJsyv7.mjs +481 -0
  5. package/dist/{adapter-DlX3FA3A.d.mts → adapter-BO75n0Cn.d.mts} +10 -14
  6. package/dist/adapter-BSKx9WQ7.mjs +4 -0
  7. package/dist/adapter-Chznb9Ju.mjs +4 -0
  8. package/dist/{index-CT5SCLzW.d.mts → adapter-CspReV3g.d.mts} +6 -9
  9. package/dist/adapter-D8zizQVP.mjs +4 -0
  10. package/dist/adapter-DDJHLC8K.d.mts +17 -0
  11. package/dist/adapters-4t-NhR11.mjs +5 -0
  12. package/dist/adapters-BcoA0zCS.mjs +4 -0
  13. package/dist/adapters-BjaPK635.mjs +2 -0
  14. package/dist/adapters-D64TORDu.mjs +2 -0
  15. package/dist/adapters-DvG-9z9q.mjs +3 -0
  16. package/dist/browser/index.js +2074 -561
  17. package/dist/components/index.d.mts +2 -2
  18. package/dist/components/index.mjs +1 -1
  19. package/dist/{components-C4jI-78d.mjs → components-Dn4Kbi0i.mjs} +149 -101
  20. package/dist/composables/index.d.mts +20 -19
  21. package/dist/composables/index.mjs +31 -29
  22. package/dist/{consola-BdgyPEfx.d.mts → consola-CUNHyu8J.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-iODP6aKB.mjs → createDataTable-H-PuVigU.mjs} +216 -124
  27. package/dist/{createGroup-CGk6hY_Y.mjs → createGroup-aHt_kvtU.mjs} +3 -3
  28. package/dist/{createRegistry-BXzdXAjq.mjs → createRegistry-CWpvSbCe.mjs} +78 -41
  29. package/dist/{createSelection-B3HJEPNg.mjs → createSelection-MRyUZyW2.mjs} +3 -3
  30. package/dist/{createSingle-Dql8mRi-.mjs → createSingle-BSciC9EJ.mjs} +1 -1
  31. package/dist/{createTokens-DgFYsOrv.mjs → createTokens-CQ9C7GTV.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 +12 -5
  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/{index-BzFHTW59.d.mts → flagsmith-Cd44vxff.d.mts} +4 -4
  53. package/dist/{flagsmith-Dbh1h8WF.mjs → flagsmith-Cu93hUIF.mjs} +6 -4
  54. package/dist/{globals-zEjWBKCr.mjs → globals-BRdxsC2M.mjs} +1 -1
  55. package/dist/{index-GOpjKzaJ.d.mts → index-BLaKZq0Y.d.mts} +25 -2
  56. package/dist/{index-BJGcVy7e.d.mts → index-BmEu85PI.d.mts} +126 -65
  57. package/dist/{index-DE3bWw11.d.mts → index-C0ewabdY.d.mts} +93 -215
  58. package/dist/index-C6NnIuDv.d.mts +4 -0
  59. package/dist/{index-DNDuacmH.d.mts → index-CJdG9yY1.d.mts} +116 -106
  60. package/dist/index-C_t6t0Z-.d.mts +170 -0
  61. package/dist/{index-B76iGRE3.d.mts → index-CyUCELZC.d.mts} +1149 -61
  62. package/dist/index.d.mts +24 -23
  63. package/dist/index.mjs +35 -33
  64. package/dist/json/attributes.json +1 -1
  65. package/dist/json/web-types.json +2 -2
  66. package/dist/{launchdarkly-BKtW-idu.mjs → launchdarkly-CLGtJCsI.mjs} +6 -4
  67. package/dist/launchdarkly-De701hkf.d.mts +13 -0
  68. package/dist/locale/adapters/index.d.mts +3 -3
  69. package/dist/locale/adapters/index.mjs +4 -3
  70. package/dist/locale/adapters/v0/index.d.mts +2 -2
  71. package/dist/locale/adapters/v0/index.mjs +2 -2
  72. package/dist/locale/adapters/vue-i18n/index.d.mts +3 -3
  73. package/dist/locale/adapters/vue-i18n/index.mjs +4 -2
  74. package/dist/locale/index.d.mts +4 -4
  75. package/dist/locale/index.mjs +4 -3
  76. package/dist/logger/adapters/consola/index.d.mts +1 -1
  77. package/dist/logger/adapters/consola/index.mjs +1 -1
  78. package/dist/logger/adapters/index.d.mts +5 -5
  79. package/dist/logger/adapters/index.mjs +6 -5
  80. package/dist/logger/adapters/pino/index.d.mts +1 -1
  81. package/dist/logger/adapters/pino/index.mjs +1 -1
  82. package/dist/logger/adapters/v0/index.d.mts +2 -2
  83. package/dist/logger/adapters/v0/index.mjs +2 -2
  84. package/dist/logger/index.d.mts +6 -6
  85. package/dist/logger/index.mjs +6 -5
  86. package/dist/{memory-oYBvtkgx.mjs → memory-BMpJcQjQ.mjs} +13 -3
  87. package/dist/{memory-CeSQE-QV.d.mts → memory-D-JbdKXg.d.mts} +9 -9
  88. package/dist/notifications/index.d.mts +30 -4
  89. package/dist/notifications/index.mjs +187 -126
  90. package/dist/palettes/ant/index.d.mts +1 -1
  91. package/dist/palettes/index.d.mts +3 -3
  92. package/dist/palettes/leonardo/generate/index.mjs +3 -0
  93. package/dist/palettes/material/index.d.mts +1 -1
  94. package/dist/palettes/md1/index.d.mts +1 -1
  95. package/dist/palettes/md2/index.d.mts +1 -1
  96. package/dist/palettes/radix/index.d.mts +1 -1
  97. package/dist/palettes/tailwind/index.d.mts +1 -1
  98. package/dist/permissions/adapters/index.d.mts +2 -2
  99. package/dist/permissions/adapters/index.mjs +3 -3
  100. package/dist/permissions/adapters/v0/index.d.mts +2 -2
  101. package/dist/permissions/adapters/v0/index.mjs +2 -2
  102. package/dist/permissions/index.d.mts +2 -2
  103. package/dist/permissions/index.mjs +3 -3
  104. package/dist/{pino-DNfCEb0p.d.mts → pino-BaYY_KIN.d.mts} +2 -2
  105. package/dist/{pino-9L79n6y6.mjs → pino-CIcYlW3u.mjs} +3 -1
  106. package/dist/{posthog-DmuyycaR.mjs → posthog-0umvvA48.mjs} +7 -5
  107. package/dist/posthog-CIrmvke4.d.mts +13 -0
  108. package/dist/rules/index.d.mts +1 -1
  109. package/dist/rules/index.mjs +1 -1
  110. package/dist/{server-3ilWFwqe.d.mts → server-7vjHxjNc.d.mts} +5 -5
  111. package/dist/{server-y7zLSCSx.mjs → server-BNSiVoMe.mjs} +4 -3
  112. package/dist/storage/adapters/index.d.mts +3 -3
  113. package/dist/storage/adapters/index.mjs +2 -2
  114. package/dist/storage/adapters/memory/index.d.mts +2 -2
  115. package/dist/storage/adapters/memory/index.mjs +2 -2
  116. package/dist/storage/index.d.mts +4 -4
  117. package/dist/storage/index.mjs +3 -3
  118. package/dist/theme/adapters/index.d.mts +2 -2
  119. package/dist/theme/adapters/index.mjs +4 -4
  120. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  121. package/dist/theme/adapters/unhead/index.mjs +1 -1
  122. package/dist/theme/adapters/v0/index.d.mts +1 -1
  123. package/dist/theme/adapters/v0/index.mjs +1 -1
  124. package/dist/theme/index.d.mts +1 -1
  125. package/dist/theme/index.mjs +3 -3
  126. package/dist/types/index.d.mts +1 -1
  127. package/dist/{unhead-B-I2OS6i.mjs → unhead-_cXZcx0j.mjs} +2 -2
  128. package/dist/{useClickOutside-CY4U2J9W.mjs → useClickOutside-DbOLg1uw.mjs} +1483 -182
  129. package/dist/{useFeatures-BPOke6iP.mjs → useFeatures-Dhnr-Lg2.mjs} +7 -10
  130. package/dist/{useLocale-BV8e3imF.mjs → useLocale-Sh-2sNiG.mjs} +6 -6
  131. package/dist/{useLogger-DvdRTrqC.mjs → useLogger-1_ZeBY12.mjs} +5 -5
  132. package/dist/{useNotifications-vSJE6z6t.mjs → useNotifications-CAVQ7hK6.mjs} +6 -6
  133. package/dist/{usePermissions-D3zPwKQc.mjs → usePermissions-D9Oituwy.mjs} +6 -6
  134. package/dist/{useRules-BT6cgoTj.mjs → useRules-DK4AeNeC.mjs} +4 -3
  135. package/dist/{useTheme-cUZb2A9O.mjs → useTheme-FMDQC81h.mjs} +5 -5
  136. package/dist/utilities/index.d.mts +2 -2
  137. package/dist/utilities/index.mjs +26 -2
  138. package/dist/{v0-CHZpnMeP.mjs → v0-C42ssNIy.mjs} +6 -4
  139. package/dist/{v0-Dq3zhexO.mjs → v0-CEfbyyp2.mjs} +3 -4
  140. package/dist/{v0-C49OI_wc.mjs → v0-Ch-O6YVd.mjs} +5 -3
  141. package/dist/{v0-gpExNexS.mjs → v0-D0imQlSD.mjs} +2 -2
  142. package/dist/{v0-DrOub-e1.d.mts → v0-DWZ_N2GG.d.mts} +4 -4
  143. package/dist/{v0-Bmow1q_x.mjs → v0-Dvu8fMl3.mjs} +3 -3
  144. package/dist/v0-QIjffi4E.d.mts +8 -0
  145. package/dist/{v0-D7Fm2C3Y.d.mts → v0-aYLq6qmT.d.mts} +3 -3
  146. package/dist/{virtual-C0yHf1DC.mjs → virtual-Cq5aRp7m.mjs} +3 -4
  147. package/dist/virtual-CrgGA-o6.d.mts +8 -0
  148. package/package.json +1 -1
  149. package/dist/adapter-58IvIfAZ.d.mts +0 -96
  150. package/dist/adapter-BvWEd9w-.d.mts +0 -17
  151. package/dist/adapter-Dhq68tz0.d.mts +0 -11
  152. package/dist/adapter-gQ2SNKZq.mjs +0 -238
  153. package/dist/adapters-BSiqsTZN.mjs +0 -3
  154. package/dist/adapters-C3QXhf4I.mjs +0 -2
  155. package/dist/adapters-CMJGA1k7.mjs +0 -2
  156. package/dist/adapters-Dse4bPxk.mjs +0 -5
  157. package/dist/adapters-_ZqxCD8f.mjs +0 -4
  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-BOn0AAue.d.mts} +0 -0
  167. /package/dist/{index-CROz1VSV.d.mts → index-CKKoxA9V.d.mts} +0 -0
  168. /package/dist/{index-DuddF-NR.d.mts → index-CLR1QMM3.d.mts} +0 -0
  169. /package/dist/{index-DTvqw22G.d.mts → index-H_hl6-4b.d.mts} +0 -0
  170. /package/dist/{index-BgCkepP_.d.mts → index-PvkxPev3.d.mts} +0 -0
  171. /package/dist/{toArray-as9BWxBK.mjs → toArray-CD2-OxAz.mjs} +0 -0
@@ -0,0 +1,170 @@
1
+ import { t as ContextTrinity } from "./index-H_hl6-4b.mjs";
2
+ import { n as RegistryContextOptions, o as RegistryOptions, s as RegistryTicket, t as RegistryContext } from "./index-C0ewabdY.mjs";
3
+
4
+ //#region src/composables/createTokens/index.d.ts
5
+ interface TokenAlias<T = unknown> {
6
+ [key: string]: unknown;
7
+ $value: T;
8
+ $type?: string;
9
+ $description?: string;
10
+ $extensions?: Record<string, unknown>;
11
+ $deprecated?: boolean | string;
12
+ }
13
+ type TokenPrimitive = string | number | boolean | null | Function;
14
+ type TokenValue = TokenPrimitive | TokenAlias;
15
+ interface TokenCollection {
16
+ [key: string]: TokenValue | TokenCollection;
17
+ }
18
+ type FlatTokenCollection = {
19
+ id: string;
20
+ value: TokenValue;
21
+ };
22
+ interface TokenTicket<Z extends TokenValue = TokenValue> extends RegistryTicket<Z> {}
23
+ interface TokenContext<Z extends TokenTicket> extends RegistryContext<Z> {
24
+ /**
25
+ * Checks if a token is an alias
26
+ *
27
+ * @param token The token to check.
28
+ * @returns True if the token is an alias, false otherwise.
29
+ * @remarks An alias is a string that starts with "{" and ends with "}".
30
+ *
31
+ * @see https://0.vuetifyjs.com/composables/registration/create-tokens
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const tokens = createTokens({
36
+ * colors: {
37
+ * primary: '#3b82f6',
38
+ * secondary: '{colors.primary}', // Alias reference
39
+ * },
40
+ * })
41
+ *
42
+ * console.log(tokens.isAlias('{colors.primary}')) // true
43
+ * console.log(tokens.isAlias('#3b82f6')) // false
44
+ * ```
45
+ */
46
+ isAlias: (token: unknown) => token is string;
47
+ /**
48
+ * Resolves a token or alias to its value.
49
+ *
50
+ * @param token The token or alias to resolve.
51
+ * @returns The resolved value of the token or alias, or undefined if not found.
52
+ * @remarks This function can resolve nested aliases and supports token paths using dot notation.
53
+ *
54
+ * @see https://0.vuetifyjs.com/composables/registration/create-tokens
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const tokens = createTokens({
59
+ * colors: {
60
+ * primary: '#3b82f6',
61
+ * secondary: '{colors.primary}', // Alias reference
62
+ * },
63
+ * })
64
+ *
65
+ * console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
66
+ * console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
67
+ * ```
68
+ */
69
+ resolve: (token: string | TokenAlias) => unknown | undefined;
70
+ }
71
+ interface TokenOptions extends RegistryOptions {
72
+ /**
73
+ * Whether to flatten nested token structures.
74
+ *
75
+ * @default false
76
+ */
77
+ flat?: boolean;
78
+ /**
79
+ * An optional prefix to prepend to each token ID during registration.
80
+ *
81
+ * @remarks This is useful for namespacing tokens.
82
+ */
83
+ prefix?: string;
84
+ }
85
+ interface TokenContextOptions extends TokenOptions, RegistryContextOptions {
86
+ tokens?: TokenCollection;
87
+ }
88
+ /**
89
+ * Creates a new token instance.
90
+ *
91
+ * @param tokens The tokens to use.
92
+ * @param options The options for the token instance.
93
+ * @template Z The type of the token ticket.
94
+ * @template E The type of the token context.
95
+ * @returns A new token instance.
96
+ *
97
+ * @see https://www.designtokens.org/tr/drafts/format/
98
+ * @see https://0.vuetifyjs.com/composables/registration/create-tokens
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * import { createTokens } from '@vuetify/v0'
103
+ *
104
+ * const tokens = createTokens({
105
+ * colors: {
106
+ * primary: '#3b82f6',
107
+ * secondary: '{colors.primary}', // Alias reference
108
+ * },
109
+ * })
110
+ *
111
+ * console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
112
+ * console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
113
+ * ```
114
+ */
115
+ declare function createTokens<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(tokens?: TokenCollection, options?: TokenOptions): E;
116
+ /**
117
+ * Creates a new token context.
118
+ *
119
+ * @param namespace The namespace for the token context.
120
+ * @param tokens The tokens to use.
121
+ * @template Z The type of the token ticket.
122
+ * @template E The type of the token context.
123
+ * @returns A new token context.
124
+ *
125
+ * @see https://0.vuetifyjs.com/composables/registration/create-tokens
126
+ *
127
+ * @example
128
+ * ```ts
129
+ * import { createTokensContext } from '@vuetify/v0'
130
+ *
131
+ * export const [useTokens, provideTokens, context] = createTokensContext({
132
+ * namespace: 'v0:tokens',
133
+ * tokens: {
134
+ * colors: {
135
+ * primary: '#3b82f6',
136
+ * secondary: '{colors.primary}', // Alias reference
137
+ * },
138
+ * },
139
+ * })
140
+ * ```
141
+ */
142
+ declare function createTokensContext<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(_options: TokenContextOptions): ContextTrinity<E>;
143
+ /**
144
+ * Returns the current tokens instance.
145
+ *
146
+ * @param namespace The namespace for the tokens context. Defaults to `'v0:tokens'`.
147
+ * @returns The current tokens instance.
148
+ *
149
+ * @see https://0.vuetifyjs.com/composables/registration/create-tokens
150
+ *
151
+ * @example
152
+ * ```vue
153
+ * <script setup lang="ts">
154
+ * import { useTokens } from '@vuetify/v0'
155
+ *
156
+ * const tokens = useTokens()
157
+ * </script>
158
+ * ```
159
+ */
160
+ declare function useTokens<Z extends TokenTicket = TokenTicket, E extends TokenContext<Z> = TokenContext<Z>>(namespace?: string): E;
161
+ /**
162
+ * Flattens a nested collection of tokens into a flat array of tokens.
163
+ * Each token is represented by an object containing its ID & value.
164
+ * @param tokens The collection of tokens to flatten.
165
+ * @param prefix An optional prefix to prepend to each token ID.
166
+ * @returns An array of flattened tokens, each with an ID and value.
167
+ */
168
+ declare function flatten(tokens: TokenCollection, prefix?: string, flat?: boolean): FlatTokenCollection[];
169
+ //#endregion
170
+ export { TokenContextOptions as a, TokenTicket as c, createTokensContext as d, flatten as f, TokenContext as i, TokenValue as l, TokenAlias as n, TokenOptions as o, useTokens as p, TokenCollection as r, TokenPrimitive as s, FlatTokenCollection as t, createTokens as u };