@vuetify/v0 0.0.2 → 0.0.6

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 (36) hide show
  1. package/README.md +12 -13
  2. package/dist/browser/index.js +3347 -2056
  3. package/dist/components/index.d.ts +4 -7
  4. package/dist/components/index.js +6 -8
  5. package/dist/{components-Cc48kKWf.js → components-B5k361i-.js} +173 -190
  6. package/dist/composables/index.d.ts +3 -7
  7. package/dist/composables/index.js +4 -7
  8. package/dist/composables-CAbYjAkR.js +3746 -0
  9. package/dist/constants/index.d.ts +1 -1
  10. package/dist/constants/index.js +3 -3
  11. package/dist/{globals--2b7sF4-.js → globals-CHVv7nNV.js} +2 -2
  12. package/dist/{htmlElements-SjqYu0am.js → htmlElements-lF7PGahL.js} +1 -1
  13. package/dist/{index-z_zwVNP8.d.ts → index-BKc0YiL1.d.ts} +1 -1
  14. package/dist/index-BQfe0WBZ.d.ts +410 -0
  15. package/dist/index-BhPlroXd.d.ts +2764 -0
  16. package/dist/{index-LBy5OPMu.d.ts → index-C_lAPFXS.d.ts} +1 -1
  17. package/dist/{index-BozA2pze.d.ts → index-DIX3zaZG.d.ts} +3 -10
  18. package/dist/index.d.ts +6 -7
  19. package/dist/index.js +7 -10
  20. package/dist/types/index.d.ts +1 -1
  21. package/dist/utilities/index.d.ts +3 -3
  22. package/dist/utilities/index.js +2 -2
  23. package/dist/{utilities-D9rWEgQK.js → utilities-rsKHgU2m.js} +5 -32
  24. package/package.json +10 -38
  25. package/dist/composables-7Cbs2sdO.js +0 -1003
  26. package/dist/factories/index.d.ts +0 -2
  27. package/dist/factories/index.js +0 -3
  28. package/dist/factories-CPq2yMlr.js +0 -79
  29. package/dist/index-BnsMFYhs.d.ts +0 -1407
  30. package/dist/index-BqrLvboW.d.ts +0 -61
  31. package/dist/index-tUyghL98.d.ts +0 -19
  32. package/dist/transformers/index.d.ts +0 -2
  33. package/dist/transformers/index.js +0 -4
  34. package/dist/transformers-BAeg3QJF.js +0 -122
  35. package/dist/useTheme-DSYiiz0R.js +0 -1244
  36. /package/dist/{constants-DiTCgvMU.js → constants-De5c3_aB.js} +0 -0
