@floegence/floe-webapp-core 0.58.0 → 0.60.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.
@@ -86,9 +86,9 @@ function ue(e) {
86
86
  $(!1);
87
87
  const a = e.dragContext.dragState();
88
88
  a.isDragging && a.dropTarget?.targetPath === e.item.path && e.dragContext.setDropTarget(null, !1);
89
- }, V = (t) => {
89
+ }, z = (t) => {
90
90
  g.consumeClickSuppression(t) || o.navigateTo(x);
91
- }, j = (t) => {
91
+ }, V = (t) => {
92
92
  t.preventDefault(), t.stopPropagation(), !F() && o.showContextMenu(le({
93
93
  x: t.clientX,
94
94
  y: t.clientY,
@@ -96,7 +96,7 @@ function ue(e) {
96
96
  items: [e.item],
97
97
  source: "tree"
98
98
  }));
99
- }, z = () => {
99
+ }, j = () => {
100
100
  D() && o.toggleFolder(e.item.path);
101
101
  };
102
102
  return (() => {
@@ -110,7 +110,7 @@ function ue(e) {
110
110
  },
111
111
  get children() {
112
112
  var n = se();
113
- return n.$$click = z, l(n, s(ie, {
113
+ return n.$$click = j, l(n, s(ie, {
114
114
  class: "w-3 h-3 opacity-50"
115
115
  })), y((c) => {
116
116
  var m = u("flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center cursor-pointer", "transition-transform duration-150", i() && "rotate-90", "focus:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-sidebar-ring"), f = i() ? "Collapse folder" : "Expand folder";
@@ -121,8 +121,8 @@ function ue(e) {
121
121
  }), n;
122
122
  }
123
123
  }), d), X(d, Y(oe, {
124
- onClick: V,
125
- onContextMenu: j,
124
+ onClick: z,
125
+ onContextMenu: V,
126
126
  onPointerDown: A,
127
127
  onPointerMove: N,
128
128
  onPointerUp: O,
@@ -137,6 +137,7 @@ function ue(e) {
137
137
  get open() {
138
138
  return i();
139
139
  },
140
+ size: 16,
140
141
  class: "w-4 h-4"
141
142
  }), null), l(b, s(ne, {
142
143
  get item() {
@@ -6,12 +6,12 @@ import { useFileBrowserDrag as G } from "../../context/FileBrowserDragContext.js
6
6
  import { FileItemIcon as W } from "./FileIcons.js";
7
7
  var Y = /* @__PURE__ */ a('<div class="text-[10px] text-muted-foreground pl-6">and <!> more...'), q = /* @__PURE__ */ a("<span>Drop to move"), y = /* @__PURE__ */ a("<div>"), H = /* @__PURE__ */ a('<div class="flex items-center gap-2.5 text-xs text-foreground"><span class="flex-shrink-0 w-4 h-4"></span><span class="truncate font-medium">'), J = /* @__PURE__ */ a("<span>Cannot drop here"), K = /* @__PURE__ */ a('<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><polyline points="20 6 9 17 4 12">'), L = /* @__PURE__ */ a('<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=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>');
8
8
  const x = 3, P = 4, T = 4, Q = 0.2;
9
- function lt() {
9
+ function le() {
10
10
  const g = G(), n = () => g?.dragState(), S = () => n()?.isDragging ?? !1, C = () => n()?.isDragEnding ?? !1, [c, h] = F(null), [s, w] = F(!1);
11
11
  let _ = !1;
12
12
  V(() => {
13
- const t = S(), e = C();
14
- if (t && !e && !_ && (h(null), w(!1)), e && !_) {
13
+ const e = S(), t = C();
14
+ if (e && !t && !_ && (h(null), w(!1)), t && !_) {
15
15
  const r = n();
16
16
  if (r && r.draggedItems.length > 0) {
17
17
  const i = r.pointerPosition;
@@ -26,21 +26,21 @@ function lt() {
26
26
  }), w(!0);
27
27
  }
28
28
  }
29
- _ = e;
29
+ _ = t;
30
30
  });
31
31
  const R = () => S() || C() || s(), E = d(() => {
32
- const t = c();
33
- return t ? t.items.slice(0, x) : (n()?.draggedItems ?? []).slice(0, x).map((r) => r.item);
32
+ const e = c();
33
+ return e ? e.items.slice(0, x) : (n()?.draggedItems ?? []).slice(0, x).map((r) => r.item);
34
34
  }), v = d(() => {
35
- const t = c();
36
- return t ? t.items.length : n()?.draggedItems?.length ?? 0;
35
+ const e = c();
36
+ return e ? e.items.length : n()?.draggedItems?.length ?? 0;
37
37
  }), k = d(() => {
38
- const t = v();
39
- return t > x ? t - x : 0;
38
+ const e = v();
39
+ return e > x ? e - x : 0;
40
40
  }), b = d(() => {
41
- const t = c();
42
- if (t)
43
- return t.position;
41
+ const e = c();
42
+ if (e)
43
+ return e.position;
44
44
  const r = n()?.pointerPosition ?? {
45
45
  x: 0,
46
46
  y: 0
@@ -50,8 +50,8 @@ function lt() {
50
50
  y: r.y + T
51
51
  };
52
52
  }), z = d(() => {
53
- const t = c();
54
- return t?.committed && t?.target ? t.target : b();
53
+ const e = c();
54
+ return e?.committed && e?.target ? e.target : b();
55
55
  }), M = d(() => c()?.committed ?? !1), p = () => n()?.isValidDrop ?? !1, O = () => !!n()?.dropTarget, I = () => O() && !c();
56
56
  return o(U, {
57
57
  get children() {
@@ -90,38 +90,39 @@ function lt() {
90
90
  },
91
91
  get children() {
92
92
  return [(() => {
93
- var t = y();
94
- return l(t, o(j, {
93
+ var e = y();
94
+ return l(e, o(j, {
95
95
  get each() {
96
96
  return E();
97
97
  },
98
- children: (e) => (() => {
98
+ children: (t) => (() => {
99
99
  var r = H(), i = r.firstChild, D = i.nextSibling;
100
100
  return l(i, o(W, {
101
- item: e,
101
+ item: t,
102
+ size: 16,
102
103
  class: "w-4 h-4"
103
- })), l(D, () => e.name), r;
104
+ })), l(D, () => t.name), r;
104
105
  })()
105
- }), null), l(t, o(m, {
106
+ }), null), l(e, o(m, {
106
107
  get when() {
107
108
  return k() > 0;
108
109
  },
109
110
  get children() {
110
- var e = Y(), r = e.firstChild, i = r.nextSibling;
111
- return i.nextSibling, l(e, k, i), e;
111
+ var t = Y(), r = t.firstChild, i = r.nextSibling;
112
+ return i.nextSibling, l(t, k, i), t;
112
113
  }
113
- }), null), l(t, o(m, {
114
+ }), null), l(e, o(m, {
114
115
  get when() {
115
116
  return I();
116
117
  },
117
118
  get children() {
118
- var e = y();
119
- return l(e, o(m, {
119
+ var t = y();
120
+ return l(t, o(m, {
120
121
  get when() {
121
122
  return p();
122
123
  },
123
124
  get fallback() {
124
- return [o(tt, {
125
+ return [o(ee, {
125
126
  class: "w-3.5 h-3.5"
126
127
  }), J()];
127
128
  },
@@ -130,9 +131,9 @@ function lt() {
130
131
  class: "w-3.5 h-3.5"
131
132
  }), q()];
132
133
  }
133
- })), u(() => $(e, f("flex items-center gap-1.5 pt-1.5 mt-1 border-t border-border text-[11px] font-medium", "transition-colors duration-150", p() ? "text-success" : "text-error"))), e;
134
+ })), u(() => $(t, f("flex items-center gap-1.5 pt-1.5 mt-1 border-t border-border text-[11px] font-medium", "transition-colors duration-150", p() ? "text-success" : "text-error"))), t;
134
135
  }
135
- }), null), u(() => $(t, f(
136
+ }), null), u(() => $(e, f(
136
137
  "flex flex-col gap-1 p-2.5 rounded-lg",
137
138
  "bg-card border border-border",
138
139
  "shadow-md",
@@ -145,14 +146,14 @@ function lt() {
145
146
  I() && !p() && "border-error/60",
146
147
  // Committed state
147
148
  s() && M() && "border-success/60"
148
- ))), t;
149
+ ))), e;
149
150
  })(), o(m, {
150
151
  get when() {
151
152
  return v() > 1;
152
153
  },
153
154
  get children() {
154
- var t = y();
155
- return l(t, v), u(() => $(t, f(
155
+ var e = y();
156
+ return l(e, v), u(() => $(e, f(
156
157
  "absolute -top-2 -right-2",
157
158
  "min-w-[20px] h-5 px-1.5 rounded-full",
158
159
  "bg-foreground text-background",
@@ -161,7 +162,7 @@ function lt() {
161
162
  "shadow-sm",
162
163
  // Entrance animation (only when not exiting)
163
164
  !s() && "animate-in zoom-in-50 duration-200"
164
- ))), t;
165
+ ))), e;
165
166
  }
166
167
  })];
167
168
  }
@@ -179,12 +180,12 @@ function Z(g) {
179
180
  return u(() => A(n, "class", g.class)), n;
180
181
  })();
181
182
  }
182
- function tt(g) {
183
+ function ee(g) {
183
184
  return (() => {
184
185
  var n = L();
185
186
  return u(() => A(n, "class", g.class)), n;
186
187
  })();
187
188
  }
188
189
  export {
189
- lt as FileBrowserDragPreview
190
+ le as FileBrowserDragPreview
190
191
  };