Renamed to kalker

This commit is contained in:
bakk 2021-06-02 22:32:30 +02:00
parent 236d5842b9
commit fb3e1c4572
100 changed files with 92 additions and 20910 deletions

View File

@ -20,7 +20,7 @@ jobs:
continue-on-error: true continue-on-error: true
run: cargo publish --manifest-path kalk/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose run: cargo publish --manifest-path kalk/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
- name: Publish CLI - name: Publish CLI
run: sleep 20 && cargo publish --manifest-path kalk_cli/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose run: sleep 20 && cargo publish --manifest-path kalker/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
publish_npm: publish_npm:
name: publish to npm name: publish to npm
@ -64,13 +64,13 @@ jobs:
registry-url: https://registry.npmjs.org/ registry-url: https://registry.npmjs.org/
- name: build - name: build
run: | run: |
cd kalk_web cd web
npm install npm install
- name: publish - name: publish
run: echo success run: echo success
- name: publish - name: publish
run: | run: |
cd kalk_web cd web
sudo apt install expect sudo apt install expect
/usr/bin/expect <<EOD /usr/bin/expect <<EOD
spawn npm adduser spawn npm adduser
@ -92,11 +92,11 @@ jobs:
- name: Compile - name: Compile
run: | run: |
cargo build --release --verbose cargo build --release --verbose
cp target/release/kalk target/release/kalk-linux cp target/release/kalker target/release/kalker-linux
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: binaries name: binaries
path: target/release/kalk-linux path: target/release/kalker-linux
release_mac: release_mac:
name: release mac name: release mac
@ -113,11 +113,11 @@ jobs:
- name: Compile - name: Compile
run: | run: |
cargo build --release --verbose cargo build --release --verbose
zip -r kalk-macOS.zip target/release/kalk zip -r kalker-macOS.zip target/release/kalker
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: binaries name: binaries
path: kalk-macOS.zip path: kalker-macOS.zip
release_windows: release_windows:
name: release windows name: release windows
@ -133,8 +133,8 @@ jobs:
C:\Users\runneradmin\.cargo\registry\index C:\Users\runneradmin\.cargo\registry\index
C:\Users\runneradmin\.cargo\registry\cache C:\Users\runneradmin\.cargo\registry\cache
C:\Users\runneradmin\.cargo\registry\cache C:\Users\runneradmin\.cargo\registry\cache
D:\a\kalk\kalk\target D:\a\kalker\kalker\target
C:\msys64\home\paddi\kalk\target C:\msys64\home\paddi\kalker\target
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
with: with:
update: true update: true
@ -157,13 +157,13 @@ jobs:
- shell: msys2 {0} - shell: msys2 {0}
run: | run: |
[ ! -f /c/Users/runneradmin/.cargo/bin/cargo-wix.exe ] && cargo install cargo-wix [ ! -f /c/Users/runneradmin/.cargo/bin/cargo-wix.exe ] && cargo install cargo-wix
cd kalk_cli cd cli
cargo wix --no-build --nocapture cargo wix --no-build --nocapture
mv target/wix/*.msi target/wix/kalk-windows.msi mv target/wix/*.msi target/wix/kalker-windows.msi
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: binaries name: binaries
path: kalk_cli/target/wix/kalk-windows.msi path: cli/target/wix/kalker-windows.msi
release_android: release_android:
name: release android name: release android
@ -171,16 +171,16 @@ jobs:
needs: [publish_kalk_web] needs: [publish_kalk_web]
defaults: defaults:
run: run:
working-directory: ./kalk_mobile working-directory: ./mobile
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- uses: actions/cache@v2 - uses: actions/cache@v2
with: with:
path: | path: |
kalk_mobile/android/.gradle mobile/android/.gradle
kalk_mobile/android/build mobile/android/build
kalk_mobile/android/app/build mobile/android/app/build
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: npm - name: npm
run: | run: |
@ -190,21 +190,21 @@ jobs:
run: | run: |
npx cap sync npx cap sync
cd android cd android
version=$(cat ../../kalk_web/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]') version=$(cat ../../web/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
APP_VERSION_NAME=$version ./gradlew assembleRelease APP_VERSION_NAME=$version ./gradlew assembleRelease
- uses: r0adkll/sign-android-release@v1 - uses: r0adkll/sign-android-release@v1
name: sign apk name: sign apk
with: with:
releaseDirectory: kalk_mobile/android/app/build/outputs/apk/release releaseDirectory: mobile/android/app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }} signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }} alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }}
- run: mv $(ls -Art android/app/build/outputs/apk/release/*.apk | tail -n 1) ../kalk-android.apk - run: mv $(ls -Art android/app/build/outputs/apk/release/*.apk | tail -n 1) ../kalker-android.apk
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: binaries name: binaries
path: kalk-android.apk path: kalker-android.apk
create_release: create_release:
name: Create Release name: Create Release

4
.gitignore vendored
View File

@ -2,6 +2,6 @@ target
*/target */target
Cargo.lock Cargo.lock
kalk/Cargo.lock kalk/Cargo.lock
kalk_cli/Cargo.lock cli/Cargo.lock
kalk_cli/test cli/test
.vscode/ .vscode/

