Commit Graph

322 Commits

Author SHA1 Message Date
Cohee 22d598c0f5 Fainter faint outline 2024-06-18 02:01:39 +03:00
Wolfsblvt dadef92fdf Switch focus styles to :focus-visible
- Switched dynamic styles to :focus-visible to let the browser decide when to display
- Changed most existing :focus CSS selectors to also use :focus-visible
-Made style variables for focus outlines (main and a faint one)
- Remove focus outline from chat bar buttons
- Fix focus of chat bar highlight, moved to outer border
- Fix buttons in chat backgrounds with keyboard navigation
2024-06-18 00:14:15 +02:00
Cohee 08a0b1e828 Merge branch 'staging' into smol-tag-improvements 2024-06-17 21:52:36 +03:00
Cohee 065d453477 Use main font variable where possible 2024-06-17 00:25:08 +03:00
Wolfsblvt 316df6ed17 Remove remnant CSS classes, whoops 2024-06-16 23:20:24 +02:00
Wolfsblvt f67ed6d22a Fix tabbing with hotswap multiple rows
- Add scroll-reset-container CSS class and handling
- Fix tabbing through hotswap favs by resetting position
2024-06-16 23:13:36 +02:00
Cohee e3a46df010 Merge branch 'staging' into smol-tag-improvements 2024-06-16 16:04:37 +03:00
Len 5cb319771d
Parser followup (#2377)
* set pipe to empty string on empty closure

* fix missing parser flags and scope

* add closure serializing

* add enum provider function to slash command arguments

* add enum providers for /bg, /ask, and /go

* fix index out of bounds returning undefined

* keep whitespace as is in mixed unnamed args (string+closure)

* add _hasUnnamedArgument to named arguments dictionary

* allow /var key=x retrieval

* add enum provider to /tag-add

* fix typo (case)

* add option to make enum matching optional

* add executor to enum provider

* change /tag-add enum provider to only show tags not already assigned

* add enum provider to /tag-remove

* fix name enum provider excluding groups

* remove void from slash command callback return types

* Lint undefined and null pipes

* enable pointer events in chat autocomplete

* fix type hint

---------

Co-authored-by: LenAnderson <Anderson.Len@outlook.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2024-06-15 00:48:41 +03:00
RossAscends 4c81215a60 fix theme-disrespecting text colorizing 2024-06-14 21:50:54 +09:00
Wolfsblvt bdf7fccbae Fix small things from code review
- Remove unused tailwind classes
- Added comment about timeout jsdoc
- Moved new CSS files to @import
2024-06-13 23:55:28 +02:00
Wolfsblvt 96f04a1c49 Merge branch 'staging' into smol-tag-improvements 2024-06-13 23:40:19 +02:00
Len aa4bdec79c
Fix syntax highlight editor (#2300)
* add Noto Sans Mono as default monospace font

* fix ::selection for syntax highlighted editor

* add full noto sans mono

* add explicit "overflow: auto" to textarea to stop Firefox from freaking out

* add syntax hightlight disable toggle

* fix noto sans mono path

* fix details position on scroll

* disable pointer events on autocomplete wrap

* fix for Firefox bug using relative colors

* Shorten font file names.
So that I won't have to scroll the list horizontally

---------

Co-authored-by: LenAnderson <Anderson.Len@outlook.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2024-06-13 21:05:50 +03:00
Wolfsblvt d98d811cc1 Merge branch 'staging' into smol-tag-improvements 2024-06-08 21:13:11 +02:00
Wolfsblvt d1824acee0 More small improvements on interactable styling 2024-06-08 07:13:52 +02:00
Wolfsblvt e2089b1e44 Dozens new keyboard interactables
- Made dozens of existing controls keyboard interactable
- Tweaked styling so the keyboard focus looks more pleasant
2024-06-06 02:48:06 +02:00
Wolfsblvt 55a95c910f Refactor keyboard controls to name "interactable" 2024-06-04 04:05:40 +02:00
Wolfsblvt e9d4a982c0 Small tweaks to (focus) element styling 2024-06-03 06:19:41 +02:00
Wolfsblvt 98905e0e53 Slight layout fixes to the char import popup
- Need to pull my "wider" popup type from the other branch, because 1/1 aspect ratio scaling is just bad
- Add a few tailwind-like classes for ul-li styling
- Add <kbd> element styling for keyboard buttons
2024-06-03 01:17:19 +02:00
Wolfsblvt 9318f94f08 Merge branch 'staging' into smol-tag-improvements 2024-06-02 21:07:46 +02:00
Wolfsblvt 89d1bc8341 Drag&Drop handler utility and animation 2024-06-02 05:54:41 +02:00
Wolfsblvt 6ca71c3e2c Popup styling changes for smaller content & small fixes 2024-06-02 00:09:25 +02:00
Cohee 2e23e78937 Update WI top block layout 2024-06-01 02:05:42 +03:00
Wolfsblvt c939c544e2 Rename popup css classes 2024-05-31 21:59:26 +02:00
Wolfsblvt d3327f7829 Create popup and animation css files 2024-05-31 03:30:41 +02:00
Wolfsblvt 1c6671df31 popup fix scrollbar style, align toastr 2024-05-30 21:03:52 +02:00
Cohee e0ba516551 Transition only opacity on send form buttons 2024-05-30 18:01:04 +03:00
Cohee e3ec65fd31 Collapse send buttons when commands are executed 2024-05-30 17:58:17 +03:00
Wolfsblvt 6c3118549f Make generic popups be modal dialogs
- Switch generic popups to actual <dialog> elements
- Move toastr settings from html to JS
- Add style variable for animation duration (to re-use in CSS)
- Remember focus of popup on stacking pop-up close to switch back to the element you started out in
- Fix keybinds of popups to only act on actual result-triggering controls
- Fix toastr appearing behind popups by dynamically moving the container inside the currently open dialog
- Improve autofocus on popup open
- Make cleaner and prettier popup animations, and tie them to the animation speed
-
2024-05-30 05:11:23 +02:00
Cohee 31eb0235c2 Clean-up button styles 2024-05-29 19:51:00 +03:00
Wolfsblvt 4f2543f7ae Fix popup custom buttons 2024-05-25 01:02:13 +02:00
Wolfsblvt d9582062d2 Expand popup functionality
- Add "custom buttons" functionality, each with their own popup result
- Handle 'Enter' by defining a default action
- Using default action to style the default button to make the default action visible
- Allow override of ok/cancel button on any popup type to display those
- Allow multiple popups to overlay each other
- Small styling changes for bottom spacing on non-input popups
2024-05-25 00:44:09 +02:00
RossAscends 56d0ffc1fd fix MovingUI infinite loop on resize to Y edge 2024-05-21 09:55:56 +09:00
RossAscends 09a575b783 remove debug css on .draggable 2024-05-21 07:50:24 +09:00
RossAscends 67381cf493 fix zoomedAvatar resize and movement 2024-05-20 12:18:30 +09:00
Cohee 5f79579a4d Fix selector? 2024-05-19 22:33:16 +03:00
Cohee 82f56da16b Hide script buttons on old Safari 2024-05-19 22:25:41 +03:00
LenAnderson 64ee2d77b8 fix switch to play button when script paused 2024-05-19 06:27:27 -04:00
Cohee 0b3c49da90 Allow bulk edit menu to wrap 2024-05-18 17:59:59 +03:00
Cohee 2eaabe13e3 Merge branch 'staging' into wi-regex-keys 2024-05-16 22:18:32 +03:00
Cohee 012f70336f Prevent header from jumping a few pixels when switching from list to character view 2024-05-16 01:02:22 +03:00
Cohee bac90edfad Merge branch 'staging' into wi-regex-keys 2024-05-15 23:40:19 +03:00
Cohee c4936ed535 Properly colorize webkit search cancel button 2024-05-15 23:06:10 +03:00
Cohee ac2475fb26 Merge branch 'staging' into wi-regex-keys 2024-05-15 01:21:45 +03:00
Cohee c8ed8e06f1 Unset doc-height for body 2024-05-14 22:13:00 +03:00
Cohee 1ebe5547d4 Revert themed coloring for message deletion highlight 2024-05-14 22:05:04 +03:00
Wolfsblvt 5426431adf Merge branch 'staging' into wi-regex-keys 2024-05-14 01:56:36 +02:00
Cohee 64500bfb37 Add rounding to textarea autofit 2024-05-13 16:48:35 +03:00
Cohee 5b7bfbaa98 Merge branch 'staging' into default-content 2024-05-12 23:48:49 +03:00
Len 1d75b98393
STscript Parser Rewrite (#1965)
* set isForced to true on input

* make floating auto-complete follow horizontal scrolling

* add callable closure vars

* changes to /let and /var for callable closures

* fix error message

* fix scope for closure arguments

* if should return the pipe result from closures

* use /run to call closures and no arguments on immediate closures

* throw exception from QRs window-function if no match

* when to show autocomplete vs info only

* autocomplete positioning

* autocomplete styling

* add theming to autocomplete (theme, dark, light)

* improve autocomplete show/hide logic and editor selection

* use blur tint color instead of chat tint color and use blur setting

* cleanup and docs

* use scope macros for QR args

* add enter to select autocomplete

* fix no executor found

* cleanup and comment

* fix alias list in help string

* fallback to empty string piped value if null or undefined

* fix typo

* blur textarea on ctrl+enter execute (and refocus after)

* stop executeSlashCommand if parser throws

* move /let and /var callbacks into functions

* switch textarea to monospace when value starts with slash

* add double pipe a pipe breaker

* fix /? slash

* remove some logging

* add "/:name" as shorthand for "/run name" after all

* move shit around

* fix error message

* use testRunShorthandEnd

* use parseQuotedValue and parseValue to determine name for "/:"

QR labels and set names can include spaces

* add some adjustments to make autocomplete work properly

some hint in there about "/:" would still be nice

* add autocomplete style  selector

* only strip quotes from subcommand if they are at both ends

* fix JSDoc

* escaping

* allow open quotes on dry run

* throwing shit at the wall for /: autocomplete

* escapes only for symbols

* clean up autocomplete

* improve performance

* fix scope macros

* remove unescaping of pipes

* fix macros in scope copy

* fix "/? slash"

* don't run parser for getNameAt if text has not changed

* fix options filter

* re-enable blur listener

* restore selection on non-replace select

* fix for escaping first character of value

* add support for {{pipe}} and {{var::}} closures

* add index support to var macro

* add scoped var macro to macro help

* more escape fixes

* reduce autocomplete render debounce

* cleanup

* restore old escape handling and parser flag for strict escaping

* fix "no match" autocomplete message

* add dummy commands for comments and parser flag

* fix type annotations

* somewhat safer macro replacements

* fix autocomplete select on blank / "no match"

* fix cutting off handled part in substitution

* add parser flag REPLACE_GETVAR

Replaces all {{getvar::}} and {{getglobalvar::}} macros with {{var::}}.
Inserts a series of command executors before the command with the macros that:
- save {{pipe}} to a var
- call /getvar or /getglobalvar to get the variable used in the macro
- call /let to save the retrieved variable
- return the saved {{pipe}} value

This helps to avoid double-substitutions when the var values contain text that could be interpreted as macros.

* remove old parser

* fix send on enter when no match

* deal with pipes in quoted values (loose escaping)

* add default parser flags to user settings

* allow quoted values in unnamed argument

* set parser flag without explicit state to "on"

* add click hint on parser error toast

* dirty more detailed cmd defs

* remove name from unnamed arg

* move autocomplete into class and floating with details

* replace jQuery's trigger('input') on #send_textarea with native events because jQuery does not dispatch the native event

* fix ctrl+space

* fix arrow navigation

* add comments

* fix pointer block

* add static fromProps

* fix up dummy commands

* migrate all commands to addCommandObject

* remove commented comment command

* fix alias in details

* add range as argument type

* switch to addCommandObject

* switch to addCommandObject

* fix height

* fix floating details position on left

* re-enable blur event

* use auto width for full details on floating autocomplete

* auto-size floating full details

* fix typo

* re-enable blur listener

* don't prevent enter when selected item is fully typed out

* add autocomplete details tooltips

* add language to slash command examples

* move makeItem into option and command and fix click select

* use autocomplete parts in /? slash

* fix alias formatting

* add language to slash command examples

* fix details position on initial input history

* small screen styles

* replace registerSlashCommand with detailed declarations

* put name on first line

* add missing returns

* fix missing comma

* fix alias display in autocomplete list

* remove args from help string

* move parser settings to its own section

* jsdoc

* hljs stscript lang

* add hljs to autocomplete help examples

* add missing import

* apply autocomplete colors to stscript codeblocks (hljs)

* add fromProps

* cache autocomplete elements

* towards generic autocomplete

* remove unused imports

* fix blanks

* add return types

* re-enable blur

* fix blank check

* Caption messages by id

* add aborting command execution

* fix return type

* fix chat input font reset

* add slash command progress indicator

* add missing return

* mark registerSlashCommand deprecated

* why??

* separate abort logic for commands

* remove parsing of quoted values from unnamed arg

* add adjustable autocomplete width

* revert stop button pulse

* add progress and pause/abort to QR editor

* add resize event on autocomplete width change

* add key= argument to all get vars

* refactoring

* introduce NamedArgumentAsignment

* add TODOs

* refactoring

* record start and end of named arg assignment

* refactoring

* prevent duplicate calls to show

* refactoring

* remove macro ac

* add secondary autocomplete and enum descriptions

* add syntax highlighting to QR editor

* add enum descriptions to /while

* add /let key=... to scope variable names

* add unnamed argument assignment class and unnamed argument splitting

* fix QR editor style

* remove dash before autocomplete help text

* add autocomplete for unnamed enums

* fix remaining dom after holding backslash

* fix for unnamed enums

* fix autocomplete for /parser-flag

* add parser-flag enum help

* fix type annotations

* fix autocomplete result for /:

* add colored autocomplete type icons

* collapse second line autocomplete help if empty

* mark optional named args in autocomplete

* fix when what

* remove duplicate debug buttons

* dispatch input on autocomplete select

* prevent grow from editor syntax layer

* add auto-adjust qr editor caret color

* remove text-shadow from autocomplete

* join value strings in /let and /var

* add /abort syntax highlight

* fix attempting secondary result when there is none

* rename settings headers and split autocomplete / stscript

* add parser flag tooltips

* add tooltips to chat width stops

* fix typo

* return clone of help item

* fix enum string

* don't make optional notice for autocomplete arguments smaller

* avoid scrollbar in chat input

* add rudimentary macro autocomplete

* strip macro from helptext

* finally remove closure delimiters around root

* cleanup

* fix index stuff for removed closure delimiters

* fix type hint

* add child commands to progress indicator

* include sub-separator in macro autocomplete

* remove all mentions of interruptsGeneration and purge

* remove unused imports

* fix syntax highlight with newline at end of input

* cleanup select pointer events

* coalesce onProgress call

* add regex to STscript syntax highlighting

* fix closure end

* fix autocomplete type icon alignment

* adjustments for small screens

* fix removing wrong element

* add missing "at=" arg to /sys, /comment, /sendas

* add font scale setting for autocomplete

* add target=_blank for parser flag links

* fix for searching enums

* remove REGEXP_MODE from hljs
just causes trouble

* fix autocomplete in closures

* fix typo

* fix type hint

* Get rid of scroll bar on load

* Add type hint for /send name argument. Fix 'at' types

* Add 'negative' arg hint to /sd command

* reenable blur event

* Allow /summarize to process any text

* Compact layout of script toggles

* Expand CSS by default

* fix double ranger indicator and adjust to narrow container

* make custom css input fill available vertical space

* reduce scroll lag

* use default cursor on scrollbar

* Clean-up module loading in index.html

* fix tab indent with hljs

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2024-05-12 22:15:05 +03:00
Cohee 9ed6ee2161 Sample Character browser to onboarding 2024-05-12 16:43:09 +03:00