Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <formula-editor /> component #4

Open
wants to merge 48 commits into
base: formula-editor
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b0f58f1
avatar and styles component
Isha-Sharma May 16, 2023
ee9ae52
v0.0.0-alpha.1
Isha-Sharma May 16, 2023
1d141f1
add public publishConfig
Isha-Sharma May 16, 2023
56b5960
v0.0.0-alpha.1
Isha-Sharma May 16, 2023
841f95a
skeleton of fe works, introduced ts, enhanced tsconfig.json, added es…
literalEval May 25, 2023
87f4e8e
add a recommendation-engine
literalEval May 26, 2023
5489128
parsing and brace addition works
literalEval May 30, 2023
1761cf2
minor refactor
literalEval May 31, 2023
1ebd754
refactor and srp
literalEval May 31, 2023
f768c37
more brackets lmao
literalEval May 31, 2023
59d9813
did stuff
literalEval May 31, 2023
a659314
amogus
literalEval May 31, 2023
a5a0a5b
style a bit
literalEval Jun 1, 2023
6982933
(somewhat) enhace parentheses addition
literalEval Jun 1, 2023
11f6a80
fix suggestions for non-end words
literalEval Jun 1, 2023
cb1b4df
add nice messages
literalEval Jun 1, 2023
c37ceee
idk
literalEval Jun 1, 2023
915a497
amogus
literalEval Jun 8, 2023
a1b4798
set minSuggestionLength as a property
literalEval Jun 8, 2023
20ad7ac
add error msg for division by zero
literalEval Jun 9, 2023
f1b1215
add input parsing again
literalEval Jun 9, 2023
80b7422
add parentheses count detection
literalEval Jun 12, 2023
ed5d118
add some styling and fix suggestion-menu position
literalEval Jun 12, 2023
8ef1150
fix the space bug and add scroll
literalEval Jun 13, 2023
58cfc5e
fix recommendations a bit
literalEval Jun 13, 2023
a7aafe8
make strict number parsing
literalEval Jun 13, 2023
bcb0413
minor refactor
literalEval Jun 13, 2023
db1e165
switch to object passing for property
literalEval Jun 13, 2023
3ed7722
make styling customizable
literalEval Jun 13, 2023
5292244
add empty parentheses detection
literalEval Jun 14, 2023
93bba1b
expose some more styles as variables
literalEval Jun 14, 2023
3cb6252
use a different caret approach
literalEval Jun 14, 2023
7fde346
fix double input bug :)
literalEval Jun 14, 2023
abd9f2e
fixed the double insertion issue (I guess)
literalEval Jun 14, 2023
0190eae
fix the unary `-` and `+` bug
literalEval Jun 15, 2023
131e233
add ^ as a valid operator
literalEval Jun 15, 2023
bbecd89
rename variables according to suggestions
literalEval Jun 15, 2023
b330e96
care
literalEval Jun 15, 2023
7574a63
minor refactoring
literalEval Jun 15, 2023
8a8fb17
support for adding recommendation on tab when there's a single recomm…
literalEval Jun 15, 2023
7cb072c
misc
literalEval Jun 15, 2023
56a730e
remove redundant div
literalEval Jun 15, 2023
aecae7d
misc changes
literalEval Jun 16, 2023
c58ef2a
misc changes
literalEval Jun 16, 2023
990f40e
add ^ in split
literalEval Jun 16, 2023
c4bcc98
added documentation
literalEval Jun 18, 2023
9023255
misc
literalEval Jun 21, 2023
b130092
did random stuff
literalEval Jul 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
threshold: medium
scopeconfig:
- scope: node
version: "1.0"
51 changes: 51 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Code&display=swap" rel="stylesheet">

</head>

<body>
<script type="module" src="./dist/packages/formula-editor/src/formula-builder.js"></script>
<script type="module" src="./dist/packages/formula-editor/src/formula-editor.js"></script>
<script type="module" src="./dist/packages/formula-editor/src/formula-creator.js"></script>
<script type="module" src="./dist/packages/formula-editor/src/sub-components/operator-input.js"></script>
<style>
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
font-family: 'Fira Code', sans-serif;

--fe-text-color: #080E00;
--fe-background-color: #FFFFFF;
--fe-caret-color: #000;
--fe-no-err-color: #098668;
--fe-err-border-radius: 0px;
--fe-err-border-width: 0px;
--fe-text-color: #0070C1;
--fe-suggestion-color: #030303;
--fe-suggestion-background-color: #F3F3F3;
--fe-suggestion-focus-color: #FFFFFF;
--fe-suggestion-focus-background-color: #0060C0;
}
</style>
<formula-builder style="height: 600px; width: 400px"
formula='{"name":"sus","formulaString":"10 / mayank","precision":-1}'></formula-builder>

<script>
document.addEventListener('fw-formula-changed', (e) => console.log(e))
</script>
</body>

</html>
7 changes: 7 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"packages": [
"packages/*"
],
"useWorkspaces": true,
"version": "0.0.0-alpha.1"
}
Loading