@bedrock-layout/solid 1.7.5 → 2.0.1

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/lib/index.m.js CHANGED
@@ -1,7 +1,7 @@
1
- import ce from "open-props";
2
- import { splitProps as X, createMemo as N, createRenderEffect as A, sharedConfig as h, untrack as M, createComponent as I, mergeProps as d, useContext as ae, createContext as le, createSignal as O, onMount as q, createEffect as Q, onCleanup as Y, children as fe } from "solid-js";
3
- import { init as J, registerCallback as Z } from "@bedrock-layout/register-resize-callback";
4
- const ue = [
1
+ import { getSizeValue as A, getSpacingValue as w, getSafeGutter as B } from "@bedrock-layout/spacing-constants";
2
+ export * from "@bedrock-layout/spacing-constants";
3
+ import { splitProps as G, createMemo as P, sharedConfig as g, untrack as x, createRenderEffect as S, createComponent as V, mergeProps as y } from "solid-js";
4
+ const z = [
5
5
  "allowfullscreen",
6
6
  "async",
7
7
  "alpha",
@@ -43,7 +43,7 @@ const ue = [
43
43
  "shadowrootdelegatesfocus",
44
44
  "shadowrootserializable",
45
45
  "sharedstoragewritable"
46
- ], de = /* @__PURE__ */ new Set([
46
+ ], v = /* @__PURE__ */ new Set([
47
47
  "className",
48
48
  "value",
49
49
  "readOnly",
@@ -66,11 +66,11 @@ const ue = [
66
66
  "shadowRootDelegatesFocus",
67
67
  "shadowRootSerializable",
68
68
  "sharedStorageWritable",
69
- ...ue
70
- ]), ye = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), he = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
69
+ ...z
70
+ ]), H = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), U = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
71
71
  className: "class",
72
72
  htmlFor: "for"
73
- }), ge = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
73
+ }), _ = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
74
74
  class: "className",
75
75
  novalidate: {
76
76
  $: "noValidate",
@@ -155,11 +155,11 @@ const ue = [
155
155
  IMG: 1
156
156
  }
157
157
  });
