@yuneta/gobj-ui 6.3.1 → 7.0.0
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 +13 -4
- package/dist/gobj-ui.cjs.js +23 -10
- package/dist/gobj-ui.es.js +23 -10
- package/package.json +2 -2
- package/src/c_yui_treedb_schema.js +23 -10
package/README.md
CHANGED
|
@@ -13,8 +13,13 @@ 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
|
+
> **BREAKING (7.0.0):** a **dependency-only major** — no component API moved.
|
|
17
|
+
> The `maplibre-gl` peer floor rises to `^6.4.1`, which is where `DOM.sanitize`
|
|
18
|
+
> stops leaving dangerous attributes behind when several sit next to each other.
|
|
19
|
+
> Raise the range in every consumer that declares maplibre.
|
|
20
|
+
>
|
|
16
21
|
> **BREAKING (5.0.0):** a **dependency-only major** — no component API moved.
|
|
17
|
-
> The peer floors
|
|
22
|
+
> The peer floors moved to `maplibre-gl` `^6.0.0` (see 7.0.0 above), `@yuneta/gobj-js` `^7.8.7`,
|
|
18
23
|
> `i18next` `^26.3.6`, `tom-select` `^2.6.2`, `vanilla-jsoneditor` `^3.13.0`.
|
|
19
24
|
> maplibre v6 is ESM-only with no default export, so a consumer imports it as
|
|
20
25
|
> `import * as maplibregl`; bundling the map with Vite 8 also means emitting
|
|
@@ -529,9 +534,13 @@ Two implementation notes worth keeping:
|
|
|
529
534
|
|
|
530
535
|
A landing view that draws a treedb the way its schema literal draws it in ASCII
|
|
531
536
|
(`treedb_schema_*.c`, `treedb_system_schema.c`): **one card per topic**,
|
|
532
|
-
listing its fields in schema order, and **one edge per hook**,
|
|
533
|
-
that declares the hook and
|
|
534
|
-
|
|
537
|
+
listing its fields in schema order, and **one edge per hook**, between the row
|
|
538
|
+
that declares the hook and the fkey row of the child it names. The **arrowhead
|
|
539
|
+
is on the hook**, the way the `.c` draws it and the way the `↖` of the fkey
|
|
540
|
+
mark reads: the reference is held by the child and points at its parent. The
|
|
541
|
+
edge itself is declared parent → child, which is what ranks the parent to the
|
|
542
|
+
left, first, as the literal lists it. Built from the schema `descs` **alone**:
|
|
543
|
+
no data, no backend calls. It is the "every
|
|
535
544
|
treedb is a graph" rule applied to the schema itself, and an alternate landing
|
|
536
545
|
to the topic cards. A node click opens that topic's table through a real hash
|
|
537
546
|
navigation, so the graph is a navigation surface rather than a picture.
|
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -19796,9 +19796,11 @@ function register_c_yui_treedb_graph() {
|
|
|
19796
19796
|
* Schema-graph landing: the treedb drawn the way its `.c` literal
|
|
19797
19797
|
* draws it in ASCII (treedb_schema_*.c, treedb_system_schema.c) —
|
|
19798
19798
|
* one CARD per topic listing its fields in schema order, one edge
|
|
19799
|
-
* per hook,
|
|
19800
|
-
* the child it names
|
|
19801
|
-
*
|
|
19799
|
+
* per hook, between the row that declares the hook and the fkey row
|
|
19800
|
+
* of the child it names — arrowhead on the HOOK, as the `.c` draws
|
|
19801
|
+
* it and as the `↖` of the fkey mark says: the reference is the
|
|
19802
|
+
* child's and it points at its parent. Built from the schema
|
|
19803
|
+
* `descs` alone: no data, no backend calls.
|
|
19802
19804
|
*
|
|
19803
19805
|
* WHY THE CARD AND NOT A DOT. A topic is its fields; a schema is
|
|
19804
19806
|
* read to find out what a topic holds and what links to what. A
|
|
@@ -20058,14 +20060,17 @@ ${rows_html} </div>
|
|
|
20058
20060
|
* Derive {nodes, edges} from the schema.
|
|
20059
20061
|
*
|
|
20060
20062
|
* Node = a topic, drawn as the card the `.c` literal draws in
|
|
20061
|
-
* ASCII: its name and its fields. Edge = a hook,
|
|
20062
|
-
* that declares it
|
|
20063
|
-
* `'hook': {'users': 'departments'}` says both ends, so the
|
|
20064
|
-
*
|
|
20065
|
-
* whose parent declares no hook still gets its edge, or a
|
|
20063
|
+
* ASCII: its name and its fields. Edge = a hook, between the
|
|
20064
|
+
* row that declares it and the fkey row of the child it names
|
|
20065
|
+
* — `'hook': {'users': 'departments'}` says both ends, so the
|
|
20066
|
+
* edge can land on the rows the `.c` drawing lands it on. An
|
|
20067
|
+
* fkey whose parent declares no hook still gets its edge, or a
|
|
20066
20068
|
* half-declared schema would draw as disconnected.
|
|
20067
20069
|
*
|
|
20068
|
-
*
|
|
20070
|
+
* An edge is declared parent -> child so left-to-right dagre
|
|
20071
|
+
* ranks the parent first, the order the `.c` literal lists
|
|
20072
|
+
* them in. The ARROWHEAD is the other way (see edge_style):
|
|
20073
|
+
* the fkey points at the hook, never the hook at the fkey.
|
|
20069
20074
|
************************************************************/
|
|
20070
20075
|
function schema_to_graph(gobj) {
|
|
20071
20076
|
let descs = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "descs");
|
|
@@ -20165,12 +20170,20 @@ function schema_to_graph(gobj) {
|
|
|
20165
20170
|
* the graph is built and re-applied on a theme switch
|
|
20166
20171
|
* (ac_theme), which restyles the LIVE graph — rebuilding it
|
|
20167
20172
|
* would drop the user's zoom/pan and any dragged node.
|
|
20173
|
+
*
|
|
20174
|
+
* The arrowhead is at the START of the edge, on the parent's
|
|
20175
|
+
* hook — the direction the `.c` literals draw and the `↖` of
|
|
20176
|
+
* the fkey mark names: the reference is held by the CHILD and
|
|
20177
|
+
* points at its parent. The edge is still declared parent ->
|
|
20178
|
+
* child, which is what ranks the parent to the left; only the
|
|
20179
|
+
* marker says who points at whom.
|
|
20168
20180
|
************************************************************/
|
|
20169
20181
|
function edge_style(dark) {
|
|
20170
20182
|
return {
|
|
20171
20183
|
stroke: dark ? "#7a8593" : "#9aa4b2",
|
|
20172
20184
|
lineWidth: 1.2,
|
|
20173
|
-
|
|
20185
|
+
startArrow: true,
|
|
20186
|
+
endArrow: false
|
|
20174
20187
|
};
|
|
20175
20188
|
}
|
|
20176
20189
|
/************************************************************
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -19783,9 +19783,11 @@ function register_c_yui_treedb_graph() {
|
|
|
19783
19783
|
* Schema-graph landing: the treedb drawn the way its `.c` literal
|
|
19784
19784
|
* draws it in ASCII (treedb_schema_*.c, treedb_system_schema.c) —
|
|
19785
19785
|
* one CARD per topic listing its fields in schema order, one edge
|
|
19786
|
-
* per hook,
|
|
19787
|
-
* the child it names
|
|
19788
|
-
*
|
|
19786
|
+
* per hook, between the row that declares the hook and the fkey row
|
|
19787
|
+
* of the child it names — arrowhead on the HOOK, as the `.c` draws
|
|
19788
|
+
* it and as the `↖` of the fkey mark says: the reference is the
|
|
19789
|
+
* child's and it points at its parent. Built from the schema
|
|
19790
|
+
* `descs` alone: no data, no backend calls.
|
|
19789
19791
|
*
|
|
19790
19792
|
* WHY THE CARD AND NOT A DOT. A topic is its fields; a schema is
|
|
19791
19793
|
* read to find out what a topic holds and what links to what. A
|
|
@@ -20045,14 +20047,17 @@ ${rows_html} </div>
|
|
|
20045
20047
|
* Derive {nodes, edges} from the schema.
|
|
20046
20048
|
*
|
|
20047
20049
|
* Node = a topic, drawn as the card the `.c` literal draws in
|
|
20048
|
-
* ASCII: its name and its fields. Edge = a hook,
|
|
20049
|
-
* that declares it
|
|
20050
|
-
* `'hook': {'users': 'departments'}` says both ends, so the
|
|
20051
|
-
*
|
|
20052
|
-
* whose parent declares no hook still gets its edge, or a
|
|
20050
|
+
* ASCII: its name and its fields. Edge = a hook, between the
|
|
20051
|
+
* row that declares it and the fkey row of the child it names
|
|
20052
|
+
* — `'hook': {'users': 'departments'}` says both ends, so the
|
|
20053
|
+
* edge can land on the rows the `.c` drawing lands it on. An
|
|
20054
|
+
* fkey whose parent declares no hook still gets its edge, or a
|
|
20053
20055
|
* half-declared schema would draw as disconnected.
|
|
20054
20056
|
*
|
|
20055
|
-
*
|
|
20057
|
+
* An edge is declared parent -> child so left-to-right dagre
|
|
20058
|
+
* ranks the parent first, the order the `.c` literal lists
|
|
20059
|
+
* them in. The ARROWHEAD is the other way (see edge_style):
|
|
20060
|
+
* the fkey points at the hook, never the hook at the fkey.
|
|
20056
20061
|
************************************************************/
|
|
20057
20062
|
function schema_to_graph(gobj) {
|
|
20058
20063
|
let descs = gobj_read_attr(gobj, "descs");
|
|
@@ -20152,12 +20157,20 @@ function schema_to_graph(gobj) {
|
|
|
20152
20157
|
* the graph is built and re-applied on a theme switch
|
|
20153
20158
|
* (ac_theme), which restyles the LIVE graph — rebuilding it
|
|
20154
20159
|
* would drop the user's zoom/pan and any dragged node.
|
|
20160
|
+
*
|
|
20161
|
+
* The arrowhead is at the START of the edge, on the parent's
|
|
20162
|
+
* hook — the direction the `.c` literals draw and the `↖` of
|
|
20163
|
+
* the fkey mark names: the reference is held by the CHILD and
|
|
20164
|
+
* points at its parent. The edge is still declared parent ->
|
|
20165
|
+
* child, which is what ranks the parent to the left; only the
|
|
20166
|
+
* marker says who points at whom.
|
|
20155
20167
|
************************************************************/
|
|
20156
20168
|
function edge_style(dark) {
|
|
20157
20169
|
return {
|
|
20158
20170
|
stroke: dark ? "#7a8593" : "#9aa4b2",
|
|
20159
20171
|
lineWidth: 1.2,
|
|
20160
|
-
|
|
20172
|
+
startArrow: true,
|
|
20173
|
+
endArrow: false
|
|
20161
20174
|
};
|
|
20162
20175
|
}
|
|
20163
20176
|
/************************************************************
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuneta/gobj-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/gobj-ui.cjs.js",
|
|
6
6
|
"module": "dist/gobj-ui.es.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@yuneta/gobj-js": "^7.13.2",
|
|
39
39
|
"bulma": "^1.0.4",
|
|
40
40
|
"i18next": "^26.3.6",
|
|
41
|
-
"maplibre-gl": "^6.1
|
|
41
|
+
"maplibre-gl": "^6.4.1",
|
|
42
42
|
"tabulator-tables": "^6.5.2",
|
|
43
43
|
"tom-select": "^2.6.2",
|
|
44
44
|
"uplot": "^1.6.32",
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* Schema-graph landing: the treedb drawn the way its `.c` literal
|
|
5
5
|
* draws it in ASCII (treedb_schema_*.c, treedb_system_schema.c) —
|
|
6
6
|
* one CARD per topic listing its fields in schema order, one edge
|
|
7
|
-
* per hook,
|
|
8
|
-
* the child it names
|
|
9
|
-
*
|
|
7
|
+
* per hook, between the row that declares the hook and the fkey row
|
|
8
|
+
* of the child it names — arrowhead on the HOOK, as the `.c` draws
|
|
9
|
+
* it and as the `↖` of the fkey mark says: the reference is the
|
|
10
|
+
* child's and it points at its parent. Built from the schema
|
|
11
|
+
* `descs` alone: no data, no backend calls.
|
|
10
12
|
*
|
|
11
13
|
* WHY THE CARD AND NOT A DOT. A topic is its fields; a schema is
|
|
12
14
|
* read to find out what a topic holds and what links to what. A
|
|
@@ -380,14 +382,17 @@ ${rows_html} </div>
|
|
|
380
382
|
* Derive {nodes, edges} from the schema.
|
|
381
383
|
*
|
|
382
384
|
* Node = a topic, drawn as the card the `.c` literal draws in
|
|
383
|
-
* ASCII: its name and its fields. Edge = a hook,
|
|
384
|
-
* that declares it
|
|
385
|
-
* `'hook': {'users': 'departments'}` says both ends, so the
|
|
386
|
-
*
|
|
387
|
-
* whose parent declares no hook still gets its edge, or a
|
|
385
|
+
* ASCII: its name and its fields. Edge = a hook, between the
|
|
386
|
+
* row that declares it and the fkey row of the child it names
|
|
387
|
+
* — `'hook': {'users': 'departments'}` says both ends, so the
|
|
388
|
+
* edge can land on the rows the `.c` drawing lands it on. An
|
|
389
|
+
* fkey whose parent declares no hook still gets its edge, or a
|
|
388
390
|
* half-declared schema would draw as disconnected.
|
|
389
391
|
*
|
|
390
|
-
*
|
|
392
|
+
* An edge is declared parent -> child so left-to-right dagre
|
|
393
|
+
* ranks the parent first, the order the `.c` literal lists
|
|
394
|
+
* them in. The ARROWHEAD is the other way (see edge_style):
|
|
395
|
+
* the fkey points at the hook, never the hook at the fkey.
|
|
391
396
|
************************************************************/
|
|
392
397
|
function schema_to_graph(gobj)
|
|
393
398
|
{
|
|
@@ -509,13 +514,21 @@ function schema_to_graph(gobj)
|
|
|
509
514
|
* the graph is built and re-applied on a theme switch
|
|
510
515
|
* (ac_theme), which restyles the LIVE graph — rebuilding it
|
|
511
516
|
* would drop the user's zoom/pan and any dragged node.
|
|
517
|
+
*
|
|
518
|
+
* The arrowhead is at the START of the edge, on the parent's
|
|
519
|
+
* hook — the direction the `.c` literals draw and the `↖` of
|
|
520
|
+
* the fkey mark names: the reference is held by the CHILD and
|
|
521
|
+
* points at its parent. The edge is still declared parent ->
|
|
522
|
+
* child, which is what ranks the parent to the left; only the
|
|
523
|
+
* marker says who points at whom.
|
|
512
524
|
************************************************************/
|
|
513
525
|
function edge_style(dark)
|
|
514
526
|
{
|
|
515
527
|
return {
|
|
516
528
|
stroke: dark ? "#7a8593" : "#9aa4b2",
|
|
517
529
|
lineWidth: 1.2,
|
|
518
|
-
|
|
530
|
+
startArrow: true,
|
|
531
|
+
endArrow: false,
|
|
519
532
|
};
|
|
520
533
|
}
|
|
521
534
|
|