@yuneta/gobj-ui 7.23.34 → 7.23.36
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 +92 -10
- package/dist/gobj-ui.cjs.js +3299 -656
- package/dist/gobj-ui.es.js +3298 -657
- package/index.js +2 -0
- package/package.json +1 -1
- package/src/c_yui_fsm_graph.css +128 -0
- package/src/c_yui_fsm_graph.js +967 -0
- package/src/c_yui_gclass.css +508 -0
- package/src/c_yui_gclass.js +1522 -0
- package/src/c_yui_gobj_tree_js.js +11 -27
- package/src/dev_machine_trace.test.js +25 -0
- package/src/gclass_view_model.js +421 -0
- package/src/gclass_view_model.test.js +296 -0
- package/src/yui_dev.js +12 -2
- package/src/yui_gclass_view.js +42 -15
package/index.js
CHANGED
|
@@ -23,6 +23,8 @@ export { register_c_yui_map } from "./src/c_yui_map.js";
|
|
|
23
23
|
export { register_c_yui_uplot } from "./src/c_yui_uplot.js";
|
|
24
24
|
export { register_c_yui_json_graph } from "./src/c_yui_json_graph.js";
|
|
25
25
|
export { register_c_yui_json } from "./src/c_yui_json.js";
|
|
26
|
+
export { register_c_yui_gclass } from "./src/c_yui_gclass.js";
|
|
27
|
+
export { register_c_yui_fsm_graph } from "./src/c_yui_fsm_graph.js";
|
|
26
28
|
export { register_c_yui_gobj_tree_js } from "./src/c_yui_gobj_tree_js.js";
|
|
27
29
|
export {
|
|
28
30
|
register_c_yui_service_view,
|
package/package.json
CHANGED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/***********************************************************************
|
|
2
|
+
* c_yui_fsm_graph.css
|
|
3
|
+
*
|
|
4
|
+
* Styling for C_YUI_FSM_GRAPH (a state machine, drawn).
|
|
5
|
+
* The cards are HTML nodes, so they take their colours from the
|
|
6
|
+
* same tokens the matrix uses; the edges are canvas and carry
|
|
7
|
+
* theirs in the gclass.
|
|
8
|
+
* No transitions/animations by design (lib-yui convention).
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2026, ArtGins.
|
|
11
|
+
* All Rights Reserved.
|
|
12
|
+
***********************************************************************/
|
|
13
|
+
|
|
14
|
+
.C_YUI_FSM_GRAPH {
|
|
15
|
+
--fsm-ink: var(--bulma-text-strong, #363636);
|
|
16
|
+
--fsm-muted: var(--bulma-text-weak, #6a6a6a);
|
|
17
|
+
--fsm-rule: var(--bulma-border-weak, #e0e0e0);
|
|
18
|
+
--fsm-card: var(--bulma-scheme-main, #fff);
|
|
19
|
+
--fsm-entry: #0E6F63;
|
|
20
|
+
--fsm-live: #9A5B00;
|
|
21
|
+
--fsm-live-bg: rgba(154, 91, 0, .11);
|
|
22
|
+
--fsm-warn: #A3282F;
|
|
23
|
+
--fsm-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas,
|
|
24
|
+
"Liberation Mono", monospace;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:root[data-theme="dark"] .C_YUI_FSM_GRAPH,
|
|
28
|
+
.C_YUI_FSM_GRAPH[data-theme="dark"] {
|
|
29
|
+
--fsm-entry: #46C4B2;
|
|
30
|
+
--fsm-live: #D9A23F;
|
|
31
|
+
--fsm-live-bg: rgba(217, 162, 63, .16);
|
|
32
|
+
--fsm-warn: #E9737A;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-color-scheme: dark) {
|
|
36
|
+
:root:not([data-theme="light"]) .C_YUI_FSM_GRAPH {
|
|
37
|
+
--fsm-entry: #46C4B2;
|
|
38
|
+
--fsm-live: #D9A23F;
|
|
39
|
+
--fsm-live-bg: rgba(217, 162, 63, .16);
|
|
40
|
+
--fsm-warn: #E9737A;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.C_YUI_FSM_GRAPH .FSM_GRAPH_TOOLBAR {
|
|
45
|
+
border-bottom: 1px solid var(--fsm-rule);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.C_YUI_FSM_GRAPH .FSM_GRAPH_CANVAS {
|
|
49
|
+
border: 1px solid var(--fsm-rule);
|
|
50
|
+
border-radius: .2rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* A state card. It is an html node, so it is a real DOM subtree and
|
|
55
|
+
* the Inspector says what it is -- but G6 owns its position, and the
|
|
56
|
+
* card must fill the box the gclass declared or the layout spaces
|
|
57
|
+
* cards it cannot see the size of.
|
|
58
|
+
*/
|
|
59
|
+
.C_YUI_FSM_GRAPH .FSM_CARD {
|
|
60
|
+
box-sizing: border-box;
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
padding: .3rem .5rem;
|
|
64
|
+
border: 1px solid var(--fsm-rule);
|
|
65
|
+
border-left: 3px solid var(--fsm-rule);
|
|
66
|
+
border-radius: 3px;
|
|
67
|
+
background: var(--fsm-card);
|
|
68
|
+
font-family: var(--fsm-mono);
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.C_YUI_FSM_GRAPH .FSM_CARD.is-entry {
|
|
73
|
+
border-left-color: var(--fsm-entry);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.C_YUI_FSM_GRAPH .FSM_CARD.is-current {
|
|
77
|
+
border-color: var(--fsm-live);
|
|
78
|
+
border-left-color: var(--fsm-live);
|
|
79
|
+
background: var(--fsm-live-bg);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/*
|
|
83
|
+
* A state nothing declares a way into. Dashed, not red: an action is
|
|
84
|
+
* free to jump there with gobj_change_state(), so this is a fact
|
|
85
|
+
* about the DESCRIPTION and not a defect in the gclass.
|
|
86
|
+
*/
|
|
87
|
+
.C_YUI_FSM_GRAPH .FSM_CARD.is-unreachable {
|
|
88
|
+
border-top-style: dashed;
|
|
89
|
+
border-right-style: dashed;
|
|
90
|
+
border-bottom-style: dashed;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.C_YUI_FSM_GRAPH .FSM_CARD_HEAD {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
gap: .3rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.C_YUI_FSM_GRAPH .FSM_CARD_NAME {
|
|
100
|
+
font-size: .78rem;
|
|
101
|
+
font-weight: 600;
|
|
102
|
+
color: var(--fsm-ink);
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
text-overflow: ellipsis;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.C_YUI_FSM_GRAPH .FSM_CARD.is-current .FSM_CARD_NAME {
|
|
109
|
+
color: var(--fsm-live);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.C_YUI_FSM_GRAPH .FSM_CARD_MARK {
|
|
113
|
+
font-size: .7rem;
|
|
114
|
+
line-height: 1;
|
|
115
|
+
cursor: help;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.C_YUI_FSM_GRAPH .FSM_CARD_MARK.is-entry { color: var(--fsm-entry); }
|
|
119
|
+
.C_YUI_FSM_GRAPH .FSM_CARD_MARK.is-warn { color: var(--fsm-warn); }
|
|
120
|
+
|
|
121
|
+
.C_YUI_FSM_GRAPH .FSM_CARD_SUB {
|
|
122
|
+
margin-top: .15rem;
|
|
123
|
+
font-size: .65rem;
|
|
124
|
+
color: var(--fsm-muted);
|
|
125
|
+
white-space: nowrap;
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
text-overflow: ellipsis;
|
|
128
|
+
}
|