fiboui 2.9.15 → 2.9.16

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.
@@ -1,47 +1,47 @@
1
- var nt = Object.defineProperty;
2
- var et = (n, i, t) => i in n ? nt(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
3
- var u = (n, i, t) => et(n, typeof i != "symbol" ? i + "" : i, t);
4
- import p from "react";
5
- import { b4 as T, b5 as B, b9 as $, b8 as y, bb as A, by as S, bz as E, bA as _, bB as rt, bh as ot, bC as st, bD as lt } from "./client-CNrWulRU.js";
6
- function at(n, i) {
1
+ var et = Object.defineProperty;
2
+ var rt = (n, i, t) => i in n ? et(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
3
+ var p = (n, i, t) => rt(n, typeof i != "symbol" ? i + "" : i, t);
4
+ import g from "react";
5
+ import { b4 as T, b5 as B, b9 as $, b8 as y, bb as z, by as x, bz as P, bA as _, bB as ot, bh as st, bC as lt, bD as at } from "./client-BQ1gZrfo.js";
6
+ function ct(n, i) {
7
7
  if (!(typeof i != "string" || !y(i)))
8
- for (const t of A(i))
8
+ for (const t of z(i))
9
9
  n.bindSignal(t);
10
10
  }
11
- function N(n, i) {
11
+ function I(n, i) {
12
12
  if (typeof i == "function") {
13
13
  try {
14
- N(n, i());
14
+ I(n, i());
15
15
  } catch {
16
16
  }
17
17
  return;
18
18
  }
19
19
  if (typeof i == "string") {
20
- at(n, i);
20
+ ct(n, i);
21
21
  return;
22
22
  }
23
23
  if (Array.isArray(i))
24
- for (const t of i) N(n, t);
24
+ for (const t of i) I(n, t);
25
25
  }
26
- function ct(n) {
26
+ function ht(n) {
27
27
  return typeof n == "string" && y(n) ? $(n) : n;
28
28
  }
29
29
  function ft(n) {
30
30
  return n && typeof n == "object" && !Array.isArray(n) ? n : {};
31
31
  }
32
- function ht(n) {
32
+ function dt(n) {
33
33
  n.display !== "none" && (n.display = "flex", (n.alignItems == null || n.alignItems === "") && (n.alignItems = "center"), (n.justifyContent == null || n.justifyContent === "") && (n.justifyContent = "center")), n.margin == null && (n.marginLeft == null && (n.marginLeft = "auto"), n.marginRight == null && (n.marginRight = "auto"));
34
34
  }
35
- function dt(n, i) {
35
+ function ut(n, i) {
36
36
  const { children: t, ...e } = i, r = t !== void 0 ? t : n;
37
37
  return { nodes: r == null ? [] : Array.isArray(r) ? r : [r], rest: e };
38
38
  }
39
- class ut extends B {
39
+ class pt extends B {
40
40
  children(i) {
41
- return N(this, i), super.children(i);
41
+ return I(this, i), super.children(i);
42
42
  }
43
43
  props(i) {
44
- return i && "children" in i && N(this, i.children), super.props(i);
44
+ return i && "children" in i && I(this, i.children), super.props(i);
45
45
  }
46
46
  build() {
47
47
  const i = [
@@ -53,11 +53,11 @@ class ut extends B {
53
53
  // instead of clipping overflowing children.
54
54
  this.isHug() ? "w-auto self-auto" : "w-full min-w-0 min-h-0 self-stretch",
55
55
  ...this._classNames
56
- ], { nodes: t, rest: e } = dt(this.processChildren(), this._props), { className: r, style: o, ...s } = e, l = [...i, r].filter(Boolean).join(" "), a = t.map(ct), f = { ...this.getStyle(), ...ft(o) };
57
- return ht(f), p.createElement(
56
+ ], { nodes: t, rest: e } = ut(this.processChildren(), this._props), { className: r, style: o, ...s } = e, l = [...i, r].filter(Boolean).join(" "), a = t.map(ht), h = { ...this.getStyle(), ...ft(o) };
57
+ return dt(h), g.createElement(
58
58
  "div",
59
59
  {
60
- style: f,
60
+ style: h,
61
61
  ...s,
62
62
  className: l
63
63
  },
@@ -65,35 +65,35 @@ class ut extends B {
65
65
  );
66
66
  }
67
67
  }
68
- const qt = T(ut);
69
- function pt(n, i) {
68
+ const Ut = T(pt);
69
+ function gt(n, i) {
70
70
  if (!(typeof i != "string" || !y(i)))
71
- for (const t of A(i))
71
+ for (const t of z(i))
72
72
  n.bindSignal(t);
73
73
  }
74
- function L(n, i) {
74
+ function W(n, i) {
75
75
  if (typeof i == "function") {
76
76
  try {
77
- L(n, i());
77
+ W(n, i());
78
78
  } catch {
79
79
  }
80
80
  return;
81
81
  }
82
82
  if (typeof i == "string") {
83
- pt(n, i);
83
+ gt(n, i);
84
84
  return;
85
85
  }
86
86
  if (Array.isArray(i))
87
- for (const t of i) L(n, t);
87
+ for (const t of i) W(n, t);
88
88
  }
89
- function gt(n) {
89
+ function mt(n) {
90
90
  return typeof n == "string" && y(n) ? $(n) : n;
91
91
  }
92
- function mt(n, i) {
92
+ function yt(n, i) {
93
93
  const t = i !== void 0 ? i : n;
94
94
  return t == null ? [] : Array.isArray(t) ? t : [t];
95
95
  }
96
- const yt = /* @__PURE__ */ new Set([
96
+ const bt = /* @__PURE__ */ new Set([
97
97
  "script",
98
98
  "iframe",
99
99
  "object",
@@ -121,100 +121,100 @@ const yt = /* @__PURE__ */ new Set([
121
121
  "source",
122
122
  "track",
123
123
  "wbr"
124
- ]), bt = /^[a-z][a-z0-9]*$/;
125
- function _t(n) {
124
+ ]), _t = /^[a-z][a-z0-9]*$/;
125
+ function xt(n) {
126
126
  if (typeof n != "string") return "div";
127
127
  const i = n.trim().toLowerCase();
128
- return !bt.test(i) || yt.has(i) ? "div" : i;
128
+ return !_t.test(i) || bt.has(i) ? "div" : i;
129
129
  }
130
- function z(n, i) {
130
+ function L(n, i) {
131
131
  const t = `fibo-${i}-`;
132
132
  return n.some((e) => e.startsWith(t));
133
133
  }
134
- function St(n) {
134
+ function wt(n) {
135
135
  return typeof n == "number" ? `${n}px` : String(n);
136
136
  }
137
137
  function v(n, i) {
138
138
  const t = `env(safe-area-inset-${i}, 0px)`;
139
139
  if (n == null || n === "") return t;
140
- const e = St(n);
140
+ const e = wt(n);
141
141
  return e.includes("safe-area-inset") ? e : `max(${e}, ${t})`;
142
142
  }
143
- function xt(n, i) {
143
+ function St(n, i) {
144
144
  const t = { ...n }, e = t;
145
145
  for (const r of ["padding", "margin"]) {
146
146
  const o = e[r];
147
147
  if (o == null || o === "") continue;
148
- const s = `${r}Top`, l = `${r}Right`, a = `${r}Bottom`, f = `${r}Left`;
149
- if (!(e[s] != null || e[l] != null || e[a] != null || e[f] != null || i.has(`${r}-top`) || i.has(`${r}-right`) || i.has(`${r}-bottom`) || i.has(`${r}-left`))) continue;
150
- const [d, c, h, x] = E(String(o));
151
- e[s] == null && !i.has(`${r}-top`) && (e[s] = d), e[l] == null && !i.has(`${r}-right`) && (e[l] = c), e[a] == null && !i.has(`${r}-bottom`) && (e[a] = h), e[f] == null && !i.has(`${r}-left`) && (e[f] = x), delete e[r];
148
+ const s = `${r}Top`, l = `${r}Right`, a = `${r}Bottom`, h = `${r}Left`;
149
+ if (!(e[s] != null || e[l] != null || e[a] != null || e[h] != null || i.has(`${r}-top`) || i.has(`${r}-right`) || i.has(`${r}-bottom`) || i.has(`${r}-left`))) continue;
150
+ const [d, c, f, w] = P(String(o));
151
+ e[s] == null && !i.has(`${r}-top`) && (e[s] = d), e[l] == null && !i.has(`${r}-right`) && (e[l] = c), e[a] == null && !i.has(`${r}-bottom`) && (e[a] = f), e[h] == null && !i.has(`${r}-left`) && (e[h] = w), delete e[r];
152
152
  }
153
153
  return t;
154
154
  }
155
- function wt(n, i) {
155
+ function vt(n, i) {
156
156
  const t = n;
157
157
  if (t.padding != null && t.padding !== "") {
158
- const [o, s, l, a] = E(String(t.padding));
158
+ const [o, s, l, a] = P(String(t.padding));
159
159
  t.paddingTop == null && (t.paddingTop = o), t.paddingRight == null && (t.paddingRight = s), t.paddingBottom == null && (t.paddingBottom = l), t.paddingLeft == null && (t.paddingLeft = a), delete t.padding;
160
160
  }
161
161
  t.paddingLeft == null && i.left != null && (t.paddingLeft = i.left), t.paddingRight == null && i.right != null && (t.paddingRight = i.right), t.paddingTop == null && i.top != null && (t.paddingTop = i.top), t.paddingBottom == null && i.bottom != null && (t.paddingBottom = i.bottom);
162
162
  const e = t.paddingTop != null && t.paddingTop !== "", r = t.paddingBottom != null && t.paddingBottom !== "";
163
163
  t.paddingLeft = v(t.paddingLeft, "left"), t.paddingRight = v(t.paddingRight, "right"), e && (t.paddingTop = v(t.paddingTop, "top")), r && (t.paddingBottom = v(t.paddingBottom, "bottom"));
164
164
  }
165
- function vt(n, i, t, e) {
166
- const r = n, o = r.width != null || e.has("width") || z(t, "width");
165
+ function Ct(n, i, t, e) {
166
+ const r = n, o = r.width != null || e.has("width") || L(t, "width");
167
167
  if (i) {
168
168
  o || (r.width = "auto");
169
169
  return;
170
170
  }
171
171
  o || (r.width = "100%");
172
- const s = r.margin != null && r.margin !== "", l = s || r.marginLeft != null || r.marginInlineStart != null || e.has("margin-left") || z(t, "margin-left"), a = s || r.marginRight != null || r.marginInlineEnd != null || e.has("margin-right") || z(t, "margin-right");
172
+ const s = r.margin != null && r.margin !== "", l = s || r.marginLeft != null || r.marginInlineStart != null || e.has("margin-left") || L(t, "margin-left"), a = s || r.marginRight != null || r.marginInlineEnd != null || e.has("margin-right") || L(t, "margin-right");
173
173
  l || (r.marginLeft = "auto"), a || (r.marginRight = "auto");
174
174
  }
175
- function Ct(n, i, t, e, r, o, s) {
176
- const l = i ? rt({ ...n, ...i }) : { ...n }, a = xt(l, o);
177
- return !(a.maxWidth != null || z(r, "max-width") || o.has("max-width")) && t != null && t !== "" && (a.maxWidth = S("maxWidth", t)), vt(a, e, r, o), wt(a, s), a;
175
+ function Tt(n, i, t, e, r, o, s) {
176
+ const l = i ? ot({ ...n, ...i }) : { ...n }, a = St(l, o);
177
+ return !(a.maxWidth != null || L(r, "max-width") || o.has("max-width")) && t != null && t !== "" && (a.maxWidth = x("maxWidth", t)), Ct(a, e, r, o), vt(a, s), a;
178
178
  }
179
- class Tt extends B {
179
+ class Bt extends B {
180
180
  constructor() {
181
181
  super(...arguments);
182
- u(this, "_userPad", {});
182
+ p(this, "_userPad", {});
183
183
  }
184
184
  children(t) {
185
- return L(this, t), super.children(t);
185
+ return W(this, t), super.children(t);
186
186
  }
187
187
  props(t) {
188
- return t && "children" in t && L(this, t.children), super.props(t);
188
+ return t && "children" in t && W(this, t.children), super.props(t);
189
189
  }
190
190
  padding(t, e) {
191
191
  if (e !== void 0 || t != null && typeof t == "object")
192
192
  return super.padding(t, e);
193
- const r = t, o = S("padding", r), [s, l, a, f] = E(o);
194
- return this._boxLonghands.has("padding-top") || (this._userPad.top = s), this._boxLonghands.has("padding-right") || (this._userPad.right = l), this._boxLonghands.has("padding-bottom") || (this._userPad.bottom = a), this._boxLonghands.has("padding-left") || (this._userPad.left = f), super.padding(r);
193
+ const r = t, o = x("padding", r), [s, l, a, h] = P(o);
194
+ return this._boxLonghands.has("padding-top") || (this._userPad.top = s), this._boxLonghands.has("padding-right") || (this._userPad.right = l), this._boxLonghands.has("padding-bottom") || (this._userPad.bottom = a), this._boxLonghands.has("padding-left") || (this._userPad.left = h), super.padding(r);
195
195
  }
196
196
  paddingHorizontal(t) {
197
- const e = S("paddingLeft", t);
197
+ const e = x("paddingLeft", t);
198
198
  return this._userPad.left = e, this._userPad.right = e, super.paddingHorizontal(t);
199
199
  }
200
200
  paddingVertical(t) {
201
- const e = S("paddingTop", t);
201
+ const e = x("paddingTop", t);
202
202
  return this._userPad.top = e, this._userPad.bottom = e, super.paddingVertical(t);
203
203
  }
204
204
  paddingLeft(t) {
205
- const e = S("paddingLeft", t);
205
+ const e = x("paddingLeft", t);
206
206
  return this._userPad.left = e, this._boxLonghands.add("padding-left"), this.addClassName(_.register("padding-left", e)), this;
207
207
  }
208
208
  paddingRight(t) {
209
- const e = S("paddingRight", t);
209
+ const e = x("paddingRight", t);
210
210
  return this._userPad.right = e, this._boxLonghands.add("padding-right"), this.addClassName(_.register("padding-right", e)), this;
211
211
  }
212
212
  paddingTop(t) {
213
- const e = S("paddingTop", t);
213
+ const e = x("paddingTop", t);
214
214
  return this._userPad.top = e, this._boxLonghands.add("padding-top"), this.addClassName(_.register("padding-top", e)), this;
215
215
  }
216
216
  paddingBottom(t) {
217
- const e = S("paddingBottom", t);
217
+ const e = x("paddingBottom", t);
218
218
  return this._userPad.bottom = e, this._boxLonghands.add("padding-bottom"), this.addClassName(_.register("padding-bottom", e)), this;
219
219
  }
220
220
  build() {
@@ -226,8 +226,8 @@ class Tt extends B {
226
226
  tag: s,
227
227
  dangerouslySetInnerHTML: l,
228
228
  maxWidth: a,
229
- ...f
230
- } = this._props, m = this.isHug(), d = mt(this.processChildren(), t).map(gt), c = Ct(
229
+ ...h
230
+ } = this._props, m = this.isHug(), d = yt(this.processChildren(), t).map(mt), c = Tt(
231
231
  this.getStyle(),
232
232
  r,
233
233
  a,
@@ -235,31 +235,31 @@ class Tt extends B {
235
235
  this._classNames,
236
236
  this._boxLonghands,
237
237
  this._userPad
238
- ), h = [
238
+ ), f = [
239
239
  _.register("padding-left", String(c.paddingLeft ?? v(void 0, "left"))),
240
240
  _.register("padding-right", String(c.paddingRight ?? v(void 0, "right")))
241
241
  ];
242
- c.paddingTop != null && String(c.paddingTop).includes("safe-area-inset") && h.push(_.register("padding-top", String(c.paddingTop))), c.paddingBottom != null && String(c.paddingBottom).includes("safe-area-inset") && h.push(_.register("padding-bottom", String(c.paddingBottom)));
243
- const x = [
242
+ c.paddingTop != null && String(c.paddingTop).includes("safe-area-inset") && f.push(_.register("padding-top", String(c.paddingTop))), c.paddingBottom != null && String(c.paddingBottom).includes("safe-area-inset") && f.push(_.register("padding-bottom", String(c.paddingBottom)));
243
+ const w = [
244
244
  "fibo-container",
245
245
  m ? "w-auto" : "w-full mx-auto",
246
246
  this.getClassName(),
247
247
  e,
248
- ...h
249
- ].filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), R = _t(o ?? s);
250
- return p.createElement(
251
- R,
248
+ ...f
249
+ ].filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), A = xt(o ?? s);
250
+ return g.createElement(
251
+ A,
252
252
  {
253
- ...f,
254
- className: x,
253
+ ...h,
254
+ className: w,
255
255
  style: c
256
256
  },
257
257
  ...d
258
258
  );
259
259
  }
260
260
  }
261
- const Ut = T(Tt);
262
- function K(n) {
261
+ const Jt = T(Bt);
262
+ function Y(n) {
263
263
  if (n == null || typeof n != "object") return;
264
264
  const i = n;
265
265
  if (typeof i._frameWidth == "number" && typeof i._frameHeight == "number")
@@ -267,18 +267,21 @@ function K(n) {
267
267
  const t = i._frames;
268
268
  if (!(t != null && t.length)) return;
269
269
  const e = t[t.length - 1];
270
- if (ot(e))
270
+ if (st(e))
271
271
  return { width: e.width, height: e.height };
272
+ const r = typeof e.height == "number" ? e.height : void 0, o = typeof e.width == "number" ? e.width : void 0;
273
+ if (!(r == null && o == null))
274
+ return { width: o, height: r };
272
275
  }
273
- function M(n) {
276
+ function O(n) {
274
277
  if (n == null) return;
275
278
  const i = Array.isArray(n) ? n : [n];
276
279
  for (const t of i)
277
280
  if (t != null && typeof t != "boolean") return t;
278
281
  }
279
- function Bt(n, i) {
282
+ function $t(n, i) {
280
283
  if (!(typeof i != "string" || !y(i)))
281
- for (const t of A(i))
284
+ for (const t of z(i))
282
285
  n.bindSignal(t);
283
286
  }
284
287
  function H(n, i) {
@@ -290,23 +293,23 @@ function H(n, i) {
290
293
  return;
291
294
  }
292
295
  if (typeof i == "string") {
293
- Bt(n, i);
296
+ $t(n, i);
294
297
  return;
295
298
  }
296
299
  if (Array.isArray(i))
297
300
  for (const t of i) H(n, t);
298
301
  }
299
- function $t(n) {
302
+ function zt(n) {
300
303
  return typeof n == "string" && y(n) ? $(n) : n;
301
304
  }
302
305
  function At(n, i) {
303
306
  const { children: t, ...e } = i, r = t !== void 0 ? t : n;
304
307
  return { nodes: r == null ? [] : Array.isArray(r) ? r : [r], rest: e };
305
308
  }
306
- function zt(n, i, t) {
309
+ function Nt(n, i, t) {
307
310
  if (n == null || typeof n == "boolean") return null;
308
- const e = i === 0, r = st(t);
309
- return e ? p.createElement(
311
+ const e = i === 0, r = lt(t);
312
+ return e ? g.createElement(
310
313
  "div",
311
314
  {
312
315
  key: `fibo-zstack-layer-${i}`,
@@ -318,14 +321,14 @@ function zt(n, i, t) {
318
321
  // Shrink-wrap the base child (Image/Box). No overflow clip on the
319
322
  // base so shadows/glows on the poster are not cut — overlays clip.
320
323
  minWidth: 0,
321
- minHeight: 0,
324
+ // No minHeight:0 — that let Scaffold flex squash Image/ZStack vertically.
322
325
  maxWidth: "100%",
323
326
  lineHeight: 0
324
327
  // kill inline-img baseline gap if child is reset to inline
325
328
  }
326
329
  },
327
330
  n
328
- ) : p.createElement(
331
+ ) : g.createElement(
329
332
  "div",
330
333
  {
331
334
  key: `fibo-zstack-layer-${i}`,
@@ -344,7 +347,7 @@ function zt(n, i, t) {
344
347
  pointerEvents: "none"
345
348
  }
346
349
  },
347
- p.createElement(
350
+ g.createElement(
348
351
  "div",
349
352
  {
350
353
  className: "fibo-zstack-overlay-content",
@@ -366,19 +369,19 @@ function zt(n, i, t) {
366
369
  )
367
370
  );
368
371
  }
369
- class Nt extends B {
372
+ class Lt extends B {
370
373
  constructor() {
371
374
  super(...arguments);
372
- u(this, "_alignment", "center");
373
- u(this, "_fit", "content");
374
- /** Copied from base child’s fixed frame, if any. */
375
- u(this, "_baseFixedFrame");
375
+ p(this, "_alignment", "center");
376
+ p(this, "_fit", "content");
377
+ /** Copied from base child’s fixed frame, if any (axis may be partial). */
378
+ p(this, "_baseFixedFrame");
376
379
  }
377
380
  children(t) {
378
- return H(this, t), this._baseFixedFrame = K(M(t)), super.children(t);
381
+ return H(this, t), this._baseFixedFrame = Y(O(t)), super.children(t);
379
382
  }
380
383
  props(t) {
381
- return t && "children" in t && (H(this, t.children), this._baseFixedFrame = K(M(t.children))), super.props(t);
384
+ return t && "children" in t && (H(this, t.children), this._baseFixedFrame = Y(O(t.children))), super.props(t);
382
385
  }
383
386
  alignment(t) {
384
387
  return this._alignment = t, this;
@@ -404,71 +407,71 @@ class Nt extends B {
404
407
  ], r = this.getStyle();
405
408
  if (r.overflow == null && (r.overflow = "hidden"), this._baseFixedFrame) {
406
409
  const d = r.width != null || this._classNames.some(
407
- (h) => h === "w-full" || h.startsWith("w-") || h.startsWith("fibo-width-")
410
+ (f) => f === "w-full" || f.startsWith("w-") || f.startsWith("fibo-width-")
408
411
  ), c = r.height != null || this._classNames.some(
409
- (h) => h === "h-full" || h.startsWith("h-") || h.startsWith("fibo-height-")
412
+ (f) => f === "h-full" || f.startsWith("h-") || f.startsWith("fibo-height-")
410
413
  );
411
- d || (r.width = `${this._baseFixedFrame.width}px`), c || (r.height = `${this._baseFixedFrame.height}px`);
414
+ !d && this._baseFixedFrame.width != null && (r.width = `${this._baseFixedFrame.width}px`), !c && this._baseFixedFrame.height != null && (r.height = `${this._baseFixedFrame.height}px`, r.minHeight = `${this._baseFixedFrame.height}px`, r.flexShrink = 0);
412
415
  } else t && r.height == null && r.minHeight == null && (r.height = "fit-content");
413
- const { nodes: o, rest: s } = At(this.processChildren(), this._props), { className: l, ...a } = s, f = [...e, l].filter(Boolean).join(" "), m = o.map($t).map((d, c) => zt(d, c, this._alignment));
414
- return p.createElement(
416
+ const { nodes: o, rest: s } = At(this.processChildren(), this._props), { className: l, ...a } = s, h = [...e, l].filter(Boolean).join(" "), m = o.map(zt).map((d, c) => Nt(d, c, this._alignment));
417
+ return g.createElement(
415
418
  "div",
416
419
  {
417
420
  style: r,
418
421
  ...a,
419
- className: f
422
+ className: h
420
423
  },
421
424
  ...m
422
425
  );
423
426
  }
424
427
  }
425
- const Jt = T(Nt);
426
- function Lt(n, i) {
428
+ const Qt = T(Lt);
429
+ function It(n, i) {
427
430
  if (!(typeof i != "string" || !y(i)))
428
- for (const t of A(i))
431
+ for (const t of z(i))
429
432
  n.bindSignal(t);
430
433
  }
431
- function I(n, i) {
434
+ function F(n, i) {
432
435
  if (typeof i == "function") {
433
436
  try {
434
- I(n, i());
437
+ F(n, i());
435
438
  } catch {
436
439
  }
437
440
  return;
438
441
  }
439
442
  if (typeof i == "string") {
440
- Lt(n, i);
443
+ It(n, i);
441
444
  return;
442
445
  }
443
446
  if (Array.isArray(i))
444
- for (const t of i) I(n, t);
447
+ for (const t of i) F(n, t);
445
448
  }
446
- function Ht(n) {
449
+ function Wt(n) {
447
450
  return typeof n == "string" && y(n) ? $(n) : n;
448
451
  }
449
- function It(n) {
452
+ function Ht(n) {
450
453
  return n && typeof n == "object" && !Array.isArray(n) ? n : {};
451
454
  }
452
- function Wt(n, i) {
455
+ function Ft(n, i) {
453
456
  return n === !0 || n === "true" ? !0 : i === "none" || i === "presentation";
454
457
  }
455
- function Rt(n) {
458
+ function kt(n) {
456
459
  return n.flexDirection === "column" || n.flexDirection === "column-reverse";
457
460
  }
458
- function kt(n, i) {
461
+ function Rt(n, i) {
459
462
  const { children: t, ...e } = i, r = t !== void 0 ? t : n;
460
463
  return { nodes: r == null ? [] : Array.isArray(r) ? r : [r], rest: e };
461
464
  }
462
- class Ft extends B {
465
+ class Et extends B {
463
466
  constructor() {
464
467
  super(...arguments);
465
- u(this, "_sizeHeight");
468
+ p(this, "_sizeHeight");
466
469
  }
467
470
  children(t) {
468
- return I(this, t), super.children(t);
471
+ return F(this, t), super.children(t);
469
472
  }
470
473
  props(t) {
471
- return t && "children" in t && I(this, t.children), super.props(t);
474
+ return t && "children" in t && F(this, t.children), super.props(t);
472
475
  }
473
476
  sizeHeight(t) {
474
477
  return this._sizeHeight = t, this;
@@ -478,18 +481,18 @@ class Ft extends B {
478
481
  return this.flexDirection(t === "vertical" ? "column" : "row");
479
482
  }
480
483
  build() {
481
- const { nodes: t, rest: e } = kt(this.processChildren(), this._props), { className: r, style: o, ...s } = e, l = { ...this.getStyle(), ...It(o) };
484
+ const { nodes: t, rest: e } = Rt(this.processChildren(), this._props), { className: r, style: o, ...s } = e, l = { ...this.getStyle(), ...Ht(o) };
482
485
  this._sizeHeight && (l.height = this._sizeHeight);
483
- const a = t.map(Ht), f = Rt(l), m = Wt(s["aria-hidden"], s.role), d = ["fibo-line", ...this._classNames, r].filter(Boolean).join(" ");
484
- if (f && a.length === 0)
485
- return l.width = l.width ?? "1px", l.alignSelf = l.alignSelf ?? "stretch", l.height == null && (l.height = "100%"), m ? p.createElement("div", {
486
+ const a = t.map(Wt), h = kt(l), m = Ft(s["aria-hidden"], s.role), d = ["fibo-line", ...this._classNames, r].filter(Boolean).join(" ");
487
+ if (h && a.length === 0)
488
+ return l.width = l.width ?? "1px", l.alignSelf = l.alignSelf ?? "stretch", l.height == null && (l.height = "100%"), m ? g.createElement("div", {
486
489
  ...s,
487
490
  role: "none",
488
491
  "aria-hidden": !0,
489
492
  "aria-orientation": void 0,
490
493
  style: l,
491
494
  className: d
492
- }) : p.createElement("div", {
495
+ }) : g.createElement("div", {
493
496
  ...s,
494
497
  role: "separator",
495
498
  "aria-orientation": "vertical",
@@ -497,14 +500,14 @@ class Ft extends B {
497
500
  className: d
498
501
  });
499
502
  if (a.length === 0)
500
- return m ? p.createElement("hr", {
503
+ return m ? g.createElement("hr", {
501
504
  ...s,
502
505
  role: "none",
503
506
  "aria-hidden": !0,
504
507
  "aria-orientation": void 0,
505
508
  style: l,
506
509
  className: d
507
- }) : p.createElement("hr", {
510
+ }) : g.createElement("hr", {
508
511
  ...s,
509
512
  role: "separator",
510
513
  "aria-orientation": "horizontal",
@@ -514,12 +517,12 @@ class Ft extends B {
514
517
  const c = [
515
518
  "fibo-line",
516
519
  "flex",
517
- f ? "flex-col" : "flex-row",
520
+ h ? "flex-col" : "flex-row",
518
521
  "min-w-0",
519
522
  ...this._classNames,
520
523
  r
521
524
  ].filter(Boolean).join(" ");
522
- return p.createElement(
525
+ return g.createElement(
523
526
  "div",
524
527
  {
525
528
  ...s,
@@ -530,10 +533,10 @@ class Ft extends B {
530
533
  );
531
534
  }
532
535
  }
533
- const Qt = T(Ft);
534
- class Et {
536
+ const ti = T(Et);
537
+ class jt {
535
538
  constructor() {
536
- u(this, "_node", null);
539
+ p(this, "_node", null);
537
540
  }
538
541
  /** @internal Attached by ScrollView on mount. */
539
542
  attach(i) {
@@ -596,49 +599,49 @@ class Et {
596
599
  });
597
600
  }
598
601
  }
599
- function X(n) {
602
+ function Z(n) {
600
603
  return n === "horizontal" ? "x mandatory" : n === "both" ? "both mandatory" : "y mandatory";
601
604
  }
602
- function jt(n, i) {
605
+ function Pt(n, i) {
603
606
  if (!(typeof i != "string" || !y(i)))
604
- for (const t of A(i))
607
+ for (const t of z(i))
605
608
  n.bindSignal(t);
606
609
  }
607
- function W(n, i) {
610
+ function k(n, i) {
608
611
  if (typeof i == "function") {
609
612
  try {
610
- W(n, i());
613
+ k(n, i());
611
614
  } catch {
612
615
  }
613
616
  return;
614
617
  }
615
618
  if (typeof i == "string") {
616
- jt(n, i);
619
+ Pt(n, i);
617
620
  return;
618
621
  }
619
622
  if (Array.isArray(i))
620
- for (const t of i) W(n, t);
623
+ for (const t of i) k(n, t);
621
624
  }
622
- function Pt(n) {
625
+ function Dt(n) {
623
626
  return typeof n == "string" && y(n) ? $(n) : n;
624
627
  }
625
- function Dt(n, i) {
628
+ function Vt(n, i) {
626
629
  const { children: t, ...e } = i, r = t !== void 0 ? t : n;
627
- return { nodes: (r == null ? [] : Array.isArray(r) ? r : [r]).map(Pt), rest: e };
630
+ return { nodes: (r == null ? [] : Array.isArray(r) ? r : [r]).map(Dt), rest: e };
628
631
  }
629
- function Vt(...n) {
632
+ function Gt(...n) {
630
633
  return (i) => {
631
634
  for (const t of n)
632
635
  t && (typeof t == "function" ? t(i) : t.current = i);
633
636
  };
634
637
  }
635
- function Gt(n) {
638
+ function Kt(n) {
636
639
  return n === "horizontal" || n === "vertical" || n === "both";
637
640
  }
638
- function Kt(n) {
641
+ function Mt(n) {
639
642
  return n === "hidden" || n === "visible" || n === "auto";
640
643
  }
641
- function Mt(n) {
644
+ function Xt(n) {
642
645
  const i = { ...n }, t = i.overflow;
643
646
  if (t == null || t === "")
644
647
  return delete i.overflow, i;
@@ -648,22 +651,22 @@ function Mt(n) {
648
651
  const r = e[0], o = e[1] ?? e[0];
649
652
  return i.overflowX == null && (i.overflowX = r), i.overflowY == null && (i.overflowY = o), delete i.overflow, i;
650
653
  }
651
- class Xt extends B {
654
+ class Yt extends B {
652
655
  constructor() {
653
656
  super(...arguments);
654
- u(this, "_direction", "vertical");
655
- u(this, "_scrollbar", "auto");
656
- u(this, "_controller");
657
- u(this, "_anchor");
658
- u(this, "_refresh");
659
- u(this, "_scrollTargetLayout", !1);
660
- u(this, "_scrollPosition");
657
+ p(this, "_direction", "vertical");
658
+ p(this, "_scrollbar", "auto");
659
+ p(this, "_controller");
660
+ p(this, "_anchor");
661
+ p(this, "_refresh");
662
+ p(this, "_scrollTargetLayout", !1);
663
+ p(this, "_scrollPosition");
661
664
  }
662
665
  children(t) {
663
- return W(this, t), super.children(t);
666
+ return k(this, t), super.children(t);
664
667
  }
665
668
  props(t) {
666
- return t && "children" in t && W(this, t.children), super.props(t);
669
+ return t && "children" in t && k(this, t.children), super.props(t);
667
670
  }
668
671
  direction(t) {
669
672
  return this._direction = t, this;
@@ -705,62 +708,75 @@ class Xt extends B {
705
708
  return typeof t == "function" ? (this._props.onScroll = t, this) : super.onScroll(t);
706
709
  }
707
710
  build() {
708
- const { nodes: t, rest: e } = Dt(this.processChildren(), this._props), {
711
+ const { nodes: t, rest: e } = Vt(this.processChildren(), this._props), {
709
712
  ref: r,
710
713
  className: o,
711
714
  style: s,
712
715
  controller: l,
713
716
  direction: a,
714
- scrollbar: f,
717
+ scrollbar: h,
715
718
  onScroll: m,
716
719
  ...d
717
- } = e, c = Gt(a) ? a : this._direction, h = Kt(f) ? f : this._scrollbar, x = this._controller ?? (l instanceof Et ? l : void 0), R = c === "horizontal" || c === "both", Y = c === "vertical" || c === "both", Z = this.getStyle(), { gap: j, rowGap: P, columnGap: D, ...O } = Z, q = R ? "auto" : "hidden", U = Y ? "auto" : "hidden", g = {
720
+ } = e, c = Kt(a) ? a : this._direction, f = Mt(h) ? h : this._scrollbar, w = this._controller ?? (l instanceof jt ? l : void 0), A = c === "horizontal" || c === "both", D = c === "vertical" || c === "both", q = this.getStyle(), { gap: V, rowGap: G, columnGap: K, ...U } = q, J = A ? "auto" : "hidden", Q = D ? "auto" : "hidden", R = A && !D, u = {
718
721
  display: "flex",
719
722
  flexDirection: c === "horizontal" ? "row" : "column",
720
723
  flexWrap: "nowrap",
721
724
  flex: "0 0 auto"
722
725
  };
723
- j != null && (g.gap = j), P != null && (g.rowGap = P), D != null && (g.columnGap = D), c === "horizontal" ? (g.width = "max-content", g.minHeight = "0px") : c === "both" ? (g.width = "max-content", g.height = "max-content", g.minWidth = "0px", g.minHeight = "0px") : (g.width = "100%", g.maxWidth = "100%", g.minWidth = "0px");
724
- const k = [
726
+ V != null && (u.gap = V), G != null && (u.rowGap = G), K != null && (u.columnGap = K), c === "horizontal" ? (u.width = "max-content", R ? u.alignItems = "stretch" : u.minHeight = "0px") : c === "both" ? (u.width = "max-content", u.height = "max-content", u.minWidth = "0px", u.minHeight = "0px") : (u.width = "100%", u.maxWidth = "100%", u.minWidth = "0px");
727
+ const E = [
725
728
  "fibo-scrollview",
726
729
  ...this.getClassName().split(" ").filter(Boolean),
727
730
  o
728
- ], J = Mt({
729
- ...O,
731
+ ], N = Xt({
732
+ ...U,
730
733
  ...s && typeof s == "object" ? s : {}
731
734
  }), b = {
732
735
  WebkitOverflowScrolling: "touch",
733
736
  minWidth: "0px",
734
- minHeight: "0px",
737
+ // Vertical (and both) need minHeight:0 to scroll inside flex.
738
+ // Horizontal-only must NOT — Scaffold column was squashing carousels.
739
+ ...R ? {
740
+ width: "100%",
741
+ maxWidth: "100%",
742
+ flexShrink: 0,
743
+ alignSelf: "stretch"
744
+ } : { minHeight: "0px" },
735
745
  display: "flex",
736
746
  flexDirection: c === "horizontal" ? "row" : "column",
737
- ...J,
747
+ ...N,
738
748
  // Direction overflow must survive `.props({ style })` replacing the object.
739
- overflowX: q,
740
- overflowY: U
749
+ overflowX: J,
750
+ overflowY: Q,
751
+ // Re-assert clamp after painted so user width:max-content cannot blow the body.
752
+ ...R ? {
753
+ width: N.width ?? "100%",
754
+ maxWidth: N.maxWidth ?? "100%",
755
+ flexShrink: N.flexShrink ?? 0
756
+ } : null
741
757
  };
742
- if (h === "hidden" && (k.push("scrollbar-hide"), b.scrollbarWidth = "none", b.msOverflowStyle = "none"), this._anchor) {
758
+ if (f === "hidden" && (E.push("scrollbar-hide"), b.scrollbarWidth = "none", b.msOverflowStyle = "none"), this._anchor) {
743
759
  b.scrollSnapAlign = this._anchor;
744
- const w = b.scrollSnapType ?? b["scroll-snap-type"];
745
- (w == null || w === "") && (b.scrollSnapType = X(c));
760
+ const S = b.scrollSnapType ?? b["scroll-snap-type"];
761
+ (S == null || S === "") && (b.scrollSnapType = Z(c));
746
762
  }
747
- const C = this._scrollPosition, Q = Vt(
748
- (w) => {
749
- x == null || x.attach(w), w && C && requestAnimationFrame(() => {
750
- const it = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(C) : C.replace(/"/g, '\\"'), F = w.querySelector(
751
- `[data-scroll-id="${it}"]`
763
+ const C = this._scrollPosition, tt = Gt(
764
+ (S) => {
765
+ w == null || w.attach(S), S && C && requestAnimationFrame(() => {
766
+ const nt = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(C) : C.replace(/"/g, '\\"'), j = S.querySelector(
767
+ `[data-scroll-id="${nt}"]`
752
768
  );
753
- F == null || F.scrollIntoView({ block: "nearest", inline: "nearest" });
769
+ j == null || j.scrollIntoView({ block: "nearest", inline: "nearest" });
754
770
  });
755
771
  },
756
772
  r
757
- ), V = this._refresh, tt = p.createElement(
773
+ ), M = this._refresh, it = g.createElement(
758
774
  "div",
759
- { className: "fibo-scroll-inner", style: g },
775
+ { className: "fibo-scroll-inner", style: u },
760
776
  ...t
761
777
  );
762
- this._scrollTargetLayout && (k.push("fibo-scroll-target-layout"), b.scrollSnapType == null && (b.scrollSnapType = X(c)));
763
- const G = p.createElement(
778
+ this._scrollTargetLayout && (E.push("fibo-scroll-target-layout"), b.scrollSnapType == null && (b.scrollSnapType = Z(c)));
779
+ const X = g.createElement(
764
780
  "div",
765
781
  {
766
782
  ...d,
@@ -768,25 +784,25 @@ class Xt extends B {
768
784
  ...this._scrollTargetLayout ? { "data-scroll-target-layout": "1" } : {},
769
785
  ...C ? { "data-scroll-position": C } : {},
770
786
  "data-fibo-scroll-host": "",
771
- className: k.filter(Boolean).join(" "),
787
+ className: E.filter(Boolean).join(" "),
772
788
  style: b,
773
- ref: Q,
789
+ ref: tt,
774
790
  onScroll: m
775
791
  },
776
- tt
792
+ it
777
793
  );
778
- return !V || c === "horizontal" ? G : p.createElement(lt, {
779
- onRefresh: V,
780
- children: G
794
+ return !M || c === "horizontal" ? X : g.createElement(at, {
795
+ onRefresh: M,
796
+ children: X
781
797
  });
782
798
  }
783
799
  }
784
- const ti = T(Xt);
800
+ const ii = T(Yt);
785
801
  export {
786
- qt as C,
787
- Qt as L,
788
- ti as S,
789
- Jt as Z,
790
- Ut as a,
791
- Et as b
802
+ Ut as C,
803
+ ti as L,
804
+ ii as S,
805
+ Qt as Z,
806
+ Jt as a,
807
+ jt as b
792
808
  };