@tachui/responsive 0.8.17 → 0.8.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { globalModifierRegistry as
|
|
2
|
-
import { BaseModifier as
|
|
3
|
-
import { createSignal as
|
|
1
|
+
import { globalModifierRegistry as F } from "@tachui/registry";
|
|
2
|
+
import { BaseModifier as oe } from "@tachui/modifiers";
|
|
3
|
+
import { createSignal as I, createEffect as V, isSignal as D, isComputed as P, getThemeSignal as ye, createComputed as m, createMemo as xe } from "@tachui/core";
|
|
4
4
|
const g = {
|
|
5
5
|
Clean: 0,
|
|
6
6
|
Check: 1,
|
|
7
7
|
Dirty: 2,
|
|
8
8
|
Disposed: 3
|
|
9
9
|
};
|
|
10
|
-
let
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
10
|
+
let we = 0;
|
|
11
|
+
const Se = Math.random().toString(36).substr(2, 6);
|
|
12
|
+
let X = null, J = null;
|
|
13
|
+
const Ce = /* @__PURE__ */ new Set();
|
|
14
|
+
Ce.add(Se);
|
|
15
|
+
const _ = {
|
|
16
16
|
get currentComputation() {
|
|
17
|
-
return
|
|
17
|
+
return X;
|
|
18
18
|
},
|
|
19
19
|
set currentComputation(s) {
|
|
20
|
-
|
|
20
|
+
X = s;
|
|
21
21
|
},
|
|
22
22
|
get currentOwner() {
|
|
23
|
-
return
|
|
23
|
+
return J;
|
|
24
24
|
},
|
|
25
25
|
set currentOwner(s) {
|
|
26
|
-
|
|
26
|
+
J = s;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function ae() {
|
|
30
|
+
return _.currentComputation;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
32
|
+
function $e() {
|
|
33
|
+
return _.currentOwner;
|
|
34
34
|
}
|
|
35
|
-
class
|
|
35
|
+
class Be {
|
|
36
36
|
id;
|
|
37
37
|
owner;
|
|
38
38
|
fn;
|
|
@@ -43,7 +43,7 @@ class we {
|
|
|
43
43
|
state = g.Dirty;
|
|
44
44
|
value = void 0;
|
|
45
45
|
constructor(e, t = null) {
|
|
46
|
-
this.id = ++
|
|
46
|
+
this.id = ++we, this.fn = e, this.owner = t, t && !t.disposed && t.sources.add(this);
|
|
47
47
|
}
|
|
48
48
|
execute() {
|
|
49
49
|
if (this.state === g.Disposed)
|
|
@@ -51,14 +51,14 @@ class we {
|
|
|
51
51
|
for (const t of this.sources)
|
|
52
52
|
t && typeof t == "object" && "removeObserver" in t && t.removeObserver(this);
|
|
53
53
|
this.sources.clear();
|
|
54
|
-
const e =
|
|
55
|
-
|
|
54
|
+
const e = _.currentComputation;
|
|
55
|
+
_.currentComputation = this;
|
|
56
56
|
try {
|
|
57
57
|
return this.state = g.Clean, this.value = this.fn(), this.value;
|
|
58
58
|
} catch (t) {
|
|
59
59
|
throw this.state = g.Disposed, (typeof process > "u" || process.env.NODE_ENV !== "test") && console.error("Error in computation:", t), t;
|
|
60
60
|
} finally {
|
|
61
|
-
|
|
61
|
+
_.currentComputation = e;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
dispose() {
|
|
@@ -74,23 +74,23 @@ class we {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
typeof globalThis.__DEV__ > "u" && (globalThis.__DEV__ = process.env.NODE_ENV !== "production");
|
|
77
|
-
const
|
|
78
|
-
var
|
|
79
|
-
class
|
|
77
|
+
const ke = (s, e) => s === e;
|
|
78
|
+
var G = /* @__PURE__ */ ((s) => (s[s.Immediate = 0] = "Immediate", s[s.High = 1] = "High", s[s.Normal = 2] = "Normal", s[s.Low = 3] = "Low", s[s.Idle = 4] = "Idle", s))(G || {});
|
|
79
|
+
class Re extends Be {
|
|
80
80
|
type = "computed";
|
|
81
81
|
priority;
|
|
82
82
|
_hasValue = !1;
|
|
83
83
|
_error = null;
|
|
84
84
|
equalsFn;
|
|
85
85
|
options;
|
|
86
|
-
constructor(e, t = {}, i =
|
|
87
|
-
super(e, i), this.priority = t.priority ??
|
|
86
|
+
constructor(e, t = {}, i = $e()) {
|
|
87
|
+
super(e, i), this.priority = t.priority ?? G.Normal, this.equalsFn = t.equals ?? ke, this.options = t;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Get the computed value, tracking dependency and lazily computing
|
|
91
91
|
*/
|
|
92
92
|
getValue() {
|
|
93
|
-
const e =
|
|
93
|
+
const e = ae();
|
|
94
94
|
return e && e.state !== g.Disposed && (this.observers.add(e), e.sources.add(this)), (this.state === g.Dirty || !this._hasValue) && (this.execute(), this._hasValue = !0), this.value;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
@@ -158,7 +158,7 @@ class Ce extends we {
|
|
|
158
158
|
state: this.state,
|
|
159
159
|
sourceCount: this.sources.size,
|
|
160
160
|
observerCount: this.observers.size,
|
|
161
|
-
priority:
|
|
161
|
+
priority: G[this.priority],
|
|
162
162
|
debugName: this.options.debugName,
|
|
163
163
|
equalsFn: this.equalsFn.name || "anonymous"
|
|
164
164
|
};
|
|
@@ -167,26 +167,26 @@ class Ce extends we {
|
|
|
167
167
|
return `Computed(${this.options.debugName || this.id}): ${this._hasValue ? this.value : "no value"}`;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
const t = new
|
|
170
|
+
function Me(s, e) {
|
|
171
|
+
const t = new Re(s, e), i = t.getValue.bind(t);
|
|
172
172
|
return i.peek = t.peek.bind(t), Object.defineProperty(i, Symbol.for("tachui.computed"), {
|
|
173
173
|
value: t,
|
|
174
174
|
enumerable: !1
|
|
175
175
|
}), i;
|
|
176
176
|
}
|
|
177
|
-
let
|
|
178
|
-
class
|
|
177
|
+
let Oe = 0;
|
|
178
|
+
class Ve {
|
|
179
179
|
id;
|
|
180
180
|
observers = /* @__PURE__ */ new Set();
|
|
181
181
|
_value;
|
|
182
182
|
constructor(e) {
|
|
183
|
-
this.id = ++
|
|
183
|
+
this.id = ++Oe, this._value = e;
|
|
184
184
|
}
|
|
185
185
|
/**
|
|
186
186
|
* Get the current value and track dependency
|
|
187
187
|
*/
|
|
188
188
|
getValue() {
|
|
189
|
-
const e =
|
|
189
|
+
const e = ae();
|
|
190
190
|
return e && e.state !== g.Disposed && (this.observers.add(e), e.sources.add(this)), this._value;
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
@@ -207,7 +207,7 @@ class ke {
|
|
|
207
207
|
*/
|
|
208
208
|
notify() {
|
|
209
209
|
for (const e of this.observers)
|
|
210
|
-
e.state !== g.Disposed && (e.state = g.Dirty,
|
|
210
|
+
e.state !== g.Disposed && (e.state = g.Dirty, Ee(e));
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
213
|
* Remove an observer (cleanup)
|
|
@@ -227,28 +227,28 @@ class ke {
|
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
const
|
|
231
|
-
let
|
|
232
|
-
function
|
|
233
|
-
|
|
230
|
+
const N = /* @__PURE__ */ new Set();
|
|
231
|
+
let q = !1;
|
|
232
|
+
function Ee(s) {
|
|
233
|
+
N.add(s), q || queueMicrotask(Ie);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
if (!
|
|
237
|
-
|
|
235
|
+
function Ie() {
|
|
236
|
+
if (!q) {
|
|
237
|
+
q = !0;
|
|
238
238
|
try {
|
|
239
|
-
for (;
|
|
240
|
-
const s = Array.from(
|
|
241
|
-
|
|
239
|
+
for (; N.size > 0; ) {
|
|
240
|
+
const s = Array.from(N).sort((e, t) => e.id - t.id);
|
|
241
|
+
N.clear();
|
|
242
242
|
for (const e of s)
|
|
243
243
|
e.state === g.Dirty && e.execute();
|
|
244
244
|
}
|
|
245
245
|
} finally {
|
|
246
|
-
|
|
246
|
+
q = !1;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
const e = new
|
|
250
|
+
function Te(s) {
|
|
251
|
+
const e = new Ve(s), t = e.getValue.bind(e);
|
|
252
252
|
t.peek = e.peek.bind(e);
|
|
253
253
|
const i = e.set.bind(e);
|
|
254
254
|
return Object.defineProperty(t, Symbol.for("tachui.signal"), {
|
|
@@ -256,42 +256,42 @@ function Oe(s) {
|
|
|
256
256
|
enumerable: !1
|
|
257
257
|
}), [t, i];
|
|
258
258
|
}
|
|
259
|
-
const [
|
|
260
|
-
|
|
261
|
-
const s =
|
|
262
|
-
return s === "system" ?
|
|
259
|
+
const [je, at] = Te("light");
|
|
260
|
+
Me(() => {
|
|
261
|
+
const s = je();
|
|
262
|
+
return s === "system" ? De() : s;
|
|
263
263
|
});
|
|
264
|
-
function
|
|
264
|
+
function De() {
|
|
265
265
|
return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
266
266
|
}
|
|
267
267
|
process.env.NODE_ENV, process.env.NODE_ENV;
|
|
268
268
|
process.env.NODE_ENV === "development" && console.log("📤 Created RegistryAdapter for globalModifierRegistry", {
|
|
269
|
-
registryId:
|
|
270
|
-
currentSize:
|
|
269
|
+
registryId: F.instanceId,
|
|
270
|
+
currentSize: F.list().length
|
|
271
271
|
});
|
|
272
|
-
const
|
|
272
|
+
const Pe = "0.8.19", _e = Pe, ee = /* @__PURE__ */ new WeakSet(), te = /* @__PURE__ */ new WeakMap(), ze = {
|
|
273
273
|
name: "@tachui/core",
|
|
274
|
-
version:
|
|
274
|
+
version: _e,
|
|
275
275
|
author: "TachUI Team",
|
|
276
276
|
verified: !0
|
|
277
277
|
};
|
|
278
|
-
function
|
|
279
|
-
|
|
278
|
+
function Le(s) {
|
|
279
|
+
ee.has(s) || (s.setFeatureFlags({
|
|
280
280
|
metadataRegistration: !0
|
|
281
|
-
}),
|
|
281
|
+
}), ee.add(s));
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
let t =
|
|
285
|
-
t || (t = /* @__PURE__ */ new Set(),
|
|
283
|
+
function Ne(s, e) {
|
|
284
|
+
let t = te.get(s);
|
|
285
|
+
t || (t = /* @__PURE__ */ new Set(), te.set(s, t)), !t.has(e.name) && (s.registerPlugin(e), t.add(e.name));
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
|
|
287
|
+
function qe(s, e, t, i = F, r = ze) {
|
|
288
|
+
Le(i), Ne(i, r), i.has(s) || i.register(s, e), i.getMetadata(s) || i.registerMetadata({
|
|
289
289
|
...t,
|
|
290
290
|
name: s,
|
|
291
291
|
plugin: r.name
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Ae = "0.8.19", Qe = Ae, K = {
|
|
295
295
|
base: "0px",
|
|
296
296
|
// Mobile-first base
|
|
297
297
|
sm: "640px",
|
|
@@ -310,110 +310,123 @@ function w(s) {
|
|
|
310
310
|
(e) => ["base", "sm", "md", "lg", "xl", "2xl"].includes(e)
|
|
311
311
|
);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function ie(s) {
|
|
314
314
|
return ["base", "sm", "md", "lg", "xl", "2xl"].includes(s);
|
|
315
315
|
}
|
|
316
|
-
let
|
|
317
|
-
...
|
|
316
|
+
let T = {
|
|
317
|
+
...K
|
|
318
318
|
};
|
|
319
|
-
const [
|
|
319
|
+
const [ce, U] = I("base"), [de, ue] = I({
|
|
320
320
|
width: 0,
|
|
321
321
|
height: 0
|
|
322
322
|
});
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
323
|
+
let Q = !1;
|
|
324
|
+
const le = () => {
|
|
325
|
+
W(), E();
|
|
326
|
+
}, pe = () => {
|
|
327
|
+
setTimeout(() => {
|
|
328
|
+
W(), E();
|
|
329
|
+
}, 100);
|
|
330
|
+
};
|
|
331
|
+
function ct(s) {
|
|
332
|
+
We(s), T = {
|
|
333
|
+
...K,
|
|
326
334
|
...s
|
|
327
|
-
},
|
|
335
|
+
}, E(), typeof window < "u" && window.addEventListener("resize", E);
|
|
328
336
|
}
|
|
329
|
-
function
|
|
330
|
-
return { ...
|
|
337
|
+
function z() {
|
|
338
|
+
return { ...T };
|
|
331
339
|
}
|
|
332
340
|
function x() {
|
|
333
|
-
return ae;
|
|
334
|
-
}
|
|
335
|
-
function ot() {
|
|
336
341
|
return ce;
|
|
337
342
|
}
|
|
338
|
-
function
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
function dt() {
|
|
344
|
+
return de;
|
|
345
|
+
}
|
|
346
|
+
function ut() {
|
|
347
|
+
typeof window > "u" || Q || (W(), E(), window.addEventListener("resize", le), window.addEventListener("orientationchange", pe), Q = !0);
|
|
348
|
+
}
|
|
349
|
+
function lt() {
|
|
350
|
+
typeof window > "u" || (W(), E());
|
|
351
|
+
}
|
|
352
|
+
function pt() {
|
|
353
|
+
T = {
|
|
354
|
+
...K
|
|
355
|
+
}, U("base"), ue({
|
|
356
|
+
width: 0,
|
|
357
|
+
height: 0
|
|
358
|
+
}), typeof window < "u" && Q && (window.removeEventListener("resize", le), window.removeEventListener("orientationchange", pe)), Q = !1;
|
|
346
359
|
}
|
|
347
360
|
function S() {
|
|
348
|
-
const s =
|
|
361
|
+
const s = ce(), e = de();
|
|
349
362
|
return {
|
|
350
363
|
current: s,
|
|
351
364
|
width: e.width,
|
|
352
365
|
height: e.height,
|
|
353
|
-
isAbove: (t) =>
|
|
354
|
-
isBelow: (t) =>
|
|
355
|
-
isBetween: (t, i) =>
|
|
366
|
+
isAbove: (t) => re(s, t),
|
|
367
|
+
isBelow: (t) => se(s, t),
|
|
368
|
+
isBetween: (t, i) => re(s, t) && se(s, i),
|
|
356
369
|
matches: (t) => window.matchMedia(t).matches
|
|
357
370
|
};
|
|
358
371
|
}
|
|
359
|
-
function
|
|
360
|
-
const e =
|
|
372
|
+
function Z(s) {
|
|
373
|
+
const e = T[s];
|
|
361
374
|
return e.endsWith("px") ? parseInt(e, 10) : e.endsWith("em") || e.endsWith("rem") ? parseInt(e, 10) * 16 : parseInt(e, 10) || 0;
|
|
362
375
|
}
|
|
363
376
|
function y(s) {
|
|
364
377
|
return ["base", "sm", "md", "lg", "xl", "2xl"].indexOf(s);
|
|
365
378
|
}
|
|
366
|
-
function
|
|
379
|
+
function re(s, e) {
|
|
367
380
|
return y(s) > y(e);
|
|
368
381
|
}
|
|
369
|
-
function
|
|
382
|
+
function se(s, e) {
|
|
370
383
|
return y(s) < y(e);
|
|
371
384
|
}
|
|
372
|
-
function
|
|
373
|
-
return s === "base" ? "" : `(min-width: ${
|
|
385
|
+
function He(s) {
|
|
386
|
+
return s === "base" ? "" : `(min-width: ${T[s]})`;
|
|
374
387
|
}
|
|
375
|
-
function
|
|
388
|
+
function ht(s, e) {
|
|
376
389
|
const t = [];
|
|
377
|
-
if (s !== "base" && t.push(`(min-width: ${
|
|
390
|
+
if (s !== "base" && t.push(`(min-width: ${T[s]})`), e && e !== "2xl") {
|
|
378
391
|
const i = ["sm", "md", "lg", "xl", "2xl"], r = i.indexOf(e);
|
|
379
392
|
if (r >= 0 && r < i.length - 1) {
|
|
380
|
-
const o = i[r + 1], n = `${
|
|
393
|
+
const o = i[r + 1], n = `${Z(o) - 1}px`;
|
|
381
394
|
t.push(`(max-width: ${n})`);
|
|
382
395
|
}
|
|
383
396
|
}
|
|
384
397
|
return t.length > 0 ? t.join(" and ") : "";
|
|
385
398
|
}
|
|
386
|
-
function
|
|
399
|
+
function H() {
|
|
387
400
|
return ["base", "sm", "md", "lg", "xl", "2xl"];
|
|
388
401
|
}
|
|
389
|
-
function
|
|
390
|
-
const e =
|
|
402
|
+
function ft(s) {
|
|
403
|
+
const e = H(), t = e.indexOf(s);
|
|
391
404
|
return t >= 0 ? e.slice(t + 1) : [];
|
|
392
405
|
}
|
|
393
|
-
function
|
|
394
|
-
const e =
|
|
406
|
+
function mt(s) {
|
|
407
|
+
const e = H(), t = e.indexOf(s);
|
|
395
408
|
return t > 0 ? e.slice(0, t) : [];
|
|
396
409
|
}
|
|
397
|
-
function
|
|
410
|
+
function E() {
|
|
398
411
|
if (typeof window > "u")
|
|
399
412
|
return;
|
|
400
|
-
const s = window.innerWidth, e =
|
|
413
|
+
const s = window.innerWidth, e = H().reverse();
|
|
401
414
|
for (const t of e)
|
|
402
|
-
if (t === "base" || s >=
|
|
403
|
-
|
|
415
|
+
if (t === "base" || s >= Z(t)) {
|
|
416
|
+
U(t);
|
|
404
417
|
return;
|
|
405
418
|
}
|
|
406
|
-
|
|
419
|
+
U("base");
|
|
407
420
|
}
|
|
408
|
-
function
|
|
409
|
-
typeof window < "u" &&
|
|
421
|
+
function W() {
|
|
422
|
+
typeof window < "u" && ue({
|
|
410
423
|
width: window.innerWidth,
|
|
411
424
|
height: window.innerHeight
|
|
412
425
|
});
|
|
413
426
|
}
|
|
414
|
-
function
|
|
427
|
+
function We(s) {
|
|
415
428
|
for (const [t, i] of Object.entries(s)) {
|
|
416
|
-
if (!
|
|
429
|
+
if (!ie(t))
|
|
417
430
|
throw new Error(
|
|
418
431
|
`Invalid breakpoint key: "${t}". Valid keys are: base, sm, md, lg, xl, 2xl`
|
|
419
432
|
);
|
|
@@ -426,16 +439,16 @@ function Ae(s) {
|
|
|
426
439
|
`Invalid breakpoint value for "${t}": "${i}". Must be a valid CSS length (e.g., "768px", "48em")`
|
|
427
440
|
);
|
|
428
441
|
}
|
|
429
|
-
const e = Object.keys(s).filter(
|
|
442
|
+
const e = Object.keys(s).filter(ie).sort((t, i) => y(t) - y(i));
|
|
430
443
|
for (let t = 1; t < e.length; t++) {
|
|
431
444
|
const i = e[t - 1], r = e[t], o = s[i], n = s[r];
|
|
432
|
-
if (
|
|
445
|
+
if (Z(i) >= parseInt(n, 10))
|
|
433
446
|
throw new Error(
|
|
434
447
|
`Breakpoint "${r}" (${n}) must be larger than "${i}" (${o})`
|
|
435
448
|
);
|
|
436
449
|
}
|
|
437
450
|
}
|
|
438
|
-
const
|
|
451
|
+
const gt = {
|
|
439
452
|
// Tailwind CSS (default)
|
|
440
453
|
tailwind: {
|
|
441
454
|
sm: "640px",
|
|
@@ -469,7 +482,7 @@ const lt = {
|
|
|
469
482
|
"2xl": "1440px"
|
|
470
483
|
}
|
|
471
484
|
};
|
|
472
|
-
class
|
|
485
|
+
class he {
|
|
473
486
|
options;
|
|
474
487
|
constructor(e) {
|
|
475
488
|
this.options = {
|
|
@@ -507,7 +520,7 @@ class de {
|
|
|
507
520
|
* Generate media queries for a single property
|
|
508
521
|
*/
|
|
509
522
|
generatePropertyMediaQueries(e, t) {
|
|
510
|
-
const i = [], r = {}, o =
|
|
523
|
+
const i = [], r = {}, o = H();
|
|
511
524
|
for (const n of o) {
|
|
512
525
|
const a = t[n];
|
|
513
526
|
if (a === void 0) continue;
|
|
@@ -515,7 +528,7 @@ class de {
|
|
|
515
528
|
if (n === "base")
|
|
516
529
|
r[c] = d;
|
|
517
530
|
else {
|
|
518
|
-
const l =
|
|
531
|
+
const l = He(n), p = { [c]: d };
|
|
519
532
|
i.push({
|
|
520
533
|
breakpoint: n,
|
|
521
534
|
query: l,
|
|
@@ -661,14 +674,14 @@ class de {
|
|
|
661
674
|
* Extract breakpoint name from media query for comments
|
|
662
675
|
*/
|
|
663
676
|
getBreakpointFromQuery(e) {
|
|
664
|
-
const t =
|
|
677
|
+
const t = z();
|
|
665
678
|
for (const [i, r] of Object.entries(t))
|
|
666
679
|
if (e.includes(r))
|
|
667
680
|
return i;
|
|
668
681
|
return "custom";
|
|
669
682
|
}
|
|
670
683
|
}
|
|
671
|
-
function
|
|
684
|
+
function bt(s, e, t, i) {
|
|
672
685
|
if (!w(t)) {
|
|
673
686
|
const a = e.replace(
|
|
674
687
|
/[A-Z]/g,
|
|
@@ -676,10 +689,10 @@ function pt(s, e, t, i) {
|
|
|
676
689
|
), c = typeof t == "number" ? `${t}px` : t.toString();
|
|
677
690
|
return [`${s} { ${a}: ${c}; }`];
|
|
678
691
|
}
|
|
679
|
-
const r = new
|
|
692
|
+
const r = new he({ selector: s, ...i }), o = { [e]: t };
|
|
680
693
|
return r.generateResponsiveCSS(o).cssRules;
|
|
681
694
|
}
|
|
682
|
-
function
|
|
695
|
+
function vt(s, e, t) {
|
|
683
696
|
const { generateMinified: i = !1 } = t || {}, r = i ? "" : " ", o = i ? "" : `
|
|
684
697
|
`, n = i ? "" : " ";
|
|
685
698
|
let a = `@media ${e.query}${n}{${o}`;
|
|
@@ -693,7 +706,7 @@ function ht(s, e, t) {
|
|
|
693
706
|
}
|
|
694
707
|
return a += `${r}}${o}`, a += `}${o}`, a;
|
|
695
708
|
}
|
|
696
|
-
class
|
|
709
|
+
class fe {
|
|
697
710
|
static styleSheet = null;
|
|
698
711
|
static injectedRules = /* @__PURE__ */ new Set();
|
|
699
712
|
/**
|
|
@@ -737,7 +750,7 @@ class ue {
|
|
|
737
750
|
return this.injectedRules.has(e);
|
|
738
751
|
}
|
|
739
752
|
}
|
|
740
|
-
class
|
|
753
|
+
class Fe {
|
|
741
754
|
cache = /* @__PURE__ */ new Map();
|
|
742
755
|
hitCount = 0;
|
|
743
756
|
missCount = 0;
|
|
@@ -760,8 +773,8 @@ class Qe {
|
|
|
760
773
|
};
|
|
761
774
|
}
|
|
762
775
|
}
|
|
763
|
-
const R = new
|
|
764
|
-
class
|
|
776
|
+
const R = new Fe();
|
|
777
|
+
class yt {
|
|
765
778
|
static BATCH_SIZE = 50;
|
|
766
779
|
static ruleQueue = [];
|
|
767
780
|
static flushTimer = null;
|
|
@@ -801,8 +814,8 @@ class ft {
|
|
|
801
814
|
if (typeof f == "object" && f !== null)
|
|
802
815
|
for (const [v, C] of Object.entries(f)) {
|
|
803
816
|
if (v === "base") continue;
|
|
804
|
-
const k = this.getMediaQuery(v),
|
|
805
|
-
d.has(
|
|
817
|
+
const k = this.getMediaQuery(v), j = `${k}:${p}`;
|
|
818
|
+
d.has(j) || (c += `@media ${k}${a}{${n}`, c += `${o}${e}${a}{${n}`, c += `${o}${o}${this.propertyToCSS(p)}:${a}${this.valueToCSS(C)};${n}`, c += `${o}}${n}`, c += `}${n}`, d.add(j));
|
|
806
819
|
}
|
|
807
820
|
return c;
|
|
808
821
|
}
|
|
@@ -944,10 +957,10 @@ class A {
|
|
|
944
957
|
this.measurements.clear();
|
|
945
958
|
}
|
|
946
959
|
}
|
|
947
|
-
const
|
|
948
|
-
class
|
|
960
|
+
const me = 250;
|
|
961
|
+
class Y extends oe {
|
|
949
962
|
type = "responsive";
|
|
950
|
-
priority =
|
|
963
|
+
priority = me;
|
|
951
964
|
generatedCSS = null;
|
|
952
965
|
elementSelector = "";
|
|
953
966
|
_config;
|
|
@@ -970,13 +983,13 @@ class U extends se {
|
|
|
970
983
|
generateAndInjectCSS() {
|
|
971
984
|
const e = A.startMeasurement("css-generation");
|
|
972
985
|
try {
|
|
973
|
-
const t = new
|
|
986
|
+
const t = new he({
|
|
974
987
|
selector: this.elementSelector,
|
|
975
988
|
generateMinified: process.env.NODE_ENV === "production",
|
|
976
989
|
includeComments: process.env.NODE_ENV !== "production",
|
|
977
990
|
optimizeOutput: !0
|
|
978
991
|
});
|
|
979
|
-
this.generatedCSS = t.generateResponsiveCSS(this.config), this.generatedCSS.cssRules.length > 0 &&
|
|
992
|
+
this.generatedCSS = t.generateResponsiveCSS(this.config), this.generatedCSS.cssRules.length > 0 && fe.injectCSS(this.generatedCSS.cssRules);
|
|
980
993
|
} finally {
|
|
981
994
|
e();
|
|
982
995
|
}
|
|
@@ -998,11 +1011,11 @@ class U extends se {
|
|
|
998
1011
|
let t = !1;
|
|
999
1012
|
for (const [i, r] of Object.entries(e))
|
|
1000
1013
|
if (this.isReactiveValue(r))
|
|
1001
|
-
|
|
1014
|
+
D(r) || P(r) ? r() : this.isAsset(r) && (t = !0, r.resolve());
|
|
1002
1015
|
else if (w(r))
|
|
1003
1016
|
for (const [o, n] of Object.entries(r))
|
|
1004
|
-
this.isReactiveValue(n) && (
|
|
1005
|
-
t &&
|
|
1017
|
+
this.isReactiveValue(n) && (D(n) || P(n) ? n() : this.isAsset(n) && (t = !0, n.resolve()));
|
|
1018
|
+
t && ye()();
|
|
1006
1019
|
}
|
|
1007
1020
|
/**
|
|
1008
1021
|
* Update configuration and regenerate CSS
|
|
@@ -1047,7 +1060,7 @@ class U extends se {
|
|
|
1047
1060
|
* Check if a value is a reactive signal, computed, or Asset
|
|
1048
1061
|
*/
|
|
1049
1062
|
isReactiveValue(e) {
|
|
1050
|
-
return !!(
|
|
1063
|
+
return !!(D(e) || P(e) || this.isAsset(e));
|
|
1051
1064
|
}
|
|
1052
1065
|
/**
|
|
1053
1066
|
* Check if a value is an Asset object
|
|
@@ -1062,11 +1075,11 @@ class U extends se {
|
|
|
1062
1075
|
const t = {};
|
|
1063
1076
|
for (const [i, r] of Object.entries(e))
|
|
1064
1077
|
if (this.isReactiveValue(r))
|
|
1065
|
-
|
|
1078
|
+
D(r) || P(r) ? t[i] = r() : this.isAsset(r) && (t[i] = r.resolve());
|
|
1066
1079
|
else if (w(r)) {
|
|
1067
1080
|
const o = {};
|
|
1068
1081
|
for (const [n, a] of Object.entries(r))
|
|
1069
|
-
this.isReactiveValue(a) ?
|
|
1082
|
+
this.isReactiveValue(a) ? D(a) || P(a) ? o[n] = a() : this.isAsset(a) && (o[n] = a.resolve()) : o[n] = a;
|
|
1070
1083
|
t[i] = o;
|
|
1071
1084
|
} else
|
|
1072
1085
|
t[i] = r;
|
|
@@ -1086,11 +1099,11 @@ class U extends se {
|
|
|
1086
1099
|
}
|
|
1087
1100
|
}
|
|
1088
1101
|
function h(s) {
|
|
1089
|
-
return new
|
|
1102
|
+
return new Y(s);
|
|
1090
1103
|
}
|
|
1091
|
-
class
|
|
1104
|
+
class Ge extends oe {
|
|
1092
1105
|
type = "media-query";
|
|
1093
|
-
priority =
|
|
1106
|
+
priority = me + 1;
|
|
1094
1107
|
// Slightly higher than responsive
|
|
1095
1108
|
elementSelector = "";
|
|
1096
1109
|
constructor(e, t) {
|
|
@@ -1118,7 +1131,7 @@ class He extends se {
|
|
|
1118
1131
|
), l = typeof c == "number" ? `${c}px` : c.toString();
|
|
1119
1132
|
n += `${i}${d}:${o}${l};${r}`;
|
|
1120
1133
|
}
|
|
1121
|
-
n += `${t}}${r}`, n += `}${r}`,
|
|
1134
|
+
n += `${t}}${r}`, n += `}${r}`, fe.injectCSS([n]);
|
|
1122
1135
|
}
|
|
1123
1136
|
generateUniqueSelector(e) {
|
|
1124
1137
|
return `.${`tachui-mq-${Math.random().toString(36).substr(2, 9)}`}`;
|
|
@@ -1128,17 +1141,17 @@ class He extends se {
|
|
|
1128
1141
|
}
|
|
1129
1142
|
}
|
|
1130
1143
|
function $(s, e) {
|
|
1131
|
-
return new
|
|
1144
|
+
return new Ge(s, e);
|
|
1132
1145
|
}
|
|
1133
1146
|
function u(s, e) {
|
|
1134
1147
|
const t = { [s]: e };
|
|
1135
|
-
return new
|
|
1148
|
+
return new Y(t);
|
|
1136
1149
|
}
|
|
1137
|
-
function
|
|
1150
|
+
function ge(s) {
|
|
1138
1151
|
const e = {};
|
|
1139
|
-
return s.direction && (e.flexDirection = s.direction), s.wrap && (e.flexWrap = s.wrap), s.justify && (e.justifyContent = s.justify), s.align && (e.alignItems = s.align), s.gap && (e.gap = s.gap), new
|
|
1152
|
+
return s.direction && (e.flexDirection = s.direction), s.wrap && (e.flexWrap = s.wrap), s.justify && (e.justifyContent = s.justify), s.align && (e.alignItems = s.align), s.gap && (e.gap = s.gap), new Y(e);
|
|
1140
1153
|
}
|
|
1141
|
-
class
|
|
1154
|
+
class be {
|
|
1142
1155
|
constructor(e) {
|
|
1143
1156
|
return this.baseBuilder = e, new Proxy(this, {
|
|
1144
1157
|
get(t, i) {
|
|
@@ -1203,7 +1216,7 @@ class he {
|
|
|
1203
1216
|
}
|
|
1204
1217
|
// Responsive layout methods
|
|
1205
1218
|
responsiveLayout(e) {
|
|
1206
|
-
const t =
|
|
1219
|
+
const t = ge(e);
|
|
1207
1220
|
return this.baseBuilder.addModifier(t), this;
|
|
1208
1221
|
}
|
|
1209
1222
|
// Responsive dimension methods
|
|
@@ -1496,13 +1509,13 @@ class O {
|
|
|
1496
1509
|
return this.parentBuilder.addModifier(i), this.parentBuilder;
|
|
1497
1510
|
}
|
|
1498
1511
|
}
|
|
1499
|
-
function
|
|
1500
|
-
return new
|
|
1512
|
+
function xt(s) {
|
|
1513
|
+
return new be(s);
|
|
1501
1514
|
}
|
|
1502
|
-
function
|
|
1503
|
-
return new
|
|
1515
|
+
function wt(s) {
|
|
1516
|
+
return new be(s);
|
|
1504
1517
|
}
|
|
1505
|
-
function
|
|
1518
|
+
function St() {
|
|
1506
1519
|
const s = x(), e = m(() => S());
|
|
1507
1520
|
return {
|
|
1508
1521
|
current: s,
|
|
@@ -1518,7 +1531,7 @@ function bt() {
|
|
|
1518
1531
|
return c >= d && c <= l;
|
|
1519
1532
|
}),
|
|
1520
1533
|
matches: (n) => {
|
|
1521
|
-
const [a, c] =
|
|
1534
|
+
const [a, c] = I(!1);
|
|
1522
1535
|
if (typeof window < "u") {
|
|
1523
1536
|
const d = window.matchMedia(n);
|
|
1524
1537
|
c(d.matches);
|
|
@@ -1529,8 +1542,8 @@ function bt() {
|
|
|
1529
1542
|
}
|
|
1530
1543
|
};
|
|
1531
1544
|
}
|
|
1532
|
-
function
|
|
1533
|
-
const [e, t] =
|
|
1545
|
+
function Ct(s) {
|
|
1546
|
+
const [e, t] = I(!1);
|
|
1534
1547
|
if (typeof window < "u") {
|
|
1535
1548
|
const i = window.matchMedia(s);
|
|
1536
1549
|
t(i.matches);
|
|
@@ -1539,7 +1552,7 @@ function vt(s) {
|
|
|
1539
1552
|
}
|
|
1540
1553
|
return e;
|
|
1541
1554
|
}
|
|
1542
|
-
function
|
|
1555
|
+
function $t(s) {
|
|
1543
1556
|
const e = x();
|
|
1544
1557
|
return m(() => {
|
|
1545
1558
|
if (!w(s))
|
|
@@ -1563,7 +1576,7 @@ function yt(s) {
|
|
|
1563
1576
|
throw new Error("No responsive value found for any breakpoint");
|
|
1564
1577
|
});
|
|
1565
1578
|
}
|
|
1566
|
-
function
|
|
1579
|
+
function Bt(s, e) {
|
|
1567
1580
|
if (!w(s))
|
|
1568
1581
|
return s;
|
|
1569
1582
|
const t = s, i = e || x()(), r = [
|
|
@@ -1584,7 +1597,7 @@ function xt(s, e) {
|
|
|
1584
1597
|
return t[n];
|
|
1585
1598
|
throw new Error("No responsive value found for any breakpoint");
|
|
1586
1599
|
}
|
|
1587
|
-
function
|
|
1600
|
+
function kt(s, e) {
|
|
1588
1601
|
const t = {};
|
|
1589
1602
|
for (const [i, r] of Object.entries(e))
|
|
1590
1603
|
if (w(r)) {
|
|
@@ -1707,20 +1720,20 @@ const b = {
|
|
|
1707
1720
|
hdr: "(dynamic-range: high)",
|
|
1708
1721
|
sdr: "(dynamic-range: standard)"
|
|
1709
1722
|
};
|
|
1710
|
-
function
|
|
1723
|
+
function Rt(...s) {
|
|
1711
1724
|
return s.filter((e) => e).join(" and ");
|
|
1712
1725
|
}
|
|
1713
|
-
function
|
|
1726
|
+
function Mt(...s) {
|
|
1714
1727
|
return s.filter((e) => e).join(", ");
|
|
1715
1728
|
}
|
|
1716
|
-
function
|
|
1729
|
+
function Ot(s) {
|
|
1717
1730
|
const e = x();
|
|
1718
1731
|
return m(() => {
|
|
1719
1732
|
const t = e();
|
|
1720
1733
|
return !(s.hideOn && s.hideOn.includes(t) || s.showOn && !s.showOn.includes(t));
|
|
1721
1734
|
});
|
|
1722
1735
|
}
|
|
1723
|
-
function
|
|
1736
|
+
function Ue() {
|
|
1724
1737
|
if (typeof window > "u") return;
|
|
1725
1738
|
const s = S();
|
|
1726
1739
|
console.group("🔍 tachUI Responsive State"), console.log("Current breakpoint:", s.current), console.log("Viewport dimensions:", `${s.width}x${s.height}`), console.log("Available breakpoints:", ["base", "sm", "md", "lg", "xl", "2xl"]);
|
|
@@ -1737,7 +1750,7 @@ function We() {
|
|
|
1737
1750
|
console.log(` ${t}: ${window.matchMedia(i).matches}`);
|
|
1738
1751
|
console.groupEnd();
|
|
1739
1752
|
}
|
|
1740
|
-
function
|
|
1753
|
+
function Vt(s = {}) {
|
|
1741
1754
|
if (typeof window > "u" || process.env.NODE_ENV === "production")
|
|
1742
1755
|
return;
|
|
1743
1756
|
const {
|
|
@@ -1765,9 +1778,9 @@ function Bt(s = {}) {
|
|
|
1765
1778
|
i && (a += `Breakpoint: ${n.current}`), t && (a && (a += `
|
|
1766
1779
|
`), a += `Size: ${n.width}×${n.height}`), r.textContent = a;
|
|
1767
1780
|
}
|
|
1768
|
-
o(), window.addEventListener("resize", o),
|
|
1781
|
+
o(), window.addEventListener("resize", o), Ue();
|
|
1769
1782
|
}
|
|
1770
|
-
class
|
|
1783
|
+
class Ke {
|
|
1771
1784
|
/**
|
|
1772
1785
|
* Create a responsive grid with automatic column sizing
|
|
1773
1786
|
*/
|
|
@@ -1817,7 +1830,7 @@ class Fe {
|
|
|
1817
1830
|
return e.gap && (t.gap = e.gap), h(t);
|
|
1818
1831
|
}
|
|
1819
1832
|
}
|
|
1820
|
-
class
|
|
1833
|
+
class Et {
|
|
1821
1834
|
/**
|
|
1822
1835
|
* Create a responsive flex container that stacks on mobile, flows horizontally on desktop
|
|
1823
1836
|
*/
|
|
@@ -1865,7 +1878,7 @@ class kt {
|
|
|
1865
1878
|
});
|
|
1866
1879
|
}
|
|
1867
1880
|
}
|
|
1868
|
-
class
|
|
1881
|
+
class It {
|
|
1869
1882
|
/**
|
|
1870
1883
|
* Create a responsive container with max-width constraints
|
|
1871
1884
|
*/
|
|
@@ -1901,7 +1914,7 @@ class Rt {
|
|
|
1901
1914
|
return e?.paddingY && (t.paddingTop = e.paddingY, t.paddingBottom = e.paddingY), e?.paddingX && (t.paddingLeft = e.paddingX, t.paddingRight = e.paddingX), e?.maxWidth && (t.maxWidth = e.maxWidth, t.marginLeft = "auto", t.marginRight = "auto"), h(t);
|
|
1902
1915
|
}
|
|
1903
1916
|
}
|
|
1904
|
-
class
|
|
1917
|
+
class Tt {
|
|
1905
1918
|
/**
|
|
1906
1919
|
* Show element only on specific breakpoints
|
|
1907
1920
|
*/
|
|
@@ -1961,7 +1974,7 @@ class Mt {
|
|
|
1961
1974
|
});
|
|
1962
1975
|
}
|
|
1963
1976
|
}
|
|
1964
|
-
class
|
|
1977
|
+
class jt {
|
|
1965
1978
|
/**
|
|
1966
1979
|
* Create responsive padding
|
|
1967
1980
|
*/
|
|
@@ -1984,7 +1997,7 @@ class Ot {
|
|
|
1984
1997
|
return e.all && (t.gap = e.all), e.column && (t.columnGap = e.column), e.row && (t.rowGap = e.row), h(t);
|
|
1985
1998
|
}
|
|
1986
1999
|
}
|
|
1987
|
-
class
|
|
2000
|
+
class Dt {
|
|
1988
2001
|
/**
|
|
1989
2002
|
* Create responsive font scale
|
|
1990
2003
|
*/
|
|
@@ -2011,7 +2024,7 @@ class Vt {
|
|
|
2011
2024
|
});
|
|
2012
2025
|
}
|
|
2013
2026
|
}
|
|
2014
|
-
const
|
|
2027
|
+
const Pt = {
|
|
2015
2028
|
/**
|
|
2016
2029
|
* Sidebar layout that collapses on mobile
|
|
2017
2030
|
*/
|
|
@@ -2051,7 +2064,7 @@ const Et = {
|
|
|
2051
2064
|
/**
|
|
2052
2065
|
* Card grid layout
|
|
2053
2066
|
*/
|
|
2054
|
-
cardGrid: (s) =>
|
|
2067
|
+
cardGrid: (s) => Ke.autoFit({
|
|
2055
2068
|
minColumnWidth: s?.minCardWidth || "300px",
|
|
2056
2069
|
gap: s?.gap || "1rem",
|
|
2057
2070
|
maxColumns: s?.maxColumns
|
|
@@ -2087,7 +2100,7 @@ class B {
|
|
|
2087
2100
|
static createInterpolatedValue(e, t = {}) {
|
|
2088
2101
|
const { smoothing: i = "linear", clamp: r = !0 } = t;
|
|
2089
2102
|
return m(() => {
|
|
2090
|
-
const n = S().width, a =
|
|
2103
|
+
const n = S().width, a = z(), c = [];
|
|
2091
2104
|
for (const [v, C] of Object.entries(e))
|
|
2092
2105
|
if (C !== void 0) {
|
|
2093
2106
|
const k = v === "base" ? 0 : parseInt(a[v] || "0");
|
|
@@ -2160,7 +2173,7 @@ class B {
|
|
|
2160
2173
|
throw new Error("No responsive value found");
|
|
2161
2174
|
}
|
|
2162
2175
|
}
|
|
2163
|
-
class
|
|
2176
|
+
class Ze {
|
|
2164
2177
|
/**
|
|
2165
2178
|
* Hook for responsive arrays (e.g., responsive grid columns data)
|
|
2166
2179
|
*/
|
|
@@ -2209,7 +2222,7 @@ class Ge {
|
|
|
2209
2222
|
* Hook for responsive state management
|
|
2210
2223
|
*/
|
|
2211
2224
|
static useResponsiveState(e) {
|
|
2212
|
-
const [t, i] =
|
|
2225
|
+
const [t, i] = I(e), r = x();
|
|
2213
2226
|
return [m(() => {
|
|
2214
2227
|
const a = t(), c = r();
|
|
2215
2228
|
try {
|
|
@@ -2228,7 +2241,7 @@ class Ge {
|
|
|
2228
2241
|
* Hook for responsive computations with memoization
|
|
2229
2242
|
*/
|
|
2230
2243
|
static useResponsiveComputation(e, t = []) {
|
|
2231
|
-
return
|
|
2244
|
+
return xe(() => {
|
|
2232
2245
|
t.forEach((r) => r());
|
|
2233
2246
|
const i = S();
|
|
2234
2247
|
return e(i);
|
|
@@ -2248,7 +2261,7 @@ class Ge {
|
|
|
2248
2261
|
});
|
|
2249
2262
|
}
|
|
2250
2263
|
}
|
|
2251
|
-
class
|
|
2264
|
+
class Ye {
|
|
2252
2265
|
/**
|
|
2253
2266
|
* Execute callback only on specific breakpoints
|
|
2254
2267
|
*/
|
|
@@ -2300,20 +2313,20 @@ class Ue {
|
|
|
2300
2313
|
};
|
|
2301
2314
|
}
|
|
2302
2315
|
}
|
|
2303
|
-
class
|
|
2316
|
+
class Xe {
|
|
2304
2317
|
/**
|
|
2305
2318
|
* Create responsive pagination
|
|
2306
2319
|
*/
|
|
2307
2320
|
static createResponsivePagination(e, t) {
|
|
2308
|
-
const [i, r] =
|
|
2321
|
+
const [i, r] = I(1), o = x(), n = m(() => {
|
|
2309
2322
|
const C = o();
|
|
2310
2323
|
return B.resolveResponsiveValue(
|
|
2311
2324
|
t,
|
|
2312
2325
|
C
|
|
2313
2326
|
);
|
|
2314
2327
|
}), a = m(() => Math.ceil(e.length / n())), c = m(() => {
|
|
2315
|
-
const C = n(),
|
|
2316
|
-
return e.slice(
|
|
2328
|
+
const C = n(), j = (i() - 1) * C, ve = j + C;
|
|
2329
|
+
return e.slice(j, ve);
|
|
2317
2330
|
}), d = m(
|
|
2318
2331
|
() => i() < a()
|
|
2319
2332
|
), l = m(() => i() > 1), p = (C) => {
|
|
@@ -2364,11 +2377,11 @@ class Ke {
|
|
|
2364
2377
|
});
|
|
2365
2378
|
}
|
|
2366
2379
|
}
|
|
2367
|
-
const
|
|
2380
|
+
const _t = {
|
|
2368
2381
|
Breakpoints: B,
|
|
2369
|
-
Hooks:
|
|
2370
|
-
Targeting:
|
|
2371
|
-
Data:
|
|
2382
|
+
Hooks: Ze,
|
|
2383
|
+
Targeting: Ye,
|
|
2384
|
+
Data: Xe
|
|
2372
2385
|
};
|
|
2373
2386
|
class M {
|
|
2374
2387
|
static isEnabled = !1;
|
|
@@ -2448,7 +2461,7 @@ class M {
|
|
|
2448
2461
|
*/
|
|
2449
2462
|
static updateDebugOverlay(e) {
|
|
2450
2463
|
if (!this.debugOverlay) return;
|
|
2451
|
-
const t = S(), i =
|
|
2464
|
+
const t = S(), i = z();
|
|
2452
2465
|
let r = `
|
|
2453
2466
|
<div style="margin-bottom: 8px; font-weight: bold; color: #4fc3f7;">
|
|
2454
2467
|
📱 Responsive Debug
|
|
@@ -2585,7 +2598,7 @@ class M {
|
|
|
2585
2598
|
*/
|
|
2586
2599
|
static logResponsiveState() {
|
|
2587
2600
|
if (!this.enabled) return;
|
|
2588
|
-
const e = S(), t =
|
|
2601
|
+
const e = S(), t = z();
|
|
2589
2602
|
if (console.group("🔍 TachUI Responsive State"), console.log("Current breakpoint:", e.current), console.log("Viewport:", `${e.width}×${e.height}`), console.log("Configuration:", t), typeof window < "u" && window.matchMedia) {
|
|
2590
2603
|
const i = {
|
|
2591
2604
|
Mobile: b.mobile,
|
|
@@ -2654,7 +2667,7 @@ class M {
|
|
|
2654
2667
|
* Export responsive configuration for debugging
|
|
2655
2668
|
*/
|
|
2656
2669
|
static exportConfiguration() {
|
|
2657
|
-
const e = S(), t =
|
|
2670
|
+
const e = S(), t = z(), i = A.getStats(), r = R.getStats(), o = {};
|
|
2658
2671
|
if (typeof window < "u" && window.matchMedia) {
|
|
2659
2672
|
for (const [n, a] of Object.entries(b))
|
|
2660
2673
|
if (typeof a == "string")
|
|
@@ -2675,7 +2688,7 @@ class M {
|
|
|
2675
2688
|
};
|
|
2676
2689
|
}
|
|
2677
2690
|
}
|
|
2678
|
-
function
|
|
2691
|
+
function Je(s, e) {
|
|
2679
2692
|
const t = x();
|
|
2680
2693
|
return m(() => {
|
|
2681
2694
|
const i = t(), r = w(s);
|
|
@@ -2708,7 +2721,7 @@ function Ze(s, e) {
|
|
|
2708
2721
|
};
|
|
2709
2722
|
});
|
|
2710
2723
|
}
|
|
2711
|
-
class
|
|
2724
|
+
class et {
|
|
2712
2725
|
/**
|
|
2713
2726
|
* Test CSS features support
|
|
2714
2727
|
*/
|
|
@@ -2742,23 +2755,23 @@ class Ye {
|
|
|
2742
2755
|
}
|
|
2743
2756
|
typeof window < "u" && process.env.NODE_ENV !== "production" && (window.tachUIResponsive = {
|
|
2744
2757
|
devTools: M,
|
|
2745
|
-
inspector:
|
|
2746
|
-
compatibility:
|
|
2758
|
+
inspector: Je,
|
|
2759
|
+
compatibility: et,
|
|
2747
2760
|
logState: () => M.logResponsiveState(),
|
|
2748
2761
|
export: () => M.exportConfiguration()
|
|
2749
2762
|
});
|
|
2750
|
-
const
|
|
2763
|
+
const tt = {
|
|
2751
2764
|
name: "@tachui/responsive",
|
|
2752
|
-
version:
|
|
2765
|
+
version: Qe,
|
|
2753
2766
|
author: "TachUI Team",
|
|
2754
2767
|
verified: !0
|
|
2755
|
-
},
|
|
2768
|
+
}, L = 80, it = [
|
|
2756
2769
|
[
|
|
2757
2770
|
"responsive",
|
|
2758
2771
|
h,
|
|
2759
2772
|
{
|
|
2760
2773
|
category: "layout",
|
|
2761
|
-
priority:
|
|
2774
|
+
priority: L,
|
|
2762
2775
|
signature: "(config: ResponsiveStyleConfig) => Modifier",
|
|
2763
2776
|
description: "Applies responsive style mappings across configured breakpoints."
|
|
2764
2777
|
}
|
|
@@ -2768,7 +2781,7 @@ const Xe = {
|
|
|
2768
2781
|
$,
|
|
2769
2782
|
{
|
|
2770
2783
|
category: "layout",
|
|
2771
|
-
priority:
|
|
2784
|
+
priority: L,
|
|
2772
2785
|
signature: "(query: string, styles: Record<string, any>) => Modifier",
|
|
2773
2786
|
description: "Attaches custom CSS rules for a media query to a component."
|
|
2774
2787
|
}
|
|
@@ -2778,104 +2791,106 @@ const Xe = {
|
|
|
2778
2791
|
u,
|
|
2779
2792
|
{
|
|
2780
2793
|
category: "layout",
|
|
2781
|
-
priority:
|
|
2794
|
+
priority: L,
|
|
2782
2795
|
signature: "(property: string, value: ResponsiveValue<any>) => Modifier",
|
|
2783
2796
|
description: "Creates a responsive modifier from a single style property/value map."
|
|
2784
2797
|
}
|
|
2785
2798
|
],
|
|
2786
2799
|
[
|
|
2787
2800
|
"responsiveLayout",
|
|
2788
|
-
|
|
2801
|
+
ge,
|
|
2789
2802
|
{
|
|
2790
2803
|
category: "layout",
|
|
2791
|
-
priority:
|
|
2804
|
+
priority: L,
|
|
2792
2805
|
signature: "(config: ResponsiveLayoutConfig) => Modifier",
|
|
2793
2806
|
description: "Configures responsive flexbox layout properties such as direction, wrap, and gap."
|
|
2794
2807
|
}
|
|
2795
2808
|
]
|
|
2796
2809
|
];
|
|
2797
|
-
let
|
|
2798
|
-
function
|
|
2799
|
-
const e = s?.registry, t = s?.plugin ??
|
|
2800
|
-
!r &&
|
|
2801
|
-
|
|
2810
|
+
let ne = !1;
|
|
2811
|
+
function rt(s) {
|
|
2812
|
+
const e = s?.registry, t = s?.plugin ?? tt, i = s?.force === !0, r = !!(e || s?.plugin);
|
|
2813
|
+
!r && ne && !i || (it.forEach(([o, n, a]) => {
|
|
2814
|
+
qe(
|
|
2802
2815
|
o,
|
|
2803
2816
|
n,
|
|
2804
2817
|
a,
|
|
2805
2818
|
e,
|
|
2806
2819
|
t
|
|
2807
2820
|
);
|
|
2808
|
-
}), r || (
|
|
2821
|
+
}), r || (ne = !0));
|
|
2809
2822
|
}
|
|
2810
|
-
|
|
2823
|
+
rt();
|
|
2811
2824
|
export {
|
|
2812
2825
|
B as AdvancedBreakpointUtils,
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2826
|
+
gt as BreakpointPresets,
|
|
2827
|
+
et as BrowserCompatibility,
|
|
2828
|
+
fe as CSSInjector,
|
|
2829
|
+
It as Container,
|
|
2830
|
+
K as DEFAULT_BREAKPOINTS,
|
|
2831
|
+
Et as Flex,
|
|
2832
|
+
Pt as LayoutPatterns,
|
|
2820
2833
|
b as MediaQueries,
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2834
|
+
Ge as MediaQueryModifier,
|
|
2835
|
+
yt as OptimizedCSSGenerator,
|
|
2836
|
+
me as RESPONSIVE_MODIFIER_PRIORITY,
|
|
2837
|
+
_t as ResponsiveAdvanced,
|
|
2838
|
+
he as ResponsiveCSSGenerator,
|
|
2839
|
+
It as ResponsiveContainerPatterns,
|
|
2840
|
+
Xe as ResponsiveDataUtils,
|
|
2828
2841
|
M as ResponsiveDevTools,
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2842
|
+
Et as ResponsiveFlexPatterns,
|
|
2843
|
+
Ke as ResponsiveGrid,
|
|
2844
|
+
Ke as ResponsiveGridPatterns,
|
|
2845
|
+
Ze as ResponsiveHooks,
|
|
2846
|
+
Y as ResponsiveModifier,
|
|
2847
|
+
be as ResponsiveModifierBuilderImpl,
|
|
2835
2848
|
A as ResponsivePerformanceMonitor,
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2849
|
+
jt as ResponsiveSpacingPatterns,
|
|
2850
|
+
Ye as ResponsiveTargeting,
|
|
2851
|
+
Dt as ResponsiveTypography,
|
|
2852
|
+
Dt as ResponsiveTypographyPatterns,
|
|
2853
|
+
Tt as ResponsiveVisibilityPatterns,
|
|
2854
|
+
jt as Spacing,
|
|
2855
|
+
Tt as Visibility,
|
|
2856
|
+
pt as __resetResponsiveSystemForTests,
|
|
2857
|
+
lt as __syncResponsiveSignalsForTests,
|
|
2858
|
+
Z as breakpointToPixels,
|
|
2859
|
+
Rt as combineMediaQueries,
|
|
2860
|
+
ct as configureBreakpoints,
|
|
2846
2861
|
S as createBreakpointContext,
|
|
2847
2862
|
$ as createMediaQueryModifier,
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2863
|
+
wt as createResponsiveBuilder,
|
|
2864
|
+
kt as createResponsiveCSSVariables,
|
|
2865
|
+
ge as createResponsiveLayoutModifier,
|
|
2851
2866
|
h as createResponsiveModifier,
|
|
2852
2867
|
u as createResponsivePropertyModifier,
|
|
2853
|
-
|
|
2868
|
+
Ot as createResponsiveVisibility,
|
|
2854
2869
|
R as cssRuleCache,
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2870
|
+
Vt as enableResponsiveDebugOverlay,
|
|
2871
|
+
vt as generateCustomMediaQuery,
|
|
2872
|
+
He as generateMediaQuery,
|
|
2873
|
+
ht as generateRangeMediaQuery,
|
|
2874
|
+
bt as generateResponsiveProperty,
|
|
2860
2875
|
y as getBreakpointIndex,
|
|
2861
|
-
|
|
2862
|
-
|
|
2876
|
+
ft as getBreakpointsAbove,
|
|
2877
|
+
mt as getBreakpointsBelow,
|
|
2863
2878
|
x as getCurrentBreakpoint,
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2879
|
+
z as getCurrentBreakpointConfig,
|
|
2880
|
+
H as getSortedBreakpoints,
|
|
2881
|
+
dt as getViewportDimensions,
|
|
2882
|
+
ut as initializeResponsiveSystem,
|
|
2883
|
+
re as isBreakpointAbove,
|
|
2884
|
+
se as isBreakpointBelow,
|
|
2870
2885
|
w as isResponsiveValue,
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2886
|
+
ie as isValidBreakpointKey,
|
|
2887
|
+
Ue as logResponsiveState,
|
|
2888
|
+
Mt as orMediaQueries,
|
|
2889
|
+
rt as registerResponsiveModifiers,
|
|
2890
|
+
Bt as resolveResponsiveValue,
|
|
2891
|
+
St as useBreakpoint,
|
|
2892
|
+
Ct as useMediaQuery,
|
|
2893
|
+
Je as useResponsiveInspector,
|
|
2894
|
+
$t as useResponsiveValue,
|
|
2895
|
+
xt as withResponsive
|
|
2881
2896
|
};
|