// Plan2Code Web Console - the launching, starting and waiting screens, with Planny's poses; defines only. import { page, redraw } from "../state.js"; import { el, approvalTip } from "../render.js"; import { startPose, startingHint, staleLaunchFeedback, workflowTitle } from "../answers.js"; import { continueButton } from "../continue-button.js"; import { skillByName } from "../skills.js"; import { agentAdrift, doingNow, docs, loopDriving } from "../selectors.js"; const $ = (id) => document.getElementById(id); const LAUNCH_QUIPS = [ "Passing Planny the baton…", "Reading the manual…", "Polishing the star…", "Warming up the engines…", "Laying out the good pens…", "Consulting the map…", "Putting the kettle on…", "Rolling out the checklist…", "Tying Planny's laces…", "Winding up the star…", "Sharpening the pencils…", "Untangling the fairy lights…", "Bribing the progress bar…", "Warming up the ink…", "Aligning the stars…", "Blowing the dust off the plans…", "Locating the missing semicolon…", "Feeding the hamster…", "Buttering the toast…", "Spinning up the idea mill…", "Plumping the cushions…", "Turning the whimsy dial…", "Oiling the gears…", "Counting the paperclips…", "Practicing the victory wave…", "Rolling a fresh D20…", "Peeling the shrink-wrap…", "Summoning the right incantation…", "Rounding up the ideas…", "Stretching before the sprint…", "Packing a tiny lunch…", "Fluffing the checklist…", ]; let launchTicker = null; // Planny flies center stage: the same drawing as the dock's, cloned so the // markup stays the single source of him, and the same sky the dock fills. function flightStage() { const stage = el("div", "launch-stage"); const sky = el("div", "sky launch-sky"); const r = (a, b) => a + Math.random() * (b - a); for (let i = 0; i < 30; i++) { const star = el("i", "star" + (i % 6 === 0 ? " hot" : "")); const dur = r(3, 9); star.style.setProperty("--y", r(2, 98).toFixed(1) + "%"); star.style.setProperty("--p", r(0, 1).toFixed(3)); star.style.setProperty("--s", r(1.2, 2.6).toFixed(2) + "px"); star.style.setProperty("--dur", dur.toFixed(2) + "s"); star.style.setProperty("--delay", (-r(0, dur)).toFixed(2) + "s"); sky.appendChild(star); } stage.appendChild(sky); const bot = $("planny").cloneNode(true); bot.removeAttribute("id"); bot.setAttribute("class", "planny is-work v1 launch-planny"); stage.appendChild(bot); return stage; } // A skill's own Planny, acting out the skill while it starts and works: the // pose is cloned from its