fiboui 2.9.6 → 2.9.15
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/dist/{client-DspTEDnT.js → client-CNrWulRU.js} +1604 -1525
- package/dist/content.d.ts +14 -1
- package/dist/content.js +10 -10
- package/dist/core.d.ts +32 -1
- package/dist/core.js +56 -54
- package/dist/{icons-uTGNZEj2.js → icons-CUjbVN8n.js} +126 -112
- package/dist/{index-BK9NhRgp.js → index-BBa7p7cv.js} +6 -6
- package/dist/{index-CE3dybe8.js → index-Bcf-s8v0.js} +145 -138
- package/dist/{index-vSLH4ZkD.js → index-COE2gXjP.js} +1 -1
- package/dist/{index-B7vkEz57.js → index-CpUz5DNt.js} +39 -39
- package/dist/{index-pxNM6-DO.js → index-Dm9qGQyL.js} +2 -2
- package/dist/index.d.ts +51 -2
- package/dist/index.js +1303 -1170
- package/dist/interactive.d.ts +2 -0
- package/dist/interactive.js +6 -6
- package/dist/layout.d.ts +2 -0
- package/dist/layout.js +3 -3
- package/dist/{metadata-BqVnmMLq.js → metadata-CElV09j3.js} +20 -20
- package/dist/navigation.js +2 -2
- package/dist/{page-CQCVouvN.js → page-LLSMLaL2.js} +81 -82
- package/dist/server.d.ts +2 -0
- package/dist/server.js +2346 -2897
- package/dist/structure.d.ts +2 -0
- package/dist/structure.js +8 -8
- package/dist/style.css +1 -1
- package/dist/theme.js +3 -3
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@ var Bt = Object.defineProperty;
|
|
|
2
2
|
var Tt = (e, r, t) => r in e ? Bt(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
3
3
|
var n = (e, r, t) => Tt(e, typeof r != "symbol" ? r + "" : r, t);
|
|
4
4
|
import s, { useSyncExternalStore as X } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { S as
|
|
7
|
-
import { B as wt } from "./index-
|
|
8
|
-
import { B as et, I as at, a as
|
|
5
|
+
import { b4 as L, b5 as P, b8 as C, bb as M, b9 as R, bu as ot, bf as _t, bk as At, bF as Lt, L as vt, aH as T, F as lt, bG as ut, bH as Pt, bI as Rt, ab as W, al as N } from "./client-CNrWulRU.js";
|
|
6
|
+
import { S as H, C as G } from "./index-COE2gXjP.js";
|
|
7
|
+
import { B as wt } from "./index-BBa7p7cv.js";
|
|
8
|
+
import { B as et, I as at, a as F, A as $t } from "./icons-CUjbVN8n.js";
|
|
9
9
|
function $(e, r) {
|
|
10
10
|
if (!(typeof r != "string" || !C(r)))
|
|
11
11
|
for (const t of M(r))
|
|
@@ -41,11 +41,11 @@ const zt = {
|
|
|
41
41
|
red: "var(--fibo-error, #ef4444)",
|
|
42
42
|
blue: "var(--fibo-info, #3b82f6)",
|
|
43
43
|
purple: "var(--fibo-tertiary, #a855f7)"
|
|
44
|
-
},
|
|
45
|
-
function
|
|
44
|
+
}, Gt = /* @__PURE__ */ new Set(["script", "iframe", "object", "embed", "link", "style"]);
|
|
45
|
+
function Ft(e) {
|
|
46
46
|
if (typeof e != "string") return "article";
|
|
47
47
|
const r = e.trim().toLowerCase();
|
|
48
|
-
return !r || !/^[a-z][a-z0-9]*$/.test(r) ||
|
|
48
|
+
return !r || !/^[a-z][a-z0-9]*$/.test(r) || Gt.has(r) ? "article" : r;
|
|
49
49
|
}
|
|
50
50
|
const Wt = s.memo((e) => {
|
|
51
51
|
const {
|
|
@@ -79,7 +79,7 @@ const Wt = s.memo((e) => {
|
|
|
79
79
|
...c
|
|
80
80
|
}, w = Q(u), E = Q(p);
|
|
81
81
|
return s.createElement(
|
|
82
|
-
|
|
82
|
+
Ft(h),
|
|
83
83
|
{
|
|
84
84
|
...b,
|
|
85
85
|
className: I,
|
|
@@ -193,7 +193,7 @@ class Dt extends P {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
const Z = L(Dt);
|
|
196
|
-
function
|
|
196
|
+
function V(e, r) {
|
|
197
197
|
if (!(typeof r != "string" || !C(r)))
|
|
198
198
|
for (const t of M(r))
|
|
199
199
|
e.bindSignal(t);
|
|
@@ -205,14 +205,14 @@ function U(e) {
|
|
|
205
205
|
return typeof e == "string" && C(e) ? R(e) : e;
|
|
206
206
|
}
|
|
207
207
|
function Y(e, r) {
|
|
208
|
-
return typeof r == "string" ? (
|
|
208
|
+
return typeof r == "string" ? (V(e, r), r) : ot(r);
|
|
209
209
|
}
|
|
210
|
-
const
|
|
210
|
+
const Ht = 'a, button, input, textarea, select, [role="button"], [role="switch"], [role="checkbox"], [role="menuitem"]';
|
|
211
211
|
function dt(e) {
|
|
212
212
|
const r = e.target;
|
|
213
|
-
r != null && r.closest(
|
|
213
|
+
r != null && r.closest(Ht) && e.stopPropagation();
|
|
214
214
|
}
|
|
215
|
-
const
|
|
215
|
+
const Vt = () => s.createElement(
|
|
216
216
|
"svg",
|
|
217
217
|
{
|
|
218
218
|
width: 12,
|
|
@@ -322,7 +322,7 @@ const Ht = () => s.createElement(
|
|
|
322
322
|
className: "fibo-list-tile-chevron shrink-0 flex items-center",
|
|
323
323
|
style: { color: "#9a9a9a", marginLeft: O ? 8 : 0 }
|
|
324
324
|
},
|
|
325
|
-
s.createElement(
|
|
325
|
+
s.createElement(Vt)
|
|
326
326
|
) : null
|
|
327
327
|
);
|
|
328
328
|
});
|
|
@@ -391,7 +391,7 @@ class Mt extends P {
|
|
|
391
391
|
dense: h,
|
|
392
392
|
...b
|
|
393
393
|
} = this._props, _ = this._title !== void 0 ? this._title : o, m = this._subtitle !== void 0 ? this._subtitle : l, g = this._leading !== void 0 ? this._leading : t, y = this._trailing !== void 0 ? this._trailing : i;
|
|
394
|
-
return typeof _ == "string" &&
|
|
394
|
+
return typeof _ == "string" && V(this, _), typeof m == "string" && V(this, m), typeof g == "string" && V(this, g), typeof y == "string" && V(this, y), s.createElement(Kt, {
|
|
395
395
|
...b,
|
|
396
396
|
leading: typeof g == "string" ? q(g) : g,
|
|
397
397
|
title: typeof _ == "string" ? q(_) : _,
|
|
@@ -409,7 +409,7 @@ class Mt extends P {
|
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
const
|
|
412
|
+
const He = L(Mt);
|
|
413
413
|
function Ot(e, r) {
|
|
414
414
|
if (!(typeof r != "string" || !C(r)))
|
|
415
415
|
for (const t of M(r))
|
|
@@ -648,7 +648,7 @@ class re extends P {
|
|
|
648
648
|
return s.createElement(ee, i);
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
const
|
|
651
|
+
const Ve = L(re);
|
|
652
652
|
function pt(e, r) {
|
|
653
653
|
if (!(typeof r != "string" || !C(r)))
|
|
654
654
|
for (const t of M(r))
|
|
@@ -1241,23 +1241,23 @@ const Oe = L(xe), qe = L(Ee), ke = s.memo((e) => {
|
|
|
1241
1241
|
T().classNames(["relative", "aspect-square", "overflow-hidden", "rounded-[20px]"]).children([
|
|
1242
1242
|
at().src(r).alt(t || "").classNames(["w-full", "h-full", "object-cover", "bg-gray-200"]).build(),
|
|
1243
1243
|
T().classNames(["absolute", "top-3", "right-3"]).children(
|
|
1244
|
-
et().variant("glass").shape("pill").icon(T().classNames(["text-gray-400", "hover:text-red-500"]).children(
|
|
1244
|
+
et().variant("glass").shape("pill").icon(T().classNames(["text-gray-400", "hover:text-red-500"]).children(F.Heart).build()).text(`${o}`).build()
|
|
1245
1245
|
).build()
|
|
1246
1246
|
]).build(),
|
|
1247
|
-
|
|
1247
|
+
H().height(16).build(),
|
|
1248
1248
|
W().justifyContent("between").alignItems("start").children([
|
|
1249
|
-
|
|
1249
|
+
G().gap(4).children([
|
|
1250
1250
|
N(t).fontWeight(700).fontSize(18).color("#111827").build(),
|
|
1251
1251
|
et().variant("neutral").text("Not for sale x1").build()
|
|
1252
1252
|
]).build(),
|
|
1253
|
-
T().classNames(["text-gray-300"]).children(
|
|
1253
|
+
T().classNames(["text-gray-300"]).children(F.More).build()
|
|
1254
1254
|
]).build(),
|
|
1255
|
-
|
|
1255
|
+
H().height(16).build(),
|
|
1256
1256
|
W().justifyContent("between").alignItems("center").children([
|
|
1257
|
-
|
|
1257
|
+
G().gap(4).children([
|
|
1258
1258
|
N("Current Bid").fontSize(11).fontWeight(600).color("#6B7280").build(),
|
|
1259
1259
|
W().gap(4).alignItems("center").children([
|
|
1260
|
-
T().classNames(["text-blue-500"]).children(
|
|
1260
|
+
T().classNames(["text-blue-500"]).children(F.Eth).build(),
|
|
1261
1261
|
N(`${i} ETH`).fontSize(15).fontWeight(700).color("#111827").build()
|
|
1262
1262
|
]).build()
|
|
1263
1263
|
]).build(),
|
|
@@ -1269,8 +1269,8 @@ const Oe = L(xe), qe = L(Ee), ke = s.memo((e) => {
|
|
|
1269
1269
|
fontWeight: 600
|
|
1270
1270
|
}).build()
|
|
1271
1271
|
]).build(),
|
|
1272
|
-
|
|
1273
|
-
l ? et().variant("accent").shape("rounded").icon(T().children(
|
|
1272
|
+
H().height(12).build(),
|
|
1273
|
+
l ? et().variant("accent").shape("rounded").icon(T().children(F.Clock).build()).text(l).style({ width: "100%" }).build() : null
|
|
1274
1274
|
]).build();
|
|
1275
1275
|
});
|
|
1276
1276
|
class Ie extends P {
|
|
@@ -1335,15 +1335,15 @@ const Te = s.memo((e) => {
|
|
|
1335
1335
|
backgroundSize: "cover",
|
|
1336
1336
|
backgroundPosition: "center"
|
|
1337
1337
|
}).build(),
|
|
1338
|
-
|
|
1338
|
+
G().padding(20).alignItems("center").style({ marginTop: "-50px" }).children([
|
|
1339
1339
|
$t().image(t).size(80).border("4px solid #fff").build(),
|
|
1340
|
-
|
|
1340
|
+
H().height(12).build(),
|
|
1341
1341
|
W().gap(6).alignItems("center").children([
|
|
1342
1342
|
N(i).fontWeight(700).fontSize(18).color("#111827").build(),
|
|
1343
|
-
|
|
1343
|
+
F.Verify
|
|
1344
1344
|
]).build(),
|
|
1345
1345
|
N(o).fontSize(13).color("#6B7280").style({ marginTop: "4px" }).build(),
|
|
1346
|
-
|
|
1346
|
+
H().height(16).build(),
|
|
1347
1347
|
wt("+ Follow").variant("filled").shape("pill").shadow("soft").style({
|
|
1348
1348
|
backgroundColor: "#3B82F6",
|
|
1349
1349
|
color: "#fff",
|
|
@@ -1351,19 +1351,19 @@ const Te = s.memo((e) => {
|
|
|
1351
1351
|
fontSize: "13px",
|
|
1352
1352
|
fontWeight: 600
|
|
1353
1353
|
}).build(),
|
|
1354
|
-
|
|
1354
|
+
H().height(24).build(),
|
|
1355
1355
|
W().classNames(["w-full", "border-t", "border-gray-100", "pt-4"]).justifyContent("between").children([
|
|
1356
|
-
|
|
1356
|
+
G().alignItems("center").gap(4).children([
|
|
1357
1357
|
N(l.items).fontWeight(700).fontSize(14).build(),
|
|
1358
1358
|
N("Items").fontSize(11).color("#9CA3AF").build()
|
|
1359
1359
|
]).build(),
|
|
1360
|
-
|
|
1360
|
+
G().alignItems("center").gap(4).children([
|
|
1361
1361
|
N(l.owners).fontWeight(700).fontSize(14).build(),
|
|
1362
1362
|
N("Owners").fontSize(11).color("#9CA3AF").build()
|
|
1363
1363
|
]).build(),
|
|
1364
|
-
|
|
1364
|
+
G().alignItems("center").gap(4).children([
|
|
1365
1365
|
W().alignItems("center").gap(2).children([
|
|
1366
|
-
T().width(8).children(
|
|
1366
|
+
T().width(8).children(F.Eth).build(),
|
|
1367
1367
|
N(l.floor).fontWeight(700).fontSize(14).build()
|
|
1368
1368
|
]).build(),
|
|
1369
1369
|
N("Floor").fontSize(11).color("#9CA3AF").build()
|
|
@@ -1423,13 +1423,13 @@ const Ye = L(Ae), Le = s.memo((e) => {
|
|
|
1423
1423
|
}).className(l).props(a).children([
|
|
1424
1424
|
at().src(r).alt(t || "").classNames(["absolute", "inset-0", "w-full", "h-full", "object-cover", "transition-transform", "duration-500"]).style({ position: "absolute", inset: 0, width: "100%", height: "100%" }).build(),
|
|
1425
1425
|
T().classNames(["absolute", "inset-0", "bg-gradient-to-t", "from-black/80", "via-black/20", "to-transparent"]).build(),
|
|
1426
|
-
|
|
1426
|
+
G().classNames(["absolute", "bottom-0", "left-0", "p-6"]).gap(4).children([
|
|
1427
1427
|
N(o).color("white").fontSize(12).classNames(["opacity-90", "mb-1", "uppercase", "tracking-wider"]).fontWeight(600).build(),
|
|
1428
1428
|
N(t).color("white").fontSize(22).fontWeight(700).build(),
|
|
1429
1429
|
W().gap(6).alignItems("center").children([
|
|
1430
1430
|
N("Created by").color("white").fontSize(13).classNames(["opacity-80"]).build(),
|
|
1431
1431
|
N(i).color("white").fontSize(13).fontWeight(600).build(),
|
|
1432
|
-
|
|
1432
|
+
F.Verify
|
|
1433
1433
|
]).build()
|
|
1434
1434
|
]).build()
|
|
1435
1435
|
]).build();
|
|
@@ -1533,9 +1533,9 @@ export {
|
|
|
1533
1533
|
Me as B,
|
|
1534
1534
|
Z as C,
|
|
1535
1535
|
Oe as G,
|
|
1536
|
-
|
|
1536
|
+
He as L,
|
|
1537
1537
|
Ye as P,
|
|
1538
|
-
|
|
1538
|
+
Ve as T,
|
|
1539
1539
|
Ke as a,
|
|
1540
1540
|
qe as b,
|
|
1541
1541
|
Je as c,
|
|
@@ -2,8 +2,8 @@ var ae = Object.defineProperty;
|
|
|
2
2
|
var ie = (s, r, e) => r in s ? ae(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
|
|
3
3
|
var i = (s, r, e) => ie(s, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import t from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { a as F } from "./icons-
|
|
5
|
+
import { b4 as I, b5 as $, b8 as z, bb as R, b9 as q, z as le, bf as Z, bE as oe } from "./client-CNrWulRU.js";
|
|
6
|
+
import { a as F } from "./icons-CUjbVN8n.js";
|
|
7
7
|
function ce(s, r) {
|
|
8
8
|
if (!(typeof r != "string" || !z(r)))
|
|
9
9
|
for (const e of R(r))
|
package/dist/index.d.ts
CHANGED
|
@@ -892,6 +892,8 @@ export declare class PseudoStateBuilder {
|
|
|
892
892
|
translateY(value: number | string): this;
|
|
893
893
|
rotate(degrees: number): this;
|
|
894
894
|
shadow(value: string | number): this;
|
|
895
|
+
/** Same surface as `Box().css({})` — object bag or `(property, value)`. */
|
|
896
|
+
css(styles: React$1.CSSProperties): this;
|
|
895
897
|
css(property: string, value: string | number): this;
|
|
896
898
|
padding(value: string | number): this;
|
|
897
899
|
p(value: string | number): this;
|
|
@@ -1215,6 +1217,11 @@ export declare function stackAlignFlex(align?: StackAlign | keyof typeof StackAl
|
|
|
1215
1217
|
alignItems: string;
|
|
1216
1218
|
justifyContent: string;
|
|
1217
1219
|
};
|
|
1220
|
+
/**
|
|
1221
|
+
* CSS `object-position` for `Image.scaledToFill()` / `object-fit: cover` crops.
|
|
1222
|
+
* Prefer faces/horizon with `StackAlign.top` / `topLeft` on portrait→wide heroes.
|
|
1223
|
+
*/
|
|
1224
|
+
export declare function stackAlignObjectPosition(align?: StackAlign | keyof typeof StackAlign | string): string;
|
|
1218
1225
|
export declare const Theme: {
|
|
1219
1226
|
readonly material: "material";
|
|
1220
1227
|
readonly cupertino: "cupertino";
|
|
@@ -2595,9 +2602,38 @@ type KnownKeys<T> = {
|
|
|
2595
2602
|
} extends {
|
|
2596
2603
|
[_ in keyof T]: infer U;
|
|
2597
2604
|
} ? U : never;
|
|
2598
|
-
|
|
2605
|
+
/**
|
|
2606
|
+
* Fluent CSS methods on every builder. Kept as a named exported type so
|
|
2607
|
+
* `index.d.ts` references `StyleBuilder<T>` instead of expanding the CSS map
|
|
2608
|
+
* into every widget (that blew the file past 20MB and also typed chains as `any`).
|
|
2609
|
+
*/
|
|
2610
|
+
export type StyleBuilder<T> = T & LogicalAxes & {
|
|
2599
2611
|
[K in KnownKeys<React$1.CSSProperties>]-?: (value: React$1.CSSProperties[K]) => StyleBuilder<T>;
|
|
2600
2612
|
} & React$1.ReactElement;
|
|
2613
|
+
/**
|
|
2614
|
+
* Like `React.memo`, but for fluent builders: write a normal function that
|
|
2615
|
+
* returns a builder — `createComponent` keeps every method of that return
|
|
2616
|
+
* (`GlassField().label().name()…`). No `fn('label', { opts })` bags.
|
|
2617
|
+
*
|
|
2618
|
+
* ```ts
|
|
2619
|
+
* // Preferred — your component is a normal function:
|
|
2620
|
+
* const glassField = () => {
|
|
2621
|
+
* return TextField().variant('outlined').rounded(16).className('cubee-field')
|
|
2622
|
+
* }
|
|
2623
|
+
* export const GlassField = createComponent(glassField)
|
|
2624
|
+
* GlassField().label('E-mail').name('email').type('email')
|
|
2625
|
+
*
|
|
2626
|
+
* // Optional — base factory + body gets `{ f }` (same idea as props):
|
|
2627
|
+
* export const GlassField = createComponent(TextField, ({ f }) => {
|
|
2628
|
+
* return f.variant('outlined').rounded(16).className('cubee-field')
|
|
2629
|
+
* })
|
|
2630
|
+
* ```
|
|
2631
|
+
*/
|
|
2632
|
+
export declare function createComponent<Args extends any[], B>(factory: (...args: Args) => B, setup?: (ctx: {
|
|
2633
|
+
f: B;
|
|
2634
|
+
}) => B | void): (...args: Args) => B;
|
|
2635
|
+
/** @deprecated Prefer `createComponent` — same behavior. */
|
|
2636
|
+
export declare const preset: typeof createComponent;
|
|
2601
2637
|
interface SignalLike<T> {
|
|
2602
2638
|
value: T;
|
|
2603
2639
|
subscribe: (listener: (val: T) => void) => () => void;
|
|
@@ -3398,6 +3434,8 @@ export declare const DashboardLayout: () => StyleBuilder<DashboardLayoutBuilder>
|
|
|
3398
3434
|
*
|
|
3399
3435
|
* You do **not** have to repeat `.frame` on the ZStack when the base is already
|
|
3400
3436
|
* framed; an extra `.frame` on the stack still wins (wraps / clamps).
|
|
3437
|
+
* Host `.width(Size.full)` / `.height(n)` win over the promoted base frame on
|
|
3438
|
+
* that axis (full-bleed hero: wide image frame + `w-full` stack).
|
|
3401
3439
|
*
|
|
3402
3440
|
* **Hit-testing (SwiftUI):** taps on containers only hit drawn content unless
|
|
3403
3441
|
* `.contentShape(Rectangle())` is set (or a gesture auto-defaults it).
|
|
@@ -3860,10 +3898,12 @@ declare class LabelBuilder extends FiboBuilder {
|
|
|
3860
3898
|
}
|
|
3861
3899
|
export declare const Label: (text?: string | undefined) => StyleBuilder<LabelBuilder>;
|
|
3862
3900
|
type ClipShape$1 = "circle" | "rounded" | "square";
|
|
3901
|
+
type ImagePosition = StackAlign | keyof typeof StackAlign | string;
|
|
3863
3902
|
declare class ImageBuilder extends FiboBuilder {
|
|
3864
3903
|
private _src;
|
|
3865
3904
|
private _alt;
|
|
3866
3905
|
private _fit;
|
|
3906
|
+
private _objectPosition?;
|
|
3867
3907
|
private _resizable;
|
|
3868
3908
|
/** Image-native clip (Tailwind / borderRadius on `<img>`). Distinct from
|
|
3869
3909
|
* {@link FiboBuilder.clipShape} chrome wrapper. */
|
|
@@ -3876,7 +3916,16 @@ declare class ImageBuilder extends FiboBuilder {
|
|
|
3876
3916
|
alt(value: string): this;
|
|
3877
3917
|
resizable(): this;
|
|
3878
3918
|
scaledToFit(): this;
|
|
3879
|
-
|
|
3919
|
+
/**
|
|
3920
|
+
* Cover the frame (`object-fit: cover`). Optional alignment biases the crop
|
|
3921
|
+
* — e.g. `scaledToFill(StackAlign.top)` keeps faces in a wide short hero.
|
|
3922
|
+
*/
|
|
3923
|
+
scaledToFill(alignment?: ImagePosition): this;
|
|
3924
|
+
/**
|
|
3925
|
+
* CSS `object-position` for cover/contain crops.
|
|
3926
|
+
* Accepts {@link StackAlign} (`top`, `topLeft`, …) or a raw CSS value (`'50% 20%'`).
|
|
3927
|
+
*/
|
|
3928
|
+
objectPosition(value: ImagePosition): this;
|
|
3880
3929
|
/**
|
|
3881
3930
|
* Fixed numeric `{ width, height }` still paints on the `<img>` (tests +
|
|
3882
3931
|
* object-fit). Any flexible SwiftUI frame (`maxWidth: Size.infinity`, …)
|