@vuetify/v0 1.0.0-alpha.0 → 1.0.0-alpha.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 +5 -1
- package/dist/{adapter-T7AedXkz.d.mts → adapter-58IvIfAZ.d.mts} +1 -1
- package/dist/{adapter-Drq1v5wV.mjs → adapter-Be9zUc-n.mjs} +6 -3
- package/dist/{adapter-CcHB7rs3.d.mts → adapter-BvWEd9w-.d.mts} +2 -2
- package/dist/{adapter-BZjmDNJF.d.mts → adapter-DlX3FA3A.d.mts} +2 -2
- package/dist/{adapter-CCIeOzqr.mjs → adapter-gQ2SNKZq.mjs} +31 -22
- package/dist/{adapters-D49L7m2R.mjs → adapters-BJ5n7rgh.mjs} +1 -1
- package/dist/adapters-BnKW0BF_.mjs +2 -0
- package/dist/adapters-CBrvizWb.mjs +4 -0
- package/dist/adapters-CMJGA1k7.mjs +2 -0
- package/dist/adapters-Dse4bPxk.mjs +5 -0
- package/dist/browser/index.js +4845 -3272
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.mjs +2 -2
- package/dist/{components-Dc7sUTsg.mjs → components-CqDewYTU.mjs} +1407 -411
- package/dist/composables/index.d.mts +19 -19
- package/dist/composables/index.mjs +28 -26
- package/dist/{consola-Byg0ybzh.d.mts → consola-BdgyPEfx.d.mts} +1 -1
- package/dist/constants/index.d.mts +2 -2
- package/dist/constants/index.mjs +3 -3
- package/dist/{createDataTable-BbUL9Vva.mjs → createDataTable-rXBqGglI.mjs} +105 -32
- package/dist/{createGroup-C2WCfYPB.mjs → createGroup-BU4olYtB.mjs} +29 -14
- package/dist/{createPagination-Tp4C4He8.mjs → createPagination-CHF7SmmK.mjs} +11 -7
- package/dist/{createTokens-qv02qq4_.mjs → createRegistry-Dl-bSSTr.mjs} +21 -302
- package/dist/{createSelection-AmMX6sjc.mjs → createSelection-Csaa-C8p.mjs} +28 -21
- package/dist/{createSingle-CffpxK__.mjs → createSingle-8xbHAIpY.mjs} +13 -17
- package/dist/createTokens-lNg2M_P_.mjs +302 -0
- 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.d.mts +2 -2
- package/dist/date/index.mjs +4 -4
- package/dist/features/adapters/flagsmith/index.d.mts +1 -1
- package/dist/features/adapters/flagsmith/index.mjs +1 -1
- package/dist/features/adapters/launchdarkly/index.d.mts +1 -1
- package/dist/features/adapters/launchdarkly/index.mjs +1 -1
- package/dist/features/adapters/posthog/index.d.mts +1 -1
- package/dist/features/adapters/posthog/index.mjs +1 -1
- package/dist/features/index.d.mts +2 -2
- package/dist/features/index.mjs +1 -1
- package/dist/{globals-CAv9vqkP.mjs → globals-CKdzjeLe.mjs} +1 -1
- package/dist/htmlElements-D4oMQZPJ.mjs +28 -0
- package/dist/{index-M8EpGjjA.d.mts → index-1XdASTjp.d.mts} +1 -1
- package/dist/{index-D26_u_WI.d.mts → index-B7cqgTBL.d.mts} +1599 -468
- package/dist/{index-DoGxDgdN.d.mts → index-BJGcVy7e.d.mts} +57 -6
- package/dist/index-BgCkepP_.d.mts +31 -0
- package/dist/{index-B_XLHftL.d.mts → index-BxKMMWnQ.d.mts} +301 -263
- package/dist/{index-tyzwWFHS.d.mts → index-BzFHTW59.d.mts} +1 -1
- package/dist/{index-CDcl4wPo.d.mts → index-CT5SCLzW.d.mts} +1 -1
- package/dist/{index-BUsrN1vL.d.mts → index-DE3bWw11.d.mts} +2 -2
- package/dist/{index-76fQGkkO.d.mts → index-DTvqw22G.d.mts} +8 -11
- package/dist/{index-F2Fmxnzi.d.mts → index-Dp1HjBxJ.d.mts} +1 -1
- package/dist/{index-B_AlCD7t.d.mts → index-DuddF-NR.d.mts} +2 -9
- package/dist/{index-Dxx0eMLi.d.mts → index-GOpjKzaJ.d.mts} +1 -1
- package/dist/index.d.mts +23 -23
- package/dist/index.mjs +31 -29
- package/dist/json/attributes.json +280 -4
- package/dist/json/importMap.json +60 -0
- package/dist/json/tags.json +136 -2
- package/dist/json/web-types.json +1186 -347
- package/dist/locale/adapters/index.d.mts +2 -2
- package/dist/locale/adapters/index.mjs +2 -2
- package/dist/locale/adapters/v0/index.d.mts +1 -1
- package/dist/locale/adapters/v0/index.mjs +1 -1
- package/dist/locale/adapters/vue-i18n/index.d.mts +1 -1
- package/dist/locale/index.d.mts +3 -3
- package/dist/locale/index.mjs +2 -2
- package/dist/logger/adapters/consola/index.d.mts +1 -1
- package/dist/logger/adapters/index.d.mts +4 -4
- package/dist/logger/adapters/index.mjs +2 -2
- package/dist/logger/adapters/pino/index.d.mts +1 -1
- package/dist/logger/adapters/v0/index.d.mts +1 -1
- package/dist/logger/adapters/v0/index.mjs +1 -1
- package/dist/logger/index.d.mts +5 -5
- package/dist/logger/index.mjs +2 -2
- package/dist/notifications/index.d.mts +2 -2
- package/dist/notifications/index.mjs +3 -54
- package/dist/palettes/ant/generate/index.mjs +1 -0
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +3 -3
- package/dist/palettes/leonardo/generate/index.mjs +1 -0
- package/dist/palettes/material/generate/index.mjs +1 -0
- 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/index.mjs +2 -2
- package/dist/permissions/adapters/v0/index.d.mts +1 -1
- package/dist/permissions/adapters/v0/index.mjs +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/permissions/index.mjs +2 -2
- package/dist/{pino-BxddSW2l.d.mts → pino-DNfCEb0p.d.mts} +1 -1
- package/dist/{posthog-B8PEtlFr.mjs → posthog-DZNnPXxS.mjs} +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/{server-DNUTnISs.d.mts → server-3ilWFwqe.d.mts} +1 -1
- package/dist/{server-CIftA0pK.mjs → server-y7zLSCSx.mjs} +1 -1
- package/dist/storage/adapters/index.d.mts +2 -2
- package/dist/storage/adapters/index.mjs +1 -1
- package/dist/storage/adapters/memory/index.d.mts +1 -1
- package/dist/storage/adapters/memory/index.mjs +1 -1
- package/dist/storage/index.d.mts +3 -3
- package/dist/storage/index.mjs +2 -2
- 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-as9BWxBK.mjs} +10 -0
- package/dist/types/index.d.mts +2 -2
- package/dist/{unhead-BYw3a366.mjs → unhead-DZiD-4Tx.mjs} +2 -2
- package/dist/{useClickOutside-CnCQkh7M.mjs → useClickOutside-CmCUD_Pf.mjs} +577 -1024
- package/dist/{useFeatures-CMpkbU8Q.mjs → useFeatures-ZIvzzuEV.mjs} +16 -6
- package/dist/{useLocale-BYmoHpo6.mjs → useLocale-DTJx3aKR.mjs} +19 -7
- package/dist/{useLogger-BfaFH-Bi.mjs → useLogger-BBTcMN61.mjs} +33 -16
- package/dist/useNotifications-H4knpvNw.mjs +869 -0
- package/dist/{usePermissions-y3Uum3nO.mjs → usePermissions-B_G12Dwd.mjs} +14 -6
- package/dist/{useRules-eqSXpP9V.mjs → useRules--7Qoo60I.mjs} +15 -5
- package/dist/{useTheme-CFH6I91x.mjs → useTheme-Co05TEeD.mjs} +20 -8
- package/dist/utilities/index.d.mts +1 -1
- package/dist/utilities/index.mjs +14 -9
- package/dist/{v0-DXqYgj7J.mjs → v0-BrTEO5sv.mjs} +2 -2
- package/dist/{v0-BAG8p0si.d.mts → v0-CdusXjY_.d.mts} +1 -1
- package/dist/{v0-CFV8A5PF.mjs → v0-D0Mh3EVG.mjs} +1 -1
- package/dist/{v0-BpgPZ1qB.d.mts → v0-D7Fm2C3Y.d.mts} +1 -1
- package/dist/{v0-BqikIgl0.mjs → v0-DeiZuexg.mjs} +1 -1
- package/dist/{v0-DOq_Ia5H.mjs → v0-Dq3zhexO.mjs} +2 -2
- package/dist/{v0-C2UMaHUa.d.mts → v0-DrOub-e1.d.mts} +1 -1
- package/dist/{virtual-D1HwNBLS.mjs → virtual-C0yHf1DC.mjs} +2 -2
- package/dist/{virtual-BaQWQ9ji.d.mts → virtual-D4fckewC.d.mts} +1 -1
- package/package.json +10 -7
- package/SKILL.md +0 -95
- package/dist/adapters-BOVGPozf.mjs +0 -2
- package/dist/adapters-BbNfjyvY.mjs +0 -5
- package/dist/adapters-BhNTUuxE.mjs +0 -2
- package/dist/adapters-RwNU3wNj.mjs +0 -4
- package/dist/htmlElements-DcYtv0hg.mjs +0 -75
- package/dist/index-D6mQAEs2.d.mts +0 -79
- /package/dist/{adapter-DNKjooxI.d.mts → adapter-Dhq68tz0.d.mts} +0 -0
- /package/dist/{flagsmith-DQnnahG5.mjs → flagsmith-Dbh1h8WF.mjs} +0 -0
- /package/dist/{index-DxruGeVY.d.mts → index-C6rdXZ7j.d.mts} +0 -0
- /package/dist/{index-PWQavSPf.d.mts → index-CFhUdAHM.d.mts} +0 -0
- /package/dist/{index-c55Utzva.d.mts → index-CROz1VSV.d.mts} +0 -0
- /package/dist/{launchdarkly-2_48EJ1_.mjs → launchdarkly-BKtW-idu.mjs} +0 -0
- /package/dist/{memory-DUyWthic.d.mts → memory-CeSQE-QV.d.mts} +0 -0
- /package/dist/{memory-XCMtkld1.mjs → memory-oYBvtkgx.mjs} +0 -0
- /package/dist/{v0-4OQBCeda.mjs → v0-Bmow1q_x.mjs} +0 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { isObject, isString, isUndefined } from "./utilities/index.mjs";
|
|
2
|
+
import { i as useContext, t as createTrinity } from "./createTrinity-BTCs1pYx.mjs";
|
|
3
|
+
import { i as useLogger } from "./useLogger-BBTcMN61.mjs";
|
|
4
|
+
import { t as createRegistry } from "./createRegistry-Dl-bSSTr.mjs";
|
|
5
|
+
//#region src/composables/createTokens/index.ts
|
|
6
|
+
/**
|
|
7
|
+
* @module createTokens
|
|
8
|
+
*
|
|
9
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Design token registry with alias resolution and W3C Design Tokens format support.
|
|
13
|
+
*
|
|
14
|
+
* Key features:
|
|
15
|
+
* - Alias resolution with circular reference detection
|
|
16
|
+
* - Nested token flattening with dot notation
|
|
17
|
+
* - W3C Design Tokens format ($value, $type, $description, $extensions)
|
|
18
|
+
* - Path-based resolution (e.g., {colors}.blue.500)
|
|
19
|
+
* - Resolution caching for performance (~28,590 ops/sec)
|
|
20
|
+
*
|
|
21
|
+
* Used by useTheme, useLocale, and useFeatures for token-based configuration.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* import { createTokens } from '@vuetify/v0'
|
|
26
|
+
*
|
|
27
|
+
* const tokens = createTokens({
|
|
28
|
+
* colors: { primary: '#1976d2' },
|
|
29
|
+
* })
|
|
30
|
+
* console.log(tokens.resolve('{colors.primary}'))
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new token instance.
|
|
35
|
+
*
|
|
36
|
+
* @param tokens The tokens to use.
|
|
37
|
+
* @param options The options for the token instance.
|
|
38
|
+
* @template Z The type of the token ticket.
|
|
39
|
+
* @template E The type of the token context.
|
|
40
|
+
* @returns A new token instance.
|
|
41
|
+
*
|
|
42
|
+
* @see https://www.designtokens.org/tr/drafts/format/
|
|
43
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* import { createTokens } from '@vuetify/v0'
|
|
48
|
+
*
|
|
49
|
+
* const tokens = createTokens({
|
|
50
|
+
* colors: {
|
|
51
|
+
* primary: '#3b82f6',
|
|
52
|
+
* secondary: '{colors.primary}', // Alias reference
|
|
53
|
+
* },
|
|
54
|
+
* })
|
|
55
|
+
*
|
|
56
|
+
* console.log(tokens.resolve('{colors.primary}')) // '#3b82f6'
|
|
57
|
+
* console.log(tokens.resolve('{colors.secondary}')) // '#3b82f6'
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
function createTokens(tokens = {}, options = {}) {
|
|
61
|
+
const logger = useLogger();
|
|
62
|
+
const registry = createRegistry(options);
|
|
63
|
+
const cache = /* @__PURE__ */ new Map();
|
|
64
|
+
registry.onboard(/* @__PURE__ */ flatten(tokens, options.prefix, !!options.flat));
|
|
65
|
+
function isAlias(token) {
|
|
66
|
+
return /* @__PURE__ */ isString(token) && token.length > 2 && token[0] === "{" && token.at(-1) === "}";
|
|
67
|
+
}
|
|
68
|
+
function isTokenAlias(value) {
|
|
69
|
+
return /* @__PURE__ */ isObject(value) && "$value" in value;
|
|
70
|
+
}
|
|
71
|
+
function resolve(token, visited = /* @__PURE__ */ new Set()) {
|
|
72
|
+
const cacheKey = /* @__PURE__ */ isString(token) ? token : JSON.stringify(token);
|
|
73
|
+
if (cache.has(cacheKey)) return cache.get(cacheKey);
|
|
74
|
+
const reference = isTokenAlias(token) ? token.$value : token;
|
|
75
|
+
const isAliasReference = /* @__PURE__ */ isString(reference) && isAlias(reference);
|
|
76
|
+
const clean = isAliasReference ? reference.slice(1, -1) : String(reference);
|
|
77
|
+
if (visited.has(clean)) {
|
|
78
|
+
logger.warn(`Circular alias detected for "${clean}"`);
|
|
79
|
+
cache.set(cacheKey, void 0);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
visited.add(clean);
|
|
83
|
+
let found = registry.get(clean);
|
|
84
|
+
let segments = [];
|
|
85
|
+
if (!found && clean.includes(".")) {
|
|
86
|
+
const parts = clean.split(".");
|
|
87
|
+
for (let i = parts.length - 1; i > 0; i--) {
|
|
88
|
+
const prefix = parts.slice(0, i).join(".");
|
|
89
|
+
const suffix = parts.slice(i);
|
|
90
|
+
const candidate = registry.get(prefix);
|
|
91
|
+
if (!/* @__PURE__ */ isUndefined(candidate?.value)) {
|
|
92
|
+
found = candidate;
|
|
93
|
+
segments = suffix;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (/* @__PURE__ */ isUndefined(found?.value)) {
|
|
99
|
+
if (isAliasReference) logger.warn(`Alias not found for "${String(reference)}"`);
|
|
100
|
+
cache.set(cacheKey, void 0);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
let result;
|
|
104
|
+
let current = found.value;
|
|
105
|
+
if (segments.length > 0) {
|
|
106
|
+
if (isTokenAlias(current)) current = current.$value;
|
|
107
|
+
for (const segment of segments) {
|
|
108
|
+
if (!/* @__PURE__ */ isObject(current) || !(segment in current)) {
|
|
109
|
+
current = void 0;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
current = current[segment];
|
|
113
|
+
if (isTokenAlias(current)) current = current.$value;
|
|
114
|
+
}
|
|
115
|
+
if (/* @__PURE__ */ isUndefined(current)) {
|
|
116
|
+
logger.warn(`Path not found inside "${clean}": ${segments.join(".")}`);
|
|
117
|
+
cache.set(cacheKey, void 0);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
result = current;
|
|
121
|
+
} else if (isTokenAlias(current)) {
|
|
122
|
+
const inner = current.$value;
|
|
123
|
+
if (/* @__PURE__ */ isString(inner) && isAlias(inner)) return resolve(inner, visited);
|
|
124
|
+
result = inner;
|
|
125
|
+
} else if (/* @__PURE__ */ isString(current) && isAlias(current)) return resolve(current, visited);
|
|
126
|
+
else result = current;
|
|
127
|
+
cache.set(cacheKey, result);
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
const { register: _register, upsert: _upsert, unregister: _unregister, onboard: _onboard, offboard: _offboard, move: _move, clear: _clear } = registry;
|
|
131
|
+
function register(registration) {
|
|
132
|
+
cache.clear();
|
|
133
|
+
return _register(registration);
|
|
134
|
+
}
|
|
135
|
+
function upsert(id, registration) {
|
|
136
|
+
cache.clear();
|
|
137
|
+
return _upsert(id, registration);
|
|
138
|
+
}
|
|
139
|
+
function unregister(id) {
|
|
140
|
+
cache.clear();
|
|
141
|
+
return _unregister(id);
|
|
142
|
+
}
|
|
143
|
+
function onboard(registrations) {
|
|
144
|
+
cache.clear();
|
|
145
|
+
return _onboard(registrations);
|
|
146
|
+
}
|
|
147
|
+
function offboard(ids) {
|
|
148
|
+
cache.clear();
|
|
149
|
+
return _offboard(ids);
|
|
150
|
+
}
|
|
151
|
+
function move(id, index) {
|
|
152
|
+
cache.clear();
|
|
153
|
+
return _move(id, index);
|
|
154
|
+
}
|
|
155
|
+
function clear() {
|
|
156
|
+
cache.clear();
|
|
157
|
+
return _clear();
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
...registry,
|
|
161
|
+
register,
|
|
162
|
+
upsert,
|
|
163
|
+
unregister,
|
|
164
|
+
onboard,
|
|
165
|
+
offboard,
|
|
166
|
+
move,
|
|
167
|
+
clear,
|
|
168
|
+
resolve,
|
|
169
|
+
isAlias,
|
|
170
|
+
get size() {
|
|
171
|
+
return registry.size;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Creates a new token context.
|
|
177
|
+
*
|
|
178
|
+
* @param namespace The namespace for the token context.
|
|
179
|
+
* @param tokens The tokens to use.
|
|
180
|
+
* @template Z The type of the token ticket.
|
|
181
|
+
* @template E The type of the token context.
|
|
182
|
+
* @returns A new token context.
|
|
183
|
+
*
|
|
184
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```ts
|
|
188
|
+
* import { createTokensContext } from '@vuetify/v0'
|
|
189
|
+
*
|
|
190
|
+
* export const [useTokens, provideTokens, context] = createTokensContext({
|
|
191
|
+
* namespace: 'v0:tokens',
|
|
192
|
+
* tokens: {
|
|
193
|
+
* colors: {
|
|
194
|
+
* primary: '#3b82f6',
|
|
195
|
+
* secondary: '{colors.primary}', // Alias reference
|
|
196
|
+
* },
|
|
197
|
+
* },
|
|
198
|
+
* })
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
function createTokensContext(_options) {
|
|
202
|
+
const { namespace = "v0:tokens", tokens = {}, ...options } = _options;
|
|
203
|
+
return createTrinity(namespace, createTokens(tokens, options));
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Returns the current tokens instance.
|
|
207
|
+
*
|
|
208
|
+
* @param namespace The namespace for the tokens context. Defaults to `'v0:tokens'`.
|
|
209
|
+
* @returns The current tokens instance.
|
|
210
|
+
*
|
|
211
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```vue
|
|
215
|
+
* <script setup lang="ts">
|
|
216
|
+
* import { useTokens } from '@vuetify/v0'
|
|
217
|
+
*
|
|
218
|
+
* const tokens = useTokens()
|
|
219
|
+
* <\/script>
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
function useTokens(namespace = "v0:tokens") {
|
|
223
|
+
return useContext(namespace);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Flattens a nested collection of tokens into a flat array of tokens.
|
|
227
|
+
* Each token is represented by an object containing its ID & value.
|
|
228
|
+
* @param tokens The collection of tokens to flatten.
|
|
229
|
+
* @param prefix An optional prefix to prepend to each token ID.
|
|
230
|
+
* @returns An array of flattened tokens, each with an ID and value.
|
|
231
|
+
*/
|
|
232
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
233
|
+
function flatten(tokens, prefix = "", flat = false) {
|
|
234
|
+
const flattened = [];
|
|
235
|
+
const stack = [{
|
|
236
|
+
tokens,
|
|
237
|
+
prefix,
|
|
238
|
+
flat
|
|
239
|
+
}];
|
|
240
|
+
while (stack.length > 0) {
|
|
241
|
+
const { tokens: currentTokens, prefix: currentPrefix, flat } = stack.pop();
|
|
242
|
+
const meta = {};
|
|
243
|
+
for (const k in currentTokens) if (k.startsWith("$")) meta[k] = currentTokens[k];
|
|
244
|
+
if (Object.keys(meta).length > 0 && currentPrefix) flattened.push({
|
|
245
|
+
id: currentPrefix,
|
|
246
|
+
value: meta
|
|
247
|
+
});
|
|
248
|
+
for (const key in currentTokens) {
|
|
249
|
+
if (key.startsWith("$")) continue;
|
|
250
|
+
const value = currentTokens[key];
|
|
251
|
+
const id = currentPrefix ? `${currentPrefix}.${key}` : key;
|
|
252
|
+
if (!/* @__PURE__ */ isObject(value)) {
|
|
253
|
+
flattened.push({
|
|
254
|
+
id,
|
|
255
|
+
value
|
|
256
|
+
});
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
if ("$value" in value) {
|
|
260
|
+
flattened.push({
|
|
261
|
+
id,
|
|
262
|
+
value
|
|
263
|
+
});
|
|
264
|
+
const inner = value.$value;
|
|
265
|
+
if (/* @__PURE__ */ isObject(inner) && !flat) for (const innerKey in inner) {
|
|
266
|
+
if (innerKey.startsWith("$")) continue;
|
|
267
|
+
const child = inner[innerKey];
|
|
268
|
+
const childId = `${id}.${innerKey}`;
|
|
269
|
+
if (!/* @__PURE__ */ isObject(child)) flattened.push({
|
|
270
|
+
id: childId,
|
|
271
|
+
value: child
|
|
272
|
+
});
|
|
273
|
+
else if ("$value" in child) flattened.push({
|
|
274
|
+
id: childId,
|
|
275
|
+
value: child
|
|
276
|
+
});
|
|
277
|
+
else stack.push({
|
|
278
|
+
tokens: child,
|
|
279
|
+
prefix: childId,
|
|
280
|
+
flat
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
if (flat) {
|
|
286
|
+
flattened.push({
|
|
287
|
+
id,
|
|
288
|
+
value
|
|
289
|
+
});
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
stack.push({
|
|
293
|
+
tokens: value,
|
|
294
|
+
prefix: id,
|
|
295
|
+
flat
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return flattened;
|
|
300
|
+
}
|
|
301
|
+
//#endregion
|
|
302
|
+
export { useTokens as i, createTokensContext as n, flatten as r, createTokens as t };
|
|
@@ -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-CdusXjY_.mjs";
|
|
2
2
|
export { ClientAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ClientAdapter } from "../../../v0-
|
|
1
|
+
import { t as ClientAdapter } from "../../../v0-Dq3zhexO.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-DlX3FA3A.mjs";
|
|
2
|
+
import { n as ServerAdapterOptions, t as ServerAdapter } from "../../server-3ilWFwqe.mjs";
|
|
3
|
+
import { t as ClientAdapter } from "../../v0-CdusXjY_.mjs";
|
|
4
|
+
import { t as VirtualAdapter } from "../../virtual-D4fckewC.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-gQ2SNKZq.mjs";
|
|
2
|
+
import { t as ClientAdapter } from "../../v0-Dq3zhexO.mjs";
|
|
3
|
+
import { t as ServerAdapter } from "../../server-y7zLSCSx.mjs";
|
|
4
|
+
import { t as VirtualAdapter } from "../../virtual-C0yHf1DC.mjs";
|
|
5
|
+
import "../../adapters-Dse4bPxk.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-3ilWFwqe.mjs";
|
|
2
2
|
export { ServerAdapter, ServerAdapterOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ServerAdapter } from "../../../server-
|
|
1
|
+
import { t as ServerAdapter } from "../../../server-y7zLSCSx.mjs";
|
|
2
2
|
export { ServerAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as VirtualAdapter } from "../../../virtual-
|
|
1
|
+
import { t as VirtualAdapter } from "../../../virtual-D4fckewC.mjs";
|
|
2
2
|
export { VirtualAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as VirtualAdapter } from "../../../virtual-
|
|
1
|
+
import { t as VirtualAdapter } from "../../../virtual-C0yHf1DC.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-DlX3FA3A.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-BJGcVy7e.mjs";
|
|
3
|
+
import { n as ServerAdapterOptions, t as ServerAdapter } from "../server-3ilWFwqe.mjs";
|
|
4
|
+
import { t as ClientAdapter } from "../v0-CdusXjY_.mjs";
|
|
5
|
+
import { t as VirtualAdapter } from "../virtual-D4fckewC.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-gQ2SNKZq.mjs";
|
|
2
|
+
import { t as ClientAdapter } from "../v0-Dq3zhexO.mjs";
|
|
3
|
+
import { a as extractLeaves, i as computeDepth, n as createDataTableContext, o as resolveHeaders, r as useDataTable, t as createDataTable } from "../createDataTable-rXBqGglI.mjs";
|
|
4
|
+
import { t as ServerAdapter } from "../server-y7zLSCSx.mjs";
|
|
5
|
+
import { t as VirtualAdapter } from "../virtual-C0yHf1DC.mjs";
|
|
6
|
+
export { ClientAdapter, DataTableAdapter, ServerAdapter, VirtualAdapter, computeDepth, createDataTable, createDataTableContext, extractLeaves, resolveHeaders, useDataTable };
|
package/dist/date/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as DateAdapter } from "../adapter-
|
|
1
|
+
import { t as DateAdapter } from "../adapter-58IvIfAZ.mjs";
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
|
|
4
4
|
//#region src/composables/useDate/adapters/v0.d.ts
|
|
@@ -53,7 +53,7 @@ declare class Vuetify0DateAdapter implements DateAdapter<PlainDateTime> {
|
|
|
53
53
|
*/
|
|
54
54
|
parse(value: string, _format: string): PlainDateTime | null;
|
|
55
55
|
isValid(date: unknown): date is PlainDateTime;
|
|
56
|
-
|
|
56
|
+
isNullish(value: PlainDateTime | null): value is null;
|
|
57
57
|
getCurrentLocaleCode(): string;
|
|
58
58
|
is12HourCycleInCurrentLocale(): boolean;
|
|
59
59
|
format(date: PlainDateTime, formatString: string): string;
|
package/dist/date/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as IN_BROWSER } from "../globals-
|
|
2
|
-
import { isNull, isNullOrUndefined, isNumber, isString } from "../utilities/index.mjs";
|
|
1
|
+
import { t as IN_BROWSER } from "../globals-CKdzjeLe.mjs";
|
|
2
|
+
import { isFunction, 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
|
|
5
5
|
/**
|
|
@@ -30,7 +30,7 @@ const MAX_CACHE_SIZE = 50;
|
|
|
30
30
|
function deriveWeekInfo(locale) {
|
|
31
31
|
try {
|
|
32
32
|
const loc = new Intl.Locale(locale);
|
|
33
|
-
const info =
|
|
33
|
+
const info = /* @__PURE__ */ isFunction(loc.getWeekInfo) ? loc.getWeekInfo() : loc.weekInfo;
|
|
34
34
|
return {
|
|
35
35
|
firstDay: info?.firstDay === 7 ? 0 : info?.firstDay ?? 0,
|
|
36
36
|
minimalDays: info?.minimalDays ?? deriveMinimalDays(locale)
|
|
@@ -193,7 +193,7 @@ var Vuetify0DateAdapter = class {
|
|
|
193
193
|
}
|
|
194
194
|
return false;
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
isNullish(value) {
|
|
197
197
|
return /* @__PURE__ */ isNullOrUndefined(value);
|
|
198
198
|
}
|
|
199
199
|
getCurrentLocaleCode() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as FlagsmithFeatureAdapter } from "../../../index-
|
|
1
|
+
import { t as FlagsmithFeatureAdapter } from "../../../index-BzFHTW59.mjs";
|
|
2
2
|
export { FlagsmithFeatureAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as FlagsmithFeatureAdapter } from "../../../flagsmith-
|
|
1
|
+
import { t as FlagsmithFeatureAdapter } from "../../../flagsmith-Dbh1h8WF.mjs";
|
|
2
2
|
export { FlagsmithFeatureAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as LaunchDarklyFeatureAdapter } from "../../../index-
|
|
1
|
+
import { t as LaunchDarklyFeatureAdapter } from "../../../index-1XdASTjp.mjs";
|
|
2
2
|
export { LaunchDarklyFeatureAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as LaunchDarklyFeatureAdapter } from "../../../launchdarkly-
|
|
1
|
+
import { t as LaunchDarklyFeatureAdapter } from "../../../launchdarkly-BKtW-idu.mjs";
|
|
2
2
|
export { LaunchDarklyFeatureAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PostHogFeatureAdapter } from "../../../index-
|
|
1
|
+
import { t as PostHogFeatureAdapter } from "../../../index-Dp1HjBxJ.mjs";
|
|
2
2
|
export { PostHogFeatureAdapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PostHogFeatureAdapter } from "../../../posthog-
|
|
1
|
+
import { t as PostHogFeatureAdapter } from "../../../posthog-DZNnPXxS.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-
|
|
2
|
-
import { i as FeaturesAdapterValue, n as FeaturesAdapterFlags, r as FeaturesAdapterInterface, t as FeaturesAdapter } 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-BxKMMWnQ.mjs";
|
|
2
|
+
import { i as FeaturesAdapterValue, n as FeaturesAdapterFlags, r as FeaturesAdapterInterface, t as FeaturesAdapter } from "../index-CT5SCLzW.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-ZIvzzuEV.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 = "1.0.0-alpha.
|
|
8
|
+
const version = "1.0.0-alpha.2";
|
|
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
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set of HTML elements that are self-closing (void elements)
|
|
3
|
+
* These elements cannot have children and don't need closing tags
|
|
4
|
+
*/
|
|
5
|
+
const SELF_CLOSING_TAGS = /* @__PURE__ */ new Set([
|
|
6
|
+
"area",
|
|
7
|
+
"base",
|
|
8
|
+
"br",
|
|
9
|
+
"col",
|
|
10
|
+
"embed",
|
|
11
|
+
"hr",
|
|
12
|
+
"img",
|
|
13
|
+
"input",
|
|
14
|
+
"link",
|
|
15
|
+
"meta",
|
|
16
|
+
"source",
|
|
17
|
+
"track",
|
|
18
|
+
"wbr"
|
|
19
|
+
]);
|
|
20
|
+
/**
|
|
21
|
+
* Check if an element is self-closing
|
|
22
|
+
*/
|
|
23
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
24
|
+
function isSelfClosingTag(tag) {
|
|
25
|
+
return SELF_CLOSING_TAGS.has(tag.toLowerCase());
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { isSelfClosingTag as n, SELF_CLOSING_TAGS as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as FeaturesAdapterFlags, r as FeaturesAdapterInterface } from "./index-
|
|
1
|
+
import { n as FeaturesAdapterFlags, r as FeaturesAdapterInterface } from "./index-CT5SCLzW.mjs";
|
|
2
2
|
import { LDClient } from "launchdarkly-js-client-sdk";
|
|
3
3
|
|
|
4
4
|
//#region src/composables/useFeatures/adapters/launchdarkly/index.d.ts
|