@mrts/soltw 0.3.21 → 0.3.24

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