@vuetify/v0 0.1.8 → 0.1.9

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 (119) hide show
  1. package/SKILL.md +95 -0
  2. package/dist/adapter-CWp5eQ6R.d.mts +17 -0
  3. package/dist/{adapter-DIx4Rntl.d.mts → adapter-hDuQ9aNN.d.mts} +4 -4
  4. package/dist/browser/index.js +1352 -360
  5. package/dist/components/index.d.mts +2 -2
  6. package/dist/components/index.mjs +23 -23
  7. package/dist/{components-BbxKYAXs.mjs → components-mSy9az8x.mjs} +456 -231
  8. package/dist/composables/index.d.mts +16 -15
  9. package/dist/composables/index.mjs +22 -22
  10. package/dist/{consola-BVzYzeLH.d.mts → consola-C1OjyZVf.d.mts} +1 -1
  11. package/dist/constants/index.d.mts +1 -1
  12. package/dist/constants/index.mjs +1 -1
  13. package/dist/{createDataTable-DZouEhvH.mjs → createDataTable-DIl09siC.mjs} +5 -5
  14. package/dist/{createGroup-BpJFi41X.mjs → createGroup-PvzsLu9E.mjs} +1 -1
  15. package/dist/{createPagination-Bu8vE0JW.mjs → createPagination-DZSJ8aO5.mjs} +5 -5
  16. package/dist/{createSelection-8MX0OHXR.mjs → createSelection-DbWP6c7H.mjs} +1 -1
  17. package/dist/{createSingle-CbuOBb-E.mjs → createSingle-CeAJpbXs.mjs} +6 -6
  18. package/dist/{createTokens-CXlT0Vc6.mjs → createTokens-C1gIuKCK.mjs} +25 -4
  19. package/dist/data-table/adapters/client/index.d.mts +1 -1
  20. package/dist/data-table/adapters/client/index.mjs +3 -3
  21. package/dist/data-table/adapters/index.d.mts +4 -4
  22. package/dist/data-table/adapters/index.mjs +5 -5
  23. package/dist/data-table/adapters/server/index.d.mts +1 -1
  24. package/dist/data-table/adapters/server/index.mjs +3 -3
  25. package/dist/data-table/adapters/virtual/index.d.mts +1 -1
  26. package/dist/data-table/adapters/virtual/index.mjs +3 -3
  27. package/dist/data-table/index.d.mts +5 -5
  28. package/dist/data-table/index.mjs +14 -14
  29. package/dist/date/index.mjs +1 -1
  30. package/dist/features/adapters/posthog/index.mjs +2 -2
  31. package/dist/features/index.d.mts +1 -1
  32. package/dist/features/index.mjs +8 -8
  33. package/dist/{globals-ClSU6mqC.mjs → globals-3i9umzyz.mjs} +1 -1
  34. package/dist/{index-CxW4itj1.d.mts → index-BoK8Ln2f.d.mts} +1 -1
  35. package/dist/{index-B5NU2uB7.d.mts → index-C5XZRWlO.d.mts} +506 -166
  36. package/dist/{index-CmCMrlt3.d.mts → index-CLDBngUs.d.mts} +1 -1
  37. package/dist/{index-63-0oJS8.d.mts → index-D0qnkRbl.d.mts} +389 -183
  38. package/dist/index.d.mts +19 -18
  39. package/dist/index.mjs +23 -23
  40. package/dist/json/attributes.json +60 -0
  41. package/dist/json/importMap.json +24 -0
  42. package/dist/json/tags.json +40 -0
  43. package/dist/json/web-types.json +221 -1
  44. package/dist/locale/adapters/index.d.mts +3 -2
  45. package/dist/locale/adapters/index.mjs +2 -2
  46. package/dist/locale/adapters/v0/index.d.mts +1 -1
  47. package/dist/locale/adapters/v0/index.mjs +2 -2
  48. package/dist/locale/adapters/vue-i18n/index.d.mts +22 -0
  49. package/dist/locale/adapters/vue-i18n/index.mjs +26 -0
  50. package/dist/locale/index.d.mts +4 -3
  51. package/dist/locale/index.mjs +8 -9
  52. package/dist/logger/adapters/consola/index.d.mts +1 -1
  53. package/dist/logger/adapters/index.d.mts +4 -4
  54. package/dist/logger/adapters/index.mjs +2 -2
  55. package/dist/logger/adapters/pino/index.d.mts +1 -1
  56. package/dist/logger/adapters/pino/index.mjs +1 -1
  57. package/dist/logger/adapters/v0/index.d.mts +1 -1
  58. package/dist/logger/adapters/v0/index.mjs +2 -2
  59. package/dist/logger/index.d.mts +5 -5
  60. package/dist/logger/index.mjs +3 -3
  61. package/dist/notifications/index.d.mts +78 -0
  62. package/dist/notifications/index.mjs +215 -0
  63. package/dist/palettes/ant/index.d.mts +1 -1
  64. package/dist/palettes/index.d.mts +2 -2
  65. package/dist/palettes/material/index.d.mts +1 -1
  66. package/dist/palettes/md1/index.d.mts +1 -1
  67. package/dist/palettes/md2/index.d.mts +1 -1
  68. package/dist/palettes/radix/index.d.mts +1 -1
  69. package/dist/palettes/tailwind/index.d.mts +1 -1
  70. package/dist/permissions/adapters/index.d.mts +2 -2
  71. package/dist/permissions/adapters/index.mjs +1 -1
  72. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  73. package/dist/permissions/adapters/v0/index.mjs +1 -1
  74. package/dist/permissions/index.d.mts +1 -1
  75. package/dist/permissions/index.mjs +5 -5
  76. package/dist/{pino-Bzighnkd.d.mts → pino-CM1iLXmi.d.mts} +1 -1
  77. package/dist/{posthog-BE7-t7cV.mjs → posthog-CCQFQ5XD.mjs} +1 -1
  78. package/dist/rules/index.d.mts +1 -1
  79. package/dist/rules/index.mjs +9 -10
  80. package/dist/{server-Ch9J86tb.d.mts → server-Ct-h4-OA.d.mts} +1 -1
  81. package/dist/{server-CZ6ahbEH.mjs → server-DHET3KNW.mjs} +1 -1
  82. package/dist/storage/adapters/index.d.mts +2 -2
  83. package/dist/storage/adapters/memory/index.d.mts +1 -1
  84. package/dist/storage/index.d.mts +3 -3
  85. package/dist/storage/index.mjs +21 -21
  86. package/dist/theme/adapters/index.d.mts +1 -1
  87. package/dist/theme/adapters/index.mjs +2 -2
  88. package/dist/theme/adapters/v0/index.d.mts +1 -1
  89. package/dist/theme/adapters/v0/index.mjs +2 -2
  90. package/dist/theme/index.d.mts +1 -1
  91. package/dist/theme/index.mjs +8 -8
  92. package/dist/{useClickOutside-W0Sur1rC.mjs → useClickOutside-hOhNk4eS.mjs} +860 -126
  93. package/dist/{useFeatures-CUicSI-E.mjs → useFeatures-CXRQvucQ.mjs} +3 -3
  94. package/dist/useLocale-BaufqE5Z.mjs +69 -0
  95. package/dist/{useLogger-DY1Hbcy1.mjs → useLogger-cGK00Ywd.mjs} +2 -2
  96. package/dist/{usePermissions-BSW59R4q.mjs → usePermissions-CR0HkjsF.mjs} +2 -2
  97. package/dist/{useRules-BbA6_gvs.mjs → useRules-LD-_-Hxt.mjs} +2 -2
  98. package/dist/{useTheme-Bdx2Lj5c.mjs → useTheme-Cs79AFNR.mjs} +5 -5
  99. package/dist/utilities/index.d.mts +1 -1
  100. package/dist/utilities/index.mjs +2 -1
  101. package/dist/{v0-BFseIsBi.mjs → v0-BJYwZgtp.mjs} +1 -1
  102. package/dist/v0-BdD1F6JK.d.mts +19 -0
  103. package/dist/{v0-YAqbXudL.mjs → v0-BoWQ8RK0.mjs} +1 -1
  104. package/dist/{v0-CdUL2eOn.d.mts → v0-CMeh39LQ.d.mts} +1 -1
  105. package/dist/v0-CehUknHv.mjs +62 -0
  106. package/dist/{v0-BZINNGoC.d.mts → v0-DFAgNbvC.d.mts} +1 -1
  107. package/dist/{v0-1xxC39wf.d.mts → v0-JPf99NKg.d.mts} +1 -1
  108. package/dist/{v0-2G2476h-.mjs → v0-Zu7neOYg.mjs} +1 -1
  109. package/dist/{virtual-DwBiFA25.d.mts → virtual-B1lRbO7Q.d.mts} +1 -1
  110. package/dist/{virtual-eDNVH1fz.mjs → virtual-D0_D5gkh.mjs} +1 -1
  111. package/package.json +11 -4
  112. package/dist/useLocale-cQlPxbpV.mjs +0 -87
  113. package/dist/v0-CAKa6tzG.d.mts +0 -22
  114. package/dist/v0-CHBrvw49.mjs +0 -35
  115. /package/dist/{adapter-JTFG3Jn8.d.mts → adapter-CJQav2JB.d.mts} +0 -0
  116. /package/dist/{index-MHkcqY_y.d.mts → index-BL4uTXWQ.d.mts} +0 -0
  117. /package/dist/{index-B5ZDDkXv.d.mts → index-BvTD7kU8.d.mts} +0 -0
  118. /package/dist/{index-NsE5nARK.d.mts → index-DSao7i57.d.mts} +0 -0
  119. /package/dist/{memory-BTtRdnNn.d.mts → memory-DyBabFV1.d.mts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { isArray, isBoolean, isFunction, isObject } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-DY1Hbcy1.mjs";
3
- import { t as createTokens } from "./createTokens-CXlT0Vc6.mjs";
4
- import { t as createGroup } from "./createGroup-BpJFi41X.mjs";
2
+ import { o as createPluginContext } from "./useLogger-cGK00Ywd.mjs";
3
+ import { t as createTokens } from "./createTokens-C1gIuKCK.mjs";
4
+ import { t as createGroup } from "./createGroup-PvzsLu9E.mjs";
5
5
  //#region src/composables/useFeatures/adapters/generic/index.ts
6
6
  var FeaturesAdapter = class {};
7
7
  //#endregion
@@ -0,0 +1,69 @@
1
+ import { o as createPluginContext } from "./useLogger-cGK00Ywd.mjs";
2
+ import { t as createTokens } from "./createTokens-C1gIuKCK.mjs";
3
+ import { t as createSingle } from "./createSingle-CeAJpbXs.mjs";
4
+ import { t as Vuetify0LocaleAdapter } from "./v0-CehUknHv.mjs";
5
+ //#region src/composables/useLocale/index.ts
6
+ /**
7
+ * @module useLocale
8
+ *
9
+ * @remarks
10
+ * Internationalization (i18n) composable with adapter pattern for message translation.
11
+ *
12
+ * Key features:
13
+ * - Locale selection with createSingle
14
+ * - Token-based message storage with useTokens
15
+ * - Numbered and named placeholder support ({0}, {name})
16
+ * - Number formatting with Intl.NumberFormat
17
+ * - Adapter pattern for integration with i18n providers
18
+ *
19
+ * Integrates with createSingle for locale selection and useTokens for message resolution.
20
+ */
21
+ /**
22
+ * Creates a new locale instance.
23
+ *
24
+ * @param options The options for the locale instance.
25
+ * @template Z The type of the locale ticket.
26
+ * @template E The type of the locale context.
27
+ * @returns A new locale instance.
28
+ *
29
+ * @see https://0.vuetifyjs.com/composables/plugins/use-locale
30
+ */
31
+ function createLocale(_options = {}) {
32
+ const { adapter: externalAdapter, messages = {}, fallback: fallbackLocale, ...options } = _options;
33
+ const tokens = createTokens(messages);
34
+ const registry = createSingle(options);
35
+ for (const id in messages) {
36
+ registry.register({ id });
37
+ if (id === options.default && !registry.selectedId.value) registry.select(id);
38
+ }
39
+ const adapter = externalAdapter ?? new Vuetify0LocaleAdapter({
40
+ tokens,
41
+ selectedId: registry.selectedId,
42
+ fallbackLocale,
43
+ has: (id) => registry.has(id)
44
+ });
45
+ function t(key, ...params) {
46
+ return adapter.t(key, ...params);
47
+ }
48
+ function n(value) {
49
+ return adapter.n(value);
50
+ }
51
+ return {
52
+ ...registry,
53
+ t,
54
+ n,
55
+ get size() {
56
+ return registry.size;
57
+ }
58
+ };
59
+ }
60
+ function createLocaleFallback() {
61
+ return {
62
+ size: 0,
63
+ t: (key) => key,
64
+ n: String
65
+ };
66
+ }
67
+ const [createLocaleContext, createLocalePlugin, useLocale] = createPluginContext("v0:locale", (options) => createLocale(options), { fallback: () => createLocaleFallback() });
68
+ //#endregion
69
+ export { useLocale as a, createLocalePlugin as i, createLocaleContext as n, createLocaleFallback as r, createLocale as t };
@@ -1,7 +1,7 @@
1
- import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-ClSU6mqC.mjs";
1
+ import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-3i9umzyz.mjs";
2
2
  import { isUndefined } from "./utilities/index.mjs";
3
3
  import { i as useContext, n as createContext, t as createTrinity } from "./createTrinity-C_c8eedz.mjs";
4
- import { t as Vuetify0LoggerAdapter } from "./v0-BFseIsBi.mjs";
4
+ import { t as Vuetify0LoggerAdapter } from "./v0-BJYwZgtp.mjs";
5
5
  import { hasInjectionContext } from "vue";
6
6
  //#region src/composables/createPlugin/index.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
- import { o as createPluginContext } from "./useLogger-DY1Hbcy1.mjs";
2
- import { t as createTokens } from "./createTokens-CXlT0Vc6.mjs";
1
+ import { o as createPluginContext } from "./useLogger-cGK00Ywd.mjs";
2
+ import { t as createTokens } from "./createTokens-C1gIuKCK.mjs";
3
3
  import { t as toArray } from "./toArray-VdROPpy-.mjs";
4
4
  import { t as Vuetify0PermissionAdapter } from "./v0-B1QQGE4O.mjs";
5
5
  //#region src/composables/usePermissions/index.ts
@@ -1,6 +1,6 @@
1
1
  import { instanceExists, isFunction, isObject } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-DY1Hbcy1.mjs";
3
- import { a as useLocale } from "./useLocale-cQlPxbpV.mjs";
2
+ import { o as createPluginContext } from "./useLogger-cGK00Ywd.mjs";
3
+ import { a as useLocale } from "./useLocale-BaufqE5Z.mjs";
4
4
  //#region src/composables/useRules/adapters/standard.ts
5
5
  /**
6
6
  * Type guard for Standard Schema objects.
@@ -1,7 +1,7 @@
1
- import { o as createPluginContext } from "./useLogger-DY1Hbcy1.mjs";
2
- import { t as createTokens } from "./createTokens-CXlT0Vc6.mjs";
3
- import { t as createSingle } from "./createSingle-CbuOBb-E.mjs";
4
- import { t as Vuetify0ThemeAdapter } from "./v0-2G2476h-.mjs";
1
+ import { o as createPluginContext } from "./useLogger-cGK00Ywd.mjs";
2
+ import { t as createTokens } from "./createTokens-C1gIuKCK.mjs";
3
+ import { t as createSingle } from "./createSingle-CeAJpbXs.mjs";
4
+ import { t as Vuetify0ThemeAdapter } from "./v0-Zu7neOYg.mjs";
5
5
  import { computed, shallowRef, toRef } from "vue";
6
6
  //#region src/composables/useTheme/index.ts
7
7
  /**
@@ -72,7 +72,7 @@ function createTheme(_options = {}) {
72
72
  });
73
73
  if (id === options.default && !registry.selectedId.value) registry.select(id);
74
74
  }
75
- const names = computed(() => registry.keys());
75
+ const names = toRef(() => registry.keys());
76
76
  const colors = computed(() => {
77
77
  const resolved = {};
78
78
  for (const theme of registry.values()) {
@@ -1,2 +1,2 @@
1
- import { _ as isUndefined, a as isArray, b as useId, c as isFunction, d as isNullOrUndefined, f as isNumber, g as isSymbol, h as isString, i as debounce, l as isNaN, m as isPrimitive, n as instanceName, o as isBoolean, p as isObject, r as clamp, s as isElement, t as instanceExists, u as isNull, v as mergeDeep, y as range } from "../index-MHkcqY_y.mjs";
1
+ import { _ as isUndefined, a as isArray, b as useId, c as isFunction, d as isNullOrUndefined, f as isNumber, g as isSymbol, h as isString, i as debounce, l as isNaN, m as isPrimitive, n as instanceName, o as isBoolean, p as isObject, r as clamp, s as isElement, t as instanceExists, u as isNull, v as mergeDeep, y as range } from "../index-BL4uTXWQ.mjs";
2
2
  export { clamp, debounce, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isUndefined, mergeDeep, range, useId };
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "../globals-ClSU6mqC.mjs";
1
+ import { t as IN_BROWSER } from "../globals-3i9umzyz.mjs";
2
2
  import * as Vue from "vue";
3
3
  import { useId as useId$1 } from "vue";
4
4
  //#region src/utilities/instance.ts
@@ -320,6 +320,7 @@ function mergeDeep(target, ...sources) {
320
320
  if (UNSAFE_KEYS.has(key)) continue;
321
321
  if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
322
322
  const sourceValue = source[key];
323
+ if (/* @__PURE__ */ isUndefined(sourceValue)) continue;
323
324
  const targetValue = target[key];
