Anki/ts/editor
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
..
editor-toolbar Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
image-overlay Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
mathjax-overlay Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
plain-text-input Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
rich-text-input Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
tag-editor Separate input components into their own directories / Remove WithShortcut (#1613) 2022-01-24 11:43:09 +10:00
base.ts Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
BrowserEditor.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
BUILD.bazel Split/Merge editor.py for its three use cases (#1581) 2022-01-12 14:51:43 +10:00
change-timer.ts Add ChangeTimer.prototype.fireImmediately 2021-09-16 14:47:05 +02:00
code-mirror.ts Use default colors for CodeMirror in light theme Anki (#1578) 2022-01-10 12:51:50 +10:00
CodeMirror.svelte Use default colors for CodeMirror in light theme Anki (#1578) 2022-01-10 12:51:50 +10:00
DecoratedElements.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
destroyable.ts Fix Cloze button (#1504) 2021-11-24 10:25:24 +10:00
DuplicateLink.svelte Reimplement "Show Duplicates" button in editor (#1550) 2021-12-13 14:06:12 +10:00
EditingArea.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
editor-base.scss Several CSS fixes - Editor Cleanup (#1470) 2021-10-31 08:29:22 +10:00
EditorField.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
Fields.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
FieldsEditor.svelte Svelte Editor hotfixes (#1436) 2021-10-19 08:38:06 +10:00
FieldState.svelte Reimplement "Show Duplicates" button in editor (#1550) 2021-12-13 14:06:12 +10:00
FocusTrap.svelte Fix some Mathjax issues (#1547) 2022-01-08 11:46:01 +10:00
FrameElement.svelte Fix some Mathjax issues (#1547) 2022-01-08 11:46:01 +10:00
HandleBackground.svelte Always correctly update MathjaxHandle position 2021-09-15 17:05:43 +02:00
HandleControl.svelte Live theme changes (#1497) 2021-11-25 07:17:41 +10:00
HandleLabel.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
HandleSelection.svelte Always correctly update MathjaxHandle position 2021-09-15 17:05:43 +02:00
helpers.ts Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
icons.ts Separate input components into their own directories / Remove WithShortcut (#1613) 2022-01-24 11:43:09 +10:00
index_browser.ts Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
index_creator.ts Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
index_reviewer.ts Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
LabelContainer.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
LabelDescription.svelte Editor Field Descriptions (#1476) 2021-11-06 09:42:48 +10:00
LabelName.svelte Editor Field Descriptions (#1476) 2021-11-06 09:42:48 +10:00
legacy.scss Decrease button and tag size for Linux and Windows (#1532) 2021-12-06 19:01:15 +10:00
MathjaxElement.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
NoteCreator.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
NoteEditor.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
Notification.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
old-editor-adapter.ts Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
PlainTextBadge.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
PreviewButton.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
ReviewerEditor.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
RichTextBadge.svelte Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
StickyBadge.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
surround.ts Separate input components into their own directories / Remove WithShortcut (#1613) 2022-01-24 11:43:09 +10:00
tsconfig.json Separate input components into their own directories / Remove WithShortcut (#1613) 2022-01-24 11:43:09 +10:00