@yuneta/gobj-ui 7.23.91 → 7.23.92
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/gobj-ui.cjs.js +10 -5
- package/dist/gobj-ui.es.js +10 -5
- package/package.json +1 -1
- package/src/c_g6_nodes_tree.js +36 -7
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -58981,7 +58981,8 @@ function auto_layout(gobj) {
|
|
|
58981
58981
|
* card is a rectangle anyway.
|
|
58982
58982
|
************************************************************/
|
|
58983
58983
|
function refresh_minimap(gobj) {
|
|
58984
|
-
let
|
|
58984
|
+
let priv = gobj.priv;
|
|
58985
|
+
let graph = priv.graph;
|
|
58985
58986
|
if (!graph) return;
|
|
58986
58987
|
let threshold = (0, _yuneta_gobj_js.gobj_read_integer_attr)(gobj, "minimap_min_nodes");
|
|
58987
58988
|
let n = 0;
|
|
@@ -59004,12 +59005,12 @@ function refresh_minimap(gobj) {
|
|
|
59004
59005
|
bottom: "12px",
|
|
59005
59006
|
left: "12px",
|
|
59006
59007
|
background: "var(--bulma-scheme-main, #fff)",
|
|
59007
|
-
border: "1px solid var(--bulma-
|
|
59008
|
+
border: "1px solid var(--bulma-text-weak, #94a3b8)",
|
|
59008
59009
|
borderRadius: "6px",
|
|
59009
59010
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
|
|
59010
59011
|
},
|
|
59011
59012
|
maskStyle: {
|
|
59012
|
-
border: "2px solid var(--bulma-link, #3b82f6)",
|
|
59013
|
+
border: "2px solid var(--bulma-link-on-scheme, var(--bulma-link, #3b82f6))",
|
|
59013
59014
|
background: "rgba(59, 130, 246, 0.12)"
|
|
59014
59015
|
},
|
|
59015
59016
|
shape: (id, element_type, element) => {
|
|
@@ -59017,8 +59018,8 @@ function refresh_minimap(gobj) {
|
|
|
59017
59018
|
try {
|
|
59018
59019
|
let nd = graph.getNodeData(id);
|
|
59019
59020
|
let size = nd && nd.style && nd.style.size || [120, 60];
|
|
59020
|
-
let color = nd && nd.data && nd.data.desc && nd.data.desc.color || "#94a3b8";
|
|
59021
|
-
if (is_more_node(nd)) color = "rgba(148, 163, 184, 0.
|
|
59021
|
+
let color = port_rim(nd && nd.data && nd.data.desc && nd.data.desc.color || "#94a3b8", priv.theme);
|
|
59022
|
+
if (is_more_node(nd)) color = priv.theme === "dark" ? "rgba(148, 163, 184, 0.60)" : "rgba(71, 85, 105, 0.65)";
|
|
59022
59023
|
return new Rect({ style: {
|
|
59023
59024
|
x: -size[0] / 2,
|
|
59024
59025
|
y: -size[1] / 2,
|
|
@@ -60863,6 +60864,10 @@ function ac_theme$1(gobj, event, kw, src) {
|
|
|
60863
60864
|
refresh_default_edges_theme(gobj, theme);
|
|
60864
60865
|
refresh_port_rims(gobj, theme);
|
|
60865
60866
|
repaint_more_chips(gobj);
|
|
60867
|
+
if (graph_get_plugin(gobj, "minimap")) {
|
|
60868
|
+
graph_remove_plugin(gobj, "minimap");
|
|
60869
|
+
refresh_minimap(gobj);
|
|
60870
|
+
}
|
|
60866
60871
|
graph_draw(gobj).then(() => {
|
|
60867
60872
|
update_history_buttons(gobj);
|
|
60868
60873
|
});
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -58976,7 +58976,8 @@ function auto_layout(gobj) {
|
|
|
58976
58976
|
* card is a rectangle anyway.
|
|
58977
58977
|
************************************************************/
|
|
58978
58978
|
function refresh_minimap(gobj) {
|
|
58979
|
-
let
|
|
58979
|
+
let priv = gobj.priv;
|
|
58980
|
+
let graph = priv.graph;
|
|
58980
58981
|
if (!graph) return;
|
|
58981
58982
|
let threshold = gobj_read_integer_attr(gobj, "minimap_min_nodes");
|
|
58982
58983
|
let n = 0;
|
|
@@ -58999,12 +59000,12 @@ function refresh_minimap(gobj) {
|
|
|
58999
59000
|
bottom: "12px",
|
|
59000
59001
|
left: "12px",
|
|
59001
59002
|
background: "var(--bulma-scheme-main, #fff)",
|
|
59002
|
-
border: "1px solid var(--bulma-
|
|
59003
|
+
border: "1px solid var(--bulma-text-weak, #94a3b8)",
|
|
59003
59004
|
borderRadius: "6px",
|
|
59004
59005
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
|
|
59005
59006
|
},
|
|
59006
59007
|
maskStyle: {
|
|
59007
|
-
border: "2px solid var(--bulma-link, #3b82f6)",
|
|
59008
|
+
border: "2px solid var(--bulma-link-on-scheme, var(--bulma-link, #3b82f6))",
|
|
59008
59009
|
background: "rgba(59, 130, 246, 0.12)"
|
|
59009
59010
|
},
|
|
59010
59011
|
shape: (id, element_type, element) => {
|
|
@@ -59012,8 +59013,8 @@ function refresh_minimap(gobj) {
|
|
|
59012
59013
|
try {
|
|
59013
59014
|
let nd = graph.getNodeData(id);
|
|
59014
59015
|
let size = nd && nd.style && nd.style.size || [120, 60];
|
|
59015
|
-
let color = nd && nd.data && nd.data.desc && nd.data.desc.color || "#94a3b8";
|
|
59016
|
-
if (is_more_node(nd)) color = "rgba(148, 163, 184, 0.
|
|
59016
|
+
let color = port_rim(nd && nd.data && nd.data.desc && nd.data.desc.color || "#94a3b8", priv.theme);
|
|
59017
|
+
if (is_more_node(nd)) color = priv.theme === "dark" ? "rgba(148, 163, 184, 0.60)" : "rgba(71, 85, 105, 0.65)";
|
|
59017
59018
|
return new Rect({ style: {
|
|
59018
59019
|
x: -size[0] / 2,
|
|
59019
59020
|
y: -size[1] / 2,
|
|
@@ -60858,6 +60859,10 @@ function ac_theme$1(gobj, event, kw, src) {
|
|
|
60858
60859
|
refresh_default_edges_theme(gobj, theme);
|
|
60859
60860
|
refresh_port_rims(gobj, theme);
|
|
60860
60861
|
repaint_more_chips(gobj);
|
|
60862
|
+
if (graph_get_plugin(gobj, "minimap")) {
|
|
60863
|
+
graph_remove_plugin(gobj, "minimap");
|
|
60864
|
+
refresh_minimap(gobj);
|
|
60865
|
+
}
|
|
60861
60866
|
graph_draw(gobj).then(() => {
|
|
60862
60867
|
update_history_buttons(gobj);
|
|
60863
60868
|
});
|
package/package.json
CHANGED
package/src/c_g6_nodes_tree.js
CHANGED
|
@@ -6985,7 +6985,16 @@ function refresh_minimap(gobj)
|
|
|
6985
6985
|
bottom: "12px",
|
|
6986
6986
|
left: "12px",
|
|
6987
6987
|
background: "var(--bulma-scheme-main, #fff)",
|
|
6988
|
-
|
|
6988
|
+
/* A mid grey and not a `--bulma-border-*` token: those
|
|
6989
|
+
* are made for a line INSIDE a surface, and this one has
|
|
6990
|
+
* to separate a floating panel from the CANVAS behind
|
|
6991
|
+
* it -- which is near-black in one scheme and white in
|
|
6992
|
+
* the other. `border-weak` was 1.43:1 over the dark
|
|
6993
|
+
* canvas and 1.18 over the light one; every border token
|
|
6994
|
+
* fails at least one of them. This one is 4.6 on both.
|
|
6995
|
+
* (The box-shadow below separates it only where there
|
|
6996
|
+
* is light to cast a shadow on.) */
|
|
6997
|
+
border: "1px solid var(--bulma-text-weak, #94a3b8)",
|
|
6989
6998
|
borderRadius: "6px",
|
|
6990
6999
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)",
|
|
6991
7000
|
},
|
|
@@ -6993,7 +7002,7 @@ function refresh_minimap(gobj)
|
|
|
6993
7002
|
* invisible over a dark minimap. A link-coloured outline
|
|
6994
7003
|
* reads on both. */
|
|
6995
7004
|
maskStyle: {
|
|
6996
|
-
border: "2px solid var(--bulma-link, #3b82f6)",
|
|
7005
|
+
border: "2px solid var(--bulma-link-on-scheme, var(--bulma-link, #3b82f6))",
|
|
6997
7006
|
background: "rgba(59, 130, 246, 0.12)",
|
|
6998
7007
|
},
|
|
6999
7008
|
shape: (id, element_type, element) => {
|
|
@@ -7003,12 +7012,24 @@ function refresh_minimap(gobj)
|
|
|
7003
7012
|
try {
|
|
7004
7013
|
let nd = graph.getNodeData(id);
|
|
7005
7014
|
let size = (nd && nd.style && nd.style.size) || [120, 60];
|
|
7006
|
-
|
|
7007
|
-
|
|
7015
|
+
/* The topic's colour PUSHED TOWARDS THE SURFACE, the
|
|
7016
|
+
* same treatment a port's rim takes: a block here is
|
|
7017
|
+
* the topic colour on the panel's own background, and
|
|
7018
|
+
* on the light scheme the palette's yellow was 1.61:1
|
|
7019
|
+
* on white -- a minimap whose content could not be
|
|
7020
|
+
* told from its paper. 3.80 in light, 9.11 in dark. */
|
|
7021
|
+
let color = port_rim(
|
|
7022
|
+
(nd && nd.data && nd.data.desc && nd.data.desc.color) || "#94a3b8",
|
|
7023
|
+
priv.theme
|
|
7024
|
+
);
|
|
7008
7025
|
if(is_more_node(nd)) {
|
|
7009
|
-
/* A `+N` chip is a cut, not a card: a
|
|
7010
|
-
*
|
|
7011
|
-
|
|
7026
|
+
/* A `+N` chip is a cut, not a card: quieter than a
|
|
7027
|
+
* block, and still visible. The slate had to become
|
|
7028
|
+
* a DARK slate on a white panel -- raising the alpha
|
|
7029
|
+
* of the light one only ever reached 1.86. */
|
|
7030
|
+
color = (priv.theme === "dark")
|
|
7031
|
+
? "rgba(148, 163, 184, 0.60)" /* 3.35:1 */
|
|
7032
|
+
: "rgba(71, 85, 105, 0.65)"; /* 3.19:1 */
|
|
7012
7033
|
}
|
|
7013
7034
|
return new RectGeometry({
|
|
7014
7035
|
style: {
|
|
@@ -9809,6 +9830,14 @@ function ac_theme(gobj, event, kw, src)
|
|
|
9809
9830
|
refresh_port_rims(gobj, theme);
|
|
9810
9831
|
repaint_more_chips(gobj);
|
|
9811
9832
|
|
|
9833
|
+
/* The minimap paints its blocks from the theme (see its `shape`),
|
|
9834
|
+
* and it is created ONCE: rebuilt, or it keeps the colours of the
|
|
9835
|
+
* scheme it was born in. */
|
|
9836
|
+
if(graph_get_plugin(gobj, "minimap")) {
|
|
9837
|
+
graph_remove_plugin(gobj, "minimap");
|
|
9838
|
+
refresh_minimap(gobj);
|
|
9839
|
+
}
|
|
9840
|
+
|
|
9812
9841
|
graph_draw(gobj).then(() => {
|
|
9813
9842
|
// Restore toolbar icon states lost when G6 re-renders the DOM
|
|
9814
9843
|
update_history_buttons(gobj);
|