@floegence/floe-webapp-core 0.1.2 → 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 (88) 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 +30 -0
  16. package/dist/context/ComponentRegistry.d.ts +3 -2
  17. package/dist/index.js +249 -220
  18. package/dist/index10.js +2 -2
  19. package/dist/index11.js +4 -4
  20. package/dist/index12.js +2 -2
  21. package/dist/index13.js +4 -4
  22. package/dist/index14.js +4 -4
  23. package/dist/index15.js +4 -4
  24. package/dist/index16.js +3 -3
  25. package/dist/index17.js +5 -5
  26. package/dist/index18.js +2 -2
  27. package/dist/index19.js +1 -1
  28. package/dist/index2.js +89 -70
  29. package/dist/index20.js +1 -1
  30. package/dist/index21.js +3 -3
  31. package/dist/index22.js +2 -2
  32. package/dist/index23.js +2 -2
  33. package/dist/index24.js +1 -1
  34. package/dist/index25.js +4 -4
  35. package/dist/index26.js +1 -1
  36. package/dist/index27.js +1 -1
  37. package/dist/index28.js +1 -1
  38. package/dist/index29.js +1 -1
  39. package/dist/index3.js +1 -1
  40. package/dist/index36.js +138 -42
  41. package/dist/index37.js +102 -32
  42. package/dist/index38.js +90 -23
  43. package/dist/index39.js +107 -170
  44. package/dist/index4.js +48 -34
  45. package/dist/index40.js +86 -40
  46. package/dist/index41.js +176 -64
  47. package/dist/index42.js +64 -94
  48. package/dist/index43.js +64 -110
  49. package/dist/index44.js +39 -138
  50. package/dist/index45.js +44 -35
  51. package/dist/index46.js +34 -379
  52. package/dist/index47.js +25 -13
  53. package/dist/index48.js +173 -10
  54. package/dist/index49.js +40 -16
  55. package/dist/index5.js +3 -3
  56. package/dist/index50.js +65 -9
  57. package/dist/index51.js +96 -8
  58. package/dist/index52.js +113 -52
  59. package/dist/index53.js +138 -5
  60. package/dist/index54.js +39 -3
  61. package/dist/index55.js +382 -44
  62. package/dist/index56.js +13 -26
  63. package/dist/index57.js +10 -32
  64. package/dist/index58.js +17 -92
  65. package/dist/index59.js +10 -22
  66. package/dist/index6.js +2 -2
  67. package/dist/index60.js +8 -46
  68. package/dist/index61.js +56 -14
  69. package/dist/index62.js +5 -35
  70. package/dist/index63.js +3 -64
  71. package/dist/index64.js +45 -84
  72. package/dist/index65.js +25 -13
  73. package/dist/index66.js +27 -2258
  74. package/dist/index67.js +94 -0
  75. package/dist/index68.js +25 -0
  76. package/dist/index69.js +49 -0
  77. package/dist/index7.js +1 -1
  78. package/dist/index70.js +17 -0
  79. package/dist/index71.js +38 -0
  80. package/dist/index72.js +67 -0
  81. package/dist/index73.js +87 -0
  82. package/dist/index74.js +17 -0
  83. package/dist/index75.js +2266 -0
  84. package/dist/index76.js +10 -0
  85. package/dist/index8.js +2 -2
  86. package/dist/index9.js +1 -1
  87. package/dist/styles.css +1 -1
  88. package/package.json +1 -1
