@floegence/floe-webapp-core 0.72.0 → 0.74.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.
- package/dist/components/file-browser/FileBrowserStatusBar.d.ts +2 -0
- package/dist/components/file-browser/FileBrowserStatusBar.js +55 -29
- package/dist/components/file-browser/FileGridView.d.ts +2 -0
- package/dist/components/file-browser/FileGridView.js +251 -216
- package/dist/components/file-browser/FileListView.d.ts +2 -0
- package/dist/components/file-browser/FileListView.js +354 -303
- package/dist/components/ui/Dialog.d.ts +2 -2
- package/dist/components/ui/Dialog.js +135 -115
- package/dist/components/ui/FloatingWindow.js +195 -188
- package/dist/components/ui/floatingWindowGeometry.d.ts +12 -3
- package/dist/components/ui/floatingWindowGeometry.js +37 -37
- package/dist/floe.css +24 -6
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -35,7 +35,10 @@ interface ResolveFloatingWindowRectOptions {
|
|
|
35
35
|
resizeHandle: FloatingWindowResizeHandle;
|
|
36
36
|
minSize: Size;
|
|
37
37
|
maxSize: Size;
|
|
38
|
-
viewport: Size
|
|
38
|
+
viewport: Size & {
|
|
39
|
+
x?: number;
|
|
40
|
+
y?: number;
|
|
41
|
+
};
|
|
39
42
|
viewportInsets?: FloatingWindowViewportInsets;
|
|
40
43
|
mobile: boolean;
|
|
41
44
|
mobilePadding: number;
|
|
@@ -44,13 +47,19 @@ interface NormalizeFloatingWindowRectOptions {
|
|
|
44
47
|
rect: FloatingWindowRect;
|
|
45
48
|
minSize: Size;
|
|
46
49
|
maxSize: Size;
|
|
47
|
-
viewport: Size
|
|
50
|
+
viewport: Size & {
|
|
51
|
+
x?: number;
|
|
52
|
+
y?: number;
|
|
53
|
+
};
|
|
48
54
|
viewportInsets?: FloatingWindowViewportInsets;
|
|
49
55
|
mobile: boolean;
|
|
50
56
|
mobilePadding: number;
|
|
51
57
|
center?: boolean;
|
|
52
58
|
}
|
|
53
|
-
export declare function resolveFloatingWindowViewport(viewport: Size
|
|
59
|
+
export declare function resolveFloatingWindowViewport(viewport: Size & {
|
|
60
|
+
x?: number;
|
|
61
|
+
y?: number;
|
|
62
|
+
}, insets?: FloatingWindowViewportInsets): FloatingWindowViewport;
|
|
54
63
|
export declare function resolveFloatingWindowRect(options: ResolveFloatingWindowRectOptions): FloatingWindowRect;
|
|
55
64
|
export declare function normalizeFloatingWindowRect(options: NormalizeFloatingWindowRectOptions): FloatingWindowRect;
|
|
56
65
|
export {};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
function x(
|
|
2
|
-
return Math.max(i, Math.min(m,
|
|
1
|
+
function x(n, i, m) {
|
|
2
|
+
return Math.max(i, Math.min(m, n));
|
|
3
3
|
}
|
|
4
|
-
function l(
|
|
5
|
-
const s = Math.max(0, m), o = Math.min(
|
|
4
|
+
function l(n, i, m) {
|
|
5
|
+
const s = Math.max(0, m), o = Math.min(n, s), c = Math.max(o, Math.min(i, s));
|
|
6
6
|
return { min: o, max: c };
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const i = Number(
|
|
8
|
+
function v(n) {
|
|
9
|
+
const i = Number(n);
|
|
10
10
|
return Number.isFinite(i) && i > 0 ? i : 0;
|
|
11
11
|
}
|
|
12
|
-
function X(
|
|
13
|
-
const m = Math.max(0,
|
|
12
|
+
function X(n, i = {}) {
|
|
13
|
+
const m = Math.max(0, n.width), s = Math.max(0, n.height), o = Math.min(v(i.left), m), c = Math.min(v(i.top), s), e = Math.min(v(i.right), Math.max(0, m - o)), d = Math.min(v(i.bottom), Math.max(0, s - c));
|
|
14
14
|
return {
|
|
15
|
-
x: o,
|
|
16
|
-
y: c,
|
|
17
|
-
width: Math.max(0, m - o -
|
|
15
|
+
x: (n.x ?? 0) + o,
|
|
16
|
+
y: (n.y ?? 0) + c,
|
|
17
|
+
width: Math.max(0, m - o - e),
|
|
18
18
|
height: Math.max(0, s - c - d)
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function Y(
|
|
22
|
-
return
|
|
21
|
+
function Y(n) {
|
|
22
|
+
return n.x + n.width;
|
|
23
23
|
}
|
|
24
|
-
function H(
|
|
25
|
-
return
|
|
24
|
+
function H(n) {
|
|
25
|
+
return n.y + n.height;
|
|
26
26
|
}
|
|
27
|
-
function I(
|
|
27
|
+
function I(n) {
|
|
28
28
|
const {
|
|
29
29
|
mode: i,
|
|
30
30
|
pointer: m,
|
|
31
31
|
dragStartPos: s,
|
|
32
32
|
dragStartRect: o,
|
|
33
33
|
resizeStartPos: c,
|
|
34
|
-
resizeStartRect:
|
|
34
|
+
resizeStartRect: e,
|
|
35
35
|
resizeHandle: d,
|
|
36
36
|
minSize: r,
|
|
37
37
|
maxSize: t,
|
|
@@ -39,55 +39,55 @@ function I(e) {
|
|
|
39
39
|
viewportInsets: S,
|
|
40
40
|
mobile: y,
|
|
41
41
|
mobilePadding: f
|
|
42
|
-
} =
|
|
42
|
+
} = n, a = X(R, S), g = Y(a), M = H(a), u = m.x - (i === "drag" ? s.x : c.x), p = m.y - (i === "drag" ? s.y : c.y);
|
|
43
43
|
if (i === "drag") {
|
|
44
|
-
const h = Math.max(a.x, g - o.width),
|
|
44
|
+
const h = Math.max(a.x, g - o.width), w = Math.max(a.y, M - o.height);
|
|
45
45
|
return {
|
|
46
46
|
...o,
|
|
47
47
|
x: x(y ? a.x + f : o.x + u, a.x, h),
|
|
48
|
-
y: x(o.y + p, a.y,
|
|
48
|
+
y: x(o.y + p, a.y, w)
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
let b =
|
|
51
|
+
let b = e.width, z = e.height, W = e.x, F = e.y;
|
|
52
52
|
if (!y && d.includes("e")) {
|
|
53
|
-
const h = l(r.width, t.width, g -
|
|
54
|
-
b = x(
|
|
53
|
+
const h = l(r.width, t.width, g - e.x);
|
|
54
|
+
b = x(e.width + u, h.min, h.max);
|
|
55
55
|
}
|
|
56
56
|
if (!y && d.includes("w")) {
|
|
57
|
-
const h =
|
|
58
|
-
W = x(
|
|
57
|
+
const h = e.x + e.width, w = l(r.width, t.width, h - a.x), B = h - w.max, P = Math.max(B, h - w.min);
|
|
58
|
+
W = x(e.x + u, B, P), b = Math.max(0, h - W);
|
|
59
59
|
}
|
|
60
60
|
if (d.includes("s")) {
|
|
61
|
-
const h = l(r.height, t.height,
|
|
62
|
-
|
|
61
|
+
const h = l(r.height, t.height, M - e.y);
|
|
62
|
+
z = x(e.height + p, h.min, h.max);
|
|
63
63
|
}
|
|
64
64
|
if (d.includes("n")) {
|
|
65
|
-
const h =
|
|
66
|
-
F = x(
|
|
65
|
+
const h = e.y + e.height, w = l(r.height, t.height, h - a.y), B = h - w.max, P = Math.max(B, h - w.min);
|
|
66
|
+
F = x(e.y + p, B, P), z = Math.max(0, h - F);
|
|
67
67
|
}
|
|
68
68
|
return {
|
|
69
69
|
x: x(W, a.x, Math.max(a.x, g - b)),
|
|
70
|
-
y: x(F, a.y, Math.max(a.y,
|
|
70
|
+
y: x(F, a.y, Math.max(a.y, M - z)),
|
|
71
71
|
width: b,
|
|
72
|
-
height:
|
|
72
|
+
height: z
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
function V(
|
|
75
|
+
function V(n) {
|
|
76
76
|
const {
|
|
77
77
|
rect: i,
|
|
78
78
|
minSize: m,
|
|
79
79
|
maxSize: s,
|
|
80
80
|
viewport: o,
|
|
81
81
|
viewportInsets: c,
|
|
82
|
-
mobile:
|
|
82
|
+
mobile: e,
|
|
83
83
|
mobilePadding: d,
|
|
84
84
|
center: r = !1
|
|
85
|
-
} =
|
|
85
|
+
} = n, t = X(o, c), R = Y(t), S = H(t), y = e ? Math.max(0, t.width - d * 2) : t.width, f = l(m.width, s.width, y), a = l(m.height, s.height, t.height), g = e ? f.max : x(i.width, f.min, f.max), M = x(i.height, a.min, a.max), u = Math.max(t.x, R - g), p = Math.max(t.y, S - M);
|
|
86
86
|
return {
|
|
87
|
-
x:
|
|
88
|
-
y: r ? Math.max(t.y, Math.round(t.y + (t.height -
|
|
87
|
+
x: e ? x(t.x + d, t.x, u) : r ? Math.max(t.x, Math.round(t.x + (t.width - g) / 2)) : x(i.x, t.x, u),
|
|
88
|
+
y: r ? Math.max(t.y, Math.round(t.y + (t.height - M) / 2)) : x(i.y, t.y, p),
|
|
89
89
|
width: g,
|
|
90
|
-
height:
|
|
90
|
+
height: M
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
export {
|
package/dist/floe.css
CHANGED
|
@@ -455,10 +455,29 @@
|
|
|
455
455
|
--floe-floating-exit-scale: 1;
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
+
.floe-side-drawer-overlay {
|
|
459
|
+
--floe-dialog-gap-y: 0px;
|
|
460
|
+
--floe-dialog-gap-x: 0px;
|
|
461
|
+
padding: 0;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.floe-side-drawer-panel {
|
|
465
|
+
height: 100%;
|
|
466
|
+
border-top-right-radius: 0;
|
|
467
|
+
border-bottom-right-radius: 0;
|
|
468
|
+
--floe-floating-enter-x: min(8rem, 18vw);
|
|
469
|
+
--floe-floating-exit-x: min(6rem, 14vw);
|
|
470
|
+
--floe-floating-enter-y: 0;
|
|
471
|
+
--floe-floating-exit-y: 0;
|
|
472
|
+
--floe-floating-enter-scale: 1;
|
|
473
|
+
--floe-floating-exit-scale: 1;
|
|
474
|
+
--floe-floating-origin: right center;
|
|
475
|
+
}
|
|
476
|
+
|
|
458
477
|
.floe-bottom-drawer-overlay {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
478
|
+
--floe-dialog-gap-y: 1.25rem;
|
|
479
|
+
--floe-dialog-gap-x: 1.5rem;
|
|
480
|
+
padding: var(--floe-dialog-gap-y) var(--floe-dialog-gap-x);
|
|
462
481
|
}
|
|
463
482
|
|
|
464
483
|
.floe-bottom-drawer-backdrop {
|
|
@@ -480,9 +499,8 @@
|
|
|
480
499
|
|
|
481
500
|
@media (max-width: 639px) {
|
|
482
501
|
.floe-bottom-drawer-overlay {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
max(0.75rem, env(safe-area-inset-left, 0px));
|
|
502
|
+
--floe-dialog-gap-y: 0.75rem;
|
|
503
|
+
--floe-dialog-gap-x: 0.75rem;
|
|
486
504
|
}
|
|
487
505
|
}
|
|
488
506
|
|