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.
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 -2237
  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-l2KUUUg4.js +0 -50
  42. package/dist/PluginManager-BRjgOLVa.js +0 -110
  43. package/dist/client-BtHxgLa_.js +0 -10602
  44. package/dist/effects-D16XdB_d.js +0 -10
  45. package/dist/index-Bhq7-OrE.js +0 -602
  46. package/dist/index-CZJqskaC.js +0 -1028
  47. package/dist/index-D50CTdE9.js +0 -455
  48. package/dist/index-D5Ru-8kF.js +0 -608
  49. package/dist/index-DjwLjHe1.js +0 -119
  50. package/dist/mount-yYCj33dL.js +0 -135
@@ -0,0 +1,2 @@
1
+ export { FiboThemeProvider, useFiboTheme, materialTheme, cupertinoTheme, webTheme, noirTheme, FIBO_THEMES, resolveTheme, copyWithTheme, extendTheme, themeToCssVars, themeToInlineStyle, themeToCssRule, themeClassName } from './index.js';
2
+ export type { FiboThemeProviderProps, FiboThemePreset, ThemeInput, FiboThemePatch, FiboTheme, ThemeColors, ThemeTypography } from './index.js';
package/dist/theme.js CHANGED
@@ -1,17 +1,17 @@
1
- import { ak as s, ae as m, am as h, ah as o, an as T, ag as r, aj as t, al as i, ar as l, aq as n, ao as p, ap as b, af as u, ai as C } from "./client-BtHxgLa_.js";
1
+ import { aL as s, aF as m, aN as h, aI as T, aO as o, aH as t, aK as r, aM as i, aS as l, aR as n, aP as F, aQ as b, aG as p, aJ as u } from "./client-CGjHCx8F.js";
2
2
  export {
3
3
  s as FIBO_THEMES,
4
4
  m as FiboThemeProvider,
5
5
  h as copyWithTheme,
6
- o as cupertinoTheme,
7
- T as extendTheme,
8
- r as materialTheme,
9
- t as noirTheme,
6
+ T as cupertinoTheme,
7
+ o as extendTheme,
8
+ t as materialTheme,
9
+ r as noirTheme,
10
10
  i as resolveTheme,
11
11
  l as themeClassName,
12
12
  n as themeToCssRule,
13
- p as themeToCssVars,
13
+ F as themeToCssVars,
14
14
  b as themeToInlineStyle,
15
- u as useFiboTheme,
16
- C as webTheme
15
+ p as useFiboTheme,
16
+ u as webTheme
17
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fiboui",
3
- "version": "2.6.3",
3
+ "version": "2.7.0",
4
4
  "description": "Flutter/SwiftUI-inspired React UI — fluent builders, signals, and themes. https://fiboui.vercel.app",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -14,28 +14,35 @@
14
14
  "default": "./dist/index.js"
15
15
  },
16
16
  "./server": {
17
- "types": "./dist/index.d.ts",
17
+ "types": "./dist/server.d.ts",
18
18
  "import": "./dist/server.js"
19
19
  },
20
20
  "./core": {
21
+ "types": "./dist/core.d.ts",
21
22
  "import": "./dist/core.js"
22
23
  },
23
24
  "./layout": {
25
+ "types": "./dist/layout.d.ts",
24
26
  "import": "./dist/layout.js"
25
27
  },
26
28
  "./content": {
29
+ "types": "./dist/content.d.ts",
27
30
  "import": "./dist/content.js"
28
31
  },
29
32
  "./interactive": {
33
+ "types": "./dist/interactive.d.ts",
30
34
  "import": "./dist/interactive.js"
31
35
  },
32
36
  "./structure": {
37
+ "types": "./dist/structure.d.ts",
33
38
  "import": "./dist/structure.js"
34
39
  },
35
40
  "./navigation": {
41
+ "types": "./dist/navigation.d.ts",
36
42
  "import": "./dist/navigation.js"
37
43
  },
38
44
  "./theme": {
45
+ "types": "./dist/theme.d.ts",
39
46
  "import": "./dist/theme.js"
40
47
  },
41
48
  "./style.css": "./dist/style.css",
