@yuneta/gobj-ui 7.26.6 → 7.26.8
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 +74 -25
- package/dist/gobj-ui.cjs.js +967 -377
- package/dist/gobj-ui.es.js +967 -377
- package/index.js +5 -1
- package/package.json +2 -2
- package/src/c_g6_nodes_tree.js +69 -24
- package/src/c_yui_form.js +331 -140
- package/src/c_yui_gclass.js +26 -21
- package/src/c_yui_gobj_tree_js.js +16 -5
- package/src/c_yui_json.js +7 -6
- package/src/c_yui_json_graph.js +42 -14
- package/src/c_yui_json_pad.js +2 -1
- package/src/c_yui_map.js +139 -75
- package/src/c_yui_nav.js +60 -20
- package/src/c_yui_pager.js +14 -9
- package/src/c_yui_period.js +16 -6
- package/src/c_yui_schema_editor.js +3 -2
- package/src/c_yui_shell.js +96 -31
- package/src/c_yui_treedb_topic_with_form.js +50 -56
- package/src/c_yui_treedb_topics.js +8 -7
- package/src/c_yui_uplot.js +1 -1
- package/src/c_yui_window.js +123 -36
- package/src/c_yui_window_manager.js +8 -3
- package/src/c_yui_wizard.js +23 -8
- package/src/delete_impact.js +5 -3
- package/src/form_json_field.js +123 -0
- package/src/form_json_field.test.js +49 -0
- package/src/form_json_field.wiring.test.js +137 -0
- package/src/form_table_rearm.wiring.test.js +158 -0
- package/src/g6_event_kw.js +36 -0
- package/src/nav_cards_helpers.js +2 -1
- package/src/nav_cards_helpers.test.js +7 -3
- package/src/schema_to_c.js +27 -1
- package/src/schema_to_c.test.js +15 -1
- package/src/shell_modals.js +5 -3
- package/src/shell_route_map.js +18 -13
- package/src/treedb_topics_transport.wiring.test.js +35 -1
- package/src/vite_plugin_yuneta_html.test.js +79 -0
- package/src/window_show.wiring.test.js +83 -0
- package/src/window_veto_back.wiring.test.js +136 -0
- package/src/wizard_chrome.wiring.test.js +87 -0
- package/src/yui_dev.js +23 -14
- package/src/yui_frontend_view.js +4 -4
- package/src/yui_gclass_view.js +3 -3
- package/src/yui_table_filter_clear.js +44 -44
- package/src/yui_text.js +31 -0
- package/src/yui_text.test.js +39 -0
- package/vite-plugin-yuneta-html.js +36 -9
package/README.md
CHANGED
|
@@ -13,6 +13,17 @@ Published as `@yuneta/gobj-ui`. Built on top of [`@yuneta/gobj-js`](https://gith
|
|
|
13
13
|
> routing contract (URL = source of truth, push/replace history, the
|
|
14
14
|
> position/preference/transient litmus).
|
|
15
15
|
>
|
|
16
|
+
> **Peer floors today** (`package.json`): `@yuneta/gobj-js` `^7.22.2`,
|
|
17
|
+
> `@antv/g6` `^5.1.0`, `bulma` `^1.0.4`, `i18next` `^26.3.6`, `maplibre-gl`
|
|
18
|
+
> `^6.11.2`, `tabulator-tables` `^6.5.3`, `tom-select` `^2.6.2`, `uplot`
|
|
19
|
+
> `^1.6.32`, `vanilla-jsoneditor` `^3.13.0`. The notices below say when and why
|
|
20
|
+
> each floor moved; the list above is what a consumer must meet now.
|
|
21
|
+
>
|
|
22
|
+
> **BREAKING (7.23.172):** the peer floor of `@yuneta/gobj-js` rose to
|
|
23
|
+
> `^7.22.0`. The Developer window turns the runtime's trace bits on and off and
|
|
24
|
+
> never reads a message to decide what to show; it needs the trace API of that
|
|
25
|
+
> gobj-js. See the CHANGELOG entry.
|
|
26
|
+
>
|
|
16
27
|
> **BREAKING (7.0.0):** a **dependency-only major** — no component API moved.
|
|
17
28
|
> The `maplibre-gl` peer floor rises to `^6.4.1`, which is where `DOM.sanitize`
|
|
18
29
|
> stops leaving dangerous attributes behind when several sit next to each other.
|
|
@@ -68,28 +79,24 @@ Published as `@yuneta/gobj-ui`. Built on top of [`@yuneta/gobj-js`](https://gith
|
|
|
68
79
|
This repository carries **two parallel lines** with different layouts and
|
|
69
80
|
consumers. They are independent snapshots (no shared git ancestry):
|
|
70
81
|
|
|
71
|
-
| Line | Branch |
|
|
72
|
-
|
|
73
|
-
| **v2** | `main` | `
|
|
74
|
-
| **
|
|
75
|
-
| **v1** | `v1` | `1.0.1` | `src/` subdir | **estadodelaire**, **hidraulia** | published npm `@yuneta/gobj-ui@^1.0.1` (dist-tag `legacy`) | frozen, maintenance-only |
|
|
82
|
+
| Line | Branch | Latest tag | Layout | Consumed by | How | Status |
|
|
83
|
+
|------|--------|------------|--------|-------------|-----|--------|
|
|
84
|
+
| **v2** | `main` | `7.26.x` | `src/` subdir | **gui_agent**, **gui_treedb**, **wattyzer**, the **yunovatios** GUIs | published npm `@yuneta/gobj-ui` (dist-tag `latest`) | active development |
|
|
85
|
+
| **v1** | `v1` | `1.0.4` | `src/` subdir | **estadodelaire**, **hidraulia** | published npm `@yuneta/gobj-ui@^1.0.4` (dist-tag `legacy`) | frozen, maintenance-only |
|
|
76
86
|
|
|
77
87
|
- **v2 / `main`** is the active development line: the declarative shell
|
|
78
|
-
(legacy-stack-free since `3.0.0`). It is embedded as a git submodule in
|
|
79
|
-
`kernel/js/gobj-ui`, and
|
|
80
|
-
(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
`index.js`
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
`npm publish` and a range bump on its side. Two consequences worth knowing:
|
|
88
|
-
a fix cannot be validated in wattyzer before it is released, and wattyzer is
|
|
89
|
-
the consumer that proves the **tarball** is complete, not just the checkout.
|
|
88
|
+
(legacy-stack-free since `3.0.0`). It is embedded as a git submodule in
|
|
89
|
+
**yunetas** at `kernel/js/gobj-ui`, and **every app takes it from the npm
|
|
90
|
+
registry** (since 2026-08-03 there is no `file:` consumer left). Apps import
|
|
91
|
+
by package specifier (`@yuneta/gobj-ui/src/*.js`, exports map `"./src/*"`;
|
|
92
|
+
the `index.js` barrel and the vite plugin stay at the package root), and the
|
|
93
|
+
published tarball ships `src/`, `index.js` and the vite plugin. So library
|
|
94
|
+
work reaches an app only after a `npm publish` and a range bump on its side
|
|
95
|
+
(`npm run deploy-round` does the round). `test-app/` is the one exception:
|
|
96
|
+
it consumes the working tree (`file:..`), which is what it is for.
|
|
90
97
|
- **v1 / `v1`** is the frozen legacy-only stack (the declarative shell is not on
|
|
91
98
|
this line). It is **published to npm**; estadodelaire and hidraulia depend on
|
|
92
|
-
`@yuneta/gobj-ui@^1.0.
|
|
99
|
+
`@yuneta/gobj-ui@^1.0.4` from the registry. Land only maintenance fixes here,
|
|
93
100
|
then `npm publish` a new `1.x`.
|
|
94
101
|
|
|
95
102
|
All new feature work lands on `main`/v2.
|
|
@@ -97,15 +104,15 @@ All new feature work lands on `main`/v2.
|
|
|
97
104
|
## Usage
|
|
98
105
|
|
|
99
106
|
```bash
|
|
100
|
-
# v2 (active):
|
|
107
|
+
# v2 (active): every app installs the published package
|
|
108
|
+
npm install @yuneta/gobj-ui@latest
|
|
109
|
+
|
|
110
|
+
# working on the library itself: clone yunetas with submodules
|
|
101
111
|
git clone --recurse-submodules <yunetas>
|
|
102
112
|
git submodule update --init kernel/js/gobj-ui # yunetas tracks main/v2
|
|
103
113
|
|
|
104
|
-
#
|
|
105
|
-
npm install @yuneta/gobj-ui
|
|
106
|
-
|
|
107
|
-
# v1 (frozen): consumers just install the published package
|
|
108
|
-
npm install @yuneta/gobj-ui@^1.0.0
|
|
114
|
+
# v1 (frozen): consumers install the legacy line
|
|
115
|
+
npm install @yuneta/gobj-ui@legacy
|
|
109
116
|
```
|
|
110
117
|
|
|
111
118
|
Edit v2 from the yunetas `kernel/js/gobj-ui` checkout, commit on `main` in this
|
|
@@ -3273,6 +3280,46 @@ metadata (`__md_treedb__`).
|
|
|
3273
3280
|
|
|
3274
3281
|
## Conventions
|
|
3275
3282
|
|
|
3283
|
+
### The GUI rules a consumer inherits
|
|
3284
|
+
|
|
3285
|
+
This library draws for several apps, so its rules are theirs too. The full
|
|
3286
|
+
text is in the yunetas `CLAUDE.md` ("JS GUI conventions"); in short:
|
|
3287
|
+
|
|
3288
|
+
- **Every action goes through the FSM.** A DOM callback only sends an event;
|
|
3289
|
+
the work is in the action, where the `machine` trace sees it.
|
|
3290
|
+
- **A `kw` is plain JSON.** Never a gobj, a widget or a DOM node: the trace
|
|
3291
|
+
dumps the kw, and those objects are circular. Pass an identity (`{id}`)
|
|
3292
|
+
and resolve it in the action.
|
|
3293
|
+
|
|
3294
|
+
```js
|
|
3295
|
+
graph.on(NodeEvent.CLICK, (evt) => {
|
|
3296
|
+
gobj_send_event(gobj, "EV_NODE_CLICK", {id: String(evt.target.id)}, gobj);
|
|
3297
|
+
});
|
|
3298
|
+
```
|
|
3299
|
+
- **Every control has a `title` and an `aria-label`, each with its key**
|
|
3300
|
+
(`data-i18n-title`, `data-i18n-aria-label`); see the i18n section below.
|
|
3301
|
+
- **No transitions or animations.** A menu, popover or state change appears
|
|
3302
|
+
at once; a third-party transition is overridden with
|
|
3303
|
+
`transition: none !important`.
|
|
3304
|
+
- **Icon-only buttons are decided at design time, against the longest
|
|
3305
|
+
locale**, never measured at run time: `<span class="is-hidden-mobile">`
|
|
3306
|
+
around the label when the row would not fit at ~360px.
|
|
3307
|
+
- **One icon shape per meaning** (chevron = open/close one thing, shafted
|
|
3308
|
+
arrow = step or back, tree box = one level, double chevron = all). Never
|
|
3309
|
+
reuse a glyph because it is there.
|
|
3310
|
+
- **Bulma helpers carry `!important`** (`.is-hidden`, `.is-flex`): toggle
|
|
3311
|
+
`is-hidden`, or use `style.setProperty('display', 'none', 'important')`.
|
|
3312
|
+
|
|
3313
|
+
### Releasing
|
|
3314
|
+
|
|
3315
|
+
`npm run build && npm test`, then `npm publish`. A published version reaches
|
|
3316
|
+
an app only through **`npm run deploy-round`**: it waits for the registry to
|
|
3317
|
+
serve the version, then per app raises the range, installs, builds, deploys
|
|
3318
|
+
and reads back the bundle each host serves (`--check` only reads back,
|
|
3319
|
+
`--only <name>` does one app, `--no-wait` skips the registry). The private
|
|
3320
|
+
consumers are listed in `~/.yuneta/gobj-ui-consumers.json` (see
|
|
3321
|
+
`scripts/gobj-ui-consumers.example.json`); the demo (`test-app/`) is built in.
|
|
3322
|
+
|
|
3276
3323
|
### Colour: a brand token as INK takes `-on-scheme`, as a FILL it does not
|
|
3277
3324
|
|
|
3278
3325
|
A Bulma brand colour (`--bulma-link`, `--bulma-danger`, …) is built to carry
|
|
@@ -3387,7 +3434,9 @@ yui_shell_translate(shell, $el); // LIBRARY-built DOM, right after building it
|
|
|
3387
3434
|
|
|
3388
3435
|
and **app view gclasses translate their own DOM** — they own a `t`, so they call
|
|
3389
3436
|
`refresh_language($container, t)` at the end of their build (this is why the
|
|
3390
|
-
shell does not translate a mounted view: see `
|
|
3437
|
+
shell does not translate a mounted view: see `build_view_gobj()` in
|
|
3438
|
+
`c_yui_shell.js`, which translates only the section-index `C_YUI_NAV` it
|
|
3439
|
+
synthesizes itself).
|
|
3391
3440
|
`yui_shell_translate` is a no-op when the app registered no translator, so
|
|
3392
3441
|
behaviour is unchanged for apps that never call `yui_shell_set_translator`.
|
|
3393
3442
|
|