Anki is a smart spaced repetition flashcard program
Find a file
Henrik Giesel a981e56008
Improved add-on extension API (#1626)
* Add componentHook functionality

* Register package NoteEditor

* Rename OldEditorAdapter to NoteEditor

* Expose instances in component-hook as well

* Rename NoteTypeButtons to NotetypeButtons

* Move PreviewButton initialization to BrowserEditor.svelte

* Remove focusInRichText

- Same thing can be done by inspecting activeInput

* Satisfy formatter

* Fix remaining rebase issues

* Add .bazel to .prettierignore

* Rename currentField and activeInput to focused{Field,Input}

* Move identifier to lib and registration to sveltelib

* Fix Dynamic component insertion

* Simplify editingInputIsRichText

* Give extra warning in svelte/svelte.ts

- This was caused by doing a rename of a files, that only differed in
  case: NoteTypeButtons.svelte to NotetypeButtons.svelte
- It was quite tough to figure out, and this console.log might make it
  easier if it ever happens again

* Change signature of contextProperty

* Add ts/typings for add-on definition files

* Add Anki types in typings/common/index.d.ts

* Export without .svelte suffix

It conflicts with how Svelte types its packages

* Fix left over .svelte import from editor.py

* Rename NoteTypeButtons to unrelated to ensure case-only rename

* Rename back to NotetypeButtons.svelte

* Remove unused component-hook.ts, Fix typing in lifecycle-hooks

* Merge runtime-require and register-package into one file

+ Give some preliminary types to require

* Rename uiDidLoad to loaded

* Fix eslint / svelte-check

* Rename context imports to noteEditorContext

* Fix import name mismatch

- I wonder why these issues are not caught by svelte-check?

* Rename two missed usages of uiDidLoad

* Fix ButtonDropdown from having wrong border-radius

* Uniformly rename libraries to packages

- I don't have a strong opinion on whether to name them libraries or
  packages, I just think we should have a uniform name.
- JS/TS only uses the terms "module" and "namespace", however `package`
  is a reserved keyword for future use, whereas `library` is not.

* Refactor registration.ts into dynamic-slotting

- This is part of an effort to refactor the dynamic slotting (extending
  buttons) functionality out of components like ButtonGroup.

* Remove dynamically-slottable logic from ButtonToolbar

* Use DynamicallySlottable in editor-toolbar

* Fix no border radius on indentation button dropdown

* Fix AddonButtons

* Remove Item/ButtonGroupItem in deck-options, where it's not necessary

* Remove unnecessary uses of Item and ButtonGroupItem

* Fix remaining tests

* Fix relative imports

* Revert change return value of remapBinToSrcDir to ./bazel/out...

* Remove typings directory

* Adjust comments for dynamic-slottings
2022-02-03 14:52:11 +10:00
.buildkite move wheel build test into mac CI; enable symlinks in Linux CI 2022-01-23 19:18:46 +10:00
.github/ISSUE_TEMPLATE update bug report template 2021-11-12 12:20:02 +10:00
.vscode switch convenience symlinks to .bazel/ 2022-01-24 11:06:02 +10:00
cargo update Rust deps 2022-01-15 14:59:43 +10:00
docs split IDE docs into separate file; recommend VS Code 2022-01-24 19:46:09 +10:00
ftl Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
platforms use x86 binaries for clang format/protobuf on Mac 2021-10-16 18:07:39 +10:00
proto Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
pylib A field in __dict__ was not updated (#1632) 2022-02-01 13:41:57 +10:00
python update to latest rules_python 2022-01-15 16:16:33 +10:00
qt Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
rslib Optimise searching in (all) fields (#1622) 2022-01-24 20:30:08 +10:00
sass sass/codemirror does not appear to be used 2022-01-15 21:19:58 +10:00
scripts switch convenience symlinks to .bazel/ 2022-01-24 11:06:02 +10:00
ts Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
.bazelignore move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
.bazelrc switch convenience symlinks to .bazel/ 2022-01-24 11:06:02 +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 switch convenience symlinks to .bazel/ 2022-01-24 11:06:02 +10:00
.prettierignore Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
.prettierrc Mathjax editor improvements (#1502) 2021-11-23 10:27:32 +10:00
.user.bazelrc move Bazel convenience symlinks outside of repo folder 2022-01-23 19:18:44 +10:00
bazel.bat initial Bazel conversion 2020-11-01 14:26:58 +10:00
BUILD.bazel Fix prettier after moving node_modules to repo dir (#1413) 2021-10-09 10:13:14 +10:00
Cargo.lock update Rust deps 2022-01-15 14:59:43 +10:00
Cargo.toml move linkchecker into separate crate 2021-12-20 17:27:43 +10:00
CONTRIBUTORS qt/aqt/webview: handle opening href with target=_blank (#1623) 2022-01-24 12:23:01 +10:00
defs.bzl update to edition 2021 2021-11-18 20:51:10 +10:00
late_deps.bzl download wheels using rules_python 2021-10-15 16:02:26 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
package.json update JS deps 2022-01-16 13:29:48 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
pyrightconfig.json exclude .bazel and node_modules from Pylance indexing 2022-01-25 12:45:57 +10:00
README.md fix build badge 2021-06-24 09:21:56 +10:00
repos.bzl update to Rust 1.58.1 2022-01-24 13:21:00 +10:00
run 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
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
yarn.lock update JS deps 2022-01-16 13:29:48 +10:00

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.