package/dist/index55.js CHANGED
@@ -1,48 +1,386 @@
1
- const r = "floe-", i = /* @__PURE__ */ new Map();
2
- function f(o, e, n = 300) {
3
- if (typeof window > "u") return;
4
- const t = r + o, c = i.get(t);
5
- c && clearTimeout(c), i.set(
6
- t,
7
- setTimeout(() => {
8
- try {
9
- localStorage.setItem(t, JSON.stringify(e)), i.delete(t);
10
- } catch (s) {
11
- console.warn(`Failed to save ${t}:`, s);
12
- }
13
- }, n)
14
- );
15
- }
16
- function l(o, e) {
17
- if (typeof window > "u") return e;
18
- const n = r + o;
19
- try {
20
- const t = localStorage.getItem(n);
21
- return t === null ? e : JSON.parse(t);
22
- } catch {
23
- return e;
24
- }
25
- }
26
- function a(o, e) {
27
- if (typeof window > "u") return;
28
- const n = r + o;
29
- try {
30
- localStorage.setItem(n, JSON.stringify(e));
31
- } catch (t) {
32
- console.warn(`Failed to save ${n}:`, t);
1
+ import { createSignal as I, createEffect as T } from "solid-js";
2
+ import { createStore as E, produce as r } from "solid-js/store";
3
+ import { createSimpleContext as h } from "./index47.js";
4
+ import { useResolvedFloeConfig as W } from "./index48.js";
5
+ import { hasCollision as g, constrainPosition as F, findFreePosition as k } from "./index68.js";
6
+ const z = [{
7
+ id: "preset-default",
8
+ name: "Default",
9
+ isPreset: !0,
10
+ widgets: [{
11
+ id: "w1",
12
+ type: "metrics",
13
+ position: {
14
+ col: 0,
15
+ row: 0,
16
+ colSpan: 12,
17
+ rowSpan: 6
18
+ }
19
+ }, {
20
+ id: "w2",
21
+ type: "terminal",
22
+ position: {
23
+ col: 12,
24
+ row: 0,
25
+ colSpan: 12,
26
+ rowSpan: 6
27
+ }
28
+ }, {
29
+ id: "w3",
30
+ type: "metrics",
31
+ position: {
32
+ col: 0,
33
+ row: 6,
34
+ colSpan: 24,
35
+ rowSpan: 6
36
+ }
37
+ }],
38
+ createdAt: Date.now(),
39
+ updatedAt: Date.now()
40
+ }, {
41
+ id: "preset-focus",
42
+ name: "Focus",
43
+ isPreset: !0,
44
+ widgets: [{
45
+ id: "w1",
46
+ type: "terminal",
47
+ position: {
48
+ col: 0,
49
+ row: 0,
50
+ colSpan: 24,
51
+ rowSpan: 12
52
+ }
53
+ }],
54
+ createdAt: Date.now(),
55
+ updatedAt: Date.now()
56
+ }, {
57
+ id: "preset-monitoring",
58
+ name: "Monitoring",
59
+ isPreset: !0,
60
+ widgets: [{
61
+ id: "w1",
62
+ type: "metrics",
63
+ position: {
64
+ col: 0,
65
+ row: 0,
66
+ colSpan: 12,
67
+ rowSpan: 6
68
+ }
69
+ }, {
70
+ id: "w2",
71
+ type: "metrics",
72
+ position: {
73
+ col: 12,
74
+ row: 0,
75
+ colSpan: 12,
76
+ rowSpan: 6
77
+ }
78
+ }, {
79
+ id: "w3",
80
+ type: "metrics",
81
+ position: {
82
+ col: 0,
83
+ row: 6,
84
+ colSpan: 12,
85
+ rowSpan: 6
86
+ }
87
+ }, {
88
+ id: "w4",
89
+ type: "metrics",
90
+ position: {
91
+ col: 12,
92
+ row: 6,
93
+ colSpan: 12,
94
+ rowSpan: 6
95
+ }
96
+ }],
97
+ createdAt: Date.now(),
98
+ updatedAt: Date.now()
99
+ }, {
100
+ id: "preset-development",
101
+ name: "Development",
102
+ isPreset: !0,
103
+ widgets: [{
104
+ id: "w1",
105
+ type: "terminal",
106
+ position: {
107
+ col: 0,
108
+ row: 0,
109
+ colSpan: 12,
110
+ rowSpan: 6
111
+ }
112
+ }, {
113
+ id: "w2",
114
+ type: "terminal",
115
+ position: {
116
+ col: 12,
117
+ row: 0,
118
+ colSpan: 12,
119
+ rowSpan: 6
120
+ }
121
+ }, {
122
+ id: "w3",
123
+ type: "metrics",
124
+ position: {
125
+ col: 0,
126
+ row: 6,
127
+ colSpan: 24,
128
+ rowSpan: 6
129
+ }
130
+ }],
131
+ createdAt: Date.now(),
132
+ updatedAt: Date.now()
133
+ }], U = {
134
+ activeLayoutId: "preset-default"
135
+ }, P = {
136
+ metrics: {
137
+ minColSpan: 6,
138
+ minRowSpan: 4
139
+ },
140
+ terminal: {
141
+ minColSpan: 8,
142
+ minRowSpan: 4
33
143
  }
34
- }
35
- function u(o) {
36
- typeof window > "u" || localStorage.removeItem(r + o);
37
- }
38
- function d() {
39
- if (typeof window > "u") return;
40
- Object.keys(localStorage).filter((e) => e.startsWith(r)).forEach((e) => localStorage.removeItem(e));
144
+ }, {
145
+ Provider: q,
146
+ use: B
147
+ } = h({
148
+ name: "Deck",
149
+ init: _
150
+ });
151
+ function _() {
152
+ const w = W(), S = () => w.config.deck.storageKey, m = w.persist.load(S(), {}), M = (m.layouts ?? []).filter((o) => !o.isPreset), R = {
153
+ layouts: [...z, ...M],
154
+ activeLayoutId: m.activeLayoutId ?? U.activeLayoutId,
155
+ editMode: !1
156
+ }, [s, d] = E(R), [v, p] = I(null), [D, f] = I(null);
157
+ T(() => {
158
+ const o = {
159
+ layouts: s.layouts,
160
+ activeLayoutId: s.activeLayoutId
161
+ };
162
+ w.persist.debouncedSave(S(), o);
163
+ });
164
+ const u = () => s.layouts.find((o) => o.id === s.activeLayoutId), l = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
165
+ return {
166
+ // Layout management
167
+ layouts: () => s.layouts,
168
+ activeLayoutId: () => s.activeLayoutId,
169
+ activeLayout: u,
170
+ setActiveLayout: (o) => {
171
+ s.layouts.some((t) => t.id === o) && d("activeLayoutId", o);
172
+ },
173
+ createLayout: (o, t) => {
174
+ const a = {
175
+ id: l(),
176
+ name: o,
177
+ widgets: t ?? [],
178
+ createdAt: Date.now(),
179
+ updatedAt: Date.now()
180
+ };
181
+ return d(r((i) => {
182
+ i.layouts.push(a), i.activeLayoutId = a.id;
183
+ })), a;
184
+ },
185
+ duplicateLayout: (o, t) => {
186
+ const a = s.layouts.find((e) => e.id === o);
187
+ if (!a) return;
188
+ const i = {
189
+ id: l(),
190
+ name: t,
191
+ widgets: a.widgets.map((e) => ({
192
+ ...e,
193
+ id: l()
194
+ })),
195
+ createdAt: Date.now(),
196
+ updatedAt: Date.now()
197
+ };
198
+ return d(r((e) => {
199
+ e.layouts.push(i), e.activeLayoutId = i.id;
200
+ })), i;
201
+ },
202
+ deleteLayout: (o) => {
203
+ const t = s.layouts.find((a) => a.id === o);
204
+ !t || t.isPreset || d(r((a) => {
205
+ const i = a.layouts.findIndex((e) => e.id === o);
206
+ i !== -1 && (a.layouts.splice(i, 1), a.activeLayoutId === o && (a.activeLayoutId = "preset-default"));
207
+ }));
208
+ },
209
+ renameLayout: (o, t) => {
210
+ const a = s.layouts.find((i) => i.id === o);
211
+ !a || a.isPreset || d(r((i) => {
212
+ const e = i.layouts.find((n) => n.id === o);
213
+ e && (e.name = t, e.updatedAt = Date.now());
214
+ }));
215
+ },
216
+ // Edit mode
217
+ editMode: () => s.editMode,
218
+ setEditMode: (o) => d("editMode", o),
219
+ toggleEditMode: () => d("editMode", !s.editMode),
220
+ // Widget management
221
+ addWidget: (o, t, a) => {
222
+ const i = u();
223
+ if (!i) return;
224
+ const e = P[o] ?? {
225
+ minColSpan: 2,
226
+ minRowSpan: 2
227
+ }, n = {
228
+ colSpan: (t == null ? void 0 : t.colSpan) ?? Math.max(e.minColSpan, 4),
229
+ rowSpan: (t == null ? void 0 : t.rowSpan) ?? Math.max(e.minRowSpan, 3)
230
+ }, c = (t == null ? void 0 : t.col) !== void 0 && (t == null ? void 0 : t.row) !== void 0 ? F({
231
+ ...n,
232
+ col: t.col,
233
+ row: t.row
234
+ }, e.minColSpan, e.minRowSpan) : k(i.widgets, n.colSpan, n.rowSpan), L = l(), C = {
235
+ id: L,
236
+ type: o,
237
+ position: c,
238
+ config: a
239
+ };
240
+ return d(r((A) => {
241
+ const y = A.layouts.find((x) => x.id === A.activeLayoutId);
242
+ y && (y.widgets.push(C), y.updatedAt = Date.now());
243
+ })), L;
244
+ },
245
+ removeWidget: (o) => {
246
+ d(r((t) => {
247
+ const a = t.layouts.find((i) => i.id === t.activeLayoutId);
248
+ if (a) {
249
+ const i = a.widgets.findIndex((e) => e.id === o);
250
+ i !== -1 && (a.widgets.splice(i, 1), a.updatedAt = Date.now());
251
+ }
252
+ }));
253
+ },
254
+ updateWidgetPosition: (o, t) => {
255
+ d(r((a) => {
256
+ const i = a.layouts.find((e) => e.id === a.activeLayoutId);
257
+ if (i) {
258
+ const e = i.widgets.find((n) => n.id === o);
259
+ e && (g(t, i.widgets, o) || (e.position = t, i.updatedAt = Date.now()));
260
+ }
261
+ }));
262
+ },
263
+ updateWidgetConfig: (o, t) => {
264
+ d(r((a) => {
265
+ const i = a.layouts.find((e) => e.id === a.activeLayoutId);
266
+ if (i) {
267
+ const e = i.widgets.find((n) => n.id === o);
268
+ e && (e.config = {
269
+ ...e.config,
270
+ ...t
271
+ }, i.updatedAt = Date.now());
272
+ }
273
+ }));
274
+ },
275
+ updateWidgetTitle: (o, t) => {
276
+ d(r((a) => {
277
+ const i = a.layouts.find((e) => e.id === a.activeLayoutId);
278
+ if (i) {
279
+ const e = i.widgets.find((n) => n.id === o);
280
+ e && (e.title = t, i.updatedAt = Date.now());
281
+ }
282
+ }));
283
+ },
284
+ changeWidgetType: (o, t) => {
285
+ d(r((a) => {
286
+ const i = a.layouts.find((e) => e.id === a.activeLayoutId);
287
+ if (i) {
288
+ const e = i.widgets.find((n) => n.id === o);
289
+ e && (e.type = t, e.config = void 0, e.title = void 0, i.updatedAt = Date.now());
290
+ }
291
+ }));
292
+ },
293
+ // Drag state
294
+ dragState: v,
295
+ startDrag: (o, t, a) => {
296
+ const i = u(), e = i == null ? void 0 : i.widgets.find((n) => n.id === o);
297
+ e && p({
298
+ widgetId: o,
299
+ originalPosition: {
300
+ ...e.position
301
+ },
302
+ currentPosition: {
303
+ ...e.position
304
+ },
305
+ pixelOffset: {
306
+ x: 0,
307
+ y: 0
308
+ },
309
+ startX: t,
310
+ startY: a
311
+ });
312
+ },
313
+ updateDrag: (o, t) => {
314
+ p((a) => a ? {
315
+ ...a,
316
+ currentPosition: o,
317
+ pixelOffset: t
318
+ } : null);
319
+ },
320
+ endDrag: (o) => {
321
+ const t = v();
322
+ if (t) {
323
+ if (o) {
324
+ const a = u();
325
+ a && !g(t.currentPosition, a.widgets, t.widgetId) && d(r((i) => {
326
+ const e = i.layouts.find((n) => n.id === i.activeLayoutId);
327
+ if (e) {
328
+ const n = e.widgets.find((c) => c.id === t.widgetId);
329
+ n && (n.position = t.currentPosition, e.updatedAt = Date.now());
330
+ }
331
+ }));
332
+ }
333
+ p(null);
334
+ }
335
+ },
336
+ // Resize state
337
+ resizeState: D,
338
+ startResize: (o, t, a, i) => {
339
+ const e = u(), n = e == null ? void 0 : e.widgets.find((c) => c.id === o);
340
+ n && f({
341
+ widgetId: o,
342
+ edge: t,
343
+ originalPosition: {
344
+ ...n.position
345
+ },
346
+ currentPosition: {
347
+ ...n.position
348
+ },
349
+ startX: a,
350
+ startY: i
351
+ });
352
+ },
353
+ updateResize: (o) => {
354
+ f((t) => t ? {
355
+ ...t,
356
+ currentPosition: o
357
+ } : null);
358
+ },
359
+ endResize: (o) => {
360
+ const t = D();
361
+ if (t) {
362
+ if (o) {
363
+ const a = u();
364
+ a && !g(t.currentPosition, a.widgets, t.widgetId) && d(r((i) => {
365
+ const e = i.layouts.find((n) => n.id === i.activeLayoutId);
366
+ if (e) {
367
+ const n = e.widgets.find((c) => c.id === t.widgetId);
368
+ n && (n.position = t.currentPosition, e.updatedAt = Date.now());
369
+ }
370
+ }));
371
+ }
372
+ f(null);
373
+ }
374
+ },
375
+ // Utilities
376
+ getWidgetMinConstraints: (o) => P[o] ?? {
377
+ minColSpan: 2,
378
+ minRowSpan: 2
379
+ }
380
+ };
41
381
  }
42
382
  export {
43
- d as clearAll,
44
- f as debouncedSave,
45
- l as load,
46
- u as remove,
47
- a as save
383
+ q as DeckProvider,
384
+ _ as createDeckService,
385
+ B as useDeck
48
386
  };
package/dist/index56.js CHANGED
@@ -1,29 +1,16 @@
1
- const r = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.userAgent);
2
- function o(s) {
3
- const t = s.toLowerCase().split("+"), e = t.pop() || "";
4
- return {
5
- mod: t.includes("mod"),
6
- ctrl: t.includes("ctrl"),
7
- alt: t.includes("alt"),
8
- shift: t.includes("shift"),
9
- key: e
10
- };
11
- }
12
- function c(s, t) {
13
- const e = typeof t == "string" ? o(t) : t, i = r ? s.metaKey : s.ctrlKey, n = s.key.toLowerCase();
14
- return e.mod && !i || !e.mod && e.ctrl && !s.ctrlKey || e.alt && !s.altKey || e.shift && !s.shiftKey ? !1 : n === e.key;
15
- }
16
- function l(s) {
17
- const t = o(s), e = [];
18
- t.mod && e.push(r ? "⌘" : "Ctrl"), t.ctrl && !t.mod && e.push(r ? "⌃" : "Ctrl"), t.alt && e.push(r ? "⌥" : "Alt"), t.shift && e.push(r ? "⇧" : "Shift");
19
- const i = t.key.length === 1 ? t.key.toUpperCase() : a(t.key);
20
- return e.push(i), e.join(r ? "" : "+");
21
- }
22
- function a(s) {
23
- return s.charAt(0).toUpperCase() + s.slice(1);
1
+ import { createSignal as c, onMount as i, onCleanup as s } from "solid-js";
2
+ function h(a) {
3
+ const [o, n] = c(!1);
4
+ return i(() => {
5
+ if (typeof window > "u") return;
6
+ const e = window.matchMedia(a);
7
+ n(e.matches);
8
+ const t = (r) => {
9
+ n(r.matches);
10
+ };
11
+ e.addEventListener("change", t), s(() => e.removeEventListener("change", t));
12
+ }), o;
24
13
  }
25
14
  export {
26
- l as formatKeybind,
27
- c as matchKeybind,
28
- o as parseKeybind
15
+ h as useMediaQuery
29
16
  };
package/dist/index57.js CHANGED
@@ -1,35 +1,13 @@
1
- const i = /* @__PURE__ */ new Map();
2
- function f() {
3
- return typeof document > "u" ? null : document.body;
4
- }
5
- function u(c, n) {
6
- const s = f();
7
- if (!s) return;
8
- const l = n.stack[n.stack.length - 1], r = l ? l.value : n.initial;
9
- r ? s.style.setProperty(c, r) : s.style.removeProperty(c);
10
- }
11
- function a(c) {
12
- const n = f();
13
- if (!n) return () => {
14
- };
15
- const s = Symbol("body-style-lock"), l = Object.keys(c);
16
- for (const t of l) {
17
- const e = c[t];
18
- if (e === void 0) continue;
19
- let o = i.get(t);
20
- o || (o = { initial: n.style.getPropertyValue(t), stack: [] }, i.set(t, o)), o.stack.push({ id: s, value: e }), u(t, o);
21
- }
22
- let r = !1;
23
- return () => {
24
- if (!r) {
25
- r = !0;
26
- for (const t of l) {
27
- const e = i.get(t);
28
- e && (e.stack = e.stack.filter((o) => o.id !== s), e.stack.length === 0 ? (u(t, e), i.delete(t)) : u(t, e));
29
- }
30
- }
31
- };
1
+ import { createSignal as r, createEffect as i, on as a } from "solid-js";
2
+ function s(e, t) {
3
+ const [o, n] = r(e());
4
+ return i(
5
+ a(e, (u) => {
6
+ const c = setTimeout(() => n(() => u), t);
7
+ return () => clearTimeout(c);
8
+ })
9
+ ), o;
32
10
  }
33
11
  export {
34
- a as lockBodyStyle
12
+ s as useDebounce
35
13
  };
package/dist/index58.js CHANGED
@@ -1,94 +1,19 @@
1
- const i = {
2
- default: { stiffness: 300, damping: 30 },
3
- gentle: { stiffness: 150, damping: 20 },
4
- snappy: { stiffness: 500, damping: 25 },
5
- bouncy: { stiffness: 400, damping: 10 }
6
- }, t = {
7
- instant: 0,
8
- fast: 0.1,
9
- normal: 0.2,
10
- slow: 0.3,
11
- slower: 0.5
12
- }, a = {
13
- easeOut: [0.33, 1, 0.68, 1],
14
- easeIn: [0.32, 0, 0.67, 0],
15
- easeInOut: [0.65, 0, 0.35, 1],
16
- spring: [0.175, 0.885, 0.32, 1.275]
17
- }, n = {
18
- initial: { opacity: 0 },
19
- animate: { opacity: 1 },
20
- exit: { opacity: 0 },
21
- transition: { duration: t.normal }
22
- }, e = {
23
- initial: { x: -20, opacity: 0 },
24
- animate: { x: 0, opacity: 1 },
25
- exit: { x: -20, opacity: 0 },
26
- transition: { duration: t.normal, ease: a.easeOut }
27
- }, s = {
28
- initial: { x: 20, opacity: 0 },
29
- animate: { x: 0, opacity: 1 },
30
- exit: { x: 20, opacity: 0 },
31
- transition: { duration: t.normal, ease: a.easeOut }
32
- }, o = {
33
- initial: { y: -20, opacity: 0 },
34
- animate: { y: 0, opacity: 1 },
35
- exit: { y: -20, opacity: 0 },
36
- transition: { duration: t.normal, ease: a.easeOut }
37
- }, c = {
38
- initial: { y: 20, opacity: 0 },
39
- animate: { y: 0, opacity: 1 },
40
- exit: { y: 20, opacity: 0 },
41
- transition: { duration: t.normal, ease: a.easeOut }
42
- }, r = {
43
- initial: { scale: 0.95, opacity: 0 },
44
- animate: { scale: 1, opacity: 1 },
45
- exit: { scale: 0.95, opacity: 0 },
46
- transition: { duration: t.fast, ease: a.easeOut }
47
- }, p = {
48
- initial: { scale: 0.9, opacity: 0 },
49
- animate: { scale: 1, opacity: 1 },
50
- exit: { scale: 0.9, opacity: 0 },
51
- transition: { type: "spring", ...i.bouncy }
52
- }, l = {
53
- open: {
54
- width: 300,
55
- transition: { duration: t.normal, ease: a.easeOut }
56
- },
57
- collapsed: {
58
- width: 48,
59
- transition: { duration: t.normal, ease: a.easeOut }
60
- },
61
- closed: {
62
- width: 0,
63
- transition: { duration: t.normal, ease: a.easeOut }
64
- }
65
- }, y = {
66
- transition: { duration: t.fast, ease: a.easeOut }
67
- }, d = {
68
- animate: {
69
- transition: {
70
- staggerChildren: 0.05
71
- }
72
- }
73
- }, m = {
74
- initial: { opacity: 0, y: 10 },
75
- animate: { opacity: 1, y: 0 },
76
- exit: { opacity: 0, y: -10 },
77
- transition: { duration: t.fast }
78
- };
1
+ import { createSignal as c, onMount as u, onCleanup as h } from "solid-js";
2
+ function b(o) {
3
+ const [r, i] = c(null);
4
+ return u(() => {
5
+ const t = o();
6
+ if (!t) return;
7
+ const n = new ResizeObserver((s) => {
8
+ const e = s[0];
9
+ e && i({
10
+ width: e.contentRect.width,
11
+ height: e.contentRect.height
12
+ });
13
+ });
14
+ n.observe(t), h(() => n.disconnect());
15
+ }), r;
16
+ }
79
17
  export {
80
- t as duration,
81
- a as easing,
82
- n as fadeIn,
83
- d as listContainer,
84
- m as listItem,
85
- y as panelResize,
86
- p as popIn,
87
- r as scaleIn,
88
- l as sidebarVariants,
89
- c as slideInFromBottom,
90
- e as slideInFromLeft,
91
- s as slideInFromRight,
92
- o as slideInFromTop,
93
- i as springConfig
18
+ b as useResizeObserver
94
19
  };
package/dist/index59.js CHANGED
@@ -1,25 +1,13 @@
1
- function e(o, n) {
2
- return !(o.col + o.colSpan <= n.col || o.col >= n.col + n.colSpan || o.row + o.rowSpan <= n.row || o.row >= n.row + n.rowSpan);
3
- }
4
- function s(o, n, t) {
5
- return n.some((c) => t && c.id === t ? !1 : e(o, c.position));
6
- }
7
- function w(o, n, t, c = 24) {
8
- for (let r = 0; r < 100; r++)
9
- for (let a = 0; a <= c - n; a++) {
10
- const i = { col: a, row: r, colSpan: n, rowSpan: t };
11
- if (!s(i, o))
12
- return i;
13
- }
14
- return { col: 0, row: Math.max(0, ...o.map((r) => r.position.row + r.position.rowSpan)), colSpan: n, rowSpan: t };
15
- }
16
- function f(o, n = 4, t = 4, c = 24) {
17
- const l = Math.max(0, Math.min(c - 1, o.col)), r = Math.max(0, o.row), a = Math.max(n, Math.min(c - l, o.colSpan)), i = Math.max(t, o.rowSpan);
18
- return { col: l, row: r, colSpan: a, rowSpan: i };
1
+ import { onMount as d, onCleanup as i } from "solid-js";
2
+ import { matchKeybind as r } from "./index65.js";
3
+ function a(o, t) {
4
+ d(() => {
5
+ const n = (e) => {
6
+ r(e, o) && (e.preventDefault(), t());
7
+ };
8
+ window.addEventListener("keydown", n), i(() => window.removeEventListener("keydown", n));
9
+ });
19
10
  }
20
11
  export {
21
- e as checkCollision,
22
- f as constrainPosition,
23
- w as findFreePosition,
24
- s as hasCollision
12
+ a as useKeybind
25
13
  };
package/dist/index6.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { delegateEvents as f, template as i, insert as l, effect as u, className as a, createComponent as c } from "solid-js/web";
2
2
  import { Show as s } from "solid-js";
3
- import { cn as m } from "./index53.js";
4
- import { useResolvedFloeConfig as b } from "./index39.js";
3
+ import { cn as m } from "./index62.js";
4
+ import { useResolvedFloeConfig as b } from "./index48.js";
5
5
  var h = /* @__PURE__ */ i("<footer>"), g = /* @__PURE__ */ i('<span class="w-2.5 h-2.5">'), $ = /* @__PURE__ */ i("<button type=button>"), d = /* @__PURE__ */ i("<span>");
6
6
  function C(e) {
7
7
  return (() => {