@yuneta/gobj-ui 7.23.86 → 7.23.88

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/README.md CHANGED
@@ -850,12 +850,16 @@ both keys, either — a G6 `trigger` is a CHORD, not a list of alternatives:
850
850
  `Shortcut.match()` compares the keys held to the keys bound as a SET, so
851
851
  `['Control', 'Meta']` would mean both at once.
852
852
 
853
- **One glyph size for the whole row** (`7.23.86`): `YUI_GRAPH_ICON_SIZE` in
854
- `yui_graph_camera.js`, with a `yui_graph_icon()` that builds the `<i>`. It is
855
- in **`rem` and not `em`** for a reason worth keeping: in `em` the same
856
- `1.5em` drew 24px inside a plain button, 18px inside an `is-small` chip of
857
- the legend, and a labelled button left its icon at the inherited 16px — three
858
- sizes in two strips that are read as one thing. The legend under the toolbar
853
+ **One glyph size for every toolbar of the library** (`7.23.86`, moved to its
854
+ proper home in `7.23.87`): `YUI_TOOLBAR_ICON_SIZE` in `yui_toolbar.js`, with a
855
+ `yui_toolbar_icon()` that builds the `<i>`. It is in **`rem` and not `em`**
856
+ for a reason worth keeping: in `em` the same `1.5em` drew 24px inside a plain
857
+ button, 18px inside an `is-small` chip of the legend, and a labelled button
858
+ left its icon at the inherited 16px — three sizes in two strips that are read
859
+ as one thing. It is the toolbar's size and not the graph's: the JSON viewer,
860
+ the treedb topics row and the treedb table row take it too. The app BAR keeps
861
+ its own, bigger glyph (`.yui-toolbar-item .icon`, 1.35rem on 44px items) —
862
+ that is a different band, not drift. The legend under the toolbar
859
863
  follows it: topic name at `1rem`, count at `.875rem` (the one deliberate step
860
864
  down), glyphs at the shared size, and `align-items: stretch` so a chip's star
861
865
  and crosshair are as tall as its body.
@@ -1525,6 +1529,16 @@ forwards them as `EV_SET_HIDDEN_TOPICS`, `EV_SET_MAIN_TOPIC`,
1525
1529
  `main topic`, `highlight topic`, `loose records`, `hidden topics`; `legend`
1526
1530
  is no longer used.
1527
1531
 
1532
+ **The main topic's chip is not a disabled button** (`7.23.88`): it cannot be
1533
+ hidden, so its body is a `div` wearing the `.button` skin — bold, at full
1534
+ strength, with a gold star — and not a toggle painted at Bulma's half
1535
+ opacity, which is what made the trunk of the tree the weakest chip of the
1536
+ strip. The star takes `--bulma-warning-on-scheme` and not `--bulma-warning`:
1537
+ the raw brand gold is 1.75:1 on a light ground. The count dropped
1538
+ `has-text-grey` (3.86:1 in dark) for the chip's own colour at 80%, and the
1539
+ chips dropped `is-small`: the strip scrolls sideways, so it never had to fit
1540
+ a chip per topic on one row.
1541
+
1528
1542
  **The strip is repainted on a language change** (`7.23.84`): its chips are
1529
1543
  drawn on `EV_LEGEND_STATE`, which arrives after a reconcile and not when the
1530
1544
  language changes, and a chip's title says an ACTION that depends on the
@@ -10298,6 +10298,35 @@ function register_c_yui_uplot() {
10298
10298
  }
10299
10299
  //#endregion
10300
10300
  //#region src/yui_toolbar.js
