fiboui 1.0.2 → 2.1.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 (169) hide show
  1. package/README.md +141 -96
  2. package/dist/FineGrain-BTgNt7fN.js +29 -0
  3. package/dist/Link-DDzSPY1Q.js +88 -0
  4. package/dist/PluginManager-D5-ApsSN.js +111 -0
  5. package/dist/Router-i6Nc6qVs.js +386 -0
  6. package/dist/builder-6GkZlCaz.js +1894 -0
  7. package/dist/bundle-mjs-wppB-TKB.js +2760 -0
  8. package/dist/cli/bin.js +20 -0
  9. package/dist/cli/commands/generate/component.js +67 -0
  10. package/dist/cli/commands/generate/index.js +10 -0
  11. package/dist/cli/commands/generate/module.js +58 -0
  12. package/dist/cli/commands/generate/plugin.js +67 -0
  13. package/dist/cli/commands/init.js +58 -0
  14. package/dist/content.js +17 -0
  15. package/dist/core.js +33 -0
  16. package/dist/{effects-D16XdB_d.mjs → effects-CnevV566.js} +1 -0
  17. package/dist/index-BaX5zy8O.js +33 -0
  18. package/dist/index-C4xZywsh.js +1024 -0
  19. package/dist/index-C8y7FIYH.js +119 -0
  20. package/dist/index-CREALegH.js +1031 -0
  21. package/dist/index-CWz0hYog.js +778 -0
  22. package/dist/index-OLW4l8s8.js +1102 -0
  23. package/dist/index-zOfPHD00.js +90 -0
  24. package/dist/index.d.ts +43764 -6
  25. package/dist/index.js +2070 -0
  26. package/dist/interactive.js +12 -0
  27. package/dist/layout.js +18 -0
  28. package/dist/mount-rDUAHuDT.js +95 -0
  29. package/dist/navigation.js +13 -0
  30. package/dist/provider-B0eB-Wy7.js +286 -0
  31. package/dist/structure.js +15 -0
  32. package/dist/style.css +1 -1
  33. package/dist/style.js +1 -0
  34. package/dist/theme.js +9 -0
  35. package/package.json +88 -13
  36. package/dist/content/Alert/index.d.ts +0 -878
  37. package/dist/content/Avatar/index.d.ts +0 -886
  38. package/dist/content/Badge/index.d.ts +0 -887
  39. package/dist/content/Image/index.d.ts +0 -893
  40. package/dist/content/Label/index.d.ts +0 -879
  41. package/dist/content/Progress/index.d.ts +0 -898
  42. package/dist/content/Skeleton/index.d.ts +0 -879
  43. package/dist/content/Spinner/index.d.ts +0 -880
  44. package/dist/content/Text/index.d.ts +0 -878
  45. package/dist/content/index.d.ts +0 -9
  46. package/dist/core/StateWrapper.d.ts +0 -31
  47. package/dist/core/builder.d.ts +0 -58
  48. package/dist/core/component.d.ts +0 -7
  49. package/dist/core/effects.d.ts +0 -4
  50. package/dist/core/hooks.d.ts +0 -5
  51. package/dist/core/icons.d.ts +0 -11
  52. package/dist/core/index.d.ts +0 -6
  53. package/dist/core/state.d.ts +0 -86
  54. package/dist/core/types.d.ts +0 -51
  55. package/dist/demo.d.ts +0 -7
  56. package/dist/index.esm.js +0 -4777
  57. package/dist/index.umd.js +0 -251
  58. package/dist/interactive/Button/index.d.ts +0 -897
  59. package/dist/interactive/Checkbox/index.d.ts +0 -884
  60. package/dist/interactive/Combobox/index.d.ts +0 -898
  61. package/dist/interactive/RadioGroup/index.d.ts +0 -888
  62. package/dist/interactive/Select/index.d.ts +0 -895
  63. package/dist/interactive/Switch/index.d.ts +0 -881
  64. package/dist/interactive/TextField/index.d.ts +0 -893
  65. package/dist/interactive/Textarea/index.d.ts +0 -890
  66. package/dist/interactive/index.d.ts +0 -8
  67. package/dist/layout/Center/index.d.ts +0 -869
  68. package/dist/layout/Column/index.d.ts +0 -881
  69. package/dist/layout/Container/index.d.ts +0 -870
  70. package/dist/layout/DashboardLayout/index.d.ts +0 -870
  71. package/dist/layout/Header/index.d.ts +0 -870
  72. package/dist/layout/Line/index.d.ts +0 -872
  73. package/dist/layout/Row/index.d.ts +0 -879
  74. package/dist/layout/Scaffold/index.d.ts +0 -878
  75. package/dist/layout/ScrollView/index.d.ts +0 -879
  76. package/dist/layout/Sidebar/index.d.ts +0 -870
  77. package/dist/layout/Spacer/index.d.ts +0 -875
  78. package/dist/layout/StakentComponents.d.ts +0 -4
  79. package/dist/layout/index.d.ts +0 -11
  80. package/dist/structure/Banner/index.d.ts +0 -879
  81. package/dist/structure/Box/index.d.ts +0 -869
  82. package/dist/structure/Card/index.d.ts +0 -881
  83. package/dist/structure/Collapse/index.d.ts +0 -884
  84. package/dist/structure/Grid/index.d.ts +0 -1757
  85. package/dist/structure/List/index.d.ts +0 -888
  86. package/dist/structure/Table/index.d.ts +0 -895
  87. package/dist/structure/Tags/index.d.ts +0 -876
  88. package/dist/structure/cards/AssetCard/index.d.ts +0 -884
  89. package/dist/structure/cards/CollectionCard/index.d.ts +0 -880
  90. package/dist/structure/cards/ContentCard/index.d.ts +0 -884
  91. package/dist/structure/cards/ProfileCard/index.d.ts +0 -892
  92. package/dist/structure/cards/index.d.ts +0 -5
  93. package/dist/structure/cards/variants/index.d.ts +0 -3490
  94. package/dist/structure/index.d.ts +0 -9
  95. package/dist/theme/cupertino.d.ts +0 -3
  96. package/dist/theme/index.d.ts +0 -5
  97. package/dist/theme/material.d.ts +0 -3
  98. package/dist/theme/provider.d.ts +0 -16
  99. package/dist/theme/types.d.ts +0 -57
  100. package/dist/theme/web.d.ts +0 -3
  101. package/src/content/Alert/index.ts +0 -110
  102. package/src/content/Avatar/index.ts +0 -116
  103. package/src/content/Badge/index.ts +0 -162
  104. package/src/content/Image/index.ts +0 -137
  105. package/src/content/Label/index.ts +0 -66
  106. package/src/content/Progress/index.ts +0 -378
  107. package/src/content/Skeleton/index.ts +0 -71
  108. package/src/content/Spinner/index.ts +0 -139
  109. package/src/content/Text/index.ts +0 -74
  110. package/src/content/index.ts +0 -9
  111. package/src/core/StateWrapper.tsx +0 -131
  112. package/src/core/builder.ts +0 -301
  113. package/src/core/component.ts +0 -49
  114. package/src/core/effects.ts +0 -27
  115. package/src/core/hooks.ts +0 -48
  116. package/src/core/icons.tsx +0 -57
  117. package/src/core/index.ts +0 -6
  118. package/src/core/state.ts +0 -297
  119. package/src/core/types.ts +0 -62
  120. package/src/demo.tsx +0 -1050
  121. package/src/index.ts +0 -8
  122. package/src/interactive/Button/index.ts +0 -219
  123. package/src/interactive/Checkbox/index.ts +0 -145
  124. package/src/interactive/Combobox/index.ts +0 -278
  125. package/src/interactive/RadioGroup/index.ts +0 -124
  126. package/src/interactive/Select/index.ts +0 -227
  127. package/src/interactive/Switch/index.ts +0 -123
  128. package/src/interactive/TextField/index.ts +0 -223
  129. package/src/interactive/Textarea/index.ts +0 -129
  130. package/src/interactive/index.ts +0 -8
  131. package/src/layout/Center/index.ts +0 -34
  132. package/src/layout/Column/index.ts +0 -101
  133. package/src/layout/Container/index.ts +0 -28
  134. package/src/layout/DashboardLayout/index.ts +0 -106
  135. package/src/layout/Header/index.ts +0 -50
  136. package/src/layout/Line/index.ts +0 -41
  137. package/src/layout/Row/index.ts +0 -93
  138. package/src/layout/Scaffold/index.ts +0 -133
  139. package/src/layout/ScrollView/index.ts +0 -67
  140. package/src/layout/Sidebar/index.ts +0 -56
  141. package/src/layout/Spacer/index.ts +0 -46
  142. package/src/layout/StakentComponents.tsx +0 -57
  143. package/src/layout/index.ts +0 -11
  144. package/src/structure/Banner/index.ts +0 -92
  145. package/src/structure/Box/index.ts +0 -46
  146. package/src/structure/Card/index.ts +0 -113
  147. package/src/structure/Collapse/index.ts +0 -122
  148. package/src/structure/Grid/index.ts +0 -197
  149. package/src/structure/List/index.ts +0 -185
  150. package/src/structure/Table/index.ts +0 -165
  151. package/src/structure/Tags/index.ts +0 -69
  152. package/src/structure/cards/AssetCard/index.ts +0 -158
  153. package/src/structure/cards/CollectionCard/index.ts +0 -95
  154. package/src/structure/cards/ContentCard/index.ts +0 -127
  155. package/src/structure/cards/ProfileCard/index.ts +0 -152
  156. package/src/structure/cards/index.ts +0 -5
  157. package/src/structure/cards/variants/index.ts +0 -301
  158. package/src/structure/index.ts +0 -10
  159. package/src/styles/base.css +0 -186
  160. package/src/styles/core.css +0 -52
  161. package/src/styles/themes/cupertino.css +0 -197
  162. package/src/styles/themes/material.css +0 -322
  163. package/src/styles/themes/web.css +0 -196
  164. package/src/theme/cupertino.ts +0 -85
  165. package/src/theme/index.ts +0 -5
  166. package/src/theme/material.ts +0 -86
  167. package/src/theme/provider.tsx +0 -76
  168. package/src/theme/types.ts +0 -62
  169. package/src/theme/web.ts +0 -82
