From 849170ea49d46f2f89e708c1b66d41d476c25048 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sat, 16 May 2026 03:11:00 +0200 Subject: [PATCH] docs: update calc-02 portrait visual reference Move the portrait layout documentation to samples/calc-02/visual-portrait.md and refresh the project memory note to point to the new reference. --- .memory/project.md | 2 +- samples/calc-02/visual-landscape.txt | 10 ------ samples/calc-02/visual-portrait.md | 52 ++++++++++++++++++++++++++++ samples/calc-02/visual-portrait.txt | 26 -------------- 4 files changed, 53 insertions(+), 37 deletions(-) delete mode 100644 samples/calc-02/visual-landscape.txt create mode 100644 samples/calc-02/visual-portrait.md delete mode 100644 samples/calc-02/visual-portrait.txt diff --git a/.memory/project.md b/.memory/project.md index b0acf51..5e9ead2 100644 --- a/.memory/project.md +++ b/.memory/project.md @@ -5,5 +5,5 @@ - Public API: `push`, `pop`, `clear`, `swap`, `remove`, `edit`, `isValidIndex`, `input`, `command`, `getOperationsByCategory`, `getConstants`, `listConstants`, `setConstant`, `removeConstant`, `hasConstant` - Config: `maxSize`, `base`, `angleMode`, `enabledCommands` - Commands: arithmetic, stack, trigonometry, constants `pi` and `e`; arithmetic now includes `root` for y-th roots; constants can now be added or removed dynamically through the core API and the calc-02 constant menu reads from the engine -- Demo actions: keyboard focus is kept on the hidden input on desktop so typing keeps working; the keypad layout places Enter in the bottom-left, ± in the former Enter position, and Esc before Clear for safety; paste parses clipboard text as a number before pushing it to the stack; Ctrl+V is supported via the hidden input paste event; backspace is ignored when the stack is empty; operation errors are shown as an overlay bar on top of the calculator with a shorter timeout and darker red; the display button row uses a 4-column grid with a spacer cell to preserve alignment +- Demo actions: keyboard focus is kept on the hidden input on desktop so typing keeps working; the keypad layout places Enter in the bottom-left, ± in the former Enter position, and Esc before Clear for safety; paste parses clipboard text as a number before pushing it to the stack; Ctrl+V is supported via the hidden input paste event; backspace is ignored when the stack is empty; operation errors are shown as an overlay bar on top of the calculator with a shorter timeout and darker red; the display button row uses a 4-column grid with a spacer cell to preserve alignment; the portrait layout reference now lives in `samples/calc-02/visual-portrait.md` - Exports: browser `window.RpnCalculator`, CommonJS `module.exports` diff --git a/samples/calc-02/visual-landscape.txt b/samples/calc-02/visual-landscape.txt deleted file mode 100644 index 02f6667..0000000 --- a/samples/calc-02/visual-landscape.txt +++ /dev/null @@ -1,10 +0,0 @@ -┌──────────── Display ────────────┐ ┌────── Functions ─────┐ ┌──────────── Keypad ─────────────┐ -| T: | | x^2 | y^x | 1/x | % | | +/- | Clear | Esc | backspace | -| Z: | | √x | y√x | 10^x | | | 7 | 8 | 9 | / | -| Y: | | log | ln | | | | 4 | 5 | 6 | * | -| X: | └──────────────────────┘ | 1 | 2 | 3 | - | -└─────────────────────────────────┘ ┌─────── Trigo ────────┐ | 0 | . | Enter | + | -┌──────── Display Buttons ────────┐ | sin | cos | tan | └─────────────────────────────────┘ -| Mode | Paste | Up | Const | | asin | acos | atan | -| | Right | Down | Right | └──────────────────────┘ -└─────────────────────────────────┘ diff --git a/samples/calc-02/visual-portrait.md b/samples/calc-02/visual-portrait.md new file mode 100644 index 0000000..7b8d228 --- /dev/null +++ b/samples/calc-02/visual-portrait.md @@ -0,0 +1,52 @@ +# Calc 02 Visual Portrait + +## Display + +``` +┌──────────── Display ────────────┐ +| T: | +| Z: | +| Y: | +| X: | +└─────────────────────────────────┘ +``` + +## Display Buttons + +``` +┌──────── Display Buttons ────────┐ +| Mode | Paste | Up | Const | +| | Left | Down | Right | +└─────────────────────────────────┘ +``` + +## Keypad + +``` +┌───────────── Keypad ──────────────┐ +| +/- | Clear | Esc | backspace | +| 7 | 8 | 9 | / | +| 4 | 5 | 6 | * | +| 1 | 2 | 3 | - | +| 0 | . | Enter | + | +└───────────────────────────────────┘ +``` + +## Functions + +``` +┌──────────── Functions ────────────┐ +| x^2 | y^x | 1/x | % | +| √x | y√x | 10^x | | +| log | ln | | | +└───────────────────────────────────┘ +``` + +## Trigo + +``` +┌───────────── Trigo ───────────────┐ +| sin | cos | tan | | +| asin | acos | atan | | +└───────────────────────────────────┘ +``` diff --git a/samples/calc-02/visual-portrait.txt b/samples/calc-02/visual-portrait.txt deleted file mode 100644 index ccfcb6f..0000000 --- a/samples/calc-02/visual-portrait.txt +++ /dev/null @@ -1,26 +0,0 @@ -┌──────────── Display ────────────┐ -| T: | -| Z: | -| Y: | -| X: | -└─────────────────────────────────┘ -┌──────── Display Buttons ────────┐ -| Mode | Paste | Up | Const | -| | Right | Down | Right | -└─────────────────────────────────┘ -┌──────────── Keypad ─────────────┐ -| +/- | Clear | Esc | backspace | -| 7 | 8 | 9 | / | -| 4 | 5 | 6 | * | -| 1 | 2 | 3 | - | -| 0 | . | Enter | + | -└─────────────────────────────────┘ -┌─────────── Functions ───────────┐ -| x^2 | y^x | 1/x | % | -| √x | y√x | 10^x | | -| log | ln | | | -└─────────────────────────────────┘ -┌───────────── Trigo ─────────────┐ -| sin | cos | tan | | -| asin | acos | atan | | -└─────────────────────────────────┘