@vuetify/v0 1.0.0-alpha.4 → 1.0.0-beta.0
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 +26 -5
- package/dist/{adapter-C9cR4AcY.mjs → adapter-BCVxBtDp.mjs} +11 -11
- package/dist/{adapter-Cr7Bl4la.d.mts → adapter-BO75n0Cn.d.mts} +7 -7
- package/dist/{adapter-C6JmOyYo.d.mts → adapter-DZeI0ZbW.d.mts} +1 -1
- package/dist/{adapter-DgBBe_BW.d.mts → adapter-we-0GbFH.d.mts} +2 -2
- package/dist/adapters-BHD1lc-K.mjs +4 -0
- package/dist/adapters-BYLWDmYl.mjs +5 -0
- package/dist/adapters-BxrTL8E3.mjs +4 -0
- package/dist/adapters-CBgBd7VE.mjs +2 -0
- package/dist/browser/index.js +2860 -908
- package/dist/components/index.d.mts +2 -3
- package/dist/components/index.mjs +2 -2
- package/dist/{components-BWxMSWr7.mjs → components-_uxZ_Zo3.mjs} +1054 -502
- package/dist/composables/index.d.mts +19 -18
- package/dist/composables/index.mjs +26 -26
- package/dist/{consola-Crr4qbeI.d.mts → consola-CUNHyu8J.d.mts} +1 -1
- package/dist/{consola-DYvbPNbF.mjs → consola-cad-VEV2.mjs} +5 -1
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +1 -1
- package/dist/{createDataTable-DDr2yY-A.mjs → createDataTable-DlFQyBTN.mjs} +192 -101
- package/dist/{createGroup-BSGtfBUE.mjs → createGroup-DsKJMuRd.mjs} +2 -2
- package/dist/{createRegistry-Db_juawd.mjs → createRegistry-tJ1PPNIr.mjs} +2 -2
- package/dist/{createSelection-BeKZMxha.mjs → createSelection-DEqhvdoj.mjs} +2 -2
- package/dist/{createSingle-Dms2efxr.mjs → createSingle-ClzWqRCe.mjs} +2 -2
- package/dist/{createTokens-B1lwHZvO.mjs → createTokens-mNxs8DQ3.mjs} +3 -3
- package/dist/{createTrinity-BTCs1pYx.mjs → createTrinity-z-3q9QWR.mjs} +5 -2
- package/dist/data-table/adapters/client/index.d.mts +1 -1
- package/dist/data-table/adapters/client/index.mjs +1 -1
- package/dist/data-table/adapters/index.d.mts +4 -4
- package/dist/data-table/adapters/index.mjs +5 -5
- package/dist/data-table/adapters/server/index.d.mts +1 -1
- package/dist/data-table/adapters/server/index.mjs +1 -1
- package/dist/data-table/adapters/virtual/index.d.mts +1 -1
- package/dist/data-table/adapters/virtual/index.mjs +1 -1
- package/dist/data-table/index.d.mts +6 -6
- package/dist/data-table/index.mjs +5 -5
- package/dist/date/index.d.mts +1 -1
- package/dist/date/index.mjs +2 -2
- package/dist/features/adapters/flagsmith/index.d.mts +1 -1
- package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
- package/dist/features/adapters/posthog/index.d.mts +1 -1
- package/dist/features/adapters/posthog/index.mjs +1 -1
- package/dist/features/index.d.mts +2 -2
- package/dist/features/index.mjs +1 -1
- package/dist/{flagsmith-ygKMImos.d.mts → flagsmith-Cn_KVy6v.d.mts} +1 -1
- package/dist/{globals-BAe6tA_x.mjs → globals-DB-krEA-.mjs} +1 -1
- package/dist/{index-B3-FstpY.d.mts → index-ATZqco03.d.mts} +95 -2
- package/dist/{index-jQPkwo3G.d.mts → index-B3PDLk_Y.d.mts} +879 -454
- package/dist/{index-Cw04PFVO.d.mts → index-BIyQ3OxC.d.mts} +2 -168
- package/dist/{index-BfpLkDR_.d.mts → index-BN06veYe.d.mts} +947 -225
- package/dist/{index-CLR1QMM3.d.mts → index-DHmuwBdv.d.mts} +60 -1
- package/dist/index-DWAgQOBa.d.mts +170 -0
- package/dist/{index-BA7YU2xY.d.mts → index-ZD3hw2Zo.d.mts} +123 -62
- package/dist/index.d.mts +23 -22
- package/dist/index.mjs +29 -29
- package/dist/json/attributes.json +128 -0
- package/dist/json/importMap.json +24 -0
- package/dist/json/tags.json +57 -0
- package/dist/json/web-types.json +375 -2
- package/dist/{launchdarkly-BJR4vbbV.d.mts → launchdarkly-C3Knz7-v.d.mts} +1 -1
- package/dist/locale/adapters/index.d.mts +2 -2
- package/dist/locale/adapters/index.mjs +2 -2
- 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/logger/adapters/consola/index.d.mts +1 -1
- package/dist/logger/adapters/consola/index.mjs +1 -1
- package/dist/logger/adapters/index.d.mts +4 -4
- package/dist/logger/adapters/index.mjs +4 -4
- package/dist/logger/adapters/pino/index.d.mts +1 -1
- package/dist/logger/adapters/pino/index.mjs +1 -1
- package/dist/logger/adapters/v0/index.d.mts +1 -1
- package/dist/logger/adapters/v0/index.mjs +1 -1
- package/dist/logger/index.d.mts +5 -5
- package/dist/logger/index.mjs +4 -4
- package/dist/notifications/index.d.mts +1 -1
- package/dist/notifications/index.mjs +2 -2
- package/dist/palettes/ant/generate/index.mjs +6 -1
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +3 -3
- package/dist/palettes/leonardo/generate/index.mjs +6 -2
- package/dist/palettes/material/generate/index.mjs +11 -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/{pino-NmR7X0s4.d.mts → pino-BaYY_KIN.d.mts} +1 -1
- package/dist/{pino-CIcYlW3u.mjs → pino-BscMO3RR.mjs} +5 -2
- package/dist/{posthog-B3go2aCh.mjs → posthog-B5s_KGhy.mjs} +1 -1
- package/dist/{posthog-CQntUXFO.d.mts → posthog-CR8R2ywM.d.mts} +1 -1
- package/dist/rules/index.d.mts +2 -2
- package/dist/rules/index.mjs +1 -1
- package/dist/{server-DQK305lc.d.mts → server-7vjHxjNc.d.mts} +1 -1
- package/dist/{server-ZFXbgQoY.mjs → server-CZ83nTn_.mjs} +1 -1
- package/dist/storage/adapters/index.d.mts +2 -2
- package/dist/storage/adapters/memory/index.d.mts +1 -1
- package/dist/storage/index.d.mts +3 -3
- package/dist/storage/index.mjs +1 -1
- package/dist/theme/adapters/index.d.mts +1 -1
- package/dist/theme/adapters/index.mjs +3 -3
- 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/types/index.d.mts +2 -2
- package/dist/{unhead-dPyVkgiJ.mjs → unhead-CG672gKh.mjs} +1 -1
- package/dist/{useClickOutside-B8naChaQ.mjs → useClickOutside-DoOgNtrj.mjs} +1583 -436
- package/dist/{useFeatures-x2iKp0C8.mjs → useFeatures-B-A-eOo-.mjs} +4 -4
- package/dist/{useLocale-BUms59Bw.mjs → useLocale-CbpoxbVU.mjs} +5 -5
- package/dist/{useLogger-DPSSa-YR.mjs → useLogger-CTgAedNH.mjs} +51 -7
- package/dist/{useNotifications-BPTmZWQy.mjs → useNotifications-BkKGUl_1.mjs} +6 -6
- package/dist/{usePermissions-CTi-3pBk.mjs → usePermissions-BYOrKcnk.mjs} +2 -2
- package/dist/{useRules-DNhljkyO.mjs → useRules-mD_DY9dy.mjs} +4 -3
- package/dist/{useTheme-3vW3kFNg.mjs → useTheme-B1lUya5B.mjs} +5 -5
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +116 -2
- package/dist/{v0-DadOcxFI.mjs → v0-Bx5Mi7qE.mjs} +1 -1
- package/dist/{v0-YJQoTLsp.mjs → v0-CG9o3on7.mjs} +1 -1
- package/dist/{v0-CotC1PiS.mjs → v0-CHK79mZX.mjs} +1 -1
- package/dist/{v0-DAlKpCR8.mjs → v0-COaQncfZ.mjs} +1 -1
- package/dist/{v0-CRGArJim.d.mts → v0-DWZ_N2GG.d.mts} +1 -1
- package/dist/{v0-DYsCJPIu.d.mts → v0-QIjffi4E.d.mts} +1 -1
- package/dist/{v0-DDELiSI6.d.mts → v0-WzS4GAIp.d.mts} +1 -1
- package/dist/{virtual-BqCRw0ly.d.mts → virtual-CrgGA-o6.d.mts} +1 -1
- package/dist/{virtual-Dnno49F8.mjs → virtual-UumJ2BQ9.mjs} +1 -1
- package/package.json +12 -3
- package/dist/adapters-B25KaYU4.mjs +0 -2
- package/dist/adapters-BcddLSNs.mjs +0 -4
- package/dist/adapters-Dv74Jk6A.mjs +0 -5
- package/dist/adapters-t6QC-zE8.mjs +0 -3
- /package/dist/{adapter-Dzyrlbz7.d.mts → adapter-B6IrPwib.d.mts} +0 -0
- /package/dist/{adapter-o8r-2vUn.d.mts → adapter-BEJXp-ie.d.mts} +0 -0
- /package/dist/{index-DWfPppPU.d.mts → index-BOn0AAue.d.mts} +0 -0
- /package/dist/{index-DewYtDsc.d.mts → index-C6NnIuDv.d.mts} +0 -0
- /package/dist/{index-DJQwYeyx.d.mts → index-PvkxPev3.d.mts} +0 -0
- /package/dist/{memory-B0w39kno.d.mts → memory-D-JbdKXg.d.mts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isArray, isBoolean, isFunction, isObject } from "./utilities/index.mjs";
|
|
2
|
-
import { o as createPluginContext } from "./useLogger-
|
|
3
|
-
import { t as createTokens } from "./createTokens-
|
|
4
|
-
import { t as createGroup } from "./createGroup-
|
|
2
|
+
import { o as createPluginContext } from "./useLogger-CTgAedNH.mjs";
|
|
3
|
+
import { t as createTokens } from "./createTokens-mNxs8DQ3.mjs";
|
|
4
|
+
import { t as createGroup } from "./createGroup-DsKJMuRd.mjs";
|
|
5
5
|
import "./flagsmith-Cu93hUIF.mjs";
|
|
6
6
|
import "./launchdarkly-CLGtJCsI.mjs";
|
|
7
|
-
import "./posthog-
|
|
7
|
+
import "./posthog-B5s_KGhy.mjs";
|
|
8
8
|
//#region src/composables/useFeatures/index.ts
|
|
9
9
|
/**
|
|
10
10
|
* @module useFeatures
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o as createPluginContext } from "./useLogger-
|
|
2
|
-
import { t as createSingle } from "./createSingle-
|
|
3
|
-
import { r as flatten, t as createTokens } from "./createTokens-
|
|
4
|
-
import { t as V0LocaleAdapter } from "./v0-
|
|
5
|
-
import "./adapters-
|
|
1
|
+
import { o as createPluginContext } from "./useLogger-CTgAedNH.mjs";
|
|
2
|
+
import { t as createSingle } from "./createSingle-ClzWqRCe.mjs";
|
|
3
|
+
import { r as flatten, t as createTokens } from "./createTokens-mNxs8DQ3.mjs";
|
|
4
|
+
import { t as V0LocaleAdapter } from "./v0-CHK79mZX.mjs";
|
|
5
|
+
import "./adapters-CBgBd7VE.mjs";
|
|
6
6
|
//#region src/composables/useLocale/index.ts
|
|
7
7
|
/**
|
|
8
8
|
* @module useLocale
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-
|
|
1
|
+
import { s as __LOGGER_ENABLED__, t as IN_BROWSER } from "./globals-DB-krEA-.mjs";
|
|
2
2
|
import { isNullOrUndefined, isUndefined } from "./utilities/index.mjs";
|
|
3
|
-
import { i as useContext, t as createTrinity } from "./createTrinity-
|
|
4
|
-
import { t as V0LoggerAdapter } from "./v0-
|
|
5
|
-
import "./adapters-
|
|
3
|
+
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
4
|
+
import { t as V0LoggerAdapter } from "./v0-CG9o3on7.mjs";
|
|
5
|
+
import "./adapters-BxrTL8E3.mjs";
|
|
6
6
|
import { hasInjectionContext, inject, watch } from "vue";
|
|
7
7
|
//#region src/composables/createPlugin/index.ts
|
|
8
8
|
/**
|
|
@@ -97,7 +97,7 @@ function getPersistedStorage() {
|
|
|
97
97
|
* createPluginContext('v0:logger', options => createLogger(options), {
|
|
98
98
|
* fallback: ns => createFallbackLogger(ns),
|
|
99
99
|
* setup: (context) => {
|
|
100
|
-
* if (__DEV__ && IN_BROWSER) (window as
|
|
100
|
+
* if (__DEV__ && IN_BROWSER) (window as Window & { __v0Logger__?: typeof context }).__v0Logger__ = context
|
|
101
101
|
* },
|
|
102
102
|
* })
|
|
103
103
|
* ```
|
|
@@ -274,7 +274,8 @@ function createLogger(options = {}) {
|
|
|
274
274
|
disable
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
const NAMESPACE = "v0:logger";
|
|
278
|
+
function createFallbackLogger(namespace = NAMESPACE) {
|
|
278
279
|
function format(message, type) {
|
|
279
280
|
return `[${namespace} ${type}] ${message}`;
|
|
280
281
|
}
|
|
@@ -311,11 +312,54 @@ function createFallbackLogger(namespace = "v0:logger") {
|
|
|
311
312
|
* })
|
|
312
313
|
* ```
|
|
313
314
|
*/
|
|
314
|
-
const [createLoggerContext, createLoggerPlugin,
|
|
315
|
+
const [createLoggerContext, createLoggerPlugin, useLoggerContext] = createPluginContext(NAMESPACE, (options) => createLogger(options), {
|
|
315
316
|
fallback: (ns) => createFallbackLogger(ns),
|
|
316
317
|
setup: (context, _app, _options) => {
|
|
317
318
|
if (typeof (process.env.NODE_ENV !== "production") !== "undefined" && process.env.NODE_ENV !== "production" && IN_BROWSER) window.__v0Logger__ = context;
|
|
318
319
|
}
|
|
319
320
|
});
|
|
321
|
+
function createScopedLogger(logger, scope) {
|
|
322
|
+
const tag = `[${scope}]`;
|
|
323
|
+
function wrap(method) {
|
|
324
|
+
return (message, ...args) => method(`${tag} ${message}`, ...args);
|
|
325
|
+
}
|
|
326
|
+
return {
|
|
327
|
+
...logger,
|
|
328
|
+
debug: wrap(logger.debug),
|
|
329
|
+
info: wrap(logger.info),
|
|
330
|
+
warn: wrap(logger.warn),
|
|
331
|
+
error: wrap(logger.error),
|
|
332
|
+
trace: wrap(logger.trace),
|
|
333
|
+
fatal: wrap(logger.fatal)
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Consumes the application logger provided by `createLoggerPlugin`.
|
|
338
|
+
*
|
|
339
|
+
* Call with no argument to use the configured logger as-is. Pass a scope key to get a
|
|
340
|
+
* logger that prefixes every message with a `[scope]` segment after the plugin prefix —
|
|
341
|
+
* useful for telling apart output from composables that share the app-level logger. A
|
|
342
|
+
* scoped logger shares the underlying logger's level, enabled state, and adapter; only
|
|
343
|
+
* the message prefix differs. A blank scope is treated as no scope.
|
|
344
|
+
*
|
|
345
|
+
* @param scope Optional per-caller scope key prefixed onto every message.
|
|
346
|
+
* @returns The application logger, or a scoped wrapper around it.
|
|
347
|
+
*
|
|
348
|
+
* @see https://0.vuetifyjs.com/composables/plugins/use-logger
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* ```ts
|
|
352
|
+
* import { useLogger } from '@vuetify/v0'
|
|
353
|
+
*
|
|
354
|
+
* const logger = useLogger('createKanban')
|
|
355
|
+
*
|
|
356
|
+
* logger.warn('drop rejected')
|
|
357
|
+
* // → [v0 warn] [createKanban] drop rejected
|
|
358
|
+
* ```
|
|
359
|
+
*/
|
|
360
|
+
function useLogger(scope) {
|
|
361
|
+
const logger = useLoggerContext();
|
|
362
|
+
return /* @__PURE__ */ isUndefined(scope) || !scope.trim() ? logger : createScopedLogger(logger, scope);
|
|
363
|
+
}
|
|
320
364
|
//#endregion
|
|
321
365
|
export { createPlugin as a, useLogger as i, createLoggerContext as n, createPluginContext as o, createLoggerPlugin as r, createLogger as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "./globals-
|
|
1
|
+
import { t as IN_BROWSER } from "./globals-DB-krEA-.mjs";
|
|
2
2
|
import { isFunction, isNull, isUndefined, useId as useId$1 } from "./utilities/index.mjs";
|
|
3
|
-
import { i as useContext, t as createTrinity } from "./createTrinity-
|
|
4
|
-
import { o as createPluginContext } from "./useLogger-
|
|
5
|
-
import { t as createRegistry } from "./createRegistry-
|
|
3
|
+
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
4
|
+
import { o as createPluginContext } from "./useLogger-CTgAedNH.mjs";
|
|
5
|
+
import { t as createRegistry } from "./createRegistry-tJ1PPNIr.mjs";
|
|
6
6
|
import { onScopeDispose, shallowRef, toValue } from "vue";
|
|
7
7
|
//#region src/composables/useTimer/index.ts
|
|
8
8
|
/**
|
|
@@ -697,7 +697,7 @@ function createNotifications(options = {}) {
|
|
|
697
697
|
*
|
|
698
698
|
* notifications.readAll()
|
|
699
699
|
*
|
|
700
|
-
* console.log(notifications.values().every(t => t.readAt
|
|
700
|
+
* console.log(notifications.values().every(t => !isNull(t.readAt))) // true
|
|
701
701
|
* ```
|
|
702
702
|
*/
|
|
703
703
|
function readAll() {
|
|
@@ -726,7 +726,7 @@ function createNotifications(options = {}) {
|
|
|
726
726
|
*
|
|
727
727
|
* notifications.archiveAll()
|
|
728
728
|
*
|
|
729
|
-
* console.log(notifications.values().every(t => t.archivedAt
|
|
729
|
+
* console.log(notifications.values().every(t => !isNull(t.archivedAt))) // true
|
|
730
730
|
* ```
|
|
731
731
|
*/
|
|
732
732
|
function archiveAll() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as createPluginContext } from "./useLogger-
|
|
2
|
-
import { t as createTokens } from "./createTokens-
|
|
1
|
+
import { o as createPluginContext } from "./useLogger-CTgAedNH.mjs";
|
|
2
|
+
import { t as createTokens } from "./createTokens-mNxs8DQ3.mjs";
|
|
3
3
|
import { t as toArray } from "./toArray-CD2-OxAz.mjs";
|
|
4
4
|
import { t as V0PermissionsAdapter } from "./v0-Dvu8fMl3.mjs";
|
|
5
5
|
import "./adapters-D64TORDu.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { instanceExists, isFunction, isObject } from "./utilities/index.mjs";
|
|
2
|
-
import { o as createPluginContext } from "./useLogger-
|
|
3
|
-
import { a as useLocale } from "./useLocale-
|
|
2
|
+
import { i as useLogger, o as createPluginContext } from "./useLogger-CTgAedNH.mjs";
|
|
3
|
+
import { a as useLocale } from "./useLocale-CbpoxbVU.mjs";
|
|
4
4
|
//#region src/composables/useRules/adapters/standard.ts
|
|
5
5
|
/**
|
|
6
6
|
* Type guard for Standard Schema objects.
|
|
@@ -87,6 +87,7 @@ function resolveAlias(name, predicate, locale) {
|
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
function createResolve(aliases, locale) {
|
|
90
|
+
const logger = useLogger();
|
|
90
91
|
return function resolve(rules) {
|
|
91
92
|
const result = [];
|
|
92
93
|
for (const rule of rules) {
|
|
@@ -100,7 +101,7 @@ function createResolve(aliases, locale) {
|
|
|
100
101
|
}
|
|
101
102
|
const predicate = aliases[rule];
|
|
102
103
|
if (predicate) result.push(resolveAlias(rule, predicate, locale));
|
|
103
|
-
else if (typeof (process.env.NODE_ENV !== "production") !== "undefined" && process.env.NODE_ENV !== "production")
|
|
104
|
+
else if (typeof (process.env.NODE_ENV !== "production") !== "undefined" && process.env.NODE_ENV !== "production") logger.warn(`Unknown validation rule alias "${rule}". Register it via rules.aliases or install a rules plugin.`);
|
|
104
105
|
}
|
|
105
106
|
return result;
|
|
106
107
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { foreground } from "./utilities/index.mjs";
|
|
2
|
-
import { o as createPluginContext } from "./useLogger-
|
|
3
|
-
import { t as createSingle } from "./createSingle-
|
|
4
|
-
import { r as flatten, t as createTokens } from "./createTokens-
|
|
5
|
-
import { t as V0StyleSheetThemeAdapter } from "./v0-
|
|
6
|
-
import "./adapters-
|
|
2
|
+
import { o as createPluginContext } from "./useLogger-CTgAedNH.mjs";
|
|
3
|
+
import { t as createSingle } from "./createSingle-ClzWqRCe.mjs";
|
|
4
|
+
import { r as flatten, t as createTokens } from "./createTokens-mNxs8DQ3.mjs";
|
|
5
|
+
import { t as V0StyleSheetThemeAdapter } from "./v0-Bx5Mi7qE.mjs";
|
|
6
|
+
import "./adapters-BHD1lc-K.mjs";
|
|
7
7
|
import { computed, shallowRef, toRef } from "vue";
|
|
8
8
|
//#region src/composables/useTheme/index.ts
|
|
9
9
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { RGB, apca, clamp, foreground, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isThenable, isUndefined, mergeDeep, range, resolveIds, resolveIndexes, rgbToHex, useId };
|
|
1
|
+
import { C as V0Error, D as RGB, E as foreground, O as hexToRgb, S as useId, T as apca, _ as isUndefined, a as isBoolean, b as resolveIds, c as isNaN, d as isNumber, f as isObject, g as isThenable, h as isSymbol, i as isArray, k as rgbToHex, l as isNull, m as isString, n as instanceName, o as isElement, p as isPrimitive, r as clamp, s as isFunction, t as instanceExists, u as isNullOrUndefined, v as mergeDeep, w as isV0Error, x as resolveIndexes, y as range } from "../index-ATZqco03.mjs";
|
|
2
|
+
export { RGB, V0Error, apca, clamp, foreground, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isThenable, isUndefined, isV0Error, mergeDeep, range, resolveIds, resolveIndexes, rgbToHex, useId };
|
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-DB-krEA-.mjs";
|
|
2
2
|
import * as Vue from "vue";
|
|
3
3
|
import { useId as useId$1 } from "vue";
|
|
4
4
|
//#region src/utilities/color.ts
|
|
@@ -543,4 +543,118 @@ function resolveIndexes(items) {
|
|
|
543
543
|
return Array.from(items).map((item) => item?.index).filter((index) => !/* @__PURE__ */ isUndefined(index));
|
|
544
544
|
}
|
|
545
545
|
//#endregion
|
|
546
|
-
|
|
546
|
+
//#region src/utilities/errors.ts
|
|
547
|
+
/**
|
|
548
|
+
* @module utilities/errors
|
|
549
|
+
*
|
|
550
|
+
* @remarks
|
|
551
|
+
* Structured error class thrown by v0 internals. Pattern modeled on
|
|
552
|
+
* tRPC's `TRPCError` and Node's built-in `Error` codes — `code` is a
|
|
553
|
+
* top-level discriminant field on the error, *not* a payload nested
|
|
554
|
+
* inside `Error.cause`. `cause` stays reserved for wrapping the
|
|
555
|
+
* genuine upstream error so error trackers (Sentry's `LinkedErrors`,
|
|
556
|
+
* Datadog RUM, Rollbar) render the chain correctly.
|
|
557
|
+
*
|
|
558
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
|
|
559
|
+
* @see https://nodejs.org/api/errors.html#nodejs-error-codes
|
|
560
|
+
* @see https://trpc.io/docs/server/error-handling
|
|
561
|
+
* @see https://docs.sentry.io/platforms/javascript/configuration/integrations/linkederrors/
|
|
562
|
+
*/
|
|
563
|
+
/**
|
|
564
|
+
* Structured error thrown by v0 internals.
|
|
565
|
+
*
|
|
566
|
+
* @remarks
|
|
567
|
+
* Carries a stable {@link V0ErrorCode} discriminant on `code` so
|
|
568
|
+
* consumers, devtools panels, and error trackers can identify the
|
|
569
|
+
* error without parsing the message string. Domain context lives in
|
|
570
|
+
* top-level fields per code (`key` for `V0_CONTEXT_MISSING`, `plugin`
|
|
571
|
+
* for `V0_PLUGIN_MISSING`), populated from a {@link V0ErrorDetails}
|
|
572
|
+
* argument and merged onto the instance at construction time.
|
|
573
|
+
*
|
|
574
|
+
* `cause` is forwarded to `Error`'s standard `ErrorOptions.cause` slot
|
|
575
|
+
* and is intended to carry a wrapped upstream error, not metadata.
|
|
576
|
+
*
|
|
577
|
+
* Prefer {@link isV0Error} over manual `instanceof` checks at the
|
|
578
|
+
* narrowing site — the guard intersects the instance type with the
|
|
579
|
+
* matching {@link V0ErrorDetails} arm, so per-code fields are typed.
|
|
580
|
+
*
|
|
581
|
+
* @example Author site
|
|
582
|
+
* ```ts
|
|
583
|
+
* throw new V0Error('Context not found.', { code: 'V0_CONTEXT_MISSING', key })
|
|
584
|
+
* ```
|
|
585
|
+
*
|
|
586
|
+
* @example Author site with upstream wrap
|
|
587
|
+
* ```ts
|
|
588
|
+
* try {
|
|
589
|
+
* JSON.parse(raw)
|
|
590
|
+
* } catch (err) {
|
|
591
|
+
* throw new V0Error('Failed to hydrate registry.', {
|
|
592
|
+
* code: 'V0_CONTEXT_MISSING',
|
|
593
|
+
* key: 'v0:registry',
|
|
594
|
+
* cause: err,
|
|
595
|
+
* })
|
|
596
|
+
* }
|
|
597
|
+
* ```
|
|
598
|
+
*
|
|
599
|
+
* @example Consumer site
|
|
600
|
+
* ```ts
|
|
601
|
+
* try {
|
|
602
|
+
* useContext(myKey)
|
|
603
|
+
* } catch (err) {
|
|
604
|
+
* if (isV0Error(err, 'V0_CONTEXT_MISSING')) {
|
|
605
|
+
* console.log(err.key)
|
|
606
|
+
* }
|
|
607
|
+
* }
|
|
608
|
+
* ```
|
|
609
|
+
*/
|
|
610
|
+
var V0Error = class extends Error {
|
|
611
|
+
name = "V0Error";
|
|
612
|
+
code;
|
|
613
|
+
key;
|
|
614
|
+
plugin;
|
|
615
|
+
palette;
|
|
616
|
+
seed;
|
|
617
|
+
variant;
|
|
618
|
+
adapter;
|
|
619
|
+
constructor(message, details) {
|
|
620
|
+
const { cause, ...rest } = details;
|
|
621
|
+
super(message, /* @__PURE__ */ isUndefined(cause) ? void 0 : { cause });
|
|
622
|
+
this.code = details.code;
|
|
623
|
+
Object.assign(this, rest);
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
/**
|
|
627
|
+
* Type guard for v0-thrown errors.
|
|
628
|
+
*
|
|
629
|
+
* @param value The value to test.
|
|
630
|
+
* @param code Optional discriminant — narrow the result to a specific
|
|
631
|
+
* {@link V0ErrorCode} so per-code fields become required.
|
|
632
|
+
*
|
|
633
|
+
* @remarks
|
|
634
|
+
* Without the optional `code` argument, the guard verifies the value
|
|
635
|
+
* is a {@link V0Error} instance. With the `code` argument, the guard
|
|
636
|
+
* also narrows the instance type to the intersection with the matching
|
|
637
|
+
* {@link V0ErrorDetails} arm — fields like `key` or `plugin` change
|
|
638
|
+
* from optional to required on the narrowed type.
|
|
639
|
+
*
|
|
640
|
+
* @example Narrow to any v0 error
|
|
641
|
+
* ```ts
|
|
642
|
+
* if (isV0Error(err)) {
|
|
643
|
+
* console.log(err.code)
|
|
644
|
+
* }
|
|
645
|
+
* ```
|
|
646
|
+
*
|
|
647
|
+
* @example Narrow to a specific code
|
|
648
|
+
* ```ts
|
|
649
|
+
* if (isV0Error(err, 'V0_CONTEXT_MISSING')) {
|
|
650
|
+
* console.log(err.key) // typed as string | symbol, not string | symbol | undefined
|
|
651
|
+
* }
|
|
652
|
+
* ```
|
|
653
|
+
*/
|
|
654
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
655
|
+
function isV0Error(value, code) {
|
|
656
|
+
if (!(value instanceof V0Error)) return false;
|
|
657
|
+
return /* @__PURE__ */ isUndefined(code) || value.code === code;
|
|
658
|
+
}
|
|
659
|
+
//#endregion
|
|
660
|
+
export { V0Error, apca, clamp, foreground, hexToRgb, instanceExists, instanceName, isArray, isBoolean, isElement, isFunction, isNaN, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, isSymbol, isThenable, isUndefined, isV0Error, mergeDeep, range, resolveIds, resolveIndexes, rgbToHex, useId };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "./globals-
|
|
1
|
+
import { t as IN_BROWSER } from "./globals-DB-krEA-.mjs";
|
|
2
2
|
import { isNull, isString } from "./utilities/index.mjs";
|
|
3
3
|
import { t as ThemeAdapter } from "./adapter-oM18AdUc.mjs";
|
|
4
4
|
import { onScopeDispose, watch } from "vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "./globals-
|
|
1
|
+
import { t as IN_BROWSER } from "./globals-DB-krEA-.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-DB-krEA-.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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createPagination, t as DataTableAdapter } from "./adapter-
|
|
1
|
+
import { n as createPagination, t as DataTableAdapter } from "./adapter-BCVxBtDp.mjs";
|
|
2
2
|
import { computed, toRef, watch } from "vue";
|
|
3
3
|
//#region src/composables/createDataTable/adapters/v0.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "./adapter-
|
|
1
|
+
import { n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "./adapter-BO75n0Cn.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/composables/createDataTable/adapters/v0.d.ts
|
|
4
4
|
declare class ClientDataTableAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "./adapter-
|
|
1
|
+
import { n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "./adapter-BO75n0Cn.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/composables/createDataTable/adapters/virtual.d.ts
|
|
4
4
|
declare class VirtualDataTableAdapter<T extends Record<string, unknown>> extends DataTableAdapter<T> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createPagination, t as DataTableAdapter } from "./adapter-
|
|
1
|
+
import { n as createPagination, t as DataTableAdapter } from "./adapter-BCVxBtDp.mjs";
|
|
2
2
|
import { toRef, watch } from "vue";
|
|
3
3
|
//#region src/composables/createDataTable/adapters/virtual.ts
|
|
4
4
|
/**
|
package/package.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuetify/v0",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
4
|
"description": "A meta UI framework for building applications, component libraries, and design systems with Vue 3",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"funding": [
|
|
7
|
+
{
|
|
8
|
+
"type": "github",
|
|
9
|
+
"url": "https://github.com/sponsors/johnleider"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "opencollective",
|
|
13
|
+
"url": "https://opencollective.com/vuetify"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
6
16
|
"types": "./dist/index.d.mts",
|
|
7
17
|
"type": "module",
|
|
8
18
|
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
"SKILL.md"
|
|
19
|
+
"dist"
|
|
11
20
|
],
|
|
12
21
|
"repository": {
|
|
13
22
|
"type": "git",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|