@mrts/soltw 0.3.12 → 0.3.21

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