Commit Graph

273 Commits

Author SHA1 Message Date
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
Cohee
6a4ee68113 Message delete highlight color follows theme settings 2024-05-11 17:17:42 +03:00
Cohee
1a219e32fe Switch sheld to use flex layout 2024-05-02 23:15:17 +03:00
Cohee
203146f7e2 Remove borders from scrollbar gutters.
Leave for moving UI vertical
2024-05-02 23:06:16 +03:00
Cohee
f796387e7e Limit background title height 2024-05-01 23:43:11 +03:00
Cohee
15a288b63d Remove shadow from top bar drawers 2024-05-01 14:52:17 +03:00
Cohee
a0d975c3c0 Add bottom margin to in-chat tables 2024-04-28 18:39:57 +03:00
RossAscends
f8ca73265b userSettings expandables get borders 2024-04-27 13:13:54 +09:00
Aisu Wata
93cd93ada3 style: .mes_block { overflow-y: clip; } 2024-04-25 21:49:12 -03:00
Cohee
b6b9b542d7 Add drag&drop to data bank 2024-04-24 01:51:54 +03:00
Cohee
09d43403b2 Merge branch 'staging' into neo-server 2024-04-19 15:07:38 +03:00
RossAscends
39b305621e reduce .mes top-margin on flat chat 2024-04-19 17:35:08 +09:00
Cohee
59bb04f1b3 Implement generic interface for adding Data Bank scrapers 2024-04-18 00:14:41 +03:00
Cohee
2b12d3f8e8 Merge branch 'staging' into neo-server 2024-04-15 01:23:36 +03:00
Cohee
31077629f1 Decrease char.button growth on wide tablets 2024-04-14 21:22:21 +03:00
Cohee
23ac23010d Fix the rest of mobile cases 2024-04-14 21:17:18 +03:00
Cohee
1de409fdf7 Don't force aspect ratio of zoomed avatars. Prevent closing on drag grabber. 2024-04-14 20:20:22 +03:00
Cohee
fcb47c9401 Fix zoomed avatars with moving UI 2024-04-14 20:13:45 +03:00
Kristan Schlikow
22e4721ead
Move zoomed avatar back down to match old display 2024-04-14 18:26:40 +02:00
Kristan Schlikow
0c4da602ab
Adjust style and add magnification to zoomed avatar 2024-04-14 02:58:23 +02:00
Cohee
bd4d8847ce Merge branch 'staging' into neo-server 2024-04-10 21:41:03 +03:00
Cohee
a9a3d91e4f Fix char management dropdown on rectangular avatars 2024-04-10 20:31:38 +03:00
Cohee
9b97294799 Denser layout 2024-04-10 20:27:06 +03:00
Kristan Schlikow
d4adbf496f
Address styling issues 2024-04-10 12:15:51 +02:00
Kristan Schlikow
7d4e689bec
Update layout for avatar tags and controls 2024-04-10 12:15:51 +02:00
Cohee
189d096834 Admin change password flow 2024-04-10 00:01:03 +03:00
Cohee
497f38111f Merge branch 'staging' into neo-server 2024-04-09 20:26:03 +03:00
LenAnderson
0e2a82ce00 add generic popups with their own elements 2024-04-08 18:42:33 -04:00
Cohee
0230177d27 Optimize server user storage use 2024-04-07 20:36:07 +03:00
Cohee
59daeeb37a Move default backgrounds to content manager 2024-04-06 17:43:59 +03:00
Cohee
144d115d6a Fix position of dynamic pop-outs control bar 2024-04-05 01:05:50 +03:00
Cohee
b747bdf89b Fix nav styles for narrower screens 2024-03-30 13:46:46 +02:00
Wolfsblvt
ea4ba57408 Fix horizontal scrollbar appearing in popups
- Fix that annoying horizontal scrollbar appearing in popups, e.g. the tag popup when you drag tags around
- Still provide possibility to make popups actually utilize scrollbars
2024-03-30 05:41:54 +01:00
Wolfsblvt
bf8b6b80d7 Refactor and improve bulk delete popup
- Improve bulk edit popup with display of avatars and better format
- Refactor both calls of bulk delete to use the same method
- Add display of filename on avatar hover for inline avatars (@Cohee you forgot this one (: )
2024-03-29 05:53:26 +01:00
Wolfsblvt
9005d3f790 Merge remote-tracking branch 'upstream/staging' into improve-bulk-edit-and-fixes 2024-03-29 02:42:27 +01:00
Cohee
4a71bda1dc Bit tighter character panel layout 2024-03-28 01:28:41 +02:00
Cohee
45bd8c18ed Remove last paragraph margin for compact layout 2024-03-27 19:49:14 +02:00
Cohee
0bf6835de2 Add "compact" argument to message sending commands. 2024-03-27 19:40:34 +02:00
Wolfsblvt
a4c4f36fc6 Bulk edit select improvements & bulk tag edit inline avatars
- bulk edit tags shows inline avatars for all selected characters
- allow shift-click selecting/deselecting multiple characters on bulk edit
- bulk select all button added
- bulk select shows selected character count
2024-03-27 08:33:32 +01:00
Wolfsblvt
40daf1ca1d Bulk edit tag improvements
- Show mutual tags on bulk edit
- Update tag list on tag added/removed in bulk edit
- Add "remove mutual" button to bulk edit tags
2024-03-27 08:33:32 +01:00
Cohee
6fa6f0c815 Fix panel buttons alignment 2024-03-26 16:10:55 +02:00
LenAnderson
dedb1625aa Merge branch 'staging' into qr-editor-wordwrap 2024-03-25 09:05:49 -04:00
LenAnderson
f3f954f5da add style for horizontal scrollbars 2024-03-25 09:04:57 -04:00
Cohee
04dad9a8de Fix styles 2024-03-21 01:11:26 +02:00
Cohee
0cdb501213 Fix styles 2024-03-21 00:24:13 +02:00
Cohee
839dc31822 Fix layering 2024-03-20 20:33:14 +02:00
Cohee
5ff8b85262 Fix extension drawers with top panel 2024-03-19 03:00:15 +02:00