@bedrock-layout/solid 1.7.4 → 2.0.0

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