@vuetify/v0 1.0.0-rc.6 → 1.0.0-rc.8
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 +2 -15
- package/dist/{adapter-BI-oyZCe.d.mts → adapter-CVNRHfrz.d.mts} +1 -1
- package/dist/{adapter-CJY6aQIS.mjs → adapter-lS_VpRow.mjs} +1 -1
- package/dist/browser/index.d.ts +47 -45
- package/dist/browser/index.js +207 -131
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{components-aNG-L8hk.mjs → components-Cl9fclA1.mjs} +17 -20
- package/dist/composables/index.d.mts +6 -6
- package/dist/composables/index.mjs +22 -22
- package/dist/{composables-BQaa5hFV.mjs → composables-CU2JD9oM.mjs} +15 -13
- package/dist/constants/index.mjs +1 -1
- package/dist/{createDataTable-CG6BWB_u.mjs → createDataTable-BaYtcmAO.mjs} +3 -3
- package/dist/{createGroup-BlILHkT6.mjs → createGroup-5UjYS6_G.mjs} +1 -1
- package/dist/{createRegistry-DR7aTCxG.mjs → createRegistry-C_M475FE.mjs} +40 -29
- package/dist/{createSelection-sPv1j6DV.mjs → createSelection-BokWvmnd.mjs} +30 -14
- package/dist/{createSingle-BWN73zob.mjs → createSingle-DTqmo-GH.mjs} +1 -1
- package/dist/{createTokens-DqtwpqYn.mjs → createTokens-q-A6Ywox.mjs} +7 -7
- package/dist/data-table/index.d.mts +1 -1
- package/dist/data-table/index.mjs +1 -1
- package/dist/date/index.mjs +1 -1
- package/dist/features/adapters/flagsmith/index.mjs +2 -1
- package/dist/features/adapters/launchdarkly/index.mjs +8 -5
- package/dist/features/adapters/posthog/index.mjs +3 -2
- package/dist/features/index.d.mts +1 -1
- package/dist/features/index.mjs +1 -1
- package/dist/{globals-DhDj6Ko1.mjs → globals-C0tKiM_M.mjs} +1 -1
- package/dist/{index-CV7bOS7B.d.mts → index-BwNRi6BK.d.mts} +19 -17
- package/dist/{index-CfHm03dg.d.mts → index-CrFFilCd.d.mts} +2 -2
- package/dist/{index-DgPFPx_7.d.mts → index-DCtHbY0a.d.mts} +1 -1
- package/dist/{index-DF1gnhPy.d.mts → index-DOjheBVl.d.mts} +6 -9
- package/dist/{index-pM8UX1XI.d.mts → index-RGiSdjYt.d.mts} +10 -9
- package/dist/{index-BBJnOUyA.d.mts → index-u0Sy6Dif.d.mts} +2 -0
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +24 -24
- package/dist/json/web-types.json +1 -1
- package/dist/locale/adapters/index.d.mts +2 -2
- package/dist/locale/adapters/index.mjs +1 -1
- package/dist/locale/adapters/v0/index.d.mts +1 -1
- package/dist/locale/adapters/v0/index.mjs +1 -1
- package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
- package/dist/locale/index.d.mts +3 -3
- package/dist/locale/index.mjs +2 -2
- package/dist/locale/messages/en/index.d.mts +3 -0
- package/dist/locale/messages/en/index.mjs +1 -0
- package/dist/logger/adapters/index.mjs +1 -1
- package/dist/logger/adapters/v0/index.mjs +1 -1
- package/dist/logger/index.d.mts +1 -1
- package/dist/logger/index.mjs +2 -2
- package/dist/notifications/index.d.mts +1 -1
- package/dist/notifications/index.mjs +2 -2
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +2 -2
- package/dist/palettes/material/index.d.mts +1 -1
- package/dist/palettes/md1/index.d.mts +1 -1
- package/dist/palettes/md2/index.d.mts +1 -1
- package/dist/palettes/radix/index.d.mts +1 -1
- package/dist/palettes/tailwind/index.d.mts +1 -1
- package/dist/permissions/adapters/index.d.mts +1 -1
- package/dist/permissions/adapters/v0/index.d.mts +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/permissions/index.mjs +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/storage/index.d.mts +1 -1
- package/dist/storage/index.mjs +1 -1
- package/dist/theme/adapters/index.d.mts +1 -1
- package/dist/theme/adapters/index.mjs +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 +4 -4
- package/dist/{unhead-Cw_jAvJL.mjs → unhead-BXJ8cqN-.mjs} +2 -2
- package/dist/{useEventListener--vhbyU45.mjs → useEventListener-UJ8VS4eS.mjs} +1 -1
- package/dist/{useFeatures-DjGN0KJd.mjs → useFeatures-Cn-HGB7v.mjs} +4 -4
- package/dist/{useLocale-C7I4BsIS.mjs → useLocale-BFKJosku.mjs} +8 -5
- package/dist/{useLogger-DCvIu_Mj.mjs → useLogger-DGG3fsnB.mjs} +2 -2
- package/dist/{useNotifications-Ckm0MqnJ.mjs → useNotifications-DO10ylRQ.mjs} +3 -3
- package/dist/{usePermissions-ygx2OSjo.mjs → usePermissions-BC-ppxf2.mjs} +2 -2
- package/dist/{useRovingFocus-dH3LTiJ8.mjs → useRovingFocus-BWww4Lm1.mjs} +109 -76
- package/dist/{useRules-DlnpIwp8.mjs → useRules-CMDEY2-D.mjs} +2 -2
- package/dist/{useStorage-D_enJrep.mjs → useStorage-BkutRChm.mjs} +3 -3
- package/dist/{useTheme-DdmexROE.mjs → useTheme-CJ5fgT5y.mjs} +6 -6
- package/dist/utilities/index.d.mts +1 -1
- package/dist/utilities/index.mjs +19 -4
- package/dist/{v0-Cf5DZ4lw.d.mts → v0-C0OfckSF.d.mts} +1 -1
- package/dist/{v0-BbCNqIZ1.mjs → v0-DUvaNE4R.mjs} +1 -1
- package/dist/{v0-DFRA_hwF.mjs → v0-M7azful7.mjs} +1 -1
- package/dist/{v0-QF9ZrOlB.mjs → v0-sTRNcP5u.mjs} +2 -2
- package/package.json +7 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { clamp, isUndefined, useId as useId$1 } from "./utilities/index.mjs";
|
|
1
|
+
import { clamp, isNullOrUndefined, isUndefined, useId as useId$1 } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { i as useLogger } from "./useLogger-
|
|
4
|
-
import { shallowReactive } from "vue";
|
|
3
|
+
import { i as useLogger } from "./useLogger-DGG3fsnB.mjs";
|
|
4
|
+
import { shallowReactive, shallowRef } from "vue";
|
|
5
5
|
//#region src/composables/createRegistry/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* @module createRegistry
|
|
@@ -63,12 +63,15 @@ function createRegistry(options) {
|
|
|
63
63
|
const directory = /* @__PURE__ */ new Map();
|
|
64
64
|
const cache = /* @__PURE__ */ new Map();
|
|
65
65
|
const listeners = /* @__PURE__ */ new Map();
|
|
66
|
-
const
|
|
66
|
+
const minted = /* @__PURE__ */ new WeakSet();
|
|
67
|
+
const order = [];
|
|
68
|
+
const version = shallowRef(0);
|
|
67
69
|
let indexDependentCount = 0;
|
|
68
70
|
let needsReindex = false;
|
|
69
71
|
let minDirtyIndex = Infinity;
|
|
70
72
|
let maxDirtyIndex = -Infinity;
|
|
71
73
|
let isBatching = false;
|
|
74
|
+
let structural = false;
|
|
72
75
|
let batched = [];
|
|
73
76
|
function dispatch(event, data) {
|
|
74
77
|
const cbs = listeners.get(event);
|
|
@@ -142,7 +145,7 @@ function createRegistry(options) {
|
|
|
142
145
|
valueIsIndex
|
|
143
146
|
});
|
|
144
147
|
collection.set(id, existing);
|
|
145
|
-
|
|
148
|
+
cache.clear();
|
|
146
149
|
emit("update:ticket", existing);
|
|
147
150
|
if (event) emit(event, existing);
|
|
148
151
|
return existing;
|
|
@@ -173,7 +176,7 @@ function createRegistry(options) {
|
|
|
173
176
|
else catalog.set(value, next);
|
|
174
177
|
}
|
|
175
178
|
function keys() {
|
|
176
|
-
if (reactive)
|
|
179
|
+
if (reactive) version.value;
|
|
177
180
|
const cached = cache.get("keys");
|
|
178
181
|
if (!/* @__PURE__ */ isUndefined(cached)) return cached;
|
|
179
182
|
const out = order.map((ticket) => ticket.id);
|
|
@@ -181,7 +184,7 @@ function createRegistry(options) {
|
|
|
181
184
|
return out;
|
|
182
185
|
}
|
|
183
186
|
function values() {
|
|
184
|
-
if (reactive)
|
|
187
|
+
if (reactive) version.value;
|
|
185
188
|
const cached = cache.get("values");
|
|
186
189
|
if (!/* @__PURE__ */ isUndefined(cached)) return cached;
|
|
187
190
|
const out = order.slice();
|
|
@@ -189,7 +192,7 @@ function createRegistry(options) {
|
|
|
189
192
|
return out;
|
|
190
193
|
}
|
|
191
194
|
function entries() {
|
|
192
|
-
if (reactive)
|
|
195
|
+
if (reactive) version.value;
|
|
193
196
|
const cached = cache.get("entries");
|
|
194
197
|
if (!/* @__PURE__ */ isUndefined(cached)) return cached;
|
|
195
198
|
const out = order.map((ticket) => [ticket.id, ticket]);
|
|
@@ -209,22 +212,30 @@ function createRegistry(options) {
|
|
|
209
212
|
emit("clear:registry");
|
|
210
213
|
}
|
|
211
214
|
function invalidate() {
|
|
212
|
-
if (isBatching) return;
|
|
213
215
|
cache.clear();
|
|
216
|
+
if (isBatching) {
|
|
217
|
+
structural = true;
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
version.value++;
|
|
214
221
|
}
|
|
215
222
|
function batch(fn) {
|
|
216
223
|
if (isBatching) return fn();
|
|
217
224
|
isBatching = true;
|
|
225
|
+
structural = false;
|
|
218
226
|
batched = [];
|
|
219
227
|
try {
|
|
220
|
-
|
|
221
|
-
cache.clear();
|
|
222
|
-
for (const { event, data } of batched) dispatch(event, data);
|
|
223
|
-
return result;
|
|
228
|
+
return fn();
|
|
224
229
|
} finally {
|
|
225
230
|
isBatching = false;
|
|
231
|
+
const queue = batched;
|
|
226
232
|
batched = [];
|
|
227
233
|
cache.clear();
|
|
234
|
+
try {
|
|
235
|
+
for (const { event, data } of queue) dispatch(event, data);
|
|
236
|
+
} finally {
|
|
237
|
+
if (structural) version.value++;
|
|
238
|
+
}
|
|
228
239
|
}
|
|
229
240
|
}
|
|
230
241
|
function reindex() {
|
|
@@ -258,6 +269,7 @@ function createRegistry(options) {
|
|
|
258
269
|
function register(registration = {}) {
|
|
259
270
|
if (needsReindex) reindex();
|
|
260
271
|
const size = collection.size;
|
|
272
|
+
const auto = /* @__PURE__ */ isNullOrUndefined(registration.id);
|
|
261
273
|
const id = registration.id ?? /* @__PURE__ */ useId$1();
|
|
262
274
|
if (has(id)) {
|
|
263
275
|
logger.warn(`Ticket "${id}" already exists. Use \`upsert()\` to update or check \`has()\` before registering.`);
|
|
@@ -277,6 +289,7 @@ function createRegistry(options) {
|
|
|
277
289
|
unregister: () => unregister(id)
|
|
278
290
|
};
|
|
279
291
|
const ticket = reactive ? shallowReactive(input) : input;
|
|
292
|
+
if (auto) minted.add(ticket);
|
|
280
293
|
collection.set(ticket.id, ticket);
|
|
281
294
|
order.push(ticket);
|
|
282
295
|
directory.set(ticket.index, ticket.id);
|
|
@@ -289,7 +302,8 @@ function createRegistry(options) {
|
|
|
289
302
|
const ticket = collection.get(id);
|
|
290
303
|
if (!ticket) return;
|
|
291
304
|
if (ticket.valueIsIndex) indexDependentCount--;
|
|
292
|
-
|
|
305
|
+
let orderPos = ticket.index;
|
|
306
|
+
if (order[orderPos] !== ticket) orderPos = order.indexOf(ticket);
|
|
293
307
|
if (orderPos !== -1) order.splice(orderPos, 1);
|
|
294
308
|
collection.delete(ticket.id);
|
|
295
309
|
directory.delete(ticket.index);
|
|
@@ -309,10 +323,8 @@ function createRegistry(options) {
|
|
|
309
323
|
delete input.index;
|
|
310
324
|
delete input.valueIsIndex;
|
|
311
325
|
delete input.unregister;
|
|
312
|
-
if (ticket
|
|
313
|
-
|
|
314
|
-
delete input.value;
|
|
315
|
-
}
|
|
326
|
+
if (minted.has(ticket)) delete input.id;
|
|
327
|
+
if (ticket.valueIsIndex) delete input.value;
|
|
316
328
|
return input;
|
|
317
329
|
}
|
|
318
330
|
function offboard(ids) {
|
|
@@ -331,6 +343,7 @@ function createRegistry(options) {
|
|
|
331
343
|
let w = 0;
|
|
332
344
|
for (const ticket of order) if (!removedIds.has(ticket.id)) order[w++] = ticket;
|
|
333
345
|
order.length = w;
|
|
346
|
+
invalidate();
|
|
334
347
|
for (const ticket of removed) {
|
|
335
348
|
if (ticket.valueIsIndex) indexDependentCount--;
|
|
336
349
|
minDirtyIndex = Math.min(minDirtyIndex, ticket.index);
|
|
@@ -339,7 +352,8 @@ function createRegistry(options) {
|
|
|
339
352
|
unassign(ticket.value, ticket.id);
|
|
340
353
|
}
|
|
341
354
|
for (const ticket of removed) emit("unregister:ticket", ticket);
|
|
342
|
-
|
|
355
|
+
if (indexDependentCount > 0 && minDirtyIndex < collection.size) reindex();
|
|
356
|
+
else needsReindex = true;
|
|
343
357
|
});
|
|
344
358
|
return removed.map((ticket) => toInput(ticket));
|
|
345
359
|
}
|
|
@@ -383,22 +397,19 @@ function createRegistry(options) {
|
|
|
383
397
|
function seek(direction = "first", from, predicate) {
|
|
384
398
|
if (collection.size === 0) return void 0;
|
|
385
399
|
if (needsReindex) reindex();
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
390
|
-
const tickets = values();
|
|
391
|
-
const index = /* @__PURE__ */ isUndefined(from) ? void 0 : /* @__PURE__ */ clamp(from, 0, tickets.length - 1);
|
|
400
|
+
const n = order.length;
|
|
401
|
+
if (!predicate && /* @__PURE__ */ isUndefined(from)) return direction === "first" ? order[0] : order.at(-1);
|
|
402
|
+
const index = /* @__PURE__ */ isUndefined(from) ? void 0 : /* @__PURE__ */ clamp(from, 0, n - 1);
|
|
392
403
|
if (direction === "last") {
|
|
393
|
-
const start = /* @__PURE__ */ isUndefined(index) ?
|
|
404
|
+
const start = /* @__PURE__ */ isUndefined(index) ? n - 1 : index;
|
|
394
405
|
for (let i = start; i >= 0; i--) {
|
|
395
|
-
const ticket =
|
|
406
|
+
const ticket = order[i];
|
|
396
407
|
if (!predicate || predicate(ticket)) return ticket;
|
|
397
408
|
}
|
|
398
409
|
} else {
|
|
399
410
|
const start = /* @__PURE__ */ isUndefined(index) ? 0 : index;
|
|
400
|
-
for (let i = start; i <
|
|
401
|
-
const ticket =
|
|
411
|
+
for (let i = start; i < n; i++) {
|
|
412
|
+
const ticket = order[i];
|
|
402
413
|
if (!predicate || predicate(ticket)) return ticket;
|
|
403
414
|
}
|
|
404
415
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isUndefined, resolveIds, useId as useId$1 } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { t as createRegistry } from "./createRegistry-
|
|
3
|
+
import { t as createRegistry } from "./createRegistry-C_M475FE.mjs";
|
|
4
4
|
import { computed, isRef, shallowReactive, toRaw, toRef, toValue } from "vue";
|
|
5
5
|
//#region src/composables/createModel/index.ts
|
|
6
6
|
/**
|
|
@@ -82,7 +82,9 @@ function createModel(_options = {}) {
|
|
|
82
82
|
const selectedIds = shallowReactive(/* @__PURE__ */ new Set());
|
|
83
83
|
const selectedItems = computed(() => new Set(/* @__PURE__ */ resolveIds(selectedIds, registry.get)));
|
|
84
84
|
const selectedValues = computed(() => {
|
|
85
|
-
|
|
85
|
+
const out = /* @__PURE__ */ new Set();
|
|
86
|
+
for (const item of selectedItems.value) out.add(toValue(item.value));
|
|
87
|
+
return out;
|
|
86
88
|
});
|
|
87
89
|
function select(id) {
|
|
88
90
|
if (toValue(disabled)) return;
|
|
@@ -93,6 +95,8 @@ function createModel(_options = {}) {
|
|
|
93
95
|
}
|
|
94
96
|
function unselect(id) {
|
|
95
97
|
if (toValue(disabled)) return;
|
|
98
|
+
const item = registry.get(id);
|
|
99
|
+
if (!item || toValue(item.disabled)) return;
|
|
96
100
|
selectedIds.delete(id);
|
|
97
101
|
}
|
|
98
102
|
function toggle(id) {
|
|
@@ -289,11 +293,17 @@ function createSelection(_options = {}) {
|
|
|
289
293
|
const ticket = seek("first");
|
|
290
294
|
if (ticket) model.select(ticket.id);
|
|
291
295
|
}
|
|
292
|
-
function
|
|
296
|
+
function drain(id) {
|
|
293
297
|
if (toValue(model.disabled)) return;
|
|
294
298
|
if (toValue(mandatory) && model.selectedIds.size === 1) return;
|
|
295
299
|
model.selectedIds.delete(id);
|
|
296
300
|
}
|
|
301
|
+
function unselect(id) {
|
|
302
|
+
if (toValue(model.disabled)) return;
|
|
303
|
+
const item = model.get(id);
|
|
304
|
+
if (!item || toValue(item.disabled)) return;
|
|
305
|
+
drain(id);
|
|
306
|
+
}
|
|
297
307
|
function toggle(id) {
|
|
298
308
|
if (toValue(model.disabled)) return;
|
|
299
309
|
if (model.selectedIds.has(id)) unselect(id);
|
|
@@ -303,22 +313,28 @@ function createSelection(_options = {}) {
|
|
|
303
313
|
const isMultiple = options?.multiple ?? toValue(multiple);
|
|
304
314
|
const currentIds = new Set(model.selectedIds);
|
|
305
315
|
const targetIds = /* @__PURE__ */ new Set();
|
|
306
|
-
for (const value of values) {
|
|
307
|
-
const ids = model.browse(toRaw(value));
|
|
308
|
-
if (ids) for (const id of ids) targetIds.add(id);
|
|
309
|
-
}
|
|
310
316
|
if (isMultiple) {
|
|
311
|
-
for (const
|
|
312
|
-
|
|
313
|
-
if (
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
|
|
317
|
+
for (const value of values) {
|
|
318
|
+
const ids = model.browse(toRaw(value));
|
|
319
|
+
if (/* @__PURE__ */ isUndefined(ids)) continue;
|
|
320
|
+
for (const id of ids) {
|
|
321
|
+
const ticket = model.get(id);
|
|
322
|
+
if (!ticket || toValue(ticket.disabled)) continue;
|
|
323
|
+
targetIds.add(id);
|
|
324
|
+
}
|
|
317
325
|
}
|
|
326
|
+
if (toValue(mandatory) && targetIds.size === 0) return;
|
|
327
|
+
for (const id of currentIds) if (!targetIds.has(id)) model.selectedIds.delete(id);
|
|
328
|
+
for (const id of targetIds) model.selectedIds.add(id);
|
|
318
329
|
} else {
|
|
330
|
+
for (const value of values) {
|
|
331
|
+
const ids = model.browse(toRaw(value));
|
|
332
|
+
if (/* @__PURE__ */ isUndefined(ids)) continue;
|
|
333
|
+
for (const id of ids) targetIds.add(id);
|
|
334
|
+
}
|
|
319
335
|
const next = targetIds.values().next().value;
|
|
320
336
|
const last = currentIds.values().next().value;
|
|
321
|
-
if (!/* @__PURE__ */ isUndefined(last))
|
|
337
|
+
if (!/* @__PURE__ */ isUndefined(last)) drain(last);
|
|
322
338
|
if (!/* @__PURE__ */ isUndefined(next)) model.select(next);
|
|
323
339
|
}
|
|
324
340
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
2
|
-
import { t as createSelection } from "./createSelection-
|
|
2
|
+
import { t as createSelection } from "./createSelection-BokWvmnd.mjs";
|
|
3
3
|
import { toRef } from "vue";
|
|
4
4
|
//#region src/composables/createSingle/index.ts
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UNSAFE_KEYS, isObject, isString, isUndefined } from "./utilities/index.mjs";
|
|
2
2
|
import { i as useContext, t as createTrinity } from "./createTrinity-z-3q9QWR.mjs";
|
|
3
|
-
import { i as useLogger } from "./useLogger-
|
|
4
|
-
import { t as createRegistry } from "./createRegistry-
|
|
3
|
+
import { i as useLogger } from "./useLogger-DGG3fsnB.mjs";
|
|
4
|
+
import { t as createRegistry } from "./createRegistry-C_M475FE.mjs";
|
|
5
5
|
//#region src/composables/createTokens/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* @module createTokens
|
|
@@ -15,10 +15,10 @@ import { t as createRegistry } from "./createRegistry-DR7aTCxG.mjs";
|
|
|
15
15
|
* - Alias resolution with circular reference detection
|
|
16
16
|
* - Nested token flattening with dot notation
|
|
17
17
|
* - W3C Design Tokens format ($value, $type, $description, $extensions)
|
|
18
|
-
* - Path-based resolution (e.g., {colors}.blue.500)
|
|
19
|
-
* - Resolution caching for performance
|
|
18
|
+
* - Path-based resolution (e.g., {colors.blue.500} or colors.blue.500)
|
|
19
|
+
* - Resolution caching for performance
|
|
20
20
|
*
|
|
21
|
-
* Used by useTheme, useLocale, and
|
|
21
|
+
* Used by useTheme, useLocale, useFeatures, and usePermissions for token-based configuration.
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* ```ts
|
|
@@ -132,9 +132,9 @@ function createTokens(tokens = {}, options = {}) {
|
|
|
132
132
|
cache.clear();
|
|
133
133
|
return _register(registration);
|
|
134
134
|
}
|
|
135
|
-
function upsert(id, registration) {
|
|
135
|
+
function upsert(id, registration, event) {
|
|
136
136
|
cache.clear();
|
|
137
|
-
return _upsert(id, registration);
|
|
137
|
+
return _upsert(id, registration, event);
|
|
138
138
|
}
|
|
139
139
|
function unregister(id) {
|
|
140
140
|
cache.clear();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as SortEntry, i as SortDirection, n as DataTableAdapterContext, r as DataTableAdapterResult, t as DataTableAdapter } from "../adapter-_srNCBEi.mjs";
|
|
2
|
-
import { _ as ColumnNode, a as DataTableExpansion, b as extractLeaves, c as DataTableOptions, d as DataTableTicket, f as DataTableTicketInput, g as useDataTable, h as createDataTableContext, i as DataTableContextOptions, l as DataTableSelection, m as createDataTable, n as DataTableColumnTicketInput, o as DataTableGroup, p as SelectStrategy, r as DataTableContext, s as DataTableGrouping, t as DataTableColumnTicket, u as DataTableSort, v as InternalHeader, x as resolveHeaders, y as computeDepth } from "../index-
|
|
2
|
+
import { _ as ColumnNode, a as DataTableExpansion, b as extractLeaves, c as DataTableOptions, d as DataTableTicket, f as DataTableTicketInput, g as useDataTable, h as createDataTableContext, i as DataTableContextOptions, l as DataTableSelection, m as createDataTable, n as DataTableColumnTicketInput, o as DataTableGroup, p as SelectStrategy, r as DataTableContext, s as DataTableGrouping, t as DataTableColumnTicket, u as DataTableSort, v as InternalHeader, x as resolveHeaders, y as computeDepth } from "../index-DCtHbY0a.mjs";
|
|
3
3
|
import { n as ServerDataTableAdapterOptions, t as ServerDataTableAdapter } from "../server-DbtTGb67.mjs";
|
|
4
4
|
import { t as ClientDataTableAdapter } from "../v0-DotXXGXU.mjs";
|
|
5
5
|
import { t as VirtualDataTableAdapter } from "../virtual-C-NsLue0.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DataTableAdapter } from "../adapter-CVoWg0sw.mjs";
|
|
2
2
|
import { t as ClientDataTableAdapter } from "../v0-A4GLojAr.mjs";
|
|
3
|
-
import { a as extractLeaves, i as computeDepth, n as createDataTableContext, o as resolveHeaders, r as useDataTable, t as createDataTable } from "../createDataTable-
|
|
3
|
+
import { a as extractLeaves, i as computeDepth, n as createDataTableContext, o as resolveHeaders, r as useDataTable, t as createDataTable } from "../createDataTable-BaYtcmAO.mjs";
|
|
4
4
|
import { t as ServerDataTableAdapter } from "../server-D5BJBjB0.mjs";
|
|
5
5
|
import { t as VirtualDataTableAdapter } from "../virtual-DFvOoeG6.mjs";
|
|
6
6
|
export { ClientDataTableAdapter, DataTableAdapter, ServerDataTableAdapter, VirtualDataTableAdapter, 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-C0tKiM_M.mjs";
|
|
2
2
|
import { isFunction, isNull, isNullOrUndefined, isNumber, isString } from "../utilities/index.mjs";
|
|
3
3
|
import { t as DateAdapter } from "../adapter-Cy7wXVFe.mjs";
|
|
4
4
|
import { Temporal } from "@js-temporal/polyfill";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isNullOrUndefined } from "../../../utilities/index.mjs";
|
|
1
|
+
import { UNSAFE_KEYS, isNullOrUndefined } from "../../../utilities/index.mjs";
|
|
2
2
|
import { t as FeaturesAdapter } from "../../../adapter-CTsckKAR.mjs";
|
|
3
3
|
//#region src/composables/useFeatures/adapters/flagsmith.ts
|
|
4
4
|
/**
|
|
@@ -20,6 +20,7 @@ var FlagsmithFeaturesAdapter = class extends FeaturesAdapter {
|
|
|
20
20
|
const flags = this.client.getAllFlags();
|
|
21
21
|
const adapterFlags = {};
|
|
22
22
|
if (flags) for (const [key, flag] of Object.entries(flags)) {
|
|
23
|
+
if (UNSAFE_KEYS.has(key)) continue;
|
|
23
24
|
const isEnabled = flag.enabled;
|
|
24
25
|
const variation = flag.value;
|
|
25
26
|
adapterFlags[key] = /* @__PURE__ */ isNullOrUndefined(variation) ? isEnabled : {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isBoolean } from "../../../utilities/index.mjs";
|
|
1
|
+
import { UNSAFE_KEYS, isBoolean } from "../../../utilities/index.mjs";
|
|
2
2
|
import { t as FeaturesAdapter } from "../../../adapter-CTsckKAR.mjs";
|
|
3
3
|
//#region src/composables/useFeatures/adapters/launchdarkly.ts
|
|
4
4
|
/**
|
|
@@ -16,10 +16,13 @@ var LaunchDarklyFeaturesAdapter = class extends FeaturesAdapter {
|
|
|
16
16
|
const collect = () => {
|
|
17
17
|
const allFlags = this.client.allFlags();
|
|
18
18
|
const flags = {};
|
|
19
|
-
for (const [key, value] of Object.entries(allFlags))
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
for (const [key, value] of Object.entries(allFlags)) {
|
|
20
|
+
if (UNSAFE_KEYS.has(key)) continue;
|
|
21
|
+
flags[key] = /* @__PURE__ */ isBoolean(value) ? value : {
|
|
22
|
+
$value: true,
|
|
23
|
+
$variation: value
|
|
24
|
+
};
|
|
25
|
+
}
|
|
23
26
|
return flags;
|
|
24
27
|
};
|
|
25
28
|
function onChange() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "../../../globals-
|
|
2
|
-
import { isBoolean, isNullOrUndefined } from "../../../utilities/index.mjs";
|
|
1
|
+
import { t as IN_BROWSER } from "../../../globals-C0tKiM_M.mjs";
|
|
2
|
+
import { UNSAFE_KEYS, isBoolean, isNullOrUndefined } from "../../../utilities/index.mjs";
|
|
3
3
|
import { t as FeaturesAdapter } from "../../../adapter-CTsckKAR.mjs";
|
|
4
4
|
//#region src/composables/useFeatures/adapters/posthog.ts
|
|
5
5
|
/**
|
|
@@ -20,6 +20,7 @@ var PostHogFeaturesAdapter = class extends FeaturesAdapter {
|
|
|
20
20
|
const activeFlags = this.client.featureFlags.getFlags();
|
|
21
21
|
if (!activeFlags) return flags;
|
|
22
22
|
for (const key of activeFlags) {
|
|
23
|
+
if (UNSAFE_KEYS.has(key)) continue;
|
|
23
24
|
const isEnabled = this.client.isFeatureEnabled(key) ?? false;
|
|
24
25
|
const payload = this.client.getFeatureFlagPayload(key);
|
|
25
26
|
if (/* @__PURE__ */ isNullOrUndefined(payload)) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _r as createFeatures, br as useFeatures, dr as FeatureContext, fr as FeatureContextOptions, gr as FeatureTicketInput, hr as FeatureTicket, mr as FeaturePluginOptions, pr as FeatureOptions, vr as createFeaturesContext, yr as createFeaturesPlugin } from "../index-
|
|
1
|
+
import { _r as createFeatures, br as useFeatures, dr as FeatureContext, fr as FeatureContextOptions, gr as FeatureTicketInput, hr as FeatureTicket, mr as FeaturePluginOptions, pr as FeatureOptions, vr as createFeaturesContext, yr as createFeaturesPlugin } from "../index-BwNRi6BK.mjs";
|
|
2
2
|
import { n as FeaturesAdapterFlags, r as FeaturesAdapterValue, t as FeaturesAdapter } from "../adapter-Butx_2UU.mjs";
|
|
3
3
|
export { FeatureContext, FeatureContextOptions, FeatureOptions, FeaturePluginOptions, FeatureTicket, FeatureTicketInput, FeaturesAdapter, FeaturesAdapterFlags, FeaturesAdapterValue, createFeatures, createFeaturesContext, createFeaturesPlugin, useFeatures };
|
package/dist/features/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as FeaturesAdapter } from "../adapter-CTsckKAR.mjs";
|
|
2
|
-
import { i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-
|
|
2
|
+
import { i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-Cn-HGB7v.mjs";
|
|
3
3
|
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 = "1.0.0-rc.
|
|
8
|
+
const version = "1.0.0-rc.8";
|
|
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
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as ID, i as Extensible, o as MaybeArray } from "./index-CyNk9FpR.mjs";
|
|
2
2
|
import { t as ContextTrinity } from "./index-DXMlYoiQ.mjs";
|
|
3
|
-
import { a as RegistryEventName, c as RegistryTicketInput, o as RegistryOptions, r as RegistryEventCallback, s as RegistryTicket, t as RegistryContext } from "./index-
|
|
3
|
+
import { a as RegistryEventName, c as RegistryTicketInput, o as RegistryOptions, r as RegistryEventCallback, s as RegistryTicket, t as RegistryContext } from "./index-RGiSdjYt.mjs";
|
|
4
4
|
import { _ as FilterMode } from "./adapter-_srNCBEi.mjs";
|
|
5
|
-
import { _ as ColumnNode, c as DataTableOptions, n as DataTableColumnTicketInput, r as DataTableContext, t as DataTableColumnTicket } from "./index-
|
|
6
|
-
import { c as TokenTicket, i as TokenContext, o as TokenOptions, r as TokenCollection } from "./index-
|
|
5
|
+
import { _ as ColumnNode, c as DataTableOptions, n as DataTableColumnTicketInput, r as DataTableContext, t as DataTableColumnTicket } from "./index-DCtHbY0a.mjs";
|
|
6
|
+
import { c as TokenTicket, i as TokenContext, o as TokenOptions, r as TokenCollection } from "./index-CrFFilCd.mjs";
|
|
7
7
|
import { t as DateAdapter } from "./adapter-C5F2huij.mjs";
|
|
8
8
|
import { n as FeaturesAdapterFlags, t as FeaturesAdapter } from "./adapter-Butx_2UU.mjs";
|
|
9
|
-
import { t as LocaleAdapter } from "./adapter-
|
|
9
|
+
import { t as LocaleAdapter } from "./adapter-CVNRHfrz.mjs";
|
|
10
10
|
import { t as LoggerAdapter } from "./adapter-BYzU4Ey5.mjs";
|
|
11
11
|
import { n as StorageAdapter } from "./memory-DbyZeNjg.mjs";
|
|
12
12
|
import { App, ComponentPublicInstance, ComputedRef, InjectionKey, MaybeRef, MaybeRefOrGetter, Reactive, Ref, ShallowReactive, ShallowRef, UnwrapNestedRefs, WatchSource, WritableComputedRef } from "vue";
|
|
@@ -137,7 +137,9 @@ interface ModelContext<Z extends ModelTicketInput = ModelTicketInput, E extends
|
|
|
137
137
|
* Unselect a ticket by ID
|
|
138
138
|
*
|
|
139
139
|
* @param id The ID of the ticket to unselect.
|
|
140
|
-
* @remarks Removes the ID from `selectedIds`.
|
|
140
|
+
* @remarks Removes the ID from `selectedIds`.
|
|
141
|
+
* No-op if the model instance is disabled, the ticket doesn't exist, or the ticket is disabled.
|
|
142
|
+
* Wholesale operations (`apply`, `reset`, `clear`) bypass this guard so disabled ids can always drain.
|
|
141
143
|
*
|
|
142
144
|
* @example
|
|
143
145
|
* ```ts
|
|
@@ -152,7 +154,7 @@ interface ModelContext<Z extends ModelTicketInput = ModelTicketInput, E extends
|
|
|
152
154
|
*
|
|
153
155
|
* @param id The ID of the ticket to toggle.
|
|
154
156
|
* @remarks Calls `select(id)` if not selected, `unselect(id)` if already selected.
|
|
155
|
-
* No-op if the model instance is disabled.
|
|
157
|
+
* No-op if the model instance is disabled or the ticket is disabled.
|
|
156
158
|
*
|
|
157
159
|
* @example
|
|
158
160
|
* ```ts
|
|
@@ -2164,20 +2166,20 @@ declare function createPluginContext<O extends {
|
|
|
2164
2166
|
* @see https://standardschema.dev/
|
|
2165
2167
|
*/
|
|
2166
2168
|
interface StandardSchemaIssue {
|
|
2167
|
-
message: string;
|
|
2168
|
-
path?: ReadonlyArray<{
|
|
2169
|
-
key: PropertyKey;
|
|
2170
|
-
}
|
|
2169
|
+
readonly message: string;
|
|
2170
|
+
readonly path?: ReadonlyArray<PropertyKey | {
|
|
2171
|
+
readonly key: PropertyKey;
|
|
2172
|
+
}> | undefined;
|
|
2171
2173
|
}
|
|
2172
2174
|
interface StandardSchemaResult {
|
|
2173
|
-
value?: unknown;
|
|
2174
|
-
issues?: ReadonlyArray<StandardSchemaIssue
|
|
2175
|
+
readonly value?: unknown;
|
|
2176
|
+
readonly issues?: ReadonlyArray<StandardSchemaIssue> | undefined;
|
|
2175
2177
|
}
|
|
2176
2178
|
interface StandardSchemaV1 {
|
|
2177
|
-
'~standard': {
|
|
2178
|
-
version: 1;
|
|
2179
|
-
vendor: string;
|
|
2180
|
-
validate: (value: unknown) => StandardSchemaResult | Promise<StandardSchemaResult>;
|
|
2179
|
+
readonly '~standard': {
|
|
2180
|
+
readonly version: 1;
|
|
2181
|
+
readonly vendor: string;
|
|
2182
|
+
readonly validate: (value: unknown) => StandardSchemaResult | Promise<StandardSchemaResult>;
|
|
2181
2183
|
};
|
|
2182
2184
|
}
|
|
2183
2185
|
/**
|
|
@@ -4218,7 +4220,7 @@ interface SliderContext extends Omit<ModelContext<SliderTicketInput, SliderTicke
|
|
|
4218
4220
|
* @param value Raw value to set.
|
|
4219
4221
|
*
|
|
4220
4222
|
* @remarks
|
|
4221
|
-
* No-op when `readonly` is `true`. The value is snapped to step, clamped to min/max,
|
|
4223
|
+
* No-op when `disabled` or `readonly` is `true`. The value is snapped to step, clamped to min/max,
|
|
4222
4224
|
* and constrained by adjacent thumbs when `crossover` is `false`.
|
|
4223
4225
|
*
|
|
4224
4226
|
* @see {@link up} and {@link down} for relative adjustments.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ContextTrinity } from "./index-DXMlYoiQ.mjs";
|
|
2
|
-
import { n as RegistryContextOptions, o as RegistryOptions, s as RegistryTicket, t as RegistryContext } from "./index-
|
|
2
|
+
import { n as RegistryContextOptions, o as RegistryOptions, s as RegistryTicket, t as RegistryContext } from "./index-RGiSdjYt.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/composables/createTokens/index.d.ts
|
|
5
5
|
interface TokenAlias<T = unknown> {
|
|
@@ -11,7 +11,7 @@ interface TokenAlias<T = unknown> {
|
|
|
11
11
|
$deprecated?: boolean | string;
|
|
12
12
|
}
|
|
13
13
|
type TokenPrimitive = string | number | boolean | null | Function;
|
|
14
|
-
type TokenValue = TokenPrimitive | TokenAlias;
|
|
14
|
+
type TokenValue = TokenPrimitive | TokenAlias | TokenCollection;
|
|
15
15
|
interface TokenCollection {
|
|
16
16
|
[key: string]: TokenValue | TokenCollection;
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ID, i as Extensible } from "./index-CyNk9FpR.mjs";
|
|
2
2
|
import { t as ContextTrinity } from "./index-DXMlYoiQ.mjs";
|
|
3
|
-
import { c as RegistryTicketInput, s as RegistryTicket, t as RegistryContext } from "./index-
|
|
3
|
+
import { c as RegistryTicketInput, s as RegistryTicket, t as RegistryContext } from "./index-RGiSdjYt.mjs";
|
|
4
4
|
import { a as SortEntry, c as PaginationOptions, i as SortDirection, o as PaginationContext, t as DataTableAdapter, v as FilterOptions } from "./adapter-_srNCBEi.mjs";
|
|
5
5
|
import { Ref, ShallowRef } from "vue";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ID, i as Extensible, n as DOMElement, o as MaybeArray, t as Activation } from "./index-CyNk9FpR.mjs";
|
|
2
|
-
import { c as RegistryTicketInput, s as RegistryTicket, t as RegistryContext } from "./index-
|
|
3
|
-
import { $i as RatingContext, Cs as ComboboxAdapter, Da as NumberFieldContext, Ha as NestedSelectionMode, Ia as NestedActiveMode, Io as StandardSchemaV1, Is as StepTicket, Ji as SliderContext, La as NestedContext, Ns as StepContext, Os as VirtualFocusReturn, Rt as PresenceState, Tc as SelectionTicketInput, To as RuleAlias, Ua as NestedTicket, Vs as GroupContext, W as StackTicket, Ws as GroupTicket, Zs as BreadcrumbsContext, _c as ImageStatus, dc as OverflowContext, ha as ProgressContext, ho as FormValidationRule, hs as ComboboxContext, js as PopoverReturn, lt as RovingFocusReturn, na as RatingItemState, oc as SingleTicket, rc as SingleContext, so as InputState, ta as RatingItemDescriptor, tn as NotificationTicket, va as ProgressTicket, wc as SelectionTicket, xc as SelectionContext, yc as UseImageReturn, za as NestedOpenMode } from "./index-
|
|
2
|
+
import { c as RegistryTicketInput, s as RegistryTicket, t as RegistryContext } from "./index-RGiSdjYt.mjs";
|
|
3
|
+
import { $i as RatingContext, Cs as ComboboxAdapter, Da as NumberFieldContext, Ha as NestedSelectionMode, Ia as NestedActiveMode, Io as StandardSchemaV1, Is as StepTicket, Ji as SliderContext, La as NestedContext, Ns as StepContext, Os as VirtualFocusReturn, Rt as PresenceState, Tc as SelectionTicketInput, To as RuleAlias, Ua as NestedTicket, Vs as GroupContext, W as StackTicket, Ws as GroupTicket, Zs as BreadcrumbsContext, _c as ImageStatus, dc as OverflowContext, ha as ProgressContext, ho as FormValidationRule, hs as ComboboxContext, js as PopoverReturn, lt as RovingFocusReturn, na as RatingItemState, oc as SingleTicket, rc as SingleContext, so as InputState, ta as RatingItemDescriptor, tn as NotificationTicket, va as ProgressTicket, wc as SelectionTicket, xc as SelectionContext, yc as UseImageReturn, za as NestedOpenMode } from "./index-BwNRi6BK.mjs";
|
|
4
4
|
import { l as PaginationTicket, o as PaginationContext } from "./adapter-_srNCBEi.mjs";
|
|
5
5
|
import * as _$vue from "vue";
|
|
6
6
|
import { MaybeRefOrGetter, Ref, ShallowRef, TemplateRef } from "vue";
|
|
@@ -12259,12 +12259,9 @@ interface SwitchThumbSlotProps {
|
|
|
12259
12259
|
isChecked: boolean;
|
|
12260
12260
|
/** Whether the parent switch is in a mixed/indeterminate state */
|
|
12261
12261
|
isMixed: boolean;
|
|
12262
|
-
/** Pre-computed data attributes
|
|
12262
|
+
/** Pre-computed data attributes for styling */
|
|
12263
12263
|
attrs: {
|
|
12264
12264
|
'data-state': SwitchState;
|
|
12265
|
-
'style': {
|
|
12266
|
-
visibility: 'visible' | 'hidden';
|
|
12267
|
-
};
|
|
12268
12265
|
};
|
|
12269
12266
|
}
|
|
12270
12267
|
declare const _default$22: typeof __VLS_export$22;
|
|
@@ -12540,10 +12537,10 @@ declare const Switch: {
|
|
|
12540
12537
|
};
|
|
12541
12538
|
});
|
|
12542
12539
|
/**
|
|
12543
|
-
* Sliding knob
|
|
12540
|
+
* Sliding knob for switches.
|
|
12544
12541
|
*
|
|
12545
|
-
* Renders as a span with `data-state` attribute for CSS styling.
|
|
12546
|
-
*
|
|
12542
|
+
* Renders as a span with a `data-state` attribute for CSS styling.
|
|
12543
|
+
* Always visible; drive its off/on position and color from `data-state`.
|
|
12547
12544
|
* Must be used within a Switch.Root or Switch.SelectAll.
|
|
12548
12545
|
*
|
|
12549
12546
|
* @see https://0.vuetifyjs.com/components/forms/switch
|
|
@@ -23,7 +23,7 @@ interface RegistryTicket<V = unknown> {
|
|
|
23
23
|
/**
|
|
24
24
|
* The index of the ticket in the registry.
|
|
25
25
|
*
|
|
26
|
-
* @remarks Automatically managed by the registry. Assigned at registration and updated during reindexing; a supplied index is ignored — use `move()` to position a ticket. It's not recommended to manually set this.
|
|
26
|
+
* @remarks Automatically managed by the registry. Assigned at registration and updated during reindexing; a supplied index is ignored — use `move()` to position a ticket. It's not recommended to manually set this. When a removal defers its reindex — a tail-block removal, or a registry with no index-derived values — a ticket read via `values()`/`entries()` may carry a stale index until the next position-reading call (`register`/`upsert`/`browse`/`lookup`/`move`/`reorder`/`seek`) drains it. A mid-list `unregister`/`offboard` that shifts index-derived survivors reindexes eagerly, so those reads are already current.
|
|
27
27
|
*/
|
|
28
28
|
index: number;
|
|
29
29
|
/** The value associated with the ticket. If not provided, it defaults to the index. */
|
|
@@ -199,7 +199,7 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
|
|
|
199
199
|
* @param id The ID of the ticket to upsert.
|
|
200
200
|
* @param ticket The partial ticket data to update or insert.
|
|
201
201
|
* @param event Optional custom event name to emit alongside `update:ticket`. The patched ticket is dispatched as the event payload.
|
|
202
|
-
* @remarks If the ticket exists, it will be updated in place — the ticket reference returned by `register()` remains valid and reactive (when `reactive: true`). If it doesn't exist, a new ticket will be created with the given ID and data
|
|
202
|
+
* @remarks If the ticket exists, it will be updated in place — the ticket reference returned by `register()` remains valid and reactive (when `reactive: true`), and cached `keys()` / `values()` / `entries()` results stay valid (same refs, membership and order unchanged; iterating effects are not re-notified). If it doesn't exist, a new ticket will be created with the given ID and data, which invalidates the cached results.
|
|
203
203
|
*
|
|
204
204
|
* @see https://0.vuetifyjs.com/composables/registration/create-registry
|
|
205
205
|
*
|
|
@@ -541,12 +541,13 @@ interface RegistryContext<Z extends RegistryTicketInput = RegistryTicketInput, E
|
|
|
541
541
|
* @param ids An array of ticket IDs to unregister.
|
|
542
542
|
* @returns An array of `Partial<Z>` — the inputs that were registered, with
|
|
543
543
|
* registry-managed fields (`index`, `valueIsIndex`, `unregister`) stripped.
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
544
|
+
* A user-supplied `id` is preserved so identity survives the transfer; an
|
|
545
|
+
* auto-generated `id` is stripped so the receiving registry can assign a fresh
|
|
546
|
+
* one. The `value` is stripped only when it was index-derived (`valueIsIndex`).
|
|
547
|
+
* Order matches the input `ids` array. Missing ids are silently skipped — the
|
|
548
|
+
* returned array may be shorter than `ids`.
|
|
549
|
+
* @remarks Unregisters multiple tickets in a single compaction pass, reindexing
|
|
550
|
+
* eagerly only when index-derived survivors shift. The inverse of `onboard`: onboard takes inputs and returns outputs;
|
|
550
551
|
* offboard takes ids and returns the inputs back. Pair with `onboard` on a
|
|
551
552
|
* different registry to move tickets across registries.
|
|
552
553
|
*
|
|
@@ -648,7 +649,7 @@ interface RegistryOptions {
|
|
|
648
649
|
* Enable reactive behavior for registry operations
|
|
649
650
|
*
|
|
650
651
|
* @default false
|
|
651
|
-
* @remarks When enabled, the
|
|
652
|
+
* @remarks When enabled, tickets and the backing collection are shallowReactive, and `keys()`, `values()`, and `entries()` register a single version dependency so effects and templates re-evaluate on structural mutation. Iteration results stay cached between mutations — reactive reads cost the same as non-reactive ones.
|
|
652
653
|
*
|
|
653
654
|
* @example
|
|
654
655
|
* ```ts
|
|
@@ -384,6 +384,8 @@ declare function mergeDeep<T extends object>(target: T, ...sources: DeepPartial<
|
|
|
384
384
|
* - In component setup/lifecycle: Uses Vue's `useId()` for SSR-safe hydration
|
|
385
385
|
* - Outside components: Falls back to sequential counter (`v0-0`, `v0-1`, ...)
|
|
386
386
|
* - Vapor mode compatible
|
|
387
|
+
* - IDs are sequential and predictable — intended for DOM `id`/ARIA wiring only.
|
|
388
|
+
* Never use them as security tokens (CSRF tokens, session ids, capabilities).
|
|
387
389
|
*
|
|
388
390
|
* @example
|
|
389
391
|
* ```ts
|