@tinyactors/scxmljs 0.2.0-dev.0 → 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 +9 -9
- package/dist/explorer/element.d.ts +5 -3
- package/dist/explorer/element.js +523 -262
- package/dist/explorer/element.js.map +1 -1
- package/dist/explorer/strings.d.ts +41 -23
- package/dist/explorer/strings.js +24 -15
- package/dist/explorer/strings.js.map +1 -1
- package/dist/explorer/styles.d.ts +9 -1
- package/dist/explorer/styles.js +291 -150
- package/dist/explorer/styles.js.map +1 -1
- package/dist/explorer.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/model.d.ts +4 -1
- package/dist/model.js +7 -1
- package/dist/model.js.map +1 -1
- package/dist/session.d.ts +22 -9
- package/dist/session.js +53 -13
- package/dist/session.js.map +1 -1
- package/dist/themes/tinyactors.css +1 -0
- package/dist/trusted.d.ts +1 -0
- package/dist/ui/icons.d.ts +31 -0
- package/dist/ui/icons.js +186 -0
- package/dist/ui/icons.js.map +1 -0
- package/dist/ui/notation.d.ts +53 -0
- package/dist/ui/notation.js +117 -0
- package/dist/ui/notation.js.map +1 -0
- package/dist/ui/svg.d.ts +4 -0
- package/dist/ui/svg.js +26 -0
- package/dist/ui/svg.js.map +1 -1
- package/dist/ui/theme.d.ts +1 -1
- package/dist/ui/theme.js +6 -0
- package/dist/ui/theme.js.map +1 -1
- package/dist/view/describe.d.ts +17 -0
- package/dist/view/describe.js +49 -0
- package/dist/view/describe.js.map +1 -0
- package/dist/view/element.d.ts +39 -9
- package/dist/view/element.js +723 -86
- package/dist/view/element.js.map +1 -1
- package/dist/view/layout.d.ts +20 -0
- package/dist/view/layout.js +205 -29
- package/dist/view/layout.js.map +1 -1
- package/dist/view/strings.d.ts +34 -8
- package/dist/view/strings.js +19 -6
- package/dist/view/strings.js.map +1 -1
- package/dist/view/styles.d.ts +1 -1
- package/dist/view/styles.js +107 -21
- package/dist/view/styles.js.map +1 -1
- package/dist/view.d.ts +8 -4
- package/dist/view.js +6 -3
- package/dist/view.js.map +1 -1
- package/package.json +2 -2
package/dist/explorer/styles.js
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
* contract with neutral defaults, adopted before this sheet. Below
|
|
5
5
|
* NARROW_WIDTH (shared with the element and `<scxml-view>`) the explorer
|
|
6
6
|
* shows one pane with tabs.
|
|
7
|
+
*
|
|
8
|
+
* One focus, everything else quieter:
|
|
9
|
+
* - colour carries meaning only: `--x-run` is "active", `--x-wait` is
|
|
10
|
+
* "just happened" (the last step's arrows and the state it left);
|
|
11
|
+
* `--x-accent` is kept for keyboard focus
|
|
12
|
+
* - spacing on a 4 / 8 px scale; type in 11, 12, 13, 15 and 22 px;
|
|
13
|
+
* labels in sentence case, not letter-spaced capitals
|
|
14
|
+
* - hairlines between rows instead of boxes around them
|
|
7
15
|
*/
|
|
8
16
|
import { NARROW_WIDTH } from "../ui/theme.js";
|
|
9
17
|
export { NARROW_WIDTH };
|
|
@@ -14,110 +22,209 @@ export const EXPLORER_CSS = /* css */ `
|
|
|
14
22
|
border: 1px solid var(--x-b2); border-radius: var(--x-r); overflow: hidden;
|
|
15
23
|
height: var(--scxml-height, min(860px, calc(100dvh - 32px)));
|
|
16
24
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
background: var(--x-s2); border-bottom: 1px solid var(--x-b2); font: 12px var(--x-sans); color: var(--x-fg2);
|
|
25
|
+
[hidden] { display: none !important; }
|
|
26
|
+
|
|
27
|
+
/* ── shared type: quiet labels, one title, small counts ─── */
|
|
28
|
+
.pane-title, .list-group, .col-title, .section-title, .data-field summary, .ev-group > summary, table.tx th, .actions b, .does .label, .row-detail .label {
|
|
29
|
+
font: 600 11px/1.3 var(--x-sans); letter-spacing: 0; text-transform: none; color: var(--x-fg3);
|
|
23
30
|
}
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
h2.title { font-size: 22px; margin: 8px 0 4px; }
|
|
32
|
+
h2.title.small { font: 600 15px/1.3 var(--x-sans); letter-spacing: 0; }
|
|
33
|
+
.subtitle { font: 12px var(--x-sans); color: var(--x-fg3); gap: 8px; margin: 0 0 4px; }
|
|
34
|
+
.section-title { margin: 24px 0 4px; }
|
|
35
|
+
.section-title::after { display: none; }
|
|
36
|
+
.count { font: 11px var(--x-sans); color: var(--x-fg3); }
|
|
37
|
+
.status { font: 12px var(--x-sans); color: var(--x-fg3); }
|
|
38
|
+
.status.active { color: var(--x-run); }
|
|
39
|
+
.spacer { flex: 1; }
|
|
40
|
+
.chip { color: var(--x-fg2); border-color: var(--x-b1); font-size: 12px; }
|
|
41
|
+
.chip:hover { color: var(--x-fg1); border-color: var(--x-strong); background: var(--x-s1); }
|
|
42
|
+
.more { font: 12px var(--x-sans); }
|
|
43
|
+
.more:hover { color: var(--x-fg1); text-decoration: underline; }
|
|
44
|
+
.drill { border: 0; background: none; padding: 0; cursor: pointer; color: var(--x-fg2); font: 12px var(--x-sans); white-space: nowrap; }
|
|
45
|
+
.drill:hover { color: var(--x-fg1); text-decoration: underline; }
|
|
46
|
+
.kind { font: 11px var(--x-mono); color: var(--x-fg3); flex: none; }
|
|
47
|
+
|
|
48
|
+
/* ── shell: the focus fills it; the panels float over it, like a map's ──
|
|
49
|
+
panels (wide) tree on the left, inspector on the right
|
|
50
|
+
panel one panel on the left: the tree, and the inspector as its second page
|
|
51
|
+
sheet (narrow) the same panel as a bottom sheet: low (head + accepted events), half, full
|
|
52
|
+
Playback sits in the bottom-left corner of what the panels leave free, Follow in the bottom-right. */
|
|
53
|
+
.shell {
|
|
54
|
+
--panel-w: 340px; --panel-w-start: 280px; --panel-w-end: 340px; --gap: 12px;
|
|
55
|
+
position: relative; height: 100%;
|
|
27
56
|
}
|
|
28
|
-
.
|
|
29
|
-
.
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
.
|
|
33
|
-
.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
.playback .clock-queue { display: none; }
|
|
57
|
+
.stage { position: relative; height: 100%; overflow: hidden; }
|
|
58
|
+
.pane { min-height: 0; min-width: 0; display: flex; flex-direction: column; }
|
|
59
|
+
.pane-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; flex: none; }
|
|
60
|
+
.pane-title { flex: 1; }
|
|
61
|
+
.pane-scroll { overflow: auto; min-height: 0; flex: 1; overscroll-behavior: contain; }
|
|
62
|
+
.center { position: absolute; inset: 0; background: var(--x-bg); }
|
|
63
|
+
/* the focus keeps its content clear of the panels and the corners */
|
|
64
|
+
.center .pane-scroll { padding: 16px 24px 72px; }
|
|
65
|
+
.shell[data-layout="panels"] .center .pane-scroll {
|
|
66
|
+
padding-left: calc(var(--panel-w-start) + 2 * var(--gap) + 12px); padding-right: calc(var(--panel-w-end) + 2 * var(--gap) + 12px);
|
|
39
67
|
}
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
68
|
+
.shell[data-layout="panels"][data-level="system"] .center .pane-scroll { padding-left: 24px; }
|
|
69
|
+
.shell[data-layout="panel"] .center .pane-scroll { padding-left: calc(var(--panel-w) + 2 * var(--gap) + 12px); }
|
|
70
|
+
.shell[data-layout="sheet"] .center .pane-scroll { padding: 12px 12px calc(var(--sheet-h, 88px) + 64px); }
|
|
71
|
+
|
|
72
|
+
/* ── panels: solid, a hairline and a soft edge, inset like the corners ── */
|
|
73
|
+
.panel {
|
|
74
|
+
position: absolute; z-index: 2; box-sizing: border-box; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
|
|
75
|
+
background: var(--x-s1); border: 1px solid var(--x-b2); border-radius: calc(var(--x-r) + 4px);
|
|
76
|
+
box-shadow: 0 1px 3px color-mix(in srgb, var(--x-fg1) 14%, transparent);
|
|
43
77
|
}
|
|
44
|
-
.
|
|
45
|
-
.
|
|
46
|
-
|
|
47
|
-
.
|
|
48
|
-
.
|
|
78
|
+
.shell[data-layout="panels"] .panel { top: var(--gap); bottom: var(--gap); left: var(--gap); width: var(--panel-w-start); }
|
|
79
|
+
.shell[data-layout="panels"] .side-panel { left: auto; right: var(--gap); width: var(--panel-w-end); }
|
|
80
|
+
/* the System level has no tree: with two panels, the left one has nothing to show */
|
|
81
|
+
.shell[data-layout="panels"][data-level="system"] .panel:not(.side-panel) { display: none; }
|
|
82
|
+
.shell:not([data-layout="panels"]) .side-panel { display: none; }
|
|
83
|
+
.shell[data-layout="panel"] .panel { top: var(--gap); bottom: var(--gap); left: var(--gap); width: var(--panel-w); }
|
|
84
|
+
.panel-head {
|
|
85
|
+
display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; flex: none; padding: 8px 12px;
|
|
86
|
+
border-bottom: 1px solid var(--x-b1);
|
|
87
|
+
}
|
|
88
|
+
.panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
|
89
|
+
.panel-body > .pane, .side-panel > .pane { flex: 1; }
|
|
90
|
+
.mode { display: inline-flex; gap: 2px; flex: none; }
|
|
91
|
+
.mode button, .scopes button {
|
|
92
|
+
border: 0; background: none; padding: 2px 8px; min-height: 24px; border-radius: var(--x-r); cursor: pointer;
|
|
93
|
+
font: 500 12px var(--x-sans); color: var(--x-fg3);
|
|
94
|
+
}
|
|
95
|
+
.mode button:hover, .scopes button:hover { color: var(--x-fg1); }
|
|
96
|
+
.mode button[aria-pressed="true"], .scopes button[aria-pressed="true"] { background: var(--x-s3); color: var(--x-fg1); }
|
|
97
|
+
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
|
|
98
|
+
.crumbs button { border: 0; background: none; padding: 2px 4px; min-height: 24px; border-radius: var(--x-r); cursor: pointer; color: var(--x-fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
|
|
49
99
|
.crumbs button:hover { background: var(--x-s2); color: var(--x-fg1); }
|
|
50
100
|
.crumbs button[aria-current] { color: var(--x-fg1); font-weight: 600; }
|
|
51
101
|
.crumbs .sep { color: var(--x-fg4); flex: none; }
|
|
52
|
-
.follow { display: inline-flex; align-items: center; gap: 6px; flex: none; cursor: pointer; color: var(--x-fg2); font: 500 11px var(--x-mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--x-b2); border-radius: 999px; padding: 3px 10px; background: none; }
|
|
53
|
-
/* off: a hollow ring; on: a filled dot (shape, not only colour) */
|
|
54
|
-
.follow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--x-fg3); background: transparent; }
|
|
55
|
-
.follow[aria-pressed="true"] { color: var(--x-run); border-color: color-mix(in srgb, var(--x-run) 40%, transparent); }
|
|
56
|
-
.follow[aria-pressed="true"]::before { border-color: var(--x-run); background: var(--x-run); box-shadow: 0 0 0 3px color-mix(in srgb, var(--x-run) 20%, transparent); }
|
|
57
102
|
|
|
58
|
-
|
|
59
|
-
.
|
|
60
|
-
.
|
|
61
|
-
.
|
|
62
|
-
.
|
|
63
|
-
.
|
|
64
|
-
.
|
|
65
|
-
.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.
|
|
103
|
+
/* one panel: a page at a time, with links between them */
|
|
104
|
+
.shell:not([data-layout="panels"])[data-page="tree"] .panel-body .inspector,
|
|
105
|
+
.shell:not([data-layout="panels"])[data-page="inspector"] .panel-body .tree-pane { display: none; }
|
|
106
|
+
.shell[data-level="system"] .tree-pane { display: none; }
|
|
107
|
+
.to-inspector, .back { border: 0; background: none; padding: 2px 6px; min-height: 24px; border-radius: var(--x-r); cursor: pointer; font: 500 12px var(--x-sans); color: var(--x-fg2); white-space: nowrap; }
|
|
108
|
+
.to-inspector:hover, .back:hover { background: var(--x-s2); color: var(--x-fg1); }
|
|
109
|
+
.page-back { padding: 8px 8px 0; }
|
|
110
|
+
.shell[data-layout="panels"] .to-inspector, .shell[data-layout="panels"] .page-back { display: none; }
|
|
111
|
+
|
|
112
|
+
/* ── the sheet (narrow) ── */
|
|
113
|
+
.sheet-handle { display: none; }
|
|
69
114
|
.events-strip { display: none; }
|
|
115
|
+
.shell[data-layout="sheet"] .panel {
|
|
116
|
+
left: 0; right: 0; bottom: 0; height: 88px; border-bottom: 0; border-radius: 12px 12px 0 0; transition: height var(--x-dur);
|
|
117
|
+
}
|
|
118
|
+
.shell[data-layout="sheet"] .panel.dragging { transition: none; }
|
|
119
|
+
.shell[data-layout="sheet"][data-sheet="half"] .panel { height: 50%; }
|
|
120
|
+
.shell[data-layout="sheet"][data-sheet="full"] .panel { height: calc(100% - 8px); }
|
|
121
|
+
.shell[data-layout="sheet"] .sheet-handle {
|
|
122
|
+
display: grid; place-items: center; flex: none; width: 100%; height: 22px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none;
|
|
123
|
+
}
|
|
124
|
+
.shell[data-layout="sheet"] .sheet-handle::before { content: ""; width: 36px; height: 5px; border-radius: 3px; background: var(--x-b2); }
|
|
125
|
+
.shell[data-layout="sheet"] .sheet-handle:focus-visible { outline: 2px solid var(--x-accent); outline-offset: -2px; }
|
|
126
|
+
.shell[data-layout="sheet"] .panel-head { padding-top: 0; touch-action: none; }
|
|
127
|
+
.shell[data-layout="sheet"] .crumbs button { max-width: 14ch; }
|
|
128
|
+
/* low: its head and the accepted events, nothing else */
|
|
129
|
+
.shell[data-layout="sheet"][data-sheet="low"] .panel-body { display: none; }
|
|
130
|
+
.shell[data-layout="sheet"][data-sheet="low"] .events-strip {
|
|
131
|
+
display: flex; gap: 4px; padding: 8px 12px; min-width: 0; overflow-x: auto; scrollbar-width: none;
|
|
132
|
+
}
|
|
133
|
+
.events-strip > * { flex: none; max-width: 70vw; }
|
|
70
134
|
|
|
71
|
-
/*
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
135
|
+
/* ── corners: playback (bottom left) and Follow (bottom right), clear of the panels ── */
|
|
136
|
+
.corner { position: absolute; z-index: 3; bottom: var(--gap); }
|
|
137
|
+
.corner-start { left: var(--gap); }
|
|
138
|
+
.corner-end { right: var(--gap); }
|
|
139
|
+
.shell[data-layout="panels"]:not([data-level="system"]) .corner-start { left: calc(var(--panel-w-start) + 2 * var(--gap)); }
|
|
140
|
+
.shell[data-layout="panels"] .corner-end { right: calc(var(--panel-w-end) + 2 * var(--gap)); }
|
|
141
|
+
.shell[data-layout="panel"] .corner-start { left: calc(var(--panel-w) + 2 * var(--gap)); }
|
|
142
|
+
.shell[data-layout="sheet"] .corner { bottom: calc(var(--sheet-h, 88px) + var(--gap)); }
|
|
143
|
+
.playback, .follow {
|
|
144
|
+
box-sizing: border-box; height: 36px; display: flex; align-items: center; gap: 2px; padding: 0 3px;
|
|
145
|
+
background: var(--x-s1); border: 1px solid var(--x-b2); border-radius: 999px;
|
|
146
|
+
box-shadow: 0 1px 2px color-mix(in srgb, var(--x-fg1) 12%, transparent);
|
|
147
|
+
}
|
|
148
|
+
.playback .play, .playback .step, .playback .speeds {
|
|
149
|
+
height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: none; cursor: pointer; font: 500 12px var(--x-sans); color: var(--x-fg1);
|
|
150
|
+
}
|
|
151
|
+
.playback .play { color: var(--x-accent-fg); }
|
|
152
|
+
.playback .play:hover, .playback .step:hover:not(:disabled), .playback .speeds:hover { background: var(--x-s2); }
|
|
153
|
+
.playback .step:disabled { opacity: .45; cursor: default; }
|
|
154
|
+
.playback .speeds { padding: 0 6px; }
|
|
155
|
+
.playback .clock-time { font: 12px var(--x-mono); color: var(--x-fg3); font-variant-numeric: tabular-nums; min-width: 9ch; padding: 0 10px 0 4px; cursor: help; }
|
|
156
|
+
.follow { gap: 6px; padding: 0 14px 0 11px; cursor: pointer; color: var(--x-fg2); font: 500 12px var(--x-sans); }
|
|
157
|
+
.follow:hover { color: var(--x-fg1); background: var(--x-s2); }
|
|
158
|
+
.follow .icon { display: block; flex: none; }
|
|
159
|
+
.follow[aria-pressed="true"] { color: var(--x-run); }
|
|
160
|
+
.follow:focus-visible, .playback button:focus-visible, .playback select:focus-visible { outline: 2px solid var(--x-accent); outline-offset: 1px; }
|
|
161
|
+
/* the sheet: Follow is its crosshair, centred (its name stays its accessible name), so both corners fit a phone */
|
|
162
|
+
.shell[data-layout="sheet"] .follow { width: 36px; padding: 0; justify-content: center; }
|
|
163
|
+
.shell[data-layout="sheet"] .follow-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
164
|
+
@media (pointer: coarse) {
|
|
165
|
+
.playback, .follow { height: 44px; }
|
|
166
|
+
.shell[data-layout="sheet"] .follow { width: 44px; }
|
|
167
|
+
.playback .play, .playback .step, .playback .speeds { height: 40px; }
|
|
86
168
|
}
|
|
169
|
+
@media (prefers-reduced-motion: reduce) { .shell[data-layout="sheet"] .panel { transition: none; } }
|
|
170
|
+
.inspector, .tree-pane { background: none; }
|
|
171
|
+
|
|
172
|
+
/* ── the title row: the breadcrumb (places above) over the focus's name, then its controls ── */
|
|
173
|
+
.title-row { display: flex; align-items: flex-end; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 12px; }
|
|
174
|
+
.place { flex: 1 1 auto; min-width: 0; }
|
|
175
|
+
.place .crumbs { flex: none; margin-bottom: 2px; }
|
|
176
|
+
.place .crumbs .sep:last-child { display: none; }
|
|
177
|
+
.place h2.title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
178
|
+
.mode .icon-toggle, .filter {
|
|
179
|
+
display: inline-grid; place-items: center; width: 30px; height: 28px; padding: 0; border: 0; border-radius: var(--x-r);
|
|
180
|
+
background: none; color: var(--x-fg3); cursor: pointer;
|
|
181
|
+
}
|
|
182
|
+
.mode .icon-toggle:hover, .filter:hover { color: var(--x-fg1); background: var(--x-s2); }
|
|
183
|
+
.mode .icon-toggle[aria-pressed="true"], .filter[aria-pressed="true"] { color: var(--x-fg1); background: var(--x-s3); }
|
|
184
|
+
.mode .icon-toggle:focus-visible, .filter:focus-visible { outline: 2px solid var(--x-accent); outline-offset: 1px; }
|
|
185
|
+
.search { display: flex; align-items: center; gap: 4px; }
|
|
186
|
+
/* a container's size: the layers glyph and the number; the way inside */
|
|
187
|
+
.drill.inside { display: inline-flex; align-items: center; gap: 4px; color: var(--x-fg3); font: 12px var(--x-sans); font-variant-numeric: tabular-nums; }
|
|
188
|
+
.drill.inside:hover { color: var(--x-fg1); text-decoration: none; }
|
|
189
|
+
.row-head .does-glyphs, .card .does-glyphs { margin-left: auto; }
|
|
190
|
+
.row-head .does-glyphs + .drill.inside { margin-left: 12px; }
|
|
191
|
+
.tx .glyph-diamond, .how .glyph-diamond { color: var(--x-fg3); }
|
|
192
|
+
.guard .glyph { margin-right: 4px; }
|
|
193
|
+
.playback .play, .playback .step { display: inline-grid; place-items: center; min-width: 32px; padding: 0 8px; }
|
|
87
194
|
|
|
88
195
|
/* ── tree (windowed) ───────────────────────────────────── */
|
|
89
196
|
.tree-viewport { position: relative; }
|
|
90
197
|
.tree-row {
|
|
91
|
-
position: absolute; left: 0; right: 0; height: var(--x-row); display: flex; align-items: center; gap:
|
|
92
|
-
padding-right: 8px; cursor: pointer; white-space: nowrap; border-left: 2px solid transparent;
|
|
198
|
+
position: absolute; left: 0; right: 0; height: var(--x-row); display: flex; align-items: center; gap: 4px;
|
|
199
|
+
padding-right: 8px; cursor: pointer; white-space: nowrap; border-left: 2px solid transparent; color: var(--x-fg2);
|
|
93
200
|
}
|
|
94
|
-
.tree-row:hover { background: var(--x-s2); }
|
|
95
|
-
.tree-row[aria-selected="true"] { background: var(--x-
|
|
96
|
-
.tree-row .twisty { width:
|
|
97
|
-
.tree-row .twisty[hidden] { visibility: hidden; display: inline-block; }
|
|
201
|
+
.tree-row:hover { background: var(--x-s2); color: var(--x-fg1); }
|
|
202
|
+
.tree-row[aria-selected="true"] { background: var(--x-s2); color: var(--x-fg1); border-left-color: var(--x-fg3); }
|
|
203
|
+
.tree-row .twisty { width: 16px; height: 16px; flex: none; border: 0; background: none; padding: 0; cursor: pointer; color: var(--x-fg3); font-size: 10px; }
|
|
204
|
+
.tree-row .twisty[hidden] { visibility: hidden; display: inline-block !important; }
|
|
98
205
|
.tree-row .name { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
|
|
206
|
+
.tree-row.path { color: var(--x-fg1); }
|
|
99
207
|
.tree-row.path .name { font-weight: 600; }
|
|
100
|
-
.tree-row.active
|
|
101
|
-
.tree-row.
|
|
102
|
-
.tree-row .
|
|
208
|
+
.tree-row.active { border-left-color: var(--x-run); }
|
|
209
|
+
.tree-row.active .name { color: var(--x-run); }
|
|
210
|
+
.tree-row.match .name { text-decoration: underline; text-decoration-color: var(--x-fg3); text-underline-offset: 3px; }
|
|
103
211
|
.tree-row:focus-visible { outline-offset: -2px; }
|
|
104
212
|
|
|
105
213
|
/* ── focus ─────────────────────────────────────────────── */
|
|
106
|
-
.
|
|
107
|
-
.
|
|
108
|
-
.mode button[aria-pressed="true"] { background: var(--x-s3); color: var(--x-fg1); }
|
|
109
|
-
.diagram { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 230px); justify-content: start; gap: 22px 128px; align-items: start; padding: 6px 2px 10px 16px; }
|
|
110
|
-
.rank { display: flex; flex-direction: column; gap: 14px; }
|
|
214
|
+
.diagram { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 230px); justify-content: start; gap: 24px 128px; align-items: start; padding: 8px 0 8px 16px; }
|
|
215
|
+
.rank { display: flex; flex-direction: column; gap: 16px; }
|
|
111
216
|
.edges { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
|
|
112
217
|
.edges path { fill: none; stroke: var(--x-fg4); stroke-width: 1.25; }
|
|
113
|
-
.edges path.live { stroke: var(--x-
|
|
218
|
+
.edges path.live { stroke: var(--x-run); stroke-width: 1.5; }
|
|
219
|
+
.edges path.fired { stroke: var(--x-wait); stroke-width: 2; }
|
|
114
220
|
.edges path.back { stroke-dasharray: 4 3; }
|
|
115
221
|
.edges marker path { fill: context-stroke; stroke: none; }
|
|
116
222
|
.edge-label {
|
|
117
223
|
position: absolute; transform: translate(-50%, -50%); z-index: 1; pointer-events: auto;
|
|
118
|
-
font: 11px/1.3 var(--x-mono); background: var(--x-bg); color: var(--x-
|
|
224
|
+
font: 11px/1.3 var(--x-mono); background: var(--x-bg); color: var(--x-fg3); padding: 1px 4px; border-radius: var(--x-r); white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; cursor: help;
|
|
119
225
|
}
|
|
120
|
-
.edge-label.live { color: var(--x-
|
|
226
|
+
.edge-label.live { color: var(--x-fg1); }
|
|
227
|
+
.edge-label.fired { color: var(--x-wait); }
|
|
121
228
|
/* labels that found no free spot collapse to their event count and open on hover / focus */
|
|
122
229
|
.edge-label .short { display: none; }
|
|
123
230
|
.edge-label.collapsed .full { display: none; }
|
|
@@ -127,113 +234,146 @@ export const EXPLORER_CSS = /* css */ `
|
|
|
127
234
|
.edge-label.collapsed:is(:hover, :focus-visible) .short { display: none; }
|
|
128
235
|
|
|
129
236
|
.card {
|
|
130
|
-
position: relative; background: var(--x-s1); border: 1px solid var(--x-
|
|
131
|
-
padding: 8px
|
|
237
|
+
position: relative; background: var(--x-s1); border: 1px solid var(--x-b2); border-radius: var(--x-r);
|
|
238
|
+
padding: 8px 12px; display: grid; gap: 4px; cursor: pointer; transition: border-color var(--x-dur), background var(--x-dur);
|
|
132
239
|
}
|
|
133
|
-
.card:hover {
|
|
134
|
-
.card.path { border-color: var(--x-run);
|
|
135
|
-
.card.active { background: var(--x-run-bg); }
|
|
136
|
-
.card.
|
|
137
|
-
.card.final { border-radius: 999px; border-style: double; border-width: 3px; padding:
|
|
138
|
-
.card.selected { outline: 2px solid var(--x-
|
|
139
|
-
.card-head { display: flex; align-items: center; gap:
|
|
240
|
+
.card:hover { border-color: var(--x-strong); }
|
|
241
|
+
.card.path { border-color: var(--x-run); }
|
|
242
|
+
.card.active { background: var(--x-run-bg); box-shadow: inset 0 0 0 1px var(--x-run); }
|
|
243
|
+
.card.visited { border-style: dashed; border-color: var(--x-wait); }
|
|
244
|
+
.card.final { border-radius: 999px; border-style: double; border-width: 3px; padding: 4px 16px; }
|
|
245
|
+
.card.selected { outline: 2px solid var(--x-fg3); outline-offset: 2px; }
|
|
246
|
+
.card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
140
247
|
.card-head .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
|
|
141
248
|
.card.path .card-head .name { color: var(--x-run); }
|
|
142
|
-
.card.
|
|
143
|
-
.card .meta {
|
|
144
|
-
.card .events { display: flex; gap: 4px; flex-wrap: wrap; }
|
|
145
|
-
.card .events .chip { font-size: 10.5px; padding: 1px 6px; }
|
|
146
|
-
.drill { border: 0; background: none; padding: 0; cursor: pointer; color: var(--x-accent-fg); font: 500 11.5px var(--x-sans); }
|
|
147
|
-
.drill:hover { text-decoration: underline; }
|
|
249
|
+
.card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--x-fg3); font-size: 12px; }
|
|
250
|
+
.card .meta .status { color: var(--x-run); }
|
|
148
251
|
.initial-mark { position: absolute; left: -13px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--x-fg1); }
|
|
149
252
|
.initial-mark::after { content: ""; position: absolute; left: 8px; top: 3.5px; width: 5px; border-top: 1.5px solid var(--x-fg1); }
|
|
150
253
|
|
|
151
|
-
.lanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(
|
|
152
|
-
.lane { border: 1px
|
|
153
|
-
.lane
|
|
154
|
-
.lane-head {
|
|
155
|
-
.lane-
|
|
156
|
-
.lane
|
|
157
|
-
.lane-row { display: flex; align-items: center; gap: 6px; padding: 3px 6px; margin: 0 -6px; border-radius: var(--x-r); cursor: pointer; }
|
|
158
|
-
.lane-row:hover { background: var(--x-s2); }
|
|
254
|
+
.lanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
|
|
255
|
+
.lane { border: 1px solid var(--x-b1); border-radius: var(--x-r); background: var(--x-s1); padding: 8px 12px; min-width: 0; }
|
|
256
|
+
.lane-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
|
|
257
|
+
.lane-head .name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; min-height: 24px; }
|
|
258
|
+
.lane-row { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 8px; margin: 0 -8px; border-left: 2px solid transparent; cursor: pointer; color: var(--x-fg2); }
|
|
259
|
+
.lane-row:hover { background: var(--x-s2); color: var(--x-fg1); }
|
|
159
260
|
.lane-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
261
|
+
.lane-row.active { border-left-color: var(--x-run); }
|
|
160
262
|
.lane-row.active .name { color: var(--x-run); font-weight: 600; }
|
|
263
|
+
.lane-row.visited { border-left: 2px dashed var(--x-wait); }
|
|
161
264
|
|
|
162
|
-
|
|
163
|
-
.list
|
|
265
|
+
/* the list: one row per state, hairlines between */
|
|
266
|
+
.list { display: grid; }
|
|
267
|
+
.list-group { padding: 16px 0 4px; }
|
|
268
|
+
.list-group:first-child { padding-top: 0; }
|
|
269
|
+
.list-row {
|
|
270
|
+
display: grid; gap: 4px; padding: 8px 12px; cursor: pointer; min-width: 0;
|
|
271
|
+
border-left: 2px solid transparent; border-top: 1px solid var(--x-b1);
|
|
272
|
+
}
|
|
273
|
+
.list-group + .list-row { border-top-color: transparent; }
|
|
164
274
|
.list-row:hover { background: var(--x-s2); }
|
|
165
|
-
.list-row.path {
|
|
166
|
-
.list-row
|
|
275
|
+
.list-row.path { border-left-color: var(--x-run); }
|
|
276
|
+
.list-row.active { background: color-mix(in srgb, var(--x-run-bg) 70%, transparent); }
|
|
277
|
+
.list-row.visited { border-left: 2px dashed var(--x-wait); }
|
|
278
|
+
.list-row.open { background: var(--x-s1); }
|
|
279
|
+
.row-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
280
|
+
.list-row .name { font-weight: 500; }
|
|
281
|
+
.list-row .name[aria-expanded]::after { content: "▸"; font-size: 10px; color: var(--x-fg3); margin-left: 8px; transition: transform var(--x-dur); }
|
|
282
|
+
.list-row .name[aria-expanded="true"]::after { transform: rotate(90deg); }
|
|
167
283
|
.list-row.path .name { color: var(--x-run); font-weight: 600; }
|
|
168
|
-
.
|
|
169
|
-
.
|
|
284
|
+
.row-head .drill { margin-left: auto; }
|
|
285
|
+
.visited-mark { font: 11px var(--x-sans); color: var(--x-wait); white-space: nowrap; }
|
|
286
|
+
.does { font: 12px var(--x-mono); color: var(--x-fg2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
287
|
+
.exits { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 12px; min-width: 0; }
|
|
288
|
+
.exits.all { flex-direction: column; align-items: flex-start; }
|
|
289
|
+
.tx { display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; max-width: 100%; color: var(--x-fg3); }
|
|
290
|
+
/* the events shrink (their namespaces are cut from the left), the target never */
|
|
291
|
+
.tx .ev { display: inline-flex; align-items: baseline; gap: 6px; flex: 0 1 auto; font: 12px var(--x-mono); color: var(--x-fg1); min-width: 0; overflow: hidden; white-space: nowrap; }
|
|
292
|
+
.tx.auto .ev { font-family: var(--x-sans); font-style: italic; color: var(--x-fg3); }
|
|
293
|
+
.tx .to { flex: none; white-space: nowrap; }
|
|
294
|
+
.tx .guard { font: italic 11px var(--x-mono); color: var(--x-fg3); overflow-wrap: anywhere; }
|
|
295
|
+
.tx.fired .ev, .tx.fired .to { color: var(--x-wait); }
|
|
296
|
+
.tx-item { display: inline-flex; min-width: 0; max-width: 100%; }
|
|
297
|
+
/* while the state is active its events can be sent from the row */
|
|
298
|
+
button.tx {
|
|
299
|
+
align-items: center; min-height: 24px; padding: 0 8px; border: 1px solid color-mix(in srgb, var(--x-run) 45%, var(--x-b2)); border-radius: 999px;
|
|
300
|
+
background: var(--x-s1); cursor: pointer; font: 12px var(--x-sans);
|
|
301
|
+
}
|
|
302
|
+
button.tx:hover { background: var(--x-run-bg); border-color: var(--x-run); }
|
|
303
|
+
button.tx.fired { border-color: var(--x-wait); }
|
|
304
|
+
.row-detail { display: grid; gap: 8px; justify-items: start; padding-top: 4px; cursor: auto; }
|
|
305
|
+
.row-detail .from { margin: 0; font-size: 12px; color: var(--x-fg2); }
|
|
170
306
|
|
|
171
|
-
.doors { display: grid;
|
|
172
|
-
.
|
|
173
|
-
.door
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
.door
|
|
178
|
-
.door
|
|
307
|
+
.doors { display: grid; }
|
|
308
|
+
.doors { margin-top: 16px; }
|
|
309
|
+
.door {
|
|
310
|
+
display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 8px; align-items: center;
|
|
311
|
+
padding: 8px 12px; border-top: 1px solid var(--x-b1); cursor: pointer; color: var(--x-fg2);
|
|
312
|
+
}
|
|
313
|
+
.door:first-child { border-top-color: transparent; }
|
|
314
|
+
.door:hover { background: var(--x-s2); color: var(--x-fg1); }
|
|
315
|
+
.door .where { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
316
|
+
.door.live .where { color: var(--x-fg1); }
|
|
317
|
+
.door .glyph { color: var(--x-fg3); }
|
|
318
|
+
.door .events { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; font: 12px var(--x-mono); color: var(--x-fg3); min-width: 0; overflow: hidden; white-space: nowrap; max-width: 28ch; }
|
|
179
319
|
|
|
180
320
|
/* ── events ────────────────────────────────────────────── */
|
|
181
321
|
.scopes { display: flex; gap: 4px; padding: 0 12px 8px; flex-wrap: wrap; }
|
|
182
|
-
.
|
|
183
|
-
.scopes button[aria-pressed="true"] { background: var(--x-fg1); color: var(--x-s1); border-color: var(--x-fg1); }
|
|
184
|
-
.ev-group > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 7px 12px; font: 500 11px var(--x-mono); letter-spacing: .06em; color: var(--x-fg2); border-top: 1px solid var(--x-b1); }
|
|
322
|
+
.ev-group > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 8px 12px; color: var(--x-fg2); border-top: 1px solid var(--x-b1); }
|
|
185
323
|
.ev-group > summary::-webkit-details-marker { display: none; }
|
|
186
|
-
.ev-group > summary::before { content: "▸"; font-size: 9px; color: var(--x-fg4); transition: transform var(--x-dur); }
|
|
187
324
|
.ev-group[open] > summary::before { transform: rotate(90deg); }
|
|
188
325
|
.ev-group > summary .count { margin-left: auto; }
|
|
189
|
-
.ev-row { display: grid;
|
|
326
|
+
.ev-row { display: grid; gap: 2px; padding: 4px 12px 8px 24px; justify-items: start; }
|
|
190
327
|
.ev-row:hover { background: var(--x-s2); }
|
|
191
|
-
|
|
192
|
-
.ev-row .
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
.ev-row .
|
|
197
|
-
.ev-row .
|
|
198
|
-
.ev-row.scope-
|
|
199
|
-
.ev-row
|
|
200
|
-
.
|
|
201
|
-
.data-field
|
|
202
|
-
.data-field
|
|
328
|
+
/* the event's name is its send button */
|
|
329
|
+
.ev-row .ev {
|
|
330
|
+
max-width: 100%; min-height: 24px; padding: 0 8px; border: 1px solid var(--x-b2); border-radius: 999px; background: var(--x-s1);
|
|
331
|
+
font: 500 12px var(--x-mono); color: var(--x-fg1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
|
|
332
|
+
}
|
|
333
|
+
.ev-row .ev:hover:not(:disabled) { border-color: var(--x-run); background: var(--x-run-bg); }
|
|
334
|
+
.ev-row .ev:disabled { cursor: default; color: var(--x-fg3); border-style: dashed; }
|
|
335
|
+
.ev-row.scope-elsewhere .ev { color: var(--x-fg2); border-style: dashed; }
|
|
336
|
+
.ev-row .how { max-width: 100%; color: var(--x-fg3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
337
|
+
.ev-row .how .guard { font: italic 11px var(--x-mono); }
|
|
338
|
+
.data-field { padding: 0 12px 8px; }
|
|
339
|
+
.data-field summary { cursor: pointer; width: max-content; min-height: 24px; display: flex; align-items: center; gap: 8px; list-style: none; }
|
|
340
|
+
.data-field summary::-webkit-details-marker { display: none; }
|
|
341
|
+
.data-field summary::before, .data-field[open] summary::before { transform: rotate(90deg); }
|
|
342
|
+
.data-field input { width: 100%; height: 28px; margin-top: 4px; padding: 0 8px; font: 12px var(--x-mono); border: 1px solid var(--x-b2); border-radius: var(--x-r); background: var(--x-s1); color: var(--x-fg1); }
|
|
203
343
|
|
|
204
344
|
/* ── detail ────────────────────────────────────────────── */
|
|
205
345
|
.detail { padding: 0 12px 16px; }
|
|
206
|
-
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size:
|
|
346
|
+
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 12px; margin: 0; }
|
|
207
347
|
.kv dt { color: var(--x-fg3); }
|
|
208
|
-
.kv dd { margin: 0; font-family: var(--x-mono);
|
|
348
|
+
.kv dd { margin: 0; font-family: var(--x-mono); overflow-wrap: anywhere; }
|
|
209
349
|
table.tx { width: 100%; border-collapse: collapse; font-size: 12px; }
|
|
210
|
-
table.tx th { text-align: left;
|
|
211
|
-
table.tx td { padding:
|
|
212
|
-
table.tx td.ev { font-family: var(--x-mono);
|
|
213
|
-
table.tx td.cond { font
|
|
350
|
+
table.tx th { text-align: left; padding: 4px; border-bottom: 1px solid var(--x-b2); position: sticky; top: 0; background: var(--x-s1); }
|
|
351
|
+
table.tx td { padding: 4px; border-bottom: 1px solid var(--x-b1); vertical-align: top; }
|
|
352
|
+
table.tx td.ev { font-family: var(--x-mono); overflow-wrap: anywhere; }
|
|
353
|
+
table.tx td.cond { font: italic 11px var(--x-mono); color: var(--x-fg3); overflow-wrap: anywhere; }
|
|
214
354
|
table.tx td.to { overflow-wrap: anywhere; }
|
|
215
|
-
.actions { margin: 0; padding: 0; list-style: none; font: 12px var(--x-mono); color: var(--x-fg2); display: grid; gap:
|
|
216
|
-
.actions b {
|
|
355
|
+
.actions { margin: 0; padding: 0; list-style: none; font: 12px var(--x-mono); color: var(--x-fg2); display: grid; gap: 4px; }
|
|
356
|
+
.actions b { margin-right: 8px; }
|
|
217
357
|
|
|
218
358
|
/* ── system ────────────────────────────────────────────── */
|
|
219
359
|
.system { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px 72px; align-items: start; }
|
|
220
|
-
.system .col { display: grid; gap:
|
|
221
|
-
.
|
|
222
|
-
.machine {
|
|
223
|
-
.machine.
|
|
360
|
+
.system .col { display: grid; gap: 8px; align-content: start; min-width: 0; }
|
|
361
|
+
.machine { margin-left: calc(var(--depth, 0) * 16px); }
|
|
362
|
+
.card.machine.path { border-color: var(--x-b2); }
|
|
363
|
+
.card.machine.path .card-head .name { color: var(--x-fg1); }
|
|
364
|
+
.machine.compact { grid-template-columns: minmax(0, 1fr) minmax(0, 40%); align-items: center; padding: 4px 12px; }
|
|
224
365
|
.machine.compact .leaves { text-align: right; }
|
|
225
|
-
.machine .leaves { font:
|
|
226
|
-
.machine .from { color: var(--x-fg3); font-size:
|
|
227
|
-
.service .type { font: 11px var(--x-mono); color: var(--x-fg3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
366
|
+
.machine .leaves { font: 12px var(--x-mono); color: var(--x-run); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
367
|
+
.machine .from { color: var(--x-fg3); font-size: 12px; }
|
|
228
368
|
.links { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
|
|
229
369
|
.links path { fill: none; stroke: var(--x-b2); stroke-width: 1.25; }
|
|
230
370
|
.links path.invoke { stroke: var(--x-fg4); stroke-dasharray: 3 3; }
|
|
231
|
-
.links path.hot { stroke: var(--x-
|
|
371
|
+
.links path.hot { stroke: var(--x-wait); stroke-width: 2; }
|
|
232
372
|
.talks { display: flex; gap: 4px; flex-wrap: wrap; }
|
|
233
373
|
.pulse { animation: pulse 1.2s ease-out; }
|
|
234
|
-
@keyframes pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--x-
|
|
235
|
-
.traffic { list-style: none; margin: 0; padding: 0; font:
|
|
236
|
-
.traffic li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap:
|
|
374
|
+
@keyframes pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--x-wait) 45%, transparent); } to { box-shadow: 0 0 0 8px transparent; } }
|
|
375
|
+
.traffic { list-style: none; margin: 0; padding: 0; font: 12px/1.4 var(--x-mono); }
|
|
376
|
+
.traffic li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--x-b1); }
|
|
237
377
|
.traffic .dir { color: var(--x-fg3); }
|
|
238
378
|
|
|
239
379
|
/* ── accessibility ─────────────────────────────────────── */
|
|
@@ -255,8 +395,9 @@ table.tx td.to { overflow-wrap: anywhere; }
|
|
|
255
395
|
/* the state name is the card's / row's primary button: it looks like text */
|
|
256
396
|
button.select {
|
|
257
397
|
all: unset; box-sizing: border-box; cursor: pointer; min-height: 24px; display: inline-flex; align-items: center;
|
|
258
|
-
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1;
|
|
398
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto;
|
|
259
399
|
}
|
|
400
|
+
.card button.select { flex: 1; }
|
|
260
401
|
button.select:focus-visible { outline: 2px solid var(--x-accent); outline-offset: 2px; border-radius: var(--x-r); }
|
|
261
402
|
|
|
262
403
|
/* right-to-left pages: disclosure triangles point the other way */
|