hanzi-writer

Chinese character stroke order animations and practice quizzes

MIT License

Downloads
3.9K
Stars
3.5K
Committers
9

Bot releases are visible (Hide)

hanzi-writer - v3.7.0 Latest Release

Published by chanind 5 months ago

3.7.0 (2024-05-23)

Features

hanzi-writer - v3.6.1

Published by chanind 10 months ago

3.6.1 (2024-01-02)

Bug Fixes

  • add license info to package.json (71de059)
hanzi-writer - v3.6.0

Published by chanind about 1 year ago

3.6.0 (2023-09-15)

Features

  • Add averageDistanceThreshold Option for Stroke Matching Leniency (#307) (1682d83)
hanzi-writer - v3.5.0

Published by chanind over 1 year ago

3.5.0 (2023-02-09)

Features

  • adding markStrokeCorrectAfterMisses option to quizzes (#295) (319ea83)
hanzi-writer - v3.4.2

Published by chanind over 1 year ago

3.4.2 (2023-02-08)

Bug Fixes

  • hide stroke highlight if it gets canceled rather than leaving it halfway (#294) (13852e7)
hanzi-writer - v3.4.1

Published by chanind over 1 year ago

3.4.1 (2023-02-08)

Bug Fixes

  • respect highlightCompleteColor when finishing quiz (#293) (99c6f93)
hanzi-writer - v3.4.0

Published by chanind almost 2 years ago

3.4.0 (2022-10-26)

Features

  • add quizStartStrokeNum option to allow quizzing final stroke (#281) (c0c08b0)
hanzi-writer - v3.3.0

Published by chanind about 3 years ago

3.3.0 (2021-10-02)

Features

hanzi-writer - v3.2.0

Published by chanind over 3 years ago

3.2.0 (2021-07-12)

Features

  • adding writer.updateDimensions method (#245) (f1a810c)
hanzi-writer - v3.1.0

Published by chanind over 3 years ago

3.1.0 (2021-03-02)

Features

  • adding a getCharacterData() method for easier loading of character data (#223) (3766a8b)
hanzi-writer - v3.0.3

Published by chanind over 3 years ago

3.0.3 (2021-02-24)

Bug Fixes

  • support older node and browser versions (#221) (9384f1c)
hanzi-writer - v3.0.2

Published by chanind over 3 years ago

3.0.2 (2021-02-01)

Bug Fixes

  • escaping the URL passed to clip-path to handle parentheses (#217) (9b33224)
hanzi-writer - v3.0.1

Published by chanind over 3 years ago

3.0.1 (2021-01-19)

Bug Fixes

hanzi-writer - v3.0.0

Published by chanind over 3 years ago

3.0.0 (2021-01-18)

Features

BREAKING CHANGES

  • types: Full rewrite in typescript, deprecated constructor args are removed

  • [ts-migrate][src] Init tsconfig.json file

Co-authored-by: ts-migrate <>

  • [ts-migrate][src] Rename files from JS/JSX to TS/TSX

Co-authored-by: ts-migrate <>

  • [ts-migrate][src] Run TS Migrate

Co-authored-by: ts-migrate <>

  • Convert project in to typescript

  • update(UserStrokeRenderer) add typings

  • update(jest-setup) replace (deprecated) lolex with "@sinonjs/fake-timers"

  • move tsconfig to root dir

  • Type additions, fixes, test updates

  • Update typings

  • Configure rollup for deployment

  • fix tests & linting

  • Include declaration types in build

  • update(Mutation) Implement type checks for provided mutation values based on the RenderState class/object

  • This makes the mutation a bit more verbose as it gets rid of the _inflate() call
  • There's no longer a need to provide a scope (unless you'd like to manually cancel mutations)
  • Optimise the cancelAll() function
  • update(utils) remove inflate() function as it's no longer needed

  • update(typings) allow users to import typedefs from "hanzi-writer"

  • chore: bump package versions

  • update(demo) fix default "showCharacter" state

  • Strengthen typings

  • Update lint config

  • update(Mutation) edge case for handling "isAlreadyAtEnd" where startValue may be undefined

  • update(HanziWriter) handle edge case where "_withDataPromise" may not be set

  • update(HanziWriter) add "resetDisplay" in cancelQuiz to allow users to reset their show/hide" character/outline options when manually cancelling.

  • update(tests) add "quiz.cancelTest({ resetDisplay: bool })" tests

  • update(HanziWriter) write tests for "_loadingManager" singleton

  • Remove webpack config

  • update(Quiz) add "onHighlightComplete" to quiz options
    This allows UI updates after the highlight has finished.

  • Add example using react (with typescript)
    Move vanilla js example from "demo" in to "examples" dir

  • update(Positioner) Require options with non-null values

  • update(Quiz & strokeMatches) apply cleanups, move default export to top of file

  • update(HanziWriter) don't return mutations

  • General file cleanups

  • update(project) Configure ts plugin to use babel transpiler

  • add filesize plugin
  • remove babel 6 packages
  • remove webpack
  • update(types) Loosen type requirement of CharacterJson to avoid type assertions.

  • fix(mutations) Quiz highlight complete color should now work correctly.

Seems to be two sources of truth for display stroke colors in RenderStateObject: "character[xxx].strokeColor" & "options.xxxxColor". The former never was never used so this has now been removed from the render state object.

  • Update quiz tests

  • Update using-react example

  • fix(CharacterActions) race condition between highlightStroke & showStroke where highlight opacity doesn't reset

  • update(tests) add svg/RenderTarget tests

  • fix typo

  • update(tests) Add more RenderTarget tests
    bump packages

  • bump packages

  • remove unused types package

  • Update snapshots

  • fix(geometry) stack overflow executing the frechetDist function on complex paths

Had some error logs that involve stack overflows originating from recursiveCalc. Rather opt for an O(n^2) algo.

  • update(circleci/config.yml) node version to v14 LTS

  • singlequote prettier style

  • recreating old tests to ensure functionality has not changed

  • removing examples to reduce scope of changes

  • adding back demo from master branch

  • fixing up imports and revertin cancelQuiz style to match master

  • reverting closer to master

  • reverting closer to master

  • changing cov target to 96

  • fixing types

  • minor reversions

  • updating package.json version

Co-authored-by: James [email protected]
Co-authored-by: James S [email protected]

hanzi-writer - v2.3.0

Published by chanind about 4 years ago

2.3.0 (2020-10-03)

Features

hanzi-writer - v2.2.2

Published by chanind over 4 years ago

2.2.2 (2020-03-05)

Bug Fixes

hanzi-writer - v2.2.1

Published by chanind over 4 years ago

2.2.1 (2020-02-25)

Bug Fixes

  • better error message if render target not found (#161) (2e6b884)
hanzi-writer - v2.2.0

Published by chanind almost 5 years ago

2.2.0 (2020-01-12)

Features

hanzi-writer - v2.1.0

Published by chanind almost 5 years ago

2.1.0 (2019-11-10)

Features

  • adding writer.highlightStroke() method (#146) (56e6906)
hanzi-writer - v2.0.4

Published by chanind about 5 years ago

2.0.4 (2019-08-01)

Bug Fixes