@vuetify/v0 0.2.1 → 1.0.0-alpha.1

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 (113) hide show
  1. package/README.md +5 -1
  2. package/dist/{adapter-CCIeOzqr.mjs → adapter-CDpOQ8sn.mjs} +29 -20
  3. package/dist/{adapter-CcHB7rs3.d.mts → adapter-DoziXEzS.d.mts} +1 -1
  4. package/dist/{adapter-Drq1v5wV.mjs → adapter-DtgIrQsG.mjs} +5 -2
  5. package/dist/{adapter-BZjmDNJF.d.mts → adapter-J7ude3gO.d.mts} +2 -2
  6. package/dist/adapters-CFjrKxA2.mjs +5 -0
  7. package/dist/adapters-CiCexgsk.mjs +4 -0
  8. package/dist/{adapters-Cd8NDs18.mjs → adapters-Da2twiUn.mjs} +1 -1
  9. package/dist/adapters-DegUcfkd.mjs +2 -0
  10. package/dist/browser/index.js +10113 -8547
  11. package/dist/components/index.d.mts +3 -3
  12. package/dist/components/index.mjs +2 -2
  13. package/dist/{components-C142GPl_.mjs → components-CaPQCjo5.mjs} +1356 -386
  14. package/dist/composables/index.d.mts +11 -11
  15. package/dist/composables/index.mjs +24 -24
  16. package/dist/constants/index.mjs +2 -2
  17. package/dist/{createDataTable-DKE5QsMe.mjs → createDataTable-B4UflKnT.mjs} +100 -30
  18. package/dist/{createGroup-CzRZ9COh.mjs → createGroup-BC2nfttd.mjs} +24 -9
  19. package/dist/{createPagination-Tp4C4He8.mjs → createPagination-qvJkcTUY.mjs} +11 -7
  20. package/dist/{createSelection-Dsb3I0zm.mjs → createSelection-BA9guLah.mjs} +28 -21
  21. package/dist/{createSingle-C7IGUjP6.mjs → createSingle-BHxHLZeg.mjs} +13 -17
  22. package/dist/{createTokens-CHTawmud.mjs → createTokens-oJAeh262.mjs} +27 -15
  23. package/dist/{createTrinity-vvXk0ARD.mjs → createTrinity-BTCs1pYx.mjs} +34 -31
  24. package/dist/data-table/adapters/client/index.d.mts +1 -1
  25. package/dist/data-table/adapters/client/index.mjs +1 -1
  26. package/dist/data-table/adapters/index.d.mts +4 -4
  27. package/dist/data-table/adapters/index.mjs +5 -5
  28. package/dist/data-table/adapters/server/index.d.mts +1 -1
  29. package/dist/data-table/adapters/server/index.mjs +1 -1
  30. package/dist/data-table/adapters/virtual/index.d.mts +1 -1
  31. package/dist/data-table/adapters/virtual/index.mjs +1 -1
  32. package/dist/data-table/index.d.mts +6 -6
  33. package/dist/data-table/index.mjs +6 -6
  34. package/dist/date/index.mjs +1 -1
  35. package/dist/features/adapters/posthog/index.mjs +1 -1
  36. package/dist/features/index.d.mts +1 -1
  37. package/dist/features/index.mjs +1 -1
  38. package/dist/{globals-BrRJkuSY.mjs → globals-Berkg6mP.mjs} +1 -1
  39. package/dist/{htmlElements-DcYtv0hg.mjs → htmlElements-CIePKaTX.mjs} +1 -1
  40. package/dist/{index-76fQGkkO.d.mts → index-D4odwkZg.d.mts} +8 -11
  41. package/dist/{index-B_XLHftL.d.mts → index-DFvLSoto.d.mts} +296 -258
  42. package/dist/{index-DoGxDgdN.d.mts → index-DVPq3_Fz.d.mts} +55 -4
  43. package/dist/{index-BFuSOgUi.d.mts → index-Gk3x_7zD.d.mts} +1570 -437
  44. package/dist/{index-BUsrN1vL.d.mts → index-TtSSvHY6.d.mts} +1 -1
  45. package/dist/index.d.mts +12 -12
  46. package/dist/index.mjs +27 -27
  47. package/dist/json/attributes.json +276 -0
  48. package/dist/json/importMap.json +60 -0
  49. package/dist/json/tags.json +136 -2
  50. package/dist/json/web-types.json +1183 -344
  51. package/dist/locale/adapters/index.d.mts +2 -2
  52. package/dist/locale/adapters/index.mjs +2 -2
  53. package/dist/locale/adapters/v0/index.d.mts +1 -1
  54. package/dist/locale/adapters/v0/index.mjs +1 -1
  55. package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
  56. package/dist/locale/index.d.mts +3 -3
  57. package/dist/locale/index.mjs +2 -2
  58. package/dist/logger/adapters/index.mjs +2 -2
  59. package/dist/logger/adapters/v0/index.mjs +1 -1
  60. package/dist/logger/index.d.mts +1 -1
  61. package/dist/logger/index.mjs +2 -2
  62. package/dist/notifications/index.d.mts +1 -1
  63. package/dist/notifications/index.mjs +1 -1
  64. package/dist/palettes/ant/index.d.mts +1 -1
  65. package/dist/palettes/index.d.mts +2 -2
  66. package/dist/palettes/material/index.d.mts +1 -1
  67. package/dist/palettes/md1/index.d.mts +1 -1
  68. package/dist/palettes/md2/index.d.mts +1 -1
  69. package/dist/palettes/radix/index.d.mts +1 -1
  70. package/dist/palettes/tailwind/index.d.mts +1 -1
  71. package/dist/permissions/adapters/index.d.mts +1 -1
  72. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  73. package/dist/permissions/index.d.mts +1 -1
  74. package/dist/permissions/index.mjs +1 -1
  75. package/dist/{posthog-Ccm8FQfD.mjs → posthog-CPvNHMUb.mjs} +1 -1
  76. package/dist/rules/index.d.mts +1 -1
  77. package/dist/rules/index.mjs +1 -1
  78. package/dist/{server-CIftA0pK.mjs → server-B6OtHgBT.mjs} +1 -1
  79. package/dist/{server-DNUTnISs.d.mts → server-ZiHJ4tfq.d.mts} +1 -1
  80. package/dist/storage/index.d.mts +1 -1
  81. package/dist/storage/index.mjs +1 -1
  82. package/dist/theme/adapters/index.d.mts +1 -1
  83. package/dist/theme/adapters/index.mjs +4 -4
  84. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  85. package/dist/theme/adapters/unhead/index.mjs +1 -1
  86. package/dist/theme/adapters/v0/index.d.mts +1 -1
  87. package/dist/theme/adapters/v0/index.mjs +1 -1
  88. package/dist/theme/index.d.mts +1 -1
  89. package/dist/theme/index.mjs +3 -3
  90. package/dist/{toArray-doLQVI56.mjs → toArray-BA_JxFPv.mjs} +9 -0
  91. package/dist/{unhead--58lO3Z-.mjs → unhead-D2YqAcmF.mjs} +2 -2
  92. package/dist/{useClickOutside-BjO3Nty9.mjs → useClickOutside-B9a6Jext.mjs} +572 -160
  93. package/dist/{useFeatures-D9bGOvh4.mjs → useFeatures-wgMwaQ5W.mjs} +14 -5
  94. package/dist/{useLocale-BRQTt3Ka.mjs → useLocale-qMmVnAwS.mjs} +14 -5
  95. package/dist/{useLogger-Daz-Zr0z.mjs → useLogger-DFIRqm-N.mjs} +33 -16
  96. package/dist/{usePermissions-Yp3guoLH.mjs → usePermissions-tZhkBJmq.mjs} +11 -3
  97. package/dist/{useRules-BFPH7q8w.mjs → useRules-D3UXEtu7.mjs} +10 -2
  98. package/dist/{useTheme-zRa0Nh_g.mjs → useTheme-BeD__R8t.mjs} +14 -5
  99. package/dist/utilities/index.mjs +5 -5
  100. package/dist/{v0-CcV0VwYd.mjs → v0-6XptGYVx.mjs} +2 -2
  101. package/dist/{v0-DOq_Ia5H.mjs → v0-BG7RhKBv.mjs} +2 -2
  102. package/dist/{v0-Bno8FQ_F.mjs → v0-CNitYI9N.mjs} +1 -1
  103. package/dist/{v0-BpgPZ1qB.d.mts → v0-CWXUkMY0.d.mts} +1 -1
  104. package/dist/{v0-BAG8p0si.d.mts → v0-Dzw5OwNo.d.mts} +1 -1
  105. package/dist/{v0-D-AEQbvj.mjs → v0-I2mHxD9T.mjs} +1 -1
  106. package/dist/{virtual-BaQWQ9ji.d.mts → virtual-BCOfxnRS.d.mts} +1 -1
  107. package/dist/{virtual-D1HwNBLS.mjs → virtual-To-dSw2_.mjs} +2 -2
  108. package/package.json +10 -7
  109. package/SKILL.md +0 -95
  110. package/dist/adapters-BbNfjyvY.mjs +0 -5
  111. package/dist/adapters-BzRMo72Y.mjs +0 -4
  112. package/dist/adapters-_DyP1X4U.mjs +0 -2
  113. /package/dist/{index-c55Utzva.d.mts → index-DvuJXuAN.d.mts} +0 -0
