@floegence/floe-webapp-core 0.52.7 → 0.52.9

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.
@@ -0,0 +1,78 @@
1
+ const u = 8;
2
+ function h(t, n) {
3
+ const e = Number(t);
4
+ return Number.isFinite(e) && e >= 0 ? e : n;
5
+ }
6
+ function M(t, n = {}) {
7
+ const e = Math.max(0, t.width), o = Math.max(0, t.height), i = Math.min(h(n.left, 0), e), a = Math.min(h(n.top, 0), o), c = Math.min(h(n.right, 0), Math.max(0, e - i)), r = Math.min(h(n.bottom, 0), Math.max(0, o - a));
8
+ return {
9
+ ...t,
10
+ left: t.left + i,
11
+ top: t.top + a,
12
+ width: Math.max(0, e - i - c),
13
+ height: Math.max(0, o - a - r)
14
+ };
15
+ }
16
+ function s(t) {
17
+ return h(t, 8);
18
+ }
19
+ function f(t) {
20
+ const n = Number(t);
21
+ return Number.isFinite(n) && n >= 0 ? n : 1 / 0;
22
+ }
23
+ function l(t, n, e, o) {
24
+ const i = Math.max(0, Number.isFinite(n) ? n : 0), a = Math.max(0, Number.isFinite(e) ? e : 0), c = Math.min(o, i / 2), r = t + c, m = Math.max(r, t + i - a - c);
25
+ return { min: r, max: m, room: Math.max(0, m - r) };
26
+ }
27
+ function F(t, n = 8) {
28
+ const e = s(n);
29
+ return {
30
+ x: l(t.left, t.width, t.panelWidth, e),
31
+ y: l(t.top, t.height, t.panelHeight, e)
32
+ };
33
+ }
34
+ function N(t, n) {
35
+ return {
36
+ x: t.x.min + n.x * t.x.room,
37
+ y: t.y.min + n.y * t.y.room
38
+ };
39
+ }
40
+ function x(t, n) {
41
+ return Math.max(n.min, Math.min(n.max, t));
42
+ }
43
+ function S(t, n, e = 1 / 0) {
44
+ const o = f(e), i = [
45
+ {
46
+ edge: "left",
47
+ distance: Math.max(0, t.x - n.x.min),
48
+ position: { x: n.x.min, y: x(t.y, n.y) }
49
+ },
50
+ {
51
+ edge: "right",
52
+ distance: Math.max(0, n.x.max - t.x),
53
+ position: { x: n.x.max, y: x(t.y, n.y) }
54
+ },
55
+ {
56
+ edge: "top",
57
+ distance: Math.max(0, t.y - n.y.min),
58
+ position: { x: x(t.x, n.x), y: n.y.min }
59
+ },
60
+ {
61
+ edge: "bottom",
62
+ distance: Math.max(0, n.y.max - t.y),
63
+ position: { x: x(t.x, n.x), y: n.y.max }
64
+ }
65
+ ];
66
+ i.sort((c, r) => c.distance - r.distance);
67
+ const a = i[0];
68
+ return !a || a.distance > o ? null : { edge: a.edge, position: a.position };
69
+ }
70
+ export {
71
+ u as DEFAULT_SURFACE_FLOATING_PANEL_INSET,
72
+ M as insetSurfaceFloatingPanelGeometry,
73
+ F as resolveSurfaceFloatingPanelBounds,
74
+ s as resolveSurfaceFloatingPanelInset,
75
+ N as resolveSurfaceFloatingPanelPosition,
76
+ S as resolveSurfaceFloatingPanelSnap,
77
+ f as resolveSurfaceFloatingPanelSnapThreshold
78
+ };
package/dist/floe.css CHANGED
@@ -735,15 +735,15 @@
735
735
  pointer-events: auto;
736
736
  transform-origin: bottom center;
737
737
  transition:
738
- left 240ms cubic-bezier(0.22, 1, 0.36, 1),
739
- top 240ms cubic-bezier(0.22, 1, 0.36, 1),
740
- width 240ms cubic-bezier(0.22, 1, 0.36, 1),
741
- height 240ms cubic-bezier(0.22, 1, 0.36, 1),
738
+ left 360ms cubic-bezier(0.22, 0.8, 0.24, 1),
739
+ top 360ms cubic-bezier(0.22, 0.8, 0.24, 1),
740
+ width 360ms cubic-bezier(0.22, 0.8, 0.24, 1),
741
+ height 360ms cubic-bezier(0.22, 0.8, 0.24, 1),
742
742
  border-radius 200ms ease,
743
743
  border-color 180ms ease,
744
+ background-color 200ms ease,
744
745
  box-shadow 200ms ease,
745
746
  opacity 120ms ease;
746
- will-change: left, top, width, height;
747
747
  }
748
748
 
749
749
  .floe-bottom-bar-companion[data-companion-phase='expanding'],
@@ -755,8 +755,9 @@
755
755
  0 6px 18px -12px color-mix(in srgb, var(--foreground) 24%, transparent);
756
756
  }
757
757
 
758
+ .floe-bottom-bar-companion[data-companion-phase='expanding'],
758
759
  .floe-bottom-bar-companion[data-companion-phase='collapsing'] {
759
- transition-duration: 180ms, 180ms, 180ms, 180ms, 160ms, 140ms, 160ms, 100ms;
760
+ will-change: left, top, width, height;
760
761
  }
761
762
 
762
763
  .floe-bottom-bar-companion[data-companion-visibility='hidden'],