diff --git a/.gitignore b/.gitignore index 05e47ee..1a58011 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ node_modules dist dist-watch .cache -lib/svg-vocabulary.json +lib/_svg-vocabulary.json diff --git a/lib/pages/vocabulary-page.tsx b/lib/pages/vocabulary-page.tsx index 933741e..2db64fe 100644 --- a/lib/pages/vocabulary-page.tsx +++ b/lib/pages/vocabulary-page.tsx @@ -5,10 +5,8 @@ import { FILL_REPLACEMENT_COLOR, STROKE_REPLACEMENT_COLOR } from "../colors"; import * as colors from "../colors"; import { PointWithNormal, Specs } from "../specs"; -import _SvgVocabulary from "../svg-vocabulary.json"; import type { SvgSymbolData, SvgSymbolElement } from "../vocabulary"; - -const SvgVocabulary: SvgSymbolData[] = _SvgVocabulary as any; +import { SvgVocabulary } from "../svg-vocabulary"; type SvgSymbolContext = { stroke: string; @@ -155,7 +153,7 @@ const SvgSymbolSpecs: React.FC<{ specs: Specs }> = ({ specs }) => { ); }; -const BBOX_DILATION = 50; +const BBOX_DILATION = 100; const SvgSymbol: React.FC = (props) => { const d = props.data; diff --git a/lib/svg-vocabulary.ts b/lib/svg-vocabulary.ts new file mode 100644 index 0000000..55571eb --- /dev/null +++ b/lib/svg-vocabulary.ts @@ -0,0 +1,4 @@ +import type { SvgSymbolData } from "./vocabulary"; +import _SvgVocabulary from "./_svg-vocabulary.json"; + +export const SvgVocabulary: SvgSymbolData[] = _SvgVocabulary as any; diff --git a/lib/vocabulary.ts b/lib/vocabulary.ts index 105db32..4192ca6 100644 --- a/lib/vocabulary.ts +++ b/lib/vocabulary.ts @@ -31,7 +31,7 @@ const SUPPORTED_SVG_TAGS = new Set(SUPPORTED_SVG_TAG_ARRAY); const MY_DIR = __dirname; const SVG_DIR = path.join(MY_DIR, "..", "svg"); -const VOCAB_PATH = path.join(MY_DIR, "svg-vocabulary.json"); +const VOCAB_PATH = path.join(MY_DIR, "_svg-vocabulary.json"); const SVG_EXT = ".svg"; function onlyTags(