fiboui 2.6.3 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -6
- package/dist/cli/bin.js +3 -4
- package/dist/cli/commands/generate/component.js +21 -33
- package/dist/cli/commands/generate/index.js +3 -3
- package/dist/cli/commands/generate/module.js +21 -24
- package/dist/cli/commands/generate/plugin.js +18 -34
- package/dist/cli/commands/init.js +5 -25
- package/dist/cli/config.js +118 -0
- package/dist/cli/names.js +35 -0
- package/dist/cli/templates.js +76 -0
- package/dist/client-CGjHCx8F.js +17621 -0
- package/dist/content.d.ts +1 -0
- package/dist/content.js +14 -14
- package/dist/core.d.ts +2 -0
- package/dist/core.js +65 -59
- package/dist/effects-BxvduC-G.js +14 -0
- package/dist/icons-GEqYd2M9.js +383 -0
- package/dist/index-7bieEGAP.js +944 -0
- package/dist/index-C4qvvr03.js +1474 -0
- package/dist/index-D-ljLuf8.js +839 -0
- package/dist/index-DVApKYWt.js +217 -0
- package/dist/index-Db8lVjta.js +150 -0
- package/dist/index.d.ts +73156 -505
- package/dist/index.js +4419 -2237
- package/dist/interactive.d.ts +2 -0
- package/dist/interactive.js +22 -9
- package/dist/layout.d.ts +1 -0
- package/dist/layout.js +14 -13
- package/dist/metadata-3YYH1uiS.js +147 -0
- package/dist/navigation.d.ts +1 -0
- package/dist/navigation.js +15 -9
- package/dist/page-CYqQOLXe.js +266 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +5001 -1777
- package/dist/structure.d.ts +1 -0
- package/dist/structure.js +13 -9
- package/dist/style.css +1 -1
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +8 -8
- package/package.json +9 -2
- package/dist/Link-l2KUUUg4.js +0 -50
- package/dist/PluginManager-BRjgOLVa.js +0 -110
- package/dist/client-BtHxgLa_.js +0 -10602
- package/dist/effects-D16XdB_d.js +0 -10
- package/dist/index-Bhq7-OrE.js +0 -602
- package/dist/index-CZJqskaC.js +0 -1028
- package/dist/index-D50CTdE9.js +0 -455
- package/dist/index-D5Ru-8kF.js +0 -608
- package/dist/index-DjwLjHe1.js +0 -119
- package/dist/mount-yYCj33dL.js +0 -135
package/dist/index-DjwLjHe1.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty;
|
|
2
|
-
var p = (e, t, s) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
-
var r = (e, t, s) => p(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
-
import o from "react";
|
|
5
|
-
import { at as a, au as u } from "./client-BtHxgLa_.js";
|
|
6
|
-
class g extends u {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
r(this, "_mainAxisAlignment", "start");
|
|
10
|
-
r(this, "_crossAxisAlignment", "start");
|
|
11
|
-
r(this, "_spacing");
|
|
12
|
-
}
|
|
13
|
-
mainAxisAlignment(s) {
|
|
14
|
-
return this._mainAxisAlignment = s, this;
|
|
15
|
-
}
|
|
16
|
-
crossAxisAlignment(s) {
|
|
17
|
-
return this._crossAxisAlignment = s, this;
|
|
18
|
-
}
|
|
19
|
-
spacing(s) {
|
|
20
|
-
return this._spacing = s, this;
|
|
21
|
-
}
|
|
22
|
-
items(s) {
|
|
23
|
-
return this.children(s), this;
|
|
24
|
-
}
|
|
25
|
-
build() {
|
|
26
|
-
const s = {
|
|
27
|
-
start: "justify-start",
|
|
28
|
-
center: "justify-center",
|
|
29
|
-
end: "justify-end",
|
|
30
|
-
spaceBetween: "justify-between",
|
|
31
|
-
spaceAround: "justify-around",
|
|
32
|
-
spaceEvenly: "justify-evenly"
|
|
33
|
-
}, i = {
|
|
34
|
-
start: "items-start",
|
|
35
|
-
center: "items-center",
|
|
36
|
-
end: "items-end",
|
|
37
|
-
stretch: "items-stretch"
|
|
38
|
-
}, c = [
|
|
39
|
-
"fibo-row",
|
|
40
|
-
"flex",
|
|
41
|
-
"flex-row",
|
|
42
|
-
// min-w-0: flex item can shrink below content intrinsic width (grid/flex overflow)
|
|
43
|
-
this.isHug() ? "w-auto self-auto shrink-0" : "w-full min-w-0 self-stretch",
|
|
44
|
-
s[this._mainAxisAlignment],
|
|
45
|
-
i[this._crossAxisAlignment],
|
|
46
|
-
...this._classNames
|
|
47
|
-
], n = this.getStyle();
|
|
48
|
-
this._spacing && (typeof this._spacing == "number" ? n.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? n.gap = this._spacing : n.gap = `${Number(this._spacing) * 4}px`);
|
|
49
|
-
const l = c.filter(Boolean).join(" "), h = this.processChildren();
|
|
50
|
-
return o.createElement(
|
|
51
|
-
"div",
|
|
52
|
-
{
|
|
53
|
-
className: l,
|
|
54
|
-
style: n,
|
|
55
|
-
...this._props
|
|
56
|
-
},
|
|
57
|
-
...h
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
const x = a(g), _ = o.memo((e) => {
|
|
62
|
-
const {
|
|
63
|
-
source: t,
|
|
64
|
-
color: s,
|
|
65
|
-
size: i,
|
|
66
|
-
className: c,
|
|
67
|
-
style: n,
|
|
68
|
-
...l
|
|
69
|
-
} = e;
|
|
70
|
-
return t ? typeof t == "string" ? o.createElement("img", {
|
|
71
|
-
src: t,
|
|
72
|
-
alt: "icon",
|
|
73
|
-
width: i,
|
|
74
|
-
height: i,
|
|
75
|
-
className: c,
|
|
76
|
-
style: { ...n, color: s },
|
|
77
|
-
...l
|
|
78
|
-
}) : o.createElement(t, {
|
|
79
|
-
color: s,
|
|
80
|
-
size: i,
|
|
81
|
-
className: c,
|
|
82
|
-
style: n,
|
|
83
|
-
...l
|
|
84
|
-
}) : null;
|
|
85
|
-
});
|
|
86
|
-
class f extends u {
|
|
87
|
-
constructor(s) {
|
|
88
|
-
super();
|
|
89
|
-
r(this, "_source");
|
|
90
|
-
r(this, "_color", "currentColor");
|
|
91
|
-
r(this, "_size", 24);
|
|
92
|
-
this._source = s;
|
|
93
|
-
}
|
|
94
|
-
source(s) {
|
|
95
|
-
return this._source = s, this;
|
|
96
|
-
}
|
|
97
|
-
color(s) {
|
|
98
|
-
return this._color = s, this;
|
|
99
|
-
}
|
|
100
|
-
size(s) {
|
|
101
|
-
return this._size = s, this;
|
|
102
|
-
}
|
|
103
|
-
build() {
|
|
104
|
-
const i = ["fibo-icon", ...this._classNames].filter(Boolean).join(" "), c = {
|
|
105
|
-
source: this._source,
|
|
106
|
-
color: this._color,
|
|
107
|
-
size: this._size,
|
|
108
|
-
className: i,
|
|
109
|
-
style: this.getStyle(),
|
|
110
|
-
...this._props
|
|
111
|
-
};
|
|
112
|
-
return o.createElement(_, c);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
const w = a(f);
|
|
116
|
-
export {
|
|
117
|
-
w as I,
|
|
118
|
-
x as R
|
|
119
|
-
};
|
package/dist/mount-yYCj33dL.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
var S = Object.defineProperty;
|
|
2
|
-
var O = (e, t, n) => t in e ? S(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var p = (e, t, n) => O(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { G as P, S as g, av as E, T as _, R as C, aw as q, P as I, ax as k } from "./client-BtHxgLa_.js";
|
|
5
|
-
import r, { StrictMode as x } from "react";
|
|
6
|
-
import { createRoot as M } from "react-dom/client";
|
|
7
|
-
import { P as B } from "./PluginManager-BRjgOLVa.js";
|
|
8
|
-
const y = {
|
|
9
|
-
linear: (e) => e,
|
|
10
|
-
easeIn: (e) => e * e,
|
|
11
|
-
easeOut: (e) => e * (2 - e),
|
|
12
|
-
easeInOut: (e) => e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e
|
|
13
|
-
};
|
|
14
|
-
function T(e, t, n) {
|
|
15
|
-
return e + (t - e) * n;
|
|
16
|
-
}
|
|
17
|
-
const i = /* @__PURE__ */ new WeakMap();
|
|
18
|
-
g.prototype.spring = function(e, t = {}) {
|
|
19
|
-
this.animate(e, { ...t, curve: "spring", damping: t.damping ?? 26, stiffness: t.stiffness ?? 170 });
|
|
20
|
-
};
|
|
21
|
-
g.prototype.animate = function(e, t = {}) {
|
|
22
|
-
const n = this.value, s = e, a = i.get(this);
|
|
23
|
-
if (a && cancelAnimationFrame(a), t.curve === "spring") {
|
|
24
|
-
const c = t.stiffness ?? 170, m = t.damping ?? 26, f = t.mass ?? 1;
|
|
25
|
-
let h = n, d = t.velocity ?? 0;
|
|
26
|
-
const F = 1 / 60, b = () => {
|
|
27
|
-
var w;
|
|
28
|
-
const R = -c * (h - s) - m * d;
|
|
29
|
-
d += R / f * F, h += d * F, this.value = h, Math.abs(h - s) > 0.01 || Math.abs(d) > 0.01 ? i.set(this, requestAnimationFrame(b)) : (this.value = s, i.delete(this), (w = t.onComplete) == null || w.call(t));
|
|
30
|
-
};
|
|
31
|
-
i.set(this, requestAnimationFrame(b));
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const u = t.duration || 300, l = y[t.curve || "easeOut"] ?? y.easeOut;
|
|
35
|
-
let o = null;
|
|
36
|
-
const v = (c) => {
|
|
37
|
-
var f;
|
|
38
|
-
o || (o = c);
|
|
39
|
-
const m = Math.min((c - o) / u, 1);
|
|
40
|
-
this.value = T(n, s, l(m)), m < 1 ? i.set(this, requestAnimationFrame(v)) : (i.delete(this), (f = t.onComplete) == null || f.call(t));
|
|
41
|
-
};
|
|
42
|
-
i.set(this, requestAnimationFrame(v));
|
|
43
|
-
};
|
|
44
|
-
g.prototype.snapTo = function(e, t = {}) {
|
|
45
|
-
this.animate(e, { duration: 300, curve: "easeOut", ...t });
|
|
46
|
-
};
|
|
47
|
-
function D(e = {}) {
|
|
48
|
-
return P(e.curve ?? "easeOut", {
|
|
49
|
-
stiffness: e.stiffness,
|
|
50
|
-
damping: e.damping,
|
|
51
|
-
mass: e.mass
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function H(e, t = {}) {
|
|
55
|
-
const { styles: n = !0 } = t;
|
|
56
|
-
function s() {
|
|
57
|
-
const a = E(e());
|
|
58
|
-
return n ? r.createElement(r.Fragment, null, a, r.createElement(_)) : r.createElement(r.Fragment, null, a);
|
|
59
|
-
}
|
|
60
|
-
return s.displayName = "FiboPage", s;
|
|
61
|
-
}
|
|
62
|
-
function J(e) {
|
|
63
|
-
return r.createElement(
|
|
64
|
-
r.Fragment,
|
|
65
|
-
null,
|
|
66
|
-
E(e),
|
|
67
|
-
r.createElement(_)
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
class W {
|
|
71
|
-
constructor() {
|
|
72
|
-
p(this, "_rootComponent", null);
|
|
73
|
-
p(this, "_rootElement", null);
|
|
74
|
-
p(this, "_plugins", []);
|
|
75
|
-
}
|
|
76
|
-
use(t) {
|
|
77
|
-
return this._plugins.push(t), this;
|
|
78
|
-
}
|
|
79
|
-
plugins(t) {
|
|
80
|
-
return this._plugins.push(...t), this;
|
|
81
|
-
}
|
|
82
|
-
root(t) {
|
|
83
|
-
return this._rootComponent = t, this;
|
|
84
|
-
}
|
|
85
|
-
mount(t) {
|
|
86
|
-
const n = document.getElementById(t);
|
|
87
|
-
if (!n)
|
|
88
|
-
throw new Error(`Root element with id "${t}" not found`);
|
|
89
|
-
this._rootElement = n, this.build();
|
|
90
|
-
}
|
|
91
|
-
build() {
|
|
92
|
-
if (!this._rootComponent || !this._rootElement)
|
|
93
|
-
throw new Error("Root component and mount element must be provided");
|
|
94
|
-
const t = B.getInstance();
|
|
95
|
-
this._plugins.forEach((u) => {
|
|
96
|
-
t.use(u);
|
|
97
|
-
});
|
|
98
|
-
const n = this._rootComponent, s = () => r.createElement(C, {
|
|
99
|
-
children: r.createElement(q, {
|
|
100
|
-
stateMap: /* @__PURE__ */ new Map(),
|
|
101
|
-
children: r.createElement(I, {
|
|
102
|
-
providers: /* @__PURE__ */ new Map(),
|
|
103
|
-
children: r.createElement(n, null)
|
|
104
|
-
})
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
M(this._rootElement).render(r.createElement(s));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
const K = () => new W();
|
|
111
|
-
function A(e) {
|
|
112
|
-
return E(e);
|
|
113
|
-
}
|
|
114
|
-
function L({ children: e }) {
|
|
115
|
-
return A(e);
|
|
116
|
-
}
|
|
117
|
-
function Q(e, t, n) {
|
|
118
|
-
const s = typeof e == "string" ? document.querySelector(e) : e;
|
|
119
|
-
if (!s)
|
|
120
|
-
throw new Error(`mount: element not found: ${String(e)}`);
|
|
121
|
-
const a = typeof t == "function" && !k(t) ? t() : t, u = A(a), l = M(s), o = r.createElement(C, { children: u });
|
|
122
|
-
return l.render(
|
|
123
|
-
(n == null ? void 0 : n.strict) === !1 ? o : r.createElement(x, null, o)
|
|
124
|
-
), l;
|
|
125
|
-
}
|
|
126
|
-
export {
|
|
127
|
-
K as F,
|
|
128
|
-
W as a,
|
|
129
|
-
L as b,
|
|
130
|
-
D as c,
|
|
131
|
-
Q as m,
|
|
132
|
-
H as p,
|
|
133
|
-
A as t,
|
|
134
|
-
J as w
|
|
135
|
-
};
|