A Svelte component for kalk, a calculator that supports user-defined functions and variables.
npm install @paddim8/kalk-componentA web component built with Svelte that uses the kalk library (WebAssembly).
npm install --save @paddim8/kalk-componentjs
import { KalkCalculator, ConsoleLine } from "@paddim8/kalk-component"
`
If your bundler doesn't include all the files in the output folder,
you may need to eg. modify your build script to copy them over manually.
I am not aware of a better way.$3
`html
`Usage
`html
kalker
Type 'help' for instructions.
`Customizing
The colours in the component can be changed by using these attributes.
`html
hinttext="Type something..."
autofocus="true"
identifiercolor="cornflowerblue"
operatorcolor="darkorange"
promptcolor="mediumseagreen"
errorcolor="tomato"
hintcolor="#9c9c9c"
linkcolor="cornflowerblue"
backgroundcolor="#424242" />
``