waygraph 0.15.21 → 0.15.23
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/dist/auto-explore-run.d.ts +2 -1
- package/dist/auto-explore-run.js +2 -1
- package/dist/auto-session.js +2 -1
- package/dist/cli.js +21 -6067
- package/dist/runner/chain-run.js +102 -0
- package/dist/runner/cursor.js +140 -0
- package/dist/runner/demo-log.js +314 -0
- package/dist/runner/device-stage.js +400 -0
- package/dist/runner/discovery.js +105 -0
- package/dist/runner/index.js +2 -0
- package/dist/runner/interaction-patch.js +353 -0
- package/dist/runner/main.js +397 -0
- package/dist/runner/overlay-css.js +342 -0
- package/dist/runner/overlay-install.js +1301 -0
- package/dist/runner/rings.js +490 -0
- package/dist/runner/seed-mem.js +110 -0
- package/dist/runner/slides.js +272 -0
- package/dist/runner/step-mode.js +776 -0
- package/dist/runner/step-panels.js +723 -0
- package/dist/runner/teardown.js +195 -0
- package/dist/runner/todo-dock.js +142 -0
- package/examples/saucedemo/.waygraph-auto/19b9eee5.log +0 -0
- package/examples/saucedemo/.waygraph-auto/422d4390.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6c9f8e10.log +0 -0
- package/examples/saucedemo/.waygraph-auto/74ce745a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/89477e92.log +0 -0
- package/examples/saucedemo/.waygraph-auto/b7e545f0.log +0 -0
- package/examples/saucedemo/.waygraph-auto/cb2726d7.log +0 -0
- package/package.json +8 -4
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
// Moved verbatim from the former CHAIN_RUNNER_SCRIPT template string in cli.ts (see src/ARCHITECTURE.md).
|
|
2
|
+
// Runs inside the target project's own waygraph copy - keep it dependency-light and self-contained.
|
|
3
|
+
import { WAYGRAPH_RING_CSS } from "../highlights.js";
|
|
4
|
+
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// WAYGRAPH_STEP=1 - human-verification overlay: one Block at a time, a
|
|
7
|
+
// browser-injected panel showing/editing that Block's MemKeys, a "Run this
|
|
8
|
+
// step" gate, then a highlight ring over whatever its own verify Traits just
|
|
9
|
+
// confirmed, then a "Next" gate before moving on. Ring CSS borrowed from
|
|
10
|
+
// help-center-clip-engine's video-pipeline overlay (same purple ring +
|
|
11
|
+
// label-under-box language, minus everything camera/narration-specific).
|
|
12
|
+
// Purely CLI-level orchestration - no engine changes, no change to the
|
|
13
|
+
// non-STEP path above.
|
|
14
|
+
export const RING_CSS =
|
|
15
|
+
// Shared with pilot-overlay.ts's showPilotVision - same ring/label CSS,
|
|
16
|
+
// one source of truth (highlights.ts), so a Blind Pilot vision ring and a
|
|
17
|
+
// demo stepper ring never visually drift apart.
|
|
18
|
+
WAYGRAPH_RING_CSS +
|
|
19
|
+
// Mouse cursor icon that travels to a target before it's acted on, plus a
|
|
20
|
+
// quick expanding ripple at the moment of a click - same idea as
|
|
21
|
+
// help-center-clip-engine's #clip-cursor/#clip-ring (video-pipeline). The
|
|
22
|
+
// shape itself is an inline SVG set as innerHTML in installOverlay below
|
|
23
|
+
// (dark fill + white stroke, same as the clip-engine's own cursor) - a
|
|
24
|
+
// plain solid-white CSS clip-path (the first attempt here) had no outline
|
|
25
|
+
// at all and all but disappeared against this app's light background.
|
|
26
|
+
// Travel duration is JS-driven per call via --wg-cursor-ms, same reason
|
|
27
|
+
// the clip engine's own comment gives: a hardcoded CSS duration would
|
|
28
|
+
// make the speed param a no-op.
|
|
29
|
+
"#wg-cursor{position:fixed;z-index:2147483647;width:24px;height:24px;pointer-events:none;" +
|
|
30
|
+
"left:0;top:0;opacity:0;margin:0;" +
|
|
31
|
+
"transition:transform var(--wg-cursor-ms,600ms) cubic-bezier(.22,1,.36,1),opacity .2s ease;" +
|
|
32
|
+
"filter:drop-shadow(0 2px 4px rgba(12,12,26,.4));}" +
|
|
33
|
+
"#wg-click-pulse{position:fixed;z-index:2147483647;width:14px;height:14px;" +
|
|
34
|
+
"margin-left:-7px;margin-top:-7px;border-radius:50%;pointer-events:none;opacity:0;" +
|
|
35
|
+
"border:2px solid #7C3AED;background:rgba(124,58,237,.25);}" +
|
|
36
|
+
"#wg-click-pulse[data-tone=auto]{border-color:#9CA3AF;background:rgba(156,163,175,.28);}" +
|
|
37
|
+
"#wg-click-pulse[data-tone=info]{border-color:#3B82F6;background:rgba(59,130,246,.28);}" +
|
|
38
|
+
"#wg-click-pulse[data-tone=warning]{border-color:#EAB308;background:rgba(234,179,8,.28);}" +
|
|
39
|
+
"#wg-click-pulse[data-tone=danger]{border-color:#EF4444;background:rgba(239,68,68,.28);}" +
|
|
40
|
+
"#wg-click-pulse[data-tone=success]{border-color:#22C55E;background:rgba(34,197,94,.28);}" +
|
|
41
|
+
"#wg-click-pulse.wg-pulse{animation:wg-pulse .5s ease-out;}" +
|
|
42
|
+
"@keyframes wg-pulse{0%{opacity:.9;transform:scale(.4);}100%{opacity:0;transform:scale(2.4);}}" +
|
|
43
|
+
// Spotlight: dim everything except the highlight target (focus: true).
|
|
44
|
+
"#wg-focus-veil{position:fixed;z-index:2147483644;pointer-events:none;" +
|
|
45
|
+
"border-radius:12px;box-shadow:0 0 0 9999px rgba(8,4,20,.62);" +
|
|
46
|
+
"opacity:0;transition:opacity .3s ease,left .3s ease,top .3s ease,width .3s ease,height .3s ease;}" +
|
|
47
|
+
"#wg-focus-veil.wg-in{opacity:1;}" +
|
|
48
|
+
// Touch swipe trail (mobile/tablet orientation + device theater).
|
|
49
|
+
"#wg-swipe-layer{position:fixed;inset:0;z-index:2147483646;pointer-events:none;" +
|
|
50
|
+
"overflow:hidden;}" +
|
|
51
|
+
"#wg-swipe-layer .wg-swipe-dot{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;" +
|
|
52
|
+
"border-radius:50%;background:rgba(147,197,253,.55);border:2px solid rgba(255,255,255,.85);" +
|
|
53
|
+
"box-shadow:0 0 12px rgba(59,130,246,.55);opacity:0;}" +
|
|
54
|
+
"#wg-swipe-layer .wg-swipe-finger{position:absolute;width:28px;height:28px;margin:-14px 0 0 -14px;" +
|
|
55
|
+
"border-radius:50%;background:rgba(15,23,42,.92);border:2px solid #fff;" +
|
|
56
|
+
"box-shadow:0 4px 16px rgba(0,0,0,.4);opacity:0;" +
|
|
57
|
+
"transition:left .05s linear,top .05s linear,opacity .15s ease;}" +
|
|
58
|
+
"#wg-swipe-layer .wg-swipe-label{position:absolute;left:50%;top:18%;transform:translateX(-50%);" +
|
|
59
|
+
"padding:6px 12px;border-radius:999px;background:rgba(15,23,42,.88);color:#e0f2fe;" +
|
|
60
|
+
"border:1px solid rgba(56,189,248,.55);font:700 12px/1.2 system-ui,sans-serif;" +
|
|
61
|
+
"letter-spacing:.04em;text-transform:uppercase;opacity:0;transition:opacity .25s ease;}" +
|
|
62
|
+
"#wg-swipe-layer.wg-in .wg-swipe-label{opacity:1;}" +
|
|
63
|
+
"#wg-panel{position:fixed;z-index:2147483647;left:50%;bottom:12px;transform:translateX(-50%);" +
|
|
64
|
+
"max-width:min(92vw,640px);max-height:calc(100vh - 24px);overflow-y:auto;box-sizing:border-box;" +
|
|
65
|
+
"background:rgba(20,10,40,.94);color:#fff;border-radius:14px;" +
|
|
66
|
+
"padding:16px 20px;font:14px/1.4 system-ui,sans-serif;box-shadow:0 12px 30px rgba(0,0,0,.35);" +
|
|
67
|
+
// .06s was tuned back when the panel was removed and recreated on
|
|
68
|
+
// EVERY step - fast was the only way to avoid feeling laggy. Now that
|
|
69
|
+
// routine per-step updates reuse the same element (no fade at all - see
|
|
70
|
+
// the panel-reuse fix), this only ever fires for a genuinely fresh DOM
|
|
71
|
+
// (first load, or a real navigation - which is exactly what an episode
|
|
72
|
+
// boundary is). Slower and smoother reads as a real, comfortable
|
|
73
|
+
// transition instead of an instant pop - "eyes friendly," not laggy,
|
|
74
|
+
// since it no longer costs anything on the common case.
|
|
75
|
+
"opacity:0;transition:opacity .35s ease;}" +
|
|
76
|
+
"#wg-panel.wg-in{opacity:1;}" +
|
|
77
|
+
"#wg-panel .wg-auto{margin-top:10px;font:600 13px system-ui,sans-serif;color:#c9a6ff;}" +
|
|
78
|
+
"#wg-panel .wg-autoplay-row{margin-top:8px;}" +
|
|
79
|
+
"#wg-panel .wg-autoplay-row label{display:inline-flex;align-items:center;gap:6px;" +
|
|
80
|
+
"font:12px system-ui,sans-serif;color:#b8a0e0;cursor:pointer;user-select:none;}" +
|
|
81
|
+
"#wg-panel .wg-autoplay-row input{margin:0;cursor:pointer;}" +
|
|
82
|
+
"#wg-panel h3{margin:0 0 8px;font-size:13px;color:#c9a6ff;font-weight:700;" +
|
|
83
|
+
"letter-spacing:.02em;text-transform:uppercase;}" +
|
|
84
|
+
// Sits ABOVE the per-Block "Step i/N" heading - the episode/scenario
|
|
85
|
+
// this Block belongs to, not another block-level label. Only rendered
|
|
86
|
+
// when the chain spec actually named a real Flow (chainFlow tags it via
|
|
87
|
+
// BlockInfo.resetSessionBefore's sibling metadata) - a plain ad hoc
|
|
88
|
+
// block chain shows no episode heading at all.
|
|
89
|
+
"#wg-panel .wg-episode{margin:0 0 6px;font:700 15px system-ui,sans-serif;color:#fff;" +
|
|
90
|
+
"padding-bottom:6px;border-bottom:1px solid rgba(124,58,237,.35);}" +
|
|
91
|
+
// Pace chip - numbers speak in the overlay (2.5x / 4500ms / slow).
|
|
92
|
+
"#wg-panel .wg-pace{display:inline-flex;align-items:center;gap:8px;margin:0 0 10px;" +
|
|
93
|
+
"padding:6px 10px;border-radius:8px;background:rgba(124,58,237,.22);" +
|
|
94
|
+
"border:1px solid rgba(124,58,237,.45);font:600 12px/1.35 system-ui,sans-serif;color:#f0e8ff;}" +
|
|
95
|
+
"#wg-panel .wg-pace-badge{display:inline-block;padding:2px 8px;border-radius:999px;" +
|
|
96
|
+
"background:#7C3AED;color:#fff;font:800 11px/1.2 system-ui,sans-serif;letter-spacing:.04em;" +
|
|
97
|
+
"text-transform:uppercase;}" +
|
|
98
|
+
"#wg-panel .wg-pace[data-pace-kind=slow] .wg-pace-badge," +
|
|
99
|
+
"#wg-panel .wg-pace[data-pace-kind=num-slow] .wg-pace-badge{background:#EAB308;color:#1c1917;}" +
|
|
100
|
+
"#wg-panel .wg-pace[data-pace-kind=fast] .wg-pace-badge," +
|
|
101
|
+
"#wg-panel .wg-pace[data-pace-kind=blitz] .wg-pace-badge{background:#22C55E;color:#052e16;}" +
|
|
102
|
+
"#wg-panel .wg-pace[data-pace-kind=ms] .wg-pace-badge{background:#3B82F6;color:#fff;}" +
|
|
103
|
+
"#wg-panel .wg-narration{margin:0 0 12px;font:italic 14px/1.4 system-ui,sans-serif;color:#f0e8ff;}" +
|
|
104
|
+
// Todo checklist(s) float outside #wg-panel so --mini / Hide never hide them.
|
|
105
|
+
// Multiple docks (one per todoId) are supported - stacked on the same side.
|
|
106
|
+
// Click a dock to slide left <-> right (WAYGRAPH_TODO_POS / --todo-left|right).
|
|
107
|
+
".wg-todo-dock,#wg-todo-dock{position:fixed;z-index:2147483646;top:72px;left:14px;" +
|
|
108
|
+
"width:min(280px,42vw);max-height:calc(100vh - 100px);overflow:auto;box-sizing:border-box;" +
|
|
109
|
+
"padding:10px 12px;background:rgba(20,10,40,.94);color:#fff;border-radius:12px;" +
|
|
110
|
+
"border:1px solid rgba(124,58,237,.45);box-shadow:0 8px 24px rgba(0,0,0,.35);" +
|
|
111
|
+
"pointer-events:auto;cursor:pointer;" +
|
|
112
|
+
"transition:transform .4s cubic-bezier(.22,1,.36,1),top .35s ease,opacity .25s ease,z-index 0s;transform:translateX(0);}" +
|
|
113
|
+
".wg-todo-dock[data-pos=right],#wg-todo-dock[data-pos=right]{transform:translateX(calc(100vw - 100% - 28px));}" +
|
|
114
|
+
".wg-todo-dock[data-pos=left],#wg-todo-dock[data-pos=left]{transform:translateX(0);}" +
|
|
115
|
+
/* While a highlight ring is up: sit under the ring so captions stay readable. */
|
|
116
|
+
".wg-todo-dock.wg-todo-behind,#wg-todo-dock.wg-todo-behind{z-index:2147483643;opacity:.42;}" +
|
|
117
|
+
/* Collision tuck: shrink so a mid-page ring can still breathe. */
|
|
118
|
+
".wg-todo-dock[data-tucked=\"1\"],#wg-todo-dock[data-tucked=\"1\"]{max-height:min(28vh,220px);}" +
|
|
119
|
+
/* Compact + cap: fold overflow rows; hover / data-expanded reveals more. */
|
|
120
|
+
".wg-todo-dock[data-compact=\"1\"]:not(:hover):not([data-expanded=\"1\"]) li.wg-todo-fold{display:none;}" +
|
|
121
|
+
".wg-todo-dock[data-compact=\"1\"]:is(:hover,[data-expanded=\"1\"]) li.wg-todo-fold-deep{display:none;}" +
|
|
122
|
+
".wg-todo-dock .wg-todo-more{display:flex;align-items:center;gap:6px;margin-top:6px;padding:5px 8px;" +
|
|
123
|
+
"border-radius:8px;background:rgba(124,58,237,.22);border:1px solid rgba(124,58,237,.4);" +
|
|
124
|
+
"font:700 11px/1.2 system-ui,sans-serif;color:#e8dcff;cursor:pointer;user-select:none;}" +
|
|
125
|
+
".wg-todo-dock .wg-todo-more:hover{background:rgba(124,58,237,.35);}" +
|
|
126
|
+
".wg-todo-dock .wg-todo-dock-title{font:700 11px/1.2 system-ui,sans-serif;color:#c9a6ff;" +
|
|
127
|
+
"letter-spacing:.04em;text-transform:uppercase;margin:0 0 8px;}" +
|
|
128
|
+
".wg-todo-dock .wg-todos-list,#wg-todo-dock #wg-todos,.wg-todo-dock #wg-todos{list-style:none;margin:0;padding:0;background:transparent;border:none;}" +
|
|
129
|
+
// Video device stage: keep recordVideo size fixed; center a device-sized shell.
|
|
130
|
+
"html.wg-video-device-stage{background:#0b1220 !important;}" +
|
|
131
|
+
"html.wg-video-device-stage body{margin:0 !important;min-height:100vh !important;" +
|
|
132
|
+
"display:flex !important;align-items:center !important;justify-content:center !important;" +
|
|
133
|
+
"background:#0b1220 !important;overflow:hidden !important;}" +
|
|
134
|
+
"#wg-device-shell{flex-shrink:0;overflow:auto;background:#fff;" +
|
|
135
|
+
"border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.08);" +
|
|
136
|
+
"transform-origin:center center;" +
|
|
137
|
+
/* Force radius clip on all corners (Chrome + transform/scale). */
|
|
138
|
+
"-webkit-mask-image:-webkit-radial-gradient(white,black);" +
|
|
139
|
+
"isolation:isolate;" +
|
|
140
|
+
"transition:border-radius .55s cubic-bezier(.22,1,.36,1),box-shadow .55s ease," +
|
|
141
|
+
"transform .55s cubic-bezier(.22,1,.36,1),width .5s ease,height .5s ease,max-width .5s ease,max-height .5s ease;}" +
|
|
142
|
+
"#wg-device-shell.wg-shell-enter{border-radius:0;box-shadow:none;}" +
|
|
143
|
+
"#wg-device-shell.wg-shell-shutter-out{border-radius:0 !important;" +
|
|
144
|
+
"box-shadow:none !important;outline:none !important;border:none !important;}" +
|
|
145
|
+
"#wg-device-shell.wg-shell-desktop-flat{border-radius:0 !important;box-shadow:none !important;" +
|
|
146
|
+
"outline:none !important;border:none !important;-webkit-mask-image:none;}" +
|
|
147
|
+
// Always-on zoom HUD - bottom-right (top-left is crowded: todos + banners).
|
|
148
|
+
"#wg-zoom-badge{position:fixed;z-index:2147483646;bottom:14px;right:14px;" +
|
|
149
|
+
"display:flex;align-items:center;gap:7px;padding:6px 11px 6px 8px;" +
|
|
150
|
+
"border-radius:999px;background:rgba(20,10,40,.94);color:#f0e8ff;" +
|
|
151
|
+
"border:1px solid rgba(250,204,21,.6);box-shadow:0 6px 18px rgba(0,0,0,.4);" +
|
|
152
|
+
"font:700 12px/1.2 system-ui,sans-serif;pointer-events:none;" +
|
|
153
|
+
"opacity:1;transform:translateY(0);}" +
|
|
154
|
+
"#wg-zoom-badge .wg-zoom-ico{width:18px;height:18px;display:flex;align-items:center;justify-content:center;" +
|
|
155
|
+
"border-radius:6px;background:rgba(250,204,21,.22);}" +
|
|
156
|
+
"#wg-zoom-badge .wg-zoom-ico svg{width:14px;height:14px;display:block;}" +
|
|
157
|
+
"#wg-zoom-badge .wg-zoom-val{color:#fde68a;font-variant-numeric:tabular-nums;font-weight:800;min-width:3.2em;}" +
|
|
158
|
+
"#wg-zoom-badge[data-zoomed=\"1\"]{border-color:#fbbf24;}" +
|
|
159
|
+
// Typing chip (method fills: username / password / etc.)
|
|
160
|
+
"#wg-typing-badge{position:fixed;z-index:2147483646;bottom:88px;left:50%;transform:translateX(-50%);" +
|
|
161
|
+
"display:flex;align-items:center;gap:8px;padding:8px 14px;" +
|
|
162
|
+
"border-radius:999px;background:rgba(20,10,40,.95);color:#e0f2fe;" +
|
|
163
|
+
"border:1px solid rgba(56,189,248,.55);box-shadow:0 8px 22px rgba(0,0,0,.4);" +
|
|
164
|
+
"font:700 12px/1.2 system-ui,sans-serif;pointer-events:none;" +
|
|
165
|
+
"opacity:0;transition:opacity .2s ease;}" +
|
|
166
|
+
"#wg-typing-badge.wg-in{opacity:1;}" +
|
|
167
|
+
"#wg-typing-badge .wg-ty-dots{letter-spacing:.15em;color:#7dd3fc;}" +
|
|
168
|
+
// Device toast + chip (0.13.2+) - icon toast on fixture change, then compact chip.
|
|
169
|
+
"#wg-device-toast{position:fixed;z-index:2147483647;top:14px;right:14px;" +
|
|
170
|
+
"display:flex;align-items:center;gap:10px;min-width:200px;max-width:min(92vw,320px);" +
|
|
171
|
+
"padding:12px 14px;border-radius:14px;background:rgba(20,10,40,.96);color:#f0e8ff;" +
|
|
172
|
+
"border:1px solid rgba(124,58,237,.55);box-shadow:0 10px 28px rgba(0,0,0,.4);" +
|
|
173
|
+
"font:600 13px/1.35 system-ui,sans-serif;pointer-events:none;" +
|
|
174
|
+
"opacity:0;transform:translateX(18px) scale(.96);" +
|
|
175
|
+
"transition:opacity .35s ease,transform .45s cubic-bezier(.22,1,.36,1);}" +
|
|
176
|
+
"#wg-device-toast.wg-in{opacity:1;transform:translateX(0) scale(1);}" +
|
|
177
|
+
"#wg-device-toast.wg-out{opacity:0;transform:translateX(12px) scale(.98);}" +
|
|
178
|
+
"#wg-device-toast[data-preset=mobile]{border-color:#3B82F6;}" +
|
|
179
|
+
"#wg-device-toast[data-preset=tablet]{border-color:#22C55E;}" +
|
|
180
|
+
"#wg-device-toast[data-preset=desktop]{border-color:#9CA3AF;}" +
|
|
181
|
+
"#wg-device-toast .wg-dev-icon{flex:0 0 auto;width:36px;height:36px;border-radius:10px;" +
|
|
182
|
+
"display:flex;align-items:center;justify-content:center;background:rgba(124,58,237,.28);}" +
|
|
183
|
+
"#wg-device-toast[data-preset=mobile] .wg-dev-icon{background:rgba(59,130,246,.28);}" +
|
|
184
|
+
"#wg-device-toast[data-preset=tablet] .wg-dev-icon{background:rgba(34,197,94,.28);}" +
|
|
185
|
+
"#wg-device-toast[data-preset=desktop] .wg-dev-icon{background:rgba(156,163,175,.28);}" +
|
|
186
|
+
"#wg-device-toast .wg-dev-icon svg{width:22px;height:22px;display:block;}" +
|
|
187
|
+
"#wg-device-toast .wg-dev-copy{flex:1 1 auto;min-width:0;}" +
|
|
188
|
+
"#wg-device-toast .wg-dev-title{font:800 13px/1.2 system-ui,sans-serif;color:#fff;}" +
|
|
189
|
+
"#wg-device-toast .wg-dev-sub{margin-top:3px;font:600 11px/1.3 system-ui,sans-serif;" +
|
|
190
|
+
"color:#c9a6ff;letter-spacing:.02em;}" +
|
|
191
|
+
"#wg-device-badge{position:fixed;z-index:2147483646;top:14px;right:14px;" +
|
|
192
|
+
"display:inline-flex;align-items:center;gap:6px;padding:6px 10px 6px 8px;" +
|
|
193
|
+
"border-radius:999px;background:rgba(20,10,40,.92);color:#f0e8ff;" +
|
|
194
|
+
"border:1px solid rgba(124,58,237,.5);font:700 11px/1.2 system-ui,sans-serif;" +
|
|
195
|
+
"letter-spacing:.04em;text-transform:uppercase;pointer-events:none;" +
|
|
196
|
+
"box-shadow:0 4px 14px rgba(0,0,0,.3);opacity:0;transform:translateY(-4px);" +
|
|
197
|
+
"transition:opacity .3s ease,transform .35s cubic-bezier(.22,1,.36,1);}" +
|
|
198
|
+
"#wg-device-badge.wg-in{opacity:1;transform:translateY(0);}" +
|
|
199
|
+
"#wg-device-badge[data-preset=mobile]{border-color:#3B82F6;}" +
|
|
200
|
+
"#wg-device-badge[data-preset=tablet]{border-color:#22C55E;}" +
|
|
201
|
+
"#wg-device-badge[data-preset=desktop]{border-color:#9CA3AF;}" +
|
|
202
|
+
"#wg-device-badge .wg-dev-icon{width:16px;height:16px;display:flex;align-items:center;justify-content:center;}" +
|
|
203
|
+
"#wg-device-badge .wg-dev-icon svg{width:14px;height:14px;display:block;}" +
|
|
204
|
+
"#wg-device-badge .wg-dev-label{white-space:nowrap;}" +
|
|
205
|
+
"#wg-cursor[data-touch=1]{width:28px;height:28px;}" +
|
|
206
|
+
"#wg-todos,.wg-todos-list{list-style:none;margin:0 0 12px;padding:8px 10px;background:#0f0620;border-radius:8px;" +
|
|
207
|
+
"border:1px solid #3a2a60;}" +
|
|
208
|
+
"#wg-todos li,.wg-todos-list li{display:flex;gap:8px;align-items:flex-start;margin:0 0 6px;font:600 12.5px/1.35 system-ui,sans-serif;}" +
|
|
209
|
+
"#wg-todos li:last-child,.wg-todos-list li:last-child{margin-bottom:0;}" +
|
|
210
|
+
"#wg-todos .wg-todo-mark,.wg-todos-list .wg-todo-mark{flex:0 0 auto;width:1.1em;text-align:center;}" +
|
|
211
|
+
"#wg-todos .wg-todo-done,.wg-todos-list .wg-todo-done{color:#6ee7b7;text-decoration:line-through;opacity:.85;}" +
|
|
212
|
+
"#wg-todos .wg-todo-current,.wg-todos-list .wg-todo-current{color:#fff;}" +
|
|
213
|
+
"#wg-todos .wg-todo-pending,.wg-todos-list .wg-todo-pending{color:#9a7ad1;}" +
|
|
214
|
+
"#wg-todos[data-wg-todo-style=bullets] .wg-todo-pending," +
|
|
215
|
+
"#wg-todos[data-wg-todo-style=bullets] .wg-todo-current," +
|
|
216
|
+
".wg-todos-list[data-wg-todo-style=bullets] .wg-todo-pending," +
|
|
217
|
+
".wg-todos-list[data-wg-todo-style=bullets] .wg-todo-current{color:#e8dcff;}" +
|
|
218
|
+
"#wg-todos[data-wg-todo-style=bullets] .wg-todo-mark," +
|
|
219
|
+
".wg-todos-list[data-wg-todo-style=bullets] .wg-todo-mark{color:#c9a6ff;}" +
|
|
220
|
+
"#wg-progress{height:4px;background:#2a1650;border-radius:2px;margin:0 0 12px;overflow:hidden;}" +
|
|
221
|
+
"#wg-progress-bar{height:100%;background:#7C3AED;border-radius:2px;transition:width .3s ease;}" +
|
|
222
|
+
// A real tab bar for episodes - the currently-active episode reads as
|
|
223
|
+
// active (filled underline, full-brightness text), every other episode
|
|
224
|
+
// reads as inactive (dimmed, no underline) - Dan's own ask: "if episode
|
|
225
|
+
// 1 is active, the episode 2 tab is inactive." Only rendered when the
|
|
226
|
+
// chain spec actually named real Flows (chainFlow tags each via
|
|
227
|
+
// BlockInfo - same gate the "Episode N:" heading already uses); an
|
|
228
|
+
// ad hoc block chain with no episodes shows no tab bar at all.
|
|
229
|
+
"#wg-episodes{display:flex;gap:4px;margin:0 0 10px;border-bottom:1px solid #3a2a60;}" +
|
|
230
|
+
"#wg-episodes .wg-ep-tab{padding:6px 14px 8px;font:600 12px system-ui,sans-serif;" +
|
|
231
|
+
"border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap;}" +
|
|
232
|
+
"#wg-episodes .wg-ep-current{color:#fff;border-bottom-color:#7C3AED;}" +
|
|
233
|
+
"#wg-episodes .wg-ep-done{color:#9a7ad1;}" +
|
|
234
|
+
"#wg-episodes .wg-ep-upcoming{color:#5a4a80;}" +
|
|
235
|
+
// A one-time, gentle signal for "you just entered this episode" - Dan:
|
|
236
|
+
// "i want a clear ui eyes friendly to remind me that i am on next
|
|
237
|
+
// episode." A slow outward glow, not an opacity blink/strobe (that's
|
|
238
|
+
// exactly the kind of flashing that already caused the original
|
|
239
|
+
// complaint) - plays once (no loop), 1.1s, only on the FIRST block of a
|
|
240
|
+
// newly-entered episode, not on every step within it.
|
|
241
|
+
"@keyframes wg-ep-enter{0%{box-shadow:0 0 0 0 rgba(124,58,237,.55);}" +
|
|
242
|
+
"100%{box-shadow:0 0 0 10px rgba(124,58,237,0);}}" +
|
|
243
|
+
"#wg-episodes .wg-ep-entered{border-radius:6px;animation:wg-ep-enter 1.1s ease-out;}" +
|
|
244
|
+
// Block strip: carousel (default) or classic wrap (--full).
|
|
245
|
+
"#wg-modules.wg-modules-carousel{display:flex;flex-wrap:nowrap;gap:8px;margin:0 0 10px;" +
|
|
246
|
+
"overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;" +
|
|
247
|
+
"padding:4px 2px 8px;scrollbar-width:thin;}" +
|
|
248
|
+
"#wg-modules.wg-modules-carousel .wg-mod{flex:0 0 auto;scroll-snap-align:center;" +
|
|
249
|
+
"padding:6px 12px;border-radius:999px;font:600 12px system-ui,sans-serif;}" +
|
|
250
|
+
"#wg-modules.wg-modules-carousel .wg-mod-current{transform:scale(1.06);" +
|
|
251
|
+
"box-shadow:0 0 0 2px rgba(124,58,237,.45);}" +
|
|
252
|
+
"#wg-modules.wg-modules-full{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px;}" +
|
|
253
|
+
"#wg-modules.wg-modules-full .wg-mod{padding:3px 9px;border-radius:6px;font:600 11px system-ui,sans-serif;}" +
|
|
254
|
+
"#wg-modules .wg-mod-done{background:#2a1650;color:#9a7ad1;}" +
|
|
255
|
+
"#wg-modules .wg-mod-current{background:#7C3AED;color:#fff;}" +
|
|
256
|
+
"#wg-modules .wg-mod-upcoming{background:transparent;color:#5a4a80;border:1px solid #3a2a60;}" +
|
|
257
|
+
"#wg-banner{position:fixed;z-index:2147483647;top:14px;max-width:320px;" +
|
|
258
|
+
"background:rgba(20,10,40,.94);color:#fff;border-radius:12px;padding:10px 16px;" +
|
|
259
|
+
"font:14px/1.4 system-ui,sans-serif;box-shadow:0 8px 20px rgba(0,0,0,.3);" +
|
|
260
|
+
"border:1px solid rgba(124,58,237,.4);cursor:pointer;user-select:none;}" +
|
|
261
|
+
"#wg-banner[data-pos=left]{left:14px;right:auto;transform:none;}" +
|
|
262
|
+
"#wg-banner[data-pos=center]{left:50%;right:auto;transform:translateX(-50%);}" +
|
|
263
|
+
"#wg-banner[data-pos=right]{right:14px;left:auto;transform:none;}" +
|
|
264
|
+
"#wg-banner .wg-banner-tag{display:block;font-size:10px;font-weight:700;color:#c9a6ff;" +
|
|
265
|
+
"letter-spacing:.05em;text-transform:uppercase;margin-bottom:2px;}" +
|
|
266
|
+
"#wg-panel .wg-key{margin:8px 0;}" +
|
|
267
|
+
// A live, human-readable preview of what's about to be written for this
|
|
268
|
+
// MemKey - Dan: "i want pretty to exist in memkeys too... it shows what
|
|
269
|
+
// input its gonig to be written." Same global Pretty/JSON preference the
|
|
270
|
+
// result display already has (window.__wgPretty) - hidden entirely in
|
|
271
|
+
// JSON mode, since the raw textarea already speaks for itself there.
|
|
272
|
+
"#wg-panel .wg-key-pretty{margin-top:4px;font:12px/1.5 system-ui,sans-serif;" +
|
|
273
|
+
"background:#0f0620;border-radius:6px;padding:6px 8px;}" +
|
|
274
|
+
"#wg-panel .wg-key-pretty-row{color:#f0e8ff;}" +
|
|
275
|
+
"#wg-panel .wg-key-pretty-label{color:#9a7ad1;font-weight:600;}" +
|
|
276
|
+
"#wg-panel label{display:block;font-size:12px;color:#d8c8ff;margin-bottom:3px;}" +
|
|
277
|
+
"#wg-panel textarea{width:100%;box-sizing:border-box;background:#0f0620;color:#fff;" +
|
|
278
|
+
"border:1px solid #4b2a80;border-radius:8px;padding:6px 8px;font:12px/1.3 monospace;resize:vertical;}" +
|
|
279
|
+
"#wg-panel button{margin-top:10px;background:#7C3AED;color:#fff;border:none;border-radius:8px;" +
|
|
280
|
+
"padding:8px 16px;font:600 13px system-ui,sans-serif;cursor:pointer;}" +
|
|
281
|
+
"#wg-panel button:hover{background:#6b2fd6;}" +
|
|
282
|
+
"#wg-panel button:disabled{background:#4b2a80;cursor:default;opacity:.7;}" +
|
|
283
|
+
"#wg-panel textarea:disabled{opacity:.6;}" +
|
|
284
|
+
"#wg-panel .wg-result{font:12px/1.4 monospace;background:#0f0620;border-radius:8px;padding:8px;" +
|
|
285
|
+
"margin:8px 0;white-space:pre-wrap;}" +
|
|
286
|
+
"#wg-panel .wg-result-pretty{font:600 14px/1.4 system-ui,sans-serif;}" +
|
|
287
|
+
"#wg-panel .wg-toggle{display:flex;gap:4px;margin:0 0 4px;}" +
|
|
288
|
+
"#wg-panel .wg-toggle button{margin:0;padding:3px 10px;font:600 11px system-ui,sans-serif;" +
|
|
289
|
+
"background:transparent;border:1px solid #4b2a80;color:#9a7ad1;border-radius:6px;}" +
|
|
290
|
+
"#wg-panel .wg-toggle button.wg-active{background:#4b2a80;color:#fff;}" +
|
|
291
|
+
"#wg-panel.wg-error{border:1.5px solid #e0475c;}" +
|
|
292
|
+
"#wg-panel .wg-error-heading{color:#ff8fa0;}" +
|
|
293
|
+
"#wg-panel .wg-error-msg{font:12px/1.5 monospace;background:#2a0f16;color:#ffc7cf;" +
|
|
294
|
+
"border-radius:8px;padding:10px;margin:0 0 12px;white-space:pre-wrap;max-height:200px;overflow-y:auto;}" +
|
|
295
|
+
"#wg-panel .wg-error-actions{display:flex;gap:8px;}" +
|
|
296
|
+
"#wg-panel .wg-error-stop{background:#e0475c;margin-top:0;}" +
|
|
297
|
+
"#wg-panel .wg-error-stop:hover{background:#c33a4c;}" +
|
|
298
|
+
"#wg-panel .wg-error-retry{background:#2a9d6f;margin-top:0;}" +
|
|
299
|
+
"#wg-panel .wg-error-retry:hover{background:#22855e;}" +
|
|
300
|
+
"#wg-panel.wg-expected{border:1.5px solid #e0a53e;}" +
|
|
301
|
+
"#wg-panel .wg-expected-heading{color:#ffcf7a;}" +
|
|
302
|
+
"#wg-panel .wg-expected-reason{font:600 12.5px/1.5 system-ui,sans-serif;background:#2a2410;" +
|
|
303
|
+
"color:#ffe6ae;border-radius:8px;padding:10px;margin:0 0 8px;}" +
|
|
304
|
+
// Hide / Show chrome: collapsed = compact "N / M · block" pill + Next (manual).
|
|
305
|
+
"#wg-panel .wg-chrome{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px;}" +
|
|
306
|
+
"#wg-panel .wg-chrome-title{font:700 11px/1.2 system-ui,sans-serif;color:#c9a6ff;" +
|
|
307
|
+
"letter-spacing:.04em;text-transform:uppercase;flex:1;min-width:0;}" +
|
|
308
|
+
"#wg-panel .wg-chrome-actions{display:flex;align-items:center;gap:6px;flex-shrink:0;}" +
|
|
309
|
+
"#wg-panel button.wg-hide-btn,#wg-panel button.wg-mini-next{margin:0;padding:4px 10px;font:600 11px system-ui,sans-serif;" +
|
|
310
|
+
"background:#3a2a60;color:#e8dcff;border:1px solid #5b3aa8;border-radius:6px;cursor:pointer;}" +
|
|
311
|
+
"#wg-panel button.wg-hide-btn:hover,#wg-panel button.wg-mini-next:hover{background:#4b2a80;}" +
|
|
312
|
+
"#wg-panel button.wg-mini-next{background:#2a9d6f;border-color:#22855e;color:#fff;display:none;}" +
|
|
313
|
+
"#wg-panel button.wg-mini-next:hover{background:#22855e;}" +
|
|
314
|
+
"#wg-panel button.wg-mini-next:disabled{opacity:.55;cursor:default;}" +
|
|
315
|
+
"#wg-panel.wg-collapsed{width:auto;max-width:92vw;padding:8px 12px;max-height:none;overflow:hidden;}" +
|
|
316
|
+
"#wg-panel.wg-collapsed .wg-body{display:none;}" +
|
|
317
|
+
"#wg-panel.wg-collapsed .wg-chrome{margin:0;}" +
|
|
318
|
+
"#wg-panel.wg-collapsed .wg-chrome-title{font:700 13px/1.25 system-ui,sans-serif;color:#fff;" +
|
|
319
|
+
"letter-spacing:0;text-transform:none;}" +
|
|
320
|
+
"#wg-panel.wg-collapsed button.wg-mini-next.wg-mini-next-show{display:inline-block;}" +
|
|
321
|
+
"@media (max-width:640px){" +
|
|
322
|
+
"#wg-panel{left:8px;right:8px;bottom:8px;transform:none;max-width:none;width:auto;" +
|
|
323
|
+
"max-height:min(55vh,calc(100vh - 16px));padding:12px 14px;border-radius:12px;}" +
|
|
324
|
+
"#wg-panel.wg-collapsed{left:50%;right:auto;transform:translateX(-50%);width:auto;}" +
|
|
325
|
+
"#wg-episodes{overflow-x:auto;-webkit-overflow-scrolling:touch;flex-wrap:nowrap;}" +
|
|
326
|
+
"#wg-panel .wg-narration{font-size:13px;}" +
|
|
327
|
+
"#wg-panel button{width:100%;}" +
|
|
328
|
+
"#wg-panel.wg-collapsed button.wg-mini-next,#wg-panel.wg-collapsed button.wg-hide-btn{width:auto;}" +
|
|
329
|
+
"#wg-panel .wg-error-actions{flex-direction:column;}" +
|
|
330
|
+
"#wg-banner{max-width:min(92vw,320px);font-size:13px;}" +
|
|
331
|
+
"}";
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
// Purple dot favicon (matches the overlay's own theme color) - the tab-bar
|
|
335
|
+
// signal that "this Chromium window is a waygraph run," even at a glance
|
|
336
|
+
// across a taskbar/alt-tab, not just something visible inside the page.
|
|
337
|
+
export const WAYGRAPH_FAVICON =
|
|
338
|
+
"data:image/svg+xml," +
|
|
339
|
+
encodeURIComponent(
|
|
340
|
+
"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'>" +
|
|
341
|
+
"<circle cx='16' cy='16' r='14' fill='#7C3AED'/></svg>",
|
|
342
|
+
);
|