@floegence/floe-webapp-core 0.1.5 → 0.1.7

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 (87) hide show
  1. package/dist/components/file-browser/Breadcrumb.d.ts +7 -0
  2. package/dist/components/file-browser/DirectoryTree.d.ts +7 -0
  3. package/dist/components/file-browser/FileBrowser.d.ts +35 -0
  4. package/dist/components/file-browser/FileBrowserContext.d.ts +18 -0
  5. package/dist/components/file-browser/FileBrowserToolbar.d.ts +8 -0
  6. package/dist/components/file-browser/FileContextMenu.d.ts +15 -0
  7. package/dist/components/file-browser/FileGridView.d.ts +7 -0
  8. package/dist/components/file-browser/FileIcons.d.ts +14 -0
  9. package/dist/components/file-browser/FileListView.d.ts +7 -0
  10. package/dist/components/file-browser/index.d.ts +10 -0
  11. package/dist/components/file-browser/types.d.ts +104 -0
  12. package/dist/components/index.d.ts +1 -0
  13. package/dist/components/layout/Sidebar.d.ts +18 -0
  14. package/dist/components/layout/index.d.ts +1 -1
  15. package/dist/components/layout/mobileTabs.d.ts +8 -3
  16. package/dist/index.js +249 -220
  17. package/dist/index10.js +2 -2
  18. package/dist/index11.js +4 -4
  19. package/dist/index12.js +2 -2
  20. package/dist/index13.js +4 -4
  21. package/dist/index14.js +4 -4
  22. package/dist/index15.js +4 -4
  23. package/dist/index16.js +3 -3
  24. package/dist/index17.js +5 -5
  25. package/dist/index18.js +2 -2
  26. package/dist/index19.js +1 -1
  27. package/dist/index2.js +39 -39
  28. package/dist/index20.js +1 -1
  29. package/dist/index21.js +3 -3
  30. package/dist/index22.js +2 -2
  31. package/dist/index23.js +2 -2
  32. package/dist/index24.js +1 -1
  33. package/dist/index25.js +4 -4
  34. package/dist/index26.js +1 -1
  35. package/dist/index27.js +1 -1
  36. package/dist/index28.js +1 -1
  37. package/dist/index29.js +1 -1
  38. package/dist/index3.js +1 -1
  39. package/dist/index36.js +138 -42
  40. package/dist/index37.js +102 -32
  41. package/dist/index38.js +90 -23
  42. package/dist/index39.js +107 -170
  43. package/dist/index4.js +48 -34
  44. package/dist/index40.js +86 -40
  45. package/dist/index41.js +176 -64
  46. package/dist/index42.js +64 -94
  47. package/dist/index43.js +64 -110
  48. package/dist/index44.js +39 -138
  49. package/dist/index45.js +44 -35
  50. package/dist/index46.js +34 -379
  51. package/dist/index47.js +25 -13
  52. package/dist/index48.js +173 -10
  53. package/dist/index49.js +40 -16
  54. package/dist/index5.js +3 -3
  55. package/dist/index50.js +65 -9
  56. package/dist/index51.js +96 -8
  57. package/dist/index52.js +113 -52
  58. package/dist/index53.js +138 -5
  59. package/dist/index54.js +39 -3
  60. package/dist/index55.js +382 -44
  61. package/dist/index56.js +13 -26
  62. package/dist/index57.js +10 -32
  63. package/dist/index58.js +17 -92
  64. package/dist/index59.js +10 -22
  65. package/dist/index6.js +2 -2
  66. package/dist/index60.js +8 -46
  67. package/dist/index61.js +56 -14
  68. package/dist/index62.js +5 -35
  69. package/dist/index63.js +3 -64
  70. package/dist/index64.js +45 -84
  71. package/dist/index65.js +25 -13
  72. package/dist/index66.js +27 -2258
  73. package/dist/index67.js +92 -8
  74. package/dist/index68.js +25 -0
  75. package/dist/index69.js +49 -0
  76. package/dist/index7.js +1 -1
  77. package/dist/index70.js +17 -0
  78. package/dist/index71.js +38 -0
  79. package/dist/index72.js +67 -0
  80. package/dist/index73.js +87 -0
  81. package/dist/index74.js +17 -0
  82. package/dist/index75.js +2266 -0
  83. package/dist/index76.js +10 -0
  84. package/dist/index8.js +2 -2
  85. package/dist/index9.js +1 -1
  86. package/dist/styles.css +1 -1
  87. package/package.json +1 -1