10301
+ /************************************************************
10302
+ * ONE size for every glyph of a view's toolbar, in `rem`.
10303
+ *
10304
+ * It lives here because it belongs to the TOOLBAR and not to
10305
+ * any one view: it was born in the graph rows (7.23.86) and the
10306
+ * JSON viewer beside them still drew 16px, which is the same
10307
+ * drift one level up.
10308
+ *
10309
+ * `rem` and not `em` is the whole lesson: `em` is measured
10310
+ * against the button, so one declaration draws three icons --
10311
+ * `1.5em` is 24px in a plain button, 18px in an `is-small`
10312
+ * chip, and a labelled button that declares nothing keeps the
10313
+ * inherited 16px. `rem` is measured against the page, so a
10314
+ * chip deliberately shorter than a button still carries the
10315
+ * same glyph.
10316
+ *
10317
+ * 20px against a row's 16px text: an icon-only button is
10318
+ * legible at half its 40px height, and beside a label the
10319
+ * glyph reads as a marker rather than as a second word. The
10320
+ * app BAR is a different band and keeps its own, bigger size
10321
+ * (`.yui-toolbar-item .icon`, 1.35rem on 44px items).
10322
+ ************************************************************/
10323
+ var YUI_TOOLBAR_ICON_SIZE = "1.25rem";
10324
+ function yui_toolbar_icon(icon_class, extra_style) {
10325
+ return ["i", {
10326
+ class: icon_class,
10327
+ style: `font-size:${YUI_TOOLBAR_ICON_SIZE}; line-height:1; color:inherit;` + (extra_style || "")
10328
+ }];
10329
+ }
10301
10330
  function yui_toolbar(attrs = {}, items = []) {
10302
10331
  function arrow_button(side, icon, label) {
10303
10332
  return [
@@ -10560,30 +10589,6 @@ function getPointPosition(count, index, margin = .2) {
10560
10589
  * All Rights Reserved.
10561
10590
  ***********************************************************************/
10562
10591
  /************************************************************
10563
- * ONE size for every glyph of a graph's toolbar ROW, in
10564
- * `rem` and not `em`.
10565
- *
10566
- * In `em` the same declaration draws three different icons:
10567
- * `1.5em` is 24px inside a plain button, 18px inside an
10568
- * `is-small` one, and a labelled button left its icon at the
10569
- * inherited 16px -- so one row held 16px, 18px and 24px
10570
- * glyphs and looked like three toolbars pushed together.
10571
- * `rem` is measured against the page, so a chip that is
10572
- * deliberately shorter than a button still carries the same
10573
- * glyph.
10574
- *
10575
- * 20px against the row's 16px text: an icon-only button is
10576
- * legible at half its 40px height, and beside a label the
10577
- * glyph reads as a marker rather than as a second word.
10578
- ************************************************************/
10579
- var YUI_GRAPH_ICON_SIZE = "1.25rem";
10580
- function yui_graph_icon(icon_class, extra_style) {
10581
- return ["i", {
10582
- class: icon_class,
10583
- style: `font-size:${YUI_GRAPH_ICON_SIZE}; line-height:1; color:inherit;` + (extra_style || "")
10584
- }];
10585
- }
10586
- /************************************************************
10587
10592
  * One icon button that fires `event_name`.
10588
10593
  ************************************************************/
10589
10594
  function camera_button(gobj, icon, event_name, label_key, wide, extra_style) {
@@ -10601,7 +10606,7 @@ function camera_button(gobj, icon, event_name, label_key, wide, extra_style) {
10601
10606
  "aria-label": (0, i18next.t)(label_key),
10602
10607
  "data-i18n-aria-label": label_key
10603
10608
  },
10604
- yui_graph_icon(icon, extra_style),
10609
+ yui_toolbar_icon(icon, extra_style),
10605
10610
  { click: (evt) => {
10606
10611
  evt.stopPropagation();
10607
10612
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, event_name, { evt }, gobj);
@@ -11391,7 +11396,7 @@ var attrs_table$13 = [
11391
11396
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_JSON, "json_data", 0, null, "JSON data to visualize"),
11392
11397
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "Container element"),
11393
11398
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "canvas_id", 0, "", "Canvas ID"),
11394
- (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "wide", 0, "36px", "Height of header"),
11399
+ (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "wide", 0, "40px", "Height of header. 40px and not 36: it is what an untouched Bulma control measures, so the find box stood 4px taller than every button beside it, and it is what the third graph of the family (C_YUI_TREEDB_GRAPH) uses"),
11395
11400
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "layout", 0, "json-tree", "Layout key (see LAYOUTS)"),
11396
11401
  (0, _yuneta_gobj_js.SDATA_END)()
11397
11402
  ];
@@ -11694,7 +11699,7 @@ function make_toolbar$5(gobj) {
11694
11699
  [$find_input, [
11695
11700
  "span",
11696
11701
  { class: "icon is-left" },
11697
- [yui_graph_icon("yi-magnifying-glass")]
11702
+ [yui_toolbar_icon("yi-magnifying-glass")]
11698
11703
  ]]
11699
11704
  ]);
11700
11705
  attach_clear($find_control, $find_input);
@@ -11728,19 +11733,23 @@ function make_toolbar$5(gobj) {
11728
11733
  ];
11729
11734
  });
