@vuetify/v0 0.0.2-beta.4 → 0.0.2
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 +252 -0
- package/dist/browser/index.js +3123 -0
- package/dist/components/{index.d.mts → index.d.ts} +7 -5
- package/dist/components/{index.mjs → index.js} +7 -5
- package/dist/{components-B5iiovK7.mjs → components-Cc48kKWf.js} +5 -33
- package/dist/composables/index.d.ts +7 -0
- package/dist/composables/index.js +8 -0
- package/dist/{composables-C6dl5kjP.mjs → composables-7Cbs2sdO.js} +395 -6
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +5 -0
- package/dist/constants-DiTCgvMU.js +1 -0
- package/dist/factories/index.d.ts +2 -0
- package/dist/factories/{index.mjs → index.js} +1 -2
- package/dist/globals--2b7sF4-.js +12 -0
- package/dist/htmlElements-SjqYu0am.js +78 -0
- package/dist/index-BnsMFYhs.d.ts +1407 -0
- package/dist/{index-D4Grk5x1.d.mts → index-BozA2pze.d.ts} +1 -1
- package/dist/{index-oCBJwhpG.d.mts → index-BqrLvboW.d.ts} +31 -13
- package/dist/index-z_zwVNP8.d.ts +79 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +11 -0
- package/dist/transformers/index.d.ts +2 -0
- package/dist/transformers/index.js +4 -0
- package/dist/{transformers-BTjuwbOV.mjs → transformers-BAeg3QJF.js} +1 -1
- package/dist/types/{index.d.mts → index.d.ts} +1 -1
- package/dist/types/index.js +1 -0
- package/dist/{useTheme-tY7MoBKr.mjs → useTheme-DSYiiz0R.js} +65 -19
- package/dist/utilities/{index.d.mts → index.d.ts} +2 -2
- package/dist/utilities/{index.mjs → index.js} +1 -1
- package/package.json +32 -21
- package/dist/composables/index.d.mts +0 -5
- package/dist/composables/index.mjs +0 -7
- package/dist/factories/index.d.mts +0 -3
- package/dist/factories-DOLmqhVS.mjs +0 -0
- package/dist/index-ChaaTPKp.d.mts +0 -421
- package/dist/index-Cya5Y9pB.d.mts +0 -412
- package/dist/index-DfahEz6s.d.mts +0 -18
- package/dist/index-jG0yrC1F.d.mts +0 -467
- package/dist/index.d.mts +0 -9
- package/dist/index.mjs +0 -9
- package/dist/transformers/index.d.mts +0 -2
- package/dist/transformers/index.mjs +0 -4
- package/dist/types/index.mjs +0 -0
- /package/dist/{createTrinity-CwGvQ2ng.mjs → factories-CPq2yMlr.js} +0 -0
- /package/dist/{index-BA3ZFBnL.d.mts → index-LBy5OPMu.d.ts} +0 -0
- /package/dist/{index-CZRh0I2w.d.mts → index-tUyghL98.d.ts} +0 -0
- /package/dist/{utilities-lZSfrXgw.mjs → utilities-D9rWEgQK.js} +0 -0
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import { App, InjectionKey } from "vue";
|
|
2
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
|
|
3
22
|
//#region src/factories/createContext/index.d.ts
|
|
4
23
|
type ContextKey<Z> = InjectionKey<Z> | string;
|
|
5
24
|
/**
|
|
@@ -24,20 +43,19 @@ declare function useContext<Z>(key: ContextKey<Z>): (namespace?: string) => Z;
|
|
|
24
43
|
*/
|
|
25
44
|
declare function createContext<Z>(key: ContextKey<Z>): readonly [(namespace?: string) => Z, (context: Z, app?: App) => Z];
|
|
26
45
|
//#endregion
|
|
27
|
-
//#region src/factories/
|
|
28
|
-
|
|
29
|
-
namespace: string;
|
|
30
|
-
provide: (app: App) => void;
|
|
31
|
-
setup?: (app: App) => void;
|
|
32
|
-
}
|
|
46
|
+
//#region src/factories/createTrinity/index.d.ts
|
|
47
|
+
type ContextTrinity<Z = unknown> = readonly [() => Z, (context?: Z, app?: App) => Z, Z];
|
|
33
48
|
/**
|
|
34
|
-
* A
|
|
35
|
-
* @param
|
|
36
|
-
* @
|
|
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]
|
|
37
56
|
*
|
|
38
|
-
* @see https://
|
|
39
|
-
* @see https://0.vuetifyjs.com/factories/create-plugin
|
|
57
|
+
* @see https://0.vuetifyjs.com/composables/foundation/create-trinity
|
|
40
58
|
*/
|
|
41
|
-
declare function
|
|
59
|
+
declare function createTrinity<Z = unknown>(createContext: () => Z, provideContext: (_context?: Z, app?: App) => Z, context: Z): ContextTrinity<Z>;
|
|
42
60
|
//#endregion
|
|
43
|
-
export { ContextKey, PluginOptions, createContext, createPlugin, useContext };
|
|
61
|
+
export { ContextKey, ContextTrinity, Plugin, PluginOptions, createContext, createPlugin, createTrinity, useContext };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//#region src/constants/globals.d.ts
|
|
2
|
+
declare const IN_BROWSER: boolean;
|
|
3
|
+
declare const SUPPORTS_TOUCH: boolean;
|
|
4
|
+
declare const SUPPORTS_MATCH_MEDIA: boolean;
|
|
5
|
+
declare const SUPPORTS_OBSERVER: boolean;
|
|
6
|
+
declare const SUPPORTS_INTERSECTION_OBSERVER: boolean;
|
|
7
|
+
declare const SUPPORTS_MUTATION_OBSERVER: boolean;
|
|
8
|
+
declare const version: any;
|
|
9
|
+
declare const __LOGGER_ENABLED__: any;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/constants/htmlElements.d.ts
|
|
12
|
+
declare const selfClosingTags: ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "source", "track", "wbr"];
|
|
13
|
+
/**
|
|
14
|
+
* Set of HTML elements that are self-closing (void elements)
|
|
15
|
+
* These elements cannot have children and don't need closing tags
|
|
16
|
+
*/
|
|
17
|
+
declare const SELF_CLOSING_TAGS: Set<"area" | "base" | "br" | "col" | "embed" | "hr" | "img" | "input" | "link" | "meta" | "source" | "track" | "wbr">;
|
|
18
|
+
/**
|
|
19
|
+
* Common HTML element types for polymorphic components
|
|
20
|
+
*/
|
|
21
|
+
declare const COMMON_ELEMENTS: {
|
|
22
|
+
readonly DIV: "div";
|
|
23
|
+
readonly SPAN: "span";
|
|
24
|
+
readonly SECTION: "section";
|
|
25
|
+
readonly ARTICLE: "article";
|
|
26
|
+
readonly ASIDE: "aside";
|
|
27
|
+
readonly HEADER: "header";
|
|
28
|
+
readonly FOOTER: "footer";
|
|
29
|
+
readonly MAIN: "main";
|
|
30
|
+
readonly NAV: "nav";
|
|
31
|
+
readonly P: "p";
|
|
32
|
+
readonly H1: "h1";
|
|
33
|
+
readonly H2: "h2";
|
|
34
|
+
readonly H3: "h3";
|
|
35
|
+
readonly H4: "h4";
|
|
36
|
+
readonly H5: "h5";
|
|
37
|
+
readonly H6: "h6";
|
|
38
|
+
readonly BUTTON: "button";
|
|
39
|
+
readonly A: "a";
|
|
40
|
+
readonly INPUT: "input";
|
|
41
|
+
readonly TEXTAREA: "textarea";
|
|
42
|
+
readonly SELECT: "select";
|
|
43
|
+
readonly LABEL: "label";
|
|
44
|
+
readonly UL: "ul";
|
|
45
|
+
readonly OL: "ol";
|
|
46
|
+
readonly LI: "li";
|
|
47
|
+
readonly DL: "dl";
|
|
48
|
+
readonly DT: "dt";
|
|
49
|
+
readonly DD: "dd";
|
|
50
|
+
readonly IMG: "img";
|
|
51
|
+
readonly VIDEO: "video";
|
|
52
|
+
readonly AUDIO: "audio";
|
|
53
|
+
readonly CANVAS: "canvas";
|
|
54
|
+
readonly SVG: "svg";
|
|
55
|
+
readonly TABLE: "table";
|
|
56
|
+
readonly THEAD: "thead";
|
|
57
|
+
readonly TBODY: "tbody";
|
|
58
|
+
readonly TFOOT: "tfoot";
|
|
59
|
+
readonly TR: "tr";
|
|
60
|
+
readonly TH: "th";
|
|
61
|
+
readonly TD: "td";
|
|
62
|
+
readonly FORM: "form";
|
|
63
|
+
readonly FIELDSET: "fieldset";
|
|
64
|
+
readonly LEGEND: "legend";
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Check if an element is self-closing
|
|
68
|
+
*/
|
|
69
|
+
declare function isSelfClosingTag(tag: keyof HTMLElementTagNameMap): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Type for all valid HTML element names
|
|
72
|
+
*/
|
|
73
|
+
type HTMLElementName = keyof HTMLElementTagNameMap;
|
|
74
|
+
/**
|
|
75
|
+
* Type for self-closing HTML elements
|
|
76
|
+
*/
|
|
77
|
+
type SelfClosingElement = keyof typeof selfClosingTags;
|
|
78
|
+
//#endregion
|
|
79
|
+
export { COMMON_ELEMENTS, HTMLElementName, IN_BROWSER, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, SelfClosingElement, __LOGGER_ENABLED__, isSelfClosingTag, version };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./index-LBy5OPMu.js";
|
|
2
|
+
import { AtomExpose, AtomProps, AtomSlots, BreakpointName, Breakpoints, BreakpointsContext, BreakpointsOptions, CleanupFunction, Colors, ConsolaLoggerAdapter, Context, EventHandler, FilterFunction, FilterItem, FilterMode, FilterQuery, FlatTokenCollection, FormContext, FormOptions, FormTicket, FormValidationResult, FormValidationRule, FormValue, Group, GroupContext, GroupItemProps, GroupItemSlots, GroupOptions, GroupRootProps, GroupRootSlots, GroupTicket, HydrationContext, IntersectionObserverEntry, IntersectionObserverOptions, KeyHandler, LayoutContext, LayoutLocation, LayoutOptions, LayoutTicket, LocaleContext, LocaleOptions, LocalePluginOptions, LocaleTicket, LogLevel, LoggerAdapter, LoggerContext, LoggerOptions, MutationObserverRecord, PinoLoggerAdapter, Popover, PopoverAnchorProps, PopoverContentEmits, PopoverContentProps, PopoverContext, PopoverRootProps, Primitive, ProxyModelOptions, RegistryContext, RegistryOptions, RegistryTicket, ResizeObserverEntry, ResizeObserverOptions, SelectionContext, SelectionOptions, SelectionTicket, SingleContext, SingleOptions, SingleTicket, Step, StepContext, StepItemProps, StepItemSlots, StepOptions, StepRootProps, StepRootSlots, StepTicket, StorageContext, StorageOptions, Theme, ThemeColors, ThemeContext, ThemeOptions, ThemePluginOptions, ThemeRecord, ThemeRootProps, ThemeRootSlots, ThemeSlots, ThemeTicket, TokenAlias, TokenCollection, TokenContext, TokenPrimitive, TokenTicket, TokenValue, UseFilterOptions, UseFilterResult, UseMutationObserverOptions, Vuetify0LoggerAdapter, _default as _default$2, _default$1, _default$2 as _default, createBreakpoints, createBreakpointsPlugin, createHydration, createHydrationPlugin, createLocale, createLocalePlugin, createLogger, createLoggerPlugin, createRegistryContext, createStorage, createStoragePlugin, createTheme, createThemePlugin, createTokensContext, provideBreakpointsContext, provideHydrationContext, providePopoverContext, provideStorageContext, useBreakpoints, useBreakpointsContext, useDocumentEventListener, useElementIntersection, useElementSize, useEventListener, useFilter, useForm, useGroup, useHydration, useHydrationContext, useIntersectionObserver, useKeydown, useLayout, useLocale, useLogger, useMutationObserver, usePopoverContext, useProxyModel, useRegistry, useResizeObserver, useSelection, useSingle, useStep, useStorage, useStorageContext, useTheme, useTokens, useWindowEventListener } from "./index-BnsMFYhs.js";
|
|
3
|
+
import { ContextKey, ContextTrinity, Plugin, PluginOptions, createContext, createPlugin, createTrinity, useContext } from "./index-BqrLvboW.js";
|
|
4
|
+
import { COMMON_ELEMENTS, HTMLElementName, IN_BROWSER, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, SelfClosingElement, __LOGGER_ENABLED__, isSelfClosingTag, version } from "./index-z_zwVNP8.js";
|
|
5
|
+
import { toArray, toReactive } from "./index-tUyghL98.js";
|
|
6
|
+
import { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run } from "./index-BozA2pze.js";
|
|
7
|
+
export { _default as Atom, AtomExpose, AtomProps, AtomSlots, BreakpointName, Breakpoints, BreakpointsContext, BreakpointsOptions, COMMON_ELEMENTS, CleanupFunction, Colors, ConsolaLoggerAdapter, Context, ContextKey, ContextTrinity, EventHandler, FilterFunction, FilterItem, FilterMode, FilterQuery, FlatTokenCollection, FormContext, FormOptions, FormTicket, FormValidationResult, FormValidationRule, FormValue, Group, GroupContext, GroupItemProps, GroupItemSlots, GroupOptions, GroupRootProps, GroupRootSlots, GroupTicket, HTMLElementName, _default$1 as Hydration, HydrationContext, _default$2 as HydrationRoot, IN_BROWSER, IntersectionObserverEntry, IntersectionObserverOptions, KeyHandler, LayoutContext, LayoutLocation, LayoutOptions, LayoutTicket, LocaleContext, LocaleOptions, LocalePluginOptions, LocaleTicket, LogLevel, LoggerAdapter, LoggerContext, LoggerOptions, MutationObserverRecord, PinoLoggerAdapter, Plugin, PluginOptions, Popover, PopoverAnchorProps, PopoverContentEmits, PopoverContentProps, PopoverContext, PopoverRootProps, Primitive, ProxyModelOptions, RegistryContext, RegistryOptions, RegistryTicket, ResizeObserverEntry, ResizeObserverOptions, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, SelectionContext, SelectionOptions, SelectionTicket, SelfClosingElement, SingleContext, SingleOptions, SingleTicket, Step, StepContext, StepItemProps, StepItemSlots, StepOptions, StepRootProps, StepRootSlots, StepTicket, StorageContext, StorageOptions, Theme, ThemeColors, ThemeContext, ThemeOptions, ThemePluginOptions, ThemeRecord, ThemeRootProps, ThemeRootSlots, ThemeSlots, ThemeTicket, TokenAlias, TokenCollection, TokenContext, TokenPrimitive, TokenTicket, TokenValue, UseFilterOptions, UseFilterResult, UseMutationObserverOptions, Vuetify0LoggerAdapter, __LOGGER_ENABLED__, createBreakpoints, createBreakpointsPlugin, createContext, createHydration, createHydrationPlugin, createLocale, createLocalePlugin, createLogger, createLoggerPlugin, createPlugin, createRegistryContext, createStorage, createStoragePlugin, createTheme, createThemePlugin, createTokensContext, createTrinity, genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isSelfClosingTag, isString, mergeDeep, provideBreakpointsContext, provideHydrationContext, providePopoverContext, provideStorageContext, run, toArray, toReactive, useBreakpoints, useBreakpointsContext, useContext, useDocumentEventListener, useElementIntersection, useElementSize, useEventListener, useFilter, useForm, useGroup, useHydration, useHydrationContext, useIntersectionObserver, useKeydown, useLayout, useLocale, useLogger, useMutationObserver, usePopoverContext, useProxyModel, useRegistry, useResizeObserver, useSelection, useSingle, useStep, useStorage, useStorageContext, useTheme, useTokens, useWindowEventListener, version };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { COMMON_ELEMENTS, SELF_CLOSING_TAGS, isSelfClosingTag } from "./htmlElements-SjqYu0am.js";
|
|
2
|
+
import { Atom_default, Breakpoints, Context, Group, HydrationRoot_default, Hydration_default, Popover, Step, Theme, providePopoverContext, usePopoverContext } from "./components-Cc48kKWf.js";
|
|
3
|
+
import { createContext, createPlugin, createTrinity, useContext } from "./factories-CPq2yMlr.js";
|
|
4
|
+
import { ConsolaLoggerAdapter, PinoLoggerAdapter, Vuetify0LoggerAdapter, createBreakpoints, createBreakpointsPlugin, createHydration, createHydrationPlugin, createLogger, createLoggerPlugin, createRegistryContext, createTheme, createThemePlugin, createTokensContext, provideBreakpointsContext, provideHydrationContext, useBreakpoints, useBreakpointsContext, useGroup, useHydration, useHydrationContext, useLogger, useRegistry, useSelection, useSingle, useStep, useTheme, useTokens } from "./useTheme-DSYiiz0R.js";
|
|
5
|
+
import { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run } from "./utilities-D9rWEgQK.js";
|
|
6
|
+
import { IN_BROWSER, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, __LOGGER_ENABLED__, version } from "./globals--2b7sF4-.js";
|
|
7
|
+
import { toArray, toReactive } from "./transformers-BAeg3QJF.js";
|
|
8
|
+
import { createLocale, createLocalePlugin, createStorage, createStoragePlugin, provideStorageContext, useDocumentEventListener, useElementIntersection, useElementSize, useEventListener, useFilter, useForm, useIntersectionObserver, useKeydown, useLayout, useLocale, useMutationObserver, useProxyModel, useResizeObserver, useStorage, useStorageContext, useWindowEventListener } from "./composables-7Cbs2sdO.js";
|
|
9
|
+
import "./constants-DiTCgvMU.js";
|
|
10
|
+
|
|
11
|
+
export { Atom_default as Atom, Breakpoints, COMMON_ELEMENTS, ConsolaLoggerAdapter, Context, Group, Hydration_default as Hydration, HydrationRoot_default as HydrationRoot, IN_BROWSER, PinoLoggerAdapter, Popover, SELF_CLOSING_TAGS, SUPPORTS_INTERSECTION_OBSERVER, SUPPORTS_MATCH_MEDIA, SUPPORTS_MUTATION_OBSERVER, SUPPORTS_OBSERVER, SUPPORTS_TOUCH, Step, Theme, Vuetify0LoggerAdapter, __LOGGER_ENABLED__, createBreakpoints, createBreakpointsPlugin, createContext, createHydration, createHydrationPlugin, createLocale, createLocalePlugin, createLogger, createLoggerPlugin, createPlugin, createRegistryContext, createStorage, createStoragePlugin, createTheme, createThemePlugin, createTokensContext, createTrinity, genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isSelfClosingTag, isString, mergeDeep, provideBreakpointsContext, provideHydrationContext, providePopoverContext, provideStorageContext, run, toArray, toReactive, useBreakpoints, useBreakpointsContext, useContext, useDocumentEventListener, useElementIntersection, useElementSize, useEventListener, useFilter, useForm, useGroup, useHydration, useHydrationContext, useIntersectionObserver, useKeydown, useLayout, useLocale, useLogger, useMutationObserver, usePopoverContext, useProxyModel, useRegistry, useResizeObserver, useSelection, useSingle, useStep, useStorage, useStorageContext, useTheme, useTokens, useWindowEventListener, version };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DOMElement, DeepPartial, GenericObject, ID, MaybeArray, UnknownObject } from "../index-
|
|
1
|
+
import { DOMElement, DeepPartial, GenericObject, ID, MaybeArray, UnknownObject } from "../index-LBy5OPMu.js";
|
|
2
2
|
export { DOMElement, DeepPartial, GenericObject, ID, MaybeArray, UnknownObject };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { createContext, createPlugin, createTrinity, useContext } from "./
|
|
2
|
-
import { genId, isArray, isObject, isString, mergeDeep } from "./utilities-
|
|
3
|
-
import {
|
|
1
|
+
import { createContext, createPlugin, createTrinity, useContext } from "./factories-CPq2yMlr.js";
|
|
2
|
+
import { genId, isArray, isObject, isString, mergeDeep } from "./utilities-D9rWEgQK.js";
|
|
3
|
+
import { IN_BROWSER, __LOGGER_ENABLED__ } from "./globals--2b7sF4-.js";
|
|
4
|
+
import { toArray } from "./transformers-BAeg3QJF.js";
|
|
4
5
|
import { computed, getCurrentInstance, onMounted, onScopeDispose, shallowReactive, shallowReadonly, shallowRef, toRef, watch } from "vue";
|
|
5
6
|
|
|
6
7
|
//#region src/composables/useHydration/index.ts
|
|
@@ -53,16 +54,6 @@ function createHydrationPlugin() {
|
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region src/constants/globals.ts
|
|
58
|
-
const IN_BROWSER = typeof window !== "undefined";
|
|
59
|
-
const SUPPORTS_TOUCH = IN_BROWSER && ("ontouchstart" in window || window.navigator.maxTouchPoints > 0);
|
|
60
|
-
const SUPPORTS_MATCH_MEDIA = IN_BROWSER && "matchMedia" in window && typeof window.matchMedia === "function";
|
|
61
|
-
const SUPPORTS_OBSERVER = IN_BROWSER && "ResizeObserver" in window;
|
|
62
|
-
const SUPPORTS_INTERSECTION_OBSERVER = IN_BROWSER && "IntersectionObserver" in window;
|
|
63
|
-
const SUPPORTS_MUTATION_OBSERVER = IN_BROWSER && "MutationObserver" in window;
|
|
64
|
-
const __LOGGER_ENABLED__ = process.env.NODE_ENV !== "production" || process.env.VITE_LOGGER_ENABLED === "true";
|
|
65
|
-
|
|
66
57
|
//#endregion
|
|
67
58
|
//#region src/composables/useBreakpoints/index.ts
|
|
68
59
|
const [useBreakpointsContext, provideBreakpointsContext] = createContext("v0:breakpoints");
|
|
@@ -505,6 +496,40 @@ function useRegistry(options) {
|
|
|
505
496
|
function get(id) {
|
|
506
497
|
return collection.get(id);
|
|
507
498
|
}
|
|
499
|
+
function upsert(id, patch = {}) {
|
|
500
|
+
const existing = get(id);
|
|
501
|
+
if (!existing) return register({
|
|
502
|
+
...patch,
|
|
503
|
+
id
|
|
504
|
+
});
|
|
505
|
+
const hasValue = Object.prototype.hasOwnProperty.call(patch, "value");
|
|
506
|
+
let value = existing.value;
|
|
507
|
+
let valueIsIndex = existing.valueIsIndex;
|
|
508
|
+
if (hasValue) {
|
|
509
|
+
if (patch.value === void 0) {
|
|
510
|
+
value = existing.index;
|
|
511
|
+
valueIsIndex = true;
|
|
512
|
+
} else {
|
|
513
|
+
value = patch.value;
|
|
514
|
+
valueIsIndex = false;
|
|
515
|
+
}
|
|
516
|
+
if (!Object.is(value, existing.value)) {
|
|
517
|
+
unassign(existing.value, id);
|
|
518
|
+
assign(value, id);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
const updated = {
|
|
522
|
+
...existing,
|
|
523
|
+
...patch,
|
|
524
|
+
id,
|
|
525
|
+
index: existing.index,
|
|
526
|
+
value,
|
|
527
|
+
valueIsIndex
|
|
528
|
+
};
|
|
529
|
+
collection.set(id, updated);
|
|
530
|
+
invalidate();
|
|
531
|
+
return updated;
|
|
532
|
+
}
|
|
508
533
|
function browse(value) {
|
|
509
534
|
return catalog.get(value);
|
|
510
535
|
}
|
|
@@ -560,8 +585,7 @@ function useRegistry(options) {
|
|
|
560
585
|
invalidate();
|
|
561
586
|
}
|
|
562
587
|
function invalidate() {
|
|
563
|
-
if (cache.size
|
|
564
|
-
cache.clear();
|
|
588
|
+
if (cache.size > 0) cache.clear();
|
|
565
589
|
}
|
|
566
590
|
function reindex() {
|
|
567
591
|
if (catalog.size > 0) catalog.clear();
|
|
@@ -585,12 +609,15 @@ function useRegistry(options) {
|
|
|
585
609
|
logger.warn(`Item with id "${id}" already exists in the registry. Skipping registration.`);
|
|
586
610
|
return get(id);
|
|
587
611
|
}
|
|
612
|
+
const index = registration.index ?? size;
|
|
613
|
+
const value = registration.value === void 0 ? index : registration.value;
|
|
614
|
+
const valueIsIndex = registration.value === void 0;
|
|
588
615
|
const item = {
|
|
589
616
|
...registration,
|
|
590
617
|
id,
|
|
591
|
-
index
|
|
592
|
-
value
|
|
593
|
-
valueIsIndex
|
|
618
|
+
index,
|
|
619
|
+
value,
|
|
620
|
+
valueIsIndex
|
|
594
621
|
};
|
|
595
622
|
collection.set(item.id, item);
|
|
596
623
|
directory.set(item.index, item.id);
|
|
@@ -622,6 +649,7 @@ function useRegistry(options) {
|
|
|
622
649
|
values,
|
|
623
650
|
lookup,
|
|
624
651
|
get,
|
|
652
|
+
upsert,
|
|
625
653
|
register,
|
|
626
654
|
unregister,
|
|
627
655
|
reindex,
|
|
@@ -633,6 +661,24 @@ function useRegistry(options) {
|
|
|
633
661
|
}
|
|
634
662
|
};
|
|
635
663
|
}
|
|
664
|
+
/**
|
|
665
|
+
* Creates a registry context with full injection/provision control.
|
|
666
|
+
* Returns the complete trinity for advanced usage scenarios.
|
|
667
|
+
*
|
|
668
|
+
* @param namespace The namespace for the registry context.
|
|
669
|
+
* @param options Optional configuration for reactivity behavior.
|
|
670
|
+
* @template Z The type of tickets managed by the registry.
|
|
671
|
+
* @template E The type of the registry context.
|
|
672
|
+
* @returns A tuple containing the inject function, provide function, and the registry context.
|
|
673
|
+
*/
|
|
674
|
+
function createRegistryContext(namespace, options) {
|
|
675
|
+
const [useRegistryContext, _provideRegistryContext] = createContext(namespace);
|
|
676
|
+
const context = useRegistry(options);
|
|
677
|
+
function provideRegistryContext(_context = context, app) {
|
|
678
|
+
return _provideRegistryContext(_context, app);
|
|
679
|
+
}
|
|
680
|
+
return createTrinity(useRegistryContext, provideRegistryContext, context);
|
|
681
|
+
}
|
|
636
682
|
|
|
637
683
|
//#endregion
|
|
638
684
|
//#region src/composables/useSelection/index.ts
|
|
@@ -1195,4 +1241,4 @@ function createThemePlugin(_options = {}) {
|
|
|
1195
1241
|
}
|
|
1196
1242
|
|
|
1197
1243
|
//#endregion
|
|
1198
|
-
export { ConsolaLoggerAdapter,
|
|
1244
|
+
export { ConsolaLoggerAdapter, PinoLoggerAdapter, Vuetify0LoggerAdapter, createBreakpoints, createBreakpointsPlugin, createHydration, createHydrationPlugin, createLogger, createLoggerPlugin, createRegistryContext, createTheme, createThemePlugin, createTokensContext, provideBreakpointsContext, provideHydrationContext, useBreakpoints, useBreakpointsContext, useGroup, useHydration, useHydrationContext, useLogger, useRegistry, useSelection, useSingle, useStep, useTheme, useTokens };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run } from "../index-
|
|
1
|
+
import "../index-LBy5OPMu.js";
|
|
2
|
+
import { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run } from "../index-BozA2pze.js";
|
|
3
3
|
export { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run } from "../utilities-
|
|
1
|
+
import { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run } from "../utilities-D9rWEgQK.js";
|
|
2
2
|
|
|
3
3
|
export { genId, isArray, isBoolean, isFunction, isNullOrUndefined, isNumber, isObject, isPrimitive, isString, mergeDeep, run };
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuetify/v0",
|
|
3
|
-
"version": "0.0.2
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Vuetify0",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"main": "./dist/index.
|
|
7
|
-
"module": "./dist/index.
|
|
8
|
-
"types": "./dist/index.d.
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"type": "module",
|
|
9
10
|
"files": [
|
|
10
11
|
"dist"
|
|
11
12
|
],
|
|
@@ -16,32 +17,40 @@
|
|
|
16
17
|
},
|
|
17
18
|
"exports": {
|
|
18
19
|
".": {
|
|
19
|
-
"types": "./dist/index.d.
|
|
20
|
-
"import": "./dist/index.
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./browser": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/browser/index.js"
|
|
21
26
|
},
|
|
22
27
|
"./components": {
|
|
23
|
-
"types": "./dist/components/index.d.
|
|
24
|
-
"import": "./dist/components/index.
|
|
28
|
+
"types": "./dist/components/index.d.ts",
|
|
29
|
+
"import": "./dist/components/index.js"
|
|
25
30
|
},
|
|
26
31
|
"./composables": {
|
|
27
|
-
"types": "./dist/composables/index.d.
|
|
28
|
-
"import": "./dist/composables/index.
|
|
32
|
+
"types": "./dist/composables/index.d.ts",
|
|
33
|
+
"import": "./dist/composables/index.js"
|
|
29
34
|
},
|
|
30
35
|
"./factories": {
|
|
31
|
-
"types": "./dist/factories/index.d.
|
|
32
|
-
"import": "./dist/factories/index.
|
|
36
|
+
"types": "./dist/factories/index.d.ts",
|
|
37
|
+
"import": "./dist/factories/index.js"
|
|
33
38
|
},
|
|
34
39
|
"./transformers": {
|
|
35
|
-
"types": "./dist/transformers/index.d.
|
|
36
|
-
"import": "./dist/transformers/index.
|
|
40
|
+
"types": "./dist/transformers/index.d.ts",
|
|
41
|
+
"import": "./dist/transformers/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./constants": {
|
|
44
|
+
"types": "./dist/constants/index.d.ts",
|
|
45
|
+
"import": "./dist/constants/index.js"
|
|
37
46
|
},
|
|
38
47
|
"./types": {
|
|
39
|
-
"types": "./dist/types/index.d.
|
|
40
|
-
"import": "./dist/types/index.
|
|
48
|
+
"types": "./dist/types/index.d.ts",
|
|
49
|
+
"import": "./dist/types/index.js"
|
|
41
50
|
},
|
|
42
51
|
"./utilities": {
|
|
43
|
-
"types": "./dist/utilities/index.d.
|
|
44
|
-
"import": "./dist/utilities/index.
|
|
52
|
+
"types": "./dist/utilities/index.d.ts",
|
|
53
|
+
"import": "./dist/utilities/index.js"
|
|
45
54
|
}
|
|
46
55
|
},
|
|
47
56
|
"peerDependencies": {
|
|
@@ -67,13 +76,15 @@
|
|
|
67
76
|
},
|
|
68
77
|
"devDependencies": {
|
|
69
78
|
"@vue/test-utils": "^2.4.6",
|
|
70
|
-
"tsdown": "^0.
|
|
79
|
+
"tsdown": "^0.14.2",
|
|
71
80
|
"typescript": "5.8.3",
|
|
72
81
|
"unplugin-vue": "^6.2.0",
|
|
73
82
|
"vue": "^3.5.17"
|
|
74
83
|
},
|
|
75
84
|
"scripts": {
|
|
76
|
-
"build": "
|
|
77
|
-
"build:
|
|
85
|
+
"build": "pnpm build:bundler && pnpm build:browser",
|
|
86
|
+
"build:bundler": "tsdown --config build/tsdown.bundler.config.ts",
|
|
87
|
+
"build:browser": "tsdown --config build/tsdown.browser.config.ts",
|
|
88
|
+
"typecheck": "vue-tsc --noEmit --incremental"
|
|
78
89
|
}
|
|
79
90
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import "../index-BA3ZFBnL.mjs";
|
|
2
|
-
import { BreakpointName, BreakpointsContext, BreakpointsOptions, BreakpointsPlugin, Colors, FlatTokenCollection, GroupContext, GroupOptions, GroupTicket, HydrationContext, HydrationPlugin, RegistryContext, RegistryOptions, RegistryTicket, SelectionContext, SelectionOptions, SelectionTicket, SingleContext, SingleOptions, SingleTicket, StepContext, StepOptions, StepTicket, ThemeColors, ThemeContext, ThemeOptions, ThemePlugin, ThemePluginOptions, ThemeRecord, ThemeTicket, TokenAlias, TokenCollection, TokenContext, TokenPrimitive, TokenTicket, TokenValue, createBreakpoints, createBreakpointsPlugin, createHydration, createHydrationPlugin, createTheme, createThemePlugin, createTokensContext, provideBreakpointsContext, provideHydrationContext, useBreakpoints, useBreakpointsContext, useGroup, useHydration, useHydrationContext, useRegistry, useSelection, useSingle, useStep, useTheme, useTokens } from "../index-ChaaTPKp.mjs";
|
|
3
|
-
import "../index-DfahEz6s.mjs";
|
|
4
|
-
import { CleanupFunction, ConsolaLoggerAdapter, EventHandler, FilterFunction, FilterItem, FilterMode, FilterQuery, FormContext, FormOptions, FormTicket, FormValidationResult, FormValidationRule, FormValue, KeyHandler, LayoutContext, LayoutLocation, LayoutOptions, LayoutTicket, LocaleContext, LocaleOptions, LocalePlugin, LocalePluginOptions, LocaleTicket, LogLevel, LoggerAdapter, LoggerContext, LoggerOptions, LoggerPlugin, PinoLoggerAdapter, Primitive, ProxyModelOptions, StorageContext, StorageOptions, StoragePlugin, UseFilterOptions, UseFilterResult, Vuetify0LoggerAdapter, createLocale, createLocalePlugin, createLogger, createLoggerPlugin, createStorage, createStoragePlugin, provideStorageContext, useDocumentEventListener, useEventListener, useFilter, useForm, useKeydown, useLayout, useLocale, useLogger, useProxyModel, useStorage, useStorageContext, useWindowEventListener } from "../index-Cya5Y9pB.mjs";
|
|
5
|
-
export { BreakpointName, BreakpointsContext, BreakpointsOptions, BreakpointsPlugin, CleanupFunction, Colors, ConsolaLoggerAdapter, EventHandler, FilterFunction, FilterItem, FilterMode, FilterQuery, FlatTokenCollection, FormContext, FormOptions, FormTicket, FormValidationResult, FormValidationRule, FormValue, GroupContext, GroupOptions, GroupTicket, HydrationContext, HydrationPlugin, KeyHandler, LayoutContext, LayoutLocation, LayoutOptions, LayoutTicket, LocaleContext, LocaleOptions, LocalePlugin, LocalePluginOptions, LocaleTicket, LogLevel, LoggerAdapter, LoggerContext, LoggerOptions, LoggerPlugin, PinoLoggerAdapter, Primitive, ProxyModelOptions, RegistryContext, RegistryOptions, RegistryTicket, SelectionContext, SelectionOptions, SelectionTicket, SingleContext, SingleOptions, SingleTicket, StepContext, StepOptions, StepTicket, StorageContext, StorageOptions, StoragePlugin, ThemeColors, ThemeContext, ThemeOptions, ThemePlugin, ThemePluginOptions, ThemeRecord, ThemeTicket, TokenAlias, TokenCollection, TokenContext, TokenPrimitive, TokenTicket, TokenValue, UseFilterOptions, UseFilterResult, Vuetify0LoggerAdapter, createBreakpoints, createBreakpointsPlugin, createHydration, createHydrationPlugin, createLocale, createLocalePlugin, createLogger, createLoggerPlugin, createStorage, createStoragePlugin, createTheme, createThemePlugin, createTokensContext, provideBreakpointsContext, provideHydrationContext, provideStorageContext, useBreakpoints, useBreakpointsContext, useDocumentEventListener, useEventListener, useFilter, useForm, useGroup, useHydration, useHydrationContext, useKeydown, useLayout, useLocale, useLogger, useProxyModel, useRegistry, useSelection, useSingle, useStep, useStorage, useStorageContext, useTheme, useTokens, useWindowEventListener };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "../createTrinity-CwGvQ2ng.mjs";
|
|
2
|
-
import { ConsolaLoggerAdapter, PinoLoggerAdapter, Vuetify0LoggerAdapter, createBreakpoints, createBreakpointsPlugin, createHydration, createHydrationPlugin, createLogger, createLoggerPlugin, createTheme, createThemePlugin, createTokensContext, provideBreakpointsContext, provideHydrationContext, useBreakpoints, useBreakpointsContext, useGroup, useHydration, useHydrationContext, useLogger, useRegistry, useSelection, useSingle, useStep, useTheme, useTokens } from "../useTheme-tY7MoBKr.mjs";
|
|
3
|
-
import "../utilities-lZSfrXgw.mjs";
|
|
4
|
-
import "../transformers-BTjuwbOV.mjs";
|
|
5
|
-
import { createLocale, createLocalePlugin, createStorage, createStoragePlugin, provideStorageContext, useDocumentEventListener, useEventListener, useFilter, useForm, useKeydown, useLayout, useLocale, useProxyModel, useStorage, useStorageContext, useWindowEventListener } from "../composables-C6dl5kjP.mjs";
|
|
6
|
-
|
|
7
|
-
export { ConsolaLoggerAdapter, PinoLoggerAdapter, Vuetify0LoggerAdapter, createBreakpoints, createBreakpointsPlugin, createHydration, createHydrationPlugin, createLocale, createLocalePlugin, createLogger, createLoggerPlugin, createStorage, createStoragePlugin, createTheme, createThemePlugin, createTokensContext, provideBreakpointsContext, provideHydrationContext, provideStorageContext, useBreakpoints, useBreakpointsContext, useDocumentEventListener, useEventListener, useFilter, useForm, useGroup, useHydration, useHydrationContext, useKeydown, useLayout, useLocale, useLogger, useProxyModel, useRegistry, useSelection, useSingle, useStep, useStorage, useStorageContext, useTheme, useTokens, useWindowEventListener };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ContextTrinity, createTrinity } from "../index-DfahEz6s.mjs";
|
|
2
|
-
import { ContextKey, PluginOptions, createContext, createPlugin, useContext } from "../index-oCBJwhpG.mjs";
|
|
3
|
-
export { ContextKey, ContextTrinity, PluginOptions, createContext, createPlugin, createTrinity, useContext };
|
|
File without changes
|