package/dist/index43.js CHANGED
@@ -1,120 +1,74 @@
1
- import { delegateEvents as g, template as m, insert as l, createComponent as f, effect as h, className as b } from "solid-js/web";
2
- import { For as p, Show as u } from "solid-js";
3
- import { createStore as v, produce as d } from "solid-js/store";
4
- import { createSimpleContext as x } from "./index38.js";
5
- import { cn as $ } from "./index53.js";
6
- var w = /* @__PURE__ */ m('<div class="fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm">'), _ = /* @__PURE__ */ m('<p class="mt-1 text-sm text-muted-foreground">'), y = /* @__PURE__ */ m('<button type=button class="mt-2 text-sm font-medium text-primary hover:underline">'), k = /* @__PURE__ */ m('<div role=alert><div class="flex items-start gap-3"><div class="flex-1 min-w-0"><p class="font-medium text-sm"></p></div><button type=button class="text-muted-foreground hover:text-foreground transition-colors"aria-label=Dismiss><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M6 18L18 6M6 6l12 12">');
7
- const C = 5e3;
8
- function N() {
9
- const [e, c] = v({
10
- notifications: []
11
- }), o = /* @__PURE__ */ new Map(), a = (t) => {
12
- const i = o.get(t);
13
- i && (clearTimeout(i), o.delete(t)), c(d((n) => {
14
- n.notifications = n.notifications.filter((s) => s.id !== t);
15
- }));
16
- }, r = (t) => {
17
- const i = `notification-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, n = t.duration ?? C;
18
- if (c(d((s) => {
19
- s.notifications.push({
20
- ...t,
21
- id: i
22
- });
23
- })), n > 0) {
24
- const s = setTimeout(() => a(i), n);
25
- o.set(i, s);
26
- }
27
- return i;
1
+ import { delegateEvents as k, template as u, addEventListener as y, insert as s, createComponent as a, effect as v, className as b, setAttribute as c } from "solid-js/web";
2
+ import { cn as g } from "./index62.js";
3
+ import { useFileBrowser as M } from "./index37.js";
4
+ import { Breadcrumb as C } from "./index42.js";
5
+ import { Grid as $ } from "./index30.js";
6
+ var B = /* @__PURE__ */ u('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><line x1=8 y1=6 x2=21 y2=6></line><line x1=8 y1=12 x2=21 y2=12></line><line x1=8 y1=18 x2=21 y2=18></line><line x1=3 y1=6 x2=3.01 y2=6></line><line x1=3 y1=12 x2=3.01 y2=12></line><line x1=3 y1=18 x2=3.01 y2=18>'), _ = /* @__PURE__ */ u('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"></path><path d="M12 10v6"></path><path d="m9 13 3-3 3 3">'), j = /* @__PURE__ */ u('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><rect width=18 height=18 x=3 y=3 rx=2 ry=2></rect><line x1=9 y1=3 x2=9 y2=21>'), S = /* @__PURE__ */ u('<div><button type=button aria-label="Toggle sidebar"></button><button type=button aria-label="Navigate to parent folder"></button><div class="flex-1 min-w-0 overflow-hidden"></div><div class="flex items-center gap-0.5 p-0.5 bg-muted/50 rounded-md">'), V = /* @__PURE__ */ u("<button type=button>");
7
+ const A = (r) => (() => {
8
+ var e = B();
9
+ return v(() => c(e, "class", r.class)), e;
10
+ })(), F = (r) => (() => {
11
+ var e = _();
12
+ return v(() => c(e, "class", r.class)), e;
13
+ })(), I = (r) => (() => {
14
+ var e = j();
15
+ return v(() => c(e, "class", r.class)), e;
16
+ })();
17
+ function T(r) {
18
+ const e = M(), n = () => {
19
+ const t = e.currentPath();
20
+ return t !== "/" && t !== "";
28
21
  };
29
- return {
30
- notifications: () => e.notifications,
31
- show: r,
32
- dismiss: a,
33
- dismissAll: () => {
34
- o.forEach((t) => clearTimeout(t)), o.clear(), c("notifications", []);
35
- },
36
- info: (t, i) => r({
37
- type: "info",
38
- title: t,
39
- message: i
40
- }),
41
- success: (t, i) => r({
42
- type: "success",
43
- title: t,
44
- message: i
45
- }),
46
- warning: (t, i) => r({
47
- type: "warning",
48
- title: t,
49
- message: i
50
- }),
51
- error: (t, i) => r({
52
- type: "error",
53
- title: t,
54
- message: i
55
- })
56
- };
57
- }
58
- const {
59
- Provider: L,
60
- use: S
61
- } = x({
62
- name: "Notification",
63
- init: N
64
- });
65
- function P() {
66
- const {
67
- notifications: e,
68
- dismiss: c
69
- } = S();
70
22
  return (() => {
71
- var o = w();
72
- return l(o, f(p, {
73
- get each() {
74
- return e();
23
+ var t = S(), l = t.firstChild, i = l.nextSibling, d = i.nextSibling, m = d.nextSibling;
24
+ return y(l, "click", e.toggleSidebar, !0), s(l, a(I, {
25
+ class: "w-4 h-4"
26
+ })), y(i, "click", e.navigateUp, !0), s(i, a(F, {
27
+ class: "w-4 h-4"
28
+ })), s(d, a(C, {})), s(m, a(p, {
29
+ mode: "list",
30
+ get currentMode() {
31
+ return e.viewMode();
32
+ },
33
+ onClick: () => e.setViewMode("list"),
34
+ icon: A,
35
+ label: "List view"
36
+ }), null), s(m, a(p, {
37
+ mode: "grid",
38
+ get currentMode() {
39
+ return e.viewMode();
75
40
  },
76
- children: (a) => f(D, {
77
- notification: a,
78
- onDismiss: () => c(a.id)
79
- })
80
- })), o;
41
+ onClick: () => e.setViewMode("grid"),
42
+ icon: $,
43
+ label: "Grid view"
44
+ }), null), v((o) => {
45
+ var w = g("flex items-center gap-2 px-2 py-1.5 border-b border-border", "bg-background/50 backdrop-blur-sm", r.class), x = g("md:hidden flex items-center justify-center w-7 h-7 rounded cursor-pointer", "transition-colors duration-100", "hover:bg-muted/70", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", !e.sidebarCollapsed() && "bg-muted/50"), f = !n(), h = g("flex items-center justify-center w-7 h-7 rounded cursor-pointer", "transition-colors duration-100", "hover:bg-muted/70", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent");
46
+ return w !== o.e && b(t, o.e = w), x !== o.t && b(l, o.t = x), f !== o.a && (i.disabled = o.a = f), h !== o.o && b(i, o.o = h), o;
47
+ }, {
48
+ e: void 0,
49
+ t: void 0,
50
+ a: void 0,
51
+ o: void 0
52
+ }), t;
81
53
  })();
82
54
  }
83
- function D(e) {
84
- const c = {
85
- info: "border-info/50 bg-info/10",
86
- success: "border-success/50 bg-success/10",
87
- warning: "border-warning/50 bg-warning/10",
88
- error: "border-error/50 bg-error/10"
89
- };
55
+ function p(r) {
56
+ const e = () => r.currentMode === r.mode;
90
57
  return (() => {
91
- var o = k(), a = o.firstChild, r = a.firstChild, t = r.firstChild, i = r.nextSibling;
92
- return l(t, () => e.notification.title), l(r, f(u, {
93
- get when() {
94
- return e.notification.message;
95
- },
96
- get children() {
97
- var n = _();
98
- return l(n, () => e.notification.message), n;
99
- }
100
- }), null), l(r, f(u, {
101
- get when() {
102
- return e.notification.action;
103
- },
104
- get children() {
105
- var n = y();
106
- return n.$$click = () => {
107
- var s;
108
- return (s = e.notification.action) == null ? void 0 : s.onClick();
109
- }, l(n, () => e.notification.action.label), n;
110
- }
111
- }), null), i.$$click = () => e.onDismiss(), h(() => b(o, $("animate-in slide-in-from-right fade-in", "rounded-lg border p-4 shadow-lg backdrop-blur-sm", "bg-card text-card-foreground", c[e.notification.type]))), o;
58
+ var n = V();
59
+ return n.$$click = () => r.onClick(), s(n, a(r.icon, {
60
+ class: "w-3.5 h-3.5"
61
+ })), v((t) => {
62
+ var l = g("flex items-center justify-center w-6 h-6 rounded cursor-pointer", "transition-all duration-150", "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", e() ? "bg-background shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"), i = r.label, d = e();
63
+ return l !== t.e && b(n, t.e = l), i !== t.t && c(n, "aria-label", t.t = i), d !== t.a && c(n, "aria-pressed", t.a = d), t;
64
+ }, {
65
+ e: void 0,
66
+ t: void 0,
67
+ a: void 0
68
+ }), n;
112
69
  })();
113
70
  }
114
- g(["click"]);
71
+ k(["click"]);
115
72
  export {
116
- P as NotificationContainer,
117
- L as NotificationProvider,
118
- N as createNotificationService,
119
- S as useNotification
73
+ T as FileBrowserToolbar
120
74
  };
package/dist/index44.js CHANGED
@@ -1,141 +1,42 @@
1
- import { createSignal as C } from "solid-js";
2
- import { createSimpleContext as w } from "./index38.js";
3
- import { useResolvedFloeConfig as b } from "./index39.js";
4
- import { useTheme as v } from "./index40.js";
5
- import { useLayout as M } from "./index41.js";
6
- import { useCommand as S } from "./index42.js";
7
- import { useNotification as x } from "./index43.js";
8
- import { deferNonBlocking as A } from "./index54.js";
9
- function R(s) {
10
- const r = `[${s}]`;
11
- return {
12
- debug: (...o) => console.debug(r, ...o),
13
- info: (...o) => console.info(r, ...o),
14
- warn: (...o) => console.warn(r, ...o),
15
- error: (...o) => console.error(r, ...o)
16
- };
17
- }
18
- function B(s, r) {
19
- const o = `component:${r}:`;
20
- return {
21
- get: (a, u) => s.load(o + a, u),
22
- set: (a, u) => s.debouncedSave(o + a, u),
23
- remove: (a) => A(() => s.remove(o + a))
24
- };
25
- }
26
- function J() {
27
- const s = v(), r = M(), o = S(), a = x(), u = b();
28
- return (g, f) => ({
29
- protocol: f == null ? void 0 : f.protocol,
30
- theme: s,
31
- layout: r,
32
- commands: o,
33
- notifications: a,
34
- storage: B(u.persist, g),
35
- logger: R(g)
36
- });
37
- }
38
- const h = w({
39
- name: "ComponentRegistry",
40
- init: k
41
- }), K = h.Provider;
42
- function O() {
43
- return h.use();
44
- }
45
- function k() {
46
- const [s, r] = C(/* @__PURE__ */ new Map()), [o, a] = C(/* @__PURE__ */ new Set()), u = /* @__PURE__ */ new Map(), g = (t) => {
47
- r((e) => new Map(e).set(t.id, t));
48
- }, f = (t) => {
49
- r((e) => {
50
- const n = new Map(e);
51
- return t.forEach((c) => n.set(c.id, c)), n;
52
- });
53
- }, y = async (t, e) => {
54
- var p, l;
55
- const n = s().get(t);
56
- if (!n || o().has(t)) return;
57
- const c = [];
58
- try {
59
- if ((p = n.commands) != null && p.length) {
60
- const m = n.commands.map((i) => ({
61
- id: i.id,
62
- title: i.title,
63
- description: i.description,
64
- icon: i.icon,
65
- keybind: i.keybind,
66
- category: i.category,
67
- execute: () => i.execute(e)
68
- }));
69
- c.push(e.commands.registerAll(m));
70
- }
71
- await ((l = n.onMount) == null ? void 0 : l.call(n, e)), c.length && u.set(t, () => c.forEach((m) => m())), a((m) => {
72
- const i = new Set(m);
73
- return i.add(t), i;
74
- });
75
- } catch (m) {
76
- throw c.forEach((i) => i()), m;
77
- }
78
- }, d = async (t) => {
79
- var n, c;
80
- const e = s().get(t);
81
- if (e && o().has(t))
82
- try {
83
- await ((n = e.onUnmount) == null ? void 0 : n.call(e));
84
- } finally {
85
- (c = u.get(t)) == null || c(), u.delete(t), a((p) => {
86
- const l = new Set(p);
87
- return l.delete(t), l;
88
- });
89
- }
90
- };
91
- return {
92
- register: g,
93
- registerAll: f,
94
- unregister: async (t) => {
95
- await d(t), r((e) => {
96
- const n = new Map(e);
97
- return n.delete(t), n;
98
- });
99
- },
100
- mount: y,
101
- unmount: d,
102
- mountAll: async (t) => {
103
- for (const e of s().keys())
104
- await y(e, t(e));
105
- },
106
- unmountAll: async () => {
107
- for (const t of o())
108
- await d(t);
109
- },
110
- components: s,
111
- mountedComponents: o,
112
- sidebarItems: () => {
113
- const t = [];
114
- for (const e of s().values())
115
- e.sidebar && t.push({
116
- ...e,
117
- order: e.sidebar.order ?? 100
118
- });
119
- return t.sort((e, n) => e.order - n.order);
120
- },
121
- allCommands: () => {
122
- const t = [];
123
- for (const e of s().values())
124
- e.commands && t.push(...e.commands);
125
- return t;
126
- },
127
- statusBarItems: () => {
128
- const t = [];
129
- for (const e of s().values())
130
- e.statusBar && t.push(...e.statusBar);
131
- return t;
132
- },
133
- getComponent: (t) => s().get(t)
134
- };
1
+ import { template as e, effect as t, setAttribute as n } from "solid-js/web";
2
+ var a = /* @__PURE__ */ e('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><defs><linearGradient id=folder-gradient x1=0% y1=0% x2=0% y2=100%><stop offset=0% style=stop-color:var(--warning);stop-opacity:1></stop><stop offset=100% style="stop-color:color-mix(in srgb, var(--warning) 80%, var(--foreground));stop-opacity:1"></stop></linearGradient></defs><path fill=url(#folder-gradient) d="M3 5a2 2 0 0 1 2-2h4.586a1 1 0 0 1 .707.293L12 5h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5z">'), p = /* @__PURE__ */ e('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><defs><linearGradient id=folder-open-gradient x1=0% y1=0% x2=0% y2=100%><stop offset=0% style=stop-color:var(--warning);stop-opacity:1></stop><stop offset=100% style="stop-color:color-mix(in srgb, var(--warning) 70%, var(--foreground));stop-opacity:1"></stop></linearGradient></defs><path fill=url(#folder-open-gradient) d="M5 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7.414A2 2 0 0 0 20.414 6L18 3.586A2 2 0 0 0 16.586 3H5zm4 2h7.586L19 7.414V17H5V5h4z"></path><path fill=var(--background) opacity=0.3 d="M3 8l4-3h14l-4 3H3z">'), d = /* @__PURE__ */ e('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8">'), c = /* @__PURE__ */ e('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--info) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><path fill=none stroke=var(--info) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="m10 13-2 2 2 2m4-4 2 2-2 2">'), h = /* @__PURE__ */ e('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--success) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><circle cx=10 cy=13 r=2 fill=var(--success)></circle><path fill=none stroke=var(--success) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="m20 17-3-3-4 4-2-2-5 3">'), v = /* @__PURE__ */ e('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--error) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--error) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--error) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><line x1=8 y1=13 x2=16 y2=13 stroke=var(--error) stroke-width=1.5 stroke-linecap=round></line><line x1=8 y1=17 x2=14 y2=17 stroke=var(--error) stroke-width=1.5 stroke-linecap=round>'), k = /* @__PURE__ */ e('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--warning) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><path fill=none stroke=var(--warning) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M10 12v4h2m-2-4h2l2 4">'), w = /* @__PURE__ */ e('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><path fill=var(--primary) opacity=0.2 d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"></path><path fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round points="14 2 14 8 20 8"></polyline><path fill=none stroke=var(--primary) stroke-width=1.5 stroke-linecap=round stroke-linejoin=round d="M9 14h6m-3-3v6">');
3
+ const $ = (r) => (() => {
4
+ var o = a(), l = o.firstChild, s = l.firstChild, i = s.firstChild;
5
+ return i.nextSibling, t(() => n(o, "class", r.class)), o;
6
+ })(), j = (r) => (() => {
7
+ var o = p(), l = o.firstChild, s = l.firstChild, i = s.firstChild;
8
+ return i.nextSibling, t(() => n(o, "class", r.class)), o;
9
+ })(), f = (r) => (() => {
10
+ var o = d();
11
+ return t(() => n(o, "class", r.class)), o;
12
+ })(), u = (r) => (() => {
13
+ var o = c();
14
+ return t(() => n(o, "class", r.class)), o;
15
+ })(), g = (r) => (() => {
16
+ var o = h();
17
+ return t(() => n(o, "class", r.class)), o;
18
+ })(), y = (r) => (() => {
19
+ var o = v();
20
+ return t(() => n(o, "class", r.class)), o;
21
+ })(), m = (r) => (() => {
22
+ var o = k();
23
+ return t(() => n(o, "class", r.class)), o;
24
+ })(), x = (r) => (() => {
25
+ var o = w();
26
+ return t(() => n(o, "class", r.class)), o;
27
+ })();
28
+ function M(r) {
29
+ const o = r == null ? void 0 : r.toLowerCase();
30
+ return ["ts", "tsx", "js", "jsx", "py", "rb", "go", "rs", "java", "c", "cpp", "h", "hpp", "vue", "svelte"].includes(o ?? "") ? u : ["png", "jpg", "jpeg", "gif", "svg", "webp", "ico", "bmp"].includes(o ?? "") ? g : ["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "md", "rtf"].includes(o ?? "") ? y : ["json", "yaml", "yml", "toml", "xml", "ini", "env", "config"].includes(o ?? "") ? m : ["css", "scss", "sass", "less", "styl"].includes(o ?? "") ? x : f;
135
31
  }
136
32
  export {
137
- K as ComponentRegistryProvider,
138
- k as createComponentRegistry,
139
- J as useComponentContextFactory,
140
- O as useComponentRegistry
33
+ u as CodeFileIcon,
34
+ m as ConfigFileIcon,
35
+ y as DocumentFileIcon,
36
+ f as FileIcon,
37
+ $ as FolderIcon,
38
+ j as FolderOpenIcon,
39
+ g as ImageFileIcon,
40
+ x as StyleFileIcon,
41
+ M as getFileIcon
141
42
  };
package/dist/index45.js CHANGED
@@ -1,42 +1,51 @@
1
- import { createSignal as n } from "solid-js";
2
- import { createSimpleContext as o } from "./index38.js";
3
- const {
4
- Provider: f,
5
- use: m
6
- } = o({
7
- name: "WidgetRegistry",
8
- init: c
9
- });
10
- function c() {
11
- const [s, i] = n(/* @__PURE__ */ new Map());
12
- return {
13
- register: (e) => {
14
- i((t) => new Map(t).set(e.type, e));
15
- },
16
- registerAll: (e) => {
17
- i((t) => {
18
- const r = new Map(t);
19
- return e.forEach((g) => r.set(g.type, g)), r;
1
+ import { createComponent as r, memo as o } from "solid-js/web";
2
+ import { FloeConfigProvider as i } from "./index48.js";
3
+ import { ThemeProvider as n } from "./index49.js";
4
+ import { NotificationProvider as m } from "./index52.js";
5
+ import { ComponentRegistryProvider as d } from "./index53.js";
6
+ import { LayoutProvider as c } from "./index50.js";
7
+ import { CommandProvider as f } from "./index51.js";
8
+ import { WidgetRegistryProvider as g } from "./index54.js";
9
+ import { DeckProvider as h } from "./index55.js";
10
+ function w(e) {
11
+ const t = () => r(m, {
12
+ get children() {
13
+ return r(d, {
14
+ get children() {
15
+ return r(c, {
16
+ get children() {
17
+ return r(g, {
18
+ get children() {
19
+ return r(h, {
20
+ get children() {
21
+ return r(f, {
22
+ get children() {
23
+ return e.children;
24
+ }
25
+ });
26
+ }
27
+ });
28
+ }
29
+ });
30
+ }
31
+ });
32
+ }
20
33
  });
34
+ }
35
+ });
36
+ return r(i, {
37
+ get config() {
38
+ return e.config;
21
39
  },
22
- unregister: (e) => {
23
- i((t) => {
24
- const r = new Map(t);
25
- return r.delete(e), r;
40
+ get children() {
41
+ return r(n, {
42
+ get children() {
43
+ return o(() => !!e.wrapAfterTheme)() ? e.wrapAfterTheme(t) : t();
44
+ }
26
45
  });
27
- },
28
- widgets: s,
29
- getWidget: (e) => s().get(e),
30
- getWidgetsByCategory: (e) => {
31
- const t = [];
32
- for (const r of s().values())
33
- r.category === e && t.push(r);
34
- return t;
35
46
  }
36
- };
47
+ });
37
48
  }
38
49
  export {
39
- f as WidgetRegistryProvider,
40
- c as createWidgetRegistry,
41
- m as useWidgetRegistry
50
+ w as FloeProvider
42
51
  };