waygraph 0.15.27 → 0.15.29
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/highlights/css.js +2 -44
- package/dist/pilot-overlay.d.ts +0 -18
- package/dist/pilot-overlay.js +27 -32
- package/dist/runner/inpage/banner.js +68 -0
- package/dist/runner/inpage/core.js +267 -0
- package/dist/runner/inpage/device.js +211 -0
- package/dist/runner/inpage/panel-chrome.js +152 -0
- package/dist/runner/inpage/stamp.js +46 -0
- package/dist/runner/inpage/swipe-zoom.js +220 -0
- package/dist/runner/inpage/todos.js +332 -0
- package/dist/runner/overlay-css.js +7 -18
- package/dist/runner/overlay-install.js +15 -1269
- package/dist/step-overlay.js +2 -46
- package/dist/ui/components/banner.d.ts +2 -0
- package/dist/ui/components/banner.js +10 -0
- package/dist/ui/components/cursor.d.ts +2 -0
- package/dist/ui/components/cursor.js +19 -0
- package/dist/ui/components/ring.d.ts +4 -0
- package/dist/ui/components/ring.js +44 -0
- package/dist/ui/compose.d.ts +4 -0
- package/dist/ui/compose.js +7 -0
- package/dist/ui/tokens.d.ts +31 -0
- package/dist/ui/tokens.js +21 -0
- package/examples/saucedemo/.waygraph-auto/2324269a.log +0 -0
- package/examples/saucedemo/.waygraph-auto/3f088138.log +0 -0
- package/examples/saucedemo/.waygraph-auto/42e014d1.log +0 -0
- package/examples/saucedemo/.waygraph-auto/6706ead4.log +0 -0
- package/examples/saucedemo/.waygraph-auto/7773a809.log +0 -0
- package/examples/saucedemo/.waygraph-auto/94221b2b.log +0 -0
- package/examples/saucedemo/.waygraph-auto/c60cc55e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/da6ebb31.log +0 -0
- package/examples/saucedemo/.waygraph-auto/e03cfd8e.log +0 -0
- package/examples/saucedemo/.waygraph-auto/f2943898.log +0 -0
- package/package.json +1 -1
package/dist/step-overlay.js
CHANGED
|
@@ -1,49 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// Opacity only - tone color must snap (no gray/purple/yellow morph).
|
|
4
|
-
"transition:opacity .3s ease;}" +
|
|
5
|
-
// Automation = gray; semantic tones for authored highlights.
|
|
6
|
-
"#wg-ring[data-tone=planned]{border-color:#7C3AED;box-shadow:0 0 0 4px rgba(124,58,237,.16);}" +
|
|
7
|
-
"#wg-ring[data-tone=auto]{border-color:#9CA3AF;box-shadow:0 0 0 4px rgba(156,163,175,.28);}" +
|
|
8
|
-
"#wg-ring[data-tone=info]{border-color:#3B82F6;box-shadow:0 0 0 4px rgba(59,130,246,.22);}" +
|
|
9
|
-
"#wg-ring[data-tone=warning]{border-color:#EAB308;box-shadow:0 0 0 4px rgba(234,179,8,.22);}" +
|
|
10
|
-
"#wg-ring[data-tone=danger]{border-color:#EF4444;box-shadow:0 0 0 4px rgba(239,68,68,.22);}" +
|
|
11
|
-
"#wg-ring[data-tone=success]{border-color:#22C55E;box-shadow:0 0 0 4px rgba(34,197,94,.22);}" +
|
|
12
|
-
"#wg-ring-label{position:fixed;z-index:2147483646;pointer-events:none;opacity:0;" +
|
|
13
|
-
"white-space:nowrap;padding:4px 9px;border-radius:7px;background:#7C3AED;color:#fff;" +
|
|
14
|
-
"font:600 12px/1.2 system-ui,sans-serif;transition:opacity .3s ease;}" +
|
|
15
|
-
"#wg-ring-label[data-tone=planned]{background:#7C3AED;color:#fff;}" +
|
|
16
|
-
"#wg-ring-label[data-tone=auto]{background:#6B7280;color:#fff;}" +
|
|
17
|
-
"#wg-ring-label[data-tone=info]{background:#2563EB;color:#fff;}" +
|
|
18
|
-
"#wg-ring-label[data-tone=warning]{background:#EAB308;color:#1c1917;}" +
|
|
19
|
-
"#wg-ring-label[data-tone=danger]{background:#DC2626;color:#fff;}" +
|
|
20
|
-
"#wg-ring-label[data-tone=success]{background:#16A34A;color:#fff;}" +
|
|
21
|
-
"#wg-ring[data-size=sm]{border-width:1.5px;border-radius:8px;}" +
|
|
22
|
-
"#wg-ring[data-size=lg]{border-width:4px;border-radius:12px;}" +
|
|
23
|
-
"#wg-ring-label[data-size=sm]{font-size:10px;line-height:1.25;padding:4px 7px;border-radius:5px;}" +
|
|
24
|
-
"#wg-ring-label[data-size=lg]{font-size:16px;line-height:1.35;padding:8px 14px;border-radius:9px;}" +
|
|
25
|
-
"#wg-ring-label[data-weight=bold]{font-weight:800;}" +
|
|
26
|
-
"#wg-ring-label[data-weight=normal]{font-weight:600;}" +
|
|
27
|
-
"#wg-cursor{position:fixed;z-index:2147483647;width:24px;height:24px;pointer-events:none;" +
|
|
28
|
-
"left:0;top:0;opacity:0;margin:0;" +
|
|
29
|
-
"transition:transform var(--wg-cursor-ms,600ms) cubic-bezier(.22,1,.36,1),opacity .2s ease;" +
|
|
30
|
-
"filter:drop-shadow(0 2px 4px rgba(12,12,26,.4));}" +
|
|
31
|
-
"#wg-click-pulse{position:fixed;z-index:2147483647;width:14px;height:14px;" +
|
|
32
|
-
"margin-left:-7px;margin-top:-7px;border-radius:50%;pointer-events:none;opacity:0;" +
|
|
33
|
-
"border:2px solid #7C3AED;background:rgba(124,58,237,.25);}" +
|
|
34
|
-
"#wg-click-pulse[data-tone=auto]{border-color:#9CA3AF;background:rgba(156,163,175,.28);}" +
|
|
35
|
-
"#wg-click-pulse[data-tone=info]{border-color:#3B82F6;background:rgba(59,130,246,.28);}" +
|
|
36
|
-
"#wg-click-pulse[data-tone=warning]{border-color:#EAB308;background:rgba(234,179,8,.28);}" +
|
|
37
|
-
"#wg-click-pulse[data-tone=danger]{border-color:#EF4444;background:rgba(239,68,68,.28);}" +
|
|
38
|
-
"#wg-click-pulse[data-tone=success]{border-color:#22C55E;background:rgba(34,197,94,.28);}" +
|
|
39
|
-
"#wg-click-pulse.wg-pulse{animation:wg-pulse .5s ease-out;}" +
|
|
40
|
-
"@keyframes wg-pulse{0%{opacity:.9;transform:scale(.4);}100%{opacity:0;transform:scale(2.4);}}" +
|
|
41
|
-
"#wg-banner{position:fixed;z-index:2147483647;top:14px;left:14px;" +
|
|
42
|
-
"background:rgba(20,10,40,.94);color:#fff;border-radius:12px;padding:10px 16px;" +
|
|
43
|
-
"font:14px/1.4 system-ui,sans-serif;box-shadow:0 8px 20px rgba(0,0,0,.3);" +
|
|
44
|
-
"border:1px solid rgba(124,58,237,.4);}" +
|
|
45
|
-
"#wg-banner .wg-banner-tag{display:block;font-size:10px;font-weight:700;color:#c9a6ff;" +
|
|
46
|
-
"letter-spacing:.05em;text-transform:uppercase;margin-bottom:2px;}";
|
|
1
|
+
import { composeStepOverlay } from "./ui/compose.js";
|
|
2
|
+
const RING_CSS = composeStepOverlay();
|
|
47
3
|
const FAVICON = "data:image/svg+xml," +
|
|
48
4
|
encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='14' fill='#7C3AED'/></svg>");
|
|
49
5
|
export async function installDemoChrome(page, title = "waygraph auto", options = {}) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ACCENT_SOFT, SURFACE } from "../tokens.js";
|
|
2
|
+
/** Top-left demo banner (`#wg-banner`). */
|
|
3
|
+
export function bannerCss() {
|
|
4
|
+
return ("#wg-banner{position:fixed;z-index:2147483647;top:14px;left:14px;" +
|
|
5
|
+
`background:${SURFACE};color:#fff;border-radius:12px;padding:10px 16px;` +
|
|
6
|
+
"font:14px/1.4 system-ui,sans-serif;box-shadow:0 8px 20px rgba(0,0,0,.3);" +
|
|
7
|
+
"border:1px solid rgba(124,58,237,.4);}" +
|
|
8
|
+
`#wg-banner .wg-banner-tag{display:block;font-size:10px;font-weight:700;color:${ACCENT_SOFT};` +
|
|
9
|
+
"letter-spacing:.05em;text-transform:uppercase;margin-bottom:2px;}");
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TONES } from "../tokens.js";
|
|
2
|
+
/** Travelling mouse cursor + click ripple (`#wg-cursor`, `#wg-click-pulse`). */
|
|
3
|
+
export function cursorCss() {
|
|
4
|
+
const p = TONES.planned;
|
|
5
|
+
const pulseTones = ["auto", "info", "warning", "danger", "success"]
|
|
6
|
+
.map((n) => `#wg-click-pulse[data-tone=${n}]{border-color:${TONES[n].ring};background:${TONES[n].pulse};}`)
|
|
7
|
+
.join("");
|
|
8
|
+
return ("#wg-cursor{position:fixed;z-index:2147483647;width:24px;height:24px;pointer-events:none;" +
|
|
9
|
+
"left:0;top:0;opacity:0;margin:0;" +
|
|
10
|
+
// Travel time is JS-driven via --wg-cursor-ms (a hardcoded duration would make speed a no-op).
|
|
11
|
+
"transition:transform var(--wg-cursor-ms,600ms) cubic-bezier(.22,1,.36,1),opacity .2s ease;" +
|
|
12
|
+
"filter:drop-shadow(0 2px 4px rgba(12,12,26,.4));}" +
|
|
13
|
+
"#wg-click-pulse{position:fixed;z-index:2147483647;width:14px;height:14px;" +
|
|
14
|
+
"margin-left:-7px;margin-top:-7px;border-radius:50%;pointer-events:none;opacity:0;" +
|
|
15
|
+
`border:2px solid ${p.ring};background:${p.pulse};}` +
|
|
16
|
+
pulseTones +
|
|
17
|
+
"#wg-click-pulse.wg-pulse{animation:wg-pulse .5s ease-out;}" +
|
|
18
|
+
"@keyframes wg-pulse{0%{opacity:.9;transform:scale(.4);}100%{opacity:0;transform:scale(2.4);}}");
|
|
19
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The highlight ring + its label (`#wg-ring`, `#wg-ring-label`): tone / size / weight variants. */
|
|
2
|
+
export declare function ringCss(): string;
|
|
3
|
+
/** Agent-sent pilot fixture rings/labels (`.wg-pilot-fx-ring|label`), same tones as the demo ring. */
|
|
4
|
+
export declare function pilotFxRingCss(): string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TONES } from "../tokens.js";
|
|
2
|
+
const toneNames = Object.keys(TONES);
|
|
3
|
+
/** Tone rules for `sel[data-tone=x]{...}` from the token table. */
|
|
4
|
+
function toneRules(sel, decl, only) {
|
|
5
|
+
return (only ?? toneNames).map((n) => `${sel}[data-tone=${n}]{${decl(TONES[n])}}`).join("");
|
|
6
|
+
}
|
|
7
|
+
/** The highlight ring + its label (`#wg-ring`, `#wg-ring-label`): tone / size / weight variants. */
|
|
8
|
+
export function ringCss() {
|
|
9
|
+
const p = TONES.planned;
|
|
10
|
+
return ("#wg-ring{position:fixed;z-index:2147483646;pointer-events:none;opacity:0;" +
|
|
11
|
+
`border:2.5px solid ${p.ring};border-radius:10px;` +
|
|
12
|
+
// Opacity fade only - NEVER transition border-color/box-shadow: tone swaps must snap.
|
|
13
|
+
`box-shadow:0 0 0 4px ${p.glow};transition:opacity .3s ease;}` +
|
|
14
|
+
toneRules("#wg-ring", (t) => `border-color:${t.ring};box-shadow:0 0 0 4px ${t.glow};`) +
|
|
15
|
+
// A real element (not ::after) so JS can measure it and clamp it back onto the screen.
|
|
16
|
+
"#wg-ring-label{position:fixed;z-index:2147483646;pointer-events:none;opacity:0;" +
|
|
17
|
+
`max-width:min(360px,70vw);white-space:normal;padding:6px 10px;border-radius:7px;background:${p.labelBg};color:${p.labelFg};` +
|
|
18
|
+
"font:600 12px/1.35 system-ui,sans-serif;transition:opacity .3s ease;}" +
|
|
19
|
+
toneRules("#wg-ring-label", (t) => `background:${t.labelBg};color:${t.labelFg};`) +
|
|
20
|
+
"#wg-ring[data-size=sm]{border-width:1.5px;border-radius:8px;}" +
|
|
21
|
+
"#wg-ring[data-size=lg]{border-width:4px;border-radius:12px;}" +
|
|
22
|
+
"#wg-ring-label[data-size=sm]{font-size:10px;line-height:1.25;padding:4px 7px;border-radius:5px;}" +
|
|
23
|
+
"#wg-ring-label[data-size=lg]{font-size:16px;line-height:1.35;padding:8px 14px;border-radius:9px;max-width:min(480px,85vw);}" +
|
|
24
|
+
"#wg-ring-label[data-weight=bold]{font-weight:800;}" +
|
|
25
|
+
"#wg-ring-label[data-weight=normal]{font-weight:600;}");
|
|
26
|
+
}
|
|
27
|
+
/** Agent-sent pilot fixture rings/labels (`.wg-pilot-fx-ring|label`), same tones as the demo ring. */
|
|
28
|
+
export function pilotFxRingCss() {
|
|
29
|
+
const p = TONES.planned;
|
|
30
|
+
return (".wg-pilot-fx-ring{position:fixed;z-index:2147483645;pointer-events:none;opacity:0;" +
|
|
31
|
+
`border:3px solid ${p.ring};border-radius:10px;box-sizing:border-box;` +
|
|
32
|
+
"transition:opacity .12s ease,left .12s,top .12s,width .12s,height .12s;}" +
|
|
33
|
+
toneRules(".wg-pilot-fx-ring", (t) => `border-color:${t.ring};box-shadow:0 0 0 4px ${t.glow};`) +
|
|
34
|
+
".wg-pilot-fx-label{position:fixed;z-index:2147483645;pointer-events:none;opacity:0;" +
|
|
35
|
+
"font:600 12px/1.3 ui-sans-serif,system-ui,sans-serif;padding:5px 9px;border-radius:6px;" +
|
|
36
|
+
"max-width:min(360px,80vw);box-shadow:0 2px 8px rgba(0,0,0,.25);white-space:nowrap;" +
|
|
37
|
+
"overflow:hidden;text-overflow:ellipsis;transition:opacity .12s ease;}" +
|
|
38
|
+
toneRules(".wg-pilot-fx-label", (t) => `background:${t.labelBg};color:${t.labelFg};`) +
|
|
39
|
+
".wg-pilot-fx-ring[data-size=sm]{border-width:1.5px;border-radius:8px;}" +
|
|
40
|
+
".wg-pilot-fx-ring[data-size=lg]{border-width:4px;border-radius:12px;}" +
|
|
41
|
+
".wg-pilot-fx-label[data-size=sm]{font-size:10px;padding:4px 7px;}" +
|
|
42
|
+
".wg-pilot-fx-label[data-size=lg]{font-size:16px;padding:8px 14px;}" +
|
|
43
|
+
".wg-pilot-fx-label[data-weight=bold]{font-weight:800;}");
|
|
44
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { bannerCss } from "./components/banner.js";
|
|
2
|
+
import { cursorCss } from "./components/cursor.js";
|
|
3
|
+
import { pilotFxRingCss, ringCss } from "./components/ring.js";
|
|
4
|
+
/** Surface bundles: each surface asks only for the components it paints. */
|
|
5
|
+
export const composeRing = () => ringCss();
|
|
6
|
+
export const composeStepOverlay = () => ringCss() + cursorCss() + bannerCss();
|
|
7
|
+
export const composePilotFx = () => ringCss() + pilotFxRingCss();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens for every waygraph overlay surface (demo stepper, pilot badge/panel,
|
|
3
|
+
* step overlay). The one place a colour changes: components in ./components build their
|
|
4
|
+
* CSS from these, so surfaces cannot drift apart.
|
|
5
|
+
*/
|
|
6
|
+
export type ToneName = "planned" | "auto" | "info" | "warning" | "danger" | "success" | "orange";
|
|
7
|
+
export interface Tone {
|
|
8
|
+
/** Ring border + click-pulse border. */
|
|
9
|
+
ring: string;
|
|
10
|
+
/** Ring halo (box-shadow) colour. */
|
|
11
|
+
glow: string;
|
|
12
|
+
/** Click-pulse fill. */
|
|
13
|
+
pulse: string;
|
|
14
|
+
/** Label background / foreground. */
|
|
15
|
+
labelBg: string;
|
|
16
|
+
labelFg: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const TONES: Record<ToneName, Tone>;
|
|
19
|
+
/** Dark surface shared by panels, banner, docks, HUD chips. */
|
|
20
|
+
export declare const SURFACE = "rgba(20,10,40,.94)";
|
|
21
|
+
export declare const ACCENT = "#7C3AED";
|
|
22
|
+
/** Secondary accent used on the dark surface (section titles, kinds). */
|
|
23
|
+
export declare const ACCENT_SOFT = "#c9a6ff";
|
|
24
|
+
/** Stacking order: one scale instead of magic numbers. */
|
|
25
|
+
export declare const Z: {
|
|
26
|
+
readonly top: 2147483647;
|
|
27
|
+
readonly ring: 2147483646;
|
|
28
|
+
readonly fx: 2147483645;
|
|
29
|
+
readonly focus: 2147483644;
|
|
30
|
+
readonly dock: 2147483000;
|
|
31
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens for every waygraph overlay surface (demo stepper, pilot badge/panel,
|
|
3
|
+
* step overlay). The one place a colour changes: components in ./components build their
|
|
4
|
+
* CSS from these, so surfaces cannot drift apart.
|
|
5
|
+
*/
|
|
6
|
+
export const TONES = {
|
|
7
|
+
planned: { ring: "#7C3AED", glow: "rgba(124,58,237,.16)", pulse: "rgba(124,58,237,.25)", labelBg: "#7C3AED", labelFg: "#fff" },
|
|
8
|
+
auto: { ring: "#9CA3AF", glow: "rgba(156,163,175,.28)", pulse: "rgba(156,163,175,.28)", labelBg: "#6B7280", labelFg: "#fff" },
|
|
9
|
+
info: { ring: "#3B82F6", glow: "rgba(59,130,246,.22)", pulse: "rgba(59,130,246,.28)", labelBg: "#2563EB", labelFg: "#fff" },
|
|
10
|
+
warning: { ring: "#EAB308", glow: "rgba(234,179,8,.22)", pulse: "rgba(234,179,8,.28)", labelBg: "#EAB308", labelFg: "#1c1917" },
|
|
11
|
+
danger: { ring: "#EF4444", glow: "rgba(239,68,68,.22)", pulse: "rgba(239,68,68,.28)", labelBg: "#DC2626", labelFg: "#fff" },
|
|
12
|
+
success: { ring: "#22C55E", glow: "rgba(34,197,94,.22)", pulse: "rgba(34,197,94,.28)", labelBg: "#16A34A", labelFg: "#fff" },
|
|
13
|
+
orange: { ring: "#F97316", glow: "rgba(249,115,22,.22)", pulse: "rgba(249,115,22,.28)", labelBg: "#EA580C", labelFg: "#fff" },
|
|
14
|
+
};
|
|
15
|
+
/** Dark surface shared by panels, banner, docks, HUD chips. */
|
|
16
|
+
export const SURFACE = "rgba(20,10,40,.94)";
|
|
17
|
+
export const ACCENT = "#7C3AED";
|
|
18
|
+
/** Secondary accent used on the dark surface (section titles, kinds). */
|
|
19
|
+
export const ACCENT_SOFT = "#c9a6ff";
|
|
20
|
+
/** Stacking order: one scale instead of magic numbers. */
|
|
21
|
+
export const Z = { top: 2147483647, ring: 2147483646, fx: 2147483645, focus: 2147483644, dock: 2147483000 };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|