@mrts/soltw 0.3.10 → 0.3.12
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/dist/_tw_styles.ts +76 -0
- package/dist/index.js +3323 -47
- package/dist/index.jsx +3282 -45
- package/package.json +6 -8
package/dist/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { Dynamic, className, createComponent, delegateEvents, effect, insert, template } from "solid-js/web";
|
|
2
|
-
import { For, Show, createMemo } from "solid-js";
|
|
3
|
-
import { twMerge } from "tailwind-merge";
|
|
4
|
-
import { argTokenizeBySpaces, deduplicate, tokenizeFilterString } from "@mrts/common";
|
|
5
|
-
|
|
6
1
|
//#region src/items/IdLabel.ts
|
|
7
2
|
function buildIdLabel(arg) {
|
|
8
3
|
if (typeof arg == "string") return {
|
|
@@ -20,6 +15,3324 @@ function buildIdLabel(arg) {
|
|
|
20
15
|
}
|
|
21
16
|
}
|
|
22
17
|
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region ../../node_modules/solid-js/dist/solid.js
|
|
20
|
+
const sharedConfig = {
|
|
21
|
+
context: void 0,
|
|
22
|
+
registry: void 0,
|
|
23
|
+
effects: void 0,
|
|
24
|
+
done: false,
|
|
25
|
+
getContextId() {
|
|
26
|
+
return getContextId(this.context.count);
|
|
27
|
+
},
|
|
28
|
+
getNextContextId() {
|
|
29
|
+
return getContextId(this.context.count++);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
function getContextId(count) {
|
|
33
|
+
const num = String(count), len = num.length - 1;
|
|
34
|
+
return sharedConfig.context.id + (len ? String.fromCharCode(96 + len) : "") + num;
|
|
35
|
+
}
|
|
36
|
+
function setHydrateContext(context) {
|
|
37
|
+
sharedConfig.context = context;
|
|
38
|
+
}
|
|
39
|
+
function nextHydrateContext() {
|
|
40
|
+
return {
|
|
41
|
+
...sharedConfig.context,
|
|
42
|
+
id: sharedConfig.getNextContextId(),
|
|
43
|
+
count: 0
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const equalFn = (a, b) => a === b;
|
|
47
|
+
const $PROXY = Symbol("solid-proxy");
|
|
48
|
+
const SUPPORTS_PROXY = typeof Proxy === "function";
|
|
49
|
+
const $TRACK = Symbol("solid-track");
|
|
50
|
+
const signalOptions = { equals: equalFn };
|
|
51
|
+
let ERROR = null;
|
|
52
|
+
let runEffects = runQueue;
|
|
53
|
+
const STALE = 1;
|
|
54
|
+
const PENDING = 2;
|
|
55
|
+
const UNOWNED = {
|
|
56
|
+
owned: null,
|
|
57
|
+
cleanups: null,
|
|
58
|
+
context: null,
|
|
59
|
+
owner: null
|
|
60
|
+
};
|
|
61
|
+
var Owner = null;
|
|
62
|
+
let Transition = null;
|
|
63
|
+
let Scheduler = null;
|
|
64
|
+
let ExternalSourceConfig = null;
|
|
65
|
+
let Listener = null;
|
|
66
|
+
let Updates = null;
|
|
67
|
+
let Effects = null;
|
|
68
|
+
let ExecCount = 0;
|
|
69
|
+
function createRoot(fn, detachedOwner) {
|
|
70
|
+
const listener = Listener, owner = Owner, unowned = fn.length === 0, current = detachedOwner === void 0 ? owner : detachedOwner, root = unowned ? UNOWNED : {
|
|
71
|
+
owned: null,
|
|
72
|
+
cleanups: null,
|
|
73
|
+
context: current ? current.context : null,
|
|
74
|
+
owner: current
|
|
75
|
+
}, updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
|
|
76
|
+
Owner = root;
|
|
77
|
+
Listener = null;
|
|
78
|
+
try {
|
|
79
|
+
return runUpdates(updateFn, true);
|
|
80
|
+
} finally {
|
|
81
|
+
Listener = listener;
|
|
82
|
+
Owner = owner;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function createSignal(value, options) {
|
|
86
|
+
options = options ? Object.assign({}, signalOptions, options) : signalOptions;
|
|
87
|
+
const s = {
|
|
88
|
+
value,
|
|
89
|
+
observers: null,
|
|
90
|
+
observerSlots: null,
|
|
91
|
+
comparator: options.equals || void 0
|
|
92
|
+
};
|
|
93
|
+
const setter = (value$1) => {
|
|
94
|
+
if (typeof value$1 === "function") if (Transition && Transition.running && Transition.sources.has(s)) value$1 = value$1(s.tValue);
|
|
95
|
+
else value$1 = value$1(s.value);
|
|
96
|
+
return writeSignal(s, value$1);
|
|
97
|
+
};
|
|
98
|
+
return [readSignal.bind(s), setter];
|
|
99
|
+
}
|
|
100
|
+
function createRenderEffect(fn, value, options) {
|
|
101
|
+
const c = createComputation(fn, value, false, STALE);
|
|
102
|
+
if (Scheduler && Transition && Transition.running) Updates.push(c);
|
|
103
|
+
else updateComputation(c);
|
|
104
|
+
}
|
|
105
|
+
function createMemo(fn, value, options) {
|
|
106
|
+
options = options ? Object.assign({}, signalOptions, options) : signalOptions;
|
|
107
|
+
const c = createComputation(fn, value, true, 0);
|
|
108
|
+
c.observers = null;
|
|
109
|
+
c.observerSlots = null;
|
|
110
|
+
c.comparator = options.equals || void 0;
|
|
111
|
+
if (Scheduler && Transition && Transition.running) {
|
|
112
|
+
c.tState = STALE;
|
|
113
|
+
Updates.push(c);
|
|
114
|
+
} else updateComputation(c);
|
|
115
|
+
return readSignal.bind(c);
|
|
116
|
+
}
|
|
117
|
+
function untrack(fn) {
|
|
118
|
+
if (!ExternalSourceConfig && Listener === null) return fn();
|
|
119
|
+
const listener = Listener;
|
|
120
|
+
Listener = null;
|
|
121
|
+
try {
|
|
122
|
+
if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
|
|
123
|
+
return fn();
|
|
124
|
+
} finally {
|
|
125
|
+
Listener = listener;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function onCleanup(fn) {
|
|
129
|
+
if (Owner === null);
|
|
130
|
+
else if (Owner.cleanups === null) Owner.cleanups = [fn];
|
|
131
|
+
else Owner.cleanups.push(fn);
|
|
132
|
+
return fn;
|
|
133
|
+
}
|
|
134
|
+
function startTransition(fn) {
|
|
135
|
+
if (Transition && Transition.running) {
|
|
136
|
+
fn();
|
|
137
|
+
return Transition.done;
|
|
138
|
+
}
|
|
139
|
+
const l = Listener;
|
|
140
|
+
const o = Owner;
|
|
141
|
+
return Promise.resolve().then(() => {
|
|
142
|
+
Listener = l;
|
|
143
|
+
Owner = o;
|
|
144
|
+
let t;
|
|
145
|
+
if (Scheduler || SuspenseContext) {
|
|
146
|
+
t = Transition || (Transition = {
|
|
147
|
+
sources: /* @__PURE__ */ new Set(),
|
|
148
|
+
effects: [],
|
|
149
|
+
promises: /* @__PURE__ */ new Set(),
|
|
150
|
+
disposed: /* @__PURE__ */ new Set(),
|
|
151
|
+
queue: /* @__PURE__ */ new Set(),
|
|
152
|
+
running: true
|
|
153
|
+
});
|
|
154
|
+
t.done || (t.done = new Promise((res) => t.resolve = res));
|
|
155
|
+
t.running = true;
|
|
156
|
+
}
|
|
157
|
+
runUpdates(fn, false);
|
|
158
|
+
Listener = Owner = null;
|
|
159
|
+
return t ? t.done : void 0;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
const [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
|
|
163
|
+
let SuspenseContext;
|
|
164
|
+
function readSignal() {
|
|
165
|
+
const runningTransition = Transition && Transition.running;
|
|
166
|
+
if (this.sources && (runningTransition ? this.tState : this.state)) if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);
|
|
167
|
+
else {
|
|
168
|
+
const updates = Updates;
|
|
169
|
+
Updates = null;
|
|
170
|
+
runUpdates(() => lookUpstream(this), false);
|
|
171
|
+
Updates = updates;
|
|
172
|
+
}
|
|
173
|
+
if (Listener) {
|
|
174
|
+
const sSlot = this.observers ? this.observers.length : 0;
|
|
175
|
+
if (!Listener.sources) {
|
|
176
|
+
Listener.sources = [this];
|
|
177
|
+
Listener.sourceSlots = [sSlot];
|
|
178
|
+
} else {
|
|
179
|
+
Listener.sources.push(this);
|
|
180
|
+
Listener.sourceSlots.push(sSlot);
|
|
181
|
+
}
|
|
182
|
+
if (!this.observers) {
|
|
183
|
+
this.observers = [Listener];
|
|
184
|
+
this.observerSlots = [Listener.sources.length - 1];
|
|
185
|
+
} else {
|
|
186
|
+
this.observers.push(Listener);
|
|
187
|
+
this.observerSlots.push(Listener.sources.length - 1);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (runningTransition && Transition.sources.has(this)) return this.tValue;
|
|
191
|
+
return this.value;
|
|
192
|
+
}
|
|
193
|
+
function writeSignal(node, value, isComp) {
|
|
194
|
+
let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;
|
|
195
|
+
if (!node.comparator || !node.comparator(current, value)) {
|
|
196
|
+
if (Transition) {
|
|
197
|
+
const TransitionRunning = Transition.running;
|
|
198
|
+
if (TransitionRunning || !isComp && Transition.sources.has(node)) {
|
|
199
|
+
Transition.sources.add(node);
|
|
200
|
+
node.tValue = value;
|
|
201
|
+
}
|
|
202
|
+
if (!TransitionRunning) node.value = value;
|
|
203
|
+
} else node.value = value;
|
|
204
|
+
if (node.observers && node.observers.length) runUpdates(() => {
|
|
205
|
+
for (let i = 0; i < node.observers.length; i += 1) {
|
|
206
|
+
const o = node.observers[i];
|
|
207
|
+
const TransitionRunning = Transition && Transition.running;
|
|
208
|
+
if (TransitionRunning && Transition.disposed.has(o)) continue;
|
|
209
|
+
if (TransitionRunning ? !o.tState : !o.state) {
|
|
210
|
+
if (o.pure) Updates.push(o);
|
|
211
|
+
else Effects.push(o);
|
|
212
|
+
if (o.observers) markDownstream(o);
|
|
213
|
+
}
|
|
214
|
+
if (!TransitionRunning) o.state = STALE;
|
|
215
|
+
else o.tState = STALE;
|
|
216
|
+
}
|
|
217
|
+
if (Updates.length > 1e6) {
|
|
218
|
+
Updates = [];
|
|
219
|
+
throw new Error();
|
|
220
|
+
}
|
|
221
|
+
}, false);
|
|
222
|
+
}
|
|
223
|
+
return value;
|
|
224
|
+
}
|
|
225
|
+
function updateComputation(node) {
|
|
226
|
+
if (!node.fn) return;
|
|
227
|
+
cleanNode(node);
|
|
228
|
+
const time = ExecCount;
|
|
229
|
+
runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);
|
|
230
|
+
if (Transition && !Transition.running && Transition.sources.has(node)) queueMicrotask(() => {
|
|
231
|
+
runUpdates(() => {
|
|
232
|
+
Transition && (Transition.running = true);
|
|
233
|
+
Listener = Owner = node;
|
|
234
|
+
runComputation(node, node.tValue, time);
|
|
235
|
+
Listener = Owner = null;
|
|
236
|
+
}, false);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
function runComputation(node, value, time) {
|
|
240
|
+
let nextValue;
|
|
241
|
+
const owner = Owner, listener = Listener;
|
|
242
|
+
Listener = Owner = node;
|
|
243
|
+
try {
|
|
244
|
+
nextValue = node.fn(value);
|
|
245
|
+
} catch (err) {
|
|
246
|
+
if (node.pure) if (Transition && Transition.running) {
|
|
247
|
+
node.tState = STALE;
|
|
248
|
+
node.tOwned && node.tOwned.forEach(cleanNode);
|
|
249
|
+
node.tOwned = void 0;
|
|
250
|
+
} else {
|
|
251
|
+
node.state = STALE;
|
|
252
|
+
node.owned && node.owned.forEach(cleanNode);
|
|
253
|
+
node.owned = null;
|
|
254
|
+
}
|
|
255
|
+
node.updatedAt = time + 1;
|
|
256
|
+
return handleError(err);
|
|
257
|
+
} finally {
|
|
258
|
+
Listener = listener;
|
|
259
|
+
Owner = owner;
|
|
260
|
+
}
|
|
261
|
+
if (!node.updatedAt || node.updatedAt <= time) {
|
|
262
|
+
if (node.updatedAt != null && "observers" in node) writeSignal(node, nextValue, true);
|
|
263
|
+
else if (Transition && Transition.running && node.pure) {
|
|
264
|
+
Transition.sources.add(node);
|
|
265
|
+
node.tValue = nextValue;
|
|
266
|
+
} else node.value = nextValue;
|
|
267
|
+
node.updatedAt = time;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function createComputation(fn, init, pure, state = STALE, options) {
|
|
271
|
+
const c = {
|
|
272
|
+
fn,
|
|
273
|
+
state,
|
|
274
|
+
updatedAt: null,
|
|
275
|
+
owned: null,
|
|
276
|
+
sources: null,
|
|
277
|
+
sourceSlots: null,
|
|
278
|
+
cleanups: null,
|
|
279
|
+
value: init,
|
|
280
|
+
owner: Owner,
|
|
281
|
+
context: Owner ? Owner.context : null,
|
|
282
|
+
pure
|
|
283
|
+
};
|
|
284
|
+
if (Transition && Transition.running) {
|
|
285
|
+
c.state = 0;
|
|
286
|
+
c.tState = state;
|
|
287
|
+
}
|
|
288
|
+
if (Owner === null);
|
|
289
|
+
else if (Owner !== UNOWNED) if (Transition && Transition.running && Owner.pure) if (!Owner.tOwned) Owner.tOwned = [c];
|
|
290
|
+
else Owner.tOwned.push(c);
|
|
291
|
+
else if (!Owner.owned) Owner.owned = [c];
|
|
292
|
+
else Owner.owned.push(c);
|
|
293
|
+
if (ExternalSourceConfig && c.fn) {
|
|
294
|
+
const [track, trigger] = createSignal(void 0, { equals: false });
|
|
295
|
+
const ordinary = ExternalSourceConfig.factory(c.fn, trigger);
|
|
296
|
+
onCleanup(() => ordinary.dispose());
|
|
297
|
+
const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
|
|
298
|
+
const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);
|
|
299
|
+
c.fn = (x) => {
|
|
300
|
+
track();
|
|
301
|
+
return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
return c;
|
|
305
|
+
}
|
|
306
|
+
function runTop(node) {
|
|
307
|
+
const runningTransition = Transition && Transition.running;
|
|
308
|
+
if ((runningTransition ? node.tState : node.state) === 0) return;
|
|
309
|
+
if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);
|
|
310
|
+
if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
|
|
311
|
+
const ancestors = [node];
|
|
312
|
+
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
313
|
+
if (runningTransition && Transition.disposed.has(node)) return;
|
|
314
|
+
if (runningTransition ? node.tState : node.state) ancestors.push(node);
|
|
315
|
+
}
|
|
316
|
+
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
317
|
+
node = ancestors[i];
|
|
318
|
+
if (runningTransition) {
|
|
319
|
+
let top = node, prev = ancestors[i + 1];
|
|
320
|
+
while ((top = top.owner) && top !== prev) if (Transition.disposed.has(top)) return;
|
|
321
|
+
}
|
|
322
|
+
if ((runningTransition ? node.tState : node.state) === STALE) updateComputation(node);
|
|
323
|
+
else if ((runningTransition ? node.tState : node.state) === PENDING) {
|
|
324
|
+
const updates = Updates;
|
|
325
|
+
Updates = null;
|
|
326
|
+
runUpdates(() => lookUpstream(node, ancestors[0]), false);
|
|
327
|
+
Updates = updates;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
function runUpdates(fn, init) {
|
|
332
|
+
if (Updates) return fn();
|
|
333
|
+
let wait = false;
|
|
334
|
+
if (!init) Updates = [];
|
|
335
|
+
if (Effects) wait = true;
|
|
336
|
+
else Effects = [];
|
|
337
|
+
ExecCount++;
|
|
338
|
+
try {
|
|
339
|
+
const res = fn();
|
|
340
|
+
completeUpdates(wait);
|
|
341
|
+
return res;
|
|
342
|
+
} catch (err) {
|
|
343
|
+
if (!wait) Effects = null;
|
|
344
|
+
Updates = null;
|
|
345
|
+
handleError(err);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
function completeUpdates(wait) {
|
|
349
|
+
if (Updates) {
|
|
350
|
+
if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);
|
|
351
|
+
else runQueue(Updates);
|
|
352
|
+
Updates = null;
|
|
353
|
+
}
|
|
354
|
+
if (wait) return;
|
|
355
|
+
let res;
|
|
356
|
+
if (Transition) {
|
|
357
|
+
if (!Transition.promises.size && !Transition.queue.size) {
|
|
358
|
+
const sources = Transition.sources;
|
|
359
|
+
const disposed = Transition.disposed;
|
|
360
|
+
Effects.push.apply(Effects, Transition.effects);
|
|
361
|
+
res = Transition.resolve;
|
|
362
|
+
for (const e$1 of Effects) {
|
|
363
|
+
"tState" in e$1 && (e$1.state = e$1.tState);
|
|
364
|
+
delete e$1.tState;
|
|
365
|
+
}
|
|
366
|
+
Transition = null;
|
|
367
|
+
runUpdates(() => {
|
|
368
|
+
for (const d of disposed) cleanNode(d);
|
|
369
|
+
for (const v of sources) {
|
|
370
|
+
v.value = v.tValue;
|
|
371
|
+
if (v.owned) for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);
|
|
372
|
+
if (v.tOwned) v.owned = v.tOwned;
|
|
373
|
+
delete v.tValue;
|
|
374
|
+
delete v.tOwned;
|
|
375
|
+
v.tState = 0;
|
|
376
|
+
}
|
|
377
|
+
setTransPending(false);
|
|
378
|
+
}, false);
|
|
379
|
+
} else if (Transition.running) {
|
|
380
|
+
Transition.running = false;
|
|
381
|
+
Transition.effects.push.apply(Transition.effects, Effects);
|
|
382
|
+
Effects = null;
|
|
383
|
+
setTransPending(true);
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
const e = Effects;
|
|
388
|
+
Effects = null;
|
|
389
|
+
if (e.length) runUpdates(() => runEffects(e), false);
|
|
390
|
+
if (res) res();
|
|
391
|
+
}
|
|
392
|
+
function runQueue(queue) {
|
|
393
|
+
for (let i = 0; i < queue.length; i++) runTop(queue[i]);
|
|
394
|
+
}
|
|
395
|
+
function scheduleQueue(queue) {
|
|
396
|
+
for (let i = 0; i < queue.length; i++) {
|
|
397
|
+
const item = queue[i];
|
|
398
|
+
const tasks = Transition.queue;
|
|
399
|
+
if (!tasks.has(item)) {
|
|
400
|
+
tasks.add(item);
|
|
401
|
+
Scheduler(() => {
|
|
402
|
+
tasks.delete(item);
|
|
403
|
+
runUpdates(() => {
|
|
404
|
+
Transition.running = true;
|
|
405
|
+
runTop(item);
|
|
406
|
+
}, false);
|
|
407
|
+
Transition && (Transition.running = false);
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
function lookUpstream(node, ignore) {
|
|
413
|
+
const runningTransition = Transition && Transition.running;
|
|
414
|
+
if (runningTransition) node.tState = 0;
|
|
415
|
+
else node.state = 0;
|
|
416
|
+
for (let i = 0; i < node.sources.length; i += 1) {
|
|
417
|
+
const source = node.sources[i];
|
|
418
|
+
if (source.sources) {
|
|
419
|
+
const state = runningTransition ? source.tState : source.state;
|
|
420
|
+
if (state === STALE) {
|
|
421
|
+
if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount)) runTop(source);
|
|
422
|
+
} else if (state === PENDING) lookUpstream(source, ignore);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
function markDownstream(node) {
|
|
427
|
+
const runningTransition = Transition && Transition.running;
|
|
428
|
+
for (let i = 0; i < node.observers.length; i += 1) {
|
|
429
|
+
const o = node.observers[i];
|
|
430
|
+
if (runningTransition ? !o.tState : !o.state) {
|
|
431
|
+
if (runningTransition) o.tState = PENDING;
|
|
432
|
+
else o.state = PENDING;
|
|
433
|
+
if (o.pure) Updates.push(o);
|
|
434
|
+
else Effects.push(o);
|
|
435
|
+
o.observers && markDownstream(o);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
function cleanNode(node) {
|
|
440
|
+
let i;
|
|
441
|
+
if (node.sources) while (node.sources.length) {
|
|
442
|
+
const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
|
|
443
|
+
if (obs && obs.length) {
|
|
444
|
+
const n = obs.pop(), s = source.observerSlots.pop();
|
|
445
|
+
if (index < obs.length) {
|
|
446
|
+
n.sourceSlots[s] = index;
|
|
447
|
+
obs[index] = n;
|
|
448
|
+
source.observerSlots[index] = s;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
if (node.tOwned) {
|
|
453
|
+
for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);
|
|
454
|
+
delete node.tOwned;
|
|
455
|
+
}
|
|
456
|
+
if (Transition && Transition.running && node.pure) reset(node, true);
|
|
457
|
+
else if (node.owned) {
|
|
458
|
+
for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);
|
|
459
|
+
node.owned = null;
|
|
460
|
+
}
|
|
461
|
+
if (node.cleanups) {
|
|
462
|
+
for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();
|
|
463
|
+
node.cleanups = null;
|
|
464
|
+
}
|
|
465
|
+
if (Transition && Transition.running) node.tState = 0;
|
|
466
|
+
else node.state = 0;
|
|
467
|
+
}
|
|
468
|
+
function reset(node, top) {
|
|
469
|
+
if (!top) {
|
|
470
|
+
node.tState = 0;
|
|
471
|
+
Transition.disposed.add(node);
|
|
472
|
+
}
|
|
473
|
+
if (node.owned) for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);
|
|
474
|
+
}
|
|
475
|
+
function castError(err) {
|
|
476
|
+
if (err instanceof Error) return err;
|
|
477
|
+
return new Error(typeof err === "string" ? err : "Unknown error", { cause: err });
|
|
478
|
+
}
|
|
479
|
+
function runErrors(err, fns, owner) {
|
|
480
|
+
try {
|
|
481
|
+
for (const f of fns) f(err);
|
|
482
|
+
} catch (e) {
|
|
483
|
+
handleError(e, owner && owner.owner || null);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
function handleError(err, owner = Owner) {
|
|
487
|
+
const fns = ERROR && owner && owner.context && owner.context[ERROR];
|
|
488
|
+
const error = castError(err);
|
|
489
|
+
if (!fns) throw error;
|
|
490
|
+
if (Effects) Effects.push({
|
|
491
|
+
fn() {
|
|
492
|
+
runErrors(error, fns, owner);
|
|
493
|
+
},
|
|
494
|
+
state: STALE
|
|
495
|
+
});
|
|
496
|
+
else runErrors(error, fns, owner);
|
|
497
|
+
}
|
|
498
|
+
const FALLBACK = Symbol("fallback");
|
|
499
|
+
function dispose(d) {
|
|
500
|
+
for (let i = 0; i < d.length; i++) d[i]();
|
|
501
|
+
}
|
|
502
|
+
function mapArray(list, mapFn, options = {}) {
|
|
503
|
+
let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null;
|
|
504
|
+
onCleanup(() => dispose(disposers));
|
|
505
|
+
return () => {
|
|
506
|
+
let newItems = list() || [], newLen = newItems.length, i, j;
|
|
507
|
+
newItems[$TRACK];
|
|
508
|
+
return untrack(() => {
|
|
509
|
+
let newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start, end, newEnd, item;
|
|
510
|
+
if (newLen === 0) {
|
|
511
|
+
if (len !== 0) {
|
|
512
|
+
dispose(disposers);
|
|
513
|
+
disposers = [];
|
|
514
|
+
items = [];
|
|
515
|
+
mapped = [];
|
|
516
|
+
len = 0;
|
|
517
|
+
indexes && (indexes = []);
|
|
518
|
+
}
|
|
519
|
+
if (options.fallback) {
|
|
520
|
+
items = [FALLBACK];
|
|
521
|
+
mapped[0] = createRoot((disposer) => {
|
|
522
|
+
disposers[0] = disposer;
|
|
523
|
+
return options.fallback();
|
|
524
|
+
});
|
|
525
|
+
len = 1;
|
|
526
|
+
}
|
|
527
|
+
} else if (len === 0) {
|
|
528
|
+
mapped = new Array(newLen);
|
|
529
|
+
for (j = 0; j < newLen; j++) {
|
|
530
|
+
items[j] = newItems[j];
|
|
531
|
+
mapped[j] = createRoot(mapper);
|
|
532
|
+
}
|
|
533
|
+
len = newLen;
|
|
534
|
+
} else {
|
|
535
|
+
temp = new Array(newLen);
|
|
536
|
+
tempdisposers = new Array(newLen);
|
|
537
|
+
indexes && (tempIndexes = new Array(newLen));
|
|
538
|
+
for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++);
|
|
539
|
+
for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
|
|
540
|
+
temp[newEnd] = mapped[end];
|
|
541
|
+
tempdisposers[newEnd] = disposers[end];
|
|
542
|
+
indexes && (tempIndexes[newEnd] = indexes[end]);
|
|
543
|
+
}
|
|
544
|
+
newIndices = /* @__PURE__ */ new Map();
|
|
545
|
+
newIndicesNext = new Array(newEnd + 1);
|
|
546
|
+
for (j = newEnd; j >= start; j--) {
|
|
547
|
+
item = newItems[j];
|
|
548
|
+
i = newIndices.get(item);
|
|
549
|
+
newIndicesNext[j] = i === void 0 ? -1 : i;
|
|
550
|
+
newIndices.set(item, j);
|
|
551
|
+
}
|
|
552
|
+
for (i = start; i <= end; i++) {
|
|
553
|
+
item = items[i];
|
|
554
|
+
j = newIndices.get(item);
|
|
555
|
+
if (j !== void 0 && j !== -1) {
|
|
556
|
+
temp[j] = mapped[i];
|
|
557
|
+
tempdisposers[j] = disposers[i];
|
|
558
|
+
indexes && (tempIndexes[j] = indexes[i]);
|
|
559
|
+
j = newIndicesNext[j];
|
|
560
|
+
newIndices.set(item, j);
|
|
561
|
+
} else disposers[i]();
|
|
562
|
+
}
|
|
563
|
+
for (j = start; j < newLen; j++) if (j in temp) {
|
|
564
|
+
mapped[j] = temp[j];
|
|
565
|
+
disposers[j] = tempdisposers[j];
|
|
566
|
+
if (indexes) {
|
|
567
|
+
indexes[j] = tempIndexes[j];
|
|
568
|
+
indexes[j](j);
|
|
569
|
+
}
|
|
570
|
+
} else mapped[j] = createRoot(mapper);
|
|
571
|
+
mapped = mapped.slice(0, len = newLen);
|
|
572
|
+
items = newItems.slice(0);
|
|
573
|
+
}
|
|
574
|
+
return mapped;
|
|
575
|
+
});
|
|
576
|
+
function mapper(disposer) {
|
|
577
|
+
disposers[j] = disposer;
|
|
578
|
+
if (indexes) {
|
|
579
|
+
const [s, set] = createSignal(j);
|
|
580
|
+
indexes[j] = set;
|
|
581
|
+
return mapFn(newItems[j], s);
|
|
582
|
+
}
|
|
583
|
+
return mapFn(newItems[j]);
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
let hydrationEnabled = false;
|
|
588
|
+
function createComponent(Comp, props) {
|
|
589
|
+
if (hydrationEnabled) {
|
|
590
|
+
if (sharedConfig.context) {
|
|
591
|
+
const c = sharedConfig.context;
|
|
592
|
+
setHydrateContext(nextHydrateContext());
|
|
593
|
+
const r = untrack(() => Comp(props || {}));
|
|
594
|
+
setHydrateContext(c);
|
|
595
|
+
return r;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
return untrack(() => Comp(props || {}));
|
|
599
|
+
}
|
|
600
|
+
function trueFn() {
|
|
601
|
+
return true;
|
|
602
|
+
}
|
|
603
|
+
const propTraps = {
|
|
604
|
+
get(_, property, receiver) {
|
|
605
|
+
if (property === $PROXY) return receiver;
|
|
606
|
+
return _.get(property);
|
|
607
|
+
},
|
|
608
|
+
has(_, property) {
|
|
609
|
+
if (property === $PROXY) return true;
|
|
610
|
+
return _.has(property);
|
|
611
|
+
},
|
|
612
|
+
set: trueFn,
|
|
613
|
+
deleteProperty: trueFn,
|
|
614
|
+
getOwnPropertyDescriptor(_, property) {
|
|
615
|
+
return {
|
|
616
|
+
configurable: true,
|
|
617
|
+
enumerable: true,
|
|
618
|
+
get() {
|
|
619
|
+
return _.get(property);
|
|
620
|
+
},
|
|
621
|
+
set: trueFn,
|
|
622
|
+
deleteProperty: trueFn
|
|
623
|
+
};
|
|
624
|
+
},
|
|
625
|
+
ownKeys(_) {
|
|
626
|
+
return _.keys();
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
function splitProps(props, ...keys) {
|
|
630
|
+
const len = keys.length;
|
|
631
|
+
if (SUPPORTS_PROXY && $PROXY in props) {
|
|
632
|
+
const blocked = len > 1 ? keys.flat() : keys[0];
|
|
633
|
+
const res = keys.map((k) => {
|
|
634
|
+
return new Proxy({
|
|
635
|
+
get(property) {
|
|
636
|
+
return k.includes(property) ? props[property] : void 0;
|
|
637
|
+
},
|
|
638
|
+
has(property) {
|
|
639
|
+
return k.includes(property) && property in props;
|
|
640
|
+
},
|
|
641
|
+
keys() {
|
|
642
|
+
return k.filter((property) => property in props);
|
|
643
|
+
}
|
|
644
|
+
}, propTraps);
|
|
645
|
+
});
|
|
646
|
+
res.push(new Proxy({
|
|
647
|
+
get(property) {
|
|
648
|
+
return blocked.includes(property) ? void 0 : props[property];
|
|
649
|
+
},
|
|
650
|
+
has(property) {
|
|
651
|
+
return blocked.includes(property) ? false : property in props;
|
|
652
|
+
},
|
|
653
|
+
keys() {
|
|
654
|
+
return Object.keys(props).filter((k) => !blocked.includes(k));
|
|
655
|
+
}
|
|
656
|
+
}, propTraps));
|
|
657
|
+
return res;
|
|
658
|
+
}
|
|
659
|
+
const objects = [];
|
|
660
|
+
for (let i = 0; i <= len; i++) objects[i] = {};
|
|
661
|
+
for (const propName of Object.getOwnPropertyNames(props)) {
|
|
662
|
+
let keyIndex = len;
|
|
663
|
+
for (let i = 0; i < keys.length; i++) if (keys[i].includes(propName)) {
|
|
664
|
+
keyIndex = i;
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
const desc = Object.getOwnPropertyDescriptor(props, propName);
|
|
668
|
+
!desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable ? objects[keyIndex][propName] = desc.value : Object.defineProperty(objects[keyIndex], propName, desc);
|
|
669
|
+
}
|
|
670
|
+
return objects;
|
|
671
|
+
}
|
|
672
|
+
const narrowedError = (name) => `Stale read from <${name}>.`;
|
|
673
|
+
function For(props) {
|
|
674
|
+
const fallback = "fallback" in props && { fallback: () => props.fallback };
|
|
675
|
+
return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
|
|
676
|
+
}
|
|
677
|
+
function Show(props) {
|
|
678
|
+
const keyed = props.keyed;
|
|
679
|
+
const conditionValue = createMemo(() => props.when, void 0, void 0);
|
|
680
|
+
const condition = keyed ? conditionValue : createMemo(conditionValue, void 0, { equals: (a, b) => !a === !b });
|
|
681
|
+
return createMemo(() => {
|
|
682
|
+
const c = condition();
|
|
683
|
+
if (c) {
|
|
684
|
+
const child = props.children;
|
|
685
|
+
return typeof child === "function" && child.length > 0 ? untrack(() => child(keyed ? c : () => {
|
|
686
|
+
if (!untrack(condition)) throw narrowedError("Show");
|
|
687
|
+
return conditionValue();
|
|
688
|
+
})) : child;
|
|
689
|
+
}
|
|
690
|
+
return props.fallback;
|
|
691
|
+
}, void 0, void 0);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
//#endregion
|
|
695
|
+
//#region ../../node_modules/solid-js/web/dist/web.js
|
|
696
|
+
const Properties = /* @__PURE__ */ new Set([
|
|
697
|
+
"className",
|
|
698
|
+
"value",
|
|
699
|
+
"readOnly",
|
|
700
|
+
"noValidate",
|
|
701
|
+
"formNoValidate",
|
|
702
|
+
"isMap",
|
|
703
|
+
"noModule",
|
|
704
|
+
"playsInline",
|
|
705
|
+
"adAuctionHeaders",
|
|
706
|
+
"allowFullscreen",
|
|
707
|
+
"browsingTopics",
|
|
708
|
+
"defaultChecked",
|
|
709
|
+
"defaultMuted",
|
|
710
|
+
"defaultSelected",
|
|
711
|
+
"disablePictureInPicture",
|
|
712
|
+
"disableRemotePlayback",
|
|
713
|
+
"preservesPitch",
|
|
714
|
+
"shadowRootClonable",
|
|
715
|
+
"shadowRootCustomElementRegistry",
|
|
716
|
+
"shadowRootDelegatesFocus",
|
|
717
|
+
"shadowRootSerializable",
|
|
718
|
+
"sharedStorageWritable",
|
|
719
|
+
...[
|
|
720
|
+
"allowfullscreen",
|
|
721
|
+
"async",
|
|
722
|
+
"alpha",
|
|
723
|
+
"autofocus",
|
|
724
|
+
"autoplay",
|
|
725
|
+
"checked",
|
|
726
|
+
"controls",
|
|
727
|
+
"default",
|
|
728
|
+
"disabled",
|
|
729
|
+
"formnovalidate",
|
|
730
|
+
"hidden",
|
|
731
|
+
"indeterminate",
|
|
732
|
+
"inert",
|
|
733
|
+
"ismap",
|
|
734
|
+
"loop",
|
|
735
|
+
"multiple",
|
|
736
|
+
"muted",
|
|
737
|
+
"nomodule",
|
|
738
|
+
"novalidate",
|
|
739
|
+
"open",
|
|
740
|
+
"playsinline",
|
|
741
|
+
"readonly",
|
|
742
|
+
"required",
|
|
743
|
+
"reversed",
|
|
744
|
+
"seamless",
|
|
745
|
+
"selected",
|
|
746
|
+
"adauctionheaders",
|
|
747
|
+
"browsingtopics",
|
|
748
|
+
"credentialless",
|
|
749
|
+
"defaultchecked",
|
|
750
|
+
"defaultmuted",
|
|
751
|
+
"defaultselected",
|
|
752
|
+
"defer",
|
|
753
|
+
"disablepictureinpicture",
|
|
754
|
+
"disableremoteplayback",
|
|
755
|
+
"preservespitch",
|
|
756
|
+
"shadowrootclonable",
|
|
757
|
+
"shadowrootcustomelementregistry",
|
|
758
|
+
"shadowrootdelegatesfocus",
|
|
759
|
+
"shadowrootserializable",
|
|
760
|
+
"sharedstoragewritable"
|
|
761
|
+
]
|
|
762
|
+
]);
|
|
763
|
+
const ChildProperties = /* @__PURE__ */ new Set([
|
|
764
|
+
"innerHTML",
|
|
765
|
+
"textContent",
|
|
766
|
+
"innerText",
|
|
767
|
+
"children"
|
|
768
|
+
]);
|
|
769
|
+
const Aliases = /* @__PURE__ */ Object.assign(Object.create(null), {
|
|
770
|
+
className: "class",
|
|
771
|
+
htmlFor: "for"
|
|
772
|
+
});
|
|
773
|
+
const PropAliases = /* @__PURE__ */ Object.assign(Object.create(null), {
|
|
774
|
+
class: "className",
|
|
775
|
+
novalidate: {
|
|
776
|
+
$: "noValidate",
|
|
777
|
+
FORM: 1
|
|
778
|
+
},
|
|
779
|
+
formnovalidate: {
|
|
780
|
+
$: "formNoValidate",
|
|
781
|
+
BUTTON: 1,
|
|
782
|
+
INPUT: 1
|
|
783
|
+
},
|
|
784
|
+
ismap: {
|
|
785
|
+
$: "isMap",
|
|
786
|
+
IMG: 1
|
|
787
|
+
},
|
|
788
|
+
nomodule: {
|
|
789
|
+
$: "noModule",
|
|
790
|
+
SCRIPT: 1
|
|
791
|
+
},
|
|
792
|
+
playsinline: {
|
|
793
|
+
$: "playsInline",
|
|
794
|
+
VIDEO: 1
|
|
795
|
+
},
|
|
796
|
+
readonly: {
|
|
797
|
+
$: "readOnly",
|
|
798
|
+
INPUT: 1,
|
|
799
|
+
TEXTAREA: 1
|
|
800
|
+
},
|
|
801
|
+
adauctionheaders: {
|
|
802
|
+
$: "adAuctionHeaders",
|
|
803
|
+
IFRAME: 1
|
|
804
|
+
},
|
|
805
|
+
allowfullscreen: {
|
|
806
|
+
$: "allowFullscreen",
|
|
807
|
+
IFRAME: 1
|
|
808
|
+
},
|
|
809
|
+
browsingtopics: {
|
|
810
|
+
$: "browsingTopics",
|
|
811
|
+
IMG: 1
|
|
812
|
+
},
|
|
813
|
+
defaultchecked: {
|
|
814
|
+
$: "defaultChecked",
|
|
815
|
+
INPUT: 1
|
|
816
|
+
},
|
|
817
|
+
defaultmuted: {
|
|
818
|
+
$: "defaultMuted",
|
|
819
|
+
AUDIO: 1,
|
|
820
|
+
VIDEO: 1
|
|
821
|
+
},
|
|
822
|
+
defaultselected: {
|
|
823
|
+
$: "defaultSelected",
|
|
824
|
+
OPTION: 1
|
|
825
|
+
},
|
|
826
|
+
disablepictureinpicture: {
|
|
827
|
+
$: "disablePictureInPicture",
|
|
828
|
+
VIDEO: 1
|
|
829
|
+
},
|
|
830
|
+
disableremoteplayback: {
|
|
831
|
+
$: "disableRemotePlayback",
|
|
832
|
+
AUDIO: 1,
|
|
833
|
+
VIDEO: 1
|
|
834
|
+
},
|
|
835
|
+
preservespitch: {
|
|
836
|
+
$: "preservesPitch",
|
|
837
|
+
AUDIO: 1,
|
|
838
|
+
VIDEO: 1
|
|
839
|
+
},
|
|
840
|
+
shadowrootclonable: {
|
|
841
|
+
$: "shadowRootClonable",
|
|
842
|
+
TEMPLATE: 1
|
|
843
|
+
},
|
|
844
|
+
shadowrootdelegatesfocus: {
|
|
845
|
+
$: "shadowRootDelegatesFocus",
|
|
846
|
+
TEMPLATE: 1
|
|
847
|
+
},
|
|
848
|
+
shadowrootserializable: {
|
|
849
|
+
$: "shadowRootSerializable",
|
|
850
|
+
TEMPLATE: 1
|
|
851
|
+
},
|
|
852
|
+
sharedstoragewritable: {
|
|
853
|
+
$: "sharedStorageWritable",
|
|
854
|
+
IFRAME: 1,
|
|
855
|
+
IMG: 1
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
function getPropAlias(prop, tagName) {
|
|
859
|
+
const a = PropAliases[prop];
|
|
860
|
+
return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
|
|
861
|
+
}
|
|
862
|
+
const DelegatedEvents = /* @__PURE__ */ new Set([
|
|
863
|
+
"beforeinput",
|
|
864
|
+
"click",
|
|
865
|
+
"dblclick",
|
|
866
|
+
"contextmenu",
|
|
867
|
+
"focusin",
|
|
868
|
+
"focusout",
|
|
869
|
+
"input",
|
|
870
|
+
"keydown",
|
|
871
|
+
"keyup",
|
|
872
|
+
"mousedown",
|
|
873
|
+
"mousemove",
|
|
874
|
+
"mouseout",
|
|
875
|
+
"mouseover",
|
|
876
|
+
"mouseup",
|
|
877
|
+
"pointerdown",
|
|
878
|
+
"pointermove",
|
|
879
|
+
"pointerout",
|
|
880
|
+
"pointerover",
|
|
881
|
+
"pointerup",
|
|
882
|
+
"touchend",
|
|
883
|
+
"touchmove",
|
|
884
|
+
"touchstart"
|
|
885
|
+
]);
|
|
886
|
+
const SVGElements = /* @__PURE__ */ new Set([
|
|
887
|
+
"altGlyph",
|
|
888
|
+
"altGlyphDef",
|
|
889
|
+
"altGlyphItem",
|
|
890
|
+
"animate",
|
|
891
|
+
"animateColor",
|
|
892
|
+
"animateMotion",
|
|
893
|
+
"animateTransform",
|
|
894
|
+
"circle",
|
|
895
|
+
"clipPath",
|
|
896
|
+
"color-profile",
|
|
897
|
+
"cursor",
|
|
898
|
+
"defs",
|
|
899
|
+
"desc",
|
|
900
|
+
"ellipse",
|
|
901
|
+
"feBlend",
|
|
902
|
+
"feColorMatrix",
|
|
903
|
+
"feComponentTransfer",
|
|
904
|
+
"feComposite",
|
|
905
|
+
"feConvolveMatrix",
|
|
906
|
+
"feDiffuseLighting",
|
|
907
|
+
"feDisplacementMap",
|
|
908
|
+
"feDistantLight",
|
|
909
|
+
"feDropShadow",
|
|
910
|
+
"feFlood",
|
|
911
|
+
"feFuncA",
|
|
912
|
+
"feFuncB",
|
|
913
|
+
"feFuncG",
|
|
914
|
+
"feFuncR",
|
|
915
|
+
"feGaussianBlur",
|
|
916
|
+
"feImage",
|
|
917
|
+
"feMerge",
|
|
918
|
+
"feMergeNode",
|
|
919
|
+
"feMorphology",
|
|
920
|
+
"feOffset",
|
|
921
|
+
"fePointLight",
|
|
922
|
+
"feSpecularLighting",
|
|
923
|
+
"feSpotLight",
|
|
924
|
+
"feTile",
|
|
925
|
+
"feTurbulence",
|
|
926
|
+
"filter",
|
|
927
|
+
"font",
|
|
928
|
+
"font-face",
|
|
929
|
+
"font-face-format",
|
|
930
|
+
"font-face-name",
|
|
931
|
+
"font-face-src",
|
|
932
|
+
"font-face-uri",
|
|
933
|
+
"foreignObject",
|
|
934
|
+
"g",
|
|
935
|
+
"glyph",
|
|
936
|
+
"glyphRef",
|
|
937
|
+
"hkern",
|
|
938
|
+
"image",
|
|
939
|
+
"line",
|
|
940
|
+
"linearGradient",
|
|
941
|
+
"marker",
|
|
942
|
+
"mask",
|
|
943
|
+
"metadata",
|
|
944
|
+
"missing-glyph",
|
|
945
|
+
"mpath",
|
|
946
|
+
"path",
|
|
947
|
+
"pattern",
|
|
948
|
+
"polygon",
|
|
949
|
+
"polyline",
|
|
950
|
+
"radialGradient",
|
|
951
|
+
"rect",
|
|
952
|
+
"set",
|
|
953
|
+
"stop",
|
|
954
|
+
"svg",
|
|
955
|
+
"switch",
|
|
956
|
+
"symbol",
|
|
957
|
+
"text",
|
|
958
|
+
"textPath",
|
|
959
|
+
"tref",
|
|
960
|
+
"tspan",
|
|
961
|
+
"use",
|
|
962
|
+
"view",
|
|
963
|
+
"vkern"
|
|
964
|
+
]);
|
|
965
|
+
const SVGNamespace = {
|
|
966
|
+
xlink: "http://www.w3.org/1999/xlink",
|
|
967
|
+
xml: "http://www.w3.org/XML/1998/namespace"
|
|
968
|
+
};
|
|
969
|
+
function reconcileArrays(parentNode, a, b) {
|
|
970
|
+
let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
|
|
971
|
+
while (aStart < aEnd || bStart < bEnd) {
|
|
972
|
+
if (a[aStart] === b[bStart]) {
|
|
973
|
+
aStart++;
|
|
974
|
+
bStart++;
|
|
975
|
+
continue;
|
|
976
|
+
}
|
|
977
|
+
while (a[aEnd - 1] === b[bEnd - 1]) {
|
|
978
|
+
aEnd--;
|
|
979
|
+
bEnd--;
|
|
980
|
+
}
|
|
981
|
+
if (aEnd === aStart) {
|
|
982
|
+
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
|
|
983
|
+
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
|
|
984
|
+
} else if (bEnd === bStart) while (aStart < aEnd) {
|
|
985
|
+
if (!map || !map.has(a[aStart])) a[aStart].remove();
|
|
986
|
+
aStart++;
|
|
987
|
+
}
|
|
988
|
+
else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
|
|
989
|
+
const node = a[--aEnd].nextSibling;
|
|
990
|
+
parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);
|
|
991
|
+
parentNode.insertBefore(b[--bEnd], node);
|
|
992
|
+
a[aEnd] = b[bEnd];
|
|
993
|
+
} else {
|
|
994
|
+
if (!map) {
|
|
995
|
+
map = /* @__PURE__ */ new Map();
|
|
996
|
+
let i = bStart;
|
|
997
|
+
while (i < bEnd) map.set(b[i], i++);
|
|
998
|
+
}
|
|
999
|
+
const index = map.get(a[aStart]);
|
|
1000
|
+
if (index != null) if (bStart < index && index < bEnd) {
|
|
1001
|
+
let i = aStart, sequence = 1, t;
|
|
1002
|
+
while (++i < aEnd && i < bEnd) {
|
|
1003
|
+
if ((t = map.get(a[i])) == null || t !== index + sequence) break;
|
|
1004
|
+
sequence++;
|
|
1005
|
+
}
|
|
1006
|
+
if (sequence > index - bStart) {
|
|
1007
|
+
const node = a[aStart];
|
|
1008
|
+
while (bStart < index) parentNode.insertBefore(b[bStart++], node);
|
|
1009
|
+
} else parentNode.replaceChild(b[bStart++], a[aStart++]);
|
|
1010
|
+
} else aStart++;
|
|
1011
|
+
else a[aStart++].remove();
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
const $$EVENTS = "_$DX_DELEGATE";
|
|
1016
|
+
function template(html, isImportNode, isSVG, isMathML) {
|
|
1017
|
+
let node;
|
|
1018
|
+
const create = () => {
|
|
1019
|
+
const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
|
|
1020
|
+
t.innerHTML = html;
|
|
1021
|
+
return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
|
|
1022
|
+
};
|
|
1023
|
+
const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
1024
|
+
fn.cloneNode = fn;
|
|
1025
|
+
return fn;
|
|
1026
|
+
}
|
|
1027
|
+
function delegateEvents(eventNames, document$1 = window.document) {
|
|
1028
|
+
const e = document$1[$$EVENTS] || (document$1[$$EVENTS] = /* @__PURE__ */ new Set());
|
|
1029
|
+
for (let i = 0, l = eventNames.length; i < l; i++) {
|
|
1030
|
+
const name = eventNames[i];
|
|
1031
|
+
if (!e.has(name)) {
|
|
1032
|
+
e.add(name);
|
|
1033
|
+
document$1.addEventListener(name, eventHandler);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
function setAttribute(node, name, value) {
|
|
1038
|
+
if (isHydrating(node)) return;
|
|
1039
|
+
if (value == null) node.removeAttribute(name);
|
|
1040
|
+
else node.setAttribute(name, value);
|
|
1041
|
+
}
|
|
1042
|
+
function setAttributeNS(node, namespace, name, value) {
|
|
1043
|
+
if (isHydrating(node)) return;
|
|
1044
|
+
if (value == null) node.removeAttributeNS(namespace, name);
|
|
1045
|
+
else node.setAttributeNS(namespace, name, value);
|
|
1046
|
+
}
|
|
1047
|
+
function setBoolAttribute(node, name, value) {
|
|
1048
|
+
if (isHydrating(node)) return;
|
|
1049
|
+
value ? node.setAttribute(name, "") : node.removeAttribute(name);
|
|
1050
|
+
}
|
|
1051
|
+
function className(node, value) {
|
|
1052
|
+
if (isHydrating(node)) return;
|
|
1053
|
+
if (value == null) node.removeAttribute("class");
|
|
1054
|
+
else node.className = value;
|
|
1055
|
+
}
|
|
1056
|
+
function addEventListener(node, name, handler, delegate) {
|
|
1057
|
+
if (delegate) if (Array.isArray(handler)) {
|
|
1058
|
+
node[`$$${name}`] = handler[0];
|
|
1059
|
+
node[`$$${name}Data`] = handler[1];
|
|
1060
|
+
} else node[`$$${name}`] = handler;
|
|
1061
|
+
else if (Array.isArray(handler)) {
|
|
1062
|
+
const handlerFn = handler[0];
|
|
1063
|
+
node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
|
|
1064
|
+
} else node.addEventListener(name, handler, typeof handler !== "function" && handler);
|
|
1065
|
+
}
|
|
1066
|
+
function classList(node, value, prev = {}) {
|
|
1067
|
+
const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
|
|
1068
|
+
let i, len;
|
|
1069
|
+
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
1070
|
+
const key = prevKeys[i];
|
|
1071
|
+
if (!key || key === "undefined" || value[key]) continue;
|
|
1072
|
+
toggleClassKey(node, key, false);
|
|
1073
|
+
delete prev[key];
|
|
1074
|
+
}
|
|
1075
|
+
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
1076
|
+
const key = classKeys[i], classValue = !!value[key];
|
|
1077
|
+
if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
|
|
1078
|
+
toggleClassKey(node, key, true);
|
|
1079
|
+
prev[key] = classValue;
|
|
1080
|
+
}
|
|
1081
|
+
return prev;
|
|
1082
|
+
}
|
|
1083
|
+
function style(node, value, prev) {
|
|
1084
|
+
if (!value) return prev ? setAttribute(node, "style") : value;
|
|
1085
|
+
const nodeStyle = node.style;
|
|
1086
|
+
if (typeof value === "string") return nodeStyle.cssText = value;
|
|
1087
|
+
typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
|
|
1088
|
+
prev || (prev = {});
|
|
1089
|
+
value || (value = {});
|
|
1090
|
+
let v, s;
|
|
1091
|
+
for (s in prev) {
|
|
1092
|
+
value[s] ?? nodeStyle.removeProperty(s);
|
|
1093
|
+
delete prev[s];
|
|
1094
|
+
}
|
|
1095
|
+
for (s in value) {
|
|
1096
|
+
v = value[s];
|
|
1097
|
+
if (v !== prev[s]) {
|
|
1098
|
+
nodeStyle.setProperty(s, v);
|
|
1099
|
+
prev[s] = v;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
return prev;
|
|
1103
|
+
}
|
|
1104
|
+
function spread(node, props = {}, isSVG, skipChildren) {
|
|
1105
|
+
const prevProps = {};
|
|
1106
|
+
if (!skipChildren) createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
1107
|
+
createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
|
|
1108
|
+
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
1109
|
+
return prevProps;
|
|
1110
|
+
}
|
|
1111
|
+
function use(fn, element, arg) {
|
|
1112
|
+
return untrack(() => fn(element, arg));
|
|
1113
|
+
}
|
|
1114
|
+
function insert(parent, accessor, marker, initial) {
|
|
1115
|
+
if (marker !== void 0 && !initial) initial = [];
|
|
1116
|
+
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
1117
|
+
createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
|
|
1118
|
+
}
|
|
1119
|
+
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
1120
|
+
props || (props = {});
|
|
1121
|
+
for (const prop in prevProps) if (!(prop in props)) {
|
|
1122
|
+
if (prop === "children") continue;
|
|
1123
|
+
prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props);
|
|
1124
|
+
}
|
|
1125
|
+
for (const prop in props) {
|
|
1126
|
+
if (prop === "children") {
|
|
1127
|
+
if (!skipChildren) insertExpression(node, props.children);
|
|
1128
|
+
continue;
|
|
1129
|
+
}
|
|
1130
|
+
const value = props[prop];
|
|
1131
|
+
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef, props);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
function getNextElement(template$1) {
|
|
1135
|
+
let node, key;
|
|
1136
|
+
if (!isHydrating() || !(node = sharedConfig.registry.get(key = getHydrationKey()))) return template$1();
|
|
1137
|
+
if (sharedConfig.completed) sharedConfig.completed.add(node);
|
|
1138
|
+
sharedConfig.registry.delete(key);
|
|
1139
|
+
return node;
|
|
1140
|
+
}
|
|
1141
|
+
function isHydrating(node) {
|
|
1142
|
+
return !!sharedConfig.context && !sharedConfig.done && (!node || node.isConnected);
|
|
1143
|
+
}
|
|
1144
|
+
function toPropertyName(name) {
|
|
1145
|
+
return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
|
|
1146
|
+
}
|
|
1147
|
+
function toggleClassKey(node, key, value) {
|
|
1148
|
+
const classNames = key.trim().split(/\s+/);
|
|
1149
|
+
for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
|
|
1150
|
+
}
|
|
1151
|
+
function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
1152
|
+
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
1153
|
+
if (prop === "style") return style(node, value, prev);
|
|
1154
|
+
if (prop === "classList") return classList(node, value, prev);
|
|
1155
|
+
if (value === prev) return prev;
|
|
1156
|
+
if (prop === "ref") {
|
|
1157
|
+
if (!skipRef) value(node);
|
|
1158
|
+
} else if (prop.slice(0, 3) === "on:") {
|
|
1159
|
+
const e = prop.slice(3);
|
|
1160
|
+
prev && node.removeEventListener(e, prev, typeof prev !== "function" && prev);
|
|
1161
|
+
value && node.addEventListener(e, value, typeof value !== "function" && value);
|
|
1162
|
+
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
1163
|
+
const e = prop.slice(10);
|
|
1164
|
+
prev && node.removeEventListener(e, prev, true);
|
|
1165
|
+
value && node.addEventListener(e, value, true);
|
|
1166
|
+
} else if (prop.slice(0, 2) === "on") {
|
|
1167
|
+
const name = prop.slice(2).toLowerCase();
|
|
1168
|
+
const delegate = DelegatedEvents.has(name);
|
|
1169
|
+
if (!delegate && prev) {
|
|
1170
|
+
const h = Array.isArray(prev) ? prev[0] : prev;
|
|
1171
|
+
node.removeEventListener(name, h);
|
|
1172
|
+
}
|
|
1173
|
+
if (delegate || value) {
|
|
1174
|
+
addEventListener(node, name, value, delegate);
|
|
1175
|
+
delegate && delegateEvents([name]);
|
|
1176
|
+
}
|
|
1177
|
+
} else if (prop.slice(0, 5) === "attr:") setAttribute(node, prop.slice(5), value);
|
|
1178
|
+
else if (prop.slice(0, 5) === "bool:") setBoolAttribute(node, prop.slice(5), value);
|
|
1179
|
+
else if ((forceProp = prop.slice(0, 5) === "prop:") || (isChildProp = ChildProperties.has(prop)) || !isSVG && ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-") || "is" in props)) {
|
|
1180
|
+
if (forceProp) {
|
|
1181
|
+
prop = prop.slice(5);
|
|
1182
|
+
isProp = true;
|
|
1183
|
+
} else if (isHydrating(node)) return value;
|
|
1184
|
+
if (prop === "class" || prop === "className") className(node, value);
|
|
1185
|
+
else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
|
|
1186
|
+
else node[propAlias || prop] = value;
|
|
1187
|
+
} else {
|
|
1188
|
+
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
1189
|
+
if (ns) setAttributeNS(node, ns, prop, value);
|
|
1190
|
+
else setAttribute(node, Aliases[prop] || prop, value);
|
|
1191
|
+
}
|
|
1192
|
+
return value;
|
|
1193
|
+
}
|
|
1194
|
+
function eventHandler(e) {
|
|
1195
|
+
if (sharedConfig.registry && sharedConfig.events) {
|
|
1196
|
+
if (sharedConfig.events.find(([el, ev]) => ev === e)) return;
|
|
1197
|
+
}
|
|
1198
|
+
let node = e.target;
|
|
1199
|
+
const key = `$$${e.type}`;
|
|
1200
|
+
const oriTarget = e.target;
|
|
1201
|
+
const oriCurrentTarget = e.currentTarget;
|
|
1202
|
+
const retarget = (value) => Object.defineProperty(e, "target", {
|
|
1203
|
+
configurable: true,
|
|
1204
|
+
value
|
|
1205
|
+
});
|
|
1206
|
+
const handleNode = () => {
|
|
1207
|
+
const handler = node[key];
|
|
1208
|
+
if (handler && !node.disabled) {
|
|
1209
|
+
const data = node[`${key}Data`];
|
|
1210
|
+
data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
|
|
1211
|
+
if (e.cancelBubble) return;
|
|
1212
|
+
}
|
|
1213
|
+
node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
|
|
1214
|
+
return true;
|
|
1215
|
+
};
|
|
1216
|
+
const walkUpTree = () => {
|
|
1217
|
+
while (handleNode() && (node = node._$host || node.parentNode || node.host));
|
|
1218
|
+
};
|
|
1219
|
+
Object.defineProperty(e, "currentTarget", {
|
|
1220
|
+
configurable: true,
|
|
1221
|
+
get() {
|
|
1222
|
+
return node || document;
|
|
1223
|
+
}
|
|
1224
|
+
});
|
|
1225
|
+
if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
|
|
1226
|
+
if (e.composedPath) {
|
|
1227
|
+
const path = e.composedPath();
|
|
1228
|
+
retarget(path[0]);
|
|
1229
|
+
for (let i = 0; i < path.length - 2; i++) {
|
|
1230
|
+
node = path[i];
|
|
1231
|
+
if (!handleNode()) break;
|
|
1232
|
+
if (node._$host) {
|
|
1233
|
+
node = node._$host;
|
|
1234
|
+
walkUpTree();
|
|
1235
|
+
break;
|
|
1236
|
+
}
|
|
1237
|
+
if (node.parentNode === oriCurrentTarget) break;
|
|
1238
|
+
}
|
|
1239
|
+
} else walkUpTree();
|
|
1240
|
+
retarget(oriTarget);
|
|
1241
|
+
}
|
|
1242
|
+
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
1243
|
+
const hydrating = isHydrating(parent);
|
|
1244
|
+
if (hydrating) {
|
|
1245
|
+
!current && (current = [...parent.childNodes]);
|
|
1246
|
+
let cleaned = [];
|
|
1247
|
+
for (let i = 0; i < current.length; i++) {
|
|
1248
|
+
const node = current[i];
|
|
1249
|
+
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
|
|
1250
|
+
else cleaned.push(node);
|
|
1251
|
+
}
|
|
1252
|
+
current = cleaned;
|
|
1253
|
+
}
|
|
1254
|
+
while (typeof current === "function") current = current();
|
|
1255
|
+
if (value === current) return current;
|
|
1256
|
+
const t = typeof value, multi = marker !== void 0;
|
|
1257
|
+
parent = multi && current[0] && current[0].parentNode || parent;
|
|
1258
|
+
if (t === "string" || t === "number") {
|
|
1259
|
+
if (hydrating) return current;
|
|
1260
|
+
if (t === "number") {
|
|
1261
|
+
value = value.toString();
|
|
1262
|
+
if (value === current) return current;
|
|
1263
|
+
}
|
|
1264
|
+
if (multi) {
|
|
1265
|
+
let node = current[0];
|
|
1266
|
+
if (node && node.nodeType === 3) node.data !== value && (node.data = value);
|
|
1267
|
+
else node = document.createTextNode(value);
|
|
1268
|
+
current = cleanChildren(parent, current, marker, node);
|
|
1269
|
+
} else if (current !== "" && typeof current === "string") current = parent.firstChild.data = value;
|
|
1270
|
+
else current = parent.textContent = value;
|
|
1271
|
+
} else if (value == null || t === "boolean") {
|
|
1272
|
+
if (hydrating) return current;
|
|
1273
|
+
current = cleanChildren(parent, current, marker);
|
|
1274
|
+
} else if (t === "function") {
|
|
1275
|
+
createRenderEffect(() => {
|
|
1276
|
+
let v = value();
|
|
1277
|
+
while (typeof v === "function") v = v();
|
|
1278
|
+
current = insertExpression(parent, v, current, marker);
|
|
1279
|
+
});
|
|
1280
|
+
return () => current;
|
|
1281
|
+
} else if (Array.isArray(value)) {
|
|
1282
|
+
const array = [];
|
|
1283
|
+
const currentArray = current && Array.isArray(current);
|
|
1284
|
+
if (normalizeIncomingArray(array, value, current, unwrapArray)) {
|
|
1285
|
+
createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
|
|
1286
|
+
return () => current;
|
|
1287
|
+
}
|
|
1288
|
+
if (hydrating) {
|
|
1289
|
+
if (!array.length) return current;
|
|
1290
|
+
if (marker === void 0) return current = [...parent.childNodes];
|
|
1291
|
+
let node = array[0];
|
|
1292
|
+
if (node.parentNode !== parent) return current;
|
|
1293
|
+
const nodes = [node];
|
|
1294
|
+
while ((node = node.nextSibling) !== marker) nodes.push(node);
|
|
1295
|
+
return current = nodes;
|
|
1296
|
+
}
|
|
1297
|
+
if (array.length === 0) {
|
|
1298
|
+
current = cleanChildren(parent, current, marker);
|
|
1299
|
+
if (multi) return current;
|
|
1300
|
+
} else if (currentArray) if (current.length === 0) appendNodes(parent, array, marker);
|
|
1301
|
+
else reconcileArrays(parent, current, array);
|
|
1302
|
+
else {
|
|
1303
|
+
current && cleanChildren(parent);
|
|
1304
|
+
appendNodes(parent, array);
|
|
1305
|
+
}
|
|
1306
|
+
current = array;
|
|
1307
|
+
} else if (value.nodeType) {
|
|
1308
|
+
if (hydrating && value.parentNode) return current = multi ? [value] : value;
|
|
1309
|
+
if (Array.isArray(current)) {
|
|
1310
|
+
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
1311
|
+
cleanChildren(parent, current, null, value);
|
|
1312
|
+
} else if (current == null || current === "" || !parent.firstChild) parent.appendChild(value);
|
|
1313
|
+
else parent.replaceChild(value, parent.firstChild);
|
|
1314
|
+
current = value;
|
|
1315
|
+
}
|
|
1316
|
+
return current;
|
|
1317
|
+
}
|
|
1318
|
+
function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
1319
|
+
let dynamic = false;
|
|
1320
|
+
for (let i = 0, len = array.length; i < len; i++) {
|
|
1321
|
+
let item = array[i], prev = current && current[normalized.length], t;
|
|
1322
|
+
if (item == null || item === true || item === false);
|
|
1323
|
+
else if ((t = typeof item) === "object" && item.nodeType) normalized.push(item);
|
|
1324
|
+
else if (Array.isArray(item)) dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
1325
|
+
else if (t === "function") if (unwrap) {
|
|
1326
|
+
while (typeof item === "function") item = item();
|
|
1327
|
+
dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
|
|
1328
|
+
} else {
|
|
1329
|
+
normalized.push(item);
|
|
1330
|
+
dynamic = true;
|
|
1331
|
+
}
|
|
1332
|
+
else {
|
|
1333
|
+
const value = String(item);
|
|
1334
|
+
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
|
|
1335
|
+
else normalized.push(document.createTextNode(value));
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
return dynamic;
|
|
1339
|
+
}
|
|
1340
|
+
function appendNodes(parent, array, marker = null) {
|
|
1341
|
+
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
|
|
1342
|
+
}
|
|
1343
|
+
function cleanChildren(parent, current, marker, replacement) {
|
|
1344
|
+
if (marker === void 0) return parent.textContent = "";
|
|
1345
|
+
const node = replacement || document.createTextNode("");
|
|
1346
|
+
if (current.length) {
|
|
1347
|
+
let inserted = false;
|
|
1348
|
+
for (let i = current.length - 1; i >= 0; i--) {
|
|
1349
|
+
const el = current[i];
|
|
1350
|
+
if (node !== el) {
|
|
1351
|
+
const isParent = el.parentNode === parent;
|
|
1352
|
+
if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
|
|
1353
|
+
else isParent && el.remove();
|
|
1354
|
+
} else inserted = true;
|
|
1355
|
+
}
|
|
1356
|
+
} else parent.insertBefore(node, marker);
|
|
1357
|
+
return [node];
|
|
1358
|
+
}
|
|
1359
|
+
function getHydrationKey() {
|
|
1360
|
+
return sharedConfig.getNextContextId();
|
|
1361
|
+
}
|
|
1362
|
+
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
1363
|
+
function createElement(tagName, isSVG = false, is = void 0) {
|
|
1364
|
+
return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName, { is });
|
|
1365
|
+
}
|
|
1366
|
+
function createDynamic(component, props) {
|
|
1367
|
+
const cached = createMemo(component);
|
|
1368
|
+
return createMemo(() => {
|
|
1369
|
+
const component$1 = cached();
|
|
1370
|
+
switch (typeof component$1) {
|
|
1371
|
+
case "function": return untrack(() => component$1(props));
|
|
1372
|
+
case "string":
|
|
1373
|
+
const isSvg = SVGElements.has(component$1);
|
|
1374
|
+
const el = sharedConfig.context ? getNextElement() : createElement(component$1, isSvg, untrack(() => props.is));
|
|
1375
|
+
spread(el, props, isSvg);
|
|
1376
|
+
return el;
|
|
1377
|
+
}
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
function Dynamic(props) {
|
|
1381
|
+
const [, others] = splitProps(props, ["component"]);
|
|
1382
|
+
return createDynamic(() => props.component, others);
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
//#endregion
|
|
1386
|
+
//#region ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
1387
|
+
/**
|
|
1388
|
+
* Concatenates two arrays faster than the array spread operator.
|
|
1389
|
+
*/
|
|
1390
|
+
const concatArrays = (array1, array2) => {
|
|
1391
|
+
const combinedArray = new Array(array1.length + array2.length);
|
|
1392
|
+
for (let i = 0; i < array1.length; i++) combinedArray[i] = array1[i];
|
|
1393
|
+
for (let i = 0; i < array2.length; i++) combinedArray[array1.length + i] = array2[i];
|
|
1394
|
+
return combinedArray;
|
|
1395
|
+
};
|
|
1396
|
+
const createClassValidatorObject = (classGroupId, validator) => ({
|
|
1397
|
+
classGroupId,
|
|
1398
|
+
validator
|
|
1399
|
+
});
|
|
1400
|
+
const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
|
|
1401
|
+
nextPart,
|
|
1402
|
+
validators,
|
|
1403
|
+
classGroupId
|
|
1404
|
+
});
|
|
1405
|
+
const CLASS_PART_SEPARATOR = "-";
|
|
1406
|
+
const EMPTY_CONFLICTS = [];
|
|
1407
|
+
const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
|
|
1408
|
+
const createClassGroupUtils = (config) => {
|
|
1409
|
+
const classMap = createClassMap(config);
|
|
1410
|
+
const { conflictingClassGroups, conflictingClassGroupModifiers } = config;
|
|
1411
|
+
const getClassGroupId = (className$1) => {
|
|
1412
|
+
if (className$1.startsWith("[") && className$1.endsWith("]")) return getGroupIdForArbitraryProperty(className$1);
|
|
1413
|
+
const classParts = className$1.split(CLASS_PART_SEPARATOR);
|
|
1414
|
+
return getGroupRecursive(classParts, classParts[0] === "" && classParts.length > 1 ? 1 : 0, classMap);
|
|
1415
|
+
};
|
|
1416
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
1417
|
+
if (hasPostfixModifier) {
|
|
1418
|
+
const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
|
|
1419
|
+
const baseConflicts = conflictingClassGroups[classGroupId];
|
|
1420
|
+
if (modifierConflicts) {
|
|
1421
|
+
if (baseConflicts) return concatArrays(baseConflicts, modifierConflicts);
|
|
1422
|
+
return modifierConflicts;
|
|
1423
|
+
}
|
|
1424
|
+
return baseConflicts || EMPTY_CONFLICTS;
|
|
1425
|
+
}
|
|
1426
|
+
return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
|
|
1427
|
+
};
|
|
1428
|
+
return {
|
|
1429
|
+
getClassGroupId,
|
|
1430
|
+
getConflictingClassGroupIds
|
|
1431
|
+
};
|
|
1432
|
+
};
|
|
1433
|
+
const getGroupRecursive = (classParts, startIndex, classPartObject) => {
|
|
1434
|
+
if (classParts.length - startIndex === 0) return classPartObject.classGroupId;
|
|
1435
|
+
const currentClassPart = classParts[startIndex];
|
|
1436
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
1437
|
+
if (nextClassPartObject) {
|
|
1438
|
+
const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
|
|
1439
|
+
if (result) return result;
|
|
1440
|
+
}
|
|
1441
|
+
const validators = classPartObject.validators;
|
|
1442
|
+
if (validators === null) return;
|
|
1443
|
+
const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
|
|
1444
|
+
const validatorsLength = validators.length;
|
|
1445
|
+
for (let i = 0; i < validatorsLength; i++) {
|
|
1446
|
+
const validatorObj = validators[i];
|
|
1447
|
+
if (validatorObj.validator(classRest)) return validatorObj.classGroupId;
|
|
1448
|
+
}
|
|
1449
|
+
};
|
|
1450
|
+
/**
|
|
1451
|
+
* Get the class group ID for an arbitrary property.
|
|
1452
|
+
*
|
|
1453
|
+
* @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
|
|
1454
|
+
*/
|
|
1455
|
+
const getGroupIdForArbitraryProperty = (className$1) => className$1.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
1456
|
+
const content = className$1.slice(1, -1);
|
|
1457
|
+
const colonIndex = content.indexOf(":");
|
|
1458
|
+
const property = content.slice(0, colonIndex);
|
|
1459
|
+
return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
|
|
1460
|
+
})();
|
|
1461
|
+
/**
|
|
1462
|
+
* Exported for testing only
|
|
1463
|
+
*/
|
|
1464
|
+
const createClassMap = (config) => {
|
|
1465
|
+
const { theme, classGroups } = config;
|
|
1466
|
+
return processClassGroups(classGroups, theme);
|
|
1467
|
+
};
|
|
1468
|
+
const processClassGroups = (classGroups, theme) => {
|
|
1469
|
+
const classMap = createClassPartObject();
|
|
1470
|
+
for (const classGroupId in classGroups) {
|
|
1471
|
+
const group = classGroups[classGroupId];
|
|
1472
|
+
processClassesRecursively(group, classMap, classGroupId, theme);
|
|
1473
|
+
}
|
|
1474
|
+
return classMap;
|
|
1475
|
+
};
|
|
1476
|
+
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
1477
|
+
const len = classGroup.length;
|
|
1478
|
+
for (let i = 0; i < len; i++) {
|
|
1479
|
+
const classDefinition = classGroup[i];
|
|
1480
|
+
processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
1481
|
+
}
|
|
1482
|
+
};
|
|
1483
|
+
const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
1484
|
+
if (typeof classDefinition === "string") {
|
|
1485
|
+
processStringDefinition(classDefinition, classPartObject, classGroupId);
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
if (typeof classDefinition === "function") {
|
|
1489
|
+
processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
1490
|
+
return;
|
|
1491
|
+
}
|
|
1492
|
+
processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
1493
|
+
};
|
|
1494
|
+
const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
|
|
1495
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
1496
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
1497
|
+
};
|
|
1498
|
+
const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
1499
|
+
if (isThemeGetter(classDefinition)) {
|
|
1500
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
if (classPartObject.validators === null) classPartObject.validators = [];
|
|
1504
|
+
classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
|
|
1505
|
+
};
|
|
1506
|
+
const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
1507
|
+
const entries = Object.entries(classDefinition);
|
|
1508
|
+
const len = entries.length;
|
|
1509
|
+
for (let i = 0; i < len; i++) {
|
|
1510
|
+
const [key, value] = entries[i];
|
|
1511
|
+
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
|
|
1512
|
+
}
|
|
1513
|
+
};
|
|
1514
|
+
const getPart = (classPartObject, path) => {
|
|
1515
|
+
let current = classPartObject;
|
|
1516
|
+
const parts = path.split(CLASS_PART_SEPARATOR);
|
|
1517
|
+
const len = parts.length;
|
|
1518
|
+
for (let i = 0; i < len; i++) {
|
|
1519
|
+
const part = parts[i];
|
|
1520
|
+
let next = current.nextPart.get(part);
|
|
1521
|
+
if (!next) {
|
|
1522
|
+
next = createClassPartObject();
|
|
1523
|
+
current.nextPart.set(part, next);
|
|
1524
|
+
}
|
|
1525
|
+
current = next;
|
|
1526
|
+
}
|
|
1527
|
+
return current;
|
|
1528
|
+
};
|
|
1529
|
+
const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
|
|
1530
|
+
const createLruCache = (maxCacheSize) => {
|
|
1531
|
+
if (maxCacheSize < 1) return {
|
|
1532
|
+
get: () => void 0,
|
|
1533
|
+
set: () => {}
|
|
1534
|
+
};
|
|
1535
|
+
let cacheSize = 0;
|
|
1536
|
+
let cache = Object.create(null);
|
|
1537
|
+
let previousCache = Object.create(null);
|
|
1538
|
+
const update = (key, value) => {
|
|
1539
|
+
cache[key] = value;
|
|
1540
|
+
cacheSize++;
|
|
1541
|
+
if (cacheSize > maxCacheSize) {
|
|
1542
|
+
cacheSize = 0;
|
|
1543
|
+
previousCache = cache;
|
|
1544
|
+
cache = Object.create(null);
|
|
1545
|
+
}
|
|
1546
|
+
};
|
|
1547
|
+
return {
|
|
1548
|
+
get(key) {
|
|
1549
|
+
let value = cache[key];
|
|
1550
|
+
if (value !== void 0) return value;
|
|
1551
|
+
if ((value = previousCache[key]) !== void 0) {
|
|
1552
|
+
update(key, value);
|
|
1553
|
+
return value;
|
|
1554
|
+
}
|
|
1555
|
+
},
|
|
1556
|
+
set(key, value) {
|
|
1557
|
+
if (key in cache) cache[key] = value;
|
|
1558
|
+
else update(key, value);
|
|
1559
|
+
}
|
|
1560
|
+
};
|
|
1561
|
+
};
|
|
1562
|
+
const IMPORTANT_MODIFIER = "!";
|
|
1563
|
+
const MODIFIER_SEPARATOR = ":";
|
|
1564
|
+
const EMPTY_MODIFIERS = [];
|
|
1565
|
+
const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
|
|
1566
|
+
modifiers,
|
|
1567
|
+
hasImportantModifier,
|
|
1568
|
+
baseClassName,
|
|
1569
|
+
maybePostfixModifierPosition,
|
|
1570
|
+
isExternal
|
|
1571
|
+
});
|
|
1572
|
+
const createParseClassName = (config) => {
|
|
1573
|
+
const { prefix, experimentalParseClassName } = config;
|
|
1574
|
+
/**
|
|
1575
|
+
* Parse class name into parts.
|
|
1576
|
+
*
|
|
1577
|
+
* Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
|
|
1578
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
|
|
1579
|
+
*/
|
|
1580
|
+
let parseClassName = (className$1) => {
|
|
1581
|
+
const modifiers = [];
|
|
1582
|
+
let bracketDepth = 0;
|
|
1583
|
+
let parenDepth = 0;
|
|
1584
|
+
let modifierStart = 0;
|
|
1585
|
+
let postfixModifierPosition;
|
|
1586
|
+
const len = className$1.length;
|
|
1587
|
+
for (let index = 0; index < len; index++) {
|
|
1588
|
+
const currentCharacter = className$1[index];
|
|
1589
|
+
if (bracketDepth === 0 && parenDepth === 0) {
|
|
1590
|
+
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
1591
|
+
modifiers.push(className$1.slice(modifierStart, index));
|
|
1592
|
+
modifierStart = index + 1;
|
|
1593
|
+
continue;
|
|
1594
|
+
}
|
|
1595
|
+
if (currentCharacter === "/") {
|
|
1596
|
+
postfixModifierPosition = index;
|
|
1597
|
+
continue;
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
if (currentCharacter === "[") bracketDepth++;
|
|
1601
|
+
else if (currentCharacter === "]") bracketDepth--;
|
|
1602
|
+
else if (currentCharacter === "(") parenDepth++;
|
|
1603
|
+
else if (currentCharacter === ")") parenDepth--;
|
|
1604
|
+
}
|
|
1605
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className$1 : className$1.slice(modifierStart);
|
|
1606
|
+
let baseClassName = baseClassNameWithImportantModifier;
|
|
1607
|
+
let hasImportantModifier = false;
|
|
1608
|
+
if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
|
|
1609
|
+
baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
|
|
1610
|
+
hasImportantModifier = true;
|
|
1611
|
+
} else if (baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
|
|
1612
|
+
baseClassName = baseClassNameWithImportantModifier.slice(1);
|
|
1613
|
+
hasImportantModifier = true;
|
|
1614
|
+
}
|
|
1615
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
1616
|
+
return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
|
|
1617
|
+
};
|
|
1618
|
+
if (prefix) {
|
|
1619
|
+
const fullPrefix = prefix + MODIFIER_SEPARATOR;
|
|
1620
|
+
const parseClassNameOriginal = parseClassName;
|
|
1621
|
+
parseClassName = (className$1) => className$1.startsWith(fullPrefix) ? parseClassNameOriginal(className$1.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className$1, void 0, true);
|
|
1622
|
+
}
|
|
1623
|
+
if (experimentalParseClassName) {
|
|
1624
|
+
const parseClassNameOriginal = parseClassName;
|
|
1625
|
+
parseClassName = (className$1) => experimentalParseClassName({
|
|
1626
|
+
className: className$1,
|
|
1627
|
+
parseClassName: parseClassNameOriginal
|
|
1628
|
+
});
|
|
1629
|
+
}
|
|
1630
|
+
return parseClassName;
|
|
1631
|
+
};
|
|
1632
|
+
/**
|
|
1633
|
+
* Sorts modifiers according to following schema:
|
|
1634
|
+
* - Predefined modifiers are sorted alphabetically
|
|
1635
|
+
* - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
|
|
1636
|
+
*/
|
|
1637
|
+
const createSortModifiers = (config) => {
|
|
1638
|
+
const modifierWeights = /* @__PURE__ */ new Map();
|
|
1639
|
+
config.orderSensitiveModifiers.forEach((mod, index) => {
|
|
1640
|
+
modifierWeights.set(mod, 1e6 + index);
|
|
1641
|
+
});
|
|
1642
|
+
return (modifiers) => {
|
|
1643
|
+
const result = [];
|
|
1644
|
+
let currentSegment = [];
|
|
1645
|
+
for (let i = 0; i < modifiers.length; i++) {
|
|
1646
|
+
const modifier = modifiers[i];
|
|
1647
|
+
const isArbitrary = modifier[0] === "[";
|
|
1648
|
+
const isOrderSensitive = modifierWeights.has(modifier);
|
|
1649
|
+
if (isArbitrary || isOrderSensitive) {
|
|
1650
|
+
if (currentSegment.length > 0) {
|
|
1651
|
+
currentSegment.sort();
|
|
1652
|
+
result.push(...currentSegment);
|
|
1653
|
+
currentSegment = [];
|
|
1654
|
+
}
|
|
1655
|
+
result.push(modifier);
|
|
1656
|
+
} else currentSegment.push(modifier);
|
|
1657
|
+
}
|
|
1658
|
+
if (currentSegment.length > 0) {
|
|
1659
|
+
currentSegment.sort();
|
|
1660
|
+
result.push(...currentSegment);
|
|
1661
|
+
}
|
|
1662
|
+
return result;
|
|
1663
|
+
};
|
|
1664
|
+
};
|
|
1665
|
+
const createConfigUtils = (config) => ({
|
|
1666
|
+
cache: createLruCache(config.cacheSize),
|
|
1667
|
+
parseClassName: createParseClassName(config),
|
|
1668
|
+
sortModifiers: createSortModifiers(config),
|
|
1669
|
+
...createClassGroupUtils(config)
|
|
1670
|
+
});
|
|
1671
|
+
const SPLIT_CLASSES_REGEX = /\s+/;
|
|
1672
|
+
const mergeClassList = (classList$1, configUtils) => {
|
|
1673
|
+
const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers } = configUtils;
|
|
1674
|
+
/**
|
|
1675
|
+
* Set of classGroupIds in following format:
|
|
1676
|
+
* `{importantModifier}{variantModifiers}{classGroupId}`
|
|
1677
|
+
* @example 'float'
|
|
1678
|
+
* @example 'hover:focus:bg-color'
|
|
1679
|
+
* @example 'md:!pr'
|
|
1680
|
+
*/
|
|
1681
|
+
const classGroupsInConflict = [];
|
|
1682
|
+
const classNames = classList$1.trim().split(SPLIT_CLASSES_REGEX);
|
|
1683
|
+
let result = "";
|
|
1684
|
+
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
1685
|
+
const originalClassName = classNames[index];
|
|
1686
|
+
const { isExternal, modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName);
|
|
1687
|
+
if (isExternal) {
|
|
1688
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
1689
|
+
continue;
|
|
1690
|
+
}
|
|
1691
|
+
let hasPostfixModifier = !!maybePostfixModifierPosition;
|
|
1692
|
+
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
1693
|
+
if (!classGroupId) {
|
|
1694
|
+
if (!hasPostfixModifier) {
|
|
1695
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
1696
|
+
continue;
|
|
1697
|
+
}
|
|
1698
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
1699
|
+
if (!classGroupId) {
|
|
1700
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
1701
|
+
continue;
|
|
1702
|
+
}
|
|
1703
|
+
hasPostfixModifier = false;
|
|
1704
|
+
}
|
|
1705
|
+
const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
|
|
1706
|
+
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
1707
|
+
const classId = modifierId + classGroupId;
|
|
1708
|
+
if (classGroupsInConflict.indexOf(classId) > -1) continue;
|
|
1709
|
+
classGroupsInConflict.push(classId);
|
|
1710
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
1711
|
+
for (let i = 0; i < conflictGroups.length; ++i) {
|
|
1712
|
+
const group = conflictGroups[i];
|
|
1713
|
+
classGroupsInConflict.push(modifierId + group);
|
|
1714
|
+
}
|
|
1715
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
1716
|
+
}
|
|
1717
|
+
return result;
|
|
1718
|
+
};
|
|
1719
|
+
/**
|
|
1720
|
+
* The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
|
|
1721
|
+
*
|
|
1722
|
+
* Specifically:
|
|
1723
|
+
* - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
|
|
1724
|
+
* - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
|
|
1725
|
+
*
|
|
1726
|
+
* Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
1727
|
+
*/
|
|
1728
|
+
const twJoin = (...classLists) => {
|
|
1729
|
+
let index = 0;
|
|
1730
|
+
let argument;
|
|
1731
|
+
let resolvedValue;
|
|
1732
|
+
let string = "";
|
|
1733
|
+
while (index < classLists.length) if (argument = classLists[index++]) {
|
|
1734
|
+
if (resolvedValue = toValue(argument)) {
|
|
1735
|
+
string && (string += " ");
|
|
1736
|
+
string += resolvedValue;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
return string;
|
|
1740
|
+
};
|
|
1741
|
+
const toValue = (mix) => {
|
|
1742
|
+
if (typeof mix === "string") return mix;
|
|
1743
|
+
let resolvedValue;
|
|
1744
|
+
let string = "";
|
|
1745
|
+
for (let k = 0; k < mix.length; k++) if (mix[k]) {
|
|
1746
|
+
if (resolvedValue = toValue(mix[k])) {
|
|
1747
|
+
string && (string += " ");
|
|
1748
|
+
string += resolvedValue;
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
return string;
|
|
1752
|
+
};
|
|
1753
|
+
const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
|
|
1754
|
+
let configUtils;
|
|
1755
|
+
let cacheGet;
|
|
1756
|
+
let cacheSet;
|
|
1757
|
+
let functionToCall;
|
|
1758
|
+
const initTailwindMerge = (classList$1) => {
|
|
1759
|
+
configUtils = createConfigUtils(createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst()));
|
|
1760
|
+
cacheGet = configUtils.cache.get;
|
|
1761
|
+
cacheSet = configUtils.cache.set;
|
|
1762
|
+
functionToCall = tailwindMerge;
|
|
1763
|
+
return tailwindMerge(classList$1);
|
|
1764
|
+
};
|
|
1765
|
+
const tailwindMerge = (classList$1) => {
|
|
1766
|
+
const cachedResult = cacheGet(classList$1);
|
|
1767
|
+
if (cachedResult) return cachedResult;
|
|
1768
|
+
const result = mergeClassList(classList$1, configUtils);
|
|
1769
|
+
cacheSet(classList$1, result);
|
|
1770
|
+
return result;
|
|
1771
|
+
};
|
|
1772
|
+
functionToCall = initTailwindMerge;
|
|
1773
|
+
return (...args) => functionToCall(twJoin(...args));
|
|
1774
|
+
};
|
|
1775
|
+
const fallbackThemeArr = [];
|
|
1776
|
+
const fromTheme = (key) => {
|
|
1777
|
+
const themeGetter = (theme) => theme[key] || fallbackThemeArr;
|
|
1778
|
+
themeGetter.isThemeGetter = true;
|
|
1779
|
+
return themeGetter;
|
|
1780
|
+
};
|
|
1781
|
+
const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
|
|
1782
|
+
const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
|
1783
|
+
const fractionRegex = /^\d+\/\d+$/;
|
|
1784
|
+
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
1785
|
+
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
|
|
1786
|
+
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
|
|
1787
|
+
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
1788
|
+
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
1789
|
+
const isFraction = (value) => fractionRegex.test(value);
|
|
1790
|
+
const isNumber = (value) => !!value && !Number.isNaN(Number(value));
|
|
1791
|
+
const isInteger = (value) => !!value && Number.isInteger(Number(value));
|
|
1792
|
+
const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
1793
|
+
const isTshirtSize = (value) => tshirtUnitRegex.test(value);
|
|
1794
|
+
const isAny = () => true;
|
|
1795
|
+
const isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
|
|
1796
|
+
const isNever = () => false;
|
|
1797
|
+
const isShadow = (value) => shadowRegex.test(value);
|
|
1798
|
+
const isImage = (value) => imageRegex.test(value);
|
|
1799
|
+
const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
|
|
1800
|
+
const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
|
|
1801
|
+
const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
1802
|
+
const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
|
1803
|
+
const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
1804
|
+
const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
|
|
1805
|
+
const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
|
|
1806
|
+
const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
|
1807
|
+
const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
|
|
1808
|
+
const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
|
|
1809
|
+
const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
|
|
1810
|
+
const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
|
|
1811
|
+
const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
|
|
1812
|
+
const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
|
|
1813
|
+
const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
|
|
1814
|
+
const getIsArbitraryValue = (value, testLabel, testValue) => {
|
|
1815
|
+
const result = arbitraryValueRegex.exec(value);
|
|
1816
|
+
if (result) {
|
|
1817
|
+
if (result[1]) return testLabel(result[1]);
|
|
1818
|
+
return testValue(result[2]);
|
|
1819
|
+
}
|
|
1820
|
+
return false;
|
|
1821
|
+
};
|
|
1822
|
+
const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
|
|
1823
|
+
const result = arbitraryVariableRegex.exec(value);
|
|
1824
|
+
if (result) {
|
|
1825
|
+
if (result[1]) return testLabel(result[1]);
|
|
1826
|
+
return shouldMatchNoLabel;
|
|
1827
|
+
}
|
|
1828
|
+
return false;
|
|
1829
|
+
};
|
|
1830
|
+
const isLabelPosition = (label) => label === "position" || label === "percentage";
|
|
1831
|
+
const isLabelImage = (label) => label === "image" || label === "url";
|
|
1832
|
+
const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
|
|
1833
|
+
const isLabelLength = (label) => label === "length";
|
|
1834
|
+
const isLabelNumber = (label) => label === "number";
|
|
1835
|
+
const isLabelFamilyName = (label) => label === "family-name";
|
|
1836
|
+
const isLabelShadow = (label) => label === "shadow";
|
|
1837
|
+
const getDefaultConfig = () => {
|
|
1838
|
+
/**
|
|
1839
|
+
* Theme getters for theme variable namespaces
|
|
1840
|
+
* @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
|
|
1841
|
+
*/
|
|
1842
|
+
const themeColor = fromTheme("color");
|
|
1843
|
+
const themeFont = fromTheme("font");
|
|
1844
|
+
const themeText = fromTheme("text");
|
|
1845
|
+
const themeFontWeight = fromTheme("font-weight");
|
|
1846
|
+
const themeTracking = fromTheme("tracking");
|
|
1847
|
+
const themeLeading = fromTheme("leading");
|
|
1848
|
+
const themeBreakpoint = fromTheme("breakpoint");
|
|
1849
|
+
const themeContainer = fromTheme("container");
|
|
1850
|
+
const themeSpacing = fromTheme("spacing");
|
|
1851
|
+
const themeRadius = fromTheme("radius");
|
|
1852
|
+
const themeShadow = fromTheme("shadow");
|
|
1853
|
+
const themeInsetShadow = fromTheme("inset-shadow");
|
|
1854
|
+
const themeTextShadow = fromTheme("text-shadow");
|
|
1855
|
+
const themeDropShadow = fromTheme("drop-shadow");
|
|
1856
|
+
const themeBlur = fromTheme("blur");
|
|
1857
|
+
const themePerspective = fromTheme("perspective");
|
|
1858
|
+
const themeAspect = fromTheme("aspect");
|
|
1859
|
+
const themeEase = fromTheme("ease");
|
|
1860
|
+
const themeAnimate = fromTheme("animate");
|
|
1861
|
+
/**
|
|
1862
|
+
* Helpers to avoid repeating the same scales
|
|
1863
|
+
*
|
|
1864
|
+
* We use functions that create a new array every time they're called instead of static arrays.
|
|
1865
|
+
* This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.
|
|
1866
|
+
*/
|
|
1867
|
+
const scaleBreak = () => [
|
|
1868
|
+
"auto",
|
|
1869
|
+
"avoid",
|
|
1870
|
+
"all",
|
|
1871
|
+
"avoid-page",
|
|
1872
|
+
"page",
|
|
1873
|
+
"left",
|
|
1874
|
+
"right",
|
|
1875
|
+
"column"
|
|
1876
|
+
];
|
|
1877
|
+
const scalePosition = () => [
|
|
1878
|
+
"center",
|
|
1879
|
+
"top",
|
|
1880
|
+
"bottom",
|
|
1881
|
+
"left",
|
|
1882
|
+
"right",
|
|
1883
|
+
"top-left",
|
|
1884
|
+
"left-top",
|
|
1885
|
+
"top-right",
|
|
1886
|
+
"right-top",
|
|
1887
|
+
"bottom-right",
|
|
1888
|
+
"right-bottom",
|
|
1889
|
+
"bottom-left",
|
|
1890
|
+
"left-bottom"
|
|
1891
|
+
];
|
|
1892
|
+
const scalePositionWithArbitrary = () => [
|
|
1893
|
+
...scalePosition(),
|
|
1894
|
+
isArbitraryVariable,
|
|
1895
|
+
isArbitraryValue
|
|
1896
|
+
];
|
|
1897
|
+
const scaleOverflow = () => [
|
|
1898
|
+
"auto",
|
|
1899
|
+
"hidden",
|
|
1900
|
+
"clip",
|
|
1901
|
+
"visible",
|
|
1902
|
+
"scroll"
|
|
1903
|
+
];
|
|
1904
|
+
const scaleOverscroll = () => [
|
|
1905
|
+
"auto",
|
|
1906
|
+
"contain",
|
|
1907
|
+
"none"
|
|
1908
|
+
];
|
|
1909
|
+
const scaleUnambiguousSpacing = () => [
|
|
1910
|
+
isArbitraryVariable,
|
|
1911
|
+
isArbitraryValue,
|
|
1912
|
+
themeSpacing
|
|
1913
|
+
];
|
|
1914
|
+
const scaleInset = () => [
|
|
1915
|
+
isFraction,
|
|
1916
|
+
"full",
|
|
1917
|
+
"auto",
|
|
1918
|
+
...scaleUnambiguousSpacing()
|
|
1919
|
+
];
|
|
1920
|
+
const scaleGridTemplateColsRows = () => [
|
|
1921
|
+
isInteger,
|
|
1922
|
+
"none",
|
|
1923
|
+
"subgrid",
|
|
1924
|
+
isArbitraryVariable,
|
|
1925
|
+
isArbitraryValue
|
|
1926
|
+
];
|
|
1927
|
+
const scaleGridColRowStartAndEnd = () => [
|
|
1928
|
+
"auto",
|
|
1929
|
+
{ span: [
|
|
1930
|
+
"full",
|
|
1931
|
+
isInteger,
|
|
1932
|
+
isArbitraryVariable,
|
|
1933
|
+
isArbitraryValue
|
|
1934
|
+
] },
|
|
1935
|
+
isInteger,
|
|
1936
|
+
isArbitraryVariable,
|
|
1937
|
+
isArbitraryValue
|
|
1938
|
+
];
|
|
1939
|
+
const scaleGridColRowStartOrEnd = () => [
|
|
1940
|
+
isInteger,
|
|
1941
|
+
"auto",
|
|
1942
|
+
isArbitraryVariable,
|
|
1943
|
+
isArbitraryValue
|
|
1944
|
+
];
|
|
1945
|
+
const scaleGridAutoColsRows = () => [
|
|
1946
|
+
"auto",
|
|
1947
|
+
"min",
|
|
1948
|
+
"max",
|
|
1949
|
+
"fr",
|
|
1950
|
+
isArbitraryVariable,
|
|
1951
|
+
isArbitraryValue
|
|
1952
|
+
];
|
|
1953
|
+
const scaleAlignPrimaryAxis = () => [
|
|
1954
|
+
"start",
|
|
1955
|
+
"end",
|
|
1956
|
+
"center",
|
|
1957
|
+
"between",
|
|
1958
|
+
"around",
|
|
1959
|
+
"evenly",
|
|
1960
|
+
"stretch",
|
|
1961
|
+
"baseline",
|
|
1962
|
+
"center-safe",
|
|
1963
|
+
"end-safe"
|
|
1964
|
+
];
|
|
1965
|
+
const scaleAlignSecondaryAxis = () => [
|
|
1966
|
+
"start",
|
|
1967
|
+
"end",
|
|
1968
|
+
"center",
|
|
1969
|
+
"stretch",
|
|
1970
|
+
"center-safe",
|
|
1971
|
+
"end-safe"
|
|
1972
|
+
];
|
|
1973
|
+
const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
|
|
1974
|
+
const scaleSizing = () => [
|
|
1975
|
+
isFraction,
|
|
1976
|
+
"auto",
|
|
1977
|
+
"full",
|
|
1978
|
+
"dvw",
|
|
1979
|
+
"dvh",
|
|
1980
|
+
"lvw",
|
|
1981
|
+
"lvh",
|
|
1982
|
+
"svw",
|
|
1983
|
+
"svh",
|
|
1984
|
+
"min",
|
|
1985
|
+
"max",
|
|
1986
|
+
"fit",
|
|
1987
|
+
...scaleUnambiguousSpacing()
|
|
1988
|
+
];
|
|
1989
|
+
const scaleColor = () => [
|
|
1990
|
+
themeColor,
|
|
1991
|
+
isArbitraryVariable,
|
|
1992
|
+
isArbitraryValue
|
|
1993
|
+
];
|
|
1994
|
+
const scaleBgPosition = () => [
|
|
1995
|
+
...scalePosition(),
|
|
1996
|
+
isArbitraryVariablePosition,
|
|
1997
|
+
isArbitraryPosition,
|
|
1998
|
+
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
1999
|
+
];
|
|
2000
|
+
const scaleBgRepeat = () => ["no-repeat", { repeat: [
|
|
2001
|
+
"",
|
|
2002
|
+
"x",
|
|
2003
|
+
"y",
|
|
2004
|
+
"space",
|
|
2005
|
+
"round"
|
|
2006
|
+
] }];
|
|
2007
|
+
const scaleBgSize = () => [
|
|
2008
|
+
"auto",
|
|
2009
|
+
"cover",
|
|
2010
|
+
"contain",
|
|
2011
|
+
isArbitraryVariableSize,
|
|
2012
|
+
isArbitrarySize,
|
|
2013
|
+
{ size: [isArbitraryVariable, isArbitraryValue] }
|
|
2014
|
+
];
|
|
2015
|
+
const scaleGradientStopPosition = () => [
|
|
2016
|
+
isPercent,
|
|
2017
|
+
isArbitraryVariableLength,
|
|
2018
|
+
isArbitraryLength
|
|
2019
|
+
];
|
|
2020
|
+
const scaleRadius = () => [
|
|
2021
|
+
"",
|
|
2022
|
+
"none",
|
|
2023
|
+
"full",
|
|
2024
|
+
themeRadius,
|
|
2025
|
+
isArbitraryVariable,
|
|
2026
|
+
isArbitraryValue
|
|
2027
|
+
];
|
|
2028
|
+
const scaleBorderWidth = () => [
|
|
2029
|
+
"",
|
|
2030
|
+
isNumber,
|
|
2031
|
+
isArbitraryVariableLength,
|
|
2032
|
+
isArbitraryLength
|
|
2033
|
+
];
|
|
2034
|
+
const scaleLineStyle = () => [
|
|
2035
|
+
"solid",
|
|
2036
|
+
"dashed",
|
|
2037
|
+
"dotted",
|
|
2038
|
+
"double"
|
|
2039
|
+
];
|
|
2040
|
+
const scaleBlendMode = () => [
|
|
2041
|
+
"normal",
|
|
2042
|
+
"multiply",
|
|
2043
|
+
"screen",
|
|
2044
|
+
"overlay",
|
|
2045
|
+
"darken",
|
|
2046
|
+
"lighten",
|
|
2047
|
+
"color-dodge",
|
|
2048
|
+
"color-burn",
|
|
2049
|
+
"hard-light",
|
|
2050
|
+
"soft-light",
|
|
2051
|
+
"difference",
|
|
2052
|
+
"exclusion",
|
|
2053
|
+
"hue",
|
|
2054
|
+
"saturation",
|
|
2055
|
+
"color",
|
|
2056
|
+
"luminosity"
|
|
2057
|
+
];
|
|
2058
|
+
const scaleMaskImagePosition = () => [
|
|
2059
|
+
isNumber,
|
|
2060
|
+
isPercent,
|
|
2061
|
+
isArbitraryVariablePosition,
|
|
2062
|
+
isArbitraryPosition
|
|
2063
|
+
];
|
|
2064
|
+
const scaleBlur = () => [
|
|
2065
|
+
"",
|
|
2066
|
+
"none",
|
|
2067
|
+
themeBlur,
|
|
2068
|
+
isArbitraryVariable,
|
|
2069
|
+
isArbitraryValue
|
|
2070
|
+
];
|
|
2071
|
+
const scaleRotate = () => [
|
|
2072
|
+
"none",
|
|
2073
|
+
isNumber,
|
|
2074
|
+
isArbitraryVariable,
|
|
2075
|
+
isArbitraryValue
|
|
2076
|
+
];
|
|
2077
|
+
const scaleScale = () => [
|
|
2078
|
+
"none",
|
|
2079
|
+
isNumber,
|
|
2080
|
+
isArbitraryVariable,
|
|
2081
|
+
isArbitraryValue
|
|
2082
|
+
];
|
|
2083
|
+
const scaleSkew = () => [
|
|
2084
|
+
isNumber,
|
|
2085
|
+
isArbitraryVariable,
|
|
2086
|
+
isArbitraryValue
|
|
2087
|
+
];
|
|
2088
|
+
const scaleTranslate = () => [
|
|
2089
|
+
isFraction,
|
|
2090
|
+
"full",
|
|
2091
|
+
...scaleUnambiguousSpacing()
|
|
2092
|
+
];
|
|
2093
|
+
return {
|
|
2094
|
+
cacheSize: 500,
|
|
2095
|
+
theme: {
|
|
2096
|
+
animate: [
|
|
2097
|
+
"spin",
|
|
2098
|
+
"ping",
|
|
2099
|
+
"pulse",
|
|
2100
|
+
"bounce"
|
|
2101
|
+
],
|
|
2102
|
+
aspect: ["video"],
|
|
2103
|
+
blur: [isTshirtSize],
|
|
2104
|
+
breakpoint: [isTshirtSize],
|
|
2105
|
+
color: [isAny],
|
|
2106
|
+
container: [isTshirtSize],
|
|
2107
|
+
"drop-shadow": [isTshirtSize],
|
|
2108
|
+
ease: [
|
|
2109
|
+
"in",
|
|
2110
|
+
"out",
|
|
2111
|
+
"in-out"
|
|
2112
|
+
],
|
|
2113
|
+
font: [isAnyNonArbitrary],
|
|
2114
|
+
"font-weight": [
|
|
2115
|
+
"thin",
|
|
2116
|
+
"extralight",
|
|
2117
|
+
"light",
|
|
2118
|
+
"normal",
|
|
2119
|
+
"medium",
|
|
2120
|
+
"semibold",
|
|
2121
|
+
"bold",
|
|
2122
|
+
"extrabold",
|
|
2123
|
+
"black"
|
|
2124
|
+
],
|
|
2125
|
+
"inset-shadow": [isTshirtSize],
|
|
2126
|
+
leading: [
|
|
2127
|
+
"none",
|
|
2128
|
+
"tight",
|
|
2129
|
+
"snug",
|
|
2130
|
+
"normal",
|
|
2131
|
+
"relaxed",
|
|
2132
|
+
"loose"
|
|
2133
|
+
],
|
|
2134
|
+
perspective: [
|
|
2135
|
+
"dramatic",
|
|
2136
|
+
"near",
|
|
2137
|
+
"normal",
|
|
2138
|
+
"midrange",
|
|
2139
|
+
"distant",
|
|
2140
|
+
"none"
|
|
2141
|
+
],
|
|
2142
|
+
radius: [isTshirtSize],
|
|
2143
|
+
shadow: [isTshirtSize],
|
|
2144
|
+
spacing: ["px", isNumber],
|
|
2145
|
+
text: [isTshirtSize],
|
|
2146
|
+
"text-shadow": [isTshirtSize],
|
|
2147
|
+
tracking: [
|
|
2148
|
+
"tighter",
|
|
2149
|
+
"tight",
|
|
2150
|
+
"normal",
|
|
2151
|
+
"wide",
|
|
2152
|
+
"wider",
|
|
2153
|
+
"widest"
|
|
2154
|
+
]
|
|
2155
|
+
},
|
|
2156
|
+
classGroups: {
|
|
2157
|
+
aspect: [{ aspect: [
|
|
2158
|
+
"auto",
|
|
2159
|
+
"square",
|
|
2160
|
+
isFraction,
|
|
2161
|
+
isArbitraryValue,
|
|
2162
|
+
isArbitraryVariable,
|
|
2163
|
+
themeAspect
|
|
2164
|
+
] }],
|
|
2165
|
+
container: ["container"],
|
|
2166
|
+
columns: [{ columns: [
|
|
2167
|
+
isNumber,
|
|
2168
|
+
isArbitraryValue,
|
|
2169
|
+
isArbitraryVariable,
|
|
2170
|
+
themeContainer
|
|
2171
|
+
] }],
|
|
2172
|
+
"break-after": [{ "break-after": scaleBreak() }],
|
|
2173
|
+
"break-before": [{ "break-before": scaleBreak() }],
|
|
2174
|
+
"break-inside": [{ "break-inside": [
|
|
2175
|
+
"auto",
|
|
2176
|
+
"avoid",
|
|
2177
|
+
"avoid-page",
|
|
2178
|
+
"avoid-column"
|
|
2179
|
+
] }],
|
|
2180
|
+
"box-decoration": [{ "box-decoration": ["slice", "clone"] }],
|
|
2181
|
+
box: [{ box: ["border", "content"] }],
|
|
2182
|
+
display: [
|
|
2183
|
+
"block",
|
|
2184
|
+
"inline-block",
|
|
2185
|
+
"inline",
|
|
2186
|
+
"flex",
|
|
2187
|
+
"inline-flex",
|
|
2188
|
+
"table",
|
|
2189
|
+
"inline-table",
|
|
2190
|
+
"table-caption",
|
|
2191
|
+
"table-cell",
|
|
2192
|
+
"table-column",
|
|
2193
|
+
"table-column-group",
|
|
2194
|
+
"table-footer-group",
|
|
2195
|
+
"table-header-group",
|
|
2196
|
+
"table-row-group",
|
|
2197
|
+
"table-row",
|
|
2198
|
+
"flow-root",
|
|
2199
|
+
"grid",
|
|
2200
|
+
"inline-grid",
|
|
2201
|
+
"contents",
|
|
2202
|
+
"list-item",
|
|
2203
|
+
"hidden"
|
|
2204
|
+
],
|
|
2205
|
+
sr: ["sr-only", "not-sr-only"],
|
|
2206
|
+
float: [{ float: [
|
|
2207
|
+
"right",
|
|
2208
|
+
"left",
|
|
2209
|
+
"none",
|
|
2210
|
+
"start",
|
|
2211
|
+
"end"
|
|
2212
|
+
] }],
|
|
2213
|
+
clear: [{ clear: [
|
|
2214
|
+
"left",
|
|
2215
|
+
"right",
|
|
2216
|
+
"both",
|
|
2217
|
+
"none",
|
|
2218
|
+
"start",
|
|
2219
|
+
"end"
|
|
2220
|
+
] }],
|
|
2221
|
+
isolation: ["isolate", "isolation-auto"],
|
|
2222
|
+
"object-fit": [{ object: [
|
|
2223
|
+
"contain",
|
|
2224
|
+
"cover",
|
|
2225
|
+
"fill",
|
|
2226
|
+
"none",
|
|
2227
|
+
"scale-down"
|
|
2228
|
+
] }],
|
|
2229
|
+
"object-position": [{ object: scalePositionWithArbitrary() }],
|
|
2230
|
+
overflow: [{ overflow: scaleOverflow() }],
|
|
2231
|
+
"overflow-x": [{ "overflow-x": scaleOverflow() }],
|
|
2232
|
+
"overflow-y": [{ "overflow-y": scaleOverflow() }],
|
|
2233
|
+
overscroll: [{ overscroll: scaleOverscroll() }],
|
|
2234
|
+
"overscroll-x": [{ "overscroll-x": scaleOverscroll() }],
|
|
2235
|
+
"overscroll-y": [{ "overscroll-y": scaleOverscroll() }],
|
|
2236
|
+
position: [
|
|
2237
|
+
"static",
|
|
2238
|
+
"fixed",
|
|
2239
|
+
"absolute",
|
|
2240
|
+
"relative",
|
|
2241
|
+
"sticky"
|
|
2242
|
+
],
|
|
2243
|
+
inset: [{ inset: scaleInset() }],
|
|
2244
|
+
"inset-x": [{ "inset-x": scaleInset() }],
|
|
2245
|
+
"inset-y": [{ "inset-y": scaleInset() }],
|
|
2246
|
+
start: [{ start: scaleInset() }],
|
|
2247
|
+
end: [{ end: scaleInset() }],
|
|
2248
|
+
top: [{ top: scaleInset() }],
|
|
2249
|
+
right: [{ right: scaleInset() }],
|
|
2250
|
+
bottom: [{ bottom: scaleInset() }],
|
|
2251
|
+
left: [{ left: scaleInset() }],
|
|
2252
|
+
visibility: [
|
|
2253
|
+
"visible",
|
|
2254
|
+
"invisible",
|
|
2255
|
+
"collapse"
|
|
2256
|
+
],
|
|
2257
|
+
z: [{ z: [
|
|
2258
|
+
isInteger,
|
|
2259
|
+
"auto",
|
|
2260
|
+
isArbitraryVariable,
|
|
2261
|
+
isArbitraryValue
|
|
2262
|
+
] }],
|
|
2263
|
+
basis: [{ basis: [
|
|
2264
|
+
isFraction,
|
|
2265
|
+
"full",
|
|
2266
|
+
"auto",
|
|
2267
|
+
themeContainer,
|
|
2268
|
+
...scaleUnambiguousSpacing()
|
|
2269
|
+
] }],
|
|
2270
|
+
"flex-direction": [{ flex: [
|
|
2271
|
+
"row",
|
|
2272
|
+
"row-reverse",
|
|
2273
|
+
"col",
|
|
2274
|
+
"col-reverse"
|
|
2275
|
+
] }],
|
|
2276
|
+
"flex-wrap": [{ flex: [
|
|
2277
|
+
"nowrap",
|
|
2278
|
+
"wrap",
|
|
2279
|
+
"wrap-reverse"
|
|
2280
|
+
] }],
|
|
2281
|
+
flex: [{ flex: [
|
|
2282
|
+
isNumber,
|
|
2283
|
+
isFraction,
|
|
2284
|
+
"auto",
|
|
2285
|
+
"initial",
|
|
2286
|
+
"none",
|
|
2287
|
+
isArbitraryValue
|
|
2288
|
+
] }],
|
|
2289
|
+
grow: [{ grow: [
|
|
2290
|
+
"",
|
|
2291
|
+
isNumber,
|
|
2292
|
+
isArbitraryVariable,
|
|
2293
|
+
isArbitraryValue
|
|
2294
|
+
] }],
|
|
2295
|
+
shrink: [{ shrink: [
|
|
2296
|
+
"",
|
|
2297
|
+
isNumber,
|
|
2298
|
+
isArbitraryVariable,
|
|
2299
|
+
isArbitraryValue
|
|
2300
|
+
] }],
|
|
2301
|
+
order: [{ order: [
|
|
2302
|
+
isInteger,
|
|
2303
|
+
"first",
|
|
2304
|
+
"last",
|
|
2305
|
+
"none",
|
|
2306
|
+
isArbitraryVariable,
|
|
2307
|
+
isArbitraryValue
|
|
2308
|
+
] }],
|
|
2309
|
+
"grid-cols": [{ "grid-cols": scaleGridTemplateColsRows() }],
|
|
2310
|
+
"col-start-end": [{ col: scaleGridColRowStartAndEnd() }],
|
|
2311
|
+
"col-start": [{ "col-start": scaleGridColRowStartOrEnd() }],
|
|
2312
|
+
"col-end": [{ "col-end": scaleGridColRowStartOrEnd() }],
|
|
2313
|
+
"grid-rows": [{ "grid-rows": scaleGridTemplateColsRows() }],
|
|
2314
|
+
"row-start-end": [{ row: scaleGridColRowStartAndEnd() }],
|
|
2315
|
+
"row-start": [{ "row-start": scaleGridColRowStartOrEnd() }],
|
|
2316
|
+
"row-end": [{ "row-end": scaleGridColRowStartOrEnd() }],
|
|
2317
|
+
"grid-flow": [{ "grid-flow": [
|
|
2318
|
+
"row",
|
|
2319
|
+
"col",
|
|
2320
|
+
"dense",
|
|
2321
|
+
"row-dense",
|
|
2322
|
+
"col-dense"
|
|
2323
|
+
] }],
|
|
2324
|
+
"auto-cols": [{ "auto-cols": scaleGridAutoColsRows() }],
|
|
2325
|
+
"auto-rows": [{ "auto-rows": scaleGridAutoColsRows() }],
|
|
2326
|
+
gap: [{ gap: scaleUnambiguousSpacing() }],
|
|
2327
|
+
"gap-x": [{ "gap-x": scaleUnambiguousSpacing() }],
|
|
2328
|
+
"gap-y": [{ "gap-y": scaleUnambiguousSpacing() }],
|
|
2329
|
+
"justify-content": [{ justify: [...scaleAlignPrimaryAxis(), "normal"] }],
|
|
2330
|
+
"justify-items": [{ "justify-items": [...scaleAlignSecondaryAxis(), "normal"] }],
|
|
2331
|
+
"justify-self": [{ "justify-self": ["auto", ...scaleAlignSecondaryAxis()] }],
|
|
2332
|
+
"align-content": [{ content: ["normal", ...scaleAlignPrimaryAxis()] }],
|
|
2333
|
+
"align-items": [{ items: [...scaleAlignSecondaryAxis(), { baseline: ["", "last"] }] }],
|
|
2334
|
+
"align-self": [{ self: [
|
|
2335
|
+
"auto",
|
|
2336
|
+
...scaleAlignSecondaryAxis(),
|
|
2337
|
+
{ baseline: ["", "last"] }
|
|
2338
|
+
] }],
|
|
2339
|
+
"place-content": [{ "place-content": scaleAlignPrimaryAxis() }],
|
|
2340
|
+
"place-items": [{ "place-items": [...scaleAlignSecondaryAxis(), "baseline"] }],
|
|
2341
|
+
"place-self": [{ "place-self": ["auto", ...scaleAlignSecondaryAxis()] }],
|
|
2342
|
+
p: [{ p: scaleUnambiguousSpacing() }],
|
|
2343
|
+
px: [{ px: scaleUnambiguousSpacing() }],
|
|
2344
|
+
py: [{ py: scaleUnambiguousSpacing() }],
|
|
2345
|
+
ps: [{ ps: scaleUnambiguousSpacing() }],
|
|
2346
|
+
pe: [{ pe: scaleUnambiguousSpacing() }],
|
|
2347
|
+
pt: [{ pt: scaleUnambiguousSpacing() }],
|
|
2348
|
+
pr: [{ pr: scaleUnambiguousSpacing() }],
|
|
2349
|
+
pb: [{ pb: scaleUnambiguousSpacing() }],
|
|
2350
|
+
pl: [{ pl: scaleUnambiguousSpacing() }],
|
|
2351
|
+
m: [{ m: scaleMargin() }],
|
|
2352
|
+
mx: [{ mx: scaleMargin() }],
|
|
2353
|
+
my: [{ my: scaleMargin() }],
|
|
2354
|
+
ms: [{ ms: scaleMargin() }],
|
|
2355
|
+
me: [{ me: scaleMargin() }],
|
|
2356
|
+
mt: [{ mt: scaleMargin() }],
|
|
2357
|
+
mr: [{ mr: scaleMargin() }],
|
|
2358
|
+
mb: [{ mb: scaleMargin() }],
|
|
2359
|
+
ml: [{ ml: scaleMargin() }],
|
|
2360
|
+
"space-x": [{ "space-x": scaleUnambiguousSpacing() }],
|
|
2361
|
+
"space-x-reverse": ["space-x-reverse"],
|
|
2362
|
+
"space-y": [{ "space-y": scaleUnambiguousSpacing() }],
|
|
2363
|
+
"space-y-reverse": ["space-y-reverse"],
|
|
2364
|
+
size: [{ size: scaleSizing() }],
|
|
2365
|
+
w: [{ w: [
|
|
2366
|
+
themeContainer,
|
|
2367
|
+
"screen",
|
|
2368
|
+
...scaleSizing()
|
|
2369
|
+
] }],
|
|
2370
|
+
"min-w": [{ "min-w": [
|
|
2371
|
+
themeContainer,
|
|
2372
|
+
"screen",
|
|
2373
|
+
"none",
|
|
2374
|
+
...scaleSizing()
|
|
2375
|
+
] }],
|
|
2376
|
+
"max-w": [{ "max-w": [
|
|
2377
|
+
themeContainer,
|
|
2378
|
+
"screen",
|
|
2379
|
+
"none",
|
|
2380
|
+
"prose",
|
|
2381
|
+
{ screen: [themeBreakpoint] },
|
|
2382
|
+
...scaleSizing()
|
|
2383
|
+
] }],
|
|
2384
|
+
h: [{ h: [
|
|
2385
|
+
"screen",
|
|
2386
|
+
"lh",
|
|
2387
|
+
...scaleSizing()
|
|
2388
|
+
] }],
|
|
2389
|
+
"min-h": [{ "min-h": [
|
|
2390
|
+
"screen",
|
|
2391
|
+
"lh",
|
|
2392
|
+
"none",
|
|
2393
|
+
...scaleSizing()
|
|
2394
|
+
] }],
|
|
2395
|
+
"max-h": [{ "max-h": [
|
|
2396
|
+
"screen",
|
|
2397
|
+
"lh",
|
|
2398
|
+
...scaleSizing()
|
|
2399
|
+
] }],
|
|
2400
|
+
"font-size": [{ text: [
|
|
2401
|
+
"base",
|
|
2402
|
+
themeText,
|
|
2403
|
+
isArbitraryVariableLength,
|
|
2404
|
+
isArbitraryLength
|
|
2405
|
+
] }],
|
|
2406
|
+
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
2407
|
+
"font-style": ["italic", "not-italic"],
|
|
2408
|
+
"font-weight": [{ font: [
|
|
2409
|
+
themeFontWeight,
|
|
2410
|
+
isArbitraryVariable,
|
|
2411
|
+
isArbitraryNumber
|
|
2412
|
+
] }],
|
|
2413
|
+
"font-stretch": [{ "font-stretch": [
|
|
2414
|
+
"ultra-condensed",
|
|
2415
|
+
"extra-condensed",
|
|
2416
|
+
"condensed",
|
|
2417
|
+
"semi-condensed",
|
|
2418
|
+
"normal",
|
|
2419
|
+
"semi-expanded",
|
|
2420
|
+
"expanded",
|
|
2421
|
+
"extra-expanded",
|
|
2422
|
+
"ultra-expanded",
|
|
2423
|
+
isPercent,
|
|
2424
|
+
isArbitraryValue
|
|
2425
|
+
] }],
|
|
2426
|
+
"font-family": [{ font: [
|
|
2427
|
+
isArbitraryVariableFamilyName,
|
|
2428
|
+
isArbitraryValue,
|
|
2429
|
+
themeFont
|
|
2430
|
+
] }],
|
|
2431
|
+
"fvn-normal": ["normal-nums"],
|
|
2432
|
+
"fvn-ordinal": ["ordinal"],
|
|
2433
|
+
"fvn-slashed-zero": ["slashed-zero"],
|
|
2434
|
+
"fvn-figure": ["lining-nums", "oldstyle-nums"],
|
|
2435
|
+
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
2436
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
2437
|
+
tracking: [{ tracking: [
|
|
2438
|
+
themeTracking,
|
|
2439
|
+
isArbitraryVariable,
|
|
2440
|
+
isArbitraryValue
|
|
2441
|
+
] }],
|
|
2442
|
+
"line-clamp": [{ "line-clamp": [
|
|
2443
|
+
isNumber,
|
|
2444
|
+
"none",
|
|
2445
|
+
isArbitraryVariable,
|
|
2446
|
+
isArbitraryNumber
|
|
2447
|
+
] }],
|
|
2448
|
+
leading: [{ leading: [themeLeading, ...scaleUnambiguousSpacing()] }],
|
|
2449
|
+
"list-image": [{ "list-image": [
|
|
2450
|
+
"none",
|
|
2451
|
+
isArbitraryVariable,
|
|
2452
|
+
isArbitraryValue
|
|
2453
|
+
] }],
|
|
2454
|
+
"list-style-position": [{ list: ["inside", "outside"] }],
|
|
2455
|
+
"list-style-type": [{ list: [
|
|
2456
|
+
"disc",
|
|
2457
|
+
"decimal",
|
|
2458
|
+
"none",
|
|
2459
|
+
isArbitraryVariable,
|
|
2460
|
+
isArbitraryValue
|
|
2461
|
+
] }],
|
|
2462
|
+
"text-alignment": [{ text: [
|
|
2463
|
+
"left",
|
|
2464
|
+
"center",
|
|
2465
|
+
"right",
|
|
2466
|
+
"justify",
|
|
2467
|
+
"start",
|
|
2468
|
+
"end"
|
|
2469
|
+
] }],
|
|
2470
|
+
"placeholder-color": [{ placeholder: scaleColor() }],
|
|
2471
|
+
"text-color": [{ text: scaleColor() }],
|
|
2472
|
+
"text-decoration": [
|
|
2473
|
+
"underline",
|
|
2474
|
+
"overline",
|
|
2475
|
+
"line-through",
|
|
2476
|
+
"no-underline"
|
|
2477
|
+
],
|
|
2478
|
+
"text-decoration-style": [{ decoration: [...scaleLineStyle(), "wavy"] }],
|
|
2479
|
+
"text-decoration-thickness": [{ decoration: [
|
|
2480
|
+
isNumber,
|
|
2481
|
+
"from-font",
|
|
2482
|
+
"auto",
|
|
2483
|
+
isArbitraryVariable,
|
|
2484
|
+
isArbitraryLength
|
|
2485
|
+
] }],
|
|
2486
|
+
"text-decoration-color": [{ decoration: scaleColor() }],
|
|
2487
|
+
"underline-offset": [{ "underline-offset": [
|
|
2488
|
+
isNumber,
|
|
2489
|
+
"auto",
|
|
2490
|
+
isArbitraryVariable,
|
|
2491
|
+
isArbitraryValue
|
|
2492
|
+
] }],
|
|
2493
|
+
"text-transform": [
|
|
2494
|
+
"uppercase",
|
|
2495
|
+
"lowercase",
|
|
2496
|
+
"capitalize",
|
|
2497
|
+
"normal-case"
|
|
2498
|
+
],
|
|
2499
|
+
"text-overflow": [
|
|
2500
|
+
"truncate",
|
|
2501
|
+
"text-ellipsis",
|
|
2502
|
+
"text-clip"
|
|
2503
|
+
],
|
|
2504
|
+
"text-wrap": [{ text: [
|
|
2505
|
+
"wrap",
|
|
2506
|
+
"nowrap",
|
|
2507
|
+
"balance",
|
|
2508
|
+
"pretty"
|
|
2509
|
+
] }],
|
|
2510
|
+
indent: [{ indent: scaleUnambiguousSpacing() }],
|
|
2511
|
+
"vertical-align": [{ align: [
|
|
2512
|
+
"baseline",
|
|
2513
|
+
"top",
|
|
2514
|
+
"middle",
|
|
2515
|
+
"bottom",
|
|
2516
|
+
"text-top",
|
|
2517
|
+
"text-bottom",
|
|
2518
|
+
"sub",
|
|
2519
|
+
"super",
|
|
2520
|
+
isArbitraryVariable,
|
|
2521
|
+
isArbitraryValue
|
|
2522
|
+
] }],
|
|
2523
|
+
whitespace: [{ whitespace: [
|
|
2524
|
+
"normal",
|
|
2525
|
+
"nowrap",
|
|
2526
|
+
"pre",
|
|
2527
|
+
"pre-line",
|
|
2528
|
+
"pre-wrap",
|
|
2529
|
+
"break-spaces"
|
|
2530
|
+
] }],
|
|
2531
|
+
break: [{ break: [
|
|
2532
|
+
"normal",
|
|
2533
|
+
"words",
|
|
2534
|
+
"all",
|
|
2535
|
+
"keep"
|
|
2536
|
+
] }],
|
|
2537
|
+
wrap: [{ wrap: [
|
|
2538
|
+
"break-word",
|
|
2539
|
+
"anywhere",
|
|
2540
|
+
"normal"
|
|
2541
|
+
] }],
|
|
2542
|
+
hyphens: [{ hyphens: [
|
|
2543
|
+
"none",
|
|
2544
|
+
"manual",
|
|
2545
|
+
"auto"
|
|
2546
|
+
] }],
|
|
2547
|
+
content: [{ content: [
|
|
2548
|
+
"none",
|
|
2549
|
+
isArbitraryVariable,
|
|
2550
|
+
isArbitraryValue
|
|
2551
|
+
] }],
|
|
2552
|
+
"bg-attachment": [{ bg: [
|
|
2553
|
+
"fixed",
|
|
2554
|
+
"local",
|
|
2555
|
+
"scroll"
|
|
2556
|
+
] }],
|
|
2557
|
+
"bg-clip": [{ "bg-clip": [
|
|
2558
|
+
"border",
|
|
2559
|
+
"padding",
|
|
2560
|
+
"content",
|
|
2561
|
+
"text"
|
|
2562
|
+
] }],
|
|
2563
|
+
"bg-origin": [{ "bg-origin": [
|
|
2564
|
+
"border",
|
|
2565
|
+
"padding",
|
|
2566
|
+
"content"
|
|
2567
|
+
] }],
|
|
2568
|
+
"bg-position": [{ bg: scaleBgPosition() }],
|
|
2569
|
+
"bg-repeat": [{ bg: scaleBgRepeat() }],
|
|
2570
|
+
"bg-size": [{ bg: scaleBgSize() }],
|
|
2571
|
+
"bg-image": [{ bg: [
|
|
2572
|
+
"none",
|
|
2573
|
+
{
|
|
2574
|
+
linear: [
|
|
2575
|
+
{ to: [
|
|
2576
|
+
"t",
|
|
2577
|
+
"tr",
|
|
2578
|
+
"r",
|
|
2579
|
+
"br",
|
|
2580
|
+
"b",
|
|
2581
|
+
"bl",
|
|
2582
|
+
"l",
|
|
2583
|
+
"tl"
|
|
2584
|
+
] },
|
|
2585
|
+
isInteger,
|
|
2586
|
+
isArbitraryVariable,
|
|
2587
|
+
isArbitraryValue
|
|
2588
|
+
],
|
|
2589
|
+
radial: [
|
|
2590
|
+
"",
|
|
2591
|
+
isArbitraryVariable,
|
|
2592
|
+
isArbitraryValue
|
|
2593
|
+
],
|
|
2594
|
+
conic: [
|
|
2595
|
+
isInteger,
|
|
2596
|
+
isArbitraryVariable,
|
|
2597
|
+
isArbitraryValue
|
|
2598
|
+
]
|
|
2599
|
+
},
|
|
2600
|
+
isArbitraryVariableImage,
|
|
2601
|
+
isArbitraryImage
|
|
2602
|
+
] }],
|
|
2603
|
+
"bg-color": [{ bg: scaleColor() }],
|
|
2604
|
+
"gradient-from-pos": [{ from: scaleGradientStopPosition() }],
|
|
2605
|
+
"gradient-via-pos": [{ via: scaleGradientStopPosition() }],
|
|
2606
|
+
"gradient-to-pos": [{ to: scaleGradientStopPosition() }],
|
|
2607
|
+
"gradient-from": [{ from: scaleColor() }],
|
|
2608
|
+
"gradient-via": [{ via: scaleColor() }],
|
|
2609
|
+
"gradient-to": [{ to: scaleColor() }],
|
|
2610
|
+
rounded: [{ rounded: scaleRadius() }],
|
|
2611
|
+
"rounded-s": [{ "rounded-s": scaleRadius() }],
|
|
2612
|
+
"rounded-e": [{ "rounded-e": scaleRadius() }],
|
|
2613
|
+
"rounded-t": [{ "rounded-t": scaleRadius() }],
|
|
2614
|
+
"rounded-r": [{ "rounded-r": scaleRadius() }],
|
|
2615
|
+
"rounded-b": [{ "rounded-b": scaleRadius() }],
|
|
2616
|
+
"rounded-l": [{ "rounded-l": scaleRadius() }],
|
|
2617
|
+
"rounded-ss": [{ "rounded-ss": scaleRadius() }],
|
|
2618
|
+
"rounded-se": [{ "rounded-se": scaleRadius() }],
|
|
2619
|
+
"rounded-ee": [{ "rounded-ee": scaleRadius() }],
|
|
2620
|
+
"rounded-es": [{ "rounded-es": scaleRadius() }],
|
|
2621
|
+
"rounded-tl": [{ "rounded-tl": scaleRadius() }],
|
|
2622
|
+
"rounded-tr": [{ "rounded-tr": scaleRadius() }],
|
|
2623
|
+
"rounded-br": [{ "rounded-br": scaleRadius() }],
|
|
2624
|
+
"rounded-bl": [{ "rounded-bl": scaleRadius() }],
|
|
2625
|
+
"border-w": [{ border: scaleBorderWidth() }],
|
|
2626
|
+
"border-w-x": [{ "border-x": scaleBorderWidth() }],
|
|
2627
|
+
"border-w-y": [{ "border-y": scaleBorderWidth() }],
|
|
2628
|
+
"border-w-s": [{ "border-s": scaleBorderWidth() }],
|
|
2629
|
+
"border-w-e": [{ "border-e": scaleBorderWidth() }],
|
|
2630
|
+
"border-w-t": [{ "border-t": scaleBorderWidth() }],
|
|
2631
|
+
"border-w-r": [{ "border-r": scaleBorderWidth() }],
|
|
2632
|
+
"border-w-b": [{ "border-b": scaleBorderWidth() }],
|
|
2633
|
+
"border-w-l": [{ "border-l": scaleBorderWidth() }],
|
|
2634
|
+
"divide-x": [{ "divide-x": scaleBorderWidth() }],
|
|
2635
|
+
"divide-x-reverse": ["divide-x-reverse"],
|
|
2636
|
+
"divide-y": [{ "divide-y": scaleBorderWidth() }],
|
|
2637
|
+
"divide-y-reverse": ["divide-y-reverse"],
|
|
2638
|
+
"border-style": [{ border: [
|
|
2639
|
+
...scaleLineStyle(),
|
|
2640
|
+
"hidden",
|
|
2641
|
+
"none"
|
|
2642
|
+
] }],
|
|
2643
|
+
"divide-style": [{ divide: [
|
|
2644
|
+
...scaleLineStyle(),
|
|
2645
|
+
"hidden",
|
|
2646
|
+
"none"
|
|
2647
|
+
] }],
|
|
2648
|
+
"border-color": [{ border: scaleColor() }],
|
|
2649
|
+
"border-color-x": [{ "border-x": scaleColor() }],
|
|
2650
|
+
"border-color-y": [{ "border-y": scaleColor() }],
|
|
2651
|
+
"border-color-s": [{ "border-s": scaleColor() }],
|
|
2652
|
+
"border-color-e": [{ "border-e": scaleColor() }],
|
|
2653
|
+
"border-color-t": [{ "border-t": scaleColor() }],
|
|
2654
|
+
"border-color-r": [{ "border-r": scaleColor() }],
|
|
2655
|
+
"border-color-b": [{ "border-b": scaleColor() }],
|
|
2656
|
+
"border-color-l": [{ "border-l": scaleColor() }],
|
|
2657
|
+
"divide-color": [{ divide: scaleColor() }],
|
|
2658
|
+
"outline-style": [{ outline: [
|
|
2659
|
+
...scaleLineStyle(),
|
|
2660
|
+
"none",
|
|
2661
|
+
"hidden"
|
|
2662
|
+
] }],
|
|
2663
|
+
"outline-offset": [{ "outline-offset": [
|
|
2664
|
+
isNumber,
|
|
2665
|
+
isArbitraryVariable,
|
|
2666
|
+
isArbitraryValue
|
|
2667
|
+
] }],
|
|
2668
|
+
"outline-w": [{ outline: [
|
|
2669
|
+
"",
|
|
2670
|
+
isNumber,
|
|
2671
|
+
isArbitraryVariableLength,
|
|
2672
|
+
isArbitraryLength
|
|
2673
|
+
] }],
|
|
2674
|
+
"outline-color": [{ outline: scaleColor() }],
|
|
2675
|
+
shadow: [{ shadow: [
|
|
2676
|
+
"",
|
|
2677
|
+
"none",
|
|
2678
|
+
themeShadow,
|
|
2679
|
+
isArbitraryVariableShadow,
|
|
2680
|
+
isArbitraryShadow
|
|
2681
|
+
] }],
|
|
2682
|
+
"shadow-color": [{ shadow: scaleColor() }],
|
|
2683
|
+
"inset-shadow": [{ "inset-shadow": [
|
|
2684
|
+
"none",
|
|
2685
|
+
themeInsetShadow,
|
|
2686
|
+
isArbitraryVariableShadow,
|
|
2687
|
+
isArbitraryShadow
|
|
2688
|
+
] }],
|
|
2689
|
+
"inset-shadow-color": [{ "inset-shadow": scaleColor() }],
|
|
2690
|
+
"ring-w": [{ ring: scaleBorderWidth() }],
|
|
2691
|
+
"ring-w-inset": ["ring-inset"],
|
|
2692
|
+
"ring-color": [{ ring: scaleColor() }],
|
|
2693
|
+
"ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
|
|
2694
|
+
"ring-offset-color": [{ "ring-offset": scaleColor() }],
|
|
2695
|
+
"inset-ring-w": [{ "inset-ring": scaleBorderWidth() }],
|
|
2696
|
+
"inset-ring-color": [{ "inset-ring": scaleColor() }],
|
|
2697
|
+
"text-shadow": [{ "text-shadow": [
|
|
2698
|
+
"none",
|
|
2699
|
+
themeTextShadow,
|
|
2700
|
+
isArbitraryVariableShadow,
|
|
2701
|
+
isArbitraryShadow
|
|
2702
|
+
] }],
|
|
2703
|
+
"text-shadow-color": [{ "text-shadow": scaleColor() }],
|
|
2704
|
+
opacity: [{ opacity: [
|
|
2705
|
+
isNumber,
|
|
2706
|
+
isArbitraryVariable,
|
|
2707
|
+
isArbitraryValue
|
|
2708
|
+
] }],
|
|
2709
|
+
"mix-blend": [{ "mix-blend": [
|
|
2710
|
+
...scaleBlendMode(),
|
|
2711
|
+
"plus-darker",
|
|
2712
|
+
"plus-lighter"
|
|
2713
|
+
] }],
|
|
2714
|
+
"bg-blend": [{ "bg-blend": scaleBlendMode() }],
|
|
2715
|
+
"mask-clip": [{ "mask-clip": [
|
|
2716
|
+
"border",
|
|
2717
|
+
"padding",
|
|
2718
|
+
"content",
|
|
2719
|
+
"fill",
|
|
2720
|
+
"stroke",
|
|
2721
|
+
"view"
|
|
2722
|
+
] }, "mask-no-clip"],
|
|
2723
|
+
"mask-composite": [{ mask: [
|
|
2724
|
+
"add",
|
|
2725
|
+
"subtract",
|
|
2726
|
+
"intersect",
|
|
2727
|
+
"exclude"
|
|
2728
|
+
] }],
|
|
2729
|
+
"mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
|
|
2730
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": scaleMaskImagePosition() }],
|
|
2731
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": scaleMaskImagePosition() }],
|
|
2732
|
+
"mask-image-linear-from-color": [{ "mask-linear-from": scaleColor() }],
|
|
2733
|
+
"mask-image-linear-to-color": [{ "mask-linear-to": scaleColor() }],
|
|
2734
|
+
"mask-image-t-from-pos": [{ "mask-t-from": scaleMaskImagePosition() }],
|
|
2735
|
+
"mask-image-t-to-pos": [{ "mask-t-to": scaleMaskImagePosition() }],
|
|
2736
|
+
"mask-image-t-from-color": [{ "mask-t-from": scaleColor() }],
|
|
2737
|
+
"mask-image-t-to-color": [{ "mask-t-to": scaleColor() }],
|
|
2738
|
+
"mask-image-r-from-pos": [{ "mask-r-from": scaleMaskImagePosition() }],
|
|
2739
|
+
"mask-image-r-to-pos": [{ "mask-r-to": scaleMaskImagePosition() }],
|
|
2740
|
+
"mask-image-r-from-color": [{ "mask-r-from": scaleColor() }],
|
|
2741
|
+
"mask-image-r-to-color": [{ "mask-r-to": scaleColor() }],
|
|
2742
|
+
"mask-image-b-from-pos": [{ "mask-b-from": scaleMaskImagePosition() }],
|
|
2743
|
+
"mask-image-b-to-pos": [{ "mask-b-to": scaleMaskImagePosition() }],
|
|
2744
|
+
"mask-image-b-from-color": [{ "mask-b-from": scaleColor() }],
|
|
2745
|
+
"mask-image-b-to-color": [{ "mask-b-to": scaleColor() }],
|
|
2746
|
+
"mask-image-l-from-pos": [{ "mask-l-from": scaleMaskImagePosition() }],
|
|
2747
|
+
"mask-image-l-to-pos": [{ "mask-l-to": scaleMaskImagePosition() }],
|
|
2748
|
+
"mask-image-l-from-color": [{ "mask-l-from": scaleColor() }],
|
|
2749
|
+
"mask-image-l-to-color": [{ "mask-l-to": scaleColor() }],
|
|
2750
|
+
"mask-image-x-from-pos": [{ "mask-x-from": scaleMaskImagePosition() }],
|
|
2751
|
+
"mask-image-x-to-pos": [{ "mask-x-to": scaleMaskImagePosition() }],
|
|
2752
|
+
"mask-image-x-from-color": [{ "mask-x-from": scaleColor() }],
|
|
2753
|
+
"mask-image-x-to-color": [{ "mask-x-to": scaleColor() }],
|
|
2754
|
+
"mask-image-y-from-pos": [{ "mask-y-from": scaleMaskImagePosition() }],
|
|
2755
|
+
"mask-image-y-to-pos": [{ "mask-y-to": scaleMaskImagePosition() }],
|
|
2756
|
+
"mask-image-y-from-color": [{ "mask-y-from": scaleColor() }],
|
|
2757
|
+
"mask-image-y-to-color": [{ "mask-y-to": scaleColor() }],
|
|
2758
|
+
"mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
|
|
2759
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": scaleMaskImagePosition() }],
|
|
2760
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": scaleMaskImagePosition() }],
|
|
2761
|
+
"mask-image-radial-from-color": [{ "mask-radial-from": scaleColor() }],
|
|
2762
|
+
"mask-image-radial-to-color": [{ "mask-radial-to": scaleColor() }],
|
|
2763
|
+
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
2764
|
+
"mask-image-radial-size": [{ "mask-radial": [{
|
|
2765
|
+
closest: ["side", "corner"],
|
|
2766
|
+
farthest: ["side", "corner"]
|
|
2767
|
+
}] }],
|
|
2768
|
+
"mask-image-radial-pos": [{ "mask-radial-at": scalePosition() }],
|
|
2769
|
+
"mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
|
|
2770
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": scaleMaskImagePosition() }],
|
|
2771
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": scaleMaskImagePosition() }],
|
|
2772
|
+
"mask-image-conic-from-color": [{ "mask-conic-from": scaleColor() }],
|
|
2773
|
+
"mask-image-conic-to-color": [{ "mask-conic-to": scaleColor() }],
|
|
2774
|
+
"mask-mode": [{ mask: [
|
|
2775
|
+
"alpha",
|
|
2776
|
+
"luminance",
|
|
2777
|
+
"match"
|
|
2778
|
+
] }],
|
|
2779
|
+
"mask-origin": [{ "mask-origin": [
|
|
2780
|
+
"border",
|
|
2781
|
+
"padding",
|
|
2782
|
+
"content",
|
|
2783
|
+
"fill",
|
|
2784
|
+
"stroke",
|
|
2785
|
+
"view"
|
|
2786
|
+
] }],
|
|
2787
|
+
"mask-position": [{ mask: scaleBgPosition() }],
|
|
2788
|
+
"mask-repeat": [{ mask: scaleBgRepeat() }],
|
|
2789
|
+
"mask-size": [{ mask: scaleBgSize() }],
|
|
2790
|
+
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
2791
|
+
"mask-image": [{ mask: [
|
|
2792
|
+
"none",
|
|
2793
|
+
isArbitraryVariable,
|
|
2794
|
+
isArbitraryValue
|
|
2795
|
+
] }],
|
|
2796
|
+
filter: [{ filter: [
|
|
2797
|
+
"",
|
|
2798
|
+
"none",
|
|
2799
|
+
isArbitraryVariable,
|
|
2800
|
+
isArbitraryValue
|
|
2801
|
+
] }],
|
|
2802
|
+
blur: [{ blur: scaleBlur() }],
|
|
2803
|
+
brightness: [{ brightness: [
|
|
2804
|
+
isNumber,
|
|
2805
|
+
isArbitraryVariable,
|
|
2806
|
+
isArbitraryValue
|
|
2807
|
+
] }],
|
|
2808
|
+
contrast: [{ contrast: [
|
|
2809
|
+
isNumber,
|
|
2810
|
+
isArbitraryVariable,
|
|
2811
|
+
isArbitraryValue
|
|
2812
|
+
] }],
|
|
2813
|
+
"drop-shadow": [{ "drop-shadow": [
|
|
2814
|
+
"",
|
|
2815
|
+
"none",
|
|
2816
|
+
themeDropShadow,
|
|
2817
|
+
isArbitraryVariableShadow,
|
|
2818
|
+
isArbitraryShadow
|
|
2819
|
+
] }],
|
|
2820
|
+
"drop-shadow-color": [{ "drop-shadow": scaleColor() }],
|
|
2821
|
+
grayscale: [{ grayscale: [
|
|
2822
|
+
"",
|
|
2823
|
+
isNumber,
|
|
2824
|
+
isArbitraryVariable,
|
|
2825
|
+
isArbitraryValue
|
|
2826
|
+
] }],
|
|
2827
|
+
"hue-rotate": [{ "hue-rotate": [
|
|
2828
|
+
isNumber,
|
|
2829
|
+
isArbitraryVariable,
|
|
2830
|
+
isArbitraryValue
|
|
2831
|
+
] }],
|
|
2832
|
+
invert: [{ invert: [
|
|
2833
|
+
"",
|
|
2834
|
+
isNumber,
|
|
2835
|
+
isArbitraryVariable,
|
|
2836
|
+
isArbitraryValue
|
|
2837
|
+
] }],
|
|
2838
|
+
saturate: [{ saturate: [
|
|
2839
|
+
isNumber,
|
|
2840
|
+
isArbitraryVariable,
|
|
2841
|
+
isArbitraryValue
|
|
2842
|
+
] }],
|
|
2843
|
+
sepia: [{ sepia: [
|
|
2844
|
+
"",
|
|
2845
|
+
isNumber,
|
|
2846
|
+
isArbitraryVariable,
|
|
2847
|
+
isArbitraryValue
|
|
2848
|
+
] }],
|
|
2849
|
+
"backdrop-filter": [{ "backdrop-filter": [
|
|
2850
|
+
"",
|
|
2851
|
+
"none",
|
|
2852
|
+
isArbitraryVariable,
|
|
2853
|
+
isArbitraryValue
|
|
2854
|
+
] }],
|
|
2855
|
+
"backdrop-blur": [{ "backdrop-blur": scaleBlur() }],
|
|
2856
|
+
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
2857
|
+
isNumber,
|
|
2858
|
+
isArbitraryVariable,
|
|
2859
|
+
isArbitraryValue
|
|
2860
|
+
] }],
|
|
2861
|
+
"backdrop-contrast": [{ "backdrop-contrast": [
|
|
2862
|
+
isNumber,
|
|
2863
|
+
isArbitraryVariable,
|
|
2864
|
+
isArbitraryValue
|
|
2865
|
+
] }],
|
|
2866
|
+
"backdrop-grayscale": [{ "backdrop-grayscale": [
|
|
2867
|
+
"",
|
|
2868
|
+
isNumber,
|
|
2869
|
+
isArbitraryVariable,
|
|
2870
|
+
isArbitraryValue
|
|
2871
|
+
] }],
|
|
2872
|
+
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
|
|
2873
|
+
isNumber,
|
|
2874
|
+
isArbitraryVariable,
|
|
2875
|
+
isArbitraryValue
|
|
2876
|
+
] }],
|
|
2877
|
+
"backdrop-invert": [{ "backdrop-invert": [
|
|
2878
|
+
"",
|
|
2879
|
+
isNumber,
|
|
2880
|
+
isArbitraryVariable,
|
|
2881
|
+
isArbitraryValue
|
|
2882
|
+
] }],
|
|
2883
|
+
"backdrop-opacity": [{ "backdrop-opacity": [
|
|
2884
|
+
isNumber,
|
|
2885
|
+
isArbitraryVariable,
|
|
2886
|
+
isArbitraryValue
|
|
2887
|
+
] }],
|
|
2888
|
+
"backdrop-saturate": [{ "backdrop-saturate": [
|
|
2889
|
+
isNumber,
|
|
2890
|
+
isArbitraryVariable,
|
|
2891
|
+
isArbitraryValue
|
|
2892
|
+
] }],
|
|
2893
|
+
"backdrop-sepia": [{ "backdrop-sepia": [
|
|
2894
|
+
"",
|
|
2895
|
+
isNumber,
|
|
2896
|
+
isArbitraryVariable,
|
|
2897
|
+
isArbitraryValue
|
|
2898
|
+
] }],
|
|
2899
|
+
"border-collapse": [{ border: ["collapse", "separate"] }],
|
|
2900
|
+
"border-spacing": [{ "border-spacing": scaleUnambiguousSpacing() }],
|
|
2901
|
+
"border-spacing-x": [{ "border-spacing-x": scaleUnambiguousSpacing() }],
|
|
2902
|
+
"border-spacing-y": [{ "border-spacing-y": scaleUnambiguousSpacing() }],
|
|
2903
|
+
"table-layout": [{ table: ["auto", "fixed"] }],
|
|
2904
|
+
caption: [{ caption: ["top", "bottom"] }],
|
|
2905
|
+
transition: [{ transition: [
|
|
2906
|
+
"",
|
|
2907
|
+
"all",
|
|
2908
|
+
"colors",
|
|
2909
|
+
"opacity",
|
|
2910
|
+
"shadow",
|
|
2911
|
+
"transform",
|
|
2912
|
+
"none",
|
|
2913
|
+
isArbitraryVariable,
|
|
2914
|
+
isArbitraryValue
|
|
2915
|
+
] }],
|
|
2916
|
+
"transition-behavior": [{ transition: ["normal", "discrete"] }],
|
|
2917
|
+
duration: [{ duration: [
|
|
2918
|
+
isNumber,
|
|
2919
|
+
"initial",
|
|
2920
|
+
isArbitraryVariable,
|
|
2921
|
+
isArbitraryValue
|
|
2922
|
+
] }],
|
|
2923
|
+
ease: [{ ease: [
|
|
2924
|
+
"linear",
|
|
2925
|
+
"initial",
|
|
2926
|
+
themeEase,
|
|
2927
|
+
isArbitraryVariable,
|
|
2928
|
+
isArbitraryValue
|
|
2929
|
+
] }],
|
|
2930
|
+
delay: [{ delay: [
|
|
2931
|
+
isNumber,
|
|
2932
|
+
isArbitraryVariable,
|
|
2933
|
+
isArbitraryValue
|
|
2934
|
+
] }],
|
|
2935
|
+
animate: [{ animate: [
|
|
2936
|
+
"none",
|
|
2937
|
+
themeAnimate,
|
|
2938
|
+
isArbitraryVariable,
|
|
2939
|
+
isArbitraryValue
|
|
2940
|
+
] }],
|
|
2941
|
+
backface: [{ backface: ["hidden", "visible"] }],
|
|
2942
|
+
perspective: [{ perspective: [
|
|
2943
|
+
themePerspective,
|
|
2944
|
+
isArbitraryVariable,
|
|
2945
|
+
isArbitraryValue
|
|
2946
|
+
] }],
|
|
2947
|
+
"perspective-origin": [{ "perspective-origin": scalePositionWithArbitrary() }],
|
|
2948
|
+
rotate: [{ rotate: scaleRotate() }],
|
|
2949
|
+
"rotate-x": [{ "rotate-x": scaleRotate() }],
|
|
2950
|
+
"rotate-y": [{ "rotate-y": scaleRotate() }],
|
|
2951
|
+
"rotate-z": [{ "rotate-z": scaleRotate() }],
|
|
2952
|
+
scale: [{ scale: scaleScale() }],
|
|
2953
|
+
"scale-x": [{ "scale-x": scaleScale() }],
|
|
2954
|
+
"scale-y": [{ "scale-y": scaleScale() }],
|
|
2955
|
+
"scale-z": [{ "scale-z": scaleScale() }],
|
|
2956
|
+
"scale-3d": ["scale-3d"],
|
|
2957
|
+
skew: [{ skew: scaleSkew() }],
|
|
2958
|
+
"skew-x": [{ "skew-x": scaleSkew() }],
|
|
2959
|
+
"skew-y": [{ "skew-y": scaleSkew() }],
|
|
2960
|
+
transform: [{ transform: [
|
|
2961
|
+
isArbitraryVariable,
|
|
2962
|
+
isArbitraryValue,
|
|
2963
|
+
"",
|
|
2964
|
+
"none",
|
|
2965
|
+
"gpu",
|
|
2966
|
+
"cpu"
|
|
2967
|
+
] }],
|
|
2968
|
+
"transform-origin": [{ origin: scalePositionWithArbitrary() }],
|
|
2969
|
+
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
2970
|
+
translate: [{ translate: scaleTranslate() }],
|
|
2971
|
+
"translate-x": [{ "translate-x": scaleTranslate() }],
|
|
2972
|
+
"translate-y": [{ "translate-y": scaleTranslate() }],
|
|
2973
|
+
"translate-z": [{ "translate-z": scaleTranslate() }],
|
|
2974
|
+
"translate-none": ["translate-none"],
|
|
2975
|
+
accent: [{ accent: scaleColor() }],
|
|
2976
|
+
appearance: [{ appearance: ["none", "auto"] }],
|
|
2977
|
+
"caret-color": [{ caret: scaleColor() }],
|
|
2978
|
+
"color-scheme": [{ scheme: [
|
|
2979
|
+
"normal",
|
|
2980
|
+
"dark",
|
|
2981
|
+
"light",
|
|
2982
|
+
"light-dark",
|
|
2983
|
+
"only-dark",
|
|
2984
|
+
"only-light"
|
|
2985
|
+
] }],
|
|
2986
|
+
cursor: [{ cursor: [
|
|
2987
|
+
"auto",
|
|
2988
|
+
"default",
|
|
2989
|
+
"pointer",
|
|
2990
|
+
"wait",
|
|
2991
|
+
"text",
|
|
2992
|
+
"move",
|
|
2993
|
+
"help",
|
|
2994
|
+
"not-allowed",
|
|
2995
|
+
"none",
|
|
2996
|
+
"context-menu",
|
|
2997
|
+
"progress",
|
|
2998
|
+
"cell",
|
|
2999
|
+
"crosshair",
|
|
3000
|
+
"vertical-text",
|
|
3001
|
+
"alias",
|
|
3002
|
+
"copy",
|
|
3003
|
+
"no-drop",
|
|
3004
|
+
"grab",
|
|
3005
|
+
"grabbing",
|
|
3006
|
+
"all-scroll",
|
|
3007
|
+
"col-resize",
|
|
3008
|
+
"row-resize",
|
|
3009
|
+
"n-resize",
|
|
3010
|
+
"e-resize",
|
|
3011
|
+
"s-resize",
|
|
3012
|
+
"w-resize",
|
|
3013
|
+
"ne-resize",
|
|
3014
|
+
"nw-resize",
|
|
3015
|
+
"se-resize",
|
|
3016
|
+
"sw-resize",
|
|
3017
|
+
"ew-resize",
|
|
3018
|
+
"ns-resize",
|
|
3019
|
+
"nesw-resize",
|
|
3020
|
+
"nwse-resize",
|
|
3021
|
+
"zoom-in",
|
|
3022
|
+
"zoom-out",
|
|
3023
|
+
isArbitraryVariable,
|
|
3024
|
+
isArbitraryValue
|
|
3025
|
+
] }],
|
|
3026
|
+
"field-sizing": [{ "field-sizing": ["fixed", "content"] }],
|
|
3027
|
+
"pointer-events": [{ "pointer-events": ["auto", "none"] }],
|
|
3028
|
+
resize: [{ resize: [
|
|
3029
|
+
"none",
|
|
3030
|
+
"",
|
|
3031
|
+
"y",
|
|
3032
|
+
"x"
|
|
3033
|
+
] }],
|
|
3034
|
+
"scroll-behavior": [{ scroll: ["auto", "smooth"] }],
|
|
3035
|
+
"scroll-m": [{ "scroll-m": scaleUnambiguousSpacing() }],
|
|
3036
|
+
"scroll-mx": [{ "scroll-mx": scaleUnambiguousSpacing() }],
|
|
3037
|
+
"scroll-my": [{ "scroll-my": scaleUnambiguousSpacing() }],
|
|
3038
|
+
"scroll-ms": [{ "scroll-ms": scaleUnambiguousSpacing() }],
|
|
3039
|
+
"scroll-me": [{ "scroll-me": scaleUnambiguousSpacing() }],
|
|
3040
|
+
"scroll-mt": [{ "scroll-mt": scaleUnambiguousSpacing() }],
|
|
3041
|
+
"scroll-mr": [{ "scroll-mr": scaleUnambiguousSpacing() }],
|
|
3042
|
+
"scroll-mb": [{ "scroll-mb": scaleUnambiguousSpacing() }],
|
|
3043
|
+
"scroll-ml": [{ "scroll-ml": scaleUnambiguousSpacing() }],
|
|
3044
|
+
"scroll-p": [{ "scroll-p": scaleUnambiguousSpacing() }],
|
|
3045
|
+
"scroll-px": [{ "scroll-px": scaleUnambiguousSpacing() }],
|
|
3046
|
+
"scroll-py": [{ "scroll-py": scaleUnambiguousSpacing() }],
|
|
3047
|
+
"scroll-ps": [{ "scroll-ps": scaleUnambiguousSpacing() }],
|
|
3048
|
+
"scroll-pe": [{ "scroll-pe": scaleUnambiguousSpacing() }],
|
|
3049
|
+
"scroll-pt": [{ "scroll-pt": scaleUnambiguousSpacing() }],
|
|
3050
|
+
"scroll-pr": [{ "scroll-pr": scaleUnambiguousSpacing() }],
|
|
3051
|
+
"scroll-pb": [{ "scroll-pb": scaleUnambiguousSpacing() }],
|
|
3052
|
+
"scroll-pl": [{ "scroll-pl": scaleUnambiguousSpacing() }],
|
|
3053
|
+
"snap-align": [{ snap: [
|
|
3054
|
+
"start",
|
|
3055
|
+
"end",
|
|
3056
|
+
"center",
|
|
3057
|
+
"align-none"
|
|
3058
|
+
] }],
|
|
3059
|
+
"snap-stop": [{ snap: ["normal", "always"] }],
|
|
3060
|
+
"snap-type": [{ snap: [
|
|
3061
|
+
"none",
|
|
3062
|
+
"x",
|
|
3063
|
+
"y",
|
|
3064
|
+
"both"
|
|
3065
|
+
] }],
|
|
3066
|
+
"snap-strictness": [{ snap: ["mandatory", "proximity"] }],
|
|
3067
|
+
touch: [{ touch: [
|
|
3068
|
+
"auto",
|
|
3069
|
+
"none",
|
|
3070
|
+
"manipulation"
|
|
3071
|
+
] }],
|
|
3072
|
+
"touch-x": [{ "touch-pan": [
|
|
3073
|
+
"x",
|
|
3074
|
+
"left",
|
|
3075
|
+
"right"
|
|
3076
|
+
] }],
|
|
3077
|
+
"touch-y": [{ "touch-pan": [
|
|
3078
|
+
"y",
|
|
3079
|
+
"up",
|
|
3080
|
+
"down"
|
|
3081
|
+
] }],
|
|
3082
|
+
"touch-pz": ["touch-pinch-zoom"],
|
|
3083
|
+
select: [{ select: [
|
|
3084
|
+
"none",
|
|
3085
|
+
"text",
|
|
3086
|
+
"all",
|
|
3087
|
+
"auto"
|
|
3088
|
+
] }],
|
|
3089
|
+
"will-change": [{ "will-change": [
|
|
3090
|
+
"auto",
|
|
3091
|
+
"scroll",
|
|
3092
|
+
"contents",
|
|
3093
|
+
"transform",
|
|
3094
|
+
isArbitraryVariable,
|
|
3095
|
+
isArbitraryValue
|
|
3096
|
+
] }],
|
|
3097
|
+
fill: [{ fill: ["none", ...scaleColor()] }],
|
|
3098
|
+
"stroke-w": [{ stroke: [
|
|
3099
|
+
isNumber,
|
|
3100
|
+
isArbitraryVariableLength,
|
|
3101
|
+
isArbitraryLength,
|
|
3102
|
+
isArbitraryNumber
|
|
3103
|
+
] }],
|
|
3104
|
+
stroke: [{ stroke: ["none", ...scaleColor()] }],
|
|
3105
|
+
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
3106
|
+
},
|
|
3107
|
+
conflictingClassGroups: {
|
|
3108
|
+
overflow: ["overflow-x", "overflow-y"],
|
|
3109
|
+
overscroll: ["overscroll-x", "overscroll-y"],
|
|
3110
|
+
inset: [
|
|
3111
|
+
"inset-x",
|
|
3112
|
+
"inset-y",
|
|
3113
|
+
"start",
|
|
3114
|
+
"end",
|
|
3115
|
+
"top",
|
|
3116
|
+
"right",
|
|
3117
|
+
"bottom",
|
|
3118
|
+
"left"
|
|
3119
|
+
],
|
|
3120
|
+
"inset-x": ["right", "left"],
|
|
3121
|
+
"inset-y": ["top", "bottom"],
|
|
3122
|
+
flex: [
|
|
3123
|
+
"basis",
|
|
3124
|
+
"grow",
|
|
3125
|
+
"shrink"
|
|
3126
|
+
],
|
|
3127
|
+
gap: ["gap-x", "gap-y"],
|
|
3128
|
+
p: [
|
|
3129
|
+
"px",
|
|
3130
|
+
"py",
|
|
3131
|
+
"ps",
|
|
3132
|
+
"pe",
|
|
3133
|
+
"pt",
|
|
3134
|
+
"pr",
|
|
3135
|
+
"pb",
|
|
3136
|
+
"pl"
|
|
3137
|
+
],
|
|
3138
|
+
px: ["pr", "pl"],
|
|
3139
|
+
py: ["pt", "pb"],
|
|
3140
|
+
m: [
|
|
3141
|
+
"mx",
|
|
3142
|
+
"my",
|
|
3143
|
+
"ms",
|
|
3144
|
+
"me",
|
|
3145
|
+
"mt",
|
|
3146
|
+
"mr",
|
|
3147
|
+
"mb",
|
|
3148
|
+
"ml"
|
|
3149
|
+
],
|
|
3150
|
+
mx: ["mr", "ml"],
|
|
3151
|
+
my: ["mt", "mb"],
|
|
3152
|
+
size: ["w", "h"],
|
|
3153
|
+
"font-size": ["leading"],
|
|
3154
|
+
"fvn-normal": [
|
|
3155
|
+
"fvn-ordinal",
|
|
3156
|
+
"fvn-slashed-zero",
|
|
3157
|
+
"fvn-figure",
|
|
3158
|
+
"fvn-spacing",
|
|
3159
|
+
"fvn-fraction"
|
|
3160
|
+
],
|
|
3161
|
+
"fvn-ordinal": ["fvn-normal"],
|
|
3162
|
+
"fvn-slashed-zero": ["fvn-normal"],
|
|
3163
|
+
"fvn-figure": ["fvn-normal"],
|
|
3164
|
+
"fvn-spacing": ["fvn-normal"],
|
|
3165
|
+
"fvn-fraction": ["fvn-normal"],
|
|
3166
|
+
"line-clamp": ["display", "overflow"],
|
|
3167
|
+
rounded: [
|
|
3168
|
+
"rounded-s",
|
|
3169
|
+
"rounded-e",
|
|
3170
|
+
"rounded-t",
|
|
3171
|
+
"rounded-r",
|
|
3172
|
+
"rounded-b",
|
|
3173
|
+
"rounded-l",
|
|
3174
|
+
"rounded-ss",
|
|
3175
|
+
"rounded-se",
|
|
3176
|
+
"rounded-ee",
|
|
3177
|
+
"rounded-es",
|
|
3178
|
+
"rounded-tl",
|
|
3179
|
+
"rounded-tr",
|
|
3180
|
+
"rounded-br",
|
|
3181
|
+
"rounded-bl"
|
|
3182
|
+
],
|
|
3183
|
+
"rounded-s": ["rounded-ss", "rounded-es"],
|
|
3184
|
+
"rounded-e": ["rounded-se", "rounded-ee"],
|
|
3185
|
+
"rounded-t": ["rounded-tl", "rounded-tr"],
|
|
3186
|
+
"rounded-r": ["rounded-tr", "rounded-br"],
|
|
3187
|
+
"rounded-b": ["rounded-br", "rounded-bl"],
|
|
3188
|
+
"rounded-l": ["rounded-tl", "rounded-bl"],
|
|
3189
|
+
"border-spacing": ["border-spacing-x", "border-spacing-y"],
|
|
3190
|
+
"border-w": [
|
|
3191
|
+
"border-w-x",
|
|
3192
|
+
"border-w-y",
|
|
3193
|
+
"border-w-s",
|
|
3194
|
+
"border-w-e",
|
|
3195
|
+
"border-w-t",
|
|
3196
|
+
"border-w-r",
|
|
3197
|
+
"border-w-b",
|
|
3198
|
+
"border-w-l"
|
|
3199
|
+
],
|
|
3200
|
+
"border-w-x": ["border-w-r", "border-w-l"],
|
|
3201
|
+
"border-w-y": ["border-w-t", "border-w-b"],
|
|
3202
|
+
"border-color": [
|
|
3203
|
+
"border-color-x",
|
|
3204
|
+
"border-color-y",
|
|
3205
|
+
"border-color-s",
|
|
3206
|
+
"border-color-e",
|
|
3207
|
+
"border-color-t",
|
|
3208
|
+
"border-color-r",
|
|
3209
|
+
"border-color-b",
|
|
3210
|
+
"border-color-l"
|
|
3211
|
+
],
|
|
3212
|
+
"border-color-x": ["border-color-r", "border-color-l"],
|
|
3213
|
+
"border-color-y": ["border-color-t", "border-color-b"],
|
|
3214
|
+
translate: [
|
|
3215
|
+
"translate-x",
|
|
3216
|
+
"translate-y",
|
|
3217
|
+
"translate-none"
|
|
3218
|
+
],
|
|
3219
|
+
"translate-none": [
|
|
3220
|
+
"translate",
|
|
3221
|
+
"translate-x",
|
|
3222
|
+
"translate-y",
|
|
3223
|
+
"translate-z"
|
|
3224
|
+
],
|
|
3225
|
+
"scroll-m": [
|
|
3226
|
+
"scroll-mx",
|
|
3227
|
+
"scroll-my",
|
|
3228
|
+
"scroll-ms",
|
|
3229
|
+
"scroll-me",
|
|
3230
|
+
"scroll-mt",
|
|
3231
|
+
"scroll-mr",
|
|
3232
|
+
"scroll-mb",
|
|
3233
|
+
"scroll-ml"
|
|
3234
|
+
],
|
|
3235
|
+
"scroll-mx": ["scroll-mr", "scroll-ml"],
|
|
3236
|
+
"scroll-my": ["scroll-mt", "scroll-mb"],
|
|
3237
|
+
"scroll-p": [
|
|
3238
|
+
"scroll-px",
|
|
3239
|
+
"scroll-py",
|
|
3240
|
+
"scroll-ps",
|
|
3241
|
+
"scroll-pe",
|
|
3242
|
+
"scroll-pt",
|
|
3243
|
+
"scroll-pr",
|
|
3244
|
+
"scroll-pb",
|
|
3245
|
+
"scroll-pl"
|
|
3246
|
+
],
|
|
3247
|
+
"scroll-px": ["scroll-pr", "scroll-pl"],
|
|
3248
|
+
"scroll-py": ["scroll-pt", "scroll-pb"],
|
|
3249
|
+
touch: [
|
|
3250
|
+
"touch-x",
|
|
3251
|
+
"touch-y",
|
|
3252
|
+
"touch-pz"
|
|
3253
|
+
],
|
|
3254
|
+
"touch-x": ["touch"],
|
|
3255
|
+
"touch-y": ["touch"],
|
|
3256
|
+
"touch-pz": ["touch"]
|
|
3257
|
+
},
|
|
3258
|
+
conflictingClassGroupModifiers: { "font-size": ["leading"] },
|
|
3259
|
+
orderSensitiveModifiers: [
|
|
3260
|
+
"*",
|
|
3261
|
+
"**",
|
|
3262
|
+
"after",
|
|
3263
|
+
"backdrop",
|
|
3264
|
+
"before",
|
|
3265
|
+
"details-content",
|
|
3266
|
+
"file",
|
|
3267
|
+
"first-letter",
|
|
3268
|
+
"first-line",
|
|
3269
|
+
"marker",
|
|
3270
|
+
"placeholder",
|
|
3271
|
+
"selection"
|
|
3272
|
+
]
|
|
3273
|
+
};
|
|
3274
|
+
};
|
|
3275
|
+
const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
3276
|
+
|
|
3277
|
+
//#endregion
|
|
3278
|
+
//#region ../common/dist/strings/tokenize.js
|
|
3279
|
+
function buildTokenizeFuncUsingSplitters(splitters) {
|
|
3280
|
+
splitters = Array.isArray(splitters) ? splitters : [splitters];
|
|
3281
|
+
const tokenize = (s) => {
|
|
3282
|
+
let r = s.split(splitters[0]).filter((t) => t != "" && t != void 0);
|
|
3283
|
+
for (const splitter of splitters.slice(1)) {
|
|
3284
|
+
const r0 = [...r];
|
|
3285
|
+
r = [];
|
|
3286
|
+
for (const s$1 of r0) r.push(...tokenizeFilterString(s$1, {
|
|
3287
|
+
splitter,
|
|
3288
|
+
filter: (t) => t != "" && t != void 0
|
|
3289
|
+
}));
|
|
3290
|
+
}
|
|
3291
|
+
return r;
|
|
3292
|
+
};
|
|
3293
|
+
return tokenize;
|
|
3294
|
+
}
|
|
3295
|
+
function buildArgTokenizeFunc(tokenize) {
|
|
3296
|
+
const argTokenize = (arg) => {
|
|
3297
|
+
if (arg == void 0) return [];
|
|
3298
|
+
else if (Array.isArray(arg)) {
|
|
3299
|
+
const r = [];
|
|
3300
|
+
for (const a of arg) r.push(...argTokenize(a));
|
|
3301
|
+
return r;
|
|
3302
|
+
} else return tokenize(arg);
|
|
3303
|
+
};
|
|
3304
|
+
return argTokenize;
|
|
3305
|
+
}
|
|
3306
|
+
const tokenizeBySpaces = buildTokenizeFuncUsingSplitters(/\s+/);
|
|
3307
|
+
const argTokenizeBySpaces = buildArgTokenizeFunc(tokenizeBySpaces);
|
|
3308
|
+
function tokenizeFilterString(s, options = {}) {
|
|
3309
|
+
const separator = options.splitter ?? /\s+/;
|
|
3310
|
+
const filter = options.filter ?? ((s$1) => s$1.length > 0);
|
|
3311
|
+
return s.split(separator).filter(filter);
|
|
3312
|
+
}
|
|
3313
|
+
function deduplicate(items) {
|
|
3314
|
+
const r = [];
|
|
3315
|
+
const itemSet = /* @__PURE__ */ new Set();
|
|
3316
|
+
for (const item of items) if (!itemSet.has(item)) {
|
|
3317
|
+
r.push(item);
|
|
3318
|
+
itemSet.add(item);
|
|
3319
|
+
}
|
|
3320
|
+
return r;
|
|
3321
|
+
}
|
|
3322
|
+
|
|
3323
|
+
//#endregion
|
|
3324
|
+
//#region ../common/dist/messages/logMessages.js
|
|
3325
|
+
const LogLevels = [
|
|
3326
|
+
"ERROR",
|
|
3327
|
+
"WARNING",
|
|
3328
|
+
"INFO",
|
|
3329
|
+
"DEBUG"
|
|
3330
|
+
];
|
|
3331
|
+
const LogLevelsMap = /* @__PURE__ */ new Map();
|
|
3332
|
+
LogLevels.forEach((level, i) => {
|
|
3333
|
+
LogLevelsMap.set(level, LogLevels.length - i);
|
|
3334
|
+
});
|
|
3335
|
+
|
|
23
3336
|
//#endregion
|
|
24
3337
|
//#region src/stylers/normalizers.ts
|
|
25
3338
|
function twMergeNormalize(raw) {
|
|
@@ -253,11 +3566,11 @@ const Item = (props) => {
|
|
|
253
3566
|
_el$2.$$click = (e) => {
|
|
254
3567
|
if (!props.clickableWhendisabled) e.stopPropagation();
|
|
255
3568
|
};
|
|
256
|
-
|
|
3569
|
+
createRenderEffect(() => className(_el$2, disablerClasses()));
|
|
257
3570
|
return _el$2;
|
|
258
3571
|
}
|
|
259
3572
|
}), null);
|
|
260
|
-
|
|
3573
|
+
createRenderEffect(() => className(_el$, itemClasses()));
|
|
261
3574
|
return _el$;
|
|
262
3575
|
})();
|
|
263
3576
|
};
|
|
@@ -289,43 +3602,6 @@ const Block = (props) => {
|
|
|
289
3602
|
});
|
|
290
3603
|
};
|
|
291
3604
|
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region ../common/dist/strings/tokenize.js
|
|
294
|
-
function buildTokenizeFuncUsingSplitters(splitters) {
|
|
295
|
-
splitters = Array.isArray(splitters) ? splitters : [splitters];
|
|
296
|
-
const tokenize = (s) => {
|
|
297
|
-
let r = s.split(splitters[0]).filter((t) => t != "" && t != void 0);
|
|
298
|
-
for (const splitter of splitters.slice(1)) {
|
|
299
|
-
const r0 = [...r];
|
|
300
|
-
r = [];
|
|
301
|
-
for (const s$1 of r0) r.push(...tokenizeFilterString$1(s$1, {
|
|
302
|
-
splitter,
|
|
303
|
-
filter: (t) => t != "" && t != void 0
|
|
304
|
-
}));
|
|
305
|
-
}
|
|
306
|
-
return r;
|
|
307
|
-
};
|
|
308
|
-
return tokenize;
|
|
309
|
-
}
|
|
310
|
-
function buildArgTokenizeFunc(tokenize) {
|
|
311
|
-
const argTokenize = (arg) => {
|
|
312
|
-
if (arg == void 0) return [];
|
|
313
|
-
else if (Array.isArray(arg)) {
|
|
314
|
-
const r = [];
|
|
315
|
-
for (const a of arg) r.push(...argTokenize(a));
|
|
316
|
-
return r;
|
|
317
|
-
} else return tokenize(arg);
|
|
318
|
-
};
|
|
319
|
-
return argTokenize;
|
|
320
|
-
}
|
|
321
|
-
const tokenizeBySpaces = buildTokenizeFuncUsingSplitters(/\s+/);
|
|
322
|
-
const argTokenizeBySpaces$1 = buildArgTokenizeFunc(tokenizeBySpaces);
|
|
323
|
-
function tokenizeFilterString$1(s, options = {}) {
|
|
324
|
-
const separator = options.splitter ?? /\s+/;
|
|
325
|
-
const filter = options.filter ?? ((s$1) => s$1.length > 0);
|
|
326
|
-
return s.split(separator).filter(filter);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
3605
|
//#endregion
|
|
330
3606
|
//#region src/items/ItemGroup.tsx
|
|
331
3607
|
const ItemGroup = (props) => {
|
|
@@ -334,10 +3610,10 @@ const ItemGroup = (props) => {
|
|
|
334
3610
|
const item = [];
|
|
335
3611
|
const group = [];
|
|
336
3612
|
const _vtags = props.vtags;
|
|
337
|
-
if (Array.isArray(_vtags) || typeof _vtags == "string") group.push(...argTokenizeBySpaces
|
|
3613
|
+
if (Array.isArray(_vtags) || typeof _vtags == "string") group.push(...argTokenizeBySpaces(_vtags));
|
|
338
3614
|
else if (typeof _vtags == "object" && _vtags != null) {
|
|
339
|
-
group.push(...argTokenizeBySpaces
|
|
340
|
-
item.push(...argTokenizeBySpaces
|
|
3615
|
+
group.push(...argTokenizeBySpaces(_vtags.group));
|
|
3616
|
+
item.push(...argTokenizeBySpaces(_vtags.item));
|
|
341
3617
|
}
|
|
342
3618
|
return {
|
|
343
3619
|
group,
|