@@ -1,61 +0,0 @@
1
- import { App, InjectionKey } from "vue";
2
-
3
- //#region src/factories/createPlugin/index.d.ts
4
- interface PluginOptions {
5
- namespace: string;
6
- provide: (app: App) => void;
7
- setup?: (app: App) => void;
8
- }
9
- interface Plugin {
10
- install: (app: App, ...options: any[]) => void;
11
- }
12
- /**
13
- * A universal plugin factory to reduce boilerplate code for Vue plugin creation
14
- * @param options Configurable object with namespace and provide/setup methods
15
- * @returns A Vue plugin object with install method that runs app w/ context
16
- *
17
- * @see https://vuejs.org/api/application.html#app-runwithcontext
18
- * @see https://0.vuetifyjs.com/factories/create-plugin
19
- */
20
- declare function createPlugin<Z extends Plugin = Plugin>(options: PluginOptions): Z;
21
- //#endregion
22
- //#region src/factories/createContext/index.d.ts
23
- type ContextKey<Z> = InjectionKey<Z> | string;
24
- /**
25
- * A simple wrapper for tapping into a v0 namespace
26
- * @param key The provided string or InjectionKey
27
- * @template Z The type values for the context.
28
- * @returns A function that retrieves context
29
- * @throws Error if namespace is not found.
30
- *
31
- * @see https://vuejs.org/api/composition-api-dependency-injection.html#inject
32
- */
33
- declare function useContext<Z>(key: ContextKey<Z>): (namespace?: string) => Z;
34
- /**
35
- * A simple wrapper for Vues provide & inject systems
36
- * to create context for managing application state
37
- * @param key The provided string or InjectionKey
38
- * @template Z The type values for the context.
39
- * @returns A tuple containing provide/inject
40
- *
41
- * @see https://vuejs.org/api/composition-api-dependency-injection.html#provide
42
- * @see https://0.vuetifyjs.com/composables/foundation/create-context
43
- */
44
- declare function createContext<Z>(key: ContextKey<Z>): readonly [(namespace?: string) => Z, (context: Z, app?: App) => Z];
45
- //#endregion
46
- //#region src/factories/createTrinity/index.d.ts
47
- type ContextTrinity<Z = unknown> = readonly [() => Z, (context?: Z, app?: App) => Z, Z];
48
- /**
49
- * A tuple containing Vue's provide/inject and a context object
50
- * @param createContext The function that creates the context
51
- * @param provideContext The function that provides context
52
- * @param context The underlying context object singleton
53
- * @template Z The type parameter for the context value
54
- * @template E The vmodel type for the context state.
55
- * @returns [createContext, provideContext, context]
56
- *
57
- * @see https://0.vuetifyjs.com/composables/foundation/create-trinity
58
- */
59
- declare function createTrinity<Z = unknown>(createContext: () => Z, provideContext: (_context?: Z, app?: App) => Z, context: Z): ContextTrinity<Z>;
60
- //#endregion
61
- export { ContextKey, ContextTrinity, Plugin, PluginOptions, createContext, createPlugin, createTrinity, useContext };
@@ -1,19 +0,0 @@
1
- import { MaybeRef, UnwrapNestedRefs } from "vue";
2
-
3
- //#region src/transformers/toArray/index.d.ts
4
- declare function toArray<T>(value: T | T[]): T[];
5
- //#endregion
6
- //#region src/transformers/toReactive/index.d.ts
7
- /**
8
- * Converts an object to a reactive reference using Vue's reactivity system.
9
- * This function creates a reactive version of the provided object,
10
- * making its properties automatically track dependencies and trigger re-renders
11
- * when they change.
12
- *
13
- * @param objectRef - A reference to an object that should be made reactive.
14
- * @template Z The type of the object that extends object.
15
- * @returns A reactive reference to the object.
16
- */
17
- declare function toReactive<Z extends object>(objectRef: MaybeRef<Z>): UnwrapNestedRefs<Z>;
18
- //#endregion
19
- export { toArray, toReactive };
@@ -1,2 +0,0 @@
1
- import { toArray, toReactive } from "../index-tUyghL98.js";
2
- export { toArray, toReactive };
@@ -1,4 +0,0 @@
1
- import "../utilities-D9rWEgQK.js";
2
- import { toArray, toReactive } from "../transformers-BAeg3QJF.js";
3
-
4
- export { toArray, toReactive };
@@ -1,122 +0,0 @@
1
- import { isNullOrUndefined } from "./utilities-D9rWEgQK.js";
2
- import { isRef, reactive, unref } from "vue";
3
-
4
- //#region src/transformers/toArray/index.ts
5
- /* @__NO_SIDE_EFFECTS__ */
6
- function toArray(value) {
7
- return isNullOrUndefined(value) ? [] : Array.isArray(value) ? value : [value];
8
- }
9
-
10
- //#endregion
11
- //#region src/transformers/toReactive/index.ts
12
- /**
13
- * Converts an object to a reactive reference using Vue's reactivity system.
14
- * This function creates a reactive version of the provided object,
15
- * making its properties automatically track dependencies and trigger re-renders
16
- * when they change.
17
- *
18
- * @param objectRef - A reference to an object that should be made reactive.
19
- * @template Z The type of the object that extends object.
20
- * @returns A reactive reference to the object.
21
- */
22
- function toReactive(objectRef) {
23
- if (!isRef(objectRef)) return reactive(objectRef);
24
- const target = objectRef.value;
25
- if (target instanceof Map) {
26
- const mapProxy = new Proxy(/* @__PURE__ */ new Map(), { get(_, p) {
27
- const map = objectRef.value;
28
- if (p === "get") return (key) => unref(map.get(key));
29
- if (p === "set") return (key, value) => {
30
- const existingValue = map.get(key);
31
- if (isRef(existingValue)) existingValue.value = unref(value);
32
- else map.set(key, value);
33
- return mapProxy;
34
- };
35
- if (p === "has") return (key) => map.has(key);
36
- if (p === "delete") return (key) => map.delete(key);
37
- if (p === "clear") return () => map.clear();
38
- if (p === "size") return map.size;
39
- if (p === "keys") return () => map.keys();
40
- if (p === "values") return function* () {
41
- for (const value of map.values()) yield unref(value);
42
- };
43
- if (p === "entries") return function* () {
44
- for (const [key, value] of map.entries()) yield [key, unref(value)];
45
- };
46
- if (p === "forEach") return (callback, thisArg) => {
47
- for (const [key, value] of map.entries()) callback.call(thisArg, unref(value), key, mapProxy);
48
- };
49
- if (p === Symbol.iterator) return function* () {
50
- for (const [key, value] of map.entries()) yield [key, unref(value)];
51
- };
52
- return Reflect.get(map, p);
53
- } });
54
- return reactive(mapProxy);
55
- }
56
- if (target instanceof Set) {
57
- const setProxy = new Proxy(/* @__PURE__ */ new Set(), { get(_, p) {
58
- const set = objectRef.value;
59
- if (p === "add") return (value) => {
60
- set.add(value);
61
- return setProxy;
62
- };
63
- if (p === "has") return (value) => set.has(value);
64
- if (p === "delete") return (value) => set.delete(value);
65
- if (p === "clear") return () => set.clear();
66
- if (p === "size") return set.size;
67
- if (p === "keys" || p === "values") return function* () {
68
- for (const value of set.values()) yield unref(value);
69
- };
70
- if (p === "entries") return function* () {
71
- for (const value of set.values()) {
72
- const unreffedValue = unref(value);
73
- yield [unreffedValue, unreffedValue];
74
- }
75
- };
76
- if (p === "forEach") return (callback, thisArg) => {
77
- for (const value of set) {
78
- const unreffedValue = unref(value);
79
- callback.call(thisArg, unreffedValue, unreffedValue, setProxy);
80
- }
81
- };
82
- if (p === Symbol.iterator) return function* () {
83
- for (const value of set.values()) yield unref(value);
84
- };
85
- return Reflect.get(set, p);
86
- } });
87
- return reactive(setProxy);
88
- }
89
- const proxy = new Proxy({}, {
90
- get(_, p, receiver) {
91
- return unref(Reflect.get(objectRef.value, p, receiver));
92
- },
93
- set(_, p, value) {
94
- const currentTarget = objectRef.value;
95
- currentTarget[p] = value;
96
- return true;
97
- },
98
- deleteProperty(_, p) {
99
- return Reflect.deleteProperty(objectRef.value, p);
100
- },
101
- has(_, p) {
102
- return Reflect.has(objectRef.value, p);
103
- },
104
- ownKeys() {
105
- return Object.keys(objectRef.value);
106
- },
107
- getOwnPropertyDescriptor(_, p) {
108
- const desc = Reflect.getOwnPropertyDescriptor(objectRef.value, p);
109
- if (!desc) return void 0;
110
- const newDesc = {
111
- ...desc,
112
- configurable: true
113
- };
114
- if ("value" in newDesc) newDesc.value = unref(newDesc.value);
115
- return newDesc;
116
- }
117
- });
118
- return reactive(proxy);
119
- }
120
-
121
- //#endregion
122
- export { toArray, toReactive };