package/README.md CHANGED
@@ -81,6 +81,7 @@ import { ... } from '@vuetify/v0/date' // Date adapter and utilities
81
81
 
82
82
  | Component | Description |
83
83
  |-----------|-------------|
84
+ | [AspectRatio](https://0.vuetifyjs.com/components/primitives/aspect-ratio) | Fixed width-to-height ratio container via CSS `aspect-ratio` |
84
85
  | [Atom](https://0.vuetifyjs.com/components/primitives/atom) | Polymorphic base element with dynamic `as` prop and renderless mode |
85
86
  | [Portal](https://0.vuetifyjs.com/components/primitives/portal) | Teleport wrapper with automatic z-index stacking via useStack |
86
87
  | [Presence](https://0.vuetifyjs.com/components/primitives/presence) | Animation-agnostic mount lifecycle with lazy mounting and exit timing |
@@ -137,6 +138,8 @@ import { ... } from '@vuetify/v0/date' // Date adapter and utilities
137
138
  |-----------|-------------|
138
139
  | [Avatar](https://0.vuetifyjs.com/components/semantic/avatar) | Image/fallback avatar with priority loading |
139
140
  | [Breadcrumbs](https://0.vuetifyjs.com/components/semantic/breadcrumbs) | Navigation breadcrumbs with overflow detection and truncation |
141
+ | [Carousel](https://0.vuetifyjs.com/components/semantic/carousel) | Scroll-snap slide navigation with multi-slide display and drag/swipe |
142
+ | [Image](https://0.vuetifyjs.com/components/semantic/image) | Image with placeholder, error fallback, and lazy loading |
140
143
  | [Pagination](https://0.vuetifyjs.com/components/semantic/pagination) | Page navigation with semantic `<nav>` wrapper |
141
144
  | [Snackbar](https://0.vuetifyjs.com/components/semantic/snackbar) | Toast notification with queue, positioning, and auto-dismiss |
142
145
  | [Splitter](https://0.vuetifyjs.com/components/semantic/splitter) | Resizable panel layout with drag handles |
@@ -209,6 +212,7 @@ Selection management composables built on `createRegistry`:
209
212
  - [`useClickOutside`](https://0.vuetifyjs.com/composables/system/use-click-outside) - Click outside detection with cleanup
210
213
  - [`useEventListener`](https://0.vuetifyjs.com/composables/system/use-event-listener) - Lifecycle-managed event listeners
211
214
  - [`useHotkey`](https://0.vuetifyjs.com/composables/system/use-hotkey) - Hotkey combinations and sequences
215
+ - [`useImage`](https://0.vuetifyjs.com/composables/system/use-image) - Image loading state machine with deferred loading and retry
212
216
  - [`useIntersectionObserver`](https://0.vuetifyjs.com/composables/system/use-intersection-observer) - Intersection observer with auto-cleanup
213
217
  - [`useLazy`](https://0.vuetifyjs.com/composables/system/use-lazy) - Deferred content rendering for dialogs, menus, and tooltips
214
218
  - [`useMediaQuery`](https://0.vuetifyjs.com/composables/system/use-media-query) - Reactive CSS media query matching
@@ -283,7 +287,7 @@ pnpm validate
283
287
 
284
288
  ## Contributing
285
289
 
286
- We are not currently accepting external contributions. Check back later or join our [Discord community](https://community.vuetifyjs.com) for updates.
290
+ v0 is in alpha open for feedback, bug reports, and contributions. See the [Alpha Roadmap](https://0.vuetifyjs.com/roadmap#alpha) for what's planned and how to get involved.
287
291
 
288
292
  ## License
289
293
 
@@ -1,6 +1,6 @@
1
1
  import { isArray, isNaN, isNullOrUndefined, isNumber, isObject, isString } from "./utilities/index.mjs";
2
- import { i as useContext, n as createContext, t as createTrinity } from "./createTrinity-vvXk0ARD.mjs";
3
- import { t as toArray } from "./toArray-doLQVI56.mjs";
2
+ import { i as useContext, t as createTrinity } from "./createTrinity-BTCs1pYx.mjs";
3
+ import { t as toArray } from "./toArray-BA_JxFPv.mjs";
4
4
  import { computed, shallowRef, toRef, toValue } from "vue";
5
5
  //#region src/composables/createFilter/index.ts
6
6
  /**
@@ -20,6 +20,15 @@ import { computed, shallowRef, toRef, toValue } from "vue";
20
20
  * - Perfect for search, multi-criteria filtering
21
21
  *
22
22
  * Filters arrays based on query strings with configurable matching strategies.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * import { createFilter } from '@vuetify/v0'
27
+ *
28
+ * const filter = createFilter({ mode: 'some' })
29
+ * const { items } = filter.apply('an', ['apple', 'banana', 'cherry'])
30
+ * console.log(items.value) // ['banana']
31
+ * ```
23
32
  */
24
33
  function defaultFilter(query, item, keys, mode = "some") {
25
34
  const queries = toArray(query).map((q) => String(q).toLowerCase());
@@ -105,12 +114,7 @@ function createFilter(options = {}) {
105
114
  */
106
115
  function createFilterContext(_options = {}) {
107
116
  const { namespace = "v0:filter", ...options } = _options;
108
- const [useFilterContext, _provideFilterContext] = createContext(namespace);
109
- const context = createFilter(options);
110
- function provideFilterContext(_context = context, app) {
111
- return _provideFilterContext(_context, app);
112
- }
113
- return createTrinity(useFilterContext, provideFilterContext, context);
117
+ return createTrinity(namespace, createFilter(options));
114
118
  }
115
119
  /**
116
120
  * Returns the current filter context from dependency injection.
@@ -149,29 +153,30 @@ function useFilter(namespace = "v0:filter") {
149
153
  * used by client-side adapters. Server adapters that delegate pipeline
150
154
  * operations externally can implement DataTableAdapterInterface directly.
151
155
  */
152
- function getNestedValue(obj, key) {
153
- const keys = key.split(".");
156
+ function getNestedValue(obj, parts) {
154
157
  let result = obj;
155
- for (const k of keys) {
158
+ for (const k of parts) {
156
159
  if (/* @__PURE__ */ isNullOrUndefined(result)) return void 0;
157
160
  result = result[k];
158
161
  }
159
162
  return result;
160
163
  }
161
- function compareValues(a, b, locale) {
164
+ function compareValues(a, b, collator) {
162
165
  if (a === b) return 0;
163
166
  const aNil = /* @__PURE__ */ isNullOrUndefined(a);
164
167
  const bNil = /* @__PURE__ */ isNullOrUndefined(b);
165
168
  if (aNil && bNil) return 0;
166
169
  if (aNil) return 1;
167
170
  if (bNil) return -1;
168
- if (/* @__PURE__ */ isString(a) && /* @__PURE__ */ isString(b)) return a.localeCompare(b, locale);
171
+ if (/* @__PURE__ */ isString(a) && /* @__PURE__ */ isString(b)) return collator ? collator.compare(a, b) : a.localeCompare(b);
169
172
  if (/* @__PURE__ */ isNumber(a) && /* @__PURE__ */ isNumber(b)) {
170
173
  if (/* @__PURE__ */ isNaN(a)) return 1;
171
174
  if (/* @__PURE__ */ isNaN(b)) return -1;
172
175
  return a - b;
173
176
  }
174
- return String(a).localeCompare(String(b), locale);
177
+ const sa = String(a);
178
+ const sb = String(b);
179
+ return collator ? collator.compare(sa, sb) : sa.localeCompare(sb);
175
180
  }
176
181
  var DataTableAdapter = class {
177
182
  /** Create the filter pipeline stage */
@@ -211,13 +216,17 @@ var DataTableAdapter = class {
211
216
  return computed(() => {
212
217
  const entries = sortBy.value;
213
218
  if (entries.length === 0) return filteredItems.value;
214
- const loc = locale?.value;
219
+ const collator = new Intl.Collator(locale?.value);
220
+ const resolved = entries.map(({ key, direction }) => ({
221
+ parts: key.split("."),
222
+ direction,
223
+ custom: customSorts?.[key]
224
+ }));
215
225
  return filteredItems.value.toSorted((a, b) => {
216
- for (const { key, direction } of entries) {
217
- const aVal = getNestedValue(a, key);
218
- const bVal = getNestedValue(b, key);
219
- const customSort = customSorts?.[key];
220
- const cmp = customSort ? customSort(aVal, bVal) : compareValues(aVal, bVal, loc);
226
+ for (const { parts, direction, custom } of resolved) {
227
+ const aVal = parts.length === 1 ? a[parts[0]] : getNestedValue(a, parts);
228
+ const bVal = parts.length === 1 ? b[parts[0]] : getNestedValue(b, parts);
229
+ const cmp = custom ? custom(aVal, bVal) : compareValues(aVal, bVal, collator);
221
230
  if (cmp !== 0) return direction === "desc" ? -cmp : cmp;
222
231
  }
223
232
  return 0;
@@ -1,5 +1,5 @@
1
1
  import { o as ID } from "./index-B_AlCD7t.mjs";
2
- import { c as TokenTicket, i as TokenContext } from "./index-BUsrN1vL.mjs";
2
+ import { c as TokenTicket, i as TokenContext } from "./index-TtSSvHY6.mjs";
3
3
  import { Ref } from "vue";
4
4
 
5
5
  //#region src/composables/useLocale/adapters/adapter.d.ts
@@ -1,6 +1,8 @@
1
1
  import { hexToRgb, isUndefined } from "./utilities/index.mjs";
2
2
  //#region src/composables/useTheme/adapters/adapter.ts
3
- var ThemeAdapter = class {
3
+ var ThemeAdapter = class ThemeAdapter {
4
+ static UNSAFE_CSS = /url\s*\(|@import|expression\s*\(|[{}]/i;
5
+ static SAFE_IDENT = /^[a-zA-Z0-9_-]+$/;
4
6
  stylesheetId = "v0-theme-stylesheet";
5
7
  prefix;
6
8
  rgb = false;
@@ -12,7 +14,8 @@ var ThemeAdapter = class {
12
14
  for (const theme in colors) {
13
15
  const themeColors = colors[theme];
14
16
  if (!themeColors) continue;
15
- const vars = Object.entries(themeColors).map(([key, val]) => ` --${this.prefix}-${key}: ${this.rgb ? this.decompose(val) : val};`).join("\n");
17
+ if (!ThemeAdapter.SAFE_IDENT.test(theme)) continue;
18
+ const vars = Object.entries(themeColors).filter(([key, val]) => ThemeAdapter.SAFE_IDENT.test(key) && !ThemeAdapter.UNSAFE_CSS.test(val)).map(([key, val]) => ` --${this.prefix}-${key}: ${this.rgb ? this.decompose(val) : val};`).join("\n");
16
19
  css += `[data-theme="${theme}"] {\n${vars}\n color: var(--${this.prefix}-on-background);\n}\n`;
17
20
  }
18
21
  if (!/* @__PURE__ */ isUndefined(isDark)) css += `:root {\n color-scheme: ${isDark ? "dark" : "light"};\n}\n`;
@@ -1,4 +1,4 @@
1
- import { t as ContextTrinity } from "./index-76fQGkkO.mjs";
1
+ import { t as ContextTrinity } from "./index-D4odwkZg.mjs";
2
2
  import * as _$vue from "vue";
3
3
  import { ComputedRef, MaybeRefOrGetter, Ref, ShallowRef, WritableComputedRef } from "vue";
4
4
 
@@ -250,7 +250,7 @@ interface DataTableAdapterContext<T extends Record<string, unknown>> {
250
250
  /** Search query ref */
251
251
  search: ShallowRef<string>;
252
252
  /** Column keys eligible for filtering */
253
- filterableKeys: ReadonlyArray<keyof T & string>;
253
+ filterableKeys: readonly string[];
254
254
  /** Current sort state derived from sort controls */
255
255
  sortBy: Readonly<Ref<SortEntry[]>>;
256
256
  /** Locale for sorting (reactive, from useLocale or options) */
@@ -0,0 +1,5 @@
1
+ import "./adapter-CDpOQ8sn.mjs";
2
+ import "./v0-BG7RhKBv.mjs";
3
+ import "./server-B6OtHgBT.mjs";
4
+ import "./virtual-To-dSw2_.mjs";
5
+ export {};
@@ -0,0 +1,4 @@
1
+ import "./adapter-DtgIrQsG.mjs";
2
+ import "./v0-6XptGYVx.mjs";
3
+ import "./unhead-D2YqAcmF.mjs";
4
+ export {};
@@ -1,3 +1,3 @@
1
1
  import "./pino-9L79n6y6.mjs";
2
- import "./v0-Bno8FQ_F.mjs";
2
+ import "./v0-CNitYI9N.mjs";
3
3
  export {};
@@ -0,0 +1,2 @@
1
+ import "./v0-I2mHxD9T.mjs";
2
+ export {};