anki/ts/components
Henrik Giesel c2768e2188
Translate Editor entirely to Svelte (#1403)
* Translate editor to Svelte

Make editor fields grid rather than flexbox

Refactor ButtonToolbar margins

Remove remaining svelte.d.ts symlinks

Implement saveNow

Fix text surrounding

Remove HTML editor button

Clean up some empty files

Add visual for new field state badges

* Adds new IconConstrain.svelte to generalize the icon handling for
IconButton and Badge

Implement sticky functionality again

Enable Editable and Codable field state badges

Add shortcuts to FieldState badges

Add Shift+F9 shortcut back

Add inline padding back to editor fields, tag editor and toolbar

Make Editable and Codable only "visually hidden"

This way they are still updated in the background
Otherwise reshowing them will always start them up empty

Make empty editing area focusable

Start with moving fieldsKey and currentFieldKey to context.ts

Fix Codable being wrong size when opening for first time

Add back drag'n'drop

Make ButtonItem display: contents again

* This will break the gap between ButtonGroup items, however once we
  have a newer Chromium version we should use CSS gap property anyway

Fix most of typing issues

Use --label-color background color LabelContainer

Add back red color for dupes

Generalize the editor toolbar in the multiroot editor to widgets

Implement Notification.svelte for showing cloze hints

Add colorful icon to notification

Hook up Editable to EditingArea

Move EditingArea into EditorField

Include editorField in editor/context

Fix rebasing issues

Uniformly use SvelteComponentTyped

Take LabelContainer out of EditingArea

Use mirror-dom and node-store to export editable content

Fix editable update mechanism

Prepare passing the editing inputs as slots

Pass in editing inputs as slots

Use codable options again in codemirror

Delete editor/lib.ts

Remove CodableAdapter, Use more generic CodeMirror component

Fix clicking LabelContainer to focus

Use prettier

Rename Editable to ContentEditable

Fix writing Mathjax from Codable to Editable

Correctly adjust output HTML from editable

Refactor EditableStyles out of EditableContainer

Pass Image and Mathjax Handle via slots to Editable

Make Editable add its editingInputApi

Make Editable hideable

Fix font size not being set correctly

Refactor both fieldFocused and focusInCodable to focusInEditable

Fix focusIfField

Bring back $activeInput

Fix ClozeButton

Remove signifyCustomInput

Refactor MathjaxHandle

Refactor out some logic into store-subscribe

Fix Mathjax editor

Use focusTrap instead of focusing div

Delegate focus back to editingInput when refocusing focusTrap

Elegantly move focus between editing inputs when closing/opening

Make Codable tabbable

Automatically move caret to end on editable and codable

+ remove from editingInput api

Fix ButtonDropdown having two rows and missing button margins

Make svelte_check and eslint pass

Satisfy editor svelte_check

Save field updates to db again

Await editable styles before mounting content editable

Remove unused import from OldEditorAdapter

Add copyright header to OldEditorAdapter

Update button active state from contenteditable

* Use activateStickyShortcuts after waiting for noteEditorPromise

* Set fields via stores, make tags correctly set

* Add explaining comment to setFields

* Fix ClozeButton

* Send focus and blur events again

* Fix Codable not correctly updating on blur with invalid HTML

* Remove old code for special Enter behavior in tags

* Do not use logical properties for ButtonToolbar margins

* Remove getCurrentField

Instead use noteEditor->currentField or noteEditor->activeInput

* Remove Extensible type

* Use context-property for NoteEditor, EditorField and EditingArea

* Rename parameter in mirror-dom.allowResubscription

* Fix cutOrCopy

* Refactor context.ts into the individual components

* Move focusing of editingArea up to editorField

* Rename promiseResolve -> promiseWithResolver

* Rename Editable->RichTextInput and Codable->PlainTextInput

* Remove now unnecessary type assertion for `getNoteEditor` and `getEditingArea`

* Refocus field after adding, so subscription to editing area is refreshed
2021-10-18 22:01:15 +10:00
..
Absolute.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
Badge.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
BUILD.bazel pass ts deps into most Svelte packages; remove redundant deps 2021-10-18 12:44:31 +10:00
ButtonDropdown.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
ButtonGroup.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
ButtonGroupItem.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
buttons.ts Fix Float buttons in rtl 2021-09-06 21:15:37 +10:00
ButtonToolbar.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
ColorPicker.svelte Implement new ColorPicker 2021-05-30 22:58:40 +02:00
Container.svelte Add Container.svelte 2021-06-21 17:01:45 +02:00
context-keys.ts disabledKey => fieldFocusedKey 2021-07-05 18:15:03 +02:00
Detachable.svelte Rename Detachable.detach to detached 2021-05-07 14:31:08 +02:00
dropdown.ts handle changed aria-expanded typing 2021-09-29 12:20:27 +10:00
DropdownDivider.svelte WIP: Use our components in deckoptions sticky bar 2021-05-18 16:32:29 +02:00
DropdownItem.svelte Put sass into repo directory (#1409) 2021-10-09 10:25:03 +10:00
DropdownMenu.svelte Prevent hiding handles by clicking on handles 2021-09-15 17:56:56 +02:00
helpers.ts Port Focus tags shortcut to webview 2021-09-09 15:37:34 +02:00
IconButton.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
IconConstrain.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
identifier.ts Add Section and SectionItem for the deckoptions 2021-06-21 17:01:44 +02:00
Item.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
LabelButton.svelte Put sass into repo directory (#1409) 2021-10-09 10:25:03 +10:00
registration.ts Fix issues with sometimes cause assignment of wrong position value 2021-07-05 17:17:58 +02:00
Section.svelte More uniform file naming 2021-07-01 12:24:16 +02:00
SelectButton.svelte Put sass into repo directory (#1409) 2021-10-09 10:25:03 +10:00
SelectOption.svelte WIP: Use our components in deckoptions sticky bar 2021-05-18 16:32:29 +02:00
Shortcut.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
Spacer.svelte Space out Sticky Bottom with Spacer component 2021-09-09 15:37:58 +02:00
StickyFooter.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
StickyHeader.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
tsconfig.json update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
WithContext.svelte Disable FormatBlock buttons for Codable 2021-06-18 01:17:43 +02:00
WithDropdown.svelte Make the ImageHandle and MathjaxHandle dropdowns perfectly touch the HandleSelection 2021-09-15 22:26:32 +02:00
WithShortcut.svelte update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
WithState.svelte Disable Bold button in Codable 2021-06-18 00:27:07 +02:00
WithTooltip.svelte Prevent tooltip expanding body tag in editor 2021-09-15 02:24:09 +02:00