anki/ts/sveltelib
Henrik Giesel a87d877082
Fuzzy search in symbol insertion overlay (#2059)
* Add flag for enabling insert symbols feature

* Add symbols overlay directory

* Detect if :xy is inserted into editable

* Allow naive updating of overlay, and special handling of ':'

* First step towards better Virtual Element support

* Update floating to reference range on insert text

* Position SymbolsOverlay always on top or bottom

* Add a data-provider to emulate API

* Show correct suggestions in symbols overlay

* Rename to replacementLength

* Allow replacing via clicking in menu

* Optionally remove inline padding of Popover

* Hide Symbols overlay on blur of content editable

* Add specialKey to inputHandler and generalize how arrow movement is detected

- This way macOS users can use Ctrl-N to mean down, etc.

* Detect special key from within SymbolsOverlay

* Implement full backwards search while typing

* Allow navigating symbol menu and accepting with enter

* Add some entries to data-provider

* Satisfy eslint

* Generate symbolsTable from sources

* Use other github source, allow multiple names

In return, symbol must be unique

* Automatically scroll in symbols dropdown

* Use from npm packages rather than downloading from URL

* Remove console.log

* Remove print

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* Add pointerDown event to input-handler

- so that SymbolsOverlay can reset on field click

* Make tab do the same as enter

* Make font a bit smaller but increase relative icon size

* Satisfy type requirement of handlerlist

* Revert changing default size of DropdownItems

* Remove some now unused code for bootstrap dropdowns

* Use fuse to allow fuzzy searching of symbols

* Remove unnecessary async handling in data-provider

I did that because at first I was still expecting to fetch the symbols
from the backend

* Apply field font family in symbol preview

* Remove inline padding from latex popover

* Rename data-provier to symbols-table

* Add some explaining comments to interface

* Allow for auto insertion symbols

* Use deleteData and after instead of replaceData

* Allow using html in symbols

* Show html symbols as html

* Add SymbolsEntry component

* Also include containshtml at low search precedence

* Put character entities and gemoji into their own files

* Factor out prepareInsertion method

* Allow deletion while searching for correct symbol

* Respect insertCompositionText

* Delete data-provider

* Restrict auto insert queries to max 5 characters

* Satisfy svelte check

* Fix the overlay sometimes not showing

This will make sure to always normalize text nodes before searching.
However it adjacent text is partially formatted, this will still not
find the whole query.

For example, currently, entering `<b>:for</b>al` and then inputting `l`,
will not trigger a search for `forall`, because of the <b> formatting

* Add empty line

* Do not trigger overlay, when last character is whitespace or colon

* Add missing fuse license
2022-09-13 14:19:19 +10:00
..
position Insert symbols overlay (#2051) 2022-09-10 18:46:59 +10:00
action-list.ts Fix some Mathjax issues (#1547) 2022-01-08 11:46:01 +10:00
async.ts add missing copyright headers to *.ts 2021-04-13 18:57:08 +10:00
asyncReactive.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
BUILD.bazel Replace (some) Bootstrap dropdowns with Floating UI (#1695) 2022-03-02 14:21:19 +10:00
closing-click.ts Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
closing-keyup.ts Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
context-property.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
dom-mirror.ts Fix insert media always insert at the start (on Windows) (#1684) 2022-02-25 10:59:06 +10:00
dynamic-slotting.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
dynamicComponent.ts Use trailingComma: all setting in .prettierrc (#1435) 2021-10-19 09:06:00 +10:00
event-predicate.d.ts Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
event-store.ts Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
export-runtime.ts Fix insert media always insert at the start (on Windows) (#1684) 2022-02-25 10:59:06 +10:00
handler-list.ts Insert symbols overlay (#2051) 2022-09-10 18:46:59 +10:00
input-handler.ts Fuzzy search in symbol insertion overlay (#2059) 2022-09-13 14:19:19 +10:00
lifecycle-hooks.ts Fix plain text (#1689) 2022-02-25 11:14:26 +10:00
node-store.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
portal.ts Fix sticky field labels - Make editor toolbar+tag editor non sticky in editor (#2058) 2022-09-12 19:22:22 +10:00
preferences.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
resize-store.ts Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
shortcut.ts Allow using keyup with registerShortcut (#1755) 2022-03-29 09:28:44 +10:00
store-subscribe.ts Fix IME input after tab (#1584) 2022-01-12 08:39:41 +10:00
subscribe-updates.ts Replace (some) Bootstrap dropdowns with Floating UI (#1695) 2022-03-02 14:21:19 +10:00
theme.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
toggleable.ts Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
tsconfig.json Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
types.ts Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00