@bedrock-layout/solid 1.7.1 → 1.7.2

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