diff --git a/package.json b/package.json index 97a4e4e..69c4e48 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@quasar/extras": "^1.13.5", "@types/katex": "^0.14.0", "@types/uuid": "^8.3.4", + "@types/validator": "^13.7.2", "@vuetify/vite-plugin": "1.0.0-alpha.10", "chart.js": "^3.7.1", "dependency-graph": "^0.11.0", @@ -28,6 +29,7 @@ "mathjs": "^10.4.3", "quasar": "^2.6.6", "uuid": "^8.3.2", + "validator": "^13.7.0", "vue": "^3.2.25", "vue-chart-3": "^3.1.8", "vue-router": "^4.0.14", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca6e784..8827482 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,7 @@ specifiers: '@quasar/vite-plugin': ^1.0.9 '@types/katex': ^0.14.0 '@types/uuid': ^8.3.4 + '@types/validator': ^13.7.2 '@typescript-eslint/eslint-plugin': ^5.18.0 '@typescript-eslint/parser': ^5.18.0 '@vitejs/plugin-vue': ^2.3.1 @@ -22,6 +23,7 @@ specifiers: sass: 1.32.0 typescript: ^4.5.4 uuid: ^8.3.2 + validator: ^13.7.0 vite: ^2.9.0 vue: ^3.2.25 vue-chart-3: ^3.1.8 @@ -34,6 +36,7 @@ dependencies: '@quasar/extras': 1.13.5 '@types/katex': 0.14.0 '@types/uuid': 8.3.4 + '@types/validator': 13.7.2 '@vuetify/vite-plugin': 1.0.0-alpha.10_vite@2.9.1+vuetify@3.0.0-beta.0 chart.js: 3.7.1 dependency-graph: 0.11.0 @@ -42,6 +45,7 @@ dependencies: mathjs: 10.4.3 quasar: 2.6.6 uuid: 8.3.2 + validator: 13.7.0 vue: 3.2.31 vue-chart-3: 3.1.8_chart.js@3.7.1+vue@3.2.31 vue-router: 4.0.14_vue@3.2.31 @@ -393,6 +397,10 @@ packages: resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} dev: false + /@types/validator/13.7.2: + resolution: {integrity: sha512-KFcchQ3h0OPQgFirBRPZr5F/sVjxZsOrQHedj3zi8AH3Zv/hOLx2OLR4hxR5HcfoU+33n69ZuOfzthKVdMoTiw==} + dev: false + /@types/vfile-message/2.0.0: resolution: {integrity: sha512-GpTIuDpb9u4zIO165fUy9+fXcULdD8HFRNli04GehoMVbeNq7D6OBnqSmg3lxZnC+UvgUhEWKxdKiwYUkGltIw==} deprecated: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed. @@ -3761,6 +3769,11 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /validator/13.7.0: + resolution: {integrity: sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==} + engines: {node: '>= 0.10'} + dev: false + /vfile-message/1.1.1: resolution: {integrity: sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==} dependencies: diff --git a/src/App.vue b/src/App.vue index 07e4a36..ce01029 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,14 +1,55 @@ @@ -16,18 +57,22 @@ import { ref } from "vue"; - - + + - Title + + Crystal Math Worktable + + + - - - - - + @@ -37,12 +82,19 @@ import { ref } from "vue"; diff --git a/src/assets/l2.svg b/src/assets/l2.svg new file mode 100644 index 0000000..f45c422 --- /dev/null +++ b/src/assets/l2.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + C + M + + + diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 0000000..bd25b8f --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1,54040 @@ + + + + + + + + H5MljaZdAT1t4.svg + + + + + image/svg+xml + + + + + Openclipart + + + H5MljaZdAT1t4.svg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + M + C + + diff --git a/src/components/Login.vue b/src/components/Login.vue new file mode 100644 index 0000000..564cb69 --- /dev/null +++ b/src/components/Login.vue @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + {{ error }} + + + + + + + + {{ isRegistration ? 'Have an account?' : 'Not reigistered?' }} + {{ isRegistration ? 'Login' : 'Created an Account' }} + + + + + diff --git a/src/main.ts b/src/main.ts index 21ec924..5ce924a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,7 +12,7 @@ import router from './router' App UI -------------------------------------------------- */ -import { Quasar } from 'quasar' +import { Dark, Quasar } from 'quasar' // Import icon libraries import '@quasar/extras/roboto-font-latin-ext/roboto-font-latin-ext.css' @@ -20,8 +20,8 @@ import '@quasar/extras/material-icons/material-icons.css' import '@quasar/extras/fontawesome-v6/fontawesome-v6.css' // A few examples for animations from Animate.css: -// import @quasar/extras/animate/fadeIn.css -// import @quasar/extras/animate/fadeOut.css +import '@quasar/extras/animate/fadeInUp.css' +import '@quasar/extras/animate/fadeOutUp.css' // Import Quasar css import 'quasar/src/css/index.sass' @@ -32,7 +32,6 @@ import 'quasar/src/css/index.sass' -------------------------------------------------- */ import { DraggablePlugin } from '@braks/revue-draggable' -import { createAuth0 } from '@auth0/auth0-vue' import 'katex/dist/katex.min.css' import 'katex/dist/contrib/auto-render.min' @@ -47,16 +46,22 @@ import App from './App.vue' const app = createApp(App) app.use(Quasar, { - plugins: {}, // import Quasar plugins and add here -}) + plugins: {Dark}, // import Quasar plugins and add here + config: { + brand: { + primary: '#553564', + secondary: '#c1eeff', + accent: '#9C27B0', + + dark: '#1d1d1d', -app.use( - createAuth0({ - domain: 'dev-ge84r-eu.us.auth0.com', - client_id: 'zHjZGg1uPws0DkQg5bRdKcDX8m6AuTZl', // eslint-disable-line camelcase - redirect_uri: window.location.origin, // eslint-disable-line camelcase - }), -) + positive: '#21BA45', + negative: '#C10015', + info: '#31CCEC', + warning: '#F2C037', + }, + }, +}) app.use(router) diff --git a/src/pages/Editor.vue b/src/pages/Editor.vue index eb3e378..32de3b2 100644 --- a/src/pages/Editor.vue +++ b/src/pages/Editor.vue @@ -1,5 +1,5 @@ @@ -258,13 +291,13 @@ const removeRichTextBox = (id: number) => { - - Title + Title - + + @@ -279,14 +312,12 @@ const removeRichTextBox = (id: number) => { row-key="name" hide-no-data hide-bottom - :pagination="{rowsPerPage: 10000}" + :pagination="{ rowsPerPage: 10000 }" style="height: 100%; border-radius: 0" > - - {{ props.row.name }} - + {{ props.row.name }} @@ -295,7 +326,7 @@ const removeRichTextBox = (id: number) => { - + { hide-no-data hide-bottom hide-header - :pagination="{rowsPerPage: 10000}" + :pagination="{ rowsPerPage: 10000 }" style="height: 100%; border-top: 1px solid lightgrey; border-radius: 0" > @@ -327,7 +358,7 @@ const removeRichTextBox = (id: number) => { { :grid="[stepX, stepY]" :position="{ x: statement.x, y: statement.y }" :default-position="{ x: statement.x, y: statement.y }" - @stop="(e: {event: MouseEvent, data: {x: number, y: number}}) => stmOnControlledDragStop(statement)(e)" + @stop="(e: { event: MouseEvent, data: { x: number, y: number } }) => stmOnControlledDragStop(statement)(e)" > { - + - + - + - + @@ -415,16 +435,16 @@ const removeRichTextBox = (id: number) => { @click="() => openNewVariableDeclModal()" /> openNewExpressionModal()" + color="secondary" + icon="code" + title="Add an expression" + @click="() => openNewExpressionModal()" /> openNewFunctionModal()" + color="secondary" + icon="functions" + title="Add a new function" + @click="() => openNewFunctionModal()" /> { - + diff --git a/src/pages/Home.vue b/src/pages/Home.vue new file mode 100644 index 0000000..a2b297b --- /dev/null +++ b/src/pages/Home.vue @@ -0,0 +1,46 @@ + + + + + {{ msg }} + + Start + + + + + + + + + + diff --git a/src/pages/Login.vue b/src/pages/Login.vue deleted file mode 100644 index 2486976..0000000 --- a/src/pages/Login.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - - {{ msg }} - - Log in - - - - diff --git a/src/pages/Scratch.vue b/src/pages/Scratch.vue index 6e54ad8..ba6d7c0 100644 --- a/src/pages/Scratch.vue +++ b/src/pages/Scratch.vue @@ -1,40 +1,43 @@ @@ -43,7 +46,7 @@ - + diff --git a/src/quasar-variables.sass b/src/quasar-variables.sass index 1994d16..edc3022 100644 --- a/src/quasar-variables.sass +++ b/src/quasar-variables.sass @@ -1,8 +1,10 @@ -$primary : #1976D2 +$primary : #553564 $secondary : #26A69A $accent : #9C27B0 $dark : #1D1D1D +// $dark-page: #333333; + $positive : #21BA45 $negative : #C10015 diff --git a/src/router.ts b/src/router.ts index aaf3d4f..079434c 100644 --- a/src/router.ts +++ b/src/router.ts @@ -1,5 +1,5 @@ import { createRouter, createWebHistory } from 'vue-router' -import Home from './pages/Login.vue' +import Home from './pages/Home.vue' const routes = [ { diff --git a/src/support/auth.ts b/src/support/auth.ts new file mode 100644 index 0000000..fe0b5e2 --- /dev/null +++ b/src/support/auth.ts @@ -0,0 +1,10 @@ +let isLoggedIn = false +export const checkLoggedIn = () => { + return isLoggedIn +} +export const loggedIn = () => { + isLoggedIn = true +} +export const loggedOut = () => { + isLoggedIn = false +} diff --git a/src/support/page.ts b/src/support/page.ts index 377c72c..3b55eed 100644 --- a/src/support/page.ts +++ b/src/support/page.ts @@ -138,6 +138,15 @@ export class MathPage { } } + /** Look up a function statement by name, if it exists. */ + getFunctionByNameOrFail(name: string): MathStatement { + const fn = this.getFunctionByName(name) + if ( !fn ) { + throw new Error('Unable to find function with name: ' + name) + } + return fn + } + /** Evaluate the current state of the page and get the result. */ evaluate(): EvaluationResult { const evaluations: Record = {}
+ {{ error }} +
+ {{ isRegistration ? 'Have an account?' : 'Not reigistered?' }} + {{ isRegistration ? 'Login' : 'Created an Account' }} +