Skip to content

Tags: jsj05514/hanzi-writer

Tags

v3.3.0

Toggle v3.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: allow checking backwards strokes (chanind#252)

* feat: allow checking backwards strokes

* fixup: fix getMatchData types

Because it is recursive, it requires an explicit return type annotation.

* fixup: add single point test case

* fixup: avoid ternary values

v3.2.0

Toggle v3.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: adding writer.updateDimensions method (chanind#245)

* adding a method to updateDimensions of an existing writer without replacing state

* reorganizing methods

* updating caniuse to keep tests happy

* adding a setPositioner test to keep codecov happy

v3.1.0

Toggle v3.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: adding a getCharacterData() method for easier loading of charac…

…ter data (chanind#223)

v3.0.3

Toggle v3.0.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: support older node and browser versions (chanind#221)

v3.0.2

Toggle v3.0.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: escaping the URL passed to clip-path to handle parentheses (chan…

…ind#217)

Fixing a bug where if the current page has parentheses in the URL, it would cause hanzi-writer to break. Thanks @ cqiangcode for finding this!

v3.0.1

Toggle v3.0.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: type exports (chanind#214)

* Fix types bundle artifact for RecursivePartial
Properly export PositionerOptions
Bump packages

* update(types) allow PositionerOptions (in HanziWriterOptions) to be optional

* update(package.json) downgrade jest-canvas-mock to fix broken tests

v3.0.0

Toggle v3.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat(types): Typescript rewrite (chanind#211)

BREAKING CHANGE: 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]>

v2.3.0

Toggle v2.3.0's commit message
feat: release

v2.2.2

Toggle v2.2.2's commit message
fix: bump for release

v2.2.1

Toggle v2.2.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: better error message if render target not found (chanind#161)