Anki/ts
Aristotelis c828a2eb6f
Add APIs for IO card rendering (#2739)
* Refactor: Add index to shapes package

* Add shape draw callback API to setupImageCloze

* Expose IO drawing API, switch away from image cloze naming

We currently use "image occlusion" in most places, but some references to "image cloze" still remain. For consistency's sake and to make it easier to quickly find IO-related code, this commit replaces all remaining references to "image cloze", only maintaining those required for backwards compatibility with existing note types.

* Add cloze ordinal to shapes

* Do not mutate original shapes during (de)normalization

Mutating shapes would be a recipe for trouble when combined with IO API use by external consumers.

(makeNormal(makeAbsolute(makeNormal())) is not idempotent,
and keeping track of the original state would introduce
additional complexity with no discernible performance benefit
or otherwise.)

* Tweak IO API, allowing modifications to ShapeProperties

* Tweak drawShape parameters

* Switch method order

For consistency with previous implementation

* Run Rust formatters

* Simplify position (de)normalization

---------

Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-20 09:36:46 +10:00
..
card-info Record FSRS difficulty in the review log 2023-09-17 11:50:38 +10:00
change-notetype Fix misleading warning when changing notetype from/to cloze (#2744) 2023-10-18 16:50:32 +10:00
components Keep badge out of natural tab order 2023-10-14 10:20:14 +10:00
congrats Combine all backend methods into a single js/d.ts file, like in Python 2023-07-03 13:46:38 +10:00
deck-options Rename Analyze to Evaluate in FSRS Deck Options (#2741) 2023-10-17 09:53:24 +10:00
domlib Fix overwrite surround (#2247) 2022-12-09 10:10:58 +10:00
editable Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
editor Fix reversed float left/right icons 2023-10-13 13:04:42 +10:00
fields Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
graphs Add stability graph 2023-10-01 15:44:33 +10:00
html-filter Detect incorrect usage of triple slash in TypeScript (#2524) 2023-05-26 12:49:44 +10:00
icons Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
image-occlusion Add APIs for IO card rendering (#2739) 2023-10-20 09:36:46 +10:00
import-anki-package Tooltips for CSV import and import page refactoring (#2655) 2023-09-14 09:06:15 +10:00
import-csv Tooltips for CSV import and import page refactoring (#2655) 2023-09-14 09:06:15 +10:00
import-page Hide show/close buttons on mobile 2023-09-19 13:14:54 +10:00
lib Integrate FSRS into Anki (#2654) 2023-09-16 16:09:26 +10:00
mathjax Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
reviewer Add APIs for IO card rendering (#2739) 2023-10-20 09:36:46 +10:00
sveltelib Apply Svelte typing fix from Abdo 2023-09-20 16:02:27 +10:00
tag-editor Combine all backend methods into a single js/d.ts file, like in Python 2023-07-03 13:46:38 +10:00
tools Fix eslint issue 2023-07-10 11:05:32 +10:00
.gitignore Update eslint to 4.22.0 2021-04-22 19:19:39 +02:00
bundle_svelte.mjs Fix a deprecation warning in Svelte 2023-08-23 11:05:14 +10:00
bundle_ts.mjs Add env var to enable sourcemaps 2022-12-04 11:37:16 +10:00
esbuild_jest.mjs Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
jest.config.js Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
licenses.json Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
page.html Load page script after body created (#1802) 2022-04-19 17:16:56 +10:00
README.md add add.sh helper for adding dependency and updating licenses 2020-12-31 12:20:51 +10:00
transform_ts.mjs Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
tsconfig.json Migrate to protobuf-es (#2547) 2023-06-14 22:47:37 +10:00
yarn.sh Fix yarn.sh failing with linked out folder 2023-03-31 13:08:59 +10:00

Anki's TypeScript and Sass dependencies. Some TS/JS code is also stored separately in ../qt/aqt/data/web/.

To update all dependencies:

./update.sh

To add a new dev dependency, use something like:

./add.sh -D @rollup/plugin-alias