@@ -0,0 +1,778 @@
1
+ "use client";
2
+ var X = Object.defineProperty;
3
+ var q = (n, s, e) => s in n ? X(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
4
+ var r = (n, s, e) => q(n, typeof s != "symbol" ? s + "" : s, e);
5
+ import i, { useState as F, useRef as D, useLayoutEffect as G } from "react";
6
+ import { h as p, F as b, n as J, l as V, P as K } from "./builder-6GkZlCaz.js";
7
+ import { P as W } from "./PluginManager-D5-ApsSN.js";
8
+ import { R as Q, I as U } from "./index-C8y7FIYH.js";
9
+ import { T as ee } from "./index-zOfPHD00.js";
10
+ import { e as te, L as ie } from "./Link-DDzSPY1Q.js";
11
+ class se extends b {
12
+ build() {
13
+ const e = [
14
+ "fibo-center",
15
+ "flex",
16
+ "items-center",
17
+ "justify-center",
18
+ ...this._classNames
19
+ ].filter(Boolean).join(" "), t = this.getStyle(), o = this.processChildren();
20
+ return i.createElement(
21
+ "div",
22
+ {
23
+ className: e,
24
+ style: t,
25
+ ...this._props
26
+ },
27
+ ...o
28
+ );
29
+ }
30
+ }
31
+ const ke = p(se);
32
+ class re extends b {
33
+ constructor() {
34
+ super(...arguments);
35
+ r(this, "_mainAxisAlignment", "start");
36
+ // Flutter Column / SwiftUI VStack default: center. Stretch is opt-in.
37
+ r(this, "_crossAxisAlignment", "center");
38
+ r(this, "_spacing");
39
+ r(this, "_size");
40
+ }
41
+ mainAxisAlignment(e) {
42
+ return this._mainAxisAlignment = e, this;
43
+ }
44
+ crossAxisAlignment(e) {
45
+ return this._crossAxisAlignment = e, this;
46
+ }
47
+ spacing(e) {
48
+ return this._spacing = e, this;
49
+ }
50
+ size(e) {
51
+ return this._size = e, this;
52
+ }
53
+ build() {
54
+ const e = {
55
+ start: "justify-start",
56
+ center: "justify-center",
57
+ end: "justify-end",
58
+ spaceBetween: "justify-between",
59
+ spaceAround: "justify-around",
60
+ spaceEvenly: "justify-evenly"
61
+ }, t = {
62
+ start: "items-start",
63
+ center: "items-center",
64
+ end: "items-end",
65
+ stretch: "items-stretch"
66
+ }, o = {
67
+ small: "flex-[0.3]",
68
+ medium: "flex-1",
69
+ large: "flex-[1.5]"
70
+ }, c = [
71
+ "fibo-column",
72
+ "flex",
73
+ "flex-col",
74
+ this.isHug() ? "w-auto self-auto" : "w-full",
75
+ e[this._mainAxisAlignment],
76
+ t[this._crossAxisAlignment],
77
+ this._size ? o[this._size] : "",
78
+ ...this._classNames
79
+ ], h = this.getStyle();
80
+ this._spacing && (typeof this._spacing == "number" ? h.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? h.gap = this._spacing : h.gap = `${Number(this._spacing) * 4}px`);
81
+ const d = c.filter(Boolean).join(" "), f = this.processChildren();
82
+ return i.createElement(
83
+ "div",
84
+ {
85
+ className: d,
86
+ style: h,
87
+ ...this._props
88
+ },
89
+ ...f
90
+ );
91
+ }
92
+ }
93
+ const Ie = p(re);
94
+ class ne extends b {
95
+ build() {
96
+ const s = this.getClassName(), e = this.getStyle(), t = this.processChildren();
97
+ return i.createElement(
98
+ "div",
99
+ {
100
+ className: `fibo-container ${s}`,
101
+ style: e,
102
+ ...this._props
103
+ },
104
+ ...t
105
+ );
106
+ }
107
+ }
108
+ const He = p(ne);
109
+ class le extends b {
110
+ constructor() {
111
+ super(...arguments);
112
+ r(this, "_height");
113
+ r(this, "_width");
114
+ r(this, "_direction");
115
+ }
116
+ height(e) {
117
+ return this._height = e, this;
118
+ }
119
+ width(e) {
120
+ return this._width = e, this;
121
+ }
122
+ vertical() {
123
+ return this._direction = "vertical", this;
124
+ }
125
+ horizontal() {
126
+ return this._direction = "horizontal", this;
127
+ }
128
+ build() {
129
+ const e = this.getStyle();
130
+ this._direction === "vertical" ? (e.flex = "1", e.height = this._height ? typeof this._height == "number" ? `${this._height}px` : this._height : "auto") : this._direction === "horizontal" ? (e.flex = "1", e.width = this._width ? typeof this._width == "number" ? `${this._width}px` : this._width : "auto") : (this._height && (e.height = typeof this._height == "number" ? `${this._height}px` : this._height), this._width && (e.width = typeof this._width == "number" ? `${this._width}px` : this._width));
131
+ const t = this.getClassName();
132
+ return i.createElement("div", {
133
+ className: `fibo-spacer ${t}`,
134
+ style: e,
135
+ ...this._props
136
+ });
137
+ }
138
+ }
139
+ const ze = p(le), ae = i.memo((n) => {
140
+ const {
141
+ theme: s,
142
+ locale: e,
143
+ providers: t = {},
144
+ className: o,
145
+ style: c,
146
+ children: h,
147
+ overlays: d = []
148
+ } = n, f = /* @__PURE__ */ new Map();
149
+ s && f.set("theme", s), e && f.set("locale", e), Object.entries(t).forEach(([B, w]) => {
150
+ f.set(B, w);
151
+ });
152
+ const _ = i.createElement(
153
+ "div",
154
+ {
155
+ className: `fibo-scaffold ${o || ""}`,
156
+ style: {
157
+ height: "100vh",
158
+ overflow: "hidden",
159
+ display: "flex",
160
+ flexDirection: "column",
161
+ position: "relative",
162
+ // Ensure relative positioning for overlays
163
+ ...c
164
+ }
165
+ },
166
+ [h, ...d]
167
+ );
168
+ return f.size > 0 ? i.createElement(
169
+ K,
170
+ {
171
+ providers: f,
172
+ children: _
173
+ }
174
+ ) : _;
175
+ });
176
+ class oe extends b {
177
+ constructor() {
178
+ super(...arguments);
179
+ r(this, "_locale");
180
+ r(this, "_customProviders", {});
181
+ r(this, "_structure", {});
182
+ r(this, "_headerBar");
183
+ r(this, "_footerBar");
184
+ r(this, "_sideBarLeft");
185
+ r(this, "_sideBarRight");
186
+ }
187
+ locale(e) {
188
+ return this._locale = e, this;
189
+ }
190
+ providers(e) {
191
+ return this._customProviders = { ...this._customProviders, ...e }, this;
192
+ }
193
+ provider(e, t) {
194
+ return this._customProviders[e] = t, this;
195
+ }
196
+ structure(e) {
197
+ return this._structure = { ...this._structure, ...e }, this;
198
+ }
199
+ headerBar(e) {
200
+ return this._headerBar = this._normalizeBar(e), this;
201
+ }
202
+ footerBar(e) {
203
+ return this._footerBar = this._normalizeBar(e), this;
204
+ }
205
+ sideBarLeft(e) {
206
+ return this._sideBarLeft = this._normalizeBar(e), this;
207
+ }
208
+ sideBarRight(e) {
209
+ return this._sideBarRight = this._normalizeBar(e), this;
210
+ }
211
+ _normalizeBar(e) {
212
+ return this._isLayoutBarConfig(e) ? {
213
+ content: i.createElement(i.Fragment, null, ...J(e.children)),
214
+ fixed: e.fixed ?? !1
215
+ } : {
216
+ content: V(e),
217
+ fixed: !1
218
+ };
219
+ }
220
+ _isLayoutBarConfig(e) {
221
+ return !e || typeof e != "object" || i.isValidElement(e) || "build" in e && typeof e.build == "function" ? !1 : "children" in e && !("type" in e);
222
+ }
223
+ build() {
224
+ var C, E, S, M, y, k, I, L, R, A, $, j, l, a, u, g, H, O, z, P, T, Y;
225
+ const e = this.processChildren(), t = this._structure, o = this._headerBar && ((C = t.header) == null ? void 0 : C.visible) !== !1, c = this._footerBar && ((E = t.footer) == null ? void 0 : E.visible) !== !1, h = this._sideBarLeft && ((S = t.sidebarLeft) == null ? void 0 : S.visible) !== !1, d = this._sideBarRight && ((M = t.sidebarRight) == null ? void 0 : M.visible) !== !1, f = h && ((y = t.sidebarLeft) == null ? void 0 : y.fullHeight), _ = d && ((k = t.sidebarRight) == null ? void 0 : k.fullHeight), B = i.createElement(
226
+ "div",
227
+ {
228
+ key: "scaffold-middle",
229
+ style: {
230
+ flex: 1,
231
+ display: "flex",
232
+ flexDirection: "row",
233
+ overflow: "hidden",
234
+ position: "relative"
235
+ }
236
+ },
237
+ [
238
+ h && !f && i.createElement("div", {
239
+ key: "sidebar-left",
240
+ className: "z-20",
241
+ style: {
242
+ width: (I = t.sidebarLeft) == null ? void 0 : I.width,
243
+ position: ((L = t.sidebarLeft) == null ? void 0 : L.mode) === "over" ? "absolute" : ((R = t.sidebarLeft) == null ? void 0 : R.behavior) === "fixed" || this._sideBarLeft.fixed ? "sticky" : void 0,
244
+ top: ((A = t.sidebarLeft) == null ? void 0 : A.behavior) === "fixed" || this._sideBarLeft.fixed ? 0 : void 0,
245
+ height: (($ = t.sidebarLeft) == null ? void 0 : $.behavior) === "fixed" || this._sideBarLeft.fixed ? "100%" : void 0,
246
+ overflowY: "auto",
247
+ borderRight: "1px solid var(--fibo-outline, #e0e0e0)",
248
+ backgroundColor: "var(--fibo-surface, #ffffff)"
249
+ }
250
+ }, this._sideBarLeft.content),
251
+ i.createElement("main", {
252
+ key: "scaffold-body",
253
+ style: {
254
+ flex: 1,
255
+ display: "flex",
256
+ flexDirection: "column",
257
+ overflow: "auto",
258
+ position: "relative"
259
+ }
260
+ }, e),
261
+ d && !_ && i.createElement("div", {
262
+ key: "sidebar-right",
263
+ className: "z-20",
264
+ style: {
265
+ width: (j = t.sidebarRight) == null ? void 0 : j.width,
266
+ position: ((l = t.sidebarRight) == null ? void 0 : l.mode) === "over" ? "absolute" : ((a = t.sidebarRight) == null ? void 0 : a.behavior) === "fixed" || this._sideBarRight.fixed ? "sticky" : void 0,
267
+ top: ((u = t.sidebarRight) == null ? void 0 : u.behavior) === "fixed" || this._sideBarRight.fixed ? 0 : void 0,
268
+ height: ((g = t.sidebarRight) == null ? void 0 : g.behavior) === "fixed" || this._sideBarRight.fixed ? "100%" : void 0,
269
+ overflowY: "auto",
270
+ borderLeft: "1px solid var(--fibo-outline, #e0e0e0)",
271
+ backgroundColor: "var(--fibo-surface, #ffffff)"
272
+ }
273
+ }, this._sideBarRight.content)
274
+ ].filter(Boolean)
275
+ ), w = i.createElement(i.Fragment, null, [
276
+ o && i.createElement("div", {
277
+ key: "header-bar",
278
+ className: "z-30",
279
+ style: {
280
+ height: (H = t.header) == null ? void 0 : H.height,
281
+ position: ((O = t.header) == null ? void 0 : O.position) || (this._headerBar.fixed ? "sticky" : "static"),
282
+ top: 0,
283
+ backgroundColor: "var(--fibo-surface, #ffffff)",
284
+ zIndex: 30,
285
+ borderBottom: "1px solid var(--fibo-outline, #e0e0e0)"
286
+ }
287
+ }, this._headerBar.content),
288
+ B,
289
+ c && i.createElement("div", {
290
+ key: "footer-bar",
291
+ className: "z-30",
292
+ style: {
293
+ height: (z = t.footer) == null ? void 0 : z.height,
294
+ position: ((P = t.footer) == null ? void 0 : P.position) || (this._footerBar.fixed ? "sticky" : "static"),
295
+ bottom: 0,
296
+ backgroundColor: "var(--fibo-surface, #ffffff)",
297
+ zIndex: 30,
298
+ borderTop: "1px solid var(--fibo-outline, #e0e0e0)"
299
+ }
300
+ }, this._footerBar.content)
301
+ ].filter(Boolean));
302
+ let m = i.createElement("div", {
303
+ key: "vertical-stack",
304
+ style: {
305
+ display: "flex",
306
+ flexDirection: "column",
307
+ flex: 1,
308
+ minHeight: "100%",
309
+ height: "100%",
310
+ overflow: "hidden"
311
+ }
312
+ }, w);
313
+ f && (m = i.createElement("div", {
314
+ key: "full-height-left-wrapper",
315
+ style: { display: "flex", flexDirection: "row", flex: 1, height: "100%", overflow: "hidden" }
316
+ }, [
317
+ i.createElement("div", {
318
+ key: "sidebar-left-full",
319
+ style: {
320
+ width: (T = t.sidebarLeft) == null ? void 0 : T.width,
321
+ overflowY: "auto",
322
+ borderRight: "1px solid var(--fibo-outline, #e0e0e0)",
323
+ backgroundColor: "var(--fibo-surface, #ffffff)",
324
+ zIndex: 40
325
+ }
326
+ }, this._sideBarLeft.content),
327
+ m
328
+ ])), _ && (m = i.createElement("div", {
329
+ key: "full-height-right-wrapper",
330
+ style: { display: "flex", flexDirection: "row", flex: 1, height: "100%", overflow: "hidden" }
331
+ }, [
332
+ m,
333
+ i.createElement("div", {
334
+ key: "sidebar-right-full",
335
+ style: {
336
+ width: (Y = t.sidebarRight) == null ? void 0 : Y.width,
337
+ overflowY: "auto",
338
+ borderLeft: "1px solid var(--fibo-outline, #e0e0e0)",
339
+ backgroundColor: "var(--fibo-surface, #ffffff)",
340
+ zIndex: 40
341
+ }
342
+ }, this._sideBarRight.content)
343
+ ]));
344
+ const v = W.getInstance().getOverlays().map((Z) => Z().build()), x = {
345
+ theme: this._theme,
346
+ locale: this._locale,
347
+ providers: this._customProviders,
348
+ className: this.getClassName(),
349
+ style: this.getStyle(),
350
+ children: m,
351
+ overlays: v
352
+ };
353
+ return i.createElement(ae, x);
354
+ }
355
+ }
356
+ const Se = p(oe), he = i.memo((n) => {
357
+ const { height: s = 64, sticky: e, className: t, style: o, children: c, ...h } = n;
358
+ return i.createElement(
359
+ "header",
360
+ {
361
+ className: `flex items-center px-6 border-b border-gray-200 bg-white/80 backdrop-blur-md z-10 w-full ${e ? "sticky top-0" : ""} ${t || ""}`,
362
+ style: { height: s, minHeight: s, ...o },
363
+ ...h
364
+ },
365
+ c
366
+ );
367
+ });
368
+ class ce extends b {
369
+ constructor() {
370
+ super(...arguments);
371
+ r(this, "_height", 64);
372
+ r(this, "_sticky", !1);
373
+ }
374
+ height(e) {
375
+ return this._height = e, this;
376
+ }
377
+ sticky(e = !0) {
378
+ return this._sticky = e, this;
379
+ }
380
+ build() {
381
+ const e = {
382
+ height: this._height,
383
+ sticky: this._sticky,
384
+ className: this.getClassName(),
385
+ style: this.getStyle(),
386
+ children: this.processChildren(),
387
+ ...this._props
388
+ };
389
+ return i.createElement(he, e);
390
+ }
391
+ }
392
+ const Le = p(ce), de = i.memo((n) => {
393
+ const { width: s = 260, collapsed: e, className: t, style: o, children: c, ...h } = n, d = te(), f = (d == null ? void 0 : d.currentPath) ?? (typeof window < "u" ? window.location.pathname : ""), _ = e ? 80 : s, w = W.getInstance().getSidebarItems().map((m, N) => {
394
+ const v = f === m.path;
395
+ return i.createElement(ie, {
396
+ key: `plugin-item-${m.path || N}`,
397
+ to: m.path,
398
+ className: "no-underline block mb-1",
399
+ children: Q().padding(12).alignItems("center").gap(12).className(`
400
+ transition-colors duration-200 rounded-lg mx-2
401
+ ${v ? "bg-primary/10 text-primary" : "text-gray-600 hover:bg-gray-100"}
402
+ `).children([
403
+ m.icon ? U(m.icon).size(20).build() : null,
404
+ e ? null : ee(m.label).style({ fontSize: 14 }).weight(500).build()
405
+ ].filter(Boolean)).build()
406
+ });
407
+ });
408
+ return i.createElement(
409
+ "aside",
410
+ {
411
+ className: `flex flex-col border-r border-gray-200 bg-white transition-all duration-300 h-full ${t || ""}`,
412
+ style: { width: _, minWidth: _, ...o },
413
+ ...h
414
+ },
415
+ c,
416
+ w
417
+ );
418
+ });
419
+ class fe extends b {
420
+ constructor() {
421
+ super(...arguments);
422
+ r(this, "_width", 260);
423
+ r(this, "_collapsed", !1);
424
+ }
425
+ width(e) {
426
+ return this._width = e, this;
427
+ }
428
+ collapsible(e = !1) {
429
+ return this._collapsed = e, this;
430
+ }
431
+ build() {
432
+ const e = {
433
+ width: this._width,
434
+ collapsed: this._collapsed,
435
+ className: this.getClassName(),
436
+ style: this.getStyle(),
437
+ children: this.processChildren(),
438
+ ...this._props
439
+ };
440
+ return i.createElement(de, e);
441
+ }
442
+ }
443
+ const Re = p(fe), me = i.memo((n) => {
444
+ const { sidebar: s, header: e, children: t, className: o, style: c, ...h } = n, [d, f] = F(!1);
445
+ return i.createElement(
446
+ "div",
447
+ {
448
+ className: `h-full w-full bg-[#0B0C15] overflow-hidden relative ${o || ""}`,
449
+ style: c,
450
+ ...h
451
+ },
452
+ d && i.createElement("div", {
453
+ className: "fixed inset-0 z-40 bg-black/50 backdrop-blur-sm transition-opacity lg:hidden",
454
+ onClick: () => f(!1)
455
+ }),
456
+ i.createElement(
457
+ "button",
458
+ {
459
+ className: "lg:hidden fixed top-4 right-4 z-50 p-2 rounded-lg bg-[#1A1B23] border border-white/10 text-white shadow-lg",
460
+ onClick: () => f(!d)
461
+ },
462
+ i.createElement("div", { className: d ? "i-heroicons-x-mark w-6 h-6" : "i-heroicons-bars-3 w-6 h-6" })
463
+ ),
464
+ i.createElement(
465
+ "div",
466
+ {
467
+ className: "grid h-full w-full lg:grid-cols-[260px_1fr] transition-all duration-300"
468
+ },
469
+ i.createElement(
470
+ "aside",
471
+ {
472
+ className: `
473
+ fixed inset-y-0 left-0 z-50 w-[260px] bg-[#0B0C15] border-r border-white/5 transition-transform duration-300 transform
474
+ lg:relative lg:translate-x-0
475
+ ${d ? "translate-x-0 shadow-2xl" : "-translate-x-full"}
476
+ `
477
+ },
478
+ s
479
+ ),
480
+ i.createElement(
481
+ "main",
482
+ {
483
+ className: "flex flex-col min-w-0 h-full overflow-hidden relative"
484
+ },
485
+ e && i.createElement("div", { className: "flex-shrink-0" }, e),
486
+ i.createElement(
487
+ "div",
488
+ { className: "flex-1 overflow-y-auto scrollbar-hide p-4 lg:p-0" },
489
+ t
490
+ )
491
+ )
492
+ )
493
+ );
494
+ });
495
+ class ue extends b {
496
+ constructor() {
497
+ super(...arguments);
498
+ r(this, "_sidebar");
499
+ r(this, "_header");
500
+ }
501
+ sidebar(e) {
502
+ return this._sidebar = V(e), this;
503
+ }
504
+ header(e) {
505
+ return this._header = V(e), this;
506
+ }
507
+ build() {
508
+ const e = {
509
+ sidebar: this._sidebar,
510
+ header: this._header,
511
+ className: this.getClassName(),
512
+ style: this.getStyle(),
513
+ children: this.processChildren(),
514
+ ...this._props
515
+ };
516
+ return i.createElement(me, e);
517
+ }
518
+ }
519
+ const Ae = p(ue);
520
+ class ge extends b {
521
+ constructor() {
522
+ super(...arguments);
523
+ r(this, "_alignment", "center");
524
+ }
525
+ alignment(e) {
526
+ return this._alignment = e, this;
527
+ }
528
+ build() {
529
+ const o = [
530
+ "grid",
531
+ "grid-cols-1",
532
+ "grid-rows-1",
533
+ "[&>*]:col-start-1",
534
+ "[&>*]:row-start-1",
535
+ {
536
+ center: "place-items-center",
537
+ top: "place-items-start justify-items-center",
538
+ bottom: "place-items-end justify-items-center",
539
+ left: "place-items-start content-center",
540
+ right: "place-items-end content-center",
541
+ topLeft: "place-items-start",
542
+ topRight: "justify-items-end items-start",
543
+ bottomLeft: "justify-items-start items-end",
544
+ bottomRight: "place-items-end"
545
+ }[this._alignment] || "place-items-center",
546
+ ...this._classNames
547
+ ].filter(Boolean).join(" "), c = this.getStyle(), h = this.processChildren();
548
+ return i.createElement(
549
+ "div",
550
+ {
551
+ className: o,
552
+ style: c,
553
+ ...this._props
554
+ },
555
+ ...h
556
+ );
557
+ }
558
+ }
559
+ const $e = p(ge);
560
+ class pe extends b {
561
+ constructor() {
562
+ super(...arguments);
563
+ r(this, "_sizeHeight");
564
+ }
565
+ sizeHeight(e) {
566
+ return this._sizeHeight = e, this;
567
+ }
568
+ build() {
569
+ const t = ["fibo-line", "flex", "flex-row", ...this._classNames].filter(Boolean).join(" "), o = this.getStyle();
570
+ this._sizeHeight && (o.height = this._sizeHeight);
571
+ const c = this.processChildren();
572
+ return i.createElement(
573
+ "div",
574
+ {
575
+ className: t,
576
+ style: o,
577
+ ...this._props
578
+ },
579
+ ...c
580
+ );
581
+ }
582
+ }
583
+ const je = p(pe);
584
+ class be extends b {
585
+ constructor() {
586
+ super(...arguments);
587
+ r(this, "_direction", "vertical");
588
+ r(this, "_scrollbar", "auto");
589
+ }
590
+ direction(e) {
591
+ return this._direction = e, this;
592
+ }
593
+ horizontal() {
594
+ return this._direction = "horizontal", this;
595
+ }
596
+ vertical() {
597
+ return this._direction = "vertical", this;
598
+ }
599
+ scrollbar(e) {
600
+ return this._scrollbar = e, this;
601
+ }
602
+ build() {
603
+ const e = {
604
+ overflowX: this._direction === "horizontal" || this._direction === "both" ? "auto" : "hidden",
605
+ overflowY: this._direction === "vertical" || this._direction === "both" ? "auto" : "hidden",
606
+ WebkitOverflowScrolling: "touch",
607
+ display: "flex",
608
+ flexDirection: this._direction === "horizontal" ? "row" : "column",
609
+ ...this.getStyle()
610
+ }, t = [...this.getClassName().split(" ")];
611
+ return this._scrollbar === "hidden" && (t.push("scrollbar-hide"), e.scrollbarWidth = "none", e.msOverflowStyle = "none"), i.createElement("div", {
612
+ className: t.join(" "),
613
+ style: e,
614
+ ...this._props
615
+ }, ...this.processChildren());
616
+ }
617
+ }
618
+ const Me = p(be), _e = i.memo((n) => {
619
+ const {
620
+ children: s,
621
+ itemHeight: e,
622
+ estimatedItemHeight: t = 50,
623
+ measureItems: o = !1,
624
+ overscan: c = 5,
625
+ containerHeight: h = 500,
626
+ className: d,
627
+ style: f
628
+ } = n, [_, B] = F(0), w = D(null), m = D(/* @__PURE__ */ new Map()), N = D(/* @__PURE__ */ new Map()), v = s.length, x = e !== void 0, C = (l) => x ? e : N.current.get(l) ?? t, E = (l) => {
629
+ if (x)
630
+ return l * e;
631
+ let a = 0;
632
+ for (let u = 0; u < l; u++)
633
+ a += C(u);
634
+ return a;
635
+ }, S = () => {
636
+ if (x)
637
+ return v * e;
638
+ let l = 0;
639
+ for (let a = 0; a < v; a++)
640
+ l += C(a);
641
+ return l;
642
+ }, y = Math.max(0, ((l) => {
643
+ if (x)
644
+ return Math.floor(l / e);
645
+ let a = 0, u = v - 1;
646
+ for (; a < u; ) {
647
+ const g = Math.floor((a + u) / 2);
648
+ E(g) < l ? a = g + 1 : u = g;
649
+ }
650
+ return Math.max(0, a - 1);
651
+ })(_) - c);
652
+ let k;
653
+ if (x) {
654
+ const l = Math.ceil(h / e);
655
+ k = Math.min(v, y + l + c * 2);
656
+ } else {
657
+ let l = E(y), a = y;
658
+ for (; l < _ + h + c * t && a < v; )
659
+ l += C(a), a++;
660
+ k = Math.min(v, a);
661
+ }
662
+ const I = s.slice(y, k), L = E(y), R = S(), [A, $] = F(0);
663
+ G(() => {
664
+ if (!o || x) return;
665
+ let l = !1;
666
+ I.forEach((a, u) => {
667
+ const g = y + u, H = m.current.get(g);
668
+ if (H) {
669
+ const z = H.getBoundingClientRect().height;
670
+ z > 0 && N.current.get(g) !== z && (N.current.set(g, z), l = !0);
671
+ }
672
+ }), l && $((a) => a + 1);
673
+ }, [I, y, o, x, A]);
674
+ const j = (l) => {
675
+ B(l.currentTarget.scrollTop);
676
+ };
677
+ return i.createElement(
678
+ "div",
679
+ {
680
+ ref: w,
681
+ className: `fibo-virtual-column ${d || ""}`,
682
+ style: {
683
+ height: `${h}px`,
684
+ overflowY: "auto",
685
+ position: "relative",
686
+ ...f
687
+ },
688
+ onScroll: j
689
+ },
690
+ i.createElement("div", {
691
+ style: {
692
+ height: `${R}px`,
693
+ width: "1px",
694
+ position: "absolute",
695
+ top: 0,
696
+ left: 0,
697
+ visibility: "hidden",
698
+ pointerEvents: "none"
699
+ }
700
+ }),
701
+ i.createElement(
702
+ "div",
703
+ {
704
+ style: {
705
+ transform: `translateY(${L}px)`,
706
+ width: "100%"
707
+ }
708
+ },
709
+ I.map((l, a) => {
710
+ const u = y + a;
711
+ return i.createElement(
712
+ "div",
713
+ {
714
+ key: u,
715
+ ref: (g) => {
716
+ g && o && !x ? m.current.set(u, g) : g || m.current.delete(u);
717
+ },
718
+ style: { width: "100%" }
719
+ },
720
+ l
721
+ );
722
+ })
723
+ )
724
+ );
725
+ });
726
+ class ye extends b {
727
+ constructor() {
728
+ super(...arguments);
729
+ r(this, "_itemHeight");
730
+ r(this, "_estimatedItemHeight");
731
+ r(this, "_measureItems", !1);
732
+ r(this, "_overscan", 5);
733
+ r(this, "_containerHeight", 500);
734
+ }
735
+ itemHeight(e) {
736
+ return this._itemHeight = e, this;
737
+ }
738
+ estimatedItemHeight(e) {
739
+ return this._estimatedItemHeight = e, this;
740
+ }
741
+ measureItems(e = !0) {
742
+ return this._measureItems = e, this;
743
+ }
744
+ overscan(e) {
745
+ return this._overscan = e, this;
746
+ }
747
+ containerHeight(e) {
748
+ return this._containerHeight = e, this;
749
+ }
750
+ build() {
751
+ const t = {
752
+ children: this.processChildren(),
753
+ itemHeight: this._itemHeight,
754
+ estimatedItemHeight: this._estimatedItemHeight,
755
+ measureItems: this._measureItems,
756
+ overscan: this._overscan,
757
+ containerHeight: this._containerHeight,
758
+ className: this.getClassName(),
759
+ style: this.getStyle()
760
+ };
761
+ return i.createElement(_e, t);
762
+ }
763
+ }
764
+ const Oe = p(ye);
765
+ export {
766
+ ke as C,
767
+ Ae as D,
768
+ Le as H,
769
+ je as L,
770
+ ze as S,
771
+ Oe as V,
772
+ $e as Z,
773
+ Ie as a,
774
+ He as b,
775
+ Se as c,
776
+ Re as d,
777
+ Me as e
778
+ };