├── .editorconfig ├── .envrc ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── TODO.norg ├── docs ├── README.md ├── api │ ├── functions.md │ ├── hooks.md │ └── properties.md ├── best-practices.md ├── how-it-works.md ├── recipies.md └── security.md ├── esbuild.js ├── examples ├── calculator │ ├── index.html │ └── style.css ├── clock │ ├── index.html │ └── style.css ├── form │ ├── index.html │ ├── signup.css │ └── style.css └── todo-list │ ├── index.html │ └── style.css ├── jest.config.js ├── media ├── banner.png └── banner.svg ├── package.json ├── shell.nix ├── src ├── declarations.ts ├── eval.ts ├── index.ts ├── parser.ts ├── renderer.ts └── utils │ ├── adt.ts │ ├── parser-comb.ts │ └── result.ts ├── tests ├── calc.spec.ts ├── eval.spec.ts ├── fixtures │ ├── signup │ │ └── index.html │ └── todo-app │ │ └── index.html ├── parser.spec.ts ├── signup.spec.ts ├── todo-app.spec.ts └── util.ts ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | use_nix 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | es2021: true, 5 | jest: true, 6 | }, 7 | extends: [ 8 | 'eslint:recommended', 9 | 'plugin:@typescript-eslint/recommended', 10 | 'prettier', 11 | ], 12 | overrides: [ 13 | { 14 | env: { 15 | node: true, 16 | }, 17 | files: ['.eslintrc.{js,cjs}'], 18 | parserOptions: { 19 | sourceType: 'script', 20 | }, 21 | }, 22 | ], 23 | parser: '@typescript-eslint/parser', 24 | parserOptions: { 25 | ecmaVersion: 'latest', 26 | sourceType: 'module', 27 | }, 28 | plugins: ['@typescript-eslint', 'prettier'], 29 | rules: { 30 | 'prettier/prettier': 'error', 31 | '@typescript-eslint/no-explicit-any': 'off', 32 | '@typescript-eslint/no-unused-vars': [ 33 | 'warn', // or "error" 34 | { 35 | argsIgnorePattern: '^_', 36 | varsIgnorePattern: '^_', 37 | caughtErrorsIgnorePattern: '^_', 38 | }, 39 | ], 40 | }, 41 | } 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | *.log 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | semi: false 2 | singleQuote: true 3 | bracketSpacing: true 4 | arrowParens: avoid 5 | printWidth: 80 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Akshay Nair 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |