@floegence/floe-webapp-core 0.36.45 → 0.36.48
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/workbench/WorkbenchCanvas.d.ts +2 -1
- package/dist/components/workbench/WorkbenchCanvas.js +108 -88
- package/dist/components/workbench/WorkbenchCanvasField.d.ts +2 -1
- package/dist/components/workbench/WorkbenchCanvasField.js +40 -34
- package/dist/components/workbench/WorkbenchOverlay.d.ts +1 -1
- package/dist/components/workbench/WorkbenchOverlay.js +9 -6
- package/dist/components/workbench/WorkbenchSurface.d.ts +2 -1
- package/dist/components/workbench/WorkbenchSurface.js +6 -5
- package/dist/components/workbench/WorkbenchWidget.d.ts +2 -1
- package/dist/components/workbench/WorkbenchWidget.js +175 -168
- package/dist/components/workbench/types.d.ts +8 -0
- package/dist/components/workbench/useWorkbenchModel.d.ts +2 -1
- package/dist/components/workbench/useWorkbenchModel.js +325 -312
- package/dist/components/workbench/workbenchMotion.d.ts +3 -0
- package/dist/components/workbench/workbenchMotion.js +60 -0
- package/dist/styles.css +1 -1
- package/dist/workbench.css +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createSignal as m, createEffect as T, onCleanup as g } from "solid-js";
|
|
2
|
+
const h = 140;
|
|
3
|
+
function E(c) {
|
|
4
|
+
return String(c ?? "").trim();
|
|
5
|
+
}
|
|
6
|
+
function M(c) {
|
|
7
|
+
const [f, a] = m({}), n = /* @__PURE__ */ new Map();
|
|
8
|
+
let i = /* @__PURE__ */ new Set(), l = !1;
|
|
9
|
+
const d = (t) => {
|
|
10
|
+
const e = n.get(t);
|
|
11
|
+
e && (globalThis.clearTimeout(e), n.delete(t));
|
|
12
|
+
}, u = (t) => {
|
|
13
|
+
a((e) => {
|
|
14
|
+
if (!e[t])
|
|
15
|
+
return e;
|
|
16
|
+
const r = { ...e };
|
|
17
|
+
return delete r[t], r;
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
return T(() => {
|
|
21
|
+
const t = new Set(
|
|
22
|
+
c().map(E).filter(Boolean)
|
|
23
|
+
);
|
|
24
|
+
if (!l) {
|
|
25
|
+
l = !0, i = t;
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
a((e) => {
|
|
29
|
+
let r = !1;
|
|
30
|
+
const o = { ...e };
|
|
31
|
+
for (const s of Object.keys(e))
|
|
32
|
+
t.has(s) || (d(s), delete o[s], r = !0);
|
|
33
|
+
return r ? o : e;
|
|
34
|
+
});
|
|
35
|
+
for (const e of t) {
|
|
36
|
+
if (i.has(e) || n.has(e))
|
|
37
|
+
continue;
|
|
38
|
+
a((o) => o[e]?.phase === "enter" ? o : {
|
|
39
|
+
...o,
|
|
40
|
+
[e]: {
|
|
41
|
+
widgetId: e,
|
|
42
|
+
phase: "enter",
|
|
43
|
+
reason: "widget_add"
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const r = globalThis.setTimeout(() => {
|
|
47
|
+
n.delete(e), u(e);
|
|
48
|
+
}, h);
|
|
49
|
+
n.set(e, r);
|
|
50
|
+
}
|
|
51
|
+
i = t;
|
|
52
|
+
}), g(() => {
|
|
53
|
+
for (const t of n.values())
|
|
54
|
+
globalThis.clearTimeout(t);
|
|
55
|
+
n.clear();
|
|
56
|
+
}), f;
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
M as createWorkbenchWidgetEnterMotionTracker
|
|
60
|
+
};
|