@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.
- package/README.md +5 -1
- package/dist/{adapter-CCIeOzqr.mjs → adapter-CDpOQ8sn.mjs} +29 -20
- package/dist/{adapter-CcHB7rs3.d.mts → adapter-DoziXEzS.d.mts} +1 -1
- package/dist/{adapter-Drq1v5wV.mjs → adapter-DtgIrQsG.mjs} +5 -2
- package/dist/{adapter-BZjmDNJF.d.mts → adapter-J7ude3gO.d.mts} +2 -2
- package/dist/adapters-CFjrKxA2.mjs +5 -0
- package/dist/adapters-CiCexgsk.mjs +4 -0
- package/dist/{adapters-Cd8NDs18.mjs → adapters-Da2twiUn.mjs} +1 -1
- package/dist/adapters-DegUcfkd.mjs +2 -0
- package/dist/browser/index.js +10113 -8547
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.mjs +2 -2
- package/dist/{components-C142GPl_.mjs → components-CaPQCjo5.mjs} +1356 -386
- package/dist/composables/index.d.mts +11 -11
- package/dist/composables/index.mjs +24 -24
- package/dist/constants/index.mjs +2 -2
- package/dist/{createDataTable-DKE5QsMe.mjs → createDataTable-B4UflKnT.mjs} +100 -30
- package/dist/{createGroup-CzRZ9COh.mjs → createGroup-BC2nfttd.mjs} +24 -9
- package/dist/{createPagination-Tp4C4He8.mjs → createPagination-qvJkcTUY.mjs} +11 -7
- package/dist/{createSelection-Dsb3I0zm.mjs → createSelection-BA9guLah.mjs} +28 -21
- package/dist/{createSingle-C7IGUjP6.mjs → createSingle-BHxHLZeg.mjs} +13 -17
- package/dist/{createTokens-CHTawmud.mjs → createTokens-oJAeh262.mjs} +27 -15
- package/dist/{createTrinity-vvXk0ARD.mjs → createTrinity-BTCs1pYx.mjs} +34 -31
- 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 +6 -6
- 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-BrRJkuSY.mjs → globals-Berkg6mP.mjs} +1 -1
- package/dist/{htmlElements-DcYtv0hg.mjs → htmlElements-CIePKaTX.mjs} +1 -1
- package/dist/{index-76fQGkkO.d.mts → index-D4odwkZg.d.mts} +8 -11
- package/dist/{index-B_XLHftL.d.mts → index-DFvLSoto.d.mts} +296 -258
- package/dist/{index-DoGxDgdN.d.mts → index-DVPq3_Fz.d.mts} +55 -4
- package/dist/{index-BFuSOgUi.d.mts → index-Gk3x_7zD.d.mts} +1570 -437
- package/dist/{index-BUsrN1vL.d.mts → index-TtSSvHY6.d.mts} +1 -1
- package/dist/index.d.mts +12 -12
- package/dist/index.mjs +27 -27
- package/dist/json/attributes.json +276 -0
- package/dist/json/importMap.json +60 -0
- package/dist/json/tags.json +136 -2
- package/dist/json/web-types.json +1183 -344
- 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/index.mjs +2 -2
- 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 +1 -1
- 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/{posthog-Ccm8FQfD.mjs → posthog-CPvNHMUb.mjs} +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/{server-CIftA0pK.mjs → server-B6OtHgBT.mjs} +1 -1
- package/dist/{server-DNUTnISs.d.mts → server-ZiHJ4tfq.d.mts} +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 +4 -4
- 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/{toArray-doLQVI56.mjs → toArray-BA_JxFPv.mjs} +9 -0
- package/dist/{unhead--58lO3Z-.mjs → unhead-D2YqAcmF.mjs} +2 -2
- package/dist/{useClickOutside-BjO3Nty9.mjs → useClickOutside-B9a6Jext.mjs} +572 -160
- package/dist/{useFeatures-D9bGOvh4.mjs → useFeatures-wgMwaQ5W.mjs} +14 -5
- package/dist/{useLocale-BRQTt3Ka.mjs → useLocale-qMmVnAwS.mjs} +14 -5
- package/dist/{useLogger-Daz-Zr0z.mjs → useLogger-DFIRqm-N.mjs} +33 -16
- package/dist/{usePermissions-Yp3guoLH.mjs → usePermissions-tZhkBJmq.mjs} +11 -3
- package/dist/{useRules-BFPH7q8w.mjs → useRules-D3UXEtu7.mjs} +10 -2
- package/dist/{useTheme-zRa0Nh_g.mjs → useTheme-BeD__R8t.mjs} +14 -5
- package/dist/utilities/index.mjs +5 -5
- package/dist/{v0-CcV0VwYd.mjs → v0-6XptGYVx.mjs} +2 -2
- package/dist/{v0-DOq_Ia5H.mjs → v0-BG7RhKBv.mjs} +2 -2
- package/dist/{v0-Bno8FQ_F.mjs → v0-CNitYI9N.mjs} +1 -1
- package/dist/{v0-BpgPZ1qB.d.mts → v0-CWXUkMY0.d.mts} +1 -1
- package/dist/{v0-BAG8p0si.d.mts → v0-Dzw5OwNo.d.mts} +1 -1
- package/dist/{v0-D-AEQbvj.mjs → v0-I2mHxD9T.mjs} +1 -1
- package/dist/{virtual-BaQWQ9ji.d.mts → virtual-BCOfxnRS.d.mts} +1 -1
- package/dist/{virtual-D1HwNBLS.mjs → virtual-To-dSw2_.mjs} +2 -2
- package/package.json +10 -7
- package/SKILL.md +0 -95
- package/dist/adapters-BbNfjyvY.mjs +0 -5
- package/dist/adapters-BzRMo72Y.mjs +0 -4
- package/dist/adapters-_DyP1X4U.mjs +0 -2
- /package/dist/{index-c55Utzva.d.mts → index-DvuJXuAN.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as useContext,
|
|
2
|
-
import { t as createSelection } from "./createSelection-
|
|
1
|
+
import { i as useContext, t as createTrinity } from "./createTrinity-BTCs1pYx.mjs";
|
|
2
|
+
import { t as createSelection } from "./createSelection-BA9guLah.mjs";
|
|
3
3
|
import { toRef } from "vue";
|
|
4
4
|
//#region src/composables/createSingle/index.ts
|
|
5
5
|
/**
|
|
@@ -16,6 +16,16 @@ import { toRef } from "vue";
|
|
|
16
16
|
* - Perfect for tabs, radio buttons, theme selectors
|
|
17
17
|
*
|
|
18
18
|
* Inheritance chain: createRegistry → createSelection → createSingle
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { createSingle } from '@vuetify/v0'
|
|
23
|
+
*
|
|
24
|
+
* const single = createSingle()
|
|
25
|
+
* const ticket = single.register({ value: 'tab-1' })
|
|
26
|
+
* single.select(ticket.id)
|
|
27
|
+
* console.log(single.selectedValue.value) // 'tab-1'
|
|
28
|
+
* ```
|
|
19
29
|
*/
|
|
20
30
|
/**
|
|
21
31
|
* Creates a new single selection instance that enforces only one selected item at a time.
|
|
@@ -91,21 +101,12 @@ function createSingle(_options = {}) {
|
|
|
91
101
|
const selectedItem = toRef(() => registry.selectedItems.value.values().next().value);
|
|
92
102
|
const selectedIndex = toRef(() => selectedItem.value?.index ?? -1);
|
|
93
103
|
const selectedValue = toRef(() => selectedItem.value?.value);
|
|
94
|
-
function unselect(id) {
|
|
95
|
-
registry.unselect(id);
|
|
96
|
-
}
|
|
97
|
-
function toggle(id) {
|
|
98
|
-
if (registry.selectedIds.has(id)) unselect(id);
|
|
99
|
-
else registry.select(id);
|
|
100
|
-
}
|
|
101
104
|
return {
|
|
102
105
|
...registry,
|
|
103
106
|
selectedId,
|
|
104
107
|
selectedItem,
|
|
105
108
|
selectedIndex,
|
|
106
109
|
selectedValue,
|
|
107
|
-
unselect,
|
|
108
|
-
toggle,
|
|
109
110
|
get size() {
|
|
110
111
|
return registry.size;
|
|
111
112
|
}
|
|
@@ -139,12 +140,7 @@ function createSingle(_options = {}) {
|
|
|
139
140
|
*/
|
|
140
141
|
function createSingleContext(_options = {}) {
|
|
141
142
|
const { namespace = "v0:single", ...options } = _options;
|
|
142
|
-
|
|
143
|
-
const context = createSingle(options);
|
|
144
|
-
function provideSingleContext(_context = context, app) {
|
|
145
|
-
return _provideSingleContext(_context, app);
|
|
146
|
-
}
|
|
147
|
-
return createTrinity(useSingleContext, provideSingleContext, context);
|
|
143
|
+
return createTrinity(namespace, createSingle(options));
|
|
148
144
|
}
|
|
149
145
|
/**
|
|
150
146
|
* Returns the current single selection instance.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { clamp, isObject, isString, isUndefined, useId as useId$1 } from "./utilities/index.mjs";
|
|
2
|
-
import { i as useContext,
|
|
3
|
-
import { i as useLogger } from "./useLogger-
|
|
2
|
+
import { i as useContext, t as createTrinity } from "./createTrinity-BTCs1pYx.mjs";
|
|
3
|
+
import { i as useLogger } from "./useLogger-DFIRqm-N.mjs";
|
|
4
4
|
import { shallowReactive } from "vue";
|
|
5
5
|
//#region src/composables/createRegistry/index.ts
|
|
6
6
|
/**
|
|
@@ -20,6 +20,16 @@ import { shallowReactive } from "vue";
|
|
|
20
20
|
*
|
|
21
21
|
* The registry serves as the base for many other composables in the system,
|
|
22
22
|
* including createSelection, createForm, createTimeline, and more.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { createRegistry } from '@vuetify/v0'
|
|
27
|
+
*
|
|
28
|
+
* const registry = createRegistry()
|
|
29
|
+
* const ticket = registry.register({ value: 'item-1' })
|
|
30
|
+
* console.log(registry.size) // 1
|
|
31
|
+
* registry.unregister(ticket.id)
|
|
32
|
+
* ```
|
|
23
33
|
*/
|
|
24
34
|
/**
|
|
25
35
|
* Creates a new registry instance.
|
|
@@ -80,7 +90,9 @@ function createRegistry(options) {
|
|
|
80
90
|
return;
|
|
81
91
|
}
|
|
82
92
|
if (!listeners.has(event)) listeners.set(event, /* @__PURE__ */ new Set());
|
|
83
|
-
listeners.get(event)
|
|
93
|
+
const cbs = listeners.get(event);
|
|
94
|
+
cbs.add(cb);
|
|
95
|
+
if (process.env.NODE_ENV !== "production" && cbs.size === 101) logger.warn(`Event "${event}" has ${cbs.size} listeners. Possible memory leak.`);
|
|
84
96
|
}
|
|
85
97
|
function off(event, cb) {
|
|
86
98
|
if (!events) {
|
|
@@ -394,12 +406,7 @@ function createRegistry(options) {
|
|
|
394
406
|
*/
|
|
395
407
|
function createRegistryContext(_options = {}) {
|
|
396
408
|
const { namespace = "v0:registry", ...options } = _options;
|
|
397
|
-
|
|
398
|
-
const context = createRegistry(options);
|
|
399
|
-
function provideRegistryContext(_context = context, app) {
|
|
400
|
-
return _provideRegistryContext(_context, app);
|
|
401
|
-
}
|
|
402
|
-
return createTrinity(useRegistryContext, provideRegistryContext, context);
|
|
409
|
+
return createTrinity(namespace, createRegistry(options));
|
|
403
410
|
}
|
|
404
411
|
/**
|
|
405
412
|
* Uses an existing registry from context.
|
|
@@ -442,6 +449,16 @@ function useRegistry(namespace = "v0:registry") {
|
|
|
442
449
|
* - Resolution caching for performance (~28,590 ops/sec)
|
|
443
450
|
*
|
|
444
451
|
* Used by useTheme, useLocale, and useFeatures for token-based configuration.
|
|
452
|
+
*
|
|
453
|
+
* @example
|
|
454
|
+
* ```ts
|
|
455
|
+
* import { createTokens } from '@vuetify/v0'
|
|
456
|
+
*
|
|
457
|
+
* const tokens = createTokens({
|
|
458
|
+
* colors: { primary: '#1976d2' },
|
|
459
|
+
* })
|
|
460
|
+
* console.log(tokens.resolve('{colors.primary}'))
|
|
461
|
+
* ```
|
|
445
462
|
*/
|
|
446
463
|
/**
|
|
447
464
|
* Creates a new token instance.
|
|
@@ -613,12 +630,7 @@ function createTokens(tokens = {}, options = {}) {
|
|
|
613
630
|
*/
|
|
614
631
|
function createTokensContext(_options) {
|
|
615
632
|
const { namespace = "v0:tokens", tokens = {}, ...options } = _options;
|
|
616
|
-
|
|
617
|
-
const context = createTokens(tokens, options);
|
|
618
|
-
function provideTokensContext(_context = context, app) {
|
|
619
|
-
return _provideTokensContext(_context, app);
|
|
620
|
-
}
|
|
621
|
-
return createTrinity(useTokensContext, provideTokensContext, context);
|
|
633
|
+
return createTrinity(namespace, createTokens(tokens, options));
|
|
622
634
|
}
|
|
623
635
|
/**
|
|
624
636
|
* Returns the current tokens instance.
|
|
@@ -16,6 +16,16 @@ import { inject, provide } from "vue";
|
|
|
16
16
|
* Supports two modes:
|
|
17
17
|
* - **Static key**: `createContext('my-key')` - key is fixed at creation time
|
|
18
18
|
* - **Dynamic key**: `createContext()` or `createContext({ suffix: 'item' })` - key provided at runtime
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { createContext } from '@vuetify/v0'
|
|
23
|
+
*
|
|
24
|
+
* const [useTheme, provideTheme] = createContext<{ dark: boolean }>('theme')
|
|
25
|
+
*
|
|
26
|
+
* provideTheme({ dark: true })
|
|
27
|
+
* const theme = useTheme()
|
|
28
|
+
* ```
|
|
19
29
|
*/
|
|
20
30
|
/**
|
|
21
31
|
* Injects a context provided by an ancestor component.
|
|
@@ -76,6 +86,7 @@ function provideContext(key, context, app) {
|
|
|
76
86
|
}
|
|
77
87
|
function createContext(keyOrOptions, defaultValue) {
|
|
78
88
|
if (/* @__PURE__ */ isString(keyOrOptions) || /* @__PURE__ */ isSymbol(keyOrOptions)) {
|
|
89
|
+
if (process.env.NODE_ENV !== "production" && /* @__PURE__ */ isString(keyOrOptions) && !keyOrOptions.includes(":")) console.warn(`[v0:context] String key "${keyOrOptions}" has no namespace separator. Use "namespace:key" format (e.g. "v0:theme") to prevent collisions.`);
|
|
79
90
|
const _key = keyOrOptions;
|
|
80
91
|
function _provideContext(context, app) {
|
|
81
92
|
return provideContext(_key, context, app);
|
|
@@ -97,47 +108,39 @@ function createContext(keyOrOptions, defaultValue) {
|
|
|
97
108
|
//#endregion
|
|
98
109
|
//#region src/composables/createTrinity/index.ts
|
|
99
110
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* @param useContext The function that retrieves/uses the context (typically named `useContext`).
|
|
103
|
-
* @param provideContext The function that provides the context to descendants.
|
|
104
|
-
* @param context The default context instance to use when no custom context is provided.
|
|
105
|
-
* @template Z The type of the context.
|
|
106
|
-
* @returns A readonly tuple containing: [useContext function, provideContext wrapper function, default context instance].
|
|
111
|
+
* @module createTrinity
|
|
107
112
|
*
|
|
108
|
-
* @
|
|
109
|
-
*
|
|
110
|
-
* 1. A function to retrieve/use the context
|
|
111
|
-
* 2. A function to provide the context (with default value support)
|
|
112
|
-
* 3. The default context instance
|
|
113
|
+
* @see https://0.vuetifyjs.com/composables/foundation/create-trinity
|
|
113
114
|
*
|
|
114
|
-
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* Factory for creating the trinity pattern tuple used throughout the codebase.
|
|
115
117
|
*
|
|
116
|
-
*
|
|
118
|
+
* The trinity pattern returns a readonly tuple of [useContext, provideContext, defaultContext],
|
|
119
|
+
* enabling flexible dependency injection with sensible defaults. This pattern is fundamental
|
|
120
|
+
* to all registry-based composables.
|
|
117
121
|
*
|
|
118
122
|
* @example
|
|
119
123
|
* ```ts
|
|
120
|
-
*
|
|
121
|
-
* foo: string
|
|
122
|
-
* bar: number
|
|
123
|
-
* }
|
|
124
|
+
* import { createTrinity } from '@vuetify/v0'
|
|
124
125
|
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* const context = { foo: 'hello', bar: 42 }
|
|
129
|
-
*
|
|
130
|
-
* function provideContext (_context: E = context, app?: App): E {
|
|
131
|
-
* return _provideContext(_context, app)
|
|
132
|
-
* }
|
|
133
|
-
*
|
|
134
|
-
* return createTrinity<E>(useContext, provideContext, context)
|
|
135
|
-
* }
|
|
126
|
+
* const [useMyContext, provideMyContext, defaultContext] =
|
|
127
|
+
* createTrinity('my-context', { foo: 'bar' })
|
|
136
128
|
* ```
|
|
137
129
|
*/
|
|
138
|
-
function createTrinity(
|
|
130
|
+
function createTrinity(keyOrUseContext, provideContextOrContext, maybeContext) {
|
|
131
|
+
if (/* @__PURE__ */ isString(keyOrUseContext)) {
|
|
132
|
+
const [useContext, provideContext] = createContext(keyOrUseContext);
|
|
133
|
+
const context = provideContextOrContext;
|
|
134
|
+
return [
|
|
135
|
+
useContext,
|
|
136
|
+
(_context = context, app) => provideContext(_context, app),
|
|
137
|
+
context
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
const provideContext = provideContextOrContext;
|
|
141
|
+
const context = maybeContext;
|
|
139
142
|
return [
|
|
140
|
-
|
|
143
|
+
keyOrUseContext,
|
|
141
144
|
(_context = context, app) => provideContext(_context, app),
|
|
142
145
|
context
|
|
143
146
|
];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ClientAdapter } from "../../../v0-
|
|
1
|
+
import { t as ClientAdapter } from "../../../v0-Dzw5OwNo.mjs";
|
|
2
2
|
export { ClientAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ClientAdapter } from "../../../v0-
|
|
1
|
+
import { t as ClientAdapter } from "../../../v0-BG7RhKBv.mjs";
|
|
2
2
|
export { ClientAdapter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../../adapter-
|
|
2
|
-
import { n as ServerAdapterOptions, t as ServerAdapter } from "../../server-
|
|
3
|
-
import { t as ClientAdapter } from "../../v0-
|
|
4
|
-
import { t as VirtualAdapter } from "../../virtual-
|
|
1
|
+
import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../../adapter-J7ude3gO.mjs";
|
|
2
|
+
import { n as ServerAdapterOptions, t as ServerAdapter } from "../../server-ZiHJ4tfq.mjs";
|
|
3
|
+
import { t as ClientAdapter } from "../../v0-Dzw5OwNo.mjs";
|
|
4
|
+
import { t as VirtualAdapter } from "../../virtual-BCOfxnRS.mjs";
|
|
5
5
|
export { ClientAdapter, DataTableAdapter, DataTableAdapterContext, DataTableAdapterInterface, DataTableAdapterResult, ServerAdapter, ServerAdapterOptions, SortDirection, SortEntry, VirtualAdapter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as DataTableAdapter } from "../../adapter-
|
|
2
|
-
import { t as ClientAdapter } from "../../v0-
|
|
3
|
-
import { t as ServerAdapter } from "../../server-
|
|
4
|
-
import { t as VirtualAdapter } from "../../virtual-
|
|
5
|
-
import "../../adapters-
|
|
1
|
+
import { t as DataTableAdapter } from "../../adapter-CDpOQ8sn.mjs";
|
|
2
|
+
import { t as ClientAdapter } from "../../v0-BG7RhKBv.mjs";
|
|
3
|
+
import { t as ServerAdapter } from "../../server-B6OtHgBT.mjs";
|
|
4
|
+
import { t as VirtualAdapter } from "../../virtual-To-dSw2_.mjs";
|
|
5
|
+
import "../../adapters-CFjrKxA2.mjs";
|
|
6
6
|
export { ClientAdapter, DataTableAdapter, ServerAdapter, VirtualAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ServerAdapterOptions, t as ServerAdapter } from "../../../server-
|
|
1
|
+
import { n as ServerAdapterOptions, t as ServerAdapter } from "../../../server-ZiHJ4tfq.mjs";
|
|
2
2
|
export { ServerAdapter, ServerAdapterOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ServerAdapter } from "../../../server-
|
|
1
|
+
import { t as ServerAdapter } from "../../../server-B6OtHgBT.mjs";
|
|
2
2
|
export { ServerAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as VirtualAdapter } from "../../../virtual-
|
|
1
|
+
import { t as VirtualAdapter } from "../../../virtual-BCOfxnRS.mjs";
|
|
2
2
|
export { VirtualAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as VirtualAdapter } from "../../../virtual-
|
|
1
|
+
import { t as VirtualAdapter } from "../../../virtual-To-dSw2_.mjs";
|
|
2
2
|
export { VirtualAdapter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../adapter-
|
|
2
|
-
import { n as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
export { ClientAdapter, DataTableAdapter, DataTableAdapterContext, DataTableAdapterInterface, DataTableAdapterResult, DataTableColumn, DataTableContext, DataTableContextOptions, DataTableExpansion, DataTableGroup, DataTableGrouping, DataTableOptions, DataTableSelection, DataTableSort, SelectStrategy, ServerAdapter, ServerAdapterOptions, SortDirection, SortEntry, VirtualAdapter, createDataTable, createDataTableContext, useDataTable };
|
|
1
|
+
import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../adapter-J7ude3gO.mjs";
|
|
2
|
+
import { _ as computeDepth, a as DataTableGroup, c as DataTableSelection, d as SelectStrategy, f as createDataTable, g as InternalHeader, h as ColumnNode, i as DataTableExpansion, l as DataTableSort, m as useDataTable, n as DataTableContext, o as DataTableGrouping, p as createDataTableContext, r as DataTableContextOptions, s as DataTableOptions, t as DataTableColumn, u as KeysOfType, v as extractLeaves, y as resolveHeaders } from "../index-DVPq3_Fz.mjs";
|
|
3
|
+
import { n as ServerAdapterOptions, t as ServerAdapter } from "../server-ZiHJ4tfq.mjs";
|
|
4
|
+
import { t as ClientAdapter } from "../v0-Dzw5OwNo.mjs";
|
|
5
|
+
import { t as VirtualAdapter } from "../virtual-BCOfxnRS.mjs";
|
|
6
|
+
export { ClientAdapter, ColumnNode, DataTableAdapter, DataTableAdapterContext, DataTableAdapterInterface, DataTableAdapterResult, DataTableColumn, DataTableContext, DataTableContextOptions, DataTableExpansion, DataTableGroup, DataTableGrouping, DataTableOptions, DataTableSelection, DataTableSort, InternalHeader, KeysOfType, SelectStrategy, ServerAdapter, ServerAdapterOptions, SortDirection, SortEntry, VirtualAdapter, computeDepth, createDataTable, createDataTableContext, extractLeaves, resolveHeaders, useDataTable };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as DataTableAdapter } from "../adapter-
|
|
2
|
-
import { t as ClientAdapter } from "../v0-
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
export { ClientAdapter, DataTableAdapter, ServerAdapter, VirtualAdapter, createDataTable, createDataTableContext, useDataTable };
|
|
1
|
+
import { t as DataTableAdapter } from "../adapter-CDpOQ8sn.mjs";
|
|
2
|
+
import { t as ClientAdapter } from "../v0-BG7RhKBv.mjs";
|
|
3
|
+
import { a as extractLeaves, i as computeDepth, n as createDataTableContext, o as resolveHeaders, r as useDataTable, t as createDataTable } from "../createDataTable-B4UflKnT.mjs";
|
|
4
|
+
import { t as ServerAdapter } from "../server-B6OtHgBT.mjs";
|
|
5
|
+
import { t as VirtualAdapter } from "../virtual-To-dSw2_.mjs";
|
|
6
|
+
export { ClientAdapter, DataTableAdapter, ServerAdapter, VirtualAdapter, computeDepth, createDataTable, createDataTableContext, extractLeaves, resolveHeaders, useDataTable };
|
package/dist/date/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "../globals-
|
|
1
|
+
import { t as IN_BROWSER } from "../globals-Berkg6mP.mjs";
|
|
2
2
|
import { isNull, isNullOrUndefined, isNumber, isString } from "../utilities/index.mjs";
|
|
3
3
|
import { Temporal } from "@js-temporal/polyfill";
|
|
4
4
|
//#region src/composables/useDate/adapters/v0.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PostHogFeatureAdapter } from "../../../posthog-
|
|
1
|
+
import { t as PostHogFeatureAdapter } from "../../../posthog-CPvNHMUb.mjs";
|
|
2
2
|
export { PostHogFeatureAdapter };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $n as createFeaturesContext, Jn as FeatureOptions, Kn as FeatureContext, Qn as createFeatures, Xn as FeatureTicket, Yn as FeaturePluginOptions, Zn as FeatureTicketInput, er as createFeaturesPlugin, qn as FeatureContextOptions, tr as useFeatures } from "../index-
|
|
1
|
+
import { $n as createFeaturesContext, Jn as FeatureOptions, Kn as FeatureContext, Qn as createFeatures, Xn as FeatureTicket, Yn as FeaturePluginOptions, Zn as FeatureTicketInput, er as createFeaturesPlugin, qn as FeatureContextOptions, tr as useFeatures } from "../index-DFvLSoto.mjs";
|
|
2
2
|
import { i as FeaturesAdapterValue, n as FeaturesAdapterFlags, r as FeaturesAdapterInterface, t as FeaturesAdapter } from "../index-CDcl4wPo.mjs";
|
|
3
3
|
export { FeatureContext, FeatureContextOptions, FeatureOptions, FeaturePluginOptions, FeatureTicket, FeatureTicketInput, FeaturesAdapter, FeaturesAdapterFlags, FeaturesAdapterInterface, FeaturesAdapterValue, createFeatures, createFeaturesContext, createFeaturesPlugin, useFeatures };
|
package/dist/features/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FeaturesAdapter, i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-
|
|
1
|
+
import { a as FeaturesAdapter, i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-wgMwaQ5W.mjs";
|
|
2
2
|
export { FeaturesAdapter, createFeatures, createFeaturesContext, createFeaturesPlugin, useFeatures };
|
|
@@ -5,7 +5,7 @@ const SUPPORTS_MATCH_MEDIA = IN_BROWSER && "matchMedia" in window && typeof wind
|
|
|
5
5
|
const SUPPORTS_OBSERVER = IN_BROWSER && "ResizeObserver" in window;
|
|
6
6
|
const SUPPORTS_INTERSECTION_OBSERVER = IN_BROWSER && "IntersectionObserver" in window;
|
|
7
7
|
const SUPPORTS_MUTATION_OBSERVER = IN_BROWSER && "MutationObserver" in window;
|
|
8
|
-
const version = "0.
|
|
8
|
+
const version = "1.0.0-alpha.1";
|
|
9
9
|
/* v8 ignore next -- build-time constant, __DEV__ short-circuits in tests */
|
|
10
10
|
const __LOGGER_ENABLED__ = typeof (process.env.NODE_ENV !== "production") !== "undefined" && process.env.NODE_ENV !== "production" || typeof process.env.VITE_LOGGER_ENABLED !== "undefined" && process.env.VITE_LOGGER_ENABLED === "true";
|
|
11
11
|
//#endregion
|
|
@@ -23,24 +23,21 @@ type ContextTrinity<Z = unknown> = readonly [() => Z, (context?: Z, app?: App) =
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* bar:
|
|
26
|
+
* // Simplified — key + context
|
|
27
|
+
* export function createMyFeature() {
|
|
28
|
+
* const context = { foo: 'hello', bar: 42 }
|
|
29
|
+
* return createTrinity('my-context', context)
|
|
29
30
|
* }
|
|
30
31
|
*
|
|
32
|
+
* // Explicit — useContext + provideContext + context
|
|
31
33
|
* export function createMyFeature<E extends MyContext = MyContext>() {
|
|
32
|
-
* const [useContext,
|
|
33
|
-
*
|
|
34
|
+
* const [useContext, provideContext] = createContext<E>('my-context')
|
|
34
35
|
* const context = { foo: 'hello', bar: 42 }
|
|
35
|
-
*
|
|
36
|
-
* function provideContext (_context: E = context, app?: App): E {
|
|
37
|
-
* return _provideContext(_context, app)
|
|
38
|
-
* }
|
|
39
|
-
*
|
|
40
36
|
* return createTrinity<E>(useContext, provideContext, context)
|
|
41
37
|
* }
|
|
42
38
|
* ```
|
|
43
39
|
*/
|
|
44
|
-
declare function createTrinity<Z = unknown>(
|
|
40
|
+
declare function createTrinity<Z = unknown>(key: string, context: Z): ContextTrinity<Z>;
|
|
41
|
+
declare function createTrinity<Z = unknown>(useContext: () => Z, provideContext: (context: Z, app?: App) => Z, context: Z): ContextTrinity<Z>;
|
|
45
42
|
//#endregion
|
|
46
43
|
export { createTrinity as n, ContextTrinity as t };
|