@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.
- package/dist/components/file-browser/Breadcrumb.d.ts +7 -0
- package/dist/components/file-browser/DirectoryTree.d.ts +7 -0
- package/dist/components/file-browser/FileBrowser.d.ts +35 -0
- package/dist/components/file-browser/FileBrowserContext.d.ts +18 -0
- package/dist/components/file-browser/FileBrowserToolbar.d.ts +8 -0
- package/dist/components/file-browser/FileContextMenu.d.ts +15 -0
- package/dist/components/file-browser/FileGridView.d.ts +7 -0
- package/dist/components/file-browser/FileIcons.d.ts +14 -0
- package/dist/components/file-browser/FileListView.d.ts +7 -0
- package/dist/components/file-browser/index.d.ts +10 -0
- package/dist/components/file-browser/types.d.ts +104 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/layout/Sidebar.d.ts +18 -0
- package/dist/components/layout/index.d.ts +1 -1
- package/dist/components/layout/mobileTabs.d.ts +30 -0
- package/dist/context/ComponentRegistry.d.ts +3 -2
- package/dist/index.js +249 -220
- package/dist/index10.js +2 -2
- package/dist/index11.js +4 -4
- package/dist/index12.js +2 -2
- package/dist/index13.js +4 -4
- package/dist/index14.js +4 -4
- package/dist/index15.js +4 -4
- package/dist/index16.js +3 -3
- package/dist/index17.js +5 -5
- package/dist/index18.js +2 -2
- package/dist/index19.js +1 -1
- package/dist/index2.js +89 -70
- package/dist/index20.js +1 -1
- package/dist/index21.js +3 -3
- package/dist/index22.js +2 -2
- package/dist/index23.js +2 -2
- package/dist/index24.js +1 -1
- package/dist/index25.js +4 -4
- package/dist/index26.js +1 -1
- package/dist/index27.js +1 -1
- package/dist/index28.js +1 -1
- package/dist/index29.js +1 -1
- package/dist/index3.js +1 -1
- package/dist/index36.js +138 -42
- package/dist/index37.js +102 -32
- package/dist/index38.js +90 -23
- package/dist/index39.js +107 -170
- package/dist/index4.js +48 -34
- package/dist/index40.js +86 -40
- package/dist/index41.js +176 -64
- package/dist/index42.js +64 -94
- package/dist/index43.js +64 -110
- package/dist/index44.js +39 -138
- package/dist/index45.js +44 -35
- package/dist/index46.js +34 -379
- package/dist/index47.js +25 -13
- package/dist/index48.js +173 -10
- package/dist/index49.js +40 -16
- package/dist/index5.js +3 -3
- package/dist/index50.js +65 -9
- package/dist/index51.js +96 -8
- package/dist/index52.js +113 -52
- package/dist/index53.js +138 -5
- package/dist/index54.js +39 -3
- package/dist/index55.js +382 -44
- package/dist/index56.js +13 -26
- package/dist/index57.js +10 -32
- package/dist/index58.js +17 -92
- package/dist/index59.js +10 -22
- package/dist/index6.js +2 -2
- package/dist/index60.js +8 -46
- package/dist/index61.js +56 -14
- package/dist/index62.js +5 -35
- package/dist/index63.js +3 -64
- package/dist/index64.js +45 -84
- package/dist/index65.js +25 -13
- package/dist/index66.js +27 -2258
- package/dist/index67.js +94 -0
- package/dist/index68.js +25 -0
- package/dist/index69.js +49 -0
- package/dist/index7.js +1 -1
- package/dist/index70.js +17 -0
- package/dist/index71.js +38 -0
- package/dist/index72.js +67 -0
- package/dist/index73.js +87 -0
- package/dist/index74.js +17 -0
- package/dist/index75.js +2266 -0
- package/dist/index76.js +10 -0
- package/dist/index8.js +2 -2
- package/dist/index9.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index55.js
CHANGED
|
@@ -1,48 +1,386 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
return {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
27
|
-
c as matchKeybind,
|
|
28
|
-
o as parseKeybind
|
|
15
|
+
h as useMediaQuery
|
|
29
16
|
};
|
package/dist/index57.js
CHANGED
|
@@ -1,35 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
12
|
+
s as useDebounce
|
|
35
13
|
};
|
package/dist/index58.js
CHANGED
|
@@ -1,94 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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 "./
|
|
4
|
-
import { useResolvedFloeConfig as b } from "./
|
|
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 (() => {
|