MCPcopy Index your code
hub / github.com/chanind/hanzi-writer

github.com/chanind/hanzi-writer @v3.7.3 sqlite

repository ↗ · DeepWiki ↗ · release v3.7.3 ↗
259 symbols 599 edges 64 files 4 documented · 2%
README

Hanzi Writer

CircleCI Codecov npm

https://chanind.github.io/hanzi-writer

Hanzi Writer is a free and open-source javascript library for Chinese character stroke order animations and stroke order practice quizzes. Works with both simplified and traditional characters.

Live demo

Getting Started and Documentation

For more info and instructions on getting started check out https://chanind.github.io/hanzi-writer

Data source

The chinese character svg and stroke order data used by Hanzi Writer is derived from the Make me a Hanzi project with some slight tweaks. The data can be found in the Hanzi Writer Data repo. There's a visualizer for this data here.

Contributing

Pull requests are welcome! If you would like to contribute code, you'll need to be able to build the project locally. After cloning the Hanzi Writer repo, you can get it set up by running:

yarn install

You can run tests with yarn test and you can build the project with yarn build.

License

Hanzi Writer is released under an MIT license.

The Hanzi Writer data comes from the Make Me A Hanzi project, which extracted the data from fonts by Arphic Technology, a Taiwanese font forge that released their work under a permissive license in 1999. You can redistribute and/or modify this data under the terms of the Arphic Public License as published by Arphic Technology Co., Ltd. A copy of this license can be found in ARPHICPL.TXT.

Extension points exported contracts — how you extend this code

GenericMutation (Interface)
(no doc) [3 implementers]
src/Mutation.ts
HanziWriterRendererBase (Interface)
(no doc) [2 implementers]
src/renderers/HanziWriterRendererBase.ts
StrokeMatchResultMeta (Interface)
(no doc)
src/strokeMatches.ts
HanziWriterRendererConstructor (Interface)
(no doc)
src/renderers/HanziWriterRendererBase.ts
StrokeMatchResult (Interface)
(no doc)
src/strokeMatches.ts

Core symbols most depended-on inside this repo

resolvePromises
called by 122
src/testUtils.ts
create
called by 45
src/HanziWriter.ts
render
called by 28
src/renderers/HanziWriterRendererBase.ts
run
called by 25
src/Mutation.ts
startQuiz
called by 23
src/Quiz.ts
startUserStroke
called by 22
src/Quiz.ts
continueUserStroke
called by 19
src/Quiz.ts
endUserStroke
called by 18
src/Quiz.ts

Shape

Method 129
Function 81
Class 44
Interface 5

Languages

TypeScript100%

Modules by API surface

src/HanziWriter.ts29 symbols
src/Mutation.ts23 symbols
src/geometry.ts17 symbols
src/Quiz.ts15 symbols
src/utils.ts14 symbols
src/RenderState.ts13 symbols
src/renderers/RenderTargetBase.ts11 symbols
src/characterActions.ts11 symbols
src/strokeMatches.ts10 symbols
src/models/Stroke.ts9 symbols
src/LoadingManager.ts8 symbols
src/renderers/svg/RenderTarget.ts7 symbols

Dependencies from manifests, versioned

@babel/core7.12.10 · 1×
@babel/preset-env7.12.11 · 1×
@babel/preset-typescript7.12.7 · 1×
@rollup/plugin-babel5.2.2 · 1×
@rollup/plugin-node-resolve11.1.0 · 1×
@sinonjs/fake-timers7.0.2 · 1×
@types/jest26.0.20 · 1×
@types/nise1.4.0 · 1×
@types/sinonjs__fake-timers6.0.2 · 1×
@typescript-eslint/eslint-plugin4.14.0 · 1×
@wessberg/rollup-plugin-ts1.3.8 · 1×

For agents

$ claude mcp add hanzi-writer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact