mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 07:26:51 +03:00
2d3e803704
- only resize when necessary (check the container's height) - refactor CSS: use position relative / absolute to stack Buffers instead of display:none; this affects the calcuations used by fit() - fix dark mode styles, tweak viewport height (100vh --> 99vh) to prevent overflow scroller
29 lines
743 B
TypeScript
29 lines
743 B
TypeScript
export const DEFAULT_SESSION = '';
|
|
export const DEFAULT_HANDLER = 'hood';
|
|
export const RESIZE_DEBOUNCE_MS = 100;
|
|
export const RESIZE_THRESHOLD_PX = 15;
|
|
|
|
/**
|
|
* Session ID validity:
|
|
*
|
|
* - must start with an alphabetical
|
|
* - can be composed of alphanumerics with hyphens
|
|
* - can be length 1 or longer
|
|
*/
|
|
export const SESSION_ID_REGEX = /(^[a-z]{1}[a-z\d-]*$)/;
|
|
|
|
/**
|
|
* Open a session with a given agent using `[agent]![session_name]`
|
|
*
|
|
* For example:
|
|
* ```
|
|
* book!my-session
|
|
* ```
|
|
*
|
|
* This will create a new session in webterm for the `%book` agent.
|
|
*
|
|
* Note that the second capture group after the ! is composed of the session ID
|
|
* regex above.
|
|
*/
|
|
export const AGENT_SESSION_REGEX = /^([a-z]{1}[a-z\d-]*)!([a-z]{1}[a-z\d-]*$)/;
|