@@ -1,50 +0,0 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { aa as m, as as p, a9 as v } from "./client-BtHxgLa_.js";
3
- const k = ({
4
- to: t,
5
- children: c,
6
- replace: n = !1,
7
- state: e,
8
- className: l,
9
- style: f,
10
- onClick: i
11
- }) => {
12
- const o = m(), a = p(), r = t.startsWith("http") || t.startsWith("//") || t.startsWith("#") ? t : `${(a == null ? void 0 : a.basename) ?? ""}${t}`;
13
- return /* @__PURE__ */ u(
14
- "a",
15
- {
16
- href: r,
17
- onClick: (s) => {
18
- s.ctrlKey || s.metaKey || s.shiftKey || s.button !== 0 || (s.preventDefault(), i && i(s), o(t, { replace: n, state: e }));
19
- },
20
- className: l,
21
- style: f,
22
- children: c
23
- }
24
- );
25
- }, W = ({
26
- to: t,
27
- children: c,
28
- className: n = "",
29
- style: e = {},
30
- activeClassName: l = "active",
31
- activeStyle: f = {},
32
- exact: i = !1,
33
- ...o
34
- }) => {
35
- const { currentPath: a } = v(), r = i ? a === t : a.startsWith(t), h = r ? `${n} ${l}`.trim() : n, s = r ? { ...e, ...f } : e;
36
- return /* @__PURE__ */ u(
37
- k,
38
- {
39
- to: t,
40
- className: h,
41
- style: s,
42
- ...o,
43
- children: c
44
- }
45
- );
46
- };
47
- export {
48
- k as L,
49
- W as N
50
- };
@@ -1,110 +0,0 @@
1
- var h = Object.defineProperty;
2
- var g = (a, t, e) => t in a ? h(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
- var s = (a, t, e) => g(a, typeof t != "symbol" ? t + "" : t, e);
4
- const n = class n {
5
- constructor() {
6
- s(this, "services", /* @__PURE__ */ new Map());
7
- }
8
- static getInstance() {
9
- return n.instance || (n.instance = new n()), n.instance;
10
- }
11
- register(t, e, r = {}) {
12
- if (this.services.has(t) && !r.override)
13
- return;
14
- const u = {
15
- token: t,
16
- provider: e,
17
- singleton: r.singleton ?? !1
18
- };
19
- this.services.set(t, u);
20
- }
21
- registerSingleton(t, e) {
22
- this.register(t, e, { singleton: !0 });
23
- }
24
- resolve(t) {
25
- const e = this.services.get(t);
26
- if (!e)
27
- throw new Error(`Service not found for token: ${String(t)}`);
28
- if (e.singleton && e.instance)
29
- return e.instance;
30
- const r = this.createInstance(e.provider);
31
- return e.singleton && (e.instance = r), r;
32
- }
33
- has(t) {
34
- return this.services.has(t);
35
- }
36
- clear() {
37
- this.services.clear();
38
- }
39
- createInstance(t) {
40
- return typeof t != "function" ? t : this.isConstructor(t) ? new t() : t();
41
- }
42
- isConstructor(t) {
43
- try {
44
- return Reflect.construct(String, [], t), !0;
45
- } catch {
46
- return !1;
47
- }
48
- }
49
- };
50
- s(n, "instance");
51
- let c = n;
52
- const f = c.getInstance(), i = class i {
53
- constructor() {
54
- s(this, "plugins", /* @__PURE__ */ new Map());
55
- s(this, "routes", []);
56
- s(this, "sidebarItems", []);
57
- s(this, "topbarActions", []);
58
- s(this, "overlays", []);
59
- s(this, "stores", /* @__PURE__ */ new Map());
60
- s(this, "storeSeq", 0);
61
- }
62
- static getInstance() {
63
- return i.instance || (i.instance = new i()), i.instance;
64
- }
65
- use(t) {
66
- return this.plugins.has(t.name) ? this : (this.plugins.set(t.name, t), t.setup(this), this);
67
- }
68
- registerService(t, e) {
69
- f.register(t, e);
70
- }
71
- registerStore(t, e) {
72
- const r = e ?? `store-${this.storeSeq++}`;
73
- this.stores.set(r, t);
74
- }
75
- getStore(t) {
76
- return this.stores.get(t);
77
- }
78
- getStores() {
79
- return this.stores;
80
- }
81
- registerRoute(t) {
82
- this.routes.push(t);
83
- }
84
- registerSidebarItem(t) {
85
- this.sidebarItems.push(t);
86
- }
87
- registerTopbarAction(t) {
88
- this.topbarActions.push(t);
89
- }
90
- registerOverlay(t) {
91
- this.overlays.push(t);
92
- }
93
- getRoutes() {
94
- return this.routes;
95
- }
96
- getSidebarItems() {
97
- return this.sidebarItems.sort((t, e) => (t.order || 0) - (e.order || 0));
98
- }
99
- getTopbarActions() {
100
- return this.topbarActions;
101
- }
102
- getOverlays() {
103
- return this.overlays;
104
- }
105
- };
106
- s(i, "instance");
107
- let o = i;
108
- export {
109
- o as P
110
- };