@yuneta/gobj-ui 7.28.3 → 7.29.1
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 +18 -18
- package/dist/gobj-ui.cjs.js +6 -6
- package/dist/gobj-ui.es.js +6 -6
- package/package.json +2 -2
- package/scripts/validate-locales.mjs +3 -3
- package/src/c_g6_nodes_tree.js +3 -3
- package/src/c_yui_gobj_tree_js.js +1 -1
- package/src/c_yui_shell.js +2 -2
- package/src/c_yui_treedb_graph.js +1 -1
- package/src/c_yui_treedb_schema.js +1 -1
- package/src/c_yui_treedb_topics.js +1 -1
- package/src/data_as_text.wiring.test.js +7 -8
- package/src/form_close_asks_for_edits.wiring.test.js +2 -2
- package/src/form_json_editor_names.js +1 -1
- package/src/form_json_editor_names.wiring.test.js +1 -1
- package/src/form_table_edits_ask.wiring.test.js +1 -1
- package/src/form_table_validator.wiring.test.js +2 -2
- package/src/form_template_field.wiring.test.js +2 -2
- package/src/g6_canvas_tab_order.wiring.test.js +4 -4
- package/src/g6_long_press_clock.test.js +2 -2
- package/src/g6_nodes_tree_controls.test.js +4 -4
- package/src/g6_nodes_tree_focus.wiring.test.js +3 -3
- package/src/g6_nodes_tree_i18n_keys.test.js +2 -2
- package/src/g6_patches_first_graph.wiring.test.js +1 -1
- package/src/gclass_head_text.wiring.test.js +3 -3
- package/src/gobj_tree_remote.wiring.test.js +2 -2
- package/src/i18n_key_functions.js +3 -3
- package/src/i18n_key_functions.test.js +29 -29
- package/src/lib_graph.css +1 -1
- package/src/lib_maplibre_relocalize.test.js +1 -1
- package/src/modal_guard_back.wiring.test.js +2 -2
- package/src/named_controls.wiring.test.js +8 -8
- package/src/nav_item_badge.wiring.test.js +2 -2
- package/src/overlay_marker_after_back.wiring.test.js +8 -14
- package/src/route_map_model.test.js +2 -2
- package/src/route_resolver.test.js +9 -9
- package/src/schema_editor_openers.wiring.test.js +1 -2
- package/src/schema_editor_reload.wiring.test.js +4 -4
- package/src/schema_import.js +1 -1
- package/src/schema_import.test.js +3 -3
- package/src/schema_validate.test.js +1 -1
- package/src/selector_from_data.wiring.test.js +1 -1
- package/src/shell_toolbar_helpers.test.js +1 -1
- package/src/table_editor_name.wiring.test.js +2 -2
- package/src/tabulator.css +1 -1
- package/src/tabulator_css.test.js +1 -1
- package/src/treedb_json_drill.wiring.test.js +2 -2
- package/src/treedb_topics_transport.wiring.test.js +1 -1
- package/src/uplot_ink.test.js +1 -1
- package/src/window_layer.wiring.test.js +6 -6
- package/src/yui_asset.test.js +1 -1
- package/src/yui_badge.test.js +1 -1
- package/src/yui_dev.js +2 -2
- package/src/yui_dev_controls.test.js +2 -2
- package/src/yui_dev_copy.test.js +2 -2
- package/src/yui_row_search.test.js +6 -6
- package/src/yui_selector.js +1 -1
- package/src/yui_tab_routes.test.js +5 -5
- package/src/yui_tabulator_i18n.test.js +1 -1
- package/vite-plugin-yuneta-html.js +1 -1
package/README.md
CHANGED
|
@@ -302,8 +302,8 @@ consumers. They are independent snapshots (no shared git ancestry):
|
|
|
302
302
|
|
|
303
303
|
| Line | Branch | Latest tag | Layout | Consumed by | How | Status |
|
|
304
304
|
|------|--------|------------|--------|-------------|-----|--------|
|
|
305
|
-
| **v2** | `main` | `7.26.x` | `src/` subdir |
|
|
306
|
-
| **v1** | `v1` | `1.0.4` | `src/` subdir | nobody since 2026-10-15 (
|
|
305
|
+
| **v2** | `main` | `7.26.x` | `src/` subdir | the in-repo yunos (**gui_agent**, **gui_treedb**) and the applications built on it | published npm `@yuneta/gobj-ui` (dist-tag `latest`) | active development |
|
|
306
|
+
| **v1** | `v1` | `1.0.4` | `src/` subdir | nobody since 2026-10-15 (the last application moved to v2) | published npm `@yuneta/gobj-ui@^1.0.4` (dist-tag `legacy`) | frozen, maintenance-only |
|
|
307
307
|
|
|
308
308
|
- **v2 / `main`** is the active development line: the declarative shell
|
|
309
309
|
(legacy-stack-free since `3.0.0`). It is embedded as a git submodule in
|
|
@@ -317,8 +317,8 @@ consumers. They are independent snapshots (no shared git ancestry):
|
|
|
317
317
|
it consumes the working tree (`file:..`), which is what it is for.
|
|
318
318
|
- **v1 / `v1`** is the frozen legacy-only stack (the declarative shell is not on
|
|
319
319
|
this line). It is **published to npm** (`@yuneta/gobj-ui@^1.0.4`), and no
|
|
320
|
-
app consumes it any more:
|
|
321
|
-
|
|
320
|
+
app consumes it any more: the last two left it for v2 on 2026-10-13 and
|
|
321
|
+
2026-10-15. Land only maintenance fixes here,
|
|
322
322
|
then `npm publish` a new `1.x`.
|
|
323
323
|
|
|
324
324
|
All new feature work lands on `main`/v2.
|
|
@@ -475,8 +475,8 @@ seen*:
|
|
|
475
475
|
inside them — the agent console's strip of treedbs, each with its open topic.
|
|
476
476
|
Since 6.2.0. **Declarable in a child spec since 7.23.140** (`"remember_position":
|
|
477
477
|
true` next to its `id`): the attr existed, but the spec never passed it on,
|
|
478
|
-
so a node declared in a config could not turn it on.
|
|
479
|
-
for its treedb nodes, so the graph tab returns to `<graph>/<topic>` with its
|
|
478
|
+
so a node declared in a config could not turn it on. An application turns
|
|
479
|
+
it on for its treedb nodes, so the graph tab returns to `<graph>/<topic>` with its
|
|
480
480
|
focus and the data tab to the topic that was open.
|
|
481
481
|
|
|
482
482
|
- **A node hears every event of the navs it projects** (they are its pure
|
|
@@ -968,7 +968,7 @@ The tab that hosts the view is labelled with the **treedb** name, and a treedb
|
|
|
968
968
|
name is not unique across backends: two tabs reading `treedb_yuneta_agent` are
|
|
969
969
|
two different machines, and a wrong assumption there is a write on the wrong
|
|
970
970
|
node. The url is what tells them apart, and it does not fit in a tab label —
|
|
971
|
-
a tab wide enough for `wss://
|
|
971
|
+
a tab wide enough for `wss://console.example.com:1996` is a tab bar with
|
|
972
972
|
room for one tab. So the view carries it, where there is a whole row for it.
|
|
973
973
|
|
|
974
974
|
The buttons of that toolbar never shrink. When the row runs out of room, the
|
|
@@ -1120,7 +1120,7 @@ transport edge (`form_writes_in_flight.js`), so the form comes back on what
|
|
|
1120
1120
|
was typed instead of staying busy for ever.
|
|
1121
1121
|
|
|
1122
1122
|
**Where the transport edge comes from** (7.25.5). Until 7.25.4 only from the
|
|
1123
|
-
host, as `EV_TRANSPORT_STATE` — and two hosts (
|
|
1123
|
+
host, as `EV_TRANSPORT_STATE` — and two hosts (two applications) never
|
|
1124
1124
|
forwarded it, so a websocket drop during a Save left Save and Cancel busy for
|
|
1125
1125
|
ever. The view now also hears it from its SHELL: `yui_shell_set_connection_state()`
|
|
1126
1126
|
— which every single-backend app already calls for the toolbar dot — publishes
|
|
@@ -4859,13 +4859,13 @@ or by a dynamic `import()`: **the library translates through the APP's
|
|
|
4859
4859
|
i18next**, so every key it asks for must be defined by the app. The library it
|
|
4860
4860
|
scans is the one it ships in, the package the app builds with. The app's own
|
|
4861
4861
|
source is read recursively. Code and catalogs shared by several apps are named
|
|
4862
|
-
with `--src <dir>` (repeatable) and `--locales <dir>` (
|
|
4862
|
+
with `--src <dir>` (repeatable) and `--locales <dir>` (for instance:
|
|
4863
4863
|
`--src ../gui-common/src --locales ../gui-common/src/locales`); `--config`
|
|
4864
4864
|
names a shell declaration other than `src/app_config.json`.
|
|
4865
4865
|
|
|
4866
4866
|
What is particular to an app goes in ITS `package.json`, not in the script:
|
|
4867
4867
|
properties whose value is a key, and properties whose value is a list of keys
|
|
4868
|
-
(
|
|
4868
|
+
(an application hands its orchestrator `app_title: "central"` and
|
|
4869
4869
|
`welcome_features: [...]`):
|
|
4870
4870
|
|
|
4871
4871
|
```json
|
|
@@ -5312,8 +5312,8 @@ item with neither a `name` nor an `aria_label`), `keep_canvas_tab_order` /
|
|
|
5312
5312
|
|
|
5313
5313
|
**Every function that forwards a key is in the table, and a test finds them**
|
|
5314
5314
|
(since `7.26.29`: up to `7.26.28` the table lacked 39 of them, and 6 entries
|
|
5315
|
-
lacked positions, so a literal handed to one went
|
|
5316
|
-
|
|
5315
|
+
lacked positions, so a literal handed to one went
|
|
5316
|
+
unasked). `src/i18n_key_functions.test.js` reads every module and finds each
|
|
5317
5317
|
function that hands one of its PARAMETERS on to a place a key is read -- a
|
|
5318
5318
|
translator (any of the forms above), an `i18n`, `code` or `data-i18n*` value
|
|
5319
5319
|
(`el.dataset.i18nTitle` included), a key position of a function of the table
|
|
@@ -5540,7 +5540,7 @@ Since `7.26.32` the claim is checked further:
|
|
|
5540
5540
|
|
|
5541
5541
|
**A marked `let` (or `var`) is held to its marker.** A marker that names a list
|
|
5542
5542
|
used to let a `let` pass unread, whatever it held: a new literal branch on it
|
|
5543
|
-
was neither asked for nor checked
|
|
5543
|
+
was neither asked for nor checked. Now, when what a marker
|
|
5544
5544
|
marks is a plain `let` / `var`, the reader collects everything the variable is
|
|
5545
5545
|
GIVEN, in the scope that declares it -- its initializer and every `=` (`||=`,
|
|
5546
5546
|
`??=`, `&&=` too) -- and reads each value like any other. Each literal it finds
|
|
@@ -5679,13 +5679,13 @@ In an app, what a wrapper of its own hands on is marked where it hands it:
|
|
|
5679
5679
|
`/* i18n: data */` when it is data (a backend's comment, a key built from a
|
|
5680
5680
|
name, the DOM its callers built). When its callers give it the module's own
|
|
5681
5681
|
literal keys, the module PUBLISHES them and the marker names the list --
|
|
5682
|
-
|
|
5682
|
+
an app's `open_route_modal()` hands on the titles of `C_MY_APP_I18N_KEYS`:
|
|
5683
5683
|
|
|
5684
5684
|
```js
|
|
5685
|
-
export const
|
|
5685
|
+
export const C_MY_APP_I18N_KEYS = ["backend connection", "about myapp", "preferences"];
|
|
5686
5686
|
...
|
|
5687
5687
|
let handle = yui_shell_show_modal(priv.shell, /* i18n: data */ $content,
|
|
5688
|
-
/* i18n:
|
|
5688
|
+
/* i18n: C_MY_APP_I18N_KEYS */ modal_opts);
|
|
5689
5689
|
```
|
|
5690
5690
|
|
|
5691
5691
|
Publishing a list does not exempt a module: the rule is per call, not per
|
|
@@ -5732,7 +5732,7 @@ fails no check"*:
|
|
|
5732
5732
|
entry is redundant, and dropping it loses no key for a consumer.
|
|
5733
5733
|
|
|
5734
5734
|
The test proves itself: with the `COVERAGE` entries that pin them taken
|
|
5735
|
-
away, it reports each of the keys
|
|
5735
|
+
away, it reports each of the keys a review found pinned by nothing.
|
|
5736
5736
|
|
|
5737
5737
|
A list is also named by a marker or by `COVERAGE`: one that is neither is an
|
|
5738
5738
|
ORPHAN, and fails. Two lists have a test of their own instead, and the pin
|
|
@@ -5905,7 +5905,7 @@ Up to `7.26.24` each app carried its own copy, and the copies had drifted into
|
|
|
5905
5905
|
three families: only one read the codes of the schema editor, only the other
|
|
5906
5906
|
two the barrel imports, and two read `t('topic') + ':'` as a key built by
|
|
5907
5907
|
concatenation and skipped it -- so the treedb node graph's (`C_G6_NODES_TREE`)
|
|
5908
|
-
*"topic:"* went untranslated in
|
|
5908
|
+
*"topic:"* went untranslated in two applications. No app keeps a copy
|
|
5909
5909
|
now. `test-app`, this library's own demo, has a catalog of another shape (one
|
|
5910
5910
|
`src/locales.js`, English as the source: a key IS the English text, Title Case
|
|
5911
5911
|
included), so its `test-app/scripts/validate-locales.mjs` loads that catalog
|
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -1119,7 +1119,7 @@ function build_nav_map(input) {
|
|
|
1119
1119
|
* - `%` `^` `"` `\` and the rest make it INVALID: querySelector
|
|
1120
1120
|
* THROWS a SyntaxError, out of whatever action was running.
|
|
1121
1121
|
*
|
|
1122
|
-
*
|
|
1122
|
+
* The gobj tree found its canvas with
|
|
1123
1123
|
* `querySelector("#" + id)`, and gui_agent named the window
|
|
1124
1124
|
* `node~key` -- every open logged "no canvas mount" and the
|
|
1125
1125
|
* canvas never resized; a `^` in the key (`%5E`) threw out of
|
|
@@ -4148,7 +4148,7 @@ function resting_route_of(gobj) {
|
|
|
4148
4148
|
* Avatar provider — toolbar items with type:"avatar" call the
|
|
4149
4149
|
* registered provider whenever the shell paints initials. The
|
|
4150
4150
|
* provider is a free-form () => string callback owned by the
|
|
4151
|
-
* host (
|
|
4151
|
+
* host (the app), so gobj-ui never
|
|
4152
4152
|
* reaches into localStorage or app-specific attrs. Setting the
|
|
4153
4153
|
* provider repaints existing avatars in-place; calling
|
|
4154
4154
|
* yui_shell_refresh_avatars() repaints without changing the
|
|
@@ -11405,7 +11405,7 @@ function json_editor_value(content) {
|
|
|
11405
11405
|
* The editor draws them itself, in English, with a `title` and
|
|
11406
11406
|
* nothing else: "Format JSON: add proper indentation and new lines
|
|
11407
11407
|
* (Ctrl+I)", "Undo (Ctrl+Z)", and three mode buttons whose text is
|
|
11408
|
-
* "text", "tree" and "table"
|
|
11408
|
+
* "text", "tree" and "table". Two hooks reach
|
|
11409
11409
|
* them, and both are needed:
|
|
11410
11410
|
*
|
|
11411
11411
|
* - json_editor_menu_items(), the editor's `onRenderMenu`: the
|
|
@@ -55085,7 +55085,7 @@ function ac_trace_info(gobj, event, kw, src) {
|
|
|
55085
55085
|
*
|
|
55086
55086
|
* A host that echoes `set_id` says so itself: null for a read
|
|
55087
55087
|
* that is no set's, which is a read asked BEFORE the set when
|
|
55088
|
-
* it arrives after it (
|
|
55088
|
+
* it arrives after it (the card's own read,
|
|
55089
55089
|
* answered after a tick, unlocked the block and showed the
|
|
55090
55090
|
* levels before the set, enabled, for one round trip). A host
|
|
55091
55091
|
* that leaves it out (before 7.27.33) cannot say: any answer
|
|
@@ -70163,7 +70163,7 @@ var BTN_STYLE_CANCEL = "flex:1;padding:6px;background:var(--bulma-scheme-main-bi
|
|
|
70163
70163
|
/************************************************************
|
|
70164
70164
|
* The buttons of a popover: each one SENDS an input event of
|
|
70165
70165
|
* this gclass to `gobj`, and the action does the work, where
|
|
70166
|
-
* the `machine` trace sees it
|
|
70166
|
+
* the `machine` trace sees it. A button is
|
|
70167
70167
|
* {i18n, style, event, kw, form}
|
|
70168
70168
|
* `kw` is the plain identity of what the popover is about
|
|
70169
70169
|
* (copied per click); `form` names the controls whose `value`
|
|
@@ -76726,7 +76726,7 @@ function make_toolbar(gobj) {
|
|
|
76726
76726
|
}
|
|
76727
76727
|
/************************************************************
|
|
76728
76728
|
* "← back": shown only when the host supplies `back_route`. Absent
|
|
76729
|
-
* (e.g.
|
|
76729
|
+
* (e.g. an app with its own nav) ⇒ no button.
|
|
76730
76730
|
*
|
|
76731
76731
|
* It goes where browser Back goes (EV_BACK_TO_TOPICS): the route the
|
|
76732
76732
|
* reader was on before, and `back_route` only when there is none. It
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -1114,7 +1114,7 @@ function build_nav_map(input) {
|
|
|
1114
1114
|
* - `%` `^` `"` `\` and the rest make it INVALID: querySelector
|
|
1115
1115
|
* THROWS a SyntaxError, out of whatever action was running.
|
|
1116
1116
|
*
|
|
1117
|
-
*
|
|
1117
|
+
* The gobj tree found its canvas with
|
|
1118
1118
|
* `querySelector("#" + id)`, and gui_agent named the window
|
|
1119
1119
|
* `node~key` -- every open logged "no canvas mount" and the
|
|
1120
1120
|
* canvas never resized; a `^` in the key (`%5E`) threw out of
|
|
@@ -4143,7 +4143,7 @@ function resting_route_of(gobj) {
|
|
|
4143
4143
|
* Avatar provider — toolbar items with type:"avatar" call the
|
|
4144
4144
|
* registered provider whenever the shell paints initials. The
|
|
4145
4145
|
* provider is a free-form () => string callback owned by the
|
|
4146
|
-
* host (
|
|
4146
|
+
* host (the app), so gobj-ui never
|
|
4147
4147
|
* reaches into localStorage or app-specific attrs. Setting the
|
|
4148
4148
|
* provider repaints existing avatars in-place; calling
|
|
4149
4149
|
* yui_shell_refresh_avatars() repaints without changing the
|
|
@@ -11400,7 +11400,7 @@ function json_editor_value(content) {
|
|
|
11400
11400
|
* The editor draws them itself, in English, with a `title` and
|
|
11401
11401
|
* nothing else: "Format JSON: add proper indentation and new lines
|
|
11402
11402
|
* (Ctrl+I)", "Undo (Ctrl+Z)", and three mode buttons whose text is
|
|
11403
|
-
* "text", "tree" and "table"
|
|
11403
|
+
* "text", "tree" and "table". Two hooks reach
|
|
11404
11404
|
* them, and both are needed:
|
|
11405
11405
|
*
|
|
11406
11406
|
* - json_editor_menu_items(), the editor's `onRenderMenu`: the
|
|
@@ -55080,7 +55080,7 @@ function ac_trace_info(gobj, event, kw, src) {
|
|
|
55080
55080
|
*
|
|
55081
55081
|
* A host that echoes `set_id` says so itself: null for a read
|
|
55082
55082
|
* that is no set's, which is a read asked BEFORE the set when
|
|
55083
|
-
* it arrives after it (
|
|
55083
|
+
* it arrives after it (the card's own read,
|
|
55084
55084
|
* answered after a tick, unlocked the block and showed the
|
|
55085
55085
|
* levels before the set, enabled, for one round trip). A host
|
|
55086
55086
|
* that leaves it out (before 7.27.33) cannot say: any answer
|
|
@@ -70158,7 +70158,7 @@ var BTN_STYLE_CANCEL = "flex:1;padding:6px;background:var(--bulma-scheme-main-bi
|
|
|
70158
70158
|
/************************************************************
|
|
70159
70159
|
* The buttons of a popover: each one SENDS an input event of
|
|
70160
70160
|
* this gclass to `gobj`, and the action does the work, where
|
|
70161
|
-
* the `machine` trace sees it
|
|
70161
|
+
* the `machine` trace sees it. A button is
|
|
70162
70162
|
* {i18n, style, event, kw, form}
|
|
70163
70163
|
* `kw` is the plain identity of what the popover is about
|
|
70164
70164
|
* (copied per click); `form` names the controls whose `value`
|
|
@@ -76721,7 +76721,7 @@ function make_toolbar(gobj) {
|
|
|
76721
76721
|
}
|
|
76722
76722
|
/************************************************************
|
|
76723
76723
|
* "← back": shown only when the host supplies `back_route`. Absent
|
|
76724
|
-
* (e.g.
|
|
76724
|
+
* (e.g. an app with its own nav) ⇒ no button.
|
|
76725
76725
|
*
|
|
76726
76726
|
* It goes where browser Back goes (EV_BACK_TO_TOPICS): the route the
|
|
76727
76727
|
* reader was on before, and `back_route` only when there is none. It
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuneta/gobj-ui",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.29.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/gobj-ui.cjs.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"scripts/check-markup-strings.mjs",
|
|
27
27
|
"scripts/validate-locales.mjs"
|
|
28
28
|
],
|
|
29
|
-
"description": "Yuneta UI Library — the active line: declarative shell (C_YUI_SHELL+NAV+PAGER+WIZARD) + windows, TreeDB views, forms, charts and maps. Consumed from the npm registry by the Yuneta SPAs (gui_agent, gui_treedb
|
|
29
|
+
"description": "Yuneta UI Library — the active line: declarative shell (C_YUI_SHELL+NAV+PAGER+WIZARD) + windows, TreeDB views, forms, charts and maps. Consumed from the npm registry by the Yuneta SPAs (gui_agent, gui_treedb and the applications built on it). The frozen legacy GClass GUI stack (C_YUI_MAIN/TABS/ROUTING) lives on the v1 branch, npm dist-tag 'legacy'.",
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "vite build",
|
|
32
32
|
"test": "vitest run",
|
|
@@ -332,8 +332,8 @@
|
|
|
332
332
|
* itself and reuses collect_used_keys() for everything else.
|
|
333
333
|
*
|
|
334
334
|
* Up to gobj-ui 7.26.24 every app carried its own copy, and the
|
|
335
|
-
* copies drifted into three families with different rules
|
|
336
|
-
*
|
|
335
|
+
* copies drifted into three families with different rules.
|
|
336
|
+
* This one is their union, and an app keeps
|
|
337
337
|
* no copy.
|
|
338
338
|
*
|
|
339
339
|
* Copyright (c) 2025-2026, ArtGins.
|
|
@@ -3048,7 +3048,7 @@ function local_call_values(call, ctx, via, depth = 0)
|
|
|
3048
3048
|
* follow a recursion. So a recursive helper costs one read, not one
|
|
3049
3049
|
* per path through it: 7.26.29 read a function again at every call
|
|
3050
3050
|
* of it, `label_of(n)` calling itself in two branches took more
|
|
3051
|
-
* than two minutes, and in three it never ended
|
|
3051
|
+
* than two minutes, and in three it never ended.
|
|
3052
3052
|
* A function that is not a plain one (async, a generator) is not
|
|
3053
3053
|
* followed. A call is a step of the read that makes it, and the
|
|
3054
3054
|
* returns are read one step further (kept_values(): the steps they
|
package/src/c_g6_nodes_tree.js
CHANGED
|
@@ -840,7 +840,7 @@ function mt_create(gobj)
|
|
|
840
840
|
}
|
|
841
841
|
gobj_subscribe_event(gobj, null, {}, subscriber);
|
|
842
842
|
|
|
843
|
-
/* The theme is <html data-theme> (the Bulma
|
|
843
|
+
/* The theme is <html data-theme> (the Bulma theme convention) and
|
|
844
844
|
* the DOM mutation IS the notification: translate it into EV_THEME so
|
|
845
845
|
* ac_theme does the work inside the machine. Without this priv.theme
|
|
846
846
|
* stays "light" and the grid-line uses the light colour (#EEEEEE) →
|
|
@@ -5275,7 +5275,7 @@ function touch_control_css()
|
|
|
5275
5275
|
* label carries its key (`text` is one) and the control built next is
|
|
5276
5276
|
* NAMED by it: a `<label>` beside a control names nothing, so the control
|
|
5277
5277
|
* gets the label's `for`, and its own `title` and `aria-label`, with their
|
|
5278
|
-
* keys (
|
|
5278
|
+
* keys (11 controls without a name).
|
|
5279
5279
|
*/
|
|
5280
5280
|
let form_control_seq = 0;
|
|
5281
5281
|
|
|
@@ -5383,7 +5383,7 @@ const BTN_STYLE_CANCEL =
|
|
|
5383
5383
|
/************************************************************
|
|
5384
5384
|
* The buttons of a popover: each one SENDS an input event of
|
|
5385
5385
|
* this gclass to `gobj`, and the action does the work, where
|
|
5386
|
-
* the `machine` trace sees it
|
|
5386
|
+
* the `machine` trace sees it. A button is
|
|
5387
5387
|
* {i18n, style, event, kw, form}
|
|
5388
5388
|
* `kw` is the plain identity of what the popover is about
|
|
5389
5389
|
* (copied per click); `form` names the controls whose `value`
|
|
@@ -3757,7 +3757,7 @@ function ac_trace_info(gobj, event, kw, src)
|
|
|
3757
3757
|
*
|
|
3758
3758
|
* A host that echoes `set_id` says so itself: null for a read
|
|
3759
3759
|
* that is no set's, which is a read asked BEFORE the set when
|
|
3760
|
-
* it arrives after it (
|
|
3760
|
+
* it arrives after it (the card's own read,
|
|
3761
3761
|
* answered after a tick, unlocked the block and showed the
|
|
3762
3762
|
* levels before the set, enabled, for one round trip). A host
|
|
3763
3763
|
* that leaves it out (before 7.27.33) cannot say: any answer
|
package/src/c_yui_shell.js
CHANGED
|
@@ -268,7 +268,7 @@ let PRIVATE_DATA = {
|
|
|
268
268
|
popstate_handler: null,
|
|
269
269
|
/* Avatar item support — every toolbar item with type:"avatar"
|
|
270
270
|
* registers its <span> here so refresh_avatars() can repaint
|
|
271
|
-
* the initials when the host (
|
|
271
|
+
* the initials when the host (the app) calls
|
|
272
272
|
* yui_shell_set_avatar_provider() / yui_shell_refresh_avatars().
|
|
273
273
|
* The provider is a () => string callback owned by the host. */
|
|
274
274
|
avatar_provider: null,
|
|
@@ -5064,7 +5064,7 @@ function resting_route_of(gobj)
|
|
|
5064
5064
|
* Avatar provider — toolbar items with type:"avatar" call the
|
|
5065
5065
|
* registered provider whenever the shell paints initials. The
|
|
5066
5066
|
* provider is a free-form () => string callback owned by the
|
|
5067
|
-
* host (
|
|
5067
|
+
* host (the app), so gobj-ui never
|
|
5068
5068
|
* reaches into localStorage or app-specific attrs. Setting the
|
|
5069
5069
|
* provider repaints existing avatars in-place; calling
|
|
5070
5070
|
* yui_shell_refresh_avatars() repaints without changing the
|
|
@@ -1117,7 +1117,7 @@ function make_toolbar(gobj)
|
|
|
1117
1117
|
|
|
1118
1118
|
/************************************************************
|
|
1119
1119
|
* "← back": shown only when the host supplies `back_route`. Absent
|
|
1120
|
-
* (e.g.
|
|
1120
|
+
* (e.g. an app with its own nav) ⇒ no button.
|
|
1121
1121
|
*
|
|
1122
1122
|
* It goes where browser Back goes (EV_BACK_TO_TOPICS): the route the
|
|
1123
1123
|
* reader was on before, and `back_route` only when there is none. It
|
|
@@ -146,7 +146,7 @@ function mt_create(gobj)
|
|
|
146
146
|
{
|
|
147
147
|
/* The two touch fixes of the other graphs: a pan that follows a
|
|
148
148
|
* finger, and pinch to zoom. Both, or as the FIRST graph of a page
|
|
149
|
-
* the schema kept G6's own drag-canvas
|
|
149
|
+
* the schema kept G6's own drag-canvas. */
|
|
150
150
|
ensure_drag_canvas_patch();
|
|
151
151
|
ensure_pinch_zoom_patch();
|
|
152
152
|
|
|
@@ -207,7 +207,7 @@ function mt_start(gobj)
|
|
|
207
207
|
/* The app's backend connection, as the app tells its shell
|
|
208
208
|
* (yui_shell_set_connection_state). A write in flight when it drops
|
|
209
209
|
* is never answered, and its form waited for ever in every host
|
|
210
|
-
* that did not forward EV_TRANSPORT_STATE --
|
|
210
|
+
* that did not forward EV_TRANSPORT_STATE -- two apps
|
|
211
211
|
* among them. The transport itself is
|
|
212
212
|
* not subscribed to: see ac_transport_state(). */
|
|
213
213
|
let shell = yui_shell_of(gobj);
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Values that come from a backend, a schema or a record are
|
|
5
5
|
* DATA: they are shown as text, never parsed as markup. One case
|
|
6
|
-
* per sink fixed in the review of 2026-10-10
|
|
7
|
-
* REV-CLOUD.md V3.1 #1, #2, #4, #5 and V4.2): each one is fed a
|
|
6
|
+
* per sink fixed in the review of 2026-10-10: each one is fed a
|
|
8
7
|
* markup string and must show it, with no element created.
|
|
9
8
|
*
|
|
10
9
|
* Copyright (c) 2026, ArtGins.
|
|
@@ -75,13 +74,13 @@ function expect_text($el, text)
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
describe("data is text, not markup", () => {
|
|
78
|
-
test("
|
|
77
|
+
test("an icon cell with a name that fails the check", async () => {
|
|
79
78
|
const {icon_formatter} = await import("./c_yui_treedb_topic_with_form.js");
|
|
80
79
|
const $cell = icon_formatter({getValue: () => EVIL});
|
|
81
80
|
expect_text($cell, EVIL);
|
|
82
81
|
});
|
|
83
82
|
|
|
84
|
-
test("
|
|
83
|
+
test("the schema editor's select options and textarea value", async () => {
|
|
85
84
|
const {select_input, textarea_input} = await import("./c_yui_schema_editor.js");
|
|
86
85
|
const $select = createElement2(select_input("topic", "x", [EVIL, "ok"]));
|
|
87
86
|
expect_text($select, EVIL);
|
|
@@ -90,7 +89,7 @@ describe("data is text, not markup", () => {
|
|
|
90
89
|
expect_text($area, EVIL);
|
|
91
90
|
});
|
|
92
91
|
|
|
93
|
-
test("
|
|
92
|
+
test("the error of a subtree the JSON viewer could not load", async () => {
|
|
94
93
|
const {register_c_yui_json} = await import("./c_yui_json.js");
|
|
95
94
|
register_c_yui_json();
|
|
96
95
|
const host = gobj_create("json_text_host", "C_TEST_TEXT_JSON_HOST", {}, yuno);
|
|
@@ -106,7 +105,7 @@ describe("data is text, not markup", () => {
|
|
|
106
105
|
expect_text($err, EVIL);
|
|
107
106
|
});
|
|
108
107
|
|
|
109
|
-
test("
|
|
108
|
+
test("the shell's toolbar label and dropdown label", async () => {
|
|
110
109
|
const {register_c_yui_shell} = await import("./c_yui_shell.js");
|
|
111
110
|
register_c_yui_shell();
|
|
112
111
|
const config = {
|
|
@@ -147,7 +146,7 @@ describe("data is text, not markup", () => {
|
|
|
147
146
|
expect_text($sub, EVIL);
|
|
148
147
|
});
|
|
149
148
|
|
|
150
|
-
test("
|
|
149
|
+
test("a topic name in the treedb graph legend", async () => {
|
|
151
150
|
const {legend_name_item} = await import("./c_yui_treedb_graph.js");
|
|
152
151
|
for(const [is_main, hidden] of [[false, false], [true, false], [false, true]]) {
|
|
153
152
|
const $name = createElement2(legend_name_item(EVIL, is_main, hidden));
|
|
@@ -156,7 +155,7 @@ describe("data is text, not markup", () => {
|
|
|
156
155
|
}
|
|
157
156
|
});
|
|
158
157
|
|
|
159
|
-
test("
|
|
158
|
+
test("the G6 toolbar escapes what it puts in its markup", async () => {
|
|
160
159
|
const {toolbar_item_html} = await import("./c_g6_nodes_tree.js");
|
|
161
160
|
const items = [
|
|
162
161
|
{readout: true, text: EVIL, title: EVIL, className: EVIL},
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* the READER changed. A field the record lacks is filled with its
|
|
6
6
|
* default when the record is loaded: the form then differs from what
|
|
7
7
|
* is stored, and its save lights (`changes`) -- but the reader did
|
|
8
|
-
* nothing, and the close asked all the same. In
|
|
8
|
+
* nothing, and the close asked all the same. In a consumer app that
|
|
9
9
|
* was every device whose alarm colours a save had wiped (16 of 19),
|
|
10
10
|
* on every close of its settings. What the reader does -- types,
|
|
11
11
|
* clears, pastes -- is `edited`, and that is what the close asks
|
|
@@ -41,7 +41,7 @@ const {register_c_yui_form} = await import("./c_yui_form.js");
|
|
|
41
41
|
const logged = [];
|
|
42
42
|
let yuno = null;
|
|
43
43
|
|
|
44
|
-
/* The settings template of an
|
|
44
|
+
/* The settings template of an app's device type, cut down: a
|
|
45
45
|
* field with a default beside a sub-form of three. */
|
|
46
46
|
const TEMPLATE = {
|
|
47
47
|
template_version: {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* The editor draws them itself, in English, with a `title` and
|
|
9
9
|
* nothing else: "Format JSON: add proper indentation and new lines
|
|
10
10
|
* (Ctrl+I)", "Undo (Ctrl+Z)", and three mode buttons whose text is
|
|
11
|
-
* "text", "tree" and "table"
|
|
11
|
+
* "text", "tree" and "table". Two hooks reach
|
|
12
12
|
* them, and both are needed:
|
|
13
13
|
*
|
|
14
14
|
* - json_editor_menu_items(), the editor's `onRenderMenu`: the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* form_json_editor_names.wiring.test.js
|
|
3
3
|
*
|
|
4
4
|
* The menu vanilla-jsoneditor draws in a json field of C_YUI_FORM
|
|
5
|
-
* was English, named by a `title` alone
|
|
5
|
+
* was English, named by a `title` alone. Now:
|
|
6
6
|
*
|
|
7
7
|
* - its items go through json_editor_menu_items(), the editor's
|
|
8
8
|
* onRenderMenu: titles translated (the shortcut kept), the mode
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* is stored wired it again), so adding a row, editing a cell,
|
|
11
11
|
* deleting a row or editing a nested table marked nothing: since
|
|
12
12
|
* 7.26.39 the close asks only for `edited`, and it closed without a
|
|
13
|
-
* question -- the edit lost. In
|
|
13
|
+
* question -- the edit lost. In a consumer app that is the settings of
|
|
14
14
|
* every device without its alarm colours, whose alarms are tables.
|
|
15
15
|
*
|
|
16
16
|
* And the column titles of those tables change language: they were
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - A template item may carry Tabulator validators of its own
|
|
7
7
|
* (`validator`: a name or a function), which its column runs
|
|
8
8
|
* besides `required`: what a host knows and a schema cannot say
|
|
9
|
-
* (
|
|
9
|
+
* (a consumer app refuses a trigger value that its measure can
|
|
10
10
|
* never match).
|
|
11
11
|
* - A table that does not validate refuses the save. Tabulator's
|
|
12
12
|
* validate() answers `true` or the LIST of the bad cells, and
|
|
@@ -117,7 +117,7 @@ beforeEach(() => {
|
|
|
117
117
|
|
|
118
118
|
let seq = 0;
|
|
119
119
|
|
|
120
|
-
/* The alarms of an
|
|
120
|
+
/* The alarms of an app's device, cut down: a table whose
|
|
121
121
|
* `value` column carries a validator the host added. */
|
|
122
122
|
function build(validator)
|
|
123
123
|
{
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* json conversion, which handed its null on: the fields below found
|
|
8
8
|
* no dict to write into (kw_set_dict_value() refuses a null segment)
|
|
9
9
|
* and the save stored the node as null -- the alarm colours of a
|
|
10
|
-
* device in
|
|
10
|
+
* device in a consumer app, wiped by every save of its settings.
|
|
11
11
|
* Driven through the real gclass on a document double, with the
|
|
12
12
|
* template of those settings.
|
|
13
13
|
*
|
|
@@ -42,7 +42,7 @@ const saved = [];
|
|
|
42
42
|
const logged = [];
|
|
43
43
|
let yuno = null;
|
|
44
44
|
|
|
45
|
-
/* The settings template of an
|
|
45
|
+
/* The settings template of an app's device type, cut down to
|
|
46
46
|
* the sub-form and one field beside it. */
|
|
47
47
|
const TEMPLATE = {
|
|
48
48
|
template_version: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Every view that draws a G6 graph puts its canvases in the page's
|
|
5
5
|
* Tab order the same way (g6_canvas_tab_order.js): the main canvas
|
|
6
|
-
* 0, the other layers -1 (
|
|
6
|
+
* 0, the other layers -1 (and the four views
|
|
7
7
|
* the second pass left out).
|
|
8
8
|
*
|
|
9
9
|
* G6 stacks four canvases and gives each `tabIndex = 1`; a
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* from a graph went through its other canvases and the whole page
|
|
12
12
|
* before it reached the graph's own buttons.
|
|
13
13
|
*
|
|
14
|
-
* And the main canvas, a control in the Tab order, is NAMED
|
|
15
|
-
*
|
|
14
|
+
* And the main canvas, a control in the Tab order, is NAMED:
|
|
15
|
+
* a `title` and an `aria-label` through t(),
|
|
16
16
|
* each with its key, saying which graph it is -- and changing
|
|
17
17
|
* language with the page. From 7.26.28 to 7.26.41 Tab landed on it
|
|
18
18
|
* and a reader announced nothing.
|
|
@@ -264,7 +264,7 @@ describe("every G6 view: the main canvas in the Tab order, the other layers out"
|
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
266
|
|
|
267
|
-
describe("
|
|
267
|
+
describe("the main canvas is named, says which graph it is, and changes language", () => {
|
|
268
268
|
for(const [gclass_name, attrs] of Object.entries(VIEWS)) {
|
|
269
269
|
test(`${gclass_name}: "${NAMES[gclass_name].key}", after its first render and a renderer change`, async () => {
|
|
270
270
|
const i18next = (await import("i18next")).default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* g6_long_press_clock.test.js
|
|
3
3
|
*
|
|
4
|
-
* The long press of the G6 graphs is measured on a MONOTONIC clock
|
|
5
|
-
*
|
|
4
|
+
* The long press of the G6 graphs is measured on a MONOTONIC clock.
|
|
5
|
+
* press_arbiter.test.js
|
|
6
6
|
* injects the time into classify_press(), so it passes whatever
|
|
7
7
|
* clock the handler reads; this drives the handler itself, with the
|
|
8
8
|
* wall clock set back an hour in the middle of the press -- an NTP
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* icons beside a selection (node and edge gear and trash, link,
|
|
6
6
|
* port gear), the ✕ of the detail popover and the items of its two
|
|
7
7
|
* G6 toolbars -- are buttons for the keyboard and for a language
|
|
8
|
-
* switch too
|
|
8
|
+
* switch too. They had a translated title and
|
|
9
9
|
* aria-label and nothing else: no role, no tabindex, no key, so
|
|
10
10
|
* they could not be reached without a pointer and kept the
|
|
11
11
|
* language they were drawn in.
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
* Enter and Space must do exactly what the click does: they CLICK
|
|
14
14
|
* the element, and the key stops there, because the graph's
|
|
15
15
|
* container forwards every keydown to G6. And the click does one
|
|
16
|
-
* thing
|
|
16
|
+
* thing: it SENDS an input event of the gclass, with
|
|
17
17
|
* the plain identity of what the button belongs to; the action
|
|
18
18
|
* does the work, where the `machine` trace sees it.
|
|
19
19
|
*
|
|
20
20
|
* A POINTER press does not take the focus (preventDefault on
|
|
21
21
|
* pointerdown): a button that took it and was then removed left
|
|
22
|
-
* the focus on <body> in Firefox, and the graph deaf
|
|
22
|
+
* the focus on <body> in Firefox, and the graph deaf.
|
|
23
23
|
*
|
|
24
24
|
* A DISABLED item says so to the keyboard and to a reader too
|
|
25
|
-
* (
|
|
25
|
+
* (third pass): `aria-disabled` and out of the Tab
|
|
26
26
|
* order, from its first render and through every
|
|
27
27
|
* disableElements / enableElements; a TOGGLE says its state in
|
|
28
28
|
* `aria-pressed`; and a rebuild gives the focus back to the same
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* keydown inside the container is forwarded to the graph's
|
|
9
9
|
* `keydown` listeners (G6's forwardContainerEvents).
|
|
10
10
|
*
|
|
11
|
-
* What it holds
|
|
11
|
+
* What it holds:
|
|
12
12
|
*
|
|
13
13
|
* - **The keyboard is not lost when a focused button goes.** A
|
|
14
14
|
* floating button reached with Tab, or the ✕ of the detail
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* - **The detail popover's ✕ is the named, keyed button** of
|
|
27
27
|
* create_detail_close, and "no fields" carries its key.
|
|
28
28
|
*
|
|
29
|
-
* And from the third pass
|
|
29
|
+
* And from the third pass:
|
|
30
30
|
*
|
|
31
31
|
* - **Every other button of the view is an event too**: the
|
|
32
32
|
* edit toolbar's create, the cancel / apply / confirm rows of
|
|
@@ -847,7 +847,7 @@ describe("the popover button rows are EVENTS (third pass)", () => {
|
|
|
847
847
|
* popover open, and is the identity in the kw the selection? A row
|
|
848
848
|
* only checked through its own buttons never asks either -- the
|
|
849
849
|
* button exists only while its popover does -- so each is asked here
|
|
850
|
-
* with the event sent by hand (
|
|
850
|
+
* with the event sent by hand (a fourth pass: dropping the check
|
|
851
851
|
* from the edge apply or the port cancel left every test green). */
|
|
852
852
|
describe("a popover's apply and cancel act only on the popover open (fourth pass)", () => {
|
|
853
853
|
/* The selection each popover belongs to, made with the popover
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* only sees `t('<literal>')` and the `data-i18n*` / `i18n:` forms.
|
|
9
9
|
* So the view publishes them in G6_NODES_TREE_I18N_KEYS, and a key
|
|
10
10
|
* missing from that list renders raw in every language with the
|
|
11
|
-
* validator green (
|
|
11
|
+
* validator green ("some records were gone
|
|
12
12
|
* before the delete").
|
|
13
13
|
*
|
|
14
14
|
* The module is read as a syntax tree, so every CALL is checked,
|
|
@@ -264,7 +264,7 @@ describe("c_g6_nodes_tree publishes the keys it hands to t() as data", () => {
|
|
|
264
264
|
expect(bad).toEqual([]);
|
|
265
265
|
});
|
|
266
266
|
|
|
267
|
-
test("the published list holds the keys
|
|
267
|
+
test("the published list holds the keys a review found missing", () => {
|
|
268
268
|
const published = new Set(array_of("G6_NODES_TREE_I18N_KEYS"));
|
|
269
269
|
for(const key of ["some records were gone before the delete",
|
|
270
270
|
"node properties", "delete node", "edge properties",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* g6_patches_first_graph.wiring.test.js
|
|
3
3
|
*
|
|
4
4
|
* Every G6 view of the library is fixed for touch on its OWN, when
|
|
5
|
-
* it is the first graph of the page
|
|
5
|
+
* it is the first graph of the page.
|
|
6
6
|
*
|
|
7
7
|
* gobj-ui replaces two built-ins of G6 -- `drag-canvas` (a pan
|
|
8
8
|
* that reads the pointer, not `movementX`, which a touch screen
|