docs: update project memory for calc-02 UI and command notes
This commit is contained in:
+3
-4
@@ -1,9 +1,8 @@
|
|||||||
# State
|
# State
|
||||||
- Core engine: `src/rpn-calculator.js`
|
- Core engine: `src/rpn-calculator.js`
|
||||||
- Active demo: `samples/calc-02/` portrait-only HP48GX layout; display-adjacent button row stays in 4 columns and uses compact popup menus for mode/constants
|
- Reference demo: `samples/calc-02/` (portrait-first HP48GX layout, compact mode/constants popups)
|
||||||
- Mode button shows the current angle mode only; selecting a mode uses a popup menu
|
- Important UI behavior: mode button shows the current angle mode; keyboard focus stays on the hidden input on desktop; clipboard paste is supported
|
||||||
- Public API: `push`, `pop`, `clear`, `swap`, `remove`, `edit`, `isValidIndex`, `input`, `command`, `getOperationsByCategory`, `getConstants`, `listConstants`, `setConstant`, `removeConstant`, `hasConstant`
|
- Public API: `push`, `pop`, `clear`, `swap`, `remove`, `edit`, `isValidIndex`, `input`, `command`, `getOperationsByCategory`, `getConstants`, `listConstants`, `setConstant`, `removeConstant`, `hasConstant`
|
||||||
- Config: `maxSize`, `base`, `angleMode`, `enabledCommands`
|
- 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
|
- Commands: arithmetic, stack, trigonometry, constants `pi` and `e`; arithmetic includes `root`; constants can be added or removed dynamically through the core API
|
||||||
- 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; mode and constant popups are aligned to the left edge of their trigger buttons; the portrait layout reference now lives in `samples/calc-02/visual-portrait.md`
|
|
||||||
- Exports: browser `window.RpnCalculator`, CommonJS `module.exports`
|
- Exports: browser `window.RpnCalculator`, CommonJS `module.exports`
|
||||||
|
|||||||
Reference in New Issue
Block a user