@bramas/simulant-ui 0.1.1 → 0.2.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 +60 -0
- package/dist/SimulatorApp.jsx +782 -174
- package/dist/components/AlgorithmViewer.css +268 -74
- package/dist/components/AlgorithmViewer.jsx +171 -66
- package/dist/components/BranchPicker.css +74 -32
- package/dist/components/BranchPicker.jsx +9 -4
- package/dist/components/ConfigGraphGenerator.css +180 -38
- package/dist/components/ConfigGraphGenerator.jsx +155 -96
- package/dist/components/GenericEditor.jsx +18 -44
- package/dist/components/Icon.jsx +54 -0
- package/dist/components/ModelView.css +15 -15
- package/dist/components/SettingsLibrary.jsx +7 -5
- package/dist/components/Splitter.jsx +28 -0
- package/dist/components/StateInspector.css +59 -33
- package/dist/components/StateInspector.jsx +37 -4
- package/dist/components/theme.js +28 -0
- package/dist/pico.min.css +4 -4
- package/dist/renderers/ring.js +19 -10
- package/dist/simulator.css +1553 -363
- package/package.json +6 -6
- package/src/SimulatorApp.tsx +888 -219
- package/src/components/AlgorithmViewer.css +268 -74
- package/src/components/AlgorithmViewer.tsx +188 -75
- package/src/components/BranchPicker.css +74 -32
- package/src/components/BranchPicker.tsx +9 -4
- package/src/components/ConfigGraphGenerator.css +180 -38
- package/src/components/ConfigGraphGenerator.tsx +172 -114
- package/src/components/GenericEditor.tsx +25 -59
- package/src/components/Icon.tsx +76 -0
- package/src/components/ModelView.css +15 -15
- package/src/components/SettingsLibrary.tsx +7 -5
- package/src/components/Splitter.tsx +55 -0
- package/src/components/StateInspector.css +59 -33
- package/src/components/StateInspector.tsx +35 -4
- package/src/components/theme.ts +33 -0
- package/src/pico.min.css +4 -4
- package/src/renderers/ring.ts +22 -12
- package/src/simulator.css +1553 -363
|
@@ -1,101 +1,243 @@
|
|
|
1
|
-
/* The configuration graph (tokens in simulator.css). */
|
|
1
|
+
/* The configuration graph, filling its container (tokens in simulator.css). */
|
|
2
|
+
|
|
3
|
+
.config-graph {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
height: 100%;
|
|
7
|
+
min-height: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.cg-toolbar {
|
|
11
|
+
flex: none;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: 8px;
|
|
15
|
+
padding: 10px 12px;
|
|
16
|
+
border-bottom: 1px solid var(--sim-border);
|
|
17
|
+
background: var(--sim-surface);
|
|
18
|
+
}
|
|
2
19
|
|
|
3
20
|
.cg-controls {
|
|
4
21
|
display: flex;
|
|
5
|
-
align-items:
|
|
6
|
-
gap:
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 8px;
|
|
7
24
|
flex-wrap: wrap;
|
|
8
25
|
}
|
|
9
26
|
|
|
10
27
|
.cg-depth {
|
|
11
28
|
display: flex;
|
|
12
29
|
align-items: center;
|
|
13
|
-
gap:
|
|
30
|
+
gap: 8px;
|
|
14
31
|
white-space: nowrap;
|
|
32
|
+
font-size: 13px;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
color: var(--sim-text-2);
|
|
35
|
+
margin-right: 4px;
|
|
15
36
|
}
|
|
16
37
|
|
|
17
38
|
.cg-depth input {
|
|
18
|
-
width:
|
|
39
|
+
width: 5rem !important;
|
|
19
40
|
}
|
|
20
41
|
|
|
21
|
-
.cg-
|
|
22
|
-
|
|
23
|
-
|
|
42
|
+
.cg-divider {
|
|
43
|
+
width: 1px;
|
|
44
|
+
height: 22px;
|
|
45
|
+
margin: 0 4px;
|
|
46
|
+
background: var(--sim-border);
|
|
24
47
|
}
|
|
25
48
|
|
|
26
49
|
.cg-stats {
|
|
27
50
|
display: flex;
|
|
28
51
|
align-items: center;
|
|
29
52
|
flex-wrap: wrap;
|
|
30
|
-
gap:
|
|
31
|
-
margin-top: 0.75rem;
|
|
53
|
+
gap: 6px;
|
|
32
54
|
}
|
|
33
55
|
|
|
34
|
-
.cg-
|
|
56
|
+
.cg-notes {
|
|
35
57
|
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
gap: 0.6rem;
|
|
38
58
|
flex-wrap: wrap;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
59
|
+
gap: 4px 16px;
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
color: var(--sim-muted);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.cg-stale {
|
|
65
|
+
display: inline-flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
gap: 5px;
|
|
68
|
+
color: var(--sim-progress);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.cg-toolbar .sim-feedback {
|
|
72
|
+
margin: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.cg-body {
|
|
76
|
+
position: relative;
|
|
77
|
+
flex: 1;
|
|
78
|
+
min-height: 0;
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
44
81
|
}
|
|
45
82
|
|
|
46
83
|
.cg-frame {
|
|
47
84
|
position: relative;
|
|
48
|
-
|
|
85
|
+
flex: 1;
|
|
86
|
+
min-height: 0;
|
|
87
|
+
overflow: hidden;
|
|
49
88
|
}
|
|
50
89
|
|
|
51
90
|
.cg-canvas {
|
|
91
|
+
position: absolute;
|
|
92
|
+
inset: 0;
|
|
52
93
|
display: block;
|
|
53
|
-
background: var(--sim-
|
|
54
|
-
|
|
55
|
-
|
|
94
|
+
background-color: var(--sim-stage);
|
|
95
|
+
background-image: radial-gradient(var(--sim-stage-dot) 1px, transparent 1.2px);
|
|
96
|
+
background-size: 18px 18px;
|
|
56
97
|
cursor: grab;
|
|
57
98
|
touch-action: none;
|
|
58
99
|
}
|
|
59
100
|
|
|
60
101
|
.cg-zoom {
|
|
61
102
|
position: absolute;
|
|
62
|
-
top:
|
|
63
|
-
right:
|
|
103
|
+
top: 12px;
|
|
104
|
+
right: 12px;
|
|
64
105
|
display: flex;
|
|
65
106
|
align-items: center;
|
|
66
|
-
gap:
|
|
107
|
+
gap: 2px;
|
|
67
108
|
background: var(--sim-surface);
|
|
68
109
|
border: 1px solid var(--sim-border);
|
|
69
110
|
border-radius: 8px;
|
|
70
|
-
padding:
|
|
111
|
+
padding: 3px;
|
|
112
|
+
box-shadow: var(--sim-shadow-md);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.cg-zoom-value {
|
|
116
|
+
min-width: 3.2em;
|
|
117
|
+
text-align: center;
|
|
118
|
+
font-size: 12px;
|
|
119
|
+
font-variant-numeric: tabular-nums;
|
|
120
|
+
color: var(--sim-muted);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.cg-zoom-sep {
|
|
124
|
+
width: 1px;
|
|
125
|
+
height: 16px;
|
|
126
|
+
margin: 0 2px;
|
|
127
|
+
background: var(--sim-border);
|
|
71
128
|
}
|
|
72
129
|
|
|
73
130
|
.cg-help {
|
|
74
|
-
|
|
75
|
-
|
|
131
|
+
position: absolute;
|
|
132
|
+
right: 12px;
|
|
133
|
+
bottom: 10px;
|
|
134
|
+
margin: 0;
|
|
135
|
+
padding: 3px 8px;
|
|
136
|
+
border-radius: 6px;
|
|
137
|
+
font-size: 11.5px;
|
|
138
|
+
color: var(--sim-muted);
|
|
139
|
+
background: color-mix(in srgb, var(--sim-surface) 85%, transparent);
|
|
140
|
+
pointer-events: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* The selected node, in a card over the graph */
|
|
144
|
+
|
|
145
|
+
.cg-selection {
|
|
146
|
+
position: absolute;
|
|
147
|
+
left: 12px;
|
|
148
|
+
top: 12px;
|
|
149
|
+
z-index: 2;
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
gap: 8px;
|
|
153
|
+
width: 196px;
|
|
154
|
+
padding: 10px;
|
|
155
|
+
border-radius: 10px;
|
|
156
|
+
background: var(--sim-surface);
|
|
157
|
+
border: 1px solid var(--sim-border);
|
|
158
|
+
box-shadow: var(--sim-shadow-lg);
|
|
159
|
+
font-size: 12.5px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.cg-selection-head {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.cg-preview {
|
|
168
|
+
align-self: center;
|
|
169
|
+
border-radius: 8px;
|
|
170
|
+
border: 1px solid var(--sim-border);
|
|
171
|
+
background-color: var(--sim-stage);
|
|
172
|
+
background-image: radial-gradient(var(--sim-stage-dot) 1px, transparent 1.2px);
|
|
173
|
+
background-size: 14px 14px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.cg-selection-facts {
|
|
177
|
+
display: grid;
|
|
178
|
+
grid-template-columns: auto 1fr;
|
|
179
|
+
gap: 3px 10px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.cg-selection-facts dt {
|
|
183
|
+
color: var(--sim-muted);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.cg-selection-facts dd {
|
|
187
|
+
margin: 0;
|
|
188
|
+
min-width: 0;
|
|
189
|
+
overflow-wrap: anywhere;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.cg-empty {
|
|
193
|
+
flex: 1;
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
align-items: center;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
gap: 10px;
|
|
199
|
+
padding: 28px 16px;
|
|
200
|
+
color: var(--sim-muted);
|
|
201
|
+
font-size: 13px;
|
|
202
|
+
text-align: center;
|
|
203
|
+
background-color: var(--sim-stage);
|
|
204
|
+
background-image: radial-gradient(var(--sim-stage-dot) 1px, transparent 1.2px);
|
|
205
|
+
background-size: 18px 18px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.cg-empty strong {
|
|
209
|
+
color: var(--sim-text);
|
|
210
|
+
font-size: 14px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.cg-empty span {
|
|
214
|
+
max-width: 28rem;
|
|
76
215
|
}
|
|
77
216
|
|
|
78
217
|
.cg-list,
|
|
79
218
|
.cg-tree {
|
|
80
|
-
|
|
81
|
-
|
|
219
|
+
flex: 1;
|
|
220
|
+
min-height: 0;
|
|
82
221
|
overflow: auto;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
222
|
+
padding: 8px 12px;
|
|
223
|
+
font-size: 13px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* The selection card covers the top left: lists start beside it. */
|
|
227
|
+
.cg-body:has(.cg-selection) :is(.cg-list, .cg-tree) {
|
|
228
|
+
padding-left: 224px;
|
|
87
229
|
}
|
|
88
230
|
|
|
89
231
|
.cg-list summary {
|
|
90
232
|
cursor: pointer;
|
|
91
233
|
font-weight: 600;
|
|
92
|
-
margin:
|
|
234
|
+
margin: 4px 0;
|
|
93
235
|
}
|
|
94
236
|
|
|
95
237
|
.config-graph .cg-list-row,
|
|
96
238
|
.config-graph .cg-node-link {
|
|
97
239
|
display: flex;
|
|
98
|
-
gap:
|
|
240
|
+
gap: 12px;
|
|
99
241
|
align-items: baseline;
|
|
100
242
|
width: 100%;
|
|
101
243
|
text-align: left;
|
|
@@ -104,8 +246,8 @@
|
|
|
104
246
|
border-left: 3px solid transparent;
|
|
105
247
|
border-radius: 4px;
|
|
106
248
|
color: var(--sim-text);
|
|
107
|
-
padding:
|
|
108
|
-
font-size:
|
|
249
|
+
padding: 2px 8px;
|
|
250
|
+
font-size: 12.5px;
|
|
109
251
|
}
|
|
110
252
|
|
|
111
253
|
.config-graph .cg-node-link {
|