fiboui 2.6.4 → 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.
Files changed (50) hide show
  1. package/README.md +16 -6
  2. package/dist/cli/bin.js +3 -4
  3. package/dist/cli/commands/generate/component.js +21 -33
  4. package/dist/cli/commands/generate/index.js +3 -3
  5. package/dist/cli/commands/generate/module.js +21 -24
  6. package/dist/cli/commands/generate/plugin.js +18 -34
  7. package/dist/cli/commands/init.js +5 -25
  8. package/dist/cli/config.js +118 -0
  9. package/dist/cli/names.js +35 -0
  10. package/dist/cli/templates.js +76 -0
  11. package/dist/client-CGjHCx8F.js +17621 -0
  12. package/dist/content.d.ts +1 -0
  13. package/dist/content.js +14 -14
  14. package/dist/core.d.ts +2 -0
  15. package/dist/core.js +65 -59
  16. package/dist/effects-BxvduC-G.js +14 -0
  17. package/dist/icons-GEqYd2M9.js +383 -0
  18. package/dist/index-7bieEGAP.js +944 -0
  19. package/dist/index-C4qvvr03.js +1474 -0
  20. package/dist/index-D-ljLuf8.js +839 -0
  21. package/dist/index-DVApKYWt.js +217 -0
  22. package/dist/index-Db8lVjta.js +150 -0
  23. package/dist/index.d.ts +73156 -505
  24. package/dist/index.js +4419 -2238
  25. package/dist/interactive.d.ts +2 -0
  26. package/dist/interactive.js +22 -9
  27. package/dist/layout.d.ts +1 -0
  28. package/dist/layout.js +14 -13
  29. package/dist/metadata-3YYH1uiS.js +147 -0
  30. package/dist/navigation.d.ts +1 -0
  31. package/dist/navigation.js +15 -9
  32. package/dist/page-CYqQOLXe.js +266 -0
  33. package/dist/server.d.ts +2 -0
  34. package/dist/server.js +5001 -1777
  35. package/dist/structure.d.ts +1 -0
  36. package/dist/structure.js +13 -9
  37. package/dist/style.css +1 -1
  38. package/dist/theme.d.ts +2 -0
  39. package/dist/theme.js +8 -8
  40. package/package.json +9 -2
  41. package/dist/Link-YjcbA4af.js +0 -50
  42. package/dist/PluginManager-BRjgOLVa.js +0 -110
  43. package/dist/client-DzQ13khL.js +0 -10605
  44. package/dist/effects-D16XdB_d.js +0 -10
  45. package/dist/index-B-cCNvV4.js +0 -455
  46. package/dist/index-Bj-IMHC8.js +0 -119
  47. package/dist/index-CWyBsVAL.js +0 -608
  48. package/dist/index-CYisDyI8.js +0 -602
  49. package/dist/index-Dil2ZG0X.js +0 -1028
  50. package/dist/mount-CDwiTTXM.js +0 -135
@@ -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-DzQ13khL.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
- };