11730
11735
  let right_items = [(0, _yuneta_gobj_js.createElement2)([
11731
- "select",
11736
+ "div",
11732
11737
  {
11733
- class: "JSON_GRAPH_LAYOUT select",
11734
- style: {
11735
- height: toolbar_wide,
11736
- "margin-left": "0.5em"
11737
- },
11738
- title: (0, i18next.t)("layout"),
11739
- "data-i18n-title": "layout",
11740
- "aria-label": (0, i18next.t)("layout"),
11741
- "data-i18n-aria-label": "layout"
11738
+ class: "select",
11739
+ style: { "margin-left": "0.5em" }
11742
11740
  },
11743
- options,
11741
+ [[
11742
+ "select",
11743
+ {
11744
+ class: "JSON_GRAPH_LAYOUT",
11745
+ style: { height: toolbar_wide },
11746
+ title: (0, i18next.t)("layout"),
11747
+ "data-i18n-title": "layout",
11748
+ "aria-label": (0, i18next.t)("layout"),
11749
+ "data-i18n-aria-label": "layout"
11750
+ },
11751
+ options
11752
+ ]],
11744
11753
  { change: (evt) => {
11745
11754
  evt.stopPropagation();
11746
11755
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_CHANGE_LAYOUT", { layout: evt.target.value }, gobj);
@@ -13220,7 +13229,7 @@ function make_toolbar$4(gobj) {
13220
13229
  [$search_input, [
13221
13230
  "span",
13222
13231
  { class: "icon is-left" },
13223
- [["i", { class: "yi-magnifying-glass" }]]
13232
+ [yui_toolbar_icon("yi-magnifying-glass")]
13224
13233
  ]]
13225
13234
  ]);
13226
13235
  left_items.push(icon_button$1(gobj, "yi-chevron-right", "EV_EXPAND_ALL", "expand loaded"), icon_button$1(gobj, "yi-chevron-right", "EV_COLLAPSE_ALL", "collapse all"));
@@ -13270,7 +13279,7 @@ function icon_button$1(gobj, icon, event_name, label_key) {
13270
13279
  [[
13271
13280
  "span",
13272
13281
  { class: "icon" },
13273
- [["i", { class: icon }]]
13282
+ [yui_toolbar_icon(icon)]
13274
13283
  ]],
13275
13284
  { click: function(evt) {
13276
13285
  evt.stopPropagation();
@@ -13307,7 +13316,7 @@ function view_mode_switch$1(gobj) {
13307
13316
  [[
13308
13317
  "span",
13309
13318
  { class: "icon" },
13310
- [["i", { class: v.icon }]]
13319
+ [yui_toolbar_icon(v.icon)]
13311
13320
  ]],
13312
13321
  { click: function(evt) {
13313
13322
  evt.stopPropagation();
@@ -17483,7 +17492,7 @@ var attrs_table$9 = [
17483
17492
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
17484
17493
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_POINTER, "$container", 0, null, "Container element"),
17485
17494
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "canvas_id", 0, "", "Canvas ID"),
17486
- (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "wide", 0, "36px", "Height of header"),
17495
+ (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "wide", 0, "40px", "Height of header. 40px and not 36: it is what an untouched Bulma control measures, so the find box stood 4px taller than every button beside it, and it is what the third graph of the family (C_YUI_TREEDB_GRAPH) uses"),
17487
17496
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_STRING, "layout", 0, "vertical-compact", "Current layout key"),
17488
17497
  (0, _yuneta_gobj_js.SDATA)(_yuneta_gobj_js.data_type_t.DTP_INTEGER, "collapse_threshold", 0, 10, "Auto-collapse a node whose direct children exceed this number. 0 disables auto-collapse."),
17489
17498
  (0, _yuneta_gobj_js.SDATA_END)()
@@ -18136,7 +18145,7 @@ function make_find_items(gobj) {
18136
18145
  [$find_input, [
18137
18146
  "span",
18138
18147
  { class: "icon is-left" },
18139
- [yui_graph_icon("yi-magnifying-glass")]
18148
+ [yui_toolbar_icon("yi-magnifying-glass")]
18140
18149
  ]]
18141
18150
  ]);
18142
18151
  attach_clear($find_control, $find_input);
@@ -18206,24 +18215,31 @@ function make_toolbar$1(gobj) {
18206
18215
  LAYOUTS[key].label
18207
18216
  ]);
18208
18217
  }
18209
- let $select = (0, _yuneta_gobj_js.createElement2)([
18210
- "select",
18218
+ let $wrap = (0, _yuneta_gobj_js.createElement2)([
18219
+ "div",
18211
18220
  {
18212
18221
  class: "select",
18213
- style: {
18214
- height: toolbar_wide,
18215
- "margin-left": "0.5em"
18216
- },
18217
- title: (0, i18next.t)("layout")
18222
+ style: { "margin-left": "0.5em" }
18218
18223
  },
18219
- options,
18224
+ [[
18225
+ "select",
18226
+ {
18227
+ class: "GOBJ_TREE_LAYOUT",
18228
+ style: { height: toolbar_wide },
18229
+ title: (0, i18next.t)("layout"),
18230
+ "data-i18n-title": "layout",
18231
+ "aria-label": (0, i18next.t)("layout"),
18232
+ "data-i18n-aria-label": "layout"
18233
+ },
18234
+ options
18235
+ ]],
18220
18236
  { change: (evt) => {
18221
18237
  let value = evt.target.value;
18222
18238
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_CHANGE_LAYOUT", { layout: value }, gobj);
18223
18239
  } }
18224
18240
  ]);
18225
- priv.$layout_select = $select;
18226
- right_items.push($select);
18241
+ priv.$layout_select = $wrap.querySelector("select");
18242
+ right_items.push($wrap);
18227
18243
  const $toolbar = yui_toolbar({}, [
18228
18244
  [
18229
18245
  "div",
@@ -21373,7 +21389,7 @@ function build_ui$6(gobj) {
21373
21389
  [[
21374
21390
  "span",
21375
21391
  { class: "icon" },
21376
- [["i", { class: "yi-arrow-left" }]]
21392
+ [yui_toolbar_icon("yi-arrow-left")]
21377
21393
  ], [
21378
21394
  "span",
21379
21395
  { i18n: "topics" },
@@ -21396,7 +21412,7 @@ function build_ui$6(gobj) {
21396
21412
  [[
21397
21413
  "span",
21398
21414
  { class: "icon" },
21399
- [["i", { class: "yi-hexagon-nodes" }]]
21415
+ [yui_toolbar_icon("yi-hexagon-nodes")]
21400
21416
  ], [
21401
21417
  "span",
21402
21418
  { i18n: "schema" },
@@ -21417,7 +21433,7 @@ function build_ui$6(gobj) {
21417
21433
  [[
21418
21434
  "span",
21419
21435
  { class: "icon" },
21420
- [["i", { class: "yi-cloudversify" }]]
21436
+ [yui_toolbar_icon("yi-cloudversify")]
21421
21437
  ], [
21422
21438
  "span",
21423
21439
  { class: "TREEDB_TOPICS_SOURCE_URL" },
@@ -21437,7 +21453,7 @@ function build_ui$6(gobj) {
21437
21453
  [[
21438
21454
  "span",
21439
21455
  { class: "icon" },
21440
- [["i", { class: "yi-eye" }]]
21456
+ [yui_toolbar_icon("yi-eye")]
21441
21457
  ], [
21442
21458
  "span",
21443
21459
  { i18n: "raw json" },
@@ -24057,7 +24073,7 @@ function build_ui$5(gobj) {
24057
24073
  id: ``,
24058
24074
  class: "button button-edit-record mr-1"
24059
24075
  },
24060
- [["i", { class: "yi-pen" }], [
24076
+ [yui_toolbar_icon("yi-pen"), [
24061
24077
  "span",
24062
24078
  {
24063
24079
  class: "is-hidden-mobile",
@@ -24080,7 +24096,7 @@ function build_ui$5(gobj) {
24080
24096
  class: "button button-new-record mr-1",
24081
24097
  disabled: true
24082
24098
  },
24083
- [["i", { class: "yi-plus" }], [
24099
+ [yui_toolbar_icon("yi-plus"), [
24084
24100
  "span",
24085
24101
  {
24086
24102
  class: "is-hidden-mobile",
@@ -24104,7 +24120,7 @@ function build_ui$5(gobj) {
24104
24120
  class: "button button-delete-record mr-1",
24105
24121
  disabled: true
24106
24122
  },
24107
- [["i", { class: "yi-trash" }], [
24123
+ [yui_toolbar_icon("yi-trash"), [
24108
24124
  "span",
24109
24125
  {
24110
24126
  class: "is-hidden-mobile",
@@ -24128,7 +24144,7 @@ function build_ui$5(gobj) {
24128
24144
  class: "button button-copy-record mr-1",
24129
24145
  disabled: true
24130
24146
  },
24131
- [["i", { class: "yi-copy" }], [
24147
+ [yui_toolbar_icon("yi-copy"), [
24132
24148
  "span",
24133
24149
  {
24134
24150
  class: "is-hidden-mobile",
@@ -24152,7 +24168,7 @@ function build_ui$5(gobj) {
24152
24168
  class: "button button-paste-record mr-1",
24153
24169
  disabled: true
24154
24170
  },
24155
- [["i", { class: "yi-paste" }], [
24171
+ [yui_toolbar_icon("yi-paste"), [
24156
24172
  "span",
24157
24173
  {
24158
24174
  class: "is-hidden-mobile",
@@ -24193,7 +24209,7 @@ function build_ui$5(gobj) {
24193
24209
  }], [
24194
24210
  "span",
24195
24211
  { class: "icon is-left" },
24196
- [["i", { class: "yi-magnifying-glass" }]]
24212
+ [yui_toolbar_icon("yi-magnifying-glass")]
24197
24213
  ]]
24198
24214
  ]);
24199
24215
  let $search_input = $search_box.querySelector(`#${search_id}`);
@@ -24211,7 +24227,7 @@ function build_ui$5(gobj) {
24211
24227
  title: (0, i18next.t)("refresh"),
24212
24228
  "data-i18n-title": "refresh"
24213
24229
  },
24214
- [["i", { class: "yi-arrows-rotate" }], [
24230
+ [yui_toolbar_icon("yi-arrows-rotate"), [
24215
24231
  "span",
24216
24232
  {
24217
24233
  class: "is-hidden-mobile",
@@ -24237,7 +24253,7 @@ function build_ui$5(gobj) {
24237
24253
  "aria-label": (0, i18next.t)("schema"),
24238
24254
  "data-i18n-aria-label": "schema"
24239
24255
  },
24240
- [["i", { class: "yi-hexagon-nodes" }], [
24256
+ [yui_toolbar_icon("yi-hexagon-nodes"), [
24241
24257
  "span",
24242
24258
  {
24243
24259
  class: "is-hidden-mobile",
@@ -24263,7 +24279,7 @@ function build_ui$5(gobj) {
24263
24279
  "aria-label": (0, i18next.t)("columns"),
24264
24280
  "data-i18n-aria-label": "columns"
24265
24281
  },
24266
- [["i", { class: "yi-table" }], [
24282
+ [yui_toolbar_icon("yi-table"), [
24267
24283
  "span",
24268
24284
  {
24269
24285
  class: "is-hidden-mobile",
@@ -24289,7 +24305,7 @@ function build_ui$5(gobj) {
24289
24305
  "aria-label": (0, i18next.t)("export"),
24290
24306
  "data-i18n-aria-label": "export"
24291
24307
  },
24292
- [["i", { class: "yi-download" }], [
24308
+ [yui_toolbar_icon("yi-download"), [
24293
24309
  "span",
24294
24310
  {
24295
24311
  class: "is-hidden-mobile",
@@ -61944,7 +61960,7 @@ function build_ui$3(gobj) {
61944
61960
  "div",
61945
61961
  {
61946
61962
  class: "GRAPH_LEGEND is-flex-grow-0",
61947
- style: "display:flex; flex-wrap:nowrap; align-items:center; gap:.35rem; padding:.3rem .5rem; overflow-x:auto; min-height:2.2rem;"
61963
+ style: "display:flex; flex-wrap:nowrap; align-items:center; gap:.35rem; padding:.3rem .5rem; overflow-x:auto; min-height:2.9rem;"
61948
61964
  },
61949
61965
  []
61950
61966
  ],
@@ -62103,7 +62119,7 @@ function node_shape_items(gobj, wide) {
62103
62119
  "data-i18n-aria-label": key,
62104
62120
  "aria-pressed": "false"
62105
62121
  },
62106
- yui_graph_icon(NODE_MODE_ICONS[mode]),
62122
+ yui_toolbar_icon(NODE_MODE_ICONS[mode]),
62107
62123
  { click: (evt) => {
62108
62124
  evt.stopPropagation();
62109
62125
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SET_NODE_MODE", { node_mode: mode }, gobj);
@@ -62125,7 +62141,7 @@ function node_shape_items(gobj, wide) {
62125
62141
  "data-i18n-aria-label": "node labels",
62126
62142
  "aria-pressed": "false"
62127
62143
  },
62128
- yui_graph_icon("yi-font"),
62144
+ yui_toolbar_icon("yi-font"),
62129
62145
  { click: (evt) => {
62130
62146
  evt.stopPropagation();
62131
62147
  (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_TOGGLE_NODE_LABELS", {}, gobj);
@@ -62219,7 +62235,7 @@ function make_toolbar(gobj) {
62219
62235
  [
62220
62236
  "button",
62221
62237
  { class: "GRAPH_REFRESH button" },
62222
- [yui_graph_icon("yi-arrows-rotate"), [
62238
+ [yui_toolbar_icon("yi-arrows-rotate"), [
62223
62239
  "span",
62224
62240
  {
62225
62241
  class: "is-hidden-mobile",
@@ -62244,7 +62260,7 @@ function make_toolbar(gobj) {
62244
62260
  "data-i18n-title": "raw json",
62245
62261
  "data-i18n-aria-label": "raw json"
62246
62262
  },
62247
- [yui_graph_icon("yi-eye"), [
62263
+ [yui_toolbar_icon("yi-eye"), [
62248
62264
  "span",
62249
62265
  {
62250
62266
  class: "is-hidden-mobile",
@@ -62289,7 +62305,7 @@ function make_toolbar(gobj) {
62289
62305
  [$find_input, [
62290
62306
  "span",
62291
62307
  { class: "icon is-left" },
62292
- [yui_graph_icon("yi-magnifying-glass")]
62308
+ [yui_toolbar_icon("yi-magnifying-glass")]
62293
62309
  ]]
62294
62310
  ]);
62295
62311
  attach_clear($find_control, $find_input);
@@ -63258,9 +63274,11 @@ function ac_set_operation_mode(gobj, event, kw, src) {
63258
63274
  * card's graph icon travels — as EV_TOPIC_SELECTED, which the host turns
63259
63275
  * into the URL, so what you are looking at stays linkable.
63260
63276
  ************************************************************/
63261
- var LEGEND_GLYPH_STYLE = `font-size:${YUI_GRAPH_ICON_SIZE}; line-height:1; color:inherit;`;
63277
+ var LEGEND_GLYPH_STYLE = `font-size:${YUI_TOOLBAR_ICON_SIZE}; line-height:1; color:inherit;`;
63262
63278
  var LEGEND_NAME_STYLE = "font-size:1rem; line-height:1.2;";
63263
- var LEGEND_COUNT_STYLE = "margin-left:.4rem; font-size:.875rem;";
63279
+ var LEGEND_COUNT_STYLE = "margin-left:.4rem; font-size:.875rem; opacity:.8;";
63280
+ var LEGEND_MAIN_NAME_STYLE = "font-size:1rem; line-height:1.2; font-weight:700;";
63281
+ var LEGEND_STAR_MAIN_STYLE = LEGEND_GLYPH_STYLE + " color:var(--bulma-warning-on-scheme, var(--bulma-warning, #ffdd57));";
63264
63282
  function refresh_legend(gobj) {
63265
63283
  let priv = gobj.priv;
63266
63284
  let $container = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "$container");
@@ -63286,20 +63304,20 @@ function refresh_legend(gobj) {
63286
63304
  "span",
63287
63305
  {
63288
63306
  class: "GRAPH_LEGEND_NAME",
63289
- style: LEGEND_NAME_STYLE + (hidden ? " text-decoration:line-through; opacity:.6;" : "")
63307
+ style: (is_main ? LEGEND_MAIN_NAME_STYLE : LEGEND_NAME_STYLE) + (hidden ? " text-decoration:line-through; opacity:.6;" : "")
63290
63308
  },
63291
63309
  topic_name
63292
63310
  ], [
63293
63311
  "span",
63294
63312
  {
63295
- class: "GRAPH_LEGEND_COUNT has-text-grey",
63313
+ class: "GRAPH_LEGEND_COUNT",
63296
63314
  style: LEGEND_COUNT_STYLE
63297
63315
  },
63298
63316
  hidden ? `${entry.total}` : `${entry.visible}/${entry.total}`
63299
63317
  ]);
63300
63318
  let body_key = is_main ? "main topic" : hidden ? "show topic" : "hide topic";
63301
63319
  let body_attrs = {
63302
- class: "GRAPH_LEGEND_ITEM button is-small" + (focused ? " GRAPH_LEGEND_FOCUSED" : "") + (is_main ? " GRAPH_LEGEND_MAIN" : ""),
63320
+ class: "GRAPH_LEGEND_ITEM button" + (focused ? " GRAPH_LEGEND_FOCUSED" : "") + (is_main ? " GRAPH_LEGEND_MAIN" : ""),
63303
63321
  type: "button",
63304
63322
  style: "gap:0; flex:0 0 auto;" + (focused ? " box-shadow: inset 0 0 0 2px var(--bulma-text, #2e333d);" : ""),
63305
63323
  title: (0, i18next.t)(body_key),
@@ -63307,8 +63325,15 @@ function refresh_legend(gobj) {
63307
63325
  "aria-label": topic_name,
63308
63326
  "aria-pressed": hidden ? "false" : "true"
63309
63327
  };
63310
- if (is_main) body_attrs.disabled = "disabled";
63311
- let $body = (0, _yuneta_gobj_js.createElement2)([
63328
+ let $body;
63329
+ if (is_main) {
63330
+ delete body_attrs["aria-pressed"];
63331
+ $body = (0, _yuneta_gobj_js.createElement2)([
63332
+ "div",
63333
+ body_attrs,
63334
+ controls
63335
+ ]);
63336
+ } else $body = (0, _yuneta_gobj_js.createElement2)([
63312
63337
  "button",
63313
63338
  body_attrs,
63314
63339
  controls,
@@ -63324,9 +63349,9 @@ function refresh_legend(gobj) {
63324
63349
  if (is_main && state.main_chosen) extras.push([
63325
63350
  "button",
63326
63351
  {
63327
- class: "GRAPH_LEGEND_STAR button is-small pressed_state",
63352
+ class: "GRAPH_LEGEND_STAR button pressed_state",
63328
63353
  type: "button",
63329
- style: "padding:0 .4rem;",
63354
+ style: "padding:0 .5rem;",
63330
63355
  title: (0, i18next.t)("main topic"),
63331
63356
  "data-i18n-title": "main topic",
63332
63357
  "aria-label": (0, i18next.t)("main topic"),
@@ -63335,7 +63360,7 @@ function refresh_legend(gobj) {
63335
63360
  },
63336
63361
  [[
63337
63362
  "span",
63338
- { style: LEGEND_GLYPH_STYLE },
63363
+ { style: LEGEND_STAR_MAIN_STYLE },
63339
63364
  "★"
63340
63365
  ]],
63341
63366
  { click: (evt) => {
@@ -63349,23 +63374,23 @@ function refresh_legend(gobj) {
63349
63374
  else if (is_main) extras.push([
63350
63375
  "span",
63351
63376
  {
63352
- class: "GRAPH_LEGEND_STAR button is-small is-static",
63353
- style: "padding:0 .4rem;",
63377
+ class: "GRAPH_LEGEND_STAR button",
63378
+ style: "padding:0 .5rem; cursor:default;",
63354
63379
  title: (0, i18next.t)("main topic"),
63355
63380
  "data-i18n-title": "main topic"
63356
63381
  },
63357
63382
  [[
63358
63383
  "span",
63359
- { style: LEGEND_GLYPH_STYLE },
63384
+ { style: LEGEND_STAR_MAIN_STYLE },
63360
63385
  "★"
63361
63386
  ]]
63362
63387
  ]);
63363
63388
  else if (!hidden) extras.push([
63364
63389
  "button",
63365
63390
  {
63366
- class: "GRAPH_LEGEND_STAR button is-small",
63391
+ class: "GRAPH_LEGEND_STAR button",
63367
63392
  type: "button",
63368
- style: "padding:0 .4rem;",
63393
+ style: "padding:0 .5rem;",
63369
63394
  title: (0, i18next.t)("main topic"),
63370
63395
  "data-i18n-title": "main topic",
63371
63396
  "aria-label": (0, i18next.t)("main topic"),
@@ -63387,9 +63412,9 @@ function refresh_legend(gobj) {
63387
63412
  if (!hidden && entry.linked && entry.loose > 0) extras.push([
63388
63413
  "button",
63389
63414
  {
63390
- class: "GRAPH_LEGEND_LOOSE button is-small" + (entry.loose_shown ? " pressed_state" : ""),
63415
+ class: "GRAPH_LEGEND_LOOSE button" + (entry.loose_shown ? " pressed_state" : ""),
63391
63416
  type: "button",
63392
- style: "padding:0 .45rem;",
63417
+ style: "padding:0 .55rem;",
63393
63418
  title: (0, i18next.t)("loose records"),
63394
63419
  "data-i18n-title": "loose records",
63395
63420
  "aria-label": (0, i18next.t)("loose records"),
@@ -63408,9 +63433,9 @@ function refresh_legend(gobj) {
63408
63433
  if (!hidden) extras.push([
63409
63434
  "button",
63410
63435
  {
63411
- class: "GRAPH_LEGEND_FOCUS button is-small" + (focused ? " pressed_state" : ""),
63436
+ class: "GRAPH_LEGEND_FOCUS button" + (focused ? " pressed_state" : ""),
63412
63437
  type: "button",
63413
- style: "padding:0 .4rem;",
63438
+ style: "padding:0 .5rem;",
63414
63439
  title: (0, i18next.t)("highlight topic"),
63415
63440
  "data-i18n-title": "highlight topic",
63416
63441
  "aria-label": (0, i18next.t)("highlight topic"),