158
- function me(e, t) {
159
- const n = ge[e];
158
+ function K(e, t) {
159
+ const n = _[e];
160
160
  return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
161
161
  }
162
- const be = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), $e = /* @__PURE__ */ new Set([
162
+ const X = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), q = /* @__PURE__ */ new Set([
163
163
  "altGlyph",
164
164
  "altGlyphDef",
165
165
  "altGlyphItem",
@@ -237,343 +237,331 @@ const be = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "context
237
237
  "use",
238
238
  "view",
239
239
  "vkern"
240
- ]), we = {
240
+ ]), Y = {
241
241
  xlink: "http://www.w3.org/1999/xlink",
242
242
  xml: "http://www.w3.org/XML/1998/namespace"
243
- }, B = (e) => N(() => e());
244
- function Se(e, t, n) {
245
- let i = n.length, s = t.length, o = i, c = 0, r = 0, a = t[s - 1].nextSibling, l = null;
246
- for (; c < s || r < o; ) {
247
- if (t[c] === n[r]) {
248
- c++, r++;
243
+ };
244
+ function J(e, t, n) {
245
+ let s = n.length, c = t.length, o = s, r = 0, i = 0, a = t[c - 1].nextSibling, l = null;
246
+ for (; r < c || i < o; ) {
247
+ if (t[r] === n[i]) {
248
+ r++, i++;
249
249
  continue;
250
250
  }
251
- for (; t[s - 1] === n[o - 1]; )
252
- s--, o--;
253
- if (s === c) {
254
- const f = o < i ? r ? n[r - 1].nextSibling : n[o - r] : a;
255
- for (; r < o; ) e.insertBefore(n[r++], f);
256
- } else if (o === r)
257
- for (; c < s; )
258
- (!l || !l.has(t[c])) && t[c].remove(), c++;
259
- else if (t[c] === n[o - 1] && n[r] === t[s - 1]) {
260
- const f = t[--s].nextSibling;
261
- e.insertBefore(n[r++], t[c++].nextSibling), e.insertBefore(n[--o], f), t[s] = n[o];
251
+ for (; t[c - 1] === n[o - 1]; )
252
+ c--, o--;
253
+ if (c === r) {
254
+ const u = o < s ? i ? n[i - 1].nextSibling : n[o - i] : a;
255
+ for (; i < o; ) e.insertBefore(n[i++], u);
256
+ } else if (o === i)
257
+ for (; r < c; )
258
+ (!l || !l.has(t[r])) && t[r].remove(), r++;
259
+ else if (t[r] === n[o - 1] && n[i] === t[c - 1]) {
260
+ const u = t[--c].nextSibling;
261
+ e.insertBefore(n[i++], t[r++].nextSibling), e.insertBefore(n[--o], u), t[c] = n[o];
262
262
  } else {
263
263
  if (!l) {
264
264
  l = /* @__PURE__ */ new Map();
265
- let y = r;
266
- for (; y < o; ) l.set(n[y], y++);
265
+ let d = i;
266
+ for (; d < o; ) l.set(n[d], d++);
267
267
  }
268
- const f = l.get(t[c]);
269
- if (f != null)
270
- if (r < f && f < o) {
271
- let y = c, u = 1, $;
272
- for (; ++y < s && y < o && !(($ = l.get(t[y])) == null || $ !== f + u); )
273
- u++;
274
- if (u > f - r) {
275
- const j = t[c];
276
- for (; r < f; ) e.insertBefore(n[r++], j);
277
- } else e.replaceChild(n[r++], t[c++]);
278
- } else c++;
279
- else t[c++].remove();
268
+ const u = l.get(t[r]);
269
+ if (u != null)
270
+ if (i < u && u < o) {
271
+ let d = r, f = 1, $;
272
+ for (; ++d < c && d < o && !(($ = l.get(t[d])) == null || $ !== u + f); )
273
+ f++;
274
+ if (f > u - i) {
275
+ const E = t[r];
276
+ for (; i < u; ) e.insertBefore(n[i++], E);
277
+ } else e.replaceChild(n[i++], t[r++]);
278
+ } else r++;
279
+ else t[r++].remove();
280
280
  }
281
281
  }
282
282
  }
283
- const F = "_$DX_DELEGATE";
284
- function K(e, t, n, i) {
285
- let s;
286
- const o = () => {
287
- const r = document.createElement("template");
288
- return r.innerHTML = e, r.content.firstChild;
289
- }, c = t ? () => M(() => document.importNode(s || (s = o()), !0)) : () => (s || (s = o())).cloneNode(!0);
290
- return c.cloneNode = c, c;
291
- }
292
- function Ae(e, t = window.document) {
293
- const n = t[F] || (t[F] = /* @__PURE__ */ new Set());
294
- for (let i = 0, s = e.length; i < s; i++) {
295
- const o = e[i];
296
- n.has(o) || (n.add(o), t.addEventListener(o, ve));
283
+ const M = "_$DX_DELEGATE";
284
+ function Q(e, t = window.document) {
285
+ const n = t[M] || (t[M] = /* @__PURE__ */ new Set());
286
+ for (let s = 0, c = e.length; s < c; s++) {
287
+ const o = e[s];
288
+ n.has(o) || (n.add(o), t.addEventListener(o, le));
297
289
  }
298
290
  }
299
- function k(e, t, n) {
300
- x(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
291
+ function I(e, t, n) {
292
+ j(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
301
293
  }
302
- function xe(e, t, n, i) {
303
- x(e) || (i == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, i));
294
+ function Z(e, t, n, s) {
295
+ j(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
304
296
  }
305
- function Ce(e, t, n) {
306
- x(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
297
+ function p(e, t, n) {
298
+ j(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
307
299
  }
308
- function je(e, t) {
309
- x(e) || (t == null ? e.removeAttribute("class") : e.className = t);
300
+ function ee(e, t) {
301
+ j(e) || (t == null ? e.removeAttribute("class") : e.className = t);
310
302
  }
311
- function Ee(e, t, n, i) {
312
- if (i)
303
+ function te(e, t, n, s) {
304
+ if (s)
313
305
  Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
314
306
  else if (Array.isArray(n)) {
315
- const s = n[0];
316
- e.addEventListener(t, n[0] = (o) => s.call(e, n[1], o));
307
+ const c = n[0];
308
+ e.addEventListener(t, n[0] = (o) => c.call(e, n[1], o));
317
309
  } else e.addEventListener(t, n, typeof n != "function" && n);
318
310
  }
319
- function Ie(e, t, n = {}) {
320
- const i = Object.keys(t || {}), s = Object.keys(n);
321
- let o, c;
322
- for (o = 0, c = s.length; o < c; o++) {
323
- const r = s[o];
324
- !r || r === "undefined" || t[r] || (G(e, r, !1), delete n[r]);
311
+ function ne(e, t, n = {}) {
312
+ const s = Object.keys(t || {}), c = Object.keys(n);
313
+ let o, r;
314
+ for (o = 0, r = c.length; o < r; o++) {
315
+ const i = c[o];
316
+ !i || i === "undefined" || t[i] || (N(e, i, !1), delete n[i]);
325
317
  }
326
- for (o = 0, c = i.length; o < c; o++) {
327
- const r = i[o], a = !!t[r];
328
- !r || r === "undefined" || n[r] === a || !a || (G(e, r, !0), n[r] = a);
318
+ for (o = 0, r = s.length; o < r; o++) {
319
+ const i = s[o], a = !!t[i];
320
+ !i || i === "undefined" || n[i] === a || !a || (N(e, i, !0), n[i] = a);
329
321
  }
330
322
  return n;
331
323
  }
332
- function p(e, t, n) {
333
- if (!t) return n ? k(e, "style") : t;
334
- const i = e.style;
335
- if (typeof t == "string") return i.cssText = t;
336
- typeof n == "string" && (i.cssText = n = void 0), n || (n = {}), t || (t = {});
337
- let s, o;
324
+ function ie(e, t, n) {
325
+ if (!t) return n ? I(e, "style") : t;
326
+ const s = e.style;
327
+ if (typeof t == "string") return s.cssText = t;
328
+ typeof n == "string" && (s.cssText = n = void 0), n || (n = {}), t || (t = {});
329
+ let c, o;
338
330
  for (o in n)
339
- t[o] == null && i.removeProperty(o), delete n[o];
331
+ t[o] == null && s.removeProperty(o), delete n[o];
340
332
  for (o in t)
341
- s = t[o], s !== n[o] && (i.setProperty(o, s), n[o] = s);
333
+ c = t[o], c !== n[o] && (s.setProperty(o, c), n[o] = c);
342
334
  return n;
343
335
  }
344
- function Te(e, t = {}, n, i) {
345
- const s = {};
346
- return A(() => s.children = T(e, t.children, s.children)), A(() => typeof t.ref == "function" && ee(t.ref, e)), A(() => Pe(e, t, n, !0, s, !0)), s;
336
+ function se(e, t = {}, n, s) {
337
+ const c = {};
338
+ return S(() => c.children = T(e, t.children, c.children)), S(() => typeof t.ref == "function" && oe(t.ref, e)), S(() => ce(e, t, n, !0, c, !0)), c;
347
339
  }
348
- function ee(e, t, n) {
349
- return M(() => e(t, n));
340
+ function oe(e, t, n) {
341
+ return x(() => e(t, n));
350
342
  }
351
- function te(e, t, n, i) {
352
- if (typeof t != "function") return T(e, t, i, n);
353
- A((s) => T(e, t(), s, n), i);
354
- }
355
- function Pe(e, t, n, i, s = {}, o = !1) {
343
+ function ce(e, t, n, s, c = {}, o = !1) {
356
344
  t || (t = {});
357
- for (const c in s)
358
- if (!(c in t)) {
359
- if (c === "children") continue;
360
- s[c] = H(e, c, null, s[c], n, o, t);
345
+ for (const r in c)
346
+ if (!(r in t)) {
347
+ if (r === "children") continue;
348
+ c[r] = k(e, r, null, c[r], n, o, t);
361
349
  }
362
- for (const c in t) {
363
- if (c === "children")
350
+ for (const r in t) {
351
+ if (r === "children")
364
352
  continue;
365
- const r = t[c];
366
- s[c] = H(e, c, r, s[c], n, o, t);
353
+ const i = t[r];
354
+ c[r] = k(e, r, i, c[r], n, o, t);
367
355
  }
368
356
  }
369
- function Me(e) {
357
+ function re(e) {
370
358
  let t, n;
371
- return !x() || !(t = h.registry.get(n = ze())) ? e() : (h.completed && h.completed.add(t), h.registry.delete(n), t);
359
+ return !j() || !(t = g.registry.get(n = fe())) ? e() : (g.completed && g.completed.add(t), g.registry.delete(n), t);
372
360
  }
373
- function x(e) {
374
- return !!h.context && !h.done && (!e || e.isConnected);
361
+ function j(e) {
362
+ return !!g.context && !g.done && (!e || e.isConnected);
375
363
  }
376
- function Oe(e) {
364
+ function ae(e) {
377
365
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
378
366
  }
379
- function G(e, t, n) {
380
- const i = t.trim().split(/\s+/);
381
- for (let s = 0, o = i.length; s < o; s++) e.classList.toggle(i[s], n);
367
+ function N(e, t, n) {
368
+ const s = t.trim().split(/\s+/);
369
+ for (let c = 0, o = s.length; c < o; c++) e.classList.toggle(s[c], n);
382
370
  }
383
- function H(e, t, n, i, s, o, c) {
384
- let r, a, l, f, y;
385
- if (t === "style") return p(e, n, i);
386
- if (t === "classList") return Ie(e, n, i);
387
- if (n === i) return i;
371
+ function k(e, t, n, s, c, o, r) {
372
+ let i, a, l, u, d;
373
+ if (t === "style") return ie(e, n, s);
374
+ if (t === "classList") return ne(e, n, s);
375
+ if (n === s) return s;
388
376
  if (t === "ref")
389
377
  o || n(e);
390
378
  else if (t.slice(0, 3) === "on:") {
391
- const u = t.slice(3);
392
- i && e.removeEventListener(u, i, typeof i != "function" && i), n && e.addEventListener(u, n, typeof n != "function" && n);
379
+ const f = t.slice(3);
380
+ s && e.removeEventListener(f, s, typeof s != "function" && s), n && e.addEventListener(f, n, typeof n != "function" && n);
393
381
  } else if (t.slice(0, 10) === "oncapture:") {
394
- const u = t.slice(10);
395
- i && e.removeEventListener(u, i, !0), n && e.addEventListener(u, n, !0);
382
+ const f = t.slice(10);
383
+ s && e.removeEventListener(f, s, !0), n && e.addEventListener(f, n, !0);
396
384
  } else if (t.slice(0, 2) === "on") {
397
- const u = t.slice(2).toLowerCase(), $ = be.has(u);
398
- if (!$ && i) {
399
- const j = Array.isArray(i) ? i[0] : i;
400
- e.removeEventListener(u, j);
385
+ const f = t.slice(2).toLowerCase(), $ = X.has(f);
386
+ if (!$ && s) {
387
+ const E = Array.isArray(s) ? s[0] : s;
388
+ e.removeEventListener(f, E);
401
389
  }
402
- ($ || n) && (Ee(e, u, n, $), $ && Ae([u]));
390
+ ($ || n) && (te(e, f, n, $), $ && Q([f]));
403
391
  } else if (t.slice(0, 5) === "attr:")
404
- k(e, t.slice(5), n);
392
+ I(e, t.slice(5), n);
405
393
  else if (t.slice(0, 5) === "bool:")
406
- Ce(e, t.slice(5), n);
407
- else if ((y = t.slice(0, 5) === "prop:") || (l = ye.has(t)) || !s && ((f = me(t, e.tagName)) || (a = de.has(t))) || (r = e.nodeName.includes("-") || "is" in c)) {
408
- if (y)
394
+ p(e, t.slice(5), n);
395
+ else if ((d = t.slice(0, 5) === "prop:") || (l = H.has(t)) || !c && ((u = K(t, e.tagName)) || (a = v.has(t))) || (i = e.nodeName.includes("-") || "is" in r)) {
396
+ if (d)
409
397
  t = t.slice(5), a = !0;
410
- else if (x(e)) return n;
411
- t === "class" || t === "className" ? je(e, n) : r && !a && !l ? e[Oe(t)] = n : e[f || t] = n;
398
+ else if (j(e)) return n;
399
+ t === "class" || t === "className" ? ee(e, n) : i && !a && !l ? e[ae(t)] = n : e[u || t] = n;
412
400
  } else {
413
- const u = s && t.indexOf(":") > -1 && we[t.split(":")[0]];
414
- u ? xe(e, u, t, n) : k(e, he[t] || t, n);
401
+ const f = c && t.indexOf(":") > -1 && Y[t.split(":")[0]];
402
+ f ? Z(e, f, t, n) : I(e, U[t] || t, n);
415
403
  }
416
404
  return n;
417
405
  }
418
- function ve(e) {
419
- if (h.registry && h.events && h.events.find(([a, l]) => l === e))
406
+ function le(e) {
407
+ if (g.registry && g.events && g.events.find(([a, l]) => l === e))
420
408
  return;
421
409
  let t = e.target;
422
- const n = `$$${e.type}`, i = e.target, s = e.currentTarget, o = (a) => Object.defineProperty(e, "target", {
410
+ const n = `$$${e.type}`, s = e.target, c = e.currentTarget, o = (a) => Object.defineProperty(e, "target", {
423
411
  configurable: !0,
424
412
  value: a
425
- }), c = () => {
413
+ }), r = () => {
426
414
  const a = t[n];
427
415
  if (a && !t.disabled) {
428
416
  const l = t[`${n}Data`];
429
417
  if (l !== void 0 ? a.call(t, l, e) : a.call(t, e), e.cancelBubble) return;
430
418
  }
431
419
  return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && o(t.host), !0;
432
- }, r = () => {
433
- for (; c() && (t = t._$host || t.parentNode || t.host); ) ;
420
+ }, i = () => {
421
+ for (; r() && (t = t._$host || t.parentNode || t.host); ) ;
434
422
  };
435
423
  if (Object.defineProperty(e, "currentTarget", {
436
424
  configurable: !0,
437
425
  get() {
438
426
  return t || document;
439
427
  }
440
- }), h.registry && !h.done && (h.done = _$HY.done = !0), e.composedPath) {
428
+ }), g.registry && !g.done && (g.done = _$HY.done = !0), e.composedPath) {
441
429
  const a = e.composedPath();
442
430
  o(a[0]);
443
- for (let l = 0; l < a.length - 2 && (t = a[l], !!c()); l++) {
431
+ for (let l = 0; l < a.length - 2 && (t = a[l], !!r()); l++) {
444
432
  if (t._$host) {
445
- t = t._$host, r();
433
+ t = t._$host, i();
446
434
  break;
447
435
  }
448
- if (t.parentNode === s)
436
+ if (t.parentNode === c)
449
437
  break;
450
438
  }
451
- } else r();
452
- o(i);
439
+ } else i();
440
+ o(s);
453
441
  }
454
- function T(e, t, n, i, s) {
455
- const o = x(e);
442
+ function T(e, t, n, s, c) {
443
+ const o = j(e);
456
444
  if (o) {
457
445
  !n && (n = [...e.childNodes]);
458
- let r = [];
446
+ let i = [];
459
447
  for (let a = 0; a < n.length; a++) {
460
448
  const l = n[a];
461
- l.nodeType === 8 && l.data.slice(0, 2) === "!$" ? l.remove() : r.push(l);
449
+ l.nodeType === 8 && l.data.slice(0, 2) === "!$" ? l.remove() : i.push(l);
462
450
  }
463
- n = r;
451
+ n = i;
464
452
  }
465
453
  for (; typeof n == "function"; ) n = n();
466
454
  if (t === n) return n;
467
- const c = typeof t;
468
- if (e = e, c === "string" || c === "number") {
469
- if (o || c === "number" && (t = t.toString(), t === n))
455
+ const r = typeof t;
456
+ if (e = e, r === "string" || r === "number") {
457
+ if (o || r === "number" && (t = t.toString(), t === n))
470
458
  return n;
471
459
  n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
472
- } else if (t == null || c === "boolean") {
460
+ } else if (t == null || r === "boolean") {
473
461
  if (o) return n;
474
- n = P(e, n, i);
462
+ n = C(e, n, s);
475
463
  } else {
476
- if (c === "function")
477
- return A(() => {
478
- let r = t();
479
- for (; typeof r == "function"; ) r = r();
480
- n = T(e, r, n, i);
464
+ if (r === "function")
465
+ return S(() => {
466
+ let i = t();
467
+ for (; typeof i == "function"; ) i = i();
468
+ n = T(e, i, n, s);
481
469
  }), () => n;
482
470
  if (Array.isArray(t)) {
483
- const r = [], a = n && Array.isArray(n);
484
- if (L(r, t, n, s))
485
- return A(() => n = T(e, r, n, i, !0)), () => n;
471
+ const i = [], a = n && Array.isArray(n);
472
+ if (O(i, t, n, c))
473
+ return S(() => n = T(e, i, n, s, !0)), () => n;
486
474
  if (o)
487
- return r.length ? n = [...e.childNodes] : n;
488
- r.length === 0 ? n = P(e, n, i) : a ? n.length === 0 ? V(e, r, i) : Se(e, n, r) : (n && P(e), V(e, r)), n = r;
475
+ return i.length ? n = [...e.childNodes] : n;
476
+ i.length === 0 ? n = C(e, n, s) : a ? n.length === 0 ? L(e, i, s) : J(e, n, i) : (n && C(e), L(e, i)), n = i;
489
477
  } else if (t.nodeType) {
490
478
  if (o && t.parentNode) return n = t;
491
- Array.isArray(n) ? P(e, n, null, t) : n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild), n = t;
479
+ Array.isArray(n) ? C(e, n, null, t) : n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild), n = t;
492
480
  }
493
481
  }
494
482
  return n;
495
483
  }
496
- function L(e, t, n, i) {
497
- let s = !1;
498
- for (let o = 0, c = t.length; o < c; o++) {
499
- let r = t[o], a = n && n[e.length], l;
500
- if (!(r == null || r === !0 || r === !1)) if ((l = typeof r) == "object" && r.nodeType)
501
- e.push(r);
502
- else if (Array.isArray(r))
503
- s = L(e, r, a) || s;
484
+ function O(e, t, n, s) {
485
+ let c = !1;
486
+ for (let o = 0, r = t.length; o < r; o++) {
487
+ let i = t[o], a = n && n[e.length], l;
488
+ if (!(i == null || i === !0 || i === !1)) if ((l = typeof i) == "object" && i.nodeType)
489
+ e.push(i);
490
+ else if (Array.isArray(i))
491
+ c = O(e, i, a) || c;
504
492
  else if (l === "function")
505
- if (i) {
506
- for (; typeof r == "function"; ) r = r();
507
- s = L(e, Array.isArray(r) ? r : [r], Array.isArray(a) ? a : [a]) || s;
493
+ if (s) {
494
+ for (; typeof i == "function"; ) i = i();
495
+ c = O(e, Array.isArray(i) ? i : [i], Array.isArray(a) ? a : [a]) || c;
508
496
  } else
509
- e.push(r), s = !0;
497
+ e.push(i), c = !0;
510
498
  else {
511
- const f = String(r);
512
- a && a.nodeType === 3 && a.data === f ? e.push(a) : e.push(document.createTextNode(f));
499
+ const u = String(i);
500
+ a && a.nodeType === 3 && a.data === u ? e.push(a) : e.push(document.createTextNode(u));
513
501
  }
514
502
  }
515
- return s;
503
+ return c;
516
504
  }
517
- function V(e, t, n = null) {
518
- for (let i = 0, s = t.length; i < s; i++) e.insertBefore(t[i], n);
505
+ function L(e, t, n = null) {
506
+ for (let s = 0, c = t.length; s < c; s++) e.insertBefore(t[s], n);
519
507
  }
520
- function P(e, t, n, i) {
508
+ function C(e, t, n, s) {
521
509
  if (n === void 0) return e.textContent = "";
522
- const s = i || document.createTextNode("");
510
+ const c = s || document.createTextNode("");
523
511
  if (t.length) {
524
512
  let o = !1;
525
- for (let c = t.length - 1; c >= 0; c--) {
526
- const r = t[c];
527
- if (s !== r) {
528
- const a = r.parentNode === e;
529
- !o && !c ? a ? e.replaceChild(s, r) : e.insertBefore(s, n) : a && r.remove();
513
+ for (let r = t.length - 1; r >= 0; r--) {
514
+ const i = t[r];
515
+ if (c !== i) {
516
+ const a = i.parentNode === e;
517
+ !o && !r ? a ? e.replaceChild(c, i) : e.insertBefore(c, n) : a && i.remove();
530
518
  } else o = !0;
531
519
  }
532
- } else e.insertBefore(s, n);
533
- return [s];
520
+ } else e.insertBefore(c, n);
521
+ return [c];
534
522
  }
535
- function ze() {
536
- return h.getNextContextId();
523
+ function fe() {
524
+ return g.getNextContextId();
537
525
  }
538
- const Ne = "http://www.w3.org/2000/svg";
539
- function ke(e, t = !1, n = void 0) {
540
- return t ? document.createElementNS(Ne, e) : document.createElement(e, {
526
+ const ue = "http://www.w3.org/2000/svg";
527
+ function de(e, t = !1, n = void 0) {
528
+ return t ? document.createElementNS(ue, e) : document.createElement(e, {
541
529
  is: n
542
530
  });
543
531
  }
544
- function Le(e, t) {
545
- const n = N(e);
546
- return N(() => {
547
- const i = n();
548
- switch (typeof i) {
532
+ function ye(e, t) {
533
+ const n = P(e);
534
+ return P(() => {
535
+ const s = n();
536
+ switch (typeof s) {
549
537
  case "function":
550
- return M(() => i(t));
538
+ return x(() => s(t));
551
539
  case "string":
552
- const s = $e.has(i), o = h.context ? Me() : ke(i, s, M(() => t.is));
553
- return Te(o, t, s), o;
540
+ const c = q.has(s), o = g.context ? re() : de(s, c, x(() => t.is));
541
+ return se(o, t, c), o;
554
542
  }
555
543
  });
556
544
  }
557
- function Re(e) {
558
- const [, t] = X(e, ["component"]);
559
- return Le(() => e.component, t);
545
+ function ge(e) {
546
+ const [, t] = G(e, ["component"]);
547
+ return ye(() => e.component, t);
560
548
  }
561
- function C(e) {
549
+ function he(e) {
562
550
  return e ?? void 0;
563
551
  }
564
- function g(e, t) {
565
- return Object.keys(e).filter((n) => !t.includes(n)).reduce((n, i) => Object.defineProperty({
552
+ function h(e, t) {
553
+ return Object.keys(e).filter((n) => !t.includes(n)).reduce((n, s) => Object.defineProperty({
566
554
  ...n
567
- }, i, {
555
+ }, s, {
568
556
  get() {
569
- return e[i];
557
+ return e[s];
570
558
  },
571
559
  configurable: !0,
572
560
  enumerable: !0
573
561
  }), {});
574
562
  }
575
563
  function m(e, t) {
576
- return I(Re, d({
564
+ return V(ge, y({
577
565
  get component() {
578
566
  return e();
579
567
  }
@@ -581,340 +569,99 @@ function m(e, t) {
581
569
  }
582
570
  function b(e) {
583
571
  return Object.values(e).every((t) => typeof t == "function") ? Object.keys(e).reduce((t, n) => {
584
- const i = e[n];
572
+ const s = e[n];
585
573
  return Object.defineProperty(t, n, {
586
574
  get() {
587
- return i();
575
+ return s();
588
576
  },
589
577
  configurable: !0,
590
578
  enumerable: !0
591
579
  });
592
580
  }, {}) : new Error("Please provide an object with accessor values only.");
593
581
  }
594
- const ne = /^--\D{1}.{0,100}$/;
595
- function ie(e) {
596
- return ne.test(e);
597
- }
598
- function D(e) {
599
- return typeof e != "string" ? !1 : [/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/, /^var\(--\D{1}.{0,100}\)$/, ne].some((t) => t.test(e));
600
- }
601
- const {
602
- sizeXxs: De,
603
- sizeXs: We,
604
- sizeSm: Be,
605
- sizeMd: Fe,
606
- sizeLg: Ge,
607
- sizeXl: He,
608
- sizeXxl: Ve,
609
- sizeContent1: _e,
610
- sizeContent2: Ue,
611
- sizeContent3: Xe,
612
- sizeHeader1: qe,
613
- sizeHeader2: Qe,
614
- sizeHeader3: Ye,
615
- size000: Je,
616
- size00: Ze,
617
- size1: Ke,
618
- size2: pe,
619
- size3: et,
620
- size4: tt,
621
- size5: nt,
622
- size6: it,
623
- size7: st,
624
- size8: ot,
625
- size9: rt,
626
- size10: ct,
627
- size11: at,
628
- size12: lt,
629
- size13: ft,
630
- size14: ut,
631
- size15: dt
632
- } = ce, yt = {
633
- size000: Je,
634
- size00: Ze,
635
- size1: Ke,
636
- size2: pe,
637
- size3: et,
638
- size4: tt,
639
- size5: nt,
640
- size6: it,
641
- size7: st,
642
- size8: ot,
643
- size9: rt,
644
- size10: ct,
645
- size11: at,
646
- size12: lt,
647
- size13: ft,
648
- size14: ut,
649
- size15: dt
650
- }, ht = {
651
- sizeXxs: De,
652
- sizeXs: We,
653
- sizeSm: Be,
654
- sizeMd: Fe,
655
- sizeLg: Ge,
656
- sizeXl: He,
657
- sizeXxl: Ve,
658
- sizeContent1: _e,
659
- sizeContent2: Ue,
660
- sizeContent3: Xe,
661
- sizeHeader1: qe,
662
- sizeHeader2: Qe,
663
- sizeHeader3: Ye
664
- }, gt = yt, mt = ht;
665
- function se(e) {
666
- return e.reduce((t, [n, i]) => ({
667
- ...t,
668
- [n]: i
669
- }), {});
670
- }
671
- function _(e, t) {
672
- if (t !== void 0)
673
- return typeof t == "number" && t >= 0 ? `${t}px` : typeof t == "string" && D(t) ? ie(t) ? `var(${t})` : t : C(w(e, t));
674
- }
675
- function w(e, t) {
676
- const n = e.space ?? gt, i = se(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
677
- return C(i[t]);
678
- }
679
- function v(e, t) {
680
- if (t === void 0) return;
681
- if (typeof t == "number" && t >= 0) return `${t}px`;
682
- if (typeof t == "string" && D(t)) return ie(t) ? `var(${t})` : t;
683
- const n = e.sizes ?? mt, i = se(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
684
- return C(i[t]);
685
- }
686
- function bt(e) {
687
- return e === void 0 ? "100%" : typeof e == "number" ? `${e}px` : e;
582
+ function me(e) {
583
+ return e === void 0 ? "100%" : typeof e == "number" ? `${e}px` : A(e) ?? e;
688
584
  }
689
- function Gt(e) {
690
- const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), n = () => `--maxWidth: ${bt(e.maxWidth)};`, i = () => e.centerText ? "center-text" : "", s = () => e.centerChildren ? "center-children" : "", o = () => [i(), s()].filter(Boolean).join(" "), c = () => [t(), n()].join("; ");
691
- return m(() => e.as ?? "div", d(g(e, ["as", "maxWidth", "centerText", "centerChildren"]), b({
585
+ function Pe(e) {
586
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [r, i]) => o + `${r}:${i};`, ""), n = () => `--max-width: ${me(e.maxWidth)};`, s = () => "", c = () => [t(), n()].join("; ");
587
+ return m(() => e.as ?? "div", y(h(e, ["as", "maxWidth"]), b({
692
588
  style: c,
693
- "data-br-center": o
589
+ "data-br-center": s
694
590
  })));
695
591
  }
696
- const oe = le({});
697
- function Ht(e) {
698
- return I(oe.Provider, {
699
- get value() {
700
- return e.theme;
701
- },
702
- get children() {
703
- return e.children;
704
- }
705
- });
706
- }
707
- function S() {
708
- try {
709
- return ae(oe);
710
- } catch {
711
- return {};
712
- }
713
- }
714
- function $t(e, t) {
715
- return v(e, t);
592
+ function be(e) {
593
+ return A(e);
716
594
  }
717
- function Vt(e) {
718
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${$t(t, e.minItemWidth)}`, o = () => e.noStretchedColumns === !0 ? "no-stretched-columns" : "", c = () => [n(), i(), s()].join("; ");
719
- return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "minItemWidth", "noStretchedColumns"]), b({
720
- style: c,
721
- "data-br-column-drop": o
595
+ function Me(e) {
596
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [i, a]) => r + `${i}:${a};`, ""), n = () => `--gap: ${w(e.gap ?? "size00") ?? "0px"}`, s = () => `--min-item-width: ${be(e.minItemWidth)}`, c = () => e.variant === "centered" ? "variant:centered" : "", o = () => [t(), n(), s()].join("; ");
597
+ return m(() => e.as ?? "div", y(h(e, ["as", "minItemWidth", "variant"]), b({
598
+ style: o,
599
+ "data-br-column-drop": c
722
600
  })));
723
601
  }
724
- function _t(e, t) {
725
- const [n, i] = O(!1), [s, o] = O();
726
- return q(() => {
727
- J();
728
- }), Q(() => {
729
- if (C(s()) === void 0) return;
730
- t && t(s());
731
- const c = Z(s(), (r) => {
732
- var l;
733
- const a = ((l = r.borderBoxSize) == null ? void 0 : l.inlineSize) ?? r.contentRect.width;
734
- if (a > 0) {
735
- const f = a <= e;
736
- i(f);
737
- }
738
- });
739
- Y(c);
740
- }), [n, o];
741
- }
742
- function wt(e) {
743
- return Array.isArray(e) && e.length === 2 && e.every(Number.isFinite) || typeof e == "string" && /^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e);
602
+ function $e(e) {
603
+ return Array.isArray(e) && e.length === 2 && e.every(Number.isFinite) || typeof e == "string" && /^\d{1,1000} ?\/ ?\d{1,1000}$/.test(e);
744
604
  }
745
- function St(e) {
605
+ function we(e) {
746
606
  return Array.isArray(e) ? e.join("/") : e;
747
607
  }
748
- function At(e) {
749
- return wt(e) ? St(e) : void 0;
608
+ function Ae(e) {
609
+ return $e(e) ? we(e) : void 0;
750
610
  }
751
- function Ut(e) {
752
- const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [r, a]) => c + `${r}:${a};`, ""), n = () => At(e.ratio), i = () => n() ? `--ratio: ${n()}` : "", s = () => typeof e.position == "string" ? `--position: ${e.position}` : "50%", o = () => [t(), i(), s()].join("; ");
753
- return m(() => e.as ?? "div", d(g(e, ["as", "ratio", "position"]), b({
611
+ function Ne(e) {
612
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [i, a]) => r + `${i}:${a};`, ""), n = () => Ae(e.ratio), s = () => n() ? `--ratio: ${n()}` : "", c = () => typeof e.position == "string" ? `--position: ${e.position}` : "50%", o = () => [t(), s(), c()].join("; ");
613
+ return m(() => e.as ?? "div", y(h(e, ["as", "ratio", "position"]), b({
754
614
  style: o,
755
615
  "data-br-frame": () => ""
756
616
  })));
757
617
  }
758
- function xt(e) {
759
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [r, a]) => c + `${r}:${a};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth ?? 0}px`};`, o = () => [n(), i(), s()].join("; ");
760
- return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "minItemWidth"]), b({
761
- style: o,
618
+ function ke(e) {
619
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [r, i]) => o + `${r}:${i};`, ""), n = () => `--gap: ${w(e.gap ?? "size00") ?? "0px"}`, s = () => `--min-item-width: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth ?? 0}px`};`, c = () => [t(), n(), s()].join("; ");
620
+ return m(() => e.as ?? "div", y(h(e, ["as", "minItemWidth"]), b({
621
+ style: c,
762
622
  "data-br-grid": () => e.variant === "masonry" ? "variant:masonry" : ""
763
623
  })));
764
624
  }
765
- const E = 96;
766
- function re(e) {
767
- const t = String(e), n = parseFloat(t), [, i] = t.match(/[\d.\-+]*\s*(.*)/) ?? ["", ""];
768
- return [n, i];
769
- }
770
- function W(e, t) {
771
- if (!e) return;
772
- const n = t ?? document.body, i = (e ?? "px").trim().toLowerCase();
773
- switch (i) {
774
- case "vmin":
775
- case "vmax":
776
- case "vh":
777
- case "vw":
778
- case "%":
779
- return;
780
- case "ch":
781
- case "ex":
782
- return Ct(i, n);
783
- case "em":
784
- return R(n, "font-size");
785
- case "rem":
786
- return R(document.body, "font-size");
787
- case "in":
788
- return E;
789
- case "cm":
790
- return E / 2.54;
791
- case "mm":
792
- return E / 25.4;
793
- case "pt":
794
- return E / 72;
795
- case "pc":
796
- return E / 6;
797
- case "px":
798
- return 1;
799
- default: {
800
- const [s, o] = re(i);
801
- if (isNaN(s)) return;
802
- if (!o) return s;
803
- const c = W(o, t);
804
- return typeof c == "number" ? s * c : void 0;
805
- }
806
- }
807
- }
808
- function R(e, t) {
809
- const [n, i] = re(
810
- getComputedStyle(e).getPropertyValue(t)
811
- );
812
- return n * (W(i, e) ?? 1);
813
- }
814
- function Ct(e, t) {
815
- const n = document.createElement("div");
816
- n.style.height = "128" + e, t.appendChild(n);
817
- const i = R(n, "height") / 128;
818
- return t.removeChild(n), i;
819
- }
820
- var jt = /* @__PURE__ */ K("<div>");
821
- const z = 1, Et = typeof window == "object" && typeof document == "object" && document.nodeType === 9, It = (e) => {
822
- const [t, n] = O(1), [i, s] = O(), o = S();
823
- return q(() => (J(), 0)), Q(() => {
824
- const c = C(i());
825
- if (c === void 0) return;
826
- const r = Z(c, ({
827
- target: a
828
- }) => {
829
- n(1);
830
- const l = e.gutter ? w(o, e.gutter) ?? "1px" : "1px", f = Et ? W(l, a) : void 0, y = Math.max(f ?? z, z), [u] = Array.from(a.children), $ = 1 + Math.min(a.scrollHeight, u.scrollHeight), j = Math.max(Math.ceil($ / y), z);
831
- return n(j), 0;
832
- });
833
- return Y(r), 0;
834
- }), (() => {
835
- var c = jt();
836
- return ee(s, c), te(c, () => e.children), A((r) => p(c, `grid-row: span ${t()};`, r)), c;
837
- })();
838
- }, Xt = (e) => {
839
- const t = fe(() => e.children), i = [].concat(t()).filter(Boolean).map((s) => I(It, {
840
- get gutter() {
841
- return e.gutter;
842
- },
843
- children: s
844
- }));
845
- return I(xt, d({
846
- style: "grid-template-rows: 1px;"
847
- }, e, {
848
- children: i
849
- }));
850
- }, Tt = {
625
+ const je = {
851
626
  start: "justify:start",
852
627
  end: "justify:end",
853
628
  center: "justify:center",
854
629
  "space-between": "justify:space-between",
855
630
  "space-around": "justify:space-around"
856
- }, Pt = {
631
+ }, R = {
857
632
  start: "align:start",
858
633
  end: "align:end",
859
634
  center: "align:center",
860
635
  stretch: "align:stretch"
861
636
  };
862
- function qt(e) {
863
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((a, [l, f]) => a + `${l}:${f};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => e.justify !== void 0 ? Tt[e.justify] : void 0, o = () => e.align !== void 0 ? Pt[e.align] : void 0, c = () => [n(), i()].join("; "), r = () => [s(), o()].filter(Boolean).join(" ");
864
- return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "justify", "align"]), b({
865
- style: c,
637
+ function Le(e) {
638
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((i, [a, l]) => i + `${a}:${l};`, ""), n = () => `--gap: ${w(e.gap ?? "size00") ?? "0px"}`, s = () => e.justify ? je[e.justify] : void 0, c = () => e.align ? R[e.align] : R.center, o = () => [t(), n()].join("; "), r = () => [s(), c()].filter(Boolean).join(" ");
639
+ return m(() => e.as ?? "div", y(h(e, ["as", "justify", "align", "gap"]), b({
640
+ style: o,
866
641
  "data-br-inline-cluster": r
867
642
  })));
868
643
  }
869
- const Mt = {
644
+ const Se = {
870
645
  start: "justify:start",
871
646
  end: "justify:end",
872
647
  center: "justify:center",
873
648
  "space-between": "justify:space-between",
874
649
  "space-around": "justify:space-around"
875
- }, Ot = {
650
+ }, D = {
876
651
  start: "align:start",
877
652
  end: "align:end",
878
653
  center: "align:center",
879
654
  stretch: "align:stretch"
880
655
  };
881
- function Qt(e) {
882
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((y, [u, $]) => y + `${u}:${$};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => e.minItemWidth ? `--minItemWidth: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth}px`};` : void 0, o = () => e.switchAt ? `--switchAt: ${v(t, e.switchAt) ?? "0px"};` : "", c = () => e.justify !== void 0 ? Mt[e.justify] : void 0, r = () => e.align !== void 0 ? Ot[e.align] : void 0, a = () => e.stretch ? `stretch:${e.stretch}` : void 0, l = () => [n(), i(), o(), s()].join("; "), f = () => [c(), r(), a()].filter(Boolean).join(" ");
883
- return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "justify", "align", "stretch", "switchAt"]), b({
656
+ function Re(e) {
657
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((d, [f, $]) => d + `${f}:${$};`, ""), n = () => `--gap: ${w(e.gap ?? "size00") ?? "0px"}`, s = (d) => typeof d == "string" ? A(d) ?? d : `${d}px`, c = () => e.minItemWidth ? `--min-item-width: ${s(e.minItemWidth)};` : void 0, o = () => e.switchAt ? `--switch-at: ${A(e.switchAt) ?? "0px"};` : "", r = () => e.justify ? Se[e.justify] : void 0, i = () => e.align === void 0 ? D.center : D[e.align], a = () => e.stretch ? `stretch:${e.stretch}` : void 0, l = () => [t(), n(), o(), c()].join("; "), u = () => [r(), i(), a()].filter(Boolean).join(" ");
658
+ return m(() => e.as ?? "div", y(h(e, ["as", "justify", "align", "stretch", "switchAt"]), b({
884
659
  style: l,
885
- "data-br-inline": f
660
+ "data-br-inline": u
886
661
  })));
887
662
  }
888
- const vt = (e) => ({
889
- left: "padding-inline-start",
890
- right: "padding-inline-end",
891
- top: "padding-block-start",
892
- bottom: "padding-block-end",
893
- inlineStart: "padding-inline-start",
894
- inlineEnd: "padding-inline-end",
895
- blockStart: "padding-block-start",
896
- blockEnd: "padding-block-end"
897
- })[e], zt = (e, t) => {
898
- if (!t) return "";
899
- if (Array.isArray(t) && t.length > 4)
900
- throw new Error("padding arrays can only be 4 or less in length");
901
- const n = typeof t == "object" && !Array.isArray(t) ? Object.entries(t).reduce((i, [s, o]) => ({
902
- ...i,
903
- [vt(s)]: _(e, o) ?? "0px"
904
- }), {}) : {
905
- padding: Array.from(Array.isArray(t) ? t : [t]).map((i) => _(e, i) ?? "0px").join(" ")
906
- };
907
- return Object.entries(n).reduce((i, [s, o]) => i + `${s}:${o};`, "");
908
- };
909
- function Yt(e) {
910
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [c, r]) => o + `${c}:${r};`, ""), i = () => zt(t, e.padding), s = () => [n(), i()].join("; ");
911
- return m(() => e.as ?? "div", d(g(e, ["as", "padding"]), b({
912
- style: s,
913
- "data-br-padbox": () => ""
914
- })));
915
- }
916
- function Jt(e) {
917
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [r, a]) => c + `${r}:${a};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => {
663
+ function De(e) {
664
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [r, i]) => o + `${r}:${i};`, ""), n = () => `--gap: ${w(e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => {
918
665
  switch (e.snapType) {
919
666
  case "none":
920
667
  return "snapType:none";
@@ -925,13 +672,13 @@ function Jt(e) {
925
672
  default:
926
673
  return "snapType:none";
927
674
  }
928
- }, o = () => [n(), i()].join("; ");
929
- return m(() => e.as ?? "div", d(g(e, ["as", "gutter"]), b({
930
- style: o,
675
+ }, c = () => [t(), n()].join("; ");
676
+ return m(() => e.as ?? "div", y(h(e, ["as", "gutter"]), b({
677
+ style: c,
931
678
  "data-br-reel": s
932
679
  })));
933
680
  }
934
- const U = {
681
+ const W = {
935
682
  "1/4": "fraction:1/4",
936
683
  "1/3": "fraction:1/3",
937
684
  "1/2": "fraction:1/2",
@@ -940,85 +687,79 @@ const U = {
940
687
  "auto-start": "fraction:auto-start",
941
688
  "auto-end": "fraction:auto-end"
942
689
  };
943
- function Zt(e) {
944
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((a, [l, f]) => a + `${l}:${f};`, ""), i = () => e.switchAt ? `--switchAt: ${v(t, e.switchAt) ?? "0px"};` : "", s = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, o = () => U[e.fraction ?? "1/2"] ?? U["1/2"], c = () => e.minItemWidth ? `--minItemWidth: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth}px`};` : void 0, r = () => [n(), s(), i(), c()].join("; ");
945
- return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "fraction"]), b({
690
+ function We(e) {
691
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((i, [a, l]) => i + `${a}:${l};`, ""), n = () => e.switchAt ? `--switch-at: ${A(e.switchAt) ?? "0px"};` : "", s = () => `--gap: ${w(e.gap ?? "size00") ?? "0px"}`, c = () => W[e.fraction ?? "1/2"] ?? W["1/2"], o = () => e.minItemWidth ? `--min-item-width: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth}px`};` : void 0, r = () => [t(), s(), n(), o()].join("; ");
692
+ return m(() => e.as ?? "div", y(h(e, ["as", "fraction"]), b({
946
693
  style: r,
947
- "data-br-split": o
694
+ "data-br-split": c
948
695
  })));
949
696
  }
950
- const Nt = {
697
+ const Ce = {
951
698
  start: "align:start",
952
699
  end: "align:end",
953
700
  center: "align:center",
954
701
  stretch: "align:stretch"
955
702
  };
956
- function Kt(e) {
957
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => [n(), i()].join("; "), o = () => e.align !== void 0 ? Nt[e.align] : void 0, c = () => [o()].filter(Boolean).join(" ");
958
- return m(() => e.as ?? "div", d(g(e, ["as", "gutter"]), b({
703
+ function Ve(e) {
704
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [i, a]) => r + `${i}:${a};`, ""), n = () => `--gap: ${w(e.gap ?? "size00") ?? "0px"}`, s = () => [t(), n()].join("; "), c = () => e.align ? Ce[e.align] : void 0, o = () => [c()].filter(Boolean).join(" ");
705
+ return m(() => e.as ?? "div", y(h(e, ["as"]), b({
959
706
  style: s,
960
- "data-br-stack": c
707
+ "data-br-stack": o
961
708
  })));
962
709
  }
963
- var kt = /* @__PURE__ */ K("<div data-br-cover-centered>");
964
- function Lt(e) {
965
- return typeof e == "number" ? `${e}px` : e && D(e) ? e : "100vh";
710
+ function Ee(e) {
711
+ return typeof e == "number" ? `${e}px` : A(e) ?? "100%";
966
712
  }
967
- function Rt(e) {
968
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--minHeight: ${Lt(e.minHeight)};`, o = () => e.variant === "stretch-content" || e.stretchContent === !0 ? "stretch-content" : "", c = () => [n(), i(), s()].join("; ");
969
- return m(() => e.as ?? "div", d(g(e, ["as", "minHeight", "stretchContent"]), b({
970
- style: c,
971
- "data-br-cover": o
713
+ function xe(e) {
714
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [i, a]) => r + `${i}:${a};`, ""), n = () => `--gap: ${w(e.gap ?? "size00") ?? "0px"}`, s = () => `--min-height: ${Ee(e.minHeight)};`, c = () => e.variant === "stretch-content" ? "stretch-content" : "", o = () => [t(), n(), s()].join("; ");
715
+ return m(() => e.as ?? "div", y(h(e, ["as", "minHeight"]), b({
716
+ style: o,
717
+ "data-br-cover": c
972
718
  })));
973
719
  }
974
- function pt(e) {
975
- const [t, n] = X(e, ["children", "top", "bottom"]);
976
- return I(Rt, d(n, {
720
+ function Fe(e) {
721
+ return m(() => e.as ?? "div", y(h(e, ["as"]), {
722
+ "data-br-cover-centered": ""
723
+ }));
724
+ }
725
+ function Be(e) {
726
+ return V(xe, y(e, {
977
727
  get children() {
978
- return [B(() => t.top), (() => {
979
- var i = kt();
980
- return te(i, () => t.children), i;
981
- })(), B(() => t.bottom)];
728
+ return e.children;
982
729
  }
983
730
  }));
984
731
  }
985
- function en(e) {
986
- const t = S(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [a, l]) => r + `${a}:${l};`, ""), i = () => `--gutter: ${w(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--columns: ${C(Math.max(e.colCount ?? e.columns ?? 1, 1)) ?? 1};`, o = () => e.switchAt ? `--switchAt: ${v(t, e.switchAt) ?? "0px"};` : "", c = () => [n(), i(), s(), o()].filter(Boolean).join("; ");
987
- return m(() => e.as ?? "div", d(g(e, ["as", "gutter", "columns", "colCount", "switchAt"]), b({
988
- style: c,
732
+ const F = (e) => typeof e == "string" ? e : Object.entries(e ?? {}).reduce((t, [n, s]) => t + `${n}:${s};`, "");
733
+ function Ge(e) {
734
+ const t = () => F(e.style), n = () => {
735
+ const r = B(e.gap);
736
+ return r ? `--gap: ${r};` : "";
737
+ }, s = () => `--col-count: ${he(Math.max(e.colCount ?? 1, 1)) ?? 1};`, c = () => e.switchAt ? `--switch-at: ${A(e.switchAt) ?? "0px"};` : "", o = () => [t(), n(), s(), c()].filter(Boolean).join("; ");
738
+ return m(() => e.as ?? "div", y(h(e, ["as", "colCount", "switchAt"]), b({
739
+ style: o,
989
740
  "data-br-columns": () => ""
990
741
  })));
991
742
  }
992
- const Dt = (e) => typeof e == "number" ? e : 1;
993
- function tn(e) {
994
- const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [r, a]) => c + `${r}:${a};`, ""), n = () => `--span: ${Dt(e.span)};`, i = () => e.offsetStart && e.offsetStart > 0 ? `--offsetStart: ${e.offsetStart};` : "", s = () => e.offsetEnd && e.offsetEnd > 0 ? `--offsetEnd: ${e.offsetEnd};` : "", o = () => [t(), n(), i(), s()].join("; ");
995
- return m(() => e.as ?? "div", d(g(e, ["as", "span", "offsetStart", "offsetEnd"]), b({
743
+ const Ie = (e) => typeof e == "number" ? e : 1;
744
+ function ze(e) {
745
+ const t = () => F(e.style), n = () => `--col-span: ${Ie(e.span)};`, s = () => e.offsetStart && e.offsetStart > 0 ? `--offset-start: ${e.offsetStart};` : "", c = () => e.offsetEnd && e.offsetEnd > 0 ? `--offset-end: ${e.offsetEnd};` : "", o = () => [t(), n(), s(), c()].join("; ");
746
+ return m(() => e.as ?? "div", y(h(e, ["as", "span", "offsetStart", "offsetEnd"]), b({
996
747
  style: o,
997
748
  "data-br-column": () => ""
998
749
  })));
999
750
  }
1000
751
  export {
1001
- Gt as Center,
1002
- tn as Column,
1003
- Vt as ColumnDrop,
1004
- en as Columns,
1005
- pt as Cover,
1006
- Ut as Frame,
1007
- xt as Grid,
1008
- Qt as Inline,
1009
- qt as InlineCluster,
1010
- Xt as MasonryGrid,
1011
- Yt as PadBox,
1012
- Jt as Reel,
1013
- Zt as Split,
1014
- Kt as Stack,
1015
- Ht as ThemeProvider,
1016
- D as checkIsCSSLength,
1017
- _t as createContainerQuery,
1018
- _ as getSafeGutter,
1019
- v as getSizeValue,
1020
- w as getSpacingValue,
1021
- mt as sizes,
1022
- gt as spacing,
1023
- S as useTheme
752
+ Pe as Center,
753
+ ze as Column,
754
+ Me as ColumnDrop,
755
+ Ge as Columns,
756
+ Be as Cover,
757
+ Fe as CoverCentered,
758
+ Ne as Frame,
759
+ ke as Grid,
760
+ Re as Inline,
761
+ Le as InlineCluster,
762
+ De as Reel,
763
+ We as Split,
764
+ Ve as Stack
1024
765
  };