@yuneta/gobj-ui 7.23.73 → 7.23.74
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 +12 -6
- package/dist/gobj-ui.es.js +12 -6
- package/package.json +1 -1
- package/src/c_yui_treedb_graph.js +14 -2
- package/src/treedb_layout.js +10 -4
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -27370,7 +27370,7 @@ function fold_reveal(model, state, node_key) {
|
|
|
27370
27370
|
/***********************************************************************
|
|
27371
27371
|
* treedb_layout.js
|
|
27372
27372
|
*
|
|
27373
|
-
*
|
|
27373
|
+
* Three layouts made for a treedb, and nothing else.
|
|
27374
27374
|
*
|
|
27375
27375
|
* What a treedb graph IS, once it is folded (treedb_fold_model.js):
|
|
27376
27376
|
* a forest read left to right. A main topic is a tree (places:
|
|
@@ -27394,8 +27394,9 @@ function fold_reveal(model, state, node_key) {
|
|
|
27394
27394
|
* - the force family scatters a tree, which is the pile with
|
|
27395
27395
|
* physics.
|
|
27396
27396
|
*
|
|
27397
|
-
* So: a tidy tree (`tree`)
|
|
27398
|
-
* the SAME spanning tree, chosen
|
|
27397
|
+
* So: a tidy tree (`tree`), an outline (`outline`) and a radial
|
|
27398
|
+
* tree (`radial`), all three fed by the SAME spanning tree, chosen
|
|
27399
|
+
* deterministically:
|
|
27399
27400
|
*
|
|
27400
27401
|
* - roots are the nodes with no incoming edge, in node order;
|
|
27401
27402
|
* - a node belongs to the FIRST parent that reaches it in a
|
|
@@ -27418,8 +27419,13 @@ function fold_reveal(model, state, node_key) {
|
|
|
27418
27419
|
* viewer draws, and what a treedb is when read as one. Tall, but
|
|
27419
27420
|
* nothing is ever beside anything: the reader scrolls a list.
|
|
27420
27421
|
*
|
|
27422
|
+
* `radial`: the root in the middle and a ring per depth, each
|
|
27423
|
+
* subtree owning a sector proportional to its leaves; the radius
|
|
27424
|
+
* of a ring grows until its neighbours sit side by side, so
|
|
27425
|
+
* nothing overlaps by construction (see `layout_radial`).
|
|
27426
|
+
*
|
|
27421
27427
|
* Pure: takes plain nodes and edges, returns positions. The G6
|
|
27422
|
-
* classes in c_g6_nodes_tree.js are
|
|
27428
|
+
* classes in c_g6_nodes_tree.js are three thin adapters over it.
|
|
27423
27429
|
*
|
|
27424
27430
|
* Copyright (c) 2026, ArtGins.
|
|
27425
27431
|
* All Rights Reserved.
|
|
@@ -62175,9 +62181,9 @@ function refresh_legend(gobj) {
|
|
|
62175
62181
|
hidden ? `${entry.total}` : `${entry.visible}/${entry.total}`
|
|
62176
62182
|
]);
|
|
62177
62183
|
let body_attrs = {
|
|
62178
|
-
class: "GRAPH_LEGEND_ITEM button is-small" + (focused ? "
|
|
62184
|
+
class: "GRAPH_LEGEND_ITEM button is-small" + (focused ? " GRAPH_LEGEND_FOCUSED" : "") + (is_main ? " GRAPH_LEGEND_MAIN" : ""),
|
|
62179
62185
|
type: "button",
|
|
62180
|
-
style: "gap:0; flex:0 0 auto;",
|
|
62186
|
+
style: "gap:0; flex:0 0 auto;" + (focused ? " box-shadow: inset 0 0 0 2px var(--bulma-text, #2e333d);" : ""),
|
|
62181
62187
|
title: is_main ? (0, i18next.t)("main topic") : hidden ? (0, i18next.t)("show topic") : (0, i18next.t)("hide topic"),
|
|
62182
62188
|
"aria-label": topic_name,
|
|
62183
62189
|
"aria-pressed": hidden ? "false" : "true"
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -27365,7 +27365,7 @@ function fold_reveal(model, state, node_key) {
|
|
|
27365
27365
|
/***********************************************************************
|
|
27366
27366
|
* treedb_layout.js
|
|
27367
27367
|
*
|
|
27368
|
-
*
|
|
27368
|
+
* Three layouts made for a treedb, and nothing else.
|
|
27369
27369
|
*
|
|
27370
27370
|
* What a treedb graph IS, once it is folded (treedb_fold_model.js):
|
|
27371
27371
|
* a forest read left to right. A main topic is a tree (places:
|
|
@@ -27389,8 +27389,9 @@ function fold_reveal(model, state, node_key) {
|
|
|
27389
27389
|
* - the force family scatters a tree, which is the pile with
|
|
27390
27390
|
* physics.
|
|
27391
27391
|
*
|
|
27392
|
-
* So: a tidy tree (`tree`)
|
|
27393
|
-
* the SAME spanning tree, chosen
|
|
27392
|
+
* So: a tidy tree (`tree`), an outline (`outline`) and a radial
|
|
27393
|
+
* tree (`radial`), all three fed by the SAME spanning tree, chosen
|
|
27394
|
+
* deterministically:
|
|
27394
27395
|
*
|
|
27395
27396
|
* - roots are the nodes with no incoming edge, in node order;
|
|
27396
27397
|
* - a node belongs to the FIRST parent that reaches it in a
|
|
@@ -27413,8 +27414,13 @@ function fold_reveal(model, state, node_key) {
|
|
|
27413
27414
|
* viewer draws, and what a treedb is when read as one. Tall, but
|
|
27414
27415
|
* nothing is ever beside anything: the reader scrolls a list.
|
|
27415
27416
|
*
|
|
27417
|
+
* `radial`: the root in the middle and a ring per depth, each
|
|
27418
|
+
* subtree owning a sector proportional to its leaves; the radius
|
|
27419
|
+
* of a ring grows until its neighbours sit side by side, so
|
|
27420
|
+
* nothing overlaps by construction (see `layout_radial`).
|
|
27421
|
+
*
|
|
27416
27422
|
* Pure: takes plain nodes and edges, returns positions. The G6
|
|
27417
|
-
* classes in c_g6_nodes_tree.js are
|
|
27423
|
+
* classes in c_g6_nodes_tree.js are three thin adapters over it.
|
|
27418
27424
|
*
|
|
27419
27425
|
* Copyright (c) 2026, ArtGins.
|
|
27420
27426
|
* All Rights Reserved.
|
|
@@ -62170,9 +62176,9 @@ function refresh_legend(gobj) {
|
|
|
62170
62176
|
hidden ? `${entry.total}` : `${entry.visible}/${entry.total}`
|
|
62171
62177
|
]);
|
|
62172
62178
|
let body_attrs = {
|
|
62173
|
-
class: "GRAPH_LEGEND_ITEM button is-small" + (focused ? "
|
|
62179
|
+
class: "GRAPH_LEGEND_ITEM button is-small" + (focused ? " GRAPH_LEGEND_FOCUSED" : "") + (is_main ? " GRAPH_LEGEND_MAIN" : ""),
|
|
62174
62180
|
type: "button",
|
|
62175
|
-
style: "gap:0; flex:0 0 auto;",
|
|
62181
|
+
style: "gap:0; flex:0 0 auto;" + (focused ? " box-shadow: inset 0 0 0 2px var(--bulma-text, #2e333d);" : ""),
|
|
62176
62182
|
title: is_main ? t("main topic") : hidden ? t("show topic") : t("hide topic"),
|
|
62177
62183
|
"aria-label": topic_name,
|
|
62178
62184
|
"aria-pressed": hidden ? "false" : "true"
|
package/package.json
CHANGED
|
@@ -2348,6 +2348,18 @@ const LEGEND_GLYPH_STYLE = 'font-size:1.5em; line-height:1; color:inherit;';
|
|
|
2348
2348
|
const LEGEND_NAME_STYLE = 'font-size:1.2em; line-height:1.2;';
|
|
2349
2349
|
const LEGEND_COUNT_STYLE = 'margin-left:.4rem; font-size:1em;';
|
|
2350
2350
|
|
|
2351
|
+
/* The focused chip is HIGHLIGHTED, not pressed. The body of a chip is
|
|
2352
|
+
* the show/hide toggle, and that is what its `aria-pressed` says;
|
|
2353
|
+
* the focus belongs to the crosshair next to it, which is the button
|
|
2354
|
+
* that looks pressed. 7.23.73 painted the body with `pressed_state`
|
|
2355
|
+
* as well, so the eye and the screen reader read two different
|
|
2356
|
+
* states off one button -- and the count, `has-text-grey` by Bulma's
|
|
2357
|
+
* `!important`, sat grey on the near-black at 2.7:1. A ring inside
|
|
2358
|
+
* the border marks the chip without repainting anything in it.
|
|
2359
|
+
* Inset, because a chip lives in a `has-addons` group and a shadow
|
|
2360
|
+
* outside the box is clipped by its neighbours. */
|
|
2361
|
+
const LEGEND_FOCUSED_STYLE = 'box-shadow: inset 0 0 0 2px var(--bulma-text, #2e333d);';
|
|
2362
|
+
|
|
2351
2363
|
function refresh_legend(gobj)
|
|
2352
2364
|
{
|
|
2353
2365
|
let priv = gobj.priv;
|
|
@@ -2412,10 +2424,10 @@ function refresh_legend(gobj)
|
|
|
2412
2424
|
* every chip was dead except its star. */
|
|
2413
2425
|
let body_attrs = {
|
|
2414
2426
|
class: 'GRAPH_LEGEND_ITEM button is-small' +
|
|
2415
|
-
(focused? '
|
|
2427
|
+
(focused? ' GRAPH_LEGEND_FOCUSED' : '') +
|
|
2416
2428
|
(is_main? ' GRAPH_LEGEND_MAIN' : ''),
|
|
2417
2429
|
type: 'button',
|
|
2418
|
-
style: 'gap:0; flex:0 0 auto;',
|
|
2430
|
+
style: 'gap:0; flex:0 0 auto;' + (focused? ' ' + LEGEND_FOCUSED_STYLE : ''),
|
|
2419
2431
|
title: is_main? t('main topic') : (hidden? t('show topic') : t('hide topic')),
|
|
2420
2432
|
'aria-label': topic_name,
|
|
2421
2433
|
'aria-pressed': hidden? 'false' : 'true',
|
package/src/treedb_layout.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* treedb_layout.js
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Three layouts made for a treedb, and nothing else.
|
|
5
5
|
*
|
|
6
6
|
* What a treedb graph IS, once it is folded (treedb_fold_model.js):
|
|
7
7
|
* a forest read left to right. A main topic is a tree (places:
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
* - the force family scatters a tree, which is the pile with
|
|
26
26
|
* physics.
|
|
27
27
|
*
|
|
28
|
-
* So: a tidy tree (`tree`)
|
|
29
|
-
* the SAME spanning tree, chosen
|
|
28
|
+
* So: a tidy tree (`tree`), an outline (`outline`) and a radial
|
|
29
|
+
* tree (`radial`), all three fed by the SAME spanning tree, chosen
|
|
30
|
+
* deterministically:
|
|
30
31
|
*
|
|
31
32
|
* - roots are the nodes with no incoming edge, in node order;
|
|
32
33
|
* - a node belongs to the FIRST parent that reaches it in a
|
|
@@ -49,8 +50,13 @@
|
|
|
49
50
|
* viewer draws, and what a treedb is when read as one. Tall, but
|
|
50
51
|
* nothing is ever beside anything: the reader scrolls a list.
|
|
51
52
|
*
|
|
53
|
+
* `radial`: the root in the middle and a ring per depth, each
|
|
54
|
+
* subtree owning a sector proportional to its leaves; the radius
|
|
55
|
+
* of a ring grows until its neighbours sit side by side, so
|
|
56
|
+
* nothing overlaps by construction (see `layout_radial`).
|
|
57
|
+
*
|
|
52
58
|
* Pure: takes plain nodes and edges, returns positions. The G6
|
|
53
|
-
* classes in c_g6_nodes_tree.js are
|
|
59
|
+
* classes in c_g6_nodes_tree.js are three thin adapters over it.
|
|
54
60
|
*
|
|
55
61
|
* Copyright (c) 2026, ArtGins.
|
|
56
62
|
* All Rights Reserved.
|