324
325
  if (/* @__PURE__ */ isObject(sourceValue)) {
325
326
  if (!/* @__PURE__ */ isObject(targetValue)) Object.assign(target, { [key]: {} });
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-ClSU6mqC.mjs";
1
+ import { t as IN_BROWSER } from "./globals-3i9umzyz.mjs";
2
2
  import { isFunction } from "./utilities/index.mjs";
3
3
  //#region src/composables/useLogger/adapters/v0.ts
4
4
  /**
@@ -0,0 +1,19 @@
1
+ import { n as LocaleAdapterContext, t as LocaleAdapter } from "./adapter-CWp5eQ6R.mjs";
2
+
3
+ //#region src/composables/useLocale/adapters/v0.d.ts
4
+ /**
5
+ * Default locale adapter for @vuetify/v0.
6
+ *
7
+ * Handles the full translation pipeline: key lookup via tokens,
8
+ * fallback chain, token reference resolution, and placeholder interpolation.
9
+ */
10
+ declare class Vuetify0LocaleAdapter implements LocaleAdapter {
11
+ private context;
12
+ constructor(context: LocaleAdapterContext);
13
+ t(key: string, ...params: unknown[]): string;
14
+ n(value: number): string;
15
+ private resolve;
16
+ private interpolate;
17
+ }
18
+ //#endregion
19
+ export { Vuetify0LocaleAdapter as t };
@@ -1,4 +1,4 @@
1
- import { t as createPagination } from "./createPagination-Bu8vE0JW.mjs";
1
+ import { t as createPagination } from "./createPagination-DZSJ8aO5.mjs";
2
2
  import { t as DataTableAdapter } from "./adapter-B4zE-hA5.mjs";
3
3
  import { computed, toRef, watch } from "vue";
4
4
  //#region src/composables/createDataTable/adapters/v0.ts
@@ -1,4 +1,4 @@
1
- import { i as DataTableAdapterResult, n as DataTableAdapterContext, t as DataTableAdapter } from "./adapter-DIx4Rntl.mjs";
1
+ import { i as DataTableAdapterResult, n as DataTableAdapterContext, t as DataTableAdapter } from "./adapter-hDuQ9aNN.mjs";
2
2
 
3
3
  //#region src/composables/createDataTable/adapters/v0.d.ts
4
4
  declare class ClientAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
@@ -0,0 +1,62 @@
1
+ import { t as IN_BROWSER } from "./globals-3i9umzyz.mjs";
2
+ import { isObject, isString, isUndefined } from "./utilities/index.mjs";
3
+ //#region src/composables/useLocale/adapters/v0.ts
4
+ /**
5
+ * Default locale adapter for @vuetify/v0.
6
+ *
7
+ * Handles the full translation pipeline: key lookup via tokens,
8
+ * fallback chain, token reference resolution, and placeholder interpolation.
9
+ */
10
+ var Vuetify0LocaleAdapter = class {
11
+ context;
12
+ constructor(context) {
13
+ this.context = context;
14
+ }
15
+ t(key, ...params) {
16
+ const locale = this.context.selectedId.value;
17
+ if (!locale) return this.interpolate(key, params);
18
+ const message = this.context.tokens.get(`${locale}.${key}`)?.value;
19
+ if (/* @__PURE__ */ isString(message)) return this.interpolate(this.resolve(locale, message), params);
20
+ if (this.context.fallbackLocale) {
21
+ const fbMessage = this.context.tokens.get(`${this.context.fallbackLocale}.${key}`)?.value;
22
+ if (/* @__PURE__ */ isString(fbMessage)) return this.interpolate(this.resolve(this.context.fallbackLocale, fbMessage), params);
23
+ }
24
+ return this.interpolate(key, params);
25
+ }
26
+ n(value) {
27
+ const locale = this.context.selectedId.value;
28
+ if (!IN_BROWSER || !locale) return value.toString();
29
+ return new Intl.NumberFormat(String(locale)).format(value);
30
+ }
31
+ resolve(locale, str, visited = /* @__PURE__ */ new Set()) {
32
+ return str.replace(/{([a-zA-Z0-9.\-_]+)}/g, (match, key) => {
33
+ const [prefix, ...rest] = key.split(".");
34
+ const target = this.context.has(prefix) ? prefix : locale;
35
+ const path = `${target}.${this.context.has(prefix) ? rest.join(".") : key}`;
36
+ if (visited.has(path)) return match;
37
+ visited.add(path);
38
+ const resolved = this.context.tokens.get(path)?.value;
39
+ if (/* @__PURE__ */ isString(resolved)) return this.resolve(target, resolved, visited);
40
+ return match;
41
+ });
42
+ }
43
+ interpolate(message, args) {
44
+ let result = message;
45
+ let rest = args;
46
+ if (rest.length > 0 && /* @__PURE__ */ isObject(rest[0])) {
47
+ const variables = rest[0];
48
+ result = result.replace(/{([a-zA-Z][a-zA-Z0-9_]*)}/g, (match, name) => {
49
+ return /* @__PURE__ */ isUndefined(variables[name]) ? match : String(variables[name]);
50
+ });
51
+ rest = rest.slice(1);
52
+ }
53
+ result = result.replace(/\{(\d+)\}/g, (match, index) => {
54
+ const i = Number.parseInt(index, 10);
55
+ if (!/* @__PURE__ */ isUndefined(rest[i])) return String(rest[i]);
56
+ return match;
57
+ });
58
+ return result;
59
+ }
60
+ };
61
+ //#endregion
62
+ export { Vuetify0LocaleAdapter as t };
@@ -1,5 +1,5 @@
1
1
  import { o as ID } from "./index-Dor6eAEc.mjs";
2
- import { fn as PermissionAdapter, rn as PermissionContext, sn as PermissionTicket } from "./index-63-0oJS8.mjs";
2
+ import { en as PermissionContext, in as PermissionTicket, ln as PermissionAdapter } from "./index-D0qnkRbl.mjs";
3
3
 
4
4
  //#region src/composables/usePermissions/adapters/v0.d.ts
5
5
  declare class Vuetify0PermissionAdapter extends PermissionAdapter {
@@ -1,4 +1,4 @@
1
- import { t as LoggerAdapter } from "./adapter-JTFG3Jn8.mjs";
1
+ import { t as LoggerAdapter } from "./adapter-CJQav2JB.mjs";
2
2
 
3
3
  //#region src/composables/useLogger/adapters/v0.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as IN_BROWSER } from "./globals-ClSU6mqC.mjs";
1
+ import { t as IN_BROWSER } from "./globals-3i9umzyz.mjs";
2
2
  import { isNull, isString, isUndefined } from "./utilities/index.mjs";
3
3
  import { onScopeDispose, watch } from "vue";
4
4
  //#region src/composables/useTheme/adapters/adapter.ts
@@ -1,4 +1,4 @@
1
- import { i as DataTableAdapterResult, n as DataTableAdapterContext, t as DataTableAdapter } from "./adapter-DIx4Rntl.mjs";
1
+ import { i as DataTableAdapterResult, n as DataTableAdapterContext, t as DataTableAdapter } from "./adapter-hDuQ9aNN.mjs";
2
2
 
3
3
  //#region src/composables/createDataTable/adapters/virtual.d.ts
4
4
  declare class VirtualAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
@@ -1,4 +1,4 @@
1
- import { t as createPagination } from "./createPagination-Bu8vE0JW.mjs";
1
+ import { t as createPagination } from "./createPagination-DZSJ8aO5.mjs";
2
2
  import { t as DataTableAdapter } from "./adapter-B4zE-hA5.mjs";
3
3
  import { toRef, watch } from "vue";
4
4
  //#region src/composables/createDataTable/adapters/virtual.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vuetify/v0",
3
- "version": "0.1.8",
4
- "description": "Vuetify0",
3
+ "version": "0.1.9",
4
+ "description": "A meta UI framework for building applications, component libraries, and design systems with Vue 3",
5
5
  "license": "MIT",
6
6
  "types": "./dist/index.d.mts",
7
7
  "type": "module",
@@ -21,7 +21,8 @@
21
21
  "@material/material-color-utilities": ">=0.3.0",
22
22
  "launchdarkly-js-client-sdk": "^3.0.0",
23
23
  "posthog-js": "^1.0.0",
24
- "vue": ">=3.5.0"
24
+ "vue": ">=3.5.0",
25
+ "vue-i18n": ">=10.0.0"
25
26
  },
26
27
  "peerDependenciesMeta": {
27
28
  "@flagsmith/flagsmith": {
@@ -41,6 +42,9 @@
41
42
  },
42
43
  "@adobe/leonardo-contrast-colors": {
43
44
  "optional": true
45
+ },
46
+ "vue-i18n": {
47
+ "optional": true
44
48
  }
45
49
  },
46
50
  "devDependencies": {
@@ -57,7 +61,8 @@
57
61
  "typescript": "5.9.3",
58
62
  "unplugin-vue": "^7.1.1",
59
63
  "vue": "3.5.30",
60
- "vue-component-meta": "^3.2.5"
64
+ "vue-component-meta": "^3.2.5",
65
+ "vue-i18n": "^10.0.0"
61
66
  },
62
67
  "imports": {
63
68
  "#v0/*": {
@@ -83,11 +88,13 @@
83
88
  "./locale": "./dist/locale/index.mjs",
84
89
  "./locale/adapters": "./dist/locale/adapters/index.mjs",
85
90
  "./locale/adapters/v0": "./dist/locale/adapters/v0/index.mjs",
91
+ "./locale/adapters/vue-i18n": "./dist/locale/adapters/vue-i18n/index.mjs",
86
92
  "./logger": "./dist/logger/index.mjs",
87
93
  "./logger/adapters": "./dist/logger/adapters/index.mjs",
88
94
  "./logger/adapters/consola": "./dist/logger/adapters/consola/index.mjs",
89
95
  "./logger/adapters/pino": "./dist/logger/adapters/pino/index.mjs",
90
96
  "./logger/adapters/v0": "./dist/logger/adapters/v0/index.mjs",
97
+ "./notifications": "./dist/notifications/index.mjs",
91
98
  "./palettes": "./dist/palettes/index.mjs",
92
99
  "./palettes/ant": "./dist/palettes/ant/index.mjs",
93
100
  "./palettes/ant/generate": "./dist/palettes/ant/generate/index.mjs",
@@ -1,87 +0,0 @@
1
- import { isString } from "./utilities/index.mjs";
2
- import { o as createPluginContext } from "./useLogger-DY1Hbcy1.mjs";
3
- import { t as createTokens } from "./createTokens-CXlT0Vc6.mjs";
4
- import { t as createSingle } from "./createSingle-CbuOBb-E.mjs";
5
- import { t as toArray } from "./toArray-VdROPpy-.mjs";
6
- import { t as Vuetify0LocaleAdapter } from "./v0-CHBrvw49.mjs";
7
- //#region src/composables/useLocale/index.ts
8
- /**
9
- * @module useLocale
10
- *
11
- * @remarks
12
- * Internationalization (i18n) composable with adapter pattern for message translation.
13
- *
14
- * Key features:
15
- * - Locale selection with createSingle
16
- * - Token-based message storage with useTokens
17
- * - Numbered and named placeholder support ({0}, {name})
18
- * - Number formatting with Intl.NumberFormat
19
- * - Adapter pattern for integration with i18n providers
20
- *
21
- * Integrates with createSingle for locale selection and useTokens for message resolution.
22
- */
23
- /**
24
- * Creates a new locale instance.
25
- *
26
- * @param options The options for the locale instance.
27
- * @template Z The type of the locale ticket.
28
- * @template E The type of the locale context.
29
- * @returns A new locale instance.
30
- *
31
- * @see https://0.vuetifyjs.com/composables/plugins/use-locale
32
- */
33
- function createLocale(_options = {}) {
34
- const { adapter = new Vuetify0LocaleAdapter(), messages = {}, fallback: fallbackLocale, ...options } = _options;
35
- const tokens = createTokens(messages);
36
- const registry = createSingle(options);
37
- for (const id in messages) {
38
- registry.register({ id });
39
- if (id === options.default && !registry.selectedId.value) registry.select(id);
40
- }
41
- function t(key, params, fallback) {
42
- const locale = registry.selectedId.value;
43
- const args = toArray(params);
44
- if (!locale) return adapter.t(fallback ?? key, ...args);
45
- const path = `${locale}.${key}`;
46
- const message = tokens.get(path)?.value;
47
- if (/* @__PURE__ */ isString(message)) return adapter.t(resolve(locale, message), ...args);
48
- if (fallbackLocale) {
49
- const fbMessage = tokens.get(`${fallbackLocale}.${key}`)?.value;
50
- if (/* @__PURE__ */ isString(fbMessage)) return adapter.t(resolve(fallbackLocale, fbMessage), ...args);
51
- }
52
- return adapter.t(fallback ?? key, ...args);
53
- }
54
- function n(value, ...params) {
55
- return adapter.n(value, registry.selectedId.value, ...params);
56
- }
57
- function resolve(locale, str, visited = /* @__PURE__ */ new Set()) {
58
- return str.replace(/{([a-zA-Z0-9.-_]+)}/g, (match, key) => {
59
- const [prefix, ...rest] = key.split(".");
60
- const target = registry.has(prefix) ? prefix : locale;
61
- const path = `${target}.${registry.has(prefix) ? rest.join(".") : key}`;
62
- if (visited.has(path)) return match;
63
- visited.add(path);
64
- const resolved = tokens.get(path)?.value;
65
- if (/* @__PURE__ */ isString(resolved)) return resolve(target, resolved, visited);
66
- return match;
67
- });
68
- }
69
- return {
70
- ...registry,
71
- t,
72
- n,
73
- get size() {
74
- return registry.size;
75
- }
76
- };
77
- }
78
- function createLocaleFallback() {
79
- return {
80
- size: 0,
81
- t: (key, _params, fallback) => fallback ?? key,
82
- n: String
83
- };
84
- }
85
- const [createLocaleContext, createLocalePlugin, useLocale] = createPluginContext("v0:locale", (options) => createLocale(options), { fallback: () => createLocaleFallback() });
86
- //#endregion
87
- export { useLocale as a, createLocalePlugin as i, createLocaleContext as n, createLocaleFallback as r, createLocale as t };
@@ -1,22 +0,0 @@
1
- import { o as ID } from "./index-Dor6eAEc.mjs";
2
-
3
- //#region src/composables/useLocale/adapters/adapter.d.ts
4
- interface LocaleAdapter {
5
- t: (message: string, ...params: unknown[]) => string;
6
- n: (value: number, locale: ID | undefined, ...params: unknown[]) => string;
7
- }
8
- //#endregion
9
- //#region src/composables/useLocale/adapters/v0.d.ts
10
- /**
11
- * Vuetify0.x locale adapter implementation
12
- *
13
- * This adapter provides translation and number formatting
14
- * capabilities using the Intl API and supports both
15
- * numbered ({0}, {1}) and named ({name}) variables in translation strings.
16
- */
17
- declare class Vuetify0LocaleAdapter implements LocaleAdapter {
18
- t(message: string, ...params: unknown[]): string;
19
- n(value: number, locale: ID | undefined, ...params: unknown[]): string;
20
- }
21
- //#endregion
22
- export { LocaleAdapter as n, Vuetify0LocaleAdapter as t };
@@ -1,35 +0,0 @@
1
- import { t as IN_BROWSER } from "./globals-ClSU6mqC.mjs";
2
- import { isObject, isUndefined } from "./utilities/index.mjs";
3
- //#region src/composables/useLocale/adapters/v0.ts
4
- /**
5
- * Vuetify0.x locale adapter implementation
6
- *
7
- * This adapter provides translation and number formatting
8
- * capabilities using the Intl API and supports both
9
- * numbered ({0}, {1}) and named ({name}) variables in translation strings.
10
- */
11
- var Vuetify0LocaleAdapter = class {
12
- t(message, ...params) {
13
- let resolvedMessage = message;
14
- if (params.length > 0 && /* @__PURE__ */ isObject(params[0])) {
15
- const variables = params[0];
16
- resolvedMessage = resolvedMessage.replace(/{([a-zA-Z][a-zA-Z0-9_]*)}/g, (match, name) => {
17
- return /* @__PURE__ */ isUndefined(variables[name]) ? match : String(variables[name]);
18
- });
19
- params = params.slice(1);
20
- }
21
- resolvedMessage = resolvedMessage.replace(/\{(\d+)\}/g, (match, index) => {
22
- const idx = Number.parseInt(index, 10);
23
- if (!/* @__PURE__ */ isUndefined(params[idx])) return String(params[idx]);
24
- return match;
25
- });
26
- return resolvedMessage;
27
- }
28
- n(value, locale, ...params) {
29
- if (!IN_BROWSER || !locale) return value.toString();
30
- const options = params[0];
31
- return new Intl.NumberFormat(String(locale), options).format(value);
32
- }
33
- };
34
- //#endregion
35
- export { Vuetify0LocaleAdapter as t };