hoodini-viz 0.1.4 → 0.2.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/{3Dmol-CuZz1vAr.js → 3Dmol-B5x5VLnY.js} +1 -1
- package/dist/{data-grid-overlay-editor-C2F2acq7.js → data-grid-overlay-editor-QTdQ0yuU.js} +20 -18
- package/dist/hoodini-viz.js +11 -10
- package/dist/hoodini-viz.umd.js +1 -1
- package/dist/{index-DoUR8EOn.js → index-MmB2RSTX.js} +26409 -26973
- package/dist/{number-overlay-editor-Do9rKBrK.js → number-overlay-editor-DY1JNtYO.js} +237 -235
- package/package.json +18 -4
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { createPortal as J } from "react-dom";
|
|
3
|
+
import { s as Q, i as I, a as U, b as Z, T as ee, C as te, m as re } from "./index-MmB2RSTX.js";
|
|
4
|
+
const ne = () => (t) => t.targetX, ie = () => (t) => t.targetY, se = () => (t) => t.targetWidth, ae = () => (t) => t.targetHeight, oe = () => (t) => t.targetY + 10, le = () => (t) => Math.max(0, (t.targetHeight - 28) / 2), de = /* @__PURE__ */ Q("div")({
|
|
3
5
|
name: "DataGridOverlayEditorStyle",
|
|
4
6
|
class: "gdg-d19meir1",
|
|
5
7
|
propsAsIs: !1,
|
|
@@ -30,8 +32,8 @@ function ce() {
|
|
|
30
32
|
return;
|
|
31
33
|
let a;
|
|
32
34
|
const o = () => {
|
|
33
|
-
const { right:
|
|
34
|
-
h((
|
|
35
|
+
const { right: O } = t.getBoundingClientRect();
|
|
36
|
+
h((m) => Math.min(m + window.innerWidth - O - 10, 0)), a = requestAnimationFrame(o);
|
|
35
37
|
};
|
|
36
38
|
return a = requestAnimationFrame(o), () => {
|
|
37
39
|
a !== void 0 && cancelAnimationFrame(a);
|
|
@@ -44,17 +46,17 @@ function ce() {
|
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
const ge = (t) => {
|
|
47
|
-
const { target: s, content: i, onFinishEditing: h, forceEditMode: f, initialValue: b, imageEditorOverride: C, markdownDivCreateNode: a, highlight: o, className:
|
|
49
|
+
const { target: s, content: i, onFinishEditing: h, forceEditMode: f, initialValue: b, imageEditorOverride: C, markdownDivCreateNode: a, highlight: o, className: O, theme: m, id: W, cell: g, bloom: w, portalElementRef: F, validateCell: p, getCellRenderer: P, provideEditor: T, isOutsideClick: X, customEventTarget: A, activation: x } = t, [l, K] = r.useState(f ? i : void 0), S = r.useRef(l ?? i);
|
|
48
50
|
S.current = l ?? i;
|
|
49
|
-
const [y,
|
|
51
|
+
const [y, R] = r.useState(() => p === void 0 ? !0 : !(I(i) && p?.(g, i, S.current) === !1)), u = r.useCallback((e, n) => {
|
|
50
52
|
h(y ? e : void 0, n);
|
|
51
53
|
}, [y, h]), Y = r.useCallback((e) => {
|
|
52
54
|
if (p !== void 0 && e !== void 0 && I(e)) {
|
|
53
|
-
const n = p(
|
|
54
|
-
n === !1 ?
|
|
55
|
+
const n = p(g, e, S.current);
|
|
56
|
+
n === !1 ? R(!1) : (typeof n == "object" && (e = n), R(!0));
|
|
55
57
|
}
|
|
56
58
|
K(e);
|
|
57
|
-
}, [
|
|
59
|
+
}, [g, p]), E = r.useRef(!1), c = r.useRef(void 0), j = r.useCallback(() => {
|
|
58
60
|
u(l, [0, 0]), E.current = !0;
|
|
59
61
|
}, [l, u]), L = r.useCallback((e, n) => {
|
|
60
62
|
u(e, n ?? c.current ?? [0, 0]), E.current = !0;
|
|
@@ -65,19 +67,19 @@ const ge = (t) => {
|
|
|
65
67
|
!e.shiftKey ? (e.stopPropagation(), e.preventDefault(), c.current = [0, 1], n = !0) : e.key === "Tab" && (e.stopPropagation(), e.preventDefault(), c.current = [e.shiftKey ? -1 : 1, 0], n = !0), window.setTimeout(() => {
|
|
66
68
|
!E.current && c.current !== void 0 && (u(n ? l : void 0, c.current), E.current = !0);
|
|
67
69
|
}, 0);
|
|
68
|
-
}, [u, l]),
|
|
69
|
-
if (
|
|
70
|
+
}, [u, l]), k = l ?? i, [d, B] = r.useMemo(() => {
|
|
71
|
+
if (U(i))
|
|
70
72
|
return [];
|
|
71
|
-
const e = { ...i, location:
|
|
73
|
+
const e = { ...i, location: g, activation: x }, n = T?.(e);
|
|
72
74
|
return n !== void 0 ? [n, !1] : [P(i)?.provideEditor?.(e), !1];
|
|
73
|
-
}, [
|
|
75
|
+
}, [g, i, P, T, x]), { ref: $, style: z } = ce();
|
|
74
76
|
let M = !0, _, N = !0, v;
|
|
75
77
|
if (d !== void 0) {
|
|
76
78
|
M = d.disablePadding !== !0, N = d.disableStyling !== !0;
|
|
77
|
-
const e =
|
|
79
|
+
const e = Z(d);
|
|
78
80
|
e && (v = d.styleOverride);
|
|
79
81
|
const n = e ? d.editor : d;
|
|
80
|
-
_ = r.createElement(n, { portalElementRef: F, isHighlighted: o, activation:
|
|
82
|
+
_ = r.createElement(n, { portalElementRef: F, isHighlighted: o, activation: x, onChange: Y, value: k, initialValue: b, onFinishedEditing: L, validatedSelection: I(k) ? k.selectionRange : void 0, forceEditMode: f, target: s, imageEditorOverride: C, markdownDivCreateNode: a, isValid: y, theme: m });
|
|
81
83
|
}
|
|
82
84
|
v = { ...v, ...z };
|
|
83
85
|
const V = F?.current ?? document.getElementById("portal");
|
|
@@ -86,12 +88,12 @@ const ge = (t) => {
|
|
|
86
88
|
let D = N ? "gdg-style" : "gdg-unstyle";
|
|
87
89
|
y || (D += " gdg-invalid"), M && (D += " gdg-pad");
|
|
88
90
|
const G = w?.[0] ?? 1, H = w?.[1] ?? 1;
|
|
89
|
-
return
|
|
91
|
+
return J(r.createElement(
|
|
90
92
|
ee.Provider,
|
|
91
|
-
{ value:
|
|
93
|
+
{ value: m },
|
|
92
94
|
r.createElement(
|
|
93
95
|
te,
|
|
94
|
-
{ style: re(
|
|
96
|
+
{ style: re(m), className: O, onClickOutside: j, isOutsideClick: X, customEventTarget: A },
|
|
95
97
|
r.createElement(
|
|
96
98
|
de,
|
|
97
99
|
{ ref: $, id: W, className: D, style: v, as: B === !0 ? "label" : void 0, targetX: s.x - G, targetY: s.y - H, targetWidth: s.width + G * 2, targetHeight: s.height + H * 2 },
|
package/dist/hoodini-viz.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { D as s,
|
|
1
|
+
import { D as s, c as o, F as t, G as i, d as r, H as l, H as d, e as n, P as D, f as P, R as c, h, j as f, k as H, l as R, n as m, o as u } from "./index-MmB2RSTX.js";
|
|
2
|
+
import { default as G } from "react";
|
|
2
3
|
export {
|
|
3
4
|
s as DEFAULT_CONFIG,
|
|
4
5
|
o as Domain,
|
|
5
6
|
t as FORMAT_PRESETS,
|
|
6
7
|
i as Gene,
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
r as GenomeView,
|
|
9
|
+
l as HoodiniDashboard,
|
|
9
10
|
d as HoodiniDashboardDefault,
|
|
10
11
|
n as HoodiniViz,
|
|
11
12
|
D as PhyloNode,
|
|
12
13
|
P as PhyloTree,
|
|
13
|
-
|
|
14
|
+
G as React,
|
|
14
15
|
c as ReactDOM,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
h as create,
|
|
17
|
+
f as createDashboard,
|
|
18
|
+
H as createViz,
|
|
19
|
+
R as getPaletteColors,
|
|
20
|
+
m as getQualitativePalettes,
|
|
21
|
+
u as getSequentialPalettes
|
|
21
22
|
};
|