commit
0190ed596e
@ -0,0 +1,5 @@
|
||||
FROM nginx:latest
|
||||
|
||||
COPY dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
|
@ -0,0 +1,56 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mathy
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
name: mathy
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: mathy
|
||||
spec:
|
||||
containers:
|
||||
- name: mathy
|
||||
image: glmdev/mathy:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mathy-service
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
selector:
|
||||
name: mathy
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: mathy-ingress
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- mathy.glmdev.tech
|
||||
secretName: mathy-tls
|
||||
rules:
|
||||
- host: "mathy.glmdev.tech"
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: "/"
|
||||
backend:
|
||||
service:
|
||||
name: mathy-service
|
||||
port:
|
||||
number: 80
|
@ -0,0 +1,15 @@
|
||||
worker_processes 4;
|
||||
|
||||
events { worker_connections 1024; }
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
import 'vuetify/styles'
|
||||
import { createVuetify } from 'vuetify'
|
||||
|
||||
export default createVuetify()
|
After Width: | Height: | Size: 876 B |
@ -0,0 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
import {computed} from 'vue'
|
||||
import {MathStatement} from '../support/parse'
|
||||
|
||||
const props = defineProps<{
|
||||
statement: MathStatement,
|
||||
size?: 'big' | 'small',
|
||||
}>()
|
||||
|
||||
const getRenderedHTML = () => props.statement.toHTMLString()
|
||||
|
||||
const renderedHtml = getRenderedHTML()
|
||||
computed(getRenderedHTML)
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.big {
|
||||
transform: scale(1.3);
|
||||
}
|
||||
|
||||
.small {
|
||||
transform: scale(0.9);
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div ref="container" class="big" v-if="props?.size === 'big'" v-html="renderedHtml"></div>
|
||||
<div ref="container" class="small" v-else-if="props?.size === 'small'" v-html="renderedHtml"></div>
|
||||
<div ref="container" v-else v-html="renderedHtml"></div>
|
||||
</template>
|
@ -0,0 +1,56 @@
|
||||
<script setup lang="ts">
|
||||
import {EvaluationResult, Maybe} from '../types'
|
||||
import {MathStatement} from '../support/parse'
|
||||
import {computed} from 'vue'
|
||||
import Katex from './Katex.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
statement: MathStatement,
|
||||
evaluation: EvaluationResult,
|
||||
}>()
|
||||
|
||||
const getValueStatement = (): Maybe<MathStatement> => {
|
||||
const value = props.evaluation.statements[props.statement.id]
|
||||
if ( value ) {
|
||||
return MathStatement.temp(String(value))
|
||||
}
|
||||
}
|
||||
|
||||
let value = getValueStatement()
|
||||
computed(() => value = getValueStatement())
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.math-statement {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div class="math-statement">
|
||||
<div class="content">
|
||||
<Katex :statement="statement" size="big"/>
|
||||
<div class="result" v-if="value">
|
||||
<hr v-if="value" style="border: 1px solid #ccc; border-bottom: 0">
|
||||
<Katex :statement="value" size="small" style="color: #666"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<button>
|
||||
<img src="../assets/edit.svg" alt="Edit" height="16">
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
@ -0,0 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<Draggable>
|
||||
<div class="box">
|
||||
|
||||
<q-btn
|
||||
@click="showNotification"
|
||||
color="primary"
|
||||
label="Show another notification"
|
||||
/>
|
||||
</div>
|
||||
</Draggable>
|
||||
</template>
|
||||
|
||||
<style></style>
|
@ -0,0 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import {MathPage} from '../support/page'
|
||||
import {v4 as uuidv4} from 'uuid'
|
||||
import Statement from '../components/Statement.vue'
|
||||
import {MathStatement} from '../support/parse'
|
||||
|
||||
const page = new MathPage(uuidv4())
|
||||
const stmt1Id = page.addRaw('x = y+3/4')
|
||||
const stmt2Id = page.addRaw('y = 9')
|
||||
const evaluation = page.evaluate()
|
||||
|
||||
const stmt = page.getStatement(stmt1Id)
|
||||
console.log({page, stmt1Id})
|
||||
|
||||
const onEdit = (stmt: MathStatement) => () => console.log('edit', stmt)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<p>Scratch page for testing!</p>
|
||||
<Statement v-if="stmt" :statement="stmt" :evaluation="evaluation"/>
|
||||
</template>
|
@ -0,0 +1,10 @@
|
||||
$primary : #1976D2
|
||||
$secondary : #26A69A
|
||||
$accent : #9C27B0
|
||||
|
||||
$dark : #1D1D1D
|
||||
|
||||
$positive : #21BA45
|
||||
$negative : #C10015
|
||||
$info : #31CCEC
|
||||
$warning : #F2C037
|
@ -0,0 +1,27 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Home from './pages/Login.vue'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: Home,
|
||||
},
|
||||
{
|
||||
path: '/scratch',
|
||||
name: 'Scratch',
|
||||
component: () => import(/* webpackChunkName: "scratch" */ './pages/Scratch.vue'),
|
||||
},
|
||||
{
|
||||
path: '/editor',
|
||||
name: 'Editor',
|
||||
component: () => import('./pages/Editor.vue'),
|
||||
},
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: routes,
|
||||
})
|
||||
|
||||
export default router
|
@ -0,0 +1,112 @@
|
||||
import {MathStatement} from './parse'
|
||||
import * as math from 'mathjs'
|
||||
import {DepGraph} from 'dependency-graph'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import {EvaluationResult, Maybe, StatementID, VariableName} from '../types'
|
||||
|
||||
/**
|
||||
* Wrapper for a page containing multiple interrelated mathematical statements.
|
||||
*/
|
||||
export class MathPage {
|
||||
/** The statements on the page. */
|
||||
protected statements: Record<StatementID, MathStatement> = {}
|
||||
|
||||
constructor(
|
||||
/** Unique page ID. */
|
||||
public readonly id: string,
|
||||
) {}
|
||||
|
||||
/** Get a statement by ID if it exists. */
|
||||
getStatement(id: StatementID): Maybe<MathStatement> {
|
||||
return this.statements[id]
|
||||
}
|
||||
|
||||
/** Add a statement to this page. */
|
||||
addStatement(statement: MathStatement): this {
|
||||
this.statements[statement.id] = statement
|
||||
return this
|
||||
}
|
||||
|
||||
/** Parse the math expression and add it to the page as a statement. */
|
||||
addRaw(statement: string): StatementID {
|
||||
const stmt = new MathStatement(uuidv4() as StatementID, statement)
|
||||
this.addStatement(stmt)
|
||||
return stmt.id
|
||||
}
|
||||
|
||||
/** Get all symbols referenced by statements on this page. */
|
||||
symbols(): math.SymbolNode[] {
|
||||
return Object.values(this.statements)
|
||||
.map(x => x.symbols())
|
||||
.reduce((carry, current) => current.concat(carry), [])
|
||||
}
|
||||
|
||||
/** Get all symbols defined on this page. */
|
||||
defines(): math.SymbolNode[] {
|
||||
return Object.values(this.statements)
|
||||
.map(x => x.defines())
|
||||
.reduce((carry, current) => current.concat(carry), [])
|
||||
}
|
||||
|
||||
/** Get all symbols used on this page. */
|
||||
uses(): math.SymbolNode[] {
|
||||
return Object.values(this.statements)
|
||||
.map(x => x.uses())
|
||||
.reduce((carry, current) => current.concat(carry), [])
|
||||
}
|
||||
|
||||
/** Get a mapping of symbol names to the statements where they are defined. */
|
||||
definers(): Record<VariableName, MathStatement> {
|
||||
const definers: Record<VariableName, MathStatement> = {}
|
||||
|
||||
for ( const statement of Object.values(this.statements) ) {
|
||||
for ( const symbol of statement.defines() ) {
|
||||
definers[symbol.name as VariableName] = statement
|
||||
}
|
||||
}
|
||||
|
||||
return definers
|
||||
}
|
||||
|
||||
/** Get the dependency graph of variable declarations between statements on this page. */
|
||||
dependencies(): DepGraph<MathStatement> {
|
||||
const graph = new DepGraph<MathStatement>()
|
||||
const defined: Record<VariableName, MathStatement> = this.definers()
|
||||
|
||||
for ( const statement of Object.values(this.statements) ) {
|
||||
graph.addNode(statement.id, statement)
|
||||
}
|
||||
|
||||
for ( const statement of Object.values(this.statements) ) {
|
||||
for ( const symbol of statement.uses() ) {
|
||||
const provider = defined[symbol.name as VariableName]
|
||||
if ( !provider ) {
|
||||
throw new Error('No provider for undefined symbol: ' + symbol.name)
|
||||
}
|
||||
|
||||
graph.addDependency(statement.id, provider.id)
|
||||
}
|
||||
}
|
||||
|
||||
return graph
|
||||
}
|
||||
|
||||
/** Evaluate the current state of the page and get the result. */
|
||||
evaluate(): EvaluationResult {
|
||||
const evaluations: Record<StatementID, any> = {}
|
||||
const scope: Record<VariableName, any> = {}
|
||||
const graph = this.dependencies()
|
||||
|
||||
for ( const node of graph.overallOrder() ) {
|
||||
const stmt = this.statements[node as StatementID]
|
||||
evaluations[stmt.id] = stmt.parse()
|
||||
.compile()
|
||||
.evaluate(scope)
|
||||
}
|
||||
|
||||
return {
|
||||
variables: scope,
|
||||
statements: evaluations,
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,317 @@
|
||||
import * as math from 'mathjs'
|
||||
import katex from 'katex'
|
||||
import {HTMLString, LaTeXString, StatementID} from '../types'
|
||||
import {v4 as uuidv4} from 'uuid'
|
||||
|
||||
/** Base class for walks over MathNode trees. */
|
||||
export abstract class MathNodeWalk<TReturn> {
|
||||
walk(node: math.MathNode): TReturn {
|
||||
if ( math.isAccessorNode(node) ) {
|
||||
return this.walkAccessorNode(node)
|
||||
} else if ( math.isArrayNode(node) ) {
|
||||
return this.walkArrayNode(node)
|
||||
} else if ( math.isAssignmentNode(node) ) {
|
||||
return this.walkAssignmentNode(node)
|
||||
} else if ( math.isBlockNode(node) ) {
|
||||
return this.walkBlockNode(node)
|
||||
} else if ( math.isConditionalNode(node) ) {
|
||||
return this.walkConditionalNode(node)
|
||||
} else if ( math.isConstantNode(node) ) {
|
||||
return this.walkConstantNode(node)
|
||||
} else if ( math.isFunctionAssignmentNode(node) ) {
|
||||
return this.walkFunctionAssignmentNode(node)
|
||||
} else if ( math.isFunctionNode(node) ) {
|
||||
return this.walkFunctionNode(node)
|
||||
} else if ( math.isIndexNode(node) ) {
|
||||
return this.walkIndexNode(node)
|
||||
} else if ( math.isObjectNode(node) ) {
|
||||
return this.walkObjectNode(node)
|
||||
} else if ( math.isOperatorNode(node) ) {
|
||||
return this.walkOperatorNode(node)
|
||||
} else if ( math.isParenthesisNode(node) ) {
|
||||
return this.walkParenthesisNode(node)
|
||||
} else if ( math.isRangeNode(node) ) {
|
||||
return this.walkRangeNode(node)
|
||||
} else if ( (node as unknown as any).isRelationalNode ) {
|
||||
return this.walkRelationalNode(node as unknown as any)
|
||||
} else if ( math.isSymbolNode(node) ) {
|
||||
return this.walkSymbolNode(node)
|
||||
}
|
||||
|
||||
throw new TypeError('Invalid MathNode: ' + node)
|
||||
}
|
||||
|
||||
abstract walkAccessorNode(node: math.AccessorNode): TReturn
|
||||
|
||||
abstract walkArrayNode(node: math.ArrayNode): TReturn
|
||||
|
||||
abstract walkAssignmentNode(node: math.AssignmentNode): TReturn
|
||||
|
||||
abstract walkBlockNode(node: math.BlockNode): TReturn
|
||||
|
||||
abstract walkConditionalNode(node: math.ConditionalNode): TReturn
|
||||
|
||||
abstract walkConstantNode(node: math.ConstantNode): TReturn
|
||||
|
||||
abstract walkFunctionAssignmentNode(node: math.FunctionAssignmentNode): TReturn
|
||||
|
||||
abstract walkFunctionNode(node: math.FunctionNode): TReturn
|
||||
|
||||
abstract walkIndexNode(node: math.IndexNode): TReturn
|
||||
|
||||
abstract walkObjectNode(node: math.ObjectNode): TReturn
|
||||
|
||||
abstract walkOperatorNode(node: math.OperatorNode): TReturn
|
||||
|
||||
abstract walkParenthesisNode(node: math.ParenthesisNode): TReturn
|
||||
|
||||
abstract walkRangeNode(node: math.RangeNode): TReturn
|
||||
|
||||
abstract walkRelationalNode(node: math.RelationalNode): TReturn
|
||||
|
||||
abstract walkSymbolNode(node: math.SymbolNode): TReturn
|
||||
}
|
||||
|
||||
|
||||
/** A walk that accumulates all different SymbolNode instances in a tree. */
|
||||
export class SymbolWalk extends MathNodeWalk<math.SymbolNode[]> {
|
||||
walkAccessorNode(node: math.AccessorNode): math.SymbolNode[] {
|
||||
return [
|
||||
...this.walk(node.object),
|
||||
...this.walk(node.index),
|
||||
]
|
||||
}
|
||||
|
||||
walkArrayNode(node: math.ArrayNode): math.SymbolNode[] {
|
||||
return node.items
|
||||
.map(x => this.walk(x))
|
||||
.reduce((carry, current) => current.concat(carry), [])
|
||||
}
|
||||
|
||||
walkAssignmentNode(node: math.AssignmentNode): math.SymbolNode[] {
|
||||
return [
|
||||
...this.walk(node.object),
|
||||
...this.walk(node.value),
|
||||
...(node.index ? this.walk(node.index) : []),
|
||||
]
|
||||
}
|
||||
|
||||
walkBlockNode(node: math.BlockNode): math.SymbolNode[] {
|
||||
return node.blocks
|
||||
.map(x => x.node)
|
||||
.map(x => this.walk(x))
|
||||
.reduce((carry, current) => current.concat(carry), [])
|
||||
}
|
||||
|
||||
walkConditionalNode(node: math.ConditionalNode): math.SymbolNode[] {
|
||||
return [
|
||||
...this.walk(node.condition),
|
||||
...this.walk(node.trueExpr),
|
||||
...this.walk(node.falseExpr),
|
||||
]
|
||||
}
|
||||
|
||||
walkConstantNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkFunctionAssignmentNode(node: math.FunctionAssignmentNode): math.SymbolNode[] {
|
||||
return this.walk(node.expr)
|
||||
}
|
||||
|
||||
walkFunctionNode(node: math.FunctionNode): math.SymbolNode[] {
|
||||
return [
|
||||
...this.walk(node.fn),
|
||||
...node.args
|
||||
.map(x => this.walk(x))
|
||||
.reduce((carry, current) => current.concat(carry), []),
|
||||
]
|
||||
}
|
||||
|
||||
walkIndexNode(node: math.IndexNode): math.SymbolNode[] {
|
||||
return node.dimensions
|
||||
.map(x => this.walk(x))
|
||||
.reduce((carry, current) => current.concat(carry), [])
|
||||
}
|
||||
|
||||
walkObjectNode(node: math.ObjectNode): math.SymbolNode[] {
|
||||
return Object.values(node.properties)
|
||||
.map(x => this.walk(x))
|
||||
.reduce((carry, current) => current.concat(carry), [])
|
||||
}
|
||||
|
||||
walkOperatorNode(node: math.OperatorNode): math.SymbolNode[] {
|
||||
return node.args
|
||||
.map(x => this.walk(x))
|
||||
.reduce((carry, current) => carry.concat(current), [])
|
||||
}
|
||||
|
||||
walkParenthesisNode(node: math.ParenthesisNode): math.SymbolNode[] {
|
||||
return this.walk(node.content)
|
||||
}
|
||||
|
||||
walkRangeNode(node: math.RangeNode): math.SymbolNode[] {
|
||||
return [
|
||||
...this.walk(node.start),
|
||||
...this.walk(node.end),
|
||||
...(node.step ? this.walk(node.step) : []),
|
||||
]
|
||||
}
|
||||
|
||||
walkRelationalNode(node: math.RelationalNode): math.SymbolNode[] {
|
||||
return node.params
|
||||
.map(x => this.walk(x))
|
||||
.reduce((carry, current) => carry.concat(current), [])
|
||||
}
|
||||
|
||||
walkSymbolNode(node: math.SymbolNode): math.SymbolNode[] {
|
||||
return [node]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** A walk that accumulates all SymbolNode instances used on the RHS of expressions. */
|
||||
export class RValSymbolWalk extends SymbolWalk {
|
||||
walkAssignmentNode(node: math.AssignmentNode): math.SymbolNode[] {
|
||||
return this.walk(node.value)
|
||||
}
|
||||
|
||||
walkFunctionNode(node: math.FunctionNode): math.SymbolNode[] {
|
||||
return [
|
||||
...this.walk(node.fn), // FIXME should this be removed? Not sure if this is rval or lval
|
||||
...node.args
|
||||
.map(x => this.walk(x))
|
||||
.reduce((carry, current) => current.concat(carry), []),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** A walk that accumulates SymbolNode instances used on the LHS of assignments. */
|
||||
export class LValSymbolWalk extends SymbolWalk {
|
||||
walkAccessorNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkArrayNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkAssignmentNode(node: math.AssignmentNode): math.SymbolNode[] {
|
||||
if ( math.isSymbolNode(node.object) ) {
|
||||
return super.walkSymbolNode(node.object)
|
||||
}
|
||||
|
||||
return super.walkAccessorNode(node.object)
|
||||
}
|
||||
|
||||
walkBlockNode(node: math.BlockNode): math.SymbolNode[] {
|
||||
return node.blocks
|
||||
.map(x => this.walk(x.node))
|
||||
.reduce((carry, current) => current.concat(carry), [])
|
||||
}
|
||||
|
||||
walkConditionalNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkConstantNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkFunctionAssignmentNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkFunctionNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkIndexNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkObjectNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkOperatorNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkParenthesisNode(node: math.ParenthesisNode): math.SymbolNode[] {
|
||||
return this.walk(node.content)
|
||||
}
|
||||
|
||||
walkRangeNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkRelationalNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
|
||||
walkSymbolNode(): math.SymbolNode[] {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** A single mathematical statement. */
|
||||
export class MathStatement {
|
||||
static temp(raw: string): MathStatement {
|
||||
return new MathStatement(uuidv4() as StatementID, raw)
|
||||
}
|
||||
|
||||
constructor(
|
||||
/** Unique ID of this statement. */
|
||||
public readonly id: StatementID,
|
||||
|
||||
/** The raw statement input by the user. */
|
||||
public readonly raw: string,
|
||||
) {}
|
||||
|
||||
/** Parse the raw statement to an AST. */
|
||||
parse(): math.MathNode {
|
||||
return math.parse(this.raw)
|
||||
}
|
||||
|
||||
/** Convert the statement to its equivalent LaTeX code. */
|
||||
toLaTeX(): LaTeXString {
|
||||
return this.parse().toTex() as LaTeXString
|
||||
}
|
||||
|
||||
/** Render the statement as HTML string. */
|
||||
toHTMLString(): HTMLString {
|
||||
return katex.renderToString(this.toLaTeX(), {
|
||||
output: 'html',
|
||||
}) as HTMLString
|
||||
}
|
||||
|
||||
/** Render the statement to a DOM element. */
|
||||
toDOM(node?: HTMLElement): HTMLSpanElement {
|
||||
if ( !node ) {
|
||||
node = document.createElement('span')
|
||||
}
|
||||
|
||||
katex.render(this.toLaTeX(), node, {
|
||||
output: 'html',
|
||||
})
|
||||
return node
|
||||
}
|
||||
|
||||
/** Get all symbols referenced in this statement. */
|
||||
symbols(): math.SymbolNode[] {
|
||||
return (new SymbolWalk()).walk(this.parse())
|
||||
}
|
||||
|
||||
/** Get all symbols defined on the LHS of this statement. */
|
||||
defines(): math.SymbolNode[] {
|
||||
return (new LValSymbolWalk()).walk(this.parse())
|
||||
}
|
||||
|
||||
/** Get all symbols used on the RHS of this statement. */
|
||||
uses(): math.SymbolNode[] {
|
||||
return (new RValSymbolWalk()).walk(this.parse())
|
||||
}
|
||||
}
|
@ -1,10 +1,23 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vuetify from '@vuetify/vite-plugin'
|
||||
import { quasar, transformAssetUrls } from '@quasar/vite-plugin'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue(),
|
||||
vuetify({ autoImport: true }), // Enabled by default
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8000/',
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
template: { transformAssetUrls },
|
||||
}),
|
||||
|
||||
quasar({
|
||||
sassVariables: 'src/quasar-variables.sass',
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
Loading…
Reference in new issue