@vuetify/v0 1.2.0 → 1.2.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.
- package/README.md +5 -0
- package/dist/{adapter-CqS8xexO.d.mts → adapter-FckJSz_o.d.mts} +1 -1
- package/dist/browser/index.d.ts +155 -97
- package/dist/browser/index.js +148 -63
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{components-DBhVg-t1.mjs → components-MCFhfNlt.mjs} +56 -38
- package/dist/composables/index.d.mts +7 -7
- package/dist/composables/index.mjs +23 -23
- package/dist/{composables-ZGhVN2EJ.mjs → composables-8xtFVviy.mjs} +7 -7
- package/dist/constants/index.mjs +1 -1
- package/dist/{createDataTable-VmQEDn-7.mjs → createDataTable-OCGnpy-N.mjs} +4 -4
- package/dist/{createGroup-B_LL7xRr.mjs → createGroup-DtVYu-VY.mjs} +13 -2
- package/dist/{createRegistry-DVdvep0v.mjs → createRegistry-DSQiALGi.mjs} +3 -3
- package/dist/{createSelection-BNdDz8oY.mjs → createSelection-TB5oK1FG.mjs} +2 -1
- package/dist/{createSingle-DHyIQ9Cj.mjs → createSingle-CV1qigP2.mjs} +1 -1
- package/dist/{createTokens-DoISbwd7.mjs → createTokens-B0CqJEL6.mjs} +2 -2
- package/dist/data-table/index.d.mts +1 -1
- package/dist/data-table/index.mjs +1 -1
- package/dist/date/index.mjs +1 -1
- package/dist/features/adapters/posthog/index.mjs +1 -1
- package/dist/features/index.d.mts +1 -1
- package/dist/features/index.mjs +1 -1
- package/dist/{globals-DaoKtIGF.mjs → globals-wvVdMRFF.mjs} +1 -1
- package/dist/{index-Di9e8sOm.d.mts → index-3bThcqCN.d.mts} +2 -2
- package/dist/{index-D0ub61GV.d.mts → index-3vvA76pZ.d.mts} +1 -1
- package/dist/{index-DSPkZ0ql.d.mts → index-4Z38WhA9.d.mts} +7 -1
- package/dist/{index-Cm6CbqI6.d.mts → index-BTdCsSz0.d.mts} +25 -18
- package/dist/{index-DjRE4lLl.d.mts → index-CORslci7.d.mts} +17 -4
- package/dist/{index-Cx0cWGlx.d.mts → index-Dgkt7Ve9.d.mts} +43 -11
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +25 -25
- package/dist/json/attributes.json +14 -2
- package/dist/json/tags.json +3 -0
- package/dist/json/web-types.json +32 -3
- package/dist/locale/adapters/index.d.mts +2 -2
- package/dist/locale/adapters/index.mjs +1 -1
- package/dist/locale/adapters/v0/index.d.mts +1 -1
- package/dist/locale/adapters/v0/index.mjs +1 -1
- package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
- package/dist/locale/index.d.mts +3 -3
- package/dist/locale/index.mjs +2 -2
- package/dist/locale/messages/en/index.d.mts +3 -0
- package/dist/locale/messages/en/index.mjs +1 -0
- package/dist/logger/adapters/index.mjs +1 -1
- package/dist/logger/adapters/v0/index.mjs +1 -1
- package/dist/logger/index.d.mts +1 -1
- package/dist/logger/index.mjs +2 -2
- package/dist/notifications/index.d.mts +1 -1
- package/dist/notifications/index.mjs +2 -2
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +2 -2
- package/dist/palettes/material/index.d.mts +1 -1
- package/dist/palettes/md1/index.d.mts +1 -1
- package/dist/palettes/md2/index.d.mts +1 -1
- package/dist/palettes/radix/index.d.mts +1 -1
- package/dist/palettes/tailwind/index.d.mts +1 -1
- package/dist/permissions/adapters/index.d.mts +1 -1
- package/dist/permissions/adapters/v0/index.d.mts +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/permissions/index.mjs +1 -1
- package/dist/popover/adapters/floating-ui/index.mjs +1 -1
- package/dist/popover/index.d.mts +1 -1
- package/dist/popover/index.mjs +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/storage/index.d.mts +1 -1
- package/dist/storage/index.mjs +1 -1
- package/dist/theme/adapters/index.d.mts +1 -1
- package/dist/theme/adapters/index.mjs +2 -2
- package/dist/theme/adapters/unhead/index.d.mts +1 -1
- package/dist/theme/adapters/unhead/index.mjs +1 -1
- package/dist/theme/adapters/v0/index.d.mts +1 -1
- package/dist/theme/adapters/v0/index.mjs +1 -1
- package/dist/theme/index.d.mts +1 -1
- package/dist/theme/index.mjs +3 -3
- package/dist/{unhead-C8zbWr45.mjs → unhead-SyU953Pt.mjs} +1 -1
- package/dist/{useEventListener-2eAMwUdw.mjs → useEventListener-hF6R2p6X.mjs} +1 -1
- package/dist/{useFeatures-DLafCOWt.mjs → useFeatures-CTpkM6hV.mjs} +2 -2
- package/dist/{useLocale-K_45ulPt.mjs → useLocale-D-iWu08b.mjs} +3 -3
- package/dist/{useLogger-YyWuYvrH.mjs → useLogger-CDsgHbzO.mjs} +2 -2
- package/dist/{useNotifications-Kh_KvM7j.mjs → useNotifications-DhNjvRt1.mjs} +2 -2
- package/dist/{usePermissions-BCGwsOES.mjs → usePermissions-CKe8xcvz.mjs} +1 -1
- package/dist/{usePopover-BTo0AGIQ.mjs → usePopover-DyAdne_S.mjs} +10 -9
- package/dist/{useRovingFocus-CkRnVmJ1.mjs → useRovingFocus-D0OOozbe.mjs} +54 -29
- package/dist/{useRules-BuE5ffOJ.mjs → useRules-DA8bNhNq.mjs} +2 -2
- package/dist/{useStorage-BT8-mjVs.mjs → useStorage-D9c6xx4N.mjs} +3 -3
- package/dist/{useTheme-DkK6tPqY.mjs → useTheme-BrXA5VBp.mjs} +5 -5
- package/dist/{useTimer-CGVXk397.mjs → useTimer-DLtkRCHw.mjs} +1 -1
- package/dist/utilities/index.d.mts +1 -1
- package/dist/utilities/index.mjs +35 -12
- package/dist/{v0-CDW1Ktk-.d.mts → v0-C09lR5fc.d.mts} +1 -1
- package/dist/{v0-B_53w7Fu.mjs → v0-CaTmC7C4.mjs} +1 -1
- package/dist/{v0-SuxTihEe.mjs → v0-DpFVF6pD.mjs} +1 -1
- package/dist/{v0-D0Exc2bO.mjs → v0-cC-WxCLd.mjs} +1 -1
- package/package.json +1 -1
package/dist/utilities/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "../globals-
|
|
1
|
+
import { t as IN_BROWSER } from "../globals-wvVdMRFF.mjs";
|
|
2
2
|
import * as Vue from "vue";
|
|
3
3
|
import { useId as useId$1 } from "vue";
|
|
4
4
|
//#region src/utilities/color.ts
|
|
@@ -184,11 +184,38 @@ function project(ranges, map) {
|
|
|
184
184
|
}
|
|
185
185
|
return projected;
|
|
186
186
|
}
|
|
187
|
+
function search(text, query, ignoreCase, foldQuery, foldTarget, matchAll) {
|
|
188
|
+
const folded = foldQuery ? fold(query) : query;
|
|
189
|
+
const needle = ignoreCase ? lower(folded) : folded;
|
|
190
|
+
if (needle.length === 0) return [];
|
|
191
|
+
if (!foldTarget) {
|
|
192
|
+
if (!ignoreCase) return collect(text, needle, matchAll);
|
|
193
|
+
const lowered = lower(text);
|
|
194
|
+
if (lowered.length === text.length) return collect(lowered, needle, matchAll);
|
|
195
|
+
}
|
|
196
|
+
const { folded: haystack, map } = foldWithMap(text, ignoreCase, foldTarget);
|
|
197
|
+
return project(collect(haystack, needle, matchAll), map);
|
|
198
|
+
}
|
|
199
|
+
function mergeRanges(a, b) {
|
|
200
|
+
const combined = [...a, ...b].toSorted((x, y) => x[0] - y[0] || x[1] - y[1]);
|
|
201
|
+
const merged = [];
|
|
202
|
+
for (const range of combined) {
|
|
203
|
+
const last = merged.at(-1);
|
|
204
|
+
if (last && range[0] < last[1]) continue;
|
|
205
|
+
merged.push(range);
|
|
206
|
+
}
|
|
207
|
+
return merged;
|
|
208
|
+
}
|
|
187
209
|
/**
|
|
188
210
|
* Finds `[start, end]` index pairs where `query` occurs in `text`, optionally
|
|
189
211
|
* folding accents on either side. Returned indices always address the original
|
|
190
212
|
* `text`, even when folding or case-conversion changed its length.
|
|
191
213
|
*
|
|
214
|
+
* Directional folding (`'query'` or `'target'`) only transforms one side, but
|
|
215
|
+
* a spelling that's already identical on both sides — accents and all — is
|
|
216
|
+
* merged in verbatim, so folding one side never hides a match the other side
|
|
217
|
+
* already has.
|
|
218
|
+
*
|
|
192
219
|
* @param text The string to search.
|
|
193
220
|
* @param query The term to look for. An empty query yields no ranges.
|
|
194
221
|
* @param options Optional `ignoreCase`, `ignoreAccents`, `matchAll`.
|
|
@@ -203,6 +230,9 @@ function project(ranges, map) {
|
|
|
203
230
|
*
|
|
204
231
|
* findMatchRanges('Łódź', 'Lo', { ignoreAccents: 'target' })
|
|
205
232
|
* // [[0, 2]]
|
|
233
|
+
*
|
|
234
|
+
* findMatchRanges('… Kraków …', 'Kraków', { ignoreAccents: 'query' })
|
|
235
|
+
* // [[2, 8]] — typing the exact accented name always finds itself
|
|
206
236
|
* ```
|
|
207
237
|
*/
|
|
208
238
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -210,16 +240,9 @@ function findMatchRanges(text, query, options = {}) {
|
|
|
210
240
|
const { ignoreCase = false, ignoreAccents = false, matchAll = false } = options;
|
|
211
241
|
const foldQuery = ignoreAccents === true || ignoreAccents === "query";
|
|
212
242
|
const foldTarget = ignoreAccents === true || ignoreAccents === "target";
|
|
213
|
-
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
if (!foldTarget) {
|
|
217
|
-
if (!ignoreCase) return collect(text, needle, matchAll);
|
|
218
|
-
const lowered = lower(text);
|
|
219
|
-
if (lowered.length === text.length) return collect(lowered, needle, matchAll);
|
|
220
|
-
}
|
|
221
|
-
const { folded: haystack, map } = foldWithMap(text, ignoreCase, foldTarget);
|
|
222
|
-
return project(collect(haystack, needle, matchAll), map);
|
|
243
|
+
if (foldQuery === foldTarget) return search(text, query, ignoreCase, foldQuery, foldTarget, matchAll);
|
|
244
|
+
const merged = mergeRanges(search(text, query, ignoreCase, false, false, true), search(text, query, ignoreCase, foldQuery, foldTarget, true));
|
|
245
|
+
return matchAll ? merged : merged.slice(0, 1);
|
|
223
246
|
}
|
|
224
247
|
//#endregion
|
|
225
248
|
//#region src/utilities/instance.ts
|
|
@@ -443,7 +466,7 @@ function isElement(item) {
|
|
|
443
466
|
*/
|
|
444
467
|
/* @__NO_SIDE_EFFECTS__ */
|
|
445
468
|
function getActiveElement() {
|
|
446
|
-
if (
|
|
469
|
+
if (!IN_BROWSER) return null;
|
|
447
470
|
let active = document.activeElement;
|
|
448
471
|
while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
|
|
449
472
|
return active;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "./globals-
|
|
1
|
+
import { t as IN_BROWSER } from "./globals-wvVdMRFF.mjs";
|
|
2
2
|
import { isFunction } from "./utilities/index.mjs";
|
|
3
3
|
import { t as LoggerAdapter } from "./adapter-Chznb9Ju.mjs";
|
|
4
4
|
//#region src/composables/useLogger/adapters/v0.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "./globals-
|
|
1
|
+
import { t as IN_BROWSER } from "./globals-wvVdMRFF.mjs";
|
|
2
2
|
import { isObject, isString, isUndefined } from "./utilities/index.mjs";
|
|
3
3
|
import { t as LocaleAdapter } from "./adapter-D8zizQVP.mjs";
|
|
4
4
|
//#region src/composables/useLocale/adapters/v0.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuetify/v0",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Headless, unstyled, accessible Vue 3 primitives and composables — a meta UI framework for building applications, component libraries, and design systems",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|