@vibefield/puppeteer-views 0.0.0-stage → 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/LICENSE +21 -0
- package/dist/bar/InstrumentBar.d.ts +81 -0
- package/dist/bar/InstrumentBar.d.ts.map +1 -0
- package/dist/bar/InstrumentBar.js +86 -0
- package/dist/bar/InstrumentBar.js.map +1 -0
- package/dist/bar/ProfileTabs.d.ts +24 -0
- package/dist/bar/ProfileTabs.d.ts.map +1 -0
- package/dist/bar/ProfileTabs.js +141 -0
- package/dist/bar/ProfileTabs.js.map +1 -0
- package/dist/chrome/ChromeBoundary.d.ts +60 -0
- package/dist/chrome/ChromeBoundary.d.ts.map +1 -0
- package/dist/chrome/ChromeBoundary.js +70 -0
- package/dist/chrome/ChromeBoundary.js.map +1 -0
- package/dist/chrome/stage.d.ts +8 -0
- package/dist/chrome/stage.d.ts.map +1 -0
- package/dist/chrome/stage.js +8 -0
- package/dist/chrome/stage.js.map +1 -0
- package/dist/colour/pane-colours.d.ts +21 -0
- package/dist/colour/pane-colours.d.ts.map +1 -0
- package/dist/colour/pane-colours.js +25 -0
- package/dist/colour/pane-colours.js.map +1 -0
- package/dist/colour/project-tint.d.ts +23 -0
- package/dist/colour/project-tint.d.ts.map +1 -0
- package/dist/colour/project-tint.js +100 -0
- package/dist/colour/project-tint.js.map +1 -0
- package/dist/deck/DeckFrames.d.ts +71 -0
- package/dist/deck/DeckFrames.d.ts.map +1 -0
- package/dist/deck/DeckFrames.js +50 -0
- package/dist/deck/DeckFrames.js.map +1 -0
- package/dist/deck/PaneFrame.d.ts +80 -0
- package/dist/deck/PaneFrame.d.ts.map +1 -0
- package/dist/deck/PaneFrame.js +118 -0
- package/dist/deck/PaneFrame.js.map +1 -0
- package/dist/deck/completed-agent-panes.d.ts +24 -0
- package/dist/deck/completed-agent-panes.d.ts.map +1 -0
- package/dist/deck/completed-agent-panes.js +72 -0
- package/dist/deck/completed-agent-panes.js.map +1 -0
- package/dist/deck/deck-zoom.d.ts +40 -0
- package/dist/deck/deck-zoom.d.ts.map +1 -0
- package/dist/deck/deck-zoom.js +200 -0
- package/dist/deck/deck-zoom.js.map +1 -0
- package/dist/deck/index.d.ts +8 -0
- package/dist/deck/index.d.ts.map +1 -0
- package/dist/deck/index.js +13 -0
- package/dist/deck/index.js.map +1 -0
- package/dist/deck/pane-elements.d.ts +24 -0
- package/dist/deck/pane-elements.d.ts.map +1 -0
- package/dist/deck/pane-elements.js +73 -0
- package/dist/deck/pane-elements.js.map +1 -0
- package/dist/deck/pane-frame.d.ts +88 -0
- package/dist/deck/pane-frame.d.ts.map +1 -0
- package/dist/deck/pane-frame.js +51 -0
- package/dist/deck/pane-frame.js.map +1 -0
- package/dist/deck/unused-pane-sessions.d.ts +24 -0
- package/dist/deck/unused-pane-sessions.d.ts.map +1 -0
- package/dist/deck/unused-pane-sessions.js +75 -0
- package/dist/deck/unused-pane-sessions.js.map +1 -0
- package/dist/deck/use-deck-zoom.d.ts +10 -0
- package/dist/deck/use-deck-zoom.d.ts.map +1 -0
- package/dist/deck/use-deck-zoom.js +31 -0
- package/dist/deck/use-deck-zoom.js.map +1 -0
- package/dist/find/FindSheet.d.ts +23 -0
- package/dist/find/FindSheet.d.ts.map +1 -0
- package/dist/find/FindSheet.js +197 -0
- package/dist/find/FindSheet.js.map +1 -0
- package/dist/find/find-agent.d.ts +35 -0
- package/dist/find/find-agent.d.ts.map +1 -0
- package/dist/find/find-agent.js +2 -0
- package/dist/find/find-agent.js.map +1 -0
- package/dist/find/find-model.d.ts +93 -0
- package/dist/find/find-model.d.ts.map +1 -0
- package/dist/find/find-model.js +372 -0
- package/dist/find/find-model.js.map +1 -0
- package/dist/find/history-port.d.ts +78 -0
- package/dist/find/history-port.d.ts.map +1 -0
- package/dist/find/history-port.js +9 -0
- package/dist/find/history-port.js.map +1 -0
- package/dist/icons/ServiceMark.d.ts +32 -0
- package/dist/icons/ServiceMark.d.ts.map +1 -0
- package/dist/icons/ServiceMark.js +57 -0
- package/dist/icons/ServiceMark.js.map +1 -0
- package/dist/icons/profile-glyph-suggest.d.ts +8 -0
- package/dist/icons/profile-glyph-suggest.d.ts.map +1 -0
- package/dist/icons/profile-glyph-suggest.js +42 -0
- package/dist/icons/profile-glyph-suggest.js.map +1 -0
- package/dist/icons/service-marks.d.ts +5 -0
- package/dist/icons/service-marks.d.ts.map +1 -0
- package/dist/icons/service-marks.js +81 -0
- package/dist/icons/service-marks.js.map +1 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/lab/lab-clock.d.ts +11 -0
- package/dist/lab/lab-clock.d.ts.map +1 -0
- package/dist/lab/lab-clock.js +48 -0
- package/dist/lab/lab-clock.js.map +1 -0
- package/dist/lab/lab-model.d.ts +10 -0
- package/dist/lab/lab-model.d.ts.map +1 -0
- package/dist/lab/lab-model.js +146 -0
- package/dist/lab/lab-model.js.map +1 -0
- package/dist/lab/lab-stage.d.ts +72 -0
- package/dist/lab/lab-stage.d.ts.map +1 -0
- package/dist/lab/lab-stage.js +201 -0
- package/dist/lab/lab-stage.js.map +1 -0
- package/dist/lab/lab-world.d.ts +33 -0
- package/dist/lab/lab-world.d.ts.map +1 -0
- package/dist/lab/lab-world.js +394 -0
- package/dist/lab/lab-world.js.map +1 -0
- package/dist/lab/view-lab.css +98 -0
- package/dist/launcher/DeckLaunchers.d.ts +92 -0
- package/dist/launcher/DeckLaunchers.d.ts.map +1 -0
- package/dist/launcher/DeckLaunchers.js +377 -0
- package/dist/launcher/DeckLaunchers.js.map +1 -0
- package/dist/launcher/PaneLaunch.d.ts +50 -0
- package/dist/launcher/PaneLaunch.d.ts.map +1 -0
- package/dist/launcher/PaneLaunch.js +318 -0
- package/dist/launcher/PaneLaunch.js.map +1 -0
- package/dist/launcher/PaneLaunchChrome.d.ts +49 -0
- package/dist/launcher/PaneLaunchChrome.d.ts.map +1 -0
- package/dist/launcher/PaneLaunchChrome.js +32 -0
- package/dist/launcher/PaneLaunchChrome.js.map +1 -0
- package/dist/launcher/PaneLauncher.d.ts +97 -0
- package/dist/launcher/PaneLauncher.d.ts.map +1 -0
- package/dist/launcher/PaneLauncher.js +349 -0
- package/dist/launcher/PaneLauncher.js.map +1 -0
- package/dist/launcher/PaneLauncherChrome.d.ts +97 -0
- package/dist/launcher/PaneLauncherChrome.d.ts.map +1 -0
- package/dist/launcher/PaneLauncherChrome.js +131 -0
- package/dist/launcher/PaneLauncherChrome.js.map +1 -0
- package/dist/launcher/index.d.ts +9 -0
- package/dist/launcher/index.d.ts.map +1 -0
- package/dist/launcher/index.js +16 -0
- package/dist/launcher/index.js.map +1 -0
- package/dist/launcher/launch-model.d.ts +162 -0
- package/dist/launcher/launch-model.d.ts.map +1 -0
- package/dist/launcher/launch-model.js +169 -0
- package/dist/launcher/launch-model.js.map +1 -0
- package/dist/launcher/launcher-model.d.ts +268 -0
- package/dist/launcher/launcher-model.d.ts.map +1 -0
- package/dist/launcher/launcher-model.js +443 -0
- package/dist/launcher/launcher-model.js.map +1 -0
- package/dist/launcher/launcher-port.d.ts +115 -0
- package/dist/launcher/launcher-port.d.ts.map +1 -0
- package/dist/launcher/launcher-port.js +12 -0
- package/dist/launcher/launcher-port.js.map +1 -0
- package/dist/monitor/agent-status.d.ts +13 -0
- package/dist/monitor/agent-status.d.ts.map +1 -0
- package/dist/monitor/agent-status.js +5 -0
- package/dist/monitor/agent-status.js.map +1 -0
- package/dist/monitor/agents.d.ts +6 -0
- package/dist/monitor/agents.d.ts.map +1 -0
- package/dist/monitor/agents.js +21 -0
- package/dist/monitor/agents.js.map +1 -0
- package/dist/monitor/cost-format.d.ts +3 -0
- package/dist/monitor/cost-format.d.ts.map +1 -0
- package/dist/monitor/cost-format.js +12 -0
- package/dist/monitor/cost-format.js.map +1 -0
- package/dist/monitor/folder-name.d.ts +3 -0
- package/dist/monitor/folder-name.d.ts.map +1 -0
- package/dist/monitor/folder-name.js +6 -0
- package/dist/monitor/folder-name.js.map +1 -0
- package/dist/monitor/palette.d.ts +94 -0
- package/dist/monitor/palette.d.ts.map +1 -0
- package/dist/monitor/palette.js +157 -0
- package/dist/monitor/palette.js.map +1 -0
- package/dist/monitor/parameters.d.ts +33 -0
- package/dist/monitor/parameters.d.ts.map +1 -0
- package/dist/monitor/parameters.js +53 -0
- package/dist/monitor/parameters.js.map +1 -0
- package/dist/monitor/recede.d.ts +14 -0
- package/dist/monitor/recede.d.ts.map +1 -0
- package/dist/monitor/recede.js +35 -0
- package/dist/monitor/recede.js.map +1 -0
- package/dist/monitor/registry.d.ts +14 -0
- package/dist/monitor/registry.d.ts.map +1 -0
- package/dist/monitor/registry.js +36 -0
- package/dist/monitor/registry.js.map +1 -0
- package/dist/monitor/remote-write.d.ts +16 -0
- package/dist/monitor/remote-write.d.ts.map +1 -0
- package/dist/monitor/remote-write.js +21 -0
- package/dist/monitor/remote-write.js.map +1 -0
- package/dist/monitor/types.d.ts +205 -0
- package/dist/monitor/types.d.ts.map +1 -0
- package/dist/monitor/types.js +2 -0
- package/dist/monitor/types.js.map +1 -0
- package/dist/styles/bar.css +396 -0
- package/dist/styles/deck-frame.css +439 -0
- package/dist/styles/deck-zoom.css +70 -0
- package/dist/styles/find-sheet.css +270 -0
- package/dist/styles/pane-launcher.css +955 -0
- package/dist/styles/usage.css +368 -0
- package/dist/styles/views.css +12 -0
- package/dist/usage/UsageColumn.d.ts +8 -0
- package/dist/usage/UsageColumn.d.ts.map +1 -0
- package/dist/usage/UsageColumn.js +133 -0
- package/dist/usage/UsageColumn.js.map +1 -0
- package/dist/usage/account-usage-port.d.ts +12 -0
- package/dist/usage/account-usage-port.d.ts.map +1 -0
- package/dist/usage/account-usage-port.js +2 -0
- package/dist/usage/account-usage-port.js.map +1 -0
- package/dist/usage/account-usage.d.ts +86 -0
- package/dist/usage/account-usage.d.ts.map +1 -0
- package/dist/usage/account-usage.js +262 -0
- package/dist/usage/account-usage.js.map +1 -0
- package/dist/views/list/AgentList.d.ts +4 -0
- package/dist/views/list/AgentList.d.ts.map +1 -0
- package/dist/views/list/AgentList.js +101 -0
- package/dist/views/list/AgentList.js.map +1 -0
- package/dist/views/list/ListSpawnMenu.d.ts +20 -0
- package/dist/views/list/ListSpawnMenu.d.ts.map +1 -0
- package/dist/views/list/ListSpawnMenu.js +143 -0
- package/dist/views/list/ListSpawnMenu.js.map +1 -0
- package/dist/views/list/index.d.ts +8 -0
- package/dist/views/list/index.d.ts.map +1 -0
- package/dist/views/list/index.js +43 -0
- package/dist/views/list/index.js.map +1 -0
- package/dist/views/list/lab/main.d.ts +2 -0
- package/dist/views/list/lab/main.d.ts.map +1 -0
- package/dist/views/list/lab/main.js +25 -0
- package/dist/views/list/lab/main.js.map +1 -0
- package/dist/views/list/list-parameters.d.ts +9 -0
- package/dist/views/list/list-parameters.d.ts.map +1 -0
- package/dist/views/list/list-parameters.js +27 -0
- package/dist/views/list/list-parameters.js.map +1 -0
- package/dist/views/list/list.css +387 -0
- package/dist/views/rain/RainView.d.ts +4 -0
- package/dist/views/rain/RainView.d.ts.map +1 -0
- package/dist/views/rain/RainView.js +282 -0
- package/dist/views/rain/RainView.js.map +1 -0
- package/dist/views/rain/index.d.ts +8 -0
- package/dist/views/rain/index.d.ts.map +1 -0
- package/dist/views/rain/index.js +53 -0
- package/dist/views/rain/index.js.map +1 -0
- package/dist/views/rain/lab/main.d.ts +2 -0
- package/dist/views/rain/lab/main.d.ts.map +1 -0
- package/dist/views/rain/lab/main.js +26 -0
- package/dist/views/rain/lab/main.js.map +1 -0
- package/dist/views/rain/rain-parameters.d.ts +15 -0
- package/dist/views/rain/rain-parameters.d.ts.map +1 -0
- package/dist/views/rain/rain-parameters.js +52 -0
- package/dist/views/rain/rain-parameters.js.map +1 -0
- package/dist/views/rain/rain-streams.d.ts +44 -0
- package/dist/views/rain/rain-streams.d.ts.map +1 -0
- package/dist/views/rain/rain-streams.js +101 -0
- package/dist/views/rain/rain-streams.js.map +1 -0
- package/dist/views/rain/rain.css +200 -0
- package/dist/views/spend/SpendView.d.ts +30 -0
- package/dist/views/spend/SpendView.d.ts.map +1 -0
- package/dist/views/spend/SpendView.js +645 -0
- package/dist/views/spend/SpendView.js.map +1 -0
- package/dist/views/spend/index.d.ts +8 -0
- package/dist/views/spend/index.d.ts.map +1 -0
- package/dist/views/spend/index.js +54 -0
- package/dist/views/spend/index.js.map +1 -0
- package/dist/views/spend/lab/main.d.ts +2 -0
- package/dist/views/spend/lab/main.d.ts.map +1 -0
- package/dist/views/spend/lab/main.js +237 -0
- package/dist/views/spend/lab/main.js.map +1 -0
- package/dist/views/spend/lab/spend-fixtures.d.ts +72 -0
- package/dist/views/spend/lab/spend-fixtures.d.ts.map +1 -0
- package/dist/views/spend/lab/spend-fixtures.js +412 -0
- package/dist/views/spend/lab/spend-fixtures.js.map +1 -0
- package/dist/views/spend/spend-ink.d.ts +18 -0
- package/dist/views/spend/spend-ink.d.ts.map +1 -0
- package/dist/views/spend/spend-ink.js +50 -0
- package/dist/views/spend/spend-ink.js.map +1 -0
- package/dist/views/spend/spend-list.d.ts +48 -0
- package/dist/views/spend/spend-list.d.ts.map +1 -0
- package/dist/views/spend/spend-list.js +93 -0
- package/dist/views/spend/spend-list.js.map +1 -0
- package/dist/views/spend/spend-paint.d.ts +88 -0
- package/dist/views/spend/spend-paint.d.ts.map +1 -0
- package/dist/views/spend/spend-paint.js +225 -0
- package/dist/views/spend/spend-paint.js.map +1 -0
- package/dist/views/spend/spend-parameters.d.ts +11 -0
- package/dist/views/spend/spend-parameters.d.ts.map +1 -0
- package/dist/views/spend/spend-parameters.js +27 -0
- package/dist/views/spend/spend-parameters.js.map +1 -0
- package/dist/views/spend/spend-scale.d.ts +43 -0
- package/dist/views/spend/spend-scale.d.ts.map +1 -0
- package/dist/views/spend/spend-scale.js +71 -0
- package/dist/views/spend/spend-scale.js.map +1 -0
- package/dist/views/spend/spend-series.d.ts +91 -0
- package/dist/views/spend/spend-series.d.ts.map +1 -0
- package/dist/views/spend/spend-series.js +212 -0
- package/dist/views/spend/spend-series.js.map +1 -0
- package/dist/views/spend/spend-words.d.ts +82 -0
- package/dist/views/spend/spend-words.d.ts.map +1 -0
- package/dist/views/spend/spend-words.js +164 -0
- package/dist/views/spend/spend-words.js.map +1 -0
- package/dist/views/spend/spend.css +585 -0
- package/dist/views/swarm/AgentSwarm.d.ts +4 -0
- package/dist/views/swarm/AgentSwarm.d.ts.map +1 -0
- package/dist/views/swarm/AgentSwarm.js +969 -0
- package/dist/views/swarm/AgentSwarm.js.map +1 -0
- package/dist/views/swarm/bloom/SpawnBloom.d.ts +26 -0
- package/dist/views/swarm/bloom/SpawnBloom.d.ts.map +1 -0
- package/dist/views/swarm/bloom/SpawnBloom.js +332 -0
- package/dist/views/swarm/bloom/SpawnBloom.js.map +1 -0
- package/dist/views/swarm/bloom/birth.d.ts +70 -0
- package/dist/views/swarm/bloom/birth.d.ts.map +1 -0
- package/dist/views/swarm/bloom/birth.js +89 -0
- package/dist/views/swarm/bloom/birth.js.map +1 -0
- package/dist/views/swarm/bloom/canvas-measure.d.ts +11 -0
- package/dist/views/swarm/bloom/canvas-measure.d.ts.map +1 -0
- package/dist/views/swarm/bloom/canvas-measure.js +37 -0
- package/dist/views/swarm/bloom/canvas-measure.js.map +1 -0
- package/dist/views/swarm/bloom/constants.d.ts +93 -0
- package/dist/views/swarm/bloom/constants.d.ts.map +1 -0
- package/dist/views/swarm/bloom/constants.js +94 -0
- package/dist/views/swarm/bloom/constants.js.map +1 -0
- package/dist/views/swarm/bloom/field-frame.d.ts +69 -0
- package/dist/views/swarm/bloom/field-frame.d.ts.map +1 -0
- package/dist/views/swarm/bloom/field-frame.js +104 -0
- package/dist/views/swarm/bloom/field-frame.js.map +1 -0
- package/dist/views/swarm/bloom/geometry.d.ts +187 -0
- package/dist/views/swarm/bloom/geometry.d.ts.map +1 -0
- package/dist/views/swarm/bloom/geometry.js +379 -0
- package/dist/views/swarm/bloom/geometry.js.map +1 -0
- package/dist/views/swarm/bloom/index.d.ts +8 -0
- package/dist/views/swarm/bloom/index.d.ts.map +1 -0
- package/dist/views/swarm/bloom/index.js +13 -0
- package/dist/views/swarm/bloom/index.js.map +1 -0
- package/dist/views/swarm/bloom/menu.d.ts +5 -0
- package/dist/views/swarm/bloom/menu.d.ts.map +1 -0
- package/dist/views/swarm/bloom/menu.js +14 -0
- package/dist/views/swarm/bloom/menu.js.map +1 -0
- package/dist/views/swarm/bloom/model.d.ts +255 -0
- package/dist/views/swarm/bloom/model.d.ts.map +1 -0
- package/dist/views/swarm/bloom/model.js +678 -0
- package/dist/views/swarm/bloom/model.js.map +1 -0
- package/dist/views/swarm/bloom/scenarios.d.ts +7 -0
- package/dist/views/swarm/bloom/scenarios.d.ts.map +1 -0
- package/dist/views/swarm/bloom/scenarios.js +57 -0
- package/dist/views/swarm/bloom/scenarios.js.map +1 -0
- package/dist/views/swarm/bloom/spawn-bloom.css +407 -0
- package/dist/views/swarm/bloom/targeting.d.ts +60 -0
- package/dist/views/swarm/bloom/targeting.d.ts.map +1 -0
- package/dist/views/swarm/bloom/targeting.js +74 -0
- package/dist/views/swarm/bloom/targeting.js.map +1 -0
- package/dist/views/swarm/bloom/use-spawn-bloom.d.ts +100 -0
- package/dist/views/swarm/bloom/use-spawn-bloom.d.ts.map +1 -0
- package/dist/views/swarm/bloom/use-spawn-bloom.js +333 -0
- package/dist/views/swarm/bloom/use-spawn-bloom.js.map +1 -0
- package/dist/views/swarm/bloom/words.d.ts +73 -0
- package/dist/views/swarm/bloom/words.d.ts.map +1 -0
- package/dist/views/swarm/bloom/words.js +195 -0
- package/dist/views/swarm/bloom/words.js.map +1 -0
- package/dist/views/swarm/body-id.d.ts +13 -0
- package/dist/views/swarm/body-id.d.ts.map +1 -0
- package/dist/views/swarm/body-id.js +12 -0
- package/dist/views/swarm/body-id.js.map +1 -0
- package/dist/views/swarm/bubble-model.d.ts +128 -0
- package/dist/views/swarm/bubble-model.d.ts.map +1 -0
- package/dist/views/swarm/bubble-model.js +421 -0
- package/dist/views/swarm/bubble-model.js.map +1 -0
- package/dist/views/swarm/gpu/frame-layout.d.ts +52 -0
- package/dist/views/swarm/gpu/frame-layout.d.ts.map +1 -0
- package/dist/views/swarm/gpu/frame-layout.js +122 -0
- package/dist/views/swarm/gpu/frame-layout.js.map +1 -0
- package/dist/views/swarm/gpu/glyph-atlas.d.ts +63 -0
- package/dist/views/swarm/gpu/glyph-atlas.d.ts.map +1 -0
- package/dist/views/swarm/gpu/glyph-atlas.js +207 -0
- package/dist/views/swarm/gpu/glyph-atlas.js.map +1 -0
- package/dist/views/swarm/gpu/profile-icons.d.ts +4 -0
- package/dist/views/swarm/gpu/profile-icons.d.ts.map +1 -0
- package/dist/views/swarm/gpu/profile-icons.js +18 -0
- package/dist/views/swarm/gpu/profile-icons.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/body.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/body.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/body.wgsl.js +162 -0
- package/dist/views/swarm/gpu/shaders/body.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/common.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/common.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/common.wgsl.js +171 -0
- package/dist/views/swarm/gpu/shaders/common.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/erase.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/erase.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/erase.wgsl.js +61 -0
- package/dist/views/swarm/gpu/shaders/erase.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/field.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/field.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/field.wgsl.js +47 -0
- package/dist/views/swarm/gpu/shaders/field.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/glow.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/glow.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/glow.wgsl.js +39 -0
- package/dist/views/swarm/gpu/shaders/glow.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/hub.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/hub.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/hub.wgsl.js +48 -0
- package/dist/views/swarm/gpu/shaders/hub.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/shadow.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/shadow.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/shadow.wgsl.js +37 -0
- package/dist/views/swarm/gpu/shaders/shadow.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/shaders/text.wgsl.d.ts +3 -0
- package/dist/views/swarm/gpu/shaders/text.wgsl.d.ts.map +1 -0
- package/dist/views/swarm/gpu/shaders/text.wgsl.js +51 -0
- package/dist/views/swarm/gpu/shaders/text.wgsl.js.map +1 -0
- package/dist/views/swarm/gpu/swarm-renderer.d.ts +155 -0
- package/dist/views/swarm/gpu/swarm-renderer.d.ts.map +1 -0
- package/dist/views/swarm/gpu/swarm-renderer.js +696 -0
- package/dist/views/swarm/gpu/swarm-renderer.js.map +1 -0
- package/dist/views/swarm/index.d.ts +9 -0
- package/dist/views/swarm/index.d.ts.map +1 -0
- package/dist/views/swarm/index.js +40 -0
- package/dist/views/swarm/index.js.map +1 -0
- package/dist/views/swarm/lab/fixtures.d.ts +148 -0
- package/dist/views/swarm/lab/fixtures.d.ts.map +1 -0
- package/dist/views/swarm/lab/fixtures.js +821 -0
- package/dist/views/swarm/lab/fixtures.js.map +1 -0
- package/dist/views/swarm/lab/lab.css +315 -0
- package/dist/views/swarm/lab/main.d.ts +2 -0
- package/dist/views/swarm/lab/main.d.ts.map +1 -0
- package/dist/views/swarm/lab/main.js +474 -0
- package/dist/views/swarm/lab/main.js.map +1 -0
- package/dist/views/swarm/physics/driver.d.ts +23 -0
- package/dist/views/swarm/physics/driver.d.ts.map +1 -0
- package/dist/views/swarm/physics/driver.js +68 -0
- package/dist/views/swarm/physics/driver.js.map +1 -0
- package/dist/views/swarm/physics/frame.d.ts +28 -0
- package/dist/views/swarm/physics/frame.d.ts.map +1 -0
- package/dist/views/swarm/physics/frame.js +47 -0
- package/dist/views/swarm/physics/frame.js.map +1 -0
- package/dist/views/swarm/physics/host.d.ts +28 -0
- package/dist/views/swarm/physics/host.d.ts.map +1 -0
- package/dist/views/swarm/physics/host.js +168 -0
- package/dist/views/swarm/physics/host.js.map +1 -0
- package/dist/views/swarm/physics/index.d.ts +6 -0
- package/dist/views/swarm/physics/index.d.ts.map +1 -0
- package/dist/views/swarm/physics/index.js +14 -0
- package/dist/views/swarm/physics/index.js.map +1 -0
- package/dist/views/swarm/physics/inline-driver.d.ts +27 -0
- package/dist/views/swarm/physics/inline-driver.d.ts.map +1 -0
- package/dist/views/swarm/physics/inline-driver.js +37 -0
- package/dist/views/swarm/physics/inline-driver.js.map +1 -0
- package/dist/views/swarm/physics/protocol.d.ts +125 -0
- package/dist/views/swarm/physics/protocol.d.ts.map +1 -0
- package/dist/views/swarm/physics/protocol.js +4 -0
- package/dist/views/swarm/physics/protocol.js.map +1 -0
- package/dist/views/swarm/physics/spawn-clamp.d.ts +11 -0
- package/dist/views/swarm/physics/spawn-clamp.d.ts.map +1 -0
- package/dist/views/swarm/physics/spawn-clamp.js +15 -0
- package/dist/views/swarm/physics/spawn-clamp.js.map +1 -0
- package/dist/views/swarm/physics/swarm-physics.worker.d.ts +2 -0
- package/dist/views/swarm/physics/swarm-physics.worker.d.ts.map +1 -0
- package/dist/views/swarm/physics/swarm-physics.worker.js +66 -0
- package/dist/views/swarm/physics/swarm-physics.worker.js.map +1 -0
- package/dist/views/swarm/physics/world.d.ts +174 -0
- package/dist/views/swarm/physics/world.d.ts.map +1 -0
- package/dist/views/swarm/physics/world.js +454 -0
- package/dist/views/swarm/physics/world.js.map +1 -0
- package/dist/views/swarm/swarm-parameters.d.ts +50 -0
- package/dist/views/swarm/swarm-parameters.d.ts.map +1 -0
- package/dist/views/swarm/swarm-parameters.js +103 -0
- package/dist/views/swarm/swarm-parameters.js.map +1 -0
- package/dist/views/swarm/swarm-theme.d.ts +5 -0
- package/dist/views/swarm/swarm-theme.d.ts.map +1 -0
- package/dist/views/swarm/swarm-theme.js +63 -0
- package/dist/views/swarm/swarm-theme.js.map +1 -0
- package/dist/views/swarm/swarm.css +136 -0
- package/dist/views/swarm/text-layout.d.ts +72 -0
- package/dist/views/swarm/text-layout.d.ts.map +1 -0
- package/dist/views/swarm/text-layout.js +76 -0
- package/dist/views/swarm/text-layout.js.map +1 -0
- package/dist/views/swarm/weight.d.ts +44 -0
- package/dist/views/swarm/weight.d.ts.map +1 -0
- package/dist/views/swarm/weight.js +57 -0
- package/dist/views/swarm/weight.js.map +1 -0
- package/dist/views/timeline/TimelineView.d.ts +9 -0
- package/dist/views/timeline/TimelineView.d.ts.map +1 -0
- package/dist/views/timeline/TimelineView.js +889 -0
- package/dist/views/timeline/TimelineView.js.map +1 -0
- package/dist/views/timeline/index.d.ts +11 -0
- package/dist/views/timeline/index.d.ts.map +1 -0
- package/dist/views/timeline/index.js +63 -0
- package/dist/views/timeline/index.js.map +1 -0
- package/dist/views/timeline/lab/main.d.ts +2 -0
- package/dist/views/timeline/lab/main.d.ts.map +1 -0
- package/dist/views/timeline/lab/main.js +114 -0
- package/dist/views/timeline/lab/main.js.map +1 -0
- package/dist/views/timeline/lab/timeline-fixtures.d.ts +31 -0
- package/dist/views/timeline/lab/timeline-fixtures.d.ts.map +1 -0
- package/dist/views/timeline/lab/timeline-fixtures.js +337 -0
- package/dist/views/timeline/lab/timeline-fixtures.js.map +1 -0
- package/dist/views/timeline/pulse-map.d.ts +63 -0
- package/dist/views/timeline/pulse-map.d.ts.map +1 -0
- package/dist/views/timeline/pulse-map.js +162 -0
- package/dist/views/timeline/pulse-map.js.map +1 -0
- package/dist/views/timeline/timeline-inks.d.ts +28 -0
- package/dist/views/timeline/timeline-inks.d.ts.map +1 -0
- package/dist/views/timeline/timeline-inks.js +35 -0
- package/dist/views/timeline/timeline-inks.js.map +1 -0
- package/dist/views/timeline/timeline-lanes.d.ts +139 -0
- package/dist/views/timeline/timeline-lanes.d.ts.map +1 -0
- package/dist/views/timeline/timeline-lanes.js +240 -0
- package/dist/views/timeline/timeline-lanes.js.map +1 -0
- package/dist/views/timeline/timeline-paint.d.ts +39 -0
- package/dist/views/timeline/timeline-paint.d.ts.map +1 -0
- package/dist/views/timeline/timeline-paint.js +242 -0
- package/dist/views/timeline/timeline-paint.js.map +1 -0
- package/dist/views/timeline/timeline-parameters.d.ts +11 -0
- package/dist/views/timeline/timeline-parameters.d.ts.map +1 -0
- package/dist/views/timeline/timeline-parameters.js +27 -0
- package/dist/views/timeline/timeline-parameters.js.map +1 -0
- package/dist/views/timeline/timeline-scale.d.ts +73 -0
- package/dist/views/timeline/timeline-scale.d.ts.map +1 -0
- package/dist/views/timeline/timeline-scale.js +152 -0
- package/dist/views/timeline/timeline-scale.js.map +1 -0
- package/dist/views/timeline/timeline-words.d.ts +46 -0
- package/dist/views/timeline/timeline-words.d.ts.map +1 -0
- package/dist/views/timeline/timeline-words.js +132 -0
- package/dist/views/timeline/timeline-words.js.map +1 -0
- package/dist/views/timeline/timeline.css +875 -0
- package/dist/views/timeline/wake-geometry.d.ts +88 -0
- package/dist/views/timeline/wake-geometry.d.ts.map +1 -0
- package/dist/views/timeline/wake-geometry.js +243 -0
- package/dist/views/timeline/wake-geometry.js.map +1 -0
- package/package.json +78 -3
- package/README.md +0 -3
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { createPortal } from 'react-dom';
|
|
4
|
+
import { LAUNCHER_SOURCE_ATTRIBUTE, PaneLauncherChrome } from './PaneLauncherChrome.js';
|
|
5
|
+
import { launchSource } from './launch-model.js';
|
|
6
|
+
import { LAUNCHER_RECENT_LIMIT, LAUNCHER_SEARCH_DEBOUNCE_MS, LAUNCHER_SHORT_HEIGHT, buildLauncherResults, cantLaunchLine, launcherFolder, moveHighlight, toggleScope, } from './launcher-model.js';
|
|
7
|
+
/**
|
|
8
|
+
* How long the launcher took to leave once a launch was accepted (QL-1). Since
|
|
9
|
+
* QL-2 it leaves at the click, before the request goes out; a host that waits
|
|
10
|
+
* this long before mounting what came back waits for nothing it needs to.
|
|
11
|
+
*/
|
|
12
|
+
export const LAUNCHER_LEAVE_MS = 120;
|
|
13
|
+
/**
|
|
14
|
+
* How many frames a click in a resting pane's field waits for the pane's own
|
|
15
|
+
* focus to land before the field opens anyway. Counted in frames, not time:
|
|
16
|
+
* a loaded host can take longer than any timeout between two frames, and a
|
|
17
|
+
* timer that fired first would open the field just before the selection's
|
|
18
|
+
* focus took it away again.
|
|
19
|
+
*/
|
|
20
|
+
export const LAUNCHER_ACTIVATION_SETTLE_FRAMES = 4;
|
|
21
|
+
function reasonOf(error) {
|
|
22
|
+
return error instanceof Error && error.message ? error.message : 'no answer';
|
|
23
|
+
}
|
|
24
|
+
/** Ghosttea's terminal input; any textarea in the pane for a host that names it otherwise. */
|
|
25
|
+
function focusTerminal(pane) {
|
|
26
|
+
(pane.querySelector('.terminal-input') ?? pane.querySelector('textarea'))?.focus();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* One launcher, portalled into its pane: the field's query, scope, highlight
|
|
30
|
+
* and results; the history and words questions to the port; the launch and
|
|
31
|
+
* the resume with their pressed, leaving and refused states; and the focus —
|
|
32
|
+
* into the field when it opens, back to the terminal when it closes. Unlike the
|
|
33
|
+
* pane frame, the launcher takes the keyboard while its field is open.
|
|
34
|
+
*/
|
|
35
|
+
export function PaneLauncher({ pane, paneId, sessionId, cwd, color, active, onActivate, agents, under, port, scope, onScopeChange, onUsed, onLaunch, launch: launching, failure: refusal, register, nowMs, }) {
|
|
36
|
+
const [open, setOpen] = useState(false);
|
|
37
|
+
const [query, setQuery] = useState('');
|
|
38
|
+
const [history, setHistory] = useState();
|
|
39
|
+
const [sessions, setSessions] = useState();
|
|
40
|
+
// Each hit set with the question it answered: the list uses it only while
|
|
41
|
+
// that is still the question.
|
|
42
|
+
const [words, setWords] = useState();
|
|
43
|
+
const [highlight, setHighlight] = useState(-1);
|
|
44
|
+
const [hoverIndex, setHoverIndex] = useState();
|
|
45
|
+
const [failure, setFailure] = useState();
|
|
46
|
+
const [departOrigin, setDepartOrigin] = useState();
|
|
47
|
+
const rootRef = useRef(null);
|
|
48
|
+
// The launch is the mounter's; the launcher only draws its row leaving and coming back.
|
|
49
|
+
const busy = launching
|
|
50
|
+
? { kind: launching.verb, index: launching.index, leaving: !launching.returning, returning: launching.returning }
|
|
51
|
+
: undefined;
|
|
52
|
+
const [short, setShort] = useState(false);
|
|
53
|
+
const [clock, setClock] = useState(() => nowMs ?? Date.now());
|
|
54
|
+
const inputRef = useRef(null);
|
|
55
|
+
const recentSequence = useRef(0);
|
|
56
|
+
const wordsSequence = useRef(0);
|
|
57
|
+
const alive = useRef(true);
|
|
58
|
+
const folder = launcherFolder(cwd);
|
|
59
|
+
// The mounter's callbacks may be new on every render; the effects that use
|
|
60
|
+
// them should not re-subscribe for it.
|
|
61
|
+
const callbacks = useRef({ onUsed, onLaunch, register, onActivate });
|
|
62
|
+
callbacks.current = { onUsed, onLaunch, register, onActivate };
|
|
63
|
+
/** A click in a resting pane's field that opens the field once the pane is selected; its undo. */
|
|
64
|
+
const pendingOpen = useRef(undefined);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
alive.current = true;
|
|
67
|
+
return () => {
|
|
68
|
+
alive.current = false;
|
|
69
|
+
pendingOpen.current?.();
|
|
70
|
+
};
|
|
71
|
+
}, []);
|
|
72
|
+
// Short panes: the agents become one row of marks. Measured once at mount
|
|
73
|
+
// as well, because an occluded window delivers no resize notifications.
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
const apply = (height) => setShort(height > 0 && height < LAUNCHER_SHORT_HEIGHT);
|
|
76
|
+
apply(pane.getBoundingClientRect().height);
|
|
77
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
78
|
+
if (entry)
|
|
79
|
+
apply(entry.borderBoxSize[0]?.blockSize ?? pane.getBoundingClientRect().height);
|
|
80
|
+
});
|
|
81
|
+
observer.observe(pane);
|
|
82
|
+
return () => observer.disconnect();
|
|
83
|
+
}, [pane]);
|
|
84
|
+
// A paste into the terminal is input for the shell; one into the field is
|
|
85
|
+
// not. While a launch or a resume is in flight the shell is about to close:
|
|
86
|
+
// a paste is held there like a key, and does not count as input.
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
const onPaste = (event) => {
|
|
89
|
+
if (event.target instanceof Node && inputRef.current?.contains(event.target))
|
|
90
|
+
return;
|
|
91
|
+
if (latest.current.busy) {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
event.stopPropagation();
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
callbacks.current.onUsed();
|
|
97
|
+
};
|
|
98
|
+
pane.addEventListener('paste', onPaste, true);
|
|
99
|
+
return () => pane.removeEventListener('paste', onPaste, true);
|
|
100
|
+
}, [pane]);
|
|
101
|
+
// Leaving with the keyboard inside the launcher hands it back to the
|
|
102
|
+
// terminal. A layout cleanup runs while the field is still in the document.
|
|
103
|
+
useLayoutEffect(() => {
|
|
104
|
+
return () => {
|
|
105
|
+
const input = inputRef.current;
|
|
106
|
+
if (input && document.activeElement === input)
|
|
107
|
+
focusTerminal(pane);
|
|
108
|
+
};
|
|
109
|
+
}, [pane]);
|
|
110
|
+
// The folder's sessions: when the field opens and whenever the scope changes.
|
|
111
|
+
// A late answer to an older question is ignored; a port that throws is a
|
|
112
|
+
// history service that isn't answering.
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
if (!open)
|
|
115
|
+
return;
|
|
116
|
+
recentSequence.current += 1;
|
|
117
|
+
const mine = recentSequence.current;
|
|
118
|
+
void port
|
|
119
|
+
.recent({ ...(cwd ? { cwd } : {}), scope, limit: LAUNCHER_RECENT_LIMIT })
|
|
120
|
+
.then((response) => {
|
|
121
|
+
if (!alive.current || mine !== recentSequence.current)
|
|
122
|
+
return;
|
|
123
|
+
setHistory(response.status);
|
|
124
|
+
setSessions(response.sessions);
|
|
125
|
+
})
|
|
126
|
+
.catch((error) => {
|
|
127
|
+
if (!alive.current || mine !== recentSequence.current)
|
|
128
|
+
return;
|
|
129
|
+
setHistory({ readiness: 'unreachable', detail: reasonOf(error) });
|
|
130
|
+
setSessions([]);
|
|
131
|
+
});
|
|
132
|
+
}, [open, port, cwd, scope]);
|
|
133
|
+
// The words lane: one debounced question per pause in typing. A port that
|
|
134
|
+
// had no answer keeps the last hits, which still apply only to their own
|
|
135
|
+
// question (`buildLauncherResults` leaves stale ones out).
|
|
136
|
+
useEffect(() => {
|
|
137
|
+
const trimmed = query.trim();
|
|
138
|
+
if (!open || !port.words || trimmed === '') {
|
|
139
|
+
setWords(undefined);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
wordsSequence.current += 1;
|
|
143
|
+
const mine = wordsSequence.current;
|
|
144
|
+
const words = port.words.bind(port);
|
|
145
|
+
const timer = window.setTimeout(() => {
|
|
146
|
+
void words({ query: trimmed, ...(cwd ? { cwd } : {}), scope, limit: LAUNCHER_RECENT_LIMIT })
|
|
147
|
+
.then((response) => {
|
|
148
|
+
if (!alive.current || mine !== wordsSequence.current || !response.answered)
|
|
149
|
+
return;
|
|
150
|
+
setWords({ question: { query: trimmed, scope }, hits: response.hits });
|
|
151
|
+
})
|
|
152
|
+
.catch(() => undefined);
|
|
153
|
+
}, LAUNCHER_SEARCH_DEBOUNCE_MS);
|
|
154
|
+
return () => window.clearTimeout(timer);
|
|
155
|
+
}, [open, port, cwd, scope, query]);
|
|
156
|
+
// Opening sets the clock and takes the keyboard into the field.
|
|
157
|
+
useEffect(() => {
|
|
158
|
+
if (!open)
|
|
159
|
+
return;
|
|
160
|
+
setClock(nowMs ?? Date.now());
|
|
161
|
+
inputRef.current?.focus();
|
|
162
|
+
}, [open, nowMs]);
|
|
163
|
+
const results = useMemo(() => sessions
|
|
164
|
+
? buildLauncherResults({
|
|
165
|
+
sessions,
|
|
166
|
+
hits: words?.hits ?? [],
|
|
167
|
+
hitsFor: words?.question ?? { query: '', scope },
|
|
168
|
+
query,
|
|
169
|
+
scope,
|
|
170
|
+
folder,
|
|
171
|
+
agents,
|
|
172
|
+
nowMs: clock,
|
|
173
|
+
})
|
|
174
|
+
: undefined, [sessions, words, query, scope, folder, agents, clock]);
|
|
175
|
+
const rows = results?.rows ?? [];
|
|
176
|
+
// New rows put the highlight on the first, so ↵ lands at once.
|
|
177
|
+
const rowsKey = rows.map((row) => row.session.key).join('\n');
|
|
178
|
+
useEffect(() => {
|
|
179
|
+
setHighlight(rowsKey === '' ? -1 : 0);
|
|
180
|
+
}, [rowsKey]);
|
|
181
|
+
/**
|
|
182
|
+
* The row's mark, in the pane's own pixels, and the point the launcher block
|
|
183
|
+
* shrinks toward (C1). A row the narrow tiers hide has no box: the launch's
|
|
184
|
+
* mark then rises from the launcher's middle, small.
|
|
185
|
+
*/
|
|
186
|
+
const takeMark = (source) => {
|
|
187
|
+
const root = rootRef.current;
|
|
188
|
+
const paneBox = pane.getBoundingClientRect();
|
|
189
|
+
const mark = root?.querySelector(`[${LAUNCHER_SOURCE_ATTRIBUTE}="${source}"] .vf-pane-launcher-mark`);
|
|
190
|
+
const box = mark?.getBoundingClientRect();
|
|
191
|
+
const block = root?.querySelector('.vf-pane-launcher');
|
|
192
|
+
let from;
|
|
193
|
+
if (box && box.width > 0 && box.height > 0) {
|
|
194
|
+
from = { x: box.left - paneBox.left, y: box.top - paneBox.top, width: box.width, height: box.height };
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
const centre = block?.getBoundingClientRect();
|
|
198
|
+
const x = centre ? centre.left + centre.width / 2 - paneBox.left : paneBox.width / 2;
|
|
199
|
+
const y = centre ? centre.top + Math.min(centre.height, 64) / 2 - paneBox.top : paneBox.height / 2;
|
|
200
|
+
from = { x: x - 8, y: y - 8, width: 16, height: 16 };
|
|
201
|
+
}
|
|
202
|
+
if (block) {
|
|
203
|
+
// The block is centred with translateX(-50%): its own box starts half a width left of `offsetLeft`.
|
|
204
|
+
const ox = from.x + from.width / 2 - (block.offsetLeft - block.offsetWidth / 2);
|
|
205
|
+
const oy = from.y + from.height / 2 - block.offsetTop;
|
|
206
|
+
setDepartOrigin(`${ox.toFixed(1)}px ${oy.toFixed(1)}px`);
|
|
207
|
+
}
|
|
208
|
+
return from;
|
|
209
|
+
};
|
|
210
|
+
const launch = (index) => {
|
|
211
|
+
const agent = agents[index];
|
|
212
|
+
if (!agent || busy)
|
|
213
|
+
return;
|
|
214
|
+
if (agent.unavailable) {
|
|
215
|
+
setFailure(cantLaunchLine(agent));
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
setFailure(undefined);
|
|
219
|
+
callbacks.current.onLaunch({
|
|
220
|
+
verb: 'launch',
|
|
221
|
+
index,
|
|
222
|
+
providerId: agent.providerId,
|
|
223
|
+
label: agent.label,
|
|
224
|
+
from: takeMark(launchSource('launch', index)),
|
|
225
|
+
});
|
|
226
|
+
};
|
|
227
|
+
const resume = (index) => {
|
|
228
|
+
const row = rows[index];
|
|
229
|
+
if (!row || !row.session.resumable || busy)
|
|
230
|
+
return;
|
|
231
|
+
const agent = agents.find((candidate) => candidate.providerId === row.session.providerId);
|
|
232
|
+
setFailure(undefined);
|
|
233
|
+
callbacks.current.onLaunch({
|
|
234
|
+
verb: 'resume',
|
|
235
|
+
index,
|
|
236
|
+
...(row.session.providerId ? { providerId: row.session.providerId } : {}),
|
|
237
|
+
label: agent?.label ?? row.session.title,
|
|
238
|
+
session: row.session,
|
|
239
|
+
from: takeMark(launchSource('resume', index)),
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
const close = (refocus) => {
|
|
243
|
+
setOpen(false);
|
|
244
|
+
setQuery('');
|
|
245
|
+
if (refocus)
|
|
246
|
+
focusTerminal(pane);
|
|
247
|
+
};
|
|
248
|
+
// A pointer in a resting pane's launcher selects the pane first. Selecting it
|
|
249
|
+
// makes Ghosttea focus the pane's terminal on the next frame (a callback it
|
|
250
|
+
// queues before any of ours), and that focus queues itself once more for the
|
|
251
|
+
// frame after; a field that took the click's focus at once would lose it and
|
|
252
|
+
// close. So a click in the field does not focus it: the field opens two
|
|
253
|
+
// frames after the pane holds the keyboard, or after
|
|
254
|
+
// `LAUNCHER_ACTIVATION_SETTLE_FRAMES` if it never comes to.
|
|
255
|
+
const onRootPointerDown = (event) => {
|
|
256
|
+
const activate = callbacks.current.onActivate;
|
|
257
|
+
if (active || !activate)
|
|
258
|
+
return;
|
|
259
|
+
activate();
|
|
260
|
+
if (!(event.target instanceof Element) || !event.target.closest('.vf-pane-launcher-field'))
|
|
261
|
+
return;
|
|
262
|
+
event.preventDefault();
|
|
263
|
+
if (pendingOpen.current)
|
|
264
|
+
return;
|
|
265
|
+
let settled = false;
|
|
266
|
+
let frames = 0;
|
|
267
|
+
let landedAt;
|
|
268
|
+
let frame = 0;
|
|
269
|
+
const undo = () => {
|
|
270
|
+
settled = true;
|
|
271
|
+
window.cancelAnimationFrame(frame);
|
|
272
|
+
if (pendingOpen.current === undo)
|
|
273
|
+
pendingOpen.current = undefined;
|
|
274
|
+
};
|
|
275
|
+
const tick = () => {
|
|
276
|
+
if (settled)
|
|
277
|
+
return;
|
|
278
|
+
frames += 1;
|
|
279
|
+
if (landedAt === undefined && pane.contains(document.activeElement))
|
|
280
|
+
landedAt = frames;
|
|
281
|
+
const ready = landedAt !== undefined ? frames - landedAt >= 2 : frames >= LAUNCHER_ACTIVATION_SETTLE_FRAMES;
|
|
282
|
+
if (!ready) {
|
|
283
|
+
frame = window.requestAnimationFrame(tick);
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
undo();
|
|
287
|
+
if (alive.current)
|
|
288
|
+
inputRef.current?.focus();
|
|
289
|
+
};
|
|
290
|
+
frame = window.requestAnimationFrame(tick);
|
|
291
|
+
pendingOpen.current = undo;
|
|
292
|
+
};
|
|
293
|
+
// The key listener lives in the mounter and reads this launcher through a
|
|
294
|
+
// stable handle; the handle reads the latest render through a ref.
|
|
295
|
+
const latest = useRef({ open, highlight, rows, agents, busy, launch, resume, close, scope, onScopeChange });
|
|
296
|
+
latest.current = { open, highlight, rows, agents, busy, launch, resume, close, scope, onScopeChange };
|
|
297
|
+
const controller = useMemo(() => ({
|
|
298
|
+
keyState: () => {
|
|
299
|
+
const now = latest.current;
|
|
300
|
+
return {
|
|
301
|
+
open: now.open,
|
|
302
|
+
agentCount: now.agents.length,
|
|
303
|
+
highlight: now.highlight,
|
|
304
|
+
highlightResumable: now.rows[now.highlight]?.session.resumable ?? false,
|
|
305
|
+
launching: now.busy !== undefined,
|
|
306
|
+
};
|
|
307
|
+
},
|
|
308
|
+
apply: (action) => {
|
|
309
|
+
const now = latest.current;
|
|
310
|
+
switch (action.kind) {
|
|
311
|
+
case 'launch':
|
|
312
|
+
now.launch(action.index);
|
|
313
|
+
return;
|
|
314
|
+
case 'open':
|
|
315
|
+
setOpen(true);
|
|
316
|
+
return;
|
|
317
|
+
case 'close':
|
|
318
|
+
now.close(true);
|
|
319
|
+
return;
|
|
320
|
+
case 'move':
|
|
321
|
+
setHighlight((current) => moveHighlight(current, action.delta, now.rows.length));
|
|
322
|
+
return;
|
|
323
|
+
case 'resume':
|
|
324
|
+
now.resume(action.index);
|
|
325
|
+
return;
|
|
326
|
+
case 'toggle-scope':
|
|
327
|
+
now.onScopeChange(toggleScope(now.scope));
|
|
328
|
+
return;
|
|
329
|
+
default:
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
}), []);
|
|
334
|
+
useEffect(() => {
|
|
335
|
+
const registry = callbacks.current.register;
|
|
336
|
+
registry(controller);
|
|
337
|
+
return () => registry(null);
|
|
338
|
+
}, [controller]);
|
|
339
|
+
return createPortal(_jsx(PaneLauncherChrome, { sessionId: sessionId, agents: agents, ...(under ? { under } : {}), folder: folder, ...(color ? { color } : {}), active: active, short: short, open: open, query: query, scope: scope, ...(open && results ? { results } : {}), highlight: highlight, ...(history ? { history } : {}), ...(hoverIndex !== undefined ? { hoverIndex } : {}), ...(busy ? { busy } : {}), ...(failure || refusal ? { failure: failure ?? refusal } : {}), inputRef: inputRef, rootRef: rootRef, ...(departOrigin ? { departOrigin } : {}), onQueryChange: setQuery, onOpen: () => setOpen(true), onFieldBlur: () => {
|
|
340
|
+
// Focus left for somewhere the person chose: the field closes where it is.
|
|
341
|
+
if (latest.current.open)
|
|
342
|
+
close(false);
|
|
343
|
+
}, onLaunch: launch, onHover: setHoverIndex, onResume: resume, onHighlight: setHighlight, onScope: onScopeChange, onRootPointerDown: onRootPointerDown, onRootMouseDown: (event) => {
|
|
344
|
+
// The click that selected the pane leaves the focus to the pane (above).
|
|
345
|
+
if (pendingOpen.current)
|
|
346
|
+
event.preventDefault();
|
|
347
|
+
} }), pane);
|
|
348
|
+
}
|
|
349
|
+
//# sourceMappingURL=PaneLauncher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaneLauncher.js","sourceRoot":"","sources":["../../src/launcher/PaneLauncher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAA0C,MAAM,OAAO,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAqB,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAoC,MAAM,mBAAmB,CAAC;AACnF,OAAO,EACL,qBAAqB,EACrB,2BAA2B,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AA2E;YAC3E,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI;gBAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC,EACD,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,aAAa,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;YACzB,yEAAyE;YACzE,IAAI,WAAW,CAAC,OAAO;gBAAE,KAAK,CAAC,cAAc,EAAE,CAAC;QAClD,CAAC,GACD,EACF,IAAI,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { FocusEvent as ReactFocusEvent, MouseEvent as ReactMouseEvent, PointerEvent as ReactPointerEvent, RefObject } from 'react';
|
|
2
|
+
import { type LauncherResults, type LauncherScope } from './launcher-model.js';
|
|
3
|
+
import type { LauncherAgent, LauncherHistoryStatus, LauncherUnder } from './launcher-port.js';
|
|
4
|
+
/**
|
|
5
|
+
* What the launcher is doing with a key or a click it acted on. `leaving`: the
|
|
6
|
+
* launch has taken the row's mark and the launcher has shrunk away toward it
|
|
7
|
+
* (QL-2); `returning`: a refused launch is bringing the mark back to its row,
|
|
8
|
+
* which the launcher, back already, keeps empty until it lands.
|
|
9
|
+
*/
|
|
10
|
+
export type LauncherBusy = {
|
|
11
|
+
kind: 'launch';
|
|
12
|
+
index: number;
|
|
13
|
+
leaving?: boolean | undefined;
|
|
14
|
+
returning?: boolean | undefined;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'resume';
|
|
17
|
+
index: number;
|
|
18
|
+
leaving?: boolean | undefined;
|
|
19
|
+
returning?: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
export interface PaneLauncherChromeProps {
|
|
22
|
+
/** The fresh shell's session; names the launcher in `data-vf-pane-launcher`. */
|
|
23
|
+
sessionId: string;
|
|
24
|
+
/** The agents in launch order (`orderAgents`), ten at most. */
|
|
25
|
+
agents: readonly LauncherAgent[];
|
|
26
|
+
/**
|
|
27
|
+
* The Agent Profile this pane's shell was born under (SB): the caption reads
|
|
28
|
+
* `New · <glyph> Under Work` and the hint names it. Its agents arrive as
|
|
29
|
+
* `agents` already (`paneAgents`); an agent it has no sign-in for is simply
|
|
30
|
+
* one the host marks `unavailable`.
|
|
31
|
+
*/
|
|
32
|
+
under?: LauncherUnder | undefined;
|
|
33
|
+
/** The pane's folder, as the launcher names it (`launcherFolder`). */
|
|
34
|
+
folder: string;
|
|
35
|
+
/** The pane colour the host dealt this pane. */
|
|
36
|
+
color?: string | undefined;
|
|
37
|
+
/** The pane is the selected one. A resting pane keeps only its field, quietly. */
|
|
38
|
+
active: boolean;
|
|
39
|
+
/** The pane is under `LAUNCHER_SHORT_HEIGHT`: the agents become one row of marks. */
|
|
40
|
+
short?: boolean | undefined;
|
|
41
|
+
/** The field is open (focused): the results replace the agents. */
|
|
42
|
+
open: boolean;
|
|
43
|
+
query: string;
|
|
44
|
+
scope: LauncherScope;
|
|
45
|
+
/** The field's list; absent while nothing has answered yet. */
|
|
46
|
+
results?: LauncherResults | undefined;
|
|
47
|
+
/** The highlighted row in `results.rows`, -1 for none. */
|
|
48
|
+
highlight: number;
|
|
49
|
+
/** The history service's last answer; absent while nothing has answered yet. */
|
|
50
|
+
history?: LauncherHistoryStatus | undefined;
|
|
51
|
+
/** The agent under the pointer, for the pressed/hover look and the preview line. */
|
|
52
|
+
hoverIndex?: number | undefined;
|
|
53
|
+
busy?: LauncherBusy | undefined;
|
|
54
|
+
/** One line under the rows: why a launch or a resume was refused. */
|
|
55
|
+
failure?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The field's element. An object ref, not `Ref<T>`: a host type-checking
|
|
58
|
+
* this source against its own copy of `@types/react` would otherwise meet
|
|
59
|
+
* two unrelated callback-ref cleanup types (a `unique symbol` each).
|
|
60
|
+
*/
|
|
61
|
+
inputRef?: RefObject<HTMLInputElement | null> | undefined;
|
|
62
|
+
onQueryChange?: ((query: string) => void) | undefined;
|
|
63
|
+
onOpen?: (() => void) | undefined;
|
|
64
|
+
onFieldBlur?: ((event: ReactFocusEvent<HTMLInputElement>) => void) | undefined;
|
|
65
|
+
onLaunch?: ((index: number) => void) | undefined;
|
|
66
|
+
onHover?: ((index: number | undefined) => void) | undefined;
|
|
67
|
+
onResume?: ((index: number) => void) | undefined;
|
|
68
|
+
onHighlight?: ((index: number) => void) | undefined;
|
|
69
|
+
onScope?: ((scope: LauncherScope) => void) | undefined;
|
|
70
|
+
/** A pointer anywhere in the launcher, in the capture phase: before any part of it acts. */
|
|
71
|
+
onRootPointerDown?: ((event: ReactPointerEvent<HTMLDivElement>) => void) | undefined;
|
|
72
|
+
/** The same press's mouse event, in the capture phase. */
|
|
73
|
+
onRootMouseDown?: ((event: ReactMouseEvent<HTMLDivElement>) => void) | undefined;
|
|
74
|
+
/** The host layer, so the launcher can find the mark a launch takes from its row. */
|
|
75
|
+
rootRef?: RefObject<HTMLDivElement | null> | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Where the launcher shrinks toward as it leaves: the clicked mark, as a
|
|
78
|
+
* `transform-origin` in the launcher block's own box (QL-2, C1).
|
|
79
|
+
*/
|
|
80
|
+
departOrigin?: string | undefined;
|
|
81
|
+
}
|
|
82
|
+
/** The attribute naming a row a launch can take its mark from: `agent:<index>` or `session:<index>`. */
|
|
83
|
+
export declare const LAUNCHER_SOURCE_ATTRIBUTE = "data-vf-launch-source";
|
|
84
|
+
/** The DOM id of one result row, for `aria-activedescendant`. */
|
|
85
|
+
export declare function launcherOptionId(sessionId: string, index: number): string;
|
|
86
|
+
/**
|
|
87
|
+
* The empty pane's launcher as MARKUP, L1 · Ledger (pass 3 §21–§22): a ruled
|
|
88
|
+
* field, the agents as a two-column legend with their keys, and — once the
|
|
89
|
+
* field is open — this folder's sessions, grouped. No card: the block stands on
|
|
90
|
+
* a feathered clearing of the terminal's own ground, every colour mixed from
|
|
91
|
+
* the terminal's ink, the pane colour only on the focus rule, the caret, a
|
|
92
|
+
* matched word and a pressed row (`styles/pane-launcher.css`). Pure over its
|
|
93
|
+
* props, so a host's static tests and catalog can render every state without a
|
|
94
|
+
* pane; `PaneLauncher` is the portal and the state.
|
|
95
|
+
*/
|
|
96
|
+
export declare function PaneLauncherChrome({ sessionId, agents, under, folder, color, active, short, open, query, scope, results, highlight, history, hoverIndex, busy, failure, inputRef, onQueryChange, onOpen, onFieldBlur, onLaunch, onHover, onResume, onHighlight, onScope, onRootPointerDown, onRootMouseDown, rootRef, departOrigin, }: PaneLauncherChromeProps): import("react").JSX.Element;
|
|
97
|
+
//# sourceMappingURL=PaneLauncherChrome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaneLauncherChrome.d.ts","sourceRoot":"","sources":["../../src/launcher/PaneLauncherChrome.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,UAAU,IAAI,eAAe,EAC7B,UAAU,IAAI,eAAe,EAC7B,YAAY,IAAI,iBAAiB,EAEjC,SAAS,EACV,MAAM,OAAO,CAAC;AAIf,OAAO,EASL,KAAK,eAAe,EACpB,KAAK,aAAa,EAEnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GACjG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,GAAG,S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P,SAAS,EACT,OAAO,EACP,UAAU,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACX,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EACX,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,OAAO,EACP,YAAY,GACb,EAAE,uBAAuB,+BAwRzB"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { AgentIcon, ProfileGlyph } from '@vibefield/puppeteer-view-sdk/react';
|
|
3
|
+
import { launchSource } from './launch-model.js';
|
|
4
|
+
import { agentKeyLabel, agentKeyShortcut, agentPreview, historyStatusLine, historyUnavailable, historyUnavailableSentence, noMatchSentence, noSessionsSentence, } from './launcher-model.js';
|
|
5
|
+
/** The attribute naming a row a launch can take its mark from: `agent:<index>` or `session:<index>`. */
|
|
6
|
+
export const LAUNCHER_SOURCE_ATTRIBUTE = 'data-vf-launch-source';
|
|
7
|
+
/** The resume glyph at the head of the field: an arrow coming back round. */
|
|
8
|
+
function ResumeGlyph() {
|
|
9
|
+
return (_jsxs("svg", { className: "vf-pane-launcher-ico", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("path", { d: "M4.5 12a7.5 7.5 0 1 0 2.2-5.3" }), _jsx("path", { d: "M4 4v5h5" })] }));
|
|
10
|
+
}
|
|
11
|
+
function Mark({ providerId }) {
|
|
12
|
+
return (_jsx("i", { className: "vf-pane-launcher-mark", "aria-hidden": "true", children: providerId ? _jsx(AgentIcon, { providerId: providerId }) : _jsx("span", { children: "\u00B7" }) }));
|
|
13
|
+
}
|
|
14
|
+
function Segments({ segments }) {
|
|
15
|
+
return (_jsx(_Fragment, { children: segments.map((segment, index) => segment.match ? _jsx("mark", { children: segment.text }, index) : _jsx("span", { children: segment.text }, index)) }));
|
|
16
|
+
}
|
|
17
|
+
function Sentence({ sentence }) {
|
|
18
|
+
return (_jsxs("p", { className: "vf-pane-launcher-empty", children: [sentence.text, _jsx("span", { children: sentence.hint })] }));
|
|
19
|
+
}
|
|
20
|
+
/** A pointer on a row, an agent or the scope switch must not take the keyboard from the field or the terminal. */
|
|
21
|
+
function keepFocus(event) {
|
|
22
|
+
event.preventDefault();
|
|
23
|
+
}
|
|
24
|
+
function idPart(value) {
|
|
25
|
+
return value.replace(/[^A-Za-z0-9_-]/g, '_');
|
|
26
|
+
}
|
|
27
|
+
/** The DOM id of one result row, for `aria-activedescendant`. */
|
|
28
|
+
export function launcherOptionId(sessionId, index) {
|
|
29
|
+
return `vf-pane-launcher-${idPart(sessionId)}-option-${index}`;
|
|
30
|
+
}
|
|
31
|
+
function launcherListId(sessionId) {
|
|
32
|
+
return `vf-pane-launcher-${idPart(sessionId)}-list`;
|
|
33
|
+
}
|
|
34
|
+
const FOOT = (_jsxs("div", { className: "vf-pane-launcher-foot", "aria-hidden": "true", children: [_jsxs("span", { children: [_jsx("b", { children: "\u2191\u2193" }), " move"] }), _jsxs("span", { children: [_jsx("b", { children: "\u21B5" }), " resume here"] }), _jsxs("span", { children: [_jsx("b", { children: "\u21E5" }), " here \u00B7 all"] }), _jsxs("span", { children: [_jsx("b", { children: "\u238B" }), " back to the shell"] })] }));
|
|
35
|
+
/**
|
|
36
|
+
* The empty pane's launcher as MARKUP, L1 · Ledger (pass 3 §21–§22): a ruled
|
|
37
|
+
* field, the agents as a two-column legend with their keys, and — once the
|
|
38
|
+
* field is open — this folder's sessions, grouped. No card: the block stands on
|
|
39
|
+
* a feathered clearing of the terminal's own ground, every colour mixed from
|
|
40
|
+
* the terminal's ink, the pane colour only on the focus rule, the caret, a
|
|
41
|
+
* matched word and a pressed row (`styles/pane-launcher.css`). Pure over its
|
|
42
|
+
* props, so a host's static tests and catalog can render every state without a
|
|
43
|
+
* pane; `PaneLauncher` is the portal and the state.
|
|
44
|
+
*/
|
|
45
|
+
export function PaneLauncherChrome({ sessionId, agents, under, folder, color, active, short = false, open, query, scope, results, highlight, history, hoverIndex, busy, failure, inputRef, onQueryChange, onOpen, onFieldBlur, onLaunch, onHover, onResume, onHighlight, onScope, onRootPointerDown, onRootMouseDown, rootRef, departOrigin, }) {
|
|
46
|
+
const style = { ...(color ? { '--pane-color': color } : {}) };
|
|
47
|
+
const leaving = busy?.leaving === true;
|
|
48
|
+
// The pressed row's mark is out with the launch while it leaves and while it comes back.
|
|
49
|
+
const flying = busy !== undefined && (busy.leaving === true || busy.returning === true);
|
|
50
|
+
const className = [
|
|
51
|
+
'vf-pane-launcher',
|
|
52
|
+
open ? 'is-open' : '',
|
|
53
|
+
active ? '' : 'is-resting',
|
|
54
|
+
short ? 'is-short' : '',
|
|
55
|
+
leaving ? 'is-leaving' : '',
|
|
56
|
+
busy ? 'is-busy' : '',
|
|
57
|
+
]
|
|
58
|
+
.filter(Boolean)
|
|
59
|
+
.join(' ');
|
|
60
|
+
const listId = launcherListId(sessionId);
|
|
61
|
+
const rows = results?.rows ?? [];
|
|
62
|
+
const current = open && highlight >= 0 ? rows[highlight] : undefined;
|
|
63
|
+
const previewIndex = busy?.kind === 'launch' ? busy.index : hoverIndex;
|
|
64
|
+
const previewAgent = active && previewIndex !== undefined ? agents[previewIndex] : undefined;
|
|
65
|
+
let body;
|
|
66
|
+
if (!open) {
|
|
67
|
+
body = active ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "vf-pane-launcher-cap", "aria-hidden": "true", children: [under ? (_jsxs("span", { className: "vf-pane-launcher-cap-under", children: ["New \u00B7", ' ', _jsx(ProfileGlyph, { glyph: under.glyph, ...(under.kind ? { kind: under.kind } : {}), filled: under.isDefault === true, size: 11 }), _jsxs("b", { children: ["Under ", under.label] })] })) : (_jsx("span", { children: "New" })), _jsx("span", { children: "last used first" })] }), _jsx("div", { className: "vf-pane-launcher-agents", role: "group", "aria-label": under ? `Launch an agent in this pane, under ${under.label}` : 'Launch an agent in this pane', children: agents.map((agent, index) => {
|
|
68
|
+
const off = agent.unavailable;
|
|
69
|
+
const pressed = busy?.kind === 'launch' && busy.index === index;
|
|
70
|
+
const agentClass = [
|
|
71
|
+
'vf-pane-launcher-agent',
|
|
72
|
+
hoverIndex === index && !off ? 'is-hover' : '',
|
|
73
|
+
pressed ? 'is-press' : '',
|
|
74
|
+
pressed && flying ? 'is-flying' : '',
|
|
75
|
+
off ? 'is-off' : '',
|
|
76
|
+
]
|
|
77
|
+
.filter(Boolean)
|
|
78
|
+
.join(' ');
|
|
79
|
+
return (_jsxs("button", { type: "button", className: agentClass, [LAUNCHER_SOURCE_ATTRIBUTE]: launchSource('launch', index), title: off ? `${agent.label} · ${off}` : agent.label, "aria-keyshortcuts": agentKeyShortcut(index), ...(off ? { 'aria-disabled': true } : {}), ...(pressed ? { 'aria-busy': true } : {}), onPointerDown: keepFocus, onClick: () => onLaunch?.(index), onPointerEnter: () => onHover?.(index), onPointerLeave: () => onHover?.(undefined), children: [_jsx(Mark, { providerId: agent.providerId }), _jsx("span", { className: "vf-pane-launcher-nm", children: agent.label }), off ? _jsx("small", { children: off }) : _jsx("kbd", { children: agentKeyLabel(index) })] }, agent.providerId));
|
|
80
|
+
}) }), _jsx("p", { className: "vf-pane-launcher-hint", children: under ? `or just type · this shell is under ${under.label}` : 'or just type · this is a shell' })] })) : (_jsx(_Fragment, {}));
|
|
81
|
+
}
|
|
82
|
+
else if (historyUnavailable(history)) {
|
|
83
|
+
body = _jsx(Sentence, { sentence: historyUnavailableSentence(history) });
|
|
84
|
+
}
|
|
85
|
+
else if (!results) {
|
|
86
|
+
body = (_jsx("p", { className: "vf-pane-launcher-empty", role: "status", children: "Reading past sessions\u2026" }));
|
|
87
|
+
}
|
|
88
|
+
else if (rows.length === 0) {
|
|
89
|
+
const statusLine = historyStatusLine(history);
|
|
90
|
+
body = (_jsxs(_Fragment, { children: [_jsx(Sentence, { sentence: query.trim() === '' ? noSessionsSentence(scope, folder) : noMatchSentence(query, scope, folder) }), statusLine ? (_jsx("div", { className: "vf-pane-launcher-status", role: "status", children: _jsx("span", { children: statusLine.text }) })) : null] }));
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
const statusLine = historyStatusLine(history);
|
|
94
|
+
let index = -1;
|
|
95
|
+
body = (_jsxs(_Fragment, { children: [_jsx("div", { className: "vf-pane-launcher-list", id: listId, role: "listbox", "aria-label": "Past sessions", children: results.groups.map((group) => {
|
|
96
|
+
const groupId = `${listId}-${group.id}`;
|
|
97
|
+
return (_jsxs("div", { role: "group", "aria-labelledby": groupId, children: [_jsx("div", { className: "vf-pane-launcher-grp", id: groupId, children: group.label }), group.rows.map((row) => {
|
|
98
|
+
index += 1;
|
|
99
|
+
const rowIndex = index;
|
|
100
|
+
const selected = rowIndex === highlight;
|
|
101
|
+
const resuming = busy?.kind === 'resume' && busy.index === rowIndex;
|
|
102
|
+
const rowClass = [
|
|
103
|
+
'vf-pane-launcher-row',
|
|
104
|
+
selected ? 'is-cur' : '',
|
|
105
|
+
row.session.resumable ? '' : 'is-gone',
|
|
106
|
+
resuming ? 'is-press' : '',
|
|
107
|
+
resuming && flying ? 'is-flying' : '',
|
|
108
|
+
]
|
|
109
|
+
.filter(Boolean)
|
|
110
|
+
.join(' ');
|
|
111
|
+
return (_jsxs("div", { id: launcherOptionId(sessionId, rowIndex), [LAUNCHER_SOURCE_ATTRIBUTE]: launchSource('resume', rowIndex), role: "option", "aria-selected": selected, ...(row.session.resumable ? {} : { 'aria-disabled': true }), ...(resuming ? { 'aria-busy': true } : {}), className: rowClass, onPointerMove: () => onHighlight?.(rowIndex), onPointerDown: keepFocus, onClick: () => onResume?.(rowIndex), children: [_jsx(Mark, { providerId: row.providerId }), _jsxs("span", { className: "vf-pane-launcher-rt", children: [_jsx("b", { children: _jsx(Segments, { segments: row.titleSegments }) }), row.meta ? _jsx("small", { children: row.meta }) : null, row.evidence ? (_jsxs("small", { className: "vf-pane-launcher-ev", children: [row.evidence.who, ": \u201C", _jsx(Segments, { segments: row.evidence.segments }), "\u201D"] })) : null] }), _jsx("kbd", { "aria-hidden": "true", children: row.session.resumable ? '↵' : '' })] }, row.session.key));
|
|
112
|
+
})] }, group.id));
|
|
113
|
+
}) }), statusLine ? (_jsxs("div", { className: "vf-pane-launcher-status", role: "status", ...(statusLine.percent !== undefined
|
|
114
|
+
? { style: { '--p': `${statusLine.percent}%` } }
|
|
115
|
+
: {}), children: [_jsx("span", { children: statusLine.text }), statusLine.percent !== undefined ? _jsx("i", { "aria-hidden": "true" }) : null] })) : null] }));
|
|
116
|
+
}
|
|
117
|
+
const showFoot = open && !historyUnavailable(history) && rows.length > 0;
|
|
118
|
+
return (_jsxs("div", { ref: rootRef, className: "vf-pane-launcher-host", style: style, "data-vf-pane-launcher": sessionId, onPointerDownCapture: onRootPointerDown, onMouseDownCapture: onRootMouseDown, children: [previewAgent ? _jsx("span", { className: "vf-pane-launcher-preview", children: agentPreview(previewAgent) }) : null, _jsxs("div", { className: className, role: "group", "aria-label": "Resume a session or launch an agent in this pane", ...(flying && departOrigin ? { style: { transformOrigin: departOrigin } } : {}), children: [_jsxs("div", { className: `vf-pane-launcher-field${open ? ' is-focus' : ''}`, children: [_jsx(ResumeGlyph, {}), _jsxs("span", { className: "vf-pane-launcher-q", children: [_jsx("input", { ref: inputRef, type: "text", "aria-label": "Search past sessions", "aria-keyshortcuts": "Alt+Enter", ...(open
|
|
119
|
+
? {
|
|
120
|
+
role: 'combobox',
|
|
121
|
+
'aria-expanded': rows.length > 0,
|
|
122
|
+
'aria-controls': listId,
|
|
123
|
+
'aria-autocomplete': 'list',
|
|
124
|
+
...(current ? { 'aria-activedescendant': launcherOptionId(sessionId, highlight) } : {}),
|
|
125
|
+
}
|
|
126
|
+
: { tabIndex: -1 }), value: query, spellCheck: false, autoComplete: "off", onChange: (event) => onQueryChange?.(event.currentTarget.value), onFocus: () => {
|
|
127
|
+
if (!open)
|
|
128
|
+
onOpen?.();
|
|
129
|
+
}, onBlur: onFieldBlur }), query === '' ? (_jsx("span", { className: "vf-pane-launcher-ph", "aria-hidden": "true", children: open ? ('Search past sessions') : (_jsxs(_Fragment, { children: [_jsx("span", { className: "vf-pane-launcher-long", children: "Resume a session\u2026" }), _jsx("span", { className: "vf-pane-launcher-short", children: "Resume\u2026" })] })) })) : null] }), open ? (_jsxs("span", { className: "vf-pane-launcher-scope", role: "group", "aria-label": "Scope", children: [_jsx("button", { type: "button", className: scope === 'here' ? 'is-on' : undefined, "aria-pressed": scope === 'here', onPointerDown: keepFocus, onClick: () => onScope?.('here'), children: "here" }), _jsx("button", { type: "button", className: scope === 'all' ? 'is-on' : undefined, "aria-pressed": scope === 'all', onPointerDown: keepFocus, onClick: () => onScope?.('all'), children: "all" })] })) : (_jsx("kbd", { className: "vf-pane-launcher-k", "aria-hidden": "true", children: "\u2325\u21B5" }))] }), body, failure ? (_jsx("p", { className: "vf-pane-launcher-failure", role: "alert", children: failure })) : null, showFoot ? FOOT : null] })] }));
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=PaneLauncherChrome.js.map
|