Go to file
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
.buildkite move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
.github/ISSUE_TEMPLATE add issue template config.yml 2021-02-19 14:11:21 +10:00
cargo add aarch64-apple to Rust targets 2021-10-16 18:07:39 +10:00
docs get PyQt working directly with ./run on macOS 2021-10-16 18:07:29 +10:00
ftl Move update logic into CardInfo.svelte 2021-10-18 09:01:24 +02:00
platforms use x86 binaries for clang format/protobuf on Mac 2021-10-16 18:07:39 +10:00
proto use x86 binaries for clang format/protobuf on Mac 2021-10-16 18:07:39 +10:00
pylib pip/ -> python/ 2021-10-18 19:50:40 +10:00
python add aliases to run vendored python and node from command line 2021-10-18 19:50:41 +10:00
qt Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
rslib convert sql_format to ts_project; move into separate folder 2021-10-18 19:39:45 +10:00
sass Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
scripts add aliases to run vendored python and node from command line 2021-10-18 19:50:41 +10:00
ts Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
.bazelignore move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
.bazelrc default to a vendored copy of Python 2021-10-15 22:14:05 +10:00
.bazelversion update Bazel version 2021-10-01 20:54:48 +10:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
.prettierignore Fix prettier after moving node_modules to repo dir (#1413) 2021-10-09 10:13:14 +10:00
.prettierrc Fix prettier after moving node_modules to repo dir (#1413) 2021-10-09 10:13:14 +10:00
BUILD.bazel Fix prettier after moving node_modules to repo dir (#1413) 2021-10-09 10:13:14 +10:00
CONTRIBUTORS add new hook: add_cards_did_change_deck (#1420) 2021-10-12 17:55:21 +10:00
Cargo.lock Switch CardInfoDialog to ts page (#1414) 2021-10-14 19:22:47 +10:00
Cargo.toml add aarch64-apple to Rust targets 2021-10-16 18:07:39 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
README.md fix build badge 2021-06-24 09:21:56 +10:00
SECURITY.md add SECURITY.md 2021-09-22 22:55:19 +10:00
WORKSPACE move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
bazel.bat initial Bazel conversion 2020-11-01 14:26:58 +10:00
defs.bzl pip/ -> python/ 2021-10-18 19:50:40 +10:00
late_deps.bzl download wheels using rules_python 2021-10-15 16:02:26 +10:00
package.json Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
repos.bzl drop rules_pip 2021-10-16 16:54:35 +10:00
run get PyQt working directly with ./run on macOS 2021-10-16 18:07:29 +10:00
run-qt5 get PyQt working directly with ./run on macOS 2021-10-16 18:07:29 +10:00
run.bat enable Python warnings when running 2020-12-16 14:59:04 +10:00
yarn.lock Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00

README.md

Anki

Build status

This repo contains the source code for the computer version of Anki.

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/

For more information on building, please see Development.