feat(editor): F4.6b the command line on a computer's desktop
A new oracle, TerminalWindowRun, types into Java's own command line window: the window writes each line after its prompt, takes a blank line, cls, reset and exit itself, keeps the lines for the arrow keys, and keeps its text, history and working directory over a stop and a start. The room now holds a command line window per computer for everyone (TerminalWindow), kept over stops; the protocol carries its lines and the one way to read them (terminalScreen); the core goes on in the working directory of the run before (continueIn). The desktop opens programs in Java's frame, and the command line works with keyboard and finger: grey on black, the prompt hidden while a command runs, history, chips for the commands, Ctrl+C. The room's failure is now tested in the browser. Fixed: the room handed the engine the wall clock with fractions of a millisecond, and a ping hung after its first timeout. The engine and the room count whole milliseconds, as Java's clock does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -183,3 +183,115 @@
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
/* A program's window over the desktop (GUIApplicationWindow): Java's dark
|
||||
* grey title bar of 30 pixels with the icon at 16. */
|
||||
.program-window {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.program-titlebar {
|
||||
display: grid;
|
||||
grid-template-columns: 30px 1fr 30px;
|
||||
align-items: center;
|
||||
height: 30px;
|
||||
flex: none;
|
||||
background: rgb(64 64 64);
|
||||
}
|
||||
|
||||
.program-titlebar img {
|
||||
justify-self: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.program-titlebar h3 {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
font: 13px Dialog, sans-serif;
|
||||
color: rgb(225 225 225);
|
||||
}
|
||||
|
||||
.program-content {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* The command line (GUIApplicationTerminalWindow): grey on black, the input
|
||||
* line right after the text in the same scrolling area. 16 pixels in the
|
||||
* input: Safari on the iPad zooms into smaller fields. */
|
||||
.terminal {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
.terminal-screen {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
padding: 5px 5px 5px;
|
||||
color: rgb(222 222 222);
|
||||
font: 14px ui-monospace, Menlo, Consolas, 'Courier New', monospace;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.terminal-text {
|
||||
margin: 0;
|
||||
font: inherit;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.terminal-input {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.terminal-prompt {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.terminal-input input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
color: rgb(222 222 222);
|
||||
caret-color: rgb(222 222 222);
|
||||
font: 16px ui-monospace, Menlo, Consolas, 'Courier New', monospace;
|
||||
}
|
||||
|
||||
.terminal-keys {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex: none;
|
||||
overflow-x: auto;
|
||||
padding: 6px;
|
||||
background: rgb(32 32 32);
|
||||
}
|
||||
|
||||
.terminal-chip {
|
||||
flex: none;
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid rgb(90 90 90);
|
||||
border-radius: 8px;
|
||||
background: rgb(48 48 48);
|
||||
color: rgb(222 222 222);
|
||||
font: 14px ui-monospace, Menlo, Consolas, monospace;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user