@floegence/floe-webapp-core 0.35.12 → 0.35.14
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/deck/WidgetResizeHandle.js +34 -33
- package/dist/components/file-browser/FileBrowser.js +77 -70
- package/dist/components/file-browser/FileBrowserContext.js +141 -140
- package/dist/components/file-browser/types.d.ts +1 -0
- package/dist/components/layout/ActivityBar.js +21 -21
- package/dist/components/layout/MobileTabBar.js +12 -12
- package/dist/components/layout/ResizeHandle.d.ts +2 -0
- package/dist/components/layout/ResizeHandle.js +38 -37
- package/dist/components/layout/Shell.js +164 -140
- package/dist/components/layout/Sidebar.js +8 -8
- package/dist/components/layout/SidebarPane.d.ts +2 -0
- package/dist/components/layout/SidebarPane.js +22 -16
- package/dist/components/ui/CommandPalette.js +47 -46
- package/dist/components/ui/FloatingWindow.d.ts +5 -1
- package/dist/components/ui/FloatingWindow.js +267 -194
- package/dist/components/ui/floatingWindowGeometry.d.ts +41 -0
- package/dist/components/ui/floatingWindowGeometry.js +65 -0
- package/dist/context/FileBrowserDragContext.js +45 -43
- package/dist/context/LayoutContext.d.ts +1 -0
- package/dist/context/LayoutContext.js +20 -19
- package/dist/floe.css +14 -0
- package/dist/hooks/useDeckDrag.js +39 -35
- package/dist/hooks/useFileBrowserDrag.js +74 -81
- package/dist/styles.css +1 -1
- package/dist/utils/hotInteraction.d.ts +9 -0
- package/dist/utils/hotInteraction.js +34 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const FLOE_HOT_INTERACTION_ATTR = "data-floe-hot-interaction";
|
|
2
|
+
export declare const FLOE_GEOMETRY_SURFACE_ATTR = "data-floe-geometry-surface";
|
|
3
|
+
export type HotInteractionKind = 'drag' | 'resize';
|
|
4
|
+
export interface StartHotInteractionOptions {
|
|
5
|
+
kind: HotInteractionKind;
|
|
6
|
+
cursor: string;
|
|
7
|
+
lockUserSelect?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function startHotInteraction(options: StartHotInteractionOptions): () => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { lockBodyStyle as s } from "./bodyStyleLock.js";
|
|
2
|
+
const u = "data-floe-hot-interaction", e = /* @__PURE__ */ new Map();
|
|
3
|
+
function l() {
|
|
4
|
+
return typeof document > "u" ? null : document.documentElement;
|
|
5
|
+
}
|
|
6
|
+
function i() {
|
|
7
|
+
const t = l();
|
|
8
|
+
if (!t) return;
|
|
9
|
+
const r = [...e.entries()].filter(([, n]) => n > 0).map(([n]) => n).sort();
|
|
10
|
+
if (r.length === 0) {
|
|
11
|
+
t.removeAttribute(u);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
t.setAttribute(u, r.join(" "));
|
|
15
|
+
}
|
|
16
|
+
function f(t) {
|
|
17
|
+
const r = (e.get(t.kind) ?? 0) + 1;
|
|
18
|
+
e.set(t.kind, r), i();
|
|
19
|
+
const n = s({
|
|
20
|
+
cursor: t.cursor,
|
|
21
|
+
...t.lockUserSelect === !1 ? {} : { "user-select": "none" }
|
|
22
|
+
});
|
|
23
|
+
let o = !0;
|
|
24
|
+
return () => {
|
|
25
|
+
if (!o) return;
|
|
26
|
+
o = !1, n();
|
|
27
|
+
const c = e.get(t.kind) ?? 0;
|
|
28
|
+
c <= 1 ? e.delete(t.kind) : e.set(t.kind, c - 1), i();
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
u as FLOE_HOT_INTERACTION_ATTR,
|
|
33
|
+
f as startHotInteraction
|
|
34
|
+
};
|