diff --git a/example/package.json b/example/package.json index 70673ed..79f9a34 100644 --- a/example/package.json +++ b/example/package.json @@ -13,7 +13,7 @@ "@types/react-dom": "^17.0.1", "@types/styled-components": "^5.1.7", "next": "10.0.7", - "perfect-freehand": "latest", + "perfect-freehand": "^0.2.0", "react": "17.0.1", "react-dom": "17.0.1", "react-feather": "^2.0.9", diff --git a/example/state.ts b/example/state.ts index 4c2429b..efed954 100644 --- a/example/state.ts +++ b/example/state.ts @@ -2,10 +2,9 @@ import * as React from 'react' import { createState, createSelectorHook } from '@state-designer/react' import { getPointer } from './hooks/useEvents' import { Mark, CompleteMark } from './types' -import pathAlgorithm from 'perfect-freehand' +import pathAlgorithm, { StrokeOptions } from 'perfect-freehand' -const defaultOptions = { - type: 'mouse', +const defaultOptions: StrokeOptions = { pressure: true, streamline: 0.5, minSize: 2.5, diff --git a/example/yarn.lock b/example/yarn.lock index 55d0706..5fcd70f 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -1645,7 +1645,7 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" -perfect-freehand@latest: +perfect-freehand@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/perfect-freehand/-/perfect-freehand-0.1.3.tgz#456bf810bd005279489362cf34be2ef24023d5a7" integrity sha512-TvI+dLe6i0DxIsBJJfS/39znvdPpMD22HLR8JJFawLmcFJ9aMRkz47zyCkRVOYGvWclXYK34YHj5m3K68z9PZA==