2
Cargo.lock generated
View File

@ -158,7 +158,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "kalk_cli" name = "kalker"
version = "0.5.4" version = "0.5.4"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",

View File

@ -1,5 +1,5 @@
[workspace] [workspace]
members = ["kalk", "kalk_cli"] members = ["kalk", "cli"]
[profile.release] [profile.release]
panic = "abort" panic = "abort"

View File

@ -1,10 +1,10 @@
![](logo.png) ![](logo.png)
Kalk is a calculator (both program and library) that supports user-defined variables, functions, derivation, and integration. It runs on Windows, macOS, Linux, Android, and in web browsers (with WebAssembly). Kalker (or "kalk") is a calculator program/website that supports user-defined variables, functions, derivation, and integration. It runs on Windows, macOS, Linux, Android, and in web browsers (with WebAssembly).
[![Crates.io](https://img.shields.io/crates/v/kalk_cli)](https://crates.io/crates/kalk_cli)![npm](https://img.shields.io/npm/v/@paddim8/kalk) [![GitHub](https://img.shields.io/github/license/PaddiM8/kalk)](https://github.com/PaddiM8/kalk/blob/master/LICENSE) [![Docs.rs](https://docs.rs/kalk/badge.svg)](https://docs.rs/kalk/latest/kalk/) ![Build status](https://img.shields.io/github/workflow/status/PaddiM8/kalk/Rust?event=push&label=build%20%26%20test) [![Crates.io](https://img.shields.io/crates/v/kalker)](https://crates.io/crates/kalker)![npm](https://img.shields.io/npm/v/@paddim8/kalk) [![GitHub](https://img.shields.io/github/license/PaddiM8/kalk)](https://github.com/PaddiM8/kalker/blob/master/LICENSE) [![Docs.rs](https://docs.rs/kalk/badge.svg)](https://docs.rs/kalk/latest/kalk/) ![Build status](https://img.shields.io/github/workflow/status/PaddiM8/kalker/Rust?event=push&label=build%20%26%20test)
[Kanban](https://kolan.strct.net/Board/4RAdMjLDz) | [Website - Try it out here!](https://kalk.strct.net) [Kanban](https://kolan.strct.net/Board/4RAdMjLDz) | [Website - Try it out here!](https://kalker.strct.net)
![](preview.png) ![](preview.png)
@ -12,21 +12,20 @@ Kalk is a calculator (both program and library) that supports user-defined varia
* Operators: +, -, \*, /, ! * Operators: +, -, \*, /, !
* Groups: (), ⌈⌉, ⌋⌊ * Groups: (), ⌈⌉, ⌋⌊
* [Pre-defined functions and constants](https://github.com/PaddiM8/kalk/blob/master/kalk/src/prelude.rs) * [Pre-defined functions and constants](https://github.com/PaddiM8/kalker/blob/master/kalk/src/prelude.rs)
* User-defined functions and variables. `f(x, y) = xy`, `x = 5` * User-defined functions and variables. `f(x, y) = xy`, `x = 5`
* User-defined units (experimental). `unit m = cm/100`, `2m/50cm`, `50cm to m` * Derivative of functions (derivatives of noisy functions or of higher order can be a bit inaccurate). `f'(2)`, `sin'(-pi)`
* Derivative of functions (derivatives of higher order can be a bit inaccurate). `f'(2)`, `sin'(-pi)`
* Integration. `∫(0, pi, sin(x) dx)` or `∫(0, π, sin(x) dx)` * Integration. `∫(0, pi, sin(x) dx)` or `∫(0, π, sin(x) dx)`
* Understands fairly ambiguous syntax. Eg. `2sin50 + 2xy` * Understands fairly ambiguous syntax. Eg. `2sin50 + 2xy`
* Syntax highlighting * Syntax highlighting
* Special-symbol completion on tab. Eg. write `sqrt` and press tab. It will be turned into `√`. * Special-symbol completion on tab. Eg. write `sqrt` and press tab. It will be turned into `√`.
* Sum function: `sum(start, to, expression)` Eg. `sum(1, 3, 2n+1)` is the same as `2*1+1 + 2*2+1 + 2*3+1` = `15` * Sum function: `sum(start, to, expression)` Eg. `sum(1, 3, 2n+1)` is the same as `2*1+1 + 2*2+1 + 2*3+1` = `15`
* Load a file including predefined functions and constants. For example, if you're going to use Kalk for physics, you load up your file with physics functions/constants when starting Kalk. `-i file` * Load a file including predefined functions and constants. For example, if you're going to use kalker for physics, you load up your file with physics functions/constants when starting kalker. `-i file`
* Misc: separate expressions by a semicolon to write them on the same line, use the `ans` variable to get the value of the previously calculated expression. * Misc: separate expressions by a semicolon to write them on the same line, use the `ans` variable to get the value of the previously calculated expression.
## Libraries ## Libraries
There are currently three different libraries related to kalk. There are currently three different libraries related to kalker.
* [kalk](https://crates.io/crates/kalk): The Rust crate that powers it all. * [kalk](https://crates.io/crates/kalk): The Rust crate that powers it all.
* [@paddim8/kalk](https://www.npmjs.com/package/@paddim8/kalk): JavaScript bindings for `kalk`. This lets you use it in the browser thanks to WebAssembly. * [@paddim8/kalk](https://www.npmjs.com/package/@paddim8/kalk): JavaScript bindings for `kalk`. This lets you use it in the browser thanks to WebAssembly.
@ -36,7 +35,7 @@ There are currently three different libraries related to kalk.
### Binaries ### Binaries
Pre-compiled binaries for Linux, Windows, and macOS (64-bit) are available in the [releases page](https://github.com/PaddiM8/kalk/releases). Pre-compiled binaries for Linux, Windows, and macOS (64-bit) are available in the [releases page](https://github.com/PaddiM8/kalker/releases).
### Compiling ### Compiling
@ -44,17 +43,17 @@ Pre-compiled binaries for Linux, Windows, and macOS (64-bit) are available in th
#### Cargo #### Cargo
Run `cargo install kalk_cli` Run `cargo install kalker`
#### Manually #### Manually
1. Go into the `kalk_cli` directory. 1. Go into the `cli` directory.
2. Run `cargo build --release` 2. Run `cargo build --release`
3. Grab the binary from `targets/release` 3. Grab the binary from `targets/release`
## Syntax ## Syntax
A more complete reference can be found on [the website](https://kalk.strct.net) A more complete reference can be found on [the website](https://kalker.strct.net)
### Functions ### Functions
@ -74,17 +73,17 @@ A more complete reference can be found on [the website](https://kalk.strct.net)
## Contributing ## Contributing
## kalk and kalk_cli (Rust) ## kalk and cli (Rust)
After making changes to the kalk library (in `kalk/`), you can easily try them out by going to the root of the project directory, and doing `cargo run`. This will start kalk_cli, with the new changes. If you're using Windows, you will need to [follow the instructions here](https://docs.rs/gmp-mpfr-sys/1.2.3/gmp_mpfr_sys/index.html#building-on-windows), but also make sure to install `mingw-w64-x86_64-rust` in MSYS2. After making changes to the kalk library (in `kalk/`), you can easily try them out by going to the root of the project directory, and doing `cargo run`. This will start kalker (cli), with the new changes. If you're using Windows, you will need to [follow the instructions here](https://docs.rs/gmp-mpfr-sys/1.2.3/gmp_mpfr_sys/index.html#building-on-windows), but also make sure to install `mingw-w64-x86_64-rust` in MSYS2.
## kalk_web (Svelte, TypeScript, Sass) ## web (Svelte, TypeScript, Sass)
Run: Run:
1. `npm install` 1. `npm install`
2. `npm run dev` - this will automatically re-compile the project when changes are made 2. `npm run dev` - this will automatically re-compile the project when changes are made
## kalk_mobile (Android) ## mobile (Android)
Run: Run:
1. `npm install` 1. `npm install`

View File

@ -6,15 +6,11 @@ description = "A calculator that supports user-defined functions, variables and
edition = "2018" edition = "2018"
keywords = ["math", "calculator", "cli", "command-line"] keywords = ["math", "calculator", "cli", "command-line"]
license = "MIT" license = "MIT"
name = "kalk_cli" name = "kalker"
readme = "../README.md" readme = "../README.md"
repository = "https://github.com/PaddiM8/kalk" repository = "https://github.com/PaddiM8/kalker"
version = "0.5.4" version = "0.5.4"
[[bin]]
name = "kalk"
path = "src/main.rs"
[dependencies] [dependencies]
ansi_term = "0.12.1" ansi_term = "0.12.1"
kalk = { path = "../kalk", version = "^2.0.4" } kalk = { path = "../kalk", version = "^2.0.4" }
@ -29,9 +25,9 @@ winres = "0.1"
[package.metadata.bundle] [package.metadata.bundle]
icon = ["../res/icon*"] icon = ["../res/icon*"]
identifier = "net.strct.kalk" identifier = "net.strct.kalker"
name = "kalk" name = "kalker"
short_description = "A calculator that supports user-defined functions, variables and units, and can handle fairly ambiguous syntax." short_description = "A calculator that supports user-defined functions, variables and units, and can handle fairly ambiguous syntax."
[package.metadata.bundle.bin.kalk] [package.metadata.bundle.bin.kalker]
name = "kalk" name = "kalker"

View File

@ -4,7 +4,7 @@ use winres;
#[cfg(windows)] #[cfg(windows)]
fn main() { fn main() {
let mut res = winres::WindowsResource::new(); let mut res = winres::WindowsResource::new();
res.set_icon("kalk.ico"); res.set_icon("kalker.ico");
res.compile().unwrap(); res.compile().unwrap();
} }

View File

@ -62,10 +62,10 @@ Sum function
The value of "n" increments. The value of "n" increments.
Example: sum(1, 4, 2n) will be the same as 2*1 + 2*2 + 2*3 + 2*4 = 20 Example: sum(1, 4, 2n) will be the same as 2*1 + 2*2 + 2*3 + 2*4 = 20
This can for example be used to calculate e: Σ(0, 10000, 1/n!) = 2.7182818284590455 This can for example be used to calculate e: Σ(0, 10000, 1/n!) = 2.7182818284590455
More precision can be gotten by changing the "--precision" flag. Run `kalk --help` for more info. More precision can be gotten by changing the "--precision" flag. Run `kalker --help` for more info.
Constants Constants
pi or π = 3.14159265 pi or π = 3.14159265
e = 2.71828182 e = 2.71828182
tau or τ = 6.2831853 tau or τ = 6.2831853
phi or ϕ = 1.61803398 phi or ϕ = 1.61803398

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -27,7 +27,7 @@ pub fn start(mut parser: &mut parser::Context, precision: u32) {
// If in tty, print the welcome message // If in tty, print the welcome message
if atty::is(atty::Stream::Stdin) && atty::is(atty::Stream::Stdout) { if atty::is(atty::Stream::Stdin) && atty::is(atty::Stream::Stdout) {
println!("kalk"); println!("kalker");
println!( println!(
"{}", "{}",
ansi_term::Color::Fixed(246).paint("Type 'help' for instructions.") ansi_term::Color::Fixed(246).paint("Type 'help' for instructions.")

View File

@ -13,52 +13,52 @@
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?> <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif ?> <?endif ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Name="Kalk" Id="*" UpgradeCode="F9D116C9-E90A-4956-803E-D8A7D324D434" Language="1033" Codepage="1252" Version="$(var.Version)" Manufacturer="Kalk"> <Product Name="Kalker" Id="*" UpgradeCode="F9D116C9-E90A-4956-803E-D8A7D324D434" Language="1033" Codepage="1252" Version="$(var.Version)" Manufacturer="Kalker">
<Package InstallerVersion="450" Compressed="yes" InstallScope="perMachine" Platform='$(var.Platform)'/> <Package InstallerVersion="450" Compressed="yes" InstallScope="perMachine" Platform='$(var.Platform)'/>
<MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed."/> <MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
<Icon Id="KalkIco" SourceFile=".\kalk.ico"/> <Icon Id="KalkerIco" SourceFile=".\kalker.ico"/>
<WixVariable Id="WixUILicenseRtf" Value=".\wix/License.rtf"/> <WixVariable Id="WixUILicenseRtf" Value=".\wix/License.rtf"/>
<Property Id="ARPPRODUCTICON" Value="KalkIco"/> <Property Id="ARPPRODUCTICON" Value="KalkerIco"/>
<MediaTemplate EmbedCab="yes"/> <MediaTemplate EmbedCab="yes"/>
<UIRef Id="WixUI_Minimal"/> <UIRef Id="WixUI_Minimal"/>
<Feature Id="ProductFeature" Title="ConsoleApp" Level="1"> <Feature Id="ProductFeature" Title="ConsoleApp" Level="1">
<ComponentRef Id="KalkExe"/> <ComponentRef Id="KalkerExe"/>
<ComponentRef Id="KalkShortcut"/> <ComponentRef Id="KalkerShortcut"/>
<ComponentRef Id="ModifyPathEnv"/> <ComponentRef Id="ModifyPathEnv"/>
</Feature> </Feature>
<!-- Create directories --> <!-- Create directories -->
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)"> <Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="KalkProgramFiles" Name="Kalk"/> <Directory Id="KalkerProgramFiles" Name="Kalker"/>
</Directory> </Directory>
<Directory Id="ProgramMenuFolder"> <Directory Id="ProgramMenuFolder">
<Directory Id="KalkProgramMenu" Name="Kalk"/> <Directory Id="KalkerProgramMenu" Name="Kalker"/>
</Directory> </Directory>
</Directory> </Directory>
<!-- Application binaries --> <!-- Application binaries -->
<DirectoryRef Id="KalkProgramFiles"> <DirectoryRef Id="KalkerProgramFiles">
<Component Id="KalkExe" Guid="*" Win64='$(var.Win64)'> <Component Id="KalkerExe" Guid="*" Win64='$(var.Win64)'>
<File Id="KalkExeFile" Source="..\target\release\kalk.exe" Name="kalk.exe" KeyPath="yes"/> <File Id="KalkerExeFile" Source="..\target\release\kalker.exe" Name="kalker.exe" KeyPath="yes"/>
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<DirectoryRef Id="KalkProgramMenu"> <DirectoryRef Id="KalkerProgramMenu">
<!-- Application shortcut --> <!-- Application shortcut -->
<Component Id="KalkShortcut" Guid="b1a06364-9af2-4864-94c4-e3985906c39f" Win64='$(var.Win64)'> <Component Id="KalkerShortcut" Guid="b1a06364-9af2-4864-94c4-e3985906c39f" Win64='$(var.Win64)'>
<Shortcut Id="KalkShortcutFile" Name="Kalk" Description="A calculator" Target="[KalkProgramFiles]kalk.exe"/> <Shortcut Id="KalkerShortcutFile" Name="Kalker" Description="A calculator" Target="[KalkerProgramFiles]kalker.exe"/>
<RemoveFolder Id="KalkProgramMenu" On="uninstall"/> <RemoveFolder Id="KalkerProgramMenu" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\kalk" Name="installed" Type="integer" Value="1" KeyPath="yes"/> <RegistryValue Root="HKCU" Key="Software\Microsoft\kalker" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component> </Component>
</DirectoryRef> </DirectoryRef>
<DirectoryRef Id="KalkProgramFiles"> <DirectoryRef Id="KalkerProgramFiles">
<!-- Add to PATH --> <!-- Add to PATH -->
<Component Id="ModifyPathEnv" Guid="732b94ae-608a-45fd-a0b3-d2896b6ef3b8" KeyPath="yes" Win64='$(var.Win64)'> <Component Id="ModifyPathEnv" Guid="732b94ae-608a-45fd-a0b3-d2896b6ef3b8" KeyPath="yes" Win64='$(var.Win64)'>
<Environment Id="PathEnv" Value="[KalkProgramFiles]" Name="PATH" Permanent="no" Part="first" Action="set" System="yes"/> <Environment Id="PathEnv" Value="[KalkerProgramFiles]" Name="PATH" Permanent="no" Part="first" Action="set" System="yes"/>
</Component> </Component>
</DirectoryRef> </DirectoryRef>
</Product> </Product>
</Wix> </Wix>

View File

@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">Kalk</string>
<string name="title_activity_main">Kalk</string>
<string name="package_name">net.strct.kalk</string>
<string name="custom_url_scheme">net.strct.kalk</string>
</resources>

20813
kalk_web/package-lock.json generated

File diff suppressed because it is too large Load Diff

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -2,7 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/.idea/kalk_mobile.iml" filepath="$PROJECT_DIR$/.idea/kalk_mobile.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/mobile.iml" filepath="$PROJECT_DIR$/.idea/mobile.iml" />
</modules> </modules>
</component> </component>
</project> </project>

View File

@ -2,7 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f715975d-940d-4ed4-9dbe-0bcb3d72e51d" name="Default Changelist" comment=""> <list default="true" id="f715975d-940d-4ed4-9dbe-0bcb3d72e51d" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/../kalk_web/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../kalk_web/package.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../web/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../web/package.json" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.strct.kalk"> package="net.strct.kalker">
<application <application
android:allowBackup="true" android:allowBackup="true"
@ -11,7 +11,7 @@
<activity <activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:name="net.strct.kalk.MainActivity" android:name="net.strct.kalker.MainActivity"
android:label="@string/title_activity_main" android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch" android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"> android:launchMode="singleTask">

View File

@ -1,6 +1,6 @@
{ {
"appId": "net.strct.kalk", "appId": "net.strct.kalker",
"appName": "Kalk", "appName": "Kalker",
"bundledWebRuntime": true, "bundledWebRuntime": true,
"npmClient": "npm", "npmClient": "npm",
"webDir": "www", "webDir": "www",
@ -10,4 +10,4 @@
"launchShowDuration": 0 "launchShowDuration": 0
} }
} }
} }

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">Kalker</string>
<string name="title_activity_main">Kalker</string>
<string name="package_name">net.strct.kalker</string>
<string name="custom_url_scheme">net.strct.kalker</string>
</resources>

View File

@ -1,6 +1,6 @@
{ {
"appId": "net.strct.kalk", "appId": "net.strct.kalker",
"appName": "Kalk", "appName": "Kalker",
"bundledWebRuntime": true, "bundledWebRuntime": true,
"npmClient": "npm", "npmClient": "npm",
"webDir": "www", "webDir": "www",
@ -10,4 +10,4 @@
"launchShowDuration": 0 "launchShowDuration": 0
} }
} }
} }

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -25,4 +25,4 @@
"gulp-sass": "^4.1.0", "gulp-sass": "^4.1.0",
"sass": "^1.32.0" "sass": "^1.32.0"
} }
} }

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Kalk</title> <title>Kalker</title>
<meta name="viewport" <meta name="viewport"
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
@ -24,7 +24,7 @@
<body> <body>
<div class="calculator"> <div class="calculator">
<kalk-calculator autofocus="true" buttonpanel="true" numberrow="true"> <kalk-calculator autofocus="true" buttonpanel="true" numberrow="true">
<console-line>kalk</console-line> <console-line>kalker</console-line>
<console-line> <console-line>
<span class="hint">Type 'help' for instructions.</span> <span class="hint">Type 'help' for instructions.</span>
</console-line> </console-line>
@ -33,4 +33,4 @@
<script src="capacitor.js"></script> <script src="capacitor.js"></script>
</body> </body>
</html> </html>

View File

@ -1,8 +1,8 @@
# Kalk Web Component # Kalker Web Component
![npm](https://img.shields.io/npm/v/@paddim8/kalk-component) ![npm](https://img.shields.io/npm/v/@paddim8/kalk-component)
![license](https://img.shields.io/npm/l/@paddim8/kalk-component) ![license](https://img.shields.io/npm/l/@paddim8/kalk-component)
A web component built with Svelte that uses kalk (WebAssembly). A web component built with Svelte that uses the kalk library (WebAssembly).
![preview](preview.png) ![preview](preview.png)
@ -26,7 +26,7 @@ I am not aware of a better way.
```html ```html
<div class="kalk"> <!-- Apply css rules for position/size/font/etc. to this --> <div class="kalk"> <!-- Apply css rules for position/size/font/etc. to this -->
<kalk-calculator> <kalk-calculator>
<console-line>kalk</console-line> <console-line>kalker</console-line>
<console-line> <console-line>
<span class="hint">Type 'help' for instructions.</span> <span class="hint">Type 'help' for instructions.</span>
</console-line> </console-line>

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -107,7 +107,7 @@
if (input.trim() == "help") { if (input.trim() == "help") {
output = `<a style="color: ${linkcolor}" output = `<a style="color: ${linkcolor}"
href="https://kalk.strct.net/#usage" href="https://kalker.strct.net/#usage"
target="blank">Link to usage guide</a>`; target="blank">Link to usage guide</a>`;
} else if (input.trim() == "clear") { } else if (input.trim() == "clear") {
outputLines = []; outputLines = [];