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