@khanacademy/kas 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/index.js CHANGED
@@ -3,7 +3,7 @@ import _ from 'underscore';
3
3
 
4
4
  // This file is processed by a Rollup plugin (replace) to inject the production
5
5
  const libName = "@khanacademy/kas";
6
- const libVersion = "0.3.7";
6
+ const libVersion = "0.3.8";
7
7
  addLibraryVersionToPerseusDebug(libName, libVersion);
8
8
 
9
9
  // this is a @generated file
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
11
11
 
12
12
  // This file is processed by a Rollup plugin (replace) to inject the production
13
13
  const libName = "@khanacademy/kas";
14
- const libVersion = "0.3.7";
14
+ const libVersion = "0.3.8";
15
15
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
16
16
 
17
17
  // this is a @generated file
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A lightweight JavaScript CAS for comparing expressions and equations.",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "0.3.7",
6
+ "version": "0.3.8",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -18,12 +18,15 @@
18
18
  "module": "dist/es/index.js",
19
19
  "main": "dist/index.js",
20
20
  "source": "src/index.js",
21
+ "files": [
22
+ "dist"
23
+ ],
21
24
  "scripts": {
22
25
  "gen:parsers": "node src/parser-generator.js",
23
26
  "test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
24
27
  },
25
28
  "dependencies": {
26
- "@khanacademy/perseus-core": "1.4.1"
29
+ "@khanacademy/perseus-core": "1.4.2"
27
30
  },
28
31
  "devDependencies": {
29
32
  "jison": "0.4.15",
package/.eslintrc.js DELETED
@@ -1,12 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-var-requires */
2
- /* eslint-disable import/no-commonjs */
3
- const path = require("path");
4
-
5
- module.exports = {
6
- rules: {
7
- "import/no-extraneous-dependencies": [
8
- "error",
9
- {packageDir: [__dirname, path.join(__dirname, "../../")]},
10
- ],
11
- },
12
- };
package/CHANGELOG.md DELETED
@@ -1,88 +0,0 @@
1
- # @khanacademy/kas
2
-
3
- ## 0.3.7
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [[`1f4e17ba`](https://github.com/Khan/perseus/commit/1f4e17ba77e1491523813655af18a70285a25989), [`8857950b`](https://github.com/Khan/perseus/commit/8857950bdeeb6e13bc3766b1c6545289b21cbe2a)]:
8
- - @khanacademy/perseus-core@1.4.1
9
-
10
- ## 0.3.6
11
-
12
- ### Patch Changes
13
-
14
- - [#814](https://github.com/Khan/perseus/pull/814) [`105d2060`](https://github.com/Khan/perseus/commit/105d20603d935d35cff237b17f0bfb57ca751e4c) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Minor build change to how we provide Typescript type definitions (should be no change to build output).
15
-
16
- - Updated dependencies [[`a91c84fe`](https://github.com/Khan/perseus/commit/a91c84fe53827ff4333220777a9918882b7fe9f0), [`105d2060`](https://github.com/Khan/perseus/commit/105d20603d935d35cff237b17f0bfb57ca751e4c)]:
17
- - @khanacademy/perseus-core@1.4.0
18
-
19
- ## 0.3.5
20
-
21
- ### Patch Changes
22
-
23
- - Updated dependencies [[`79403e06`](https://github.com/Khan/perseus/commit/79403e06eedb597d7818d6c858bbba6f51ff3fe1)]:
24
- - @khanacademy/perseus-core@1.3.0
25
-
26
- ## 0.3.4
27
-
28
- ### Patch Changes
29
-
30
- - Updated dependencies [[`376eb0e4`](https://github.com/Khan/perseus/commit/376eb0e4aaaa4c7a90fd6107a84bb74d382b077c)]:
31
- - @khanacademy/perseus-core@1.2.0
32
-
33
- ## 0.3.3
34
-
35
- ### Patch Changes
36
-
37
- - Updated dependencies [22a9c408]
38
- - @khanacademy/perseus-core@1.1.2
39
-
40
- ## 0.3.2
41
-
42
- ### Patch Changes
43
-
44
- - 55d4cd00: Print package name and version when loaded in the page
45
- - Updated dependencies [55d4cd00]
46
- - @khanacademy/perseus-core@1.1.1
47
-
48
- ## 0.3.1
49
-
50
- ### Patch Changes
51
-
52
- - 1f062e98: Bump all package versions since the build settings have been updated
53
-
54
- ## 0.3.0
55
-
56
- ### Minor Changes
57
-
58
- - 53fd3768: Migrate source code to TypeScript
59
-
60
- ## 0.2.7
61
-
62
- ### Patch Changes
63
-
64
- - f567f660: Update the eslint config to look at both the package.json for the package and the one from the root
65
-
66
- ## 0.2.6
67
-
68
- ### Patch Changes
69
-
70
- - bf180fe1: Fix our use of import/no-extraneous-dependencies
71
-
72
- ## 0.2.5
73
-
74
- ### Patch Changes
75
-
76
- - 98d283ff: Fix storybook
77
-
78
- ## 0.2.4
79
-
80
- ### Patch Changes
81
-
82
- - a15b0e86: Add 'perseus-build-settings' as a dev dep to packages that were missing it
83
-
84
- ## 0.2.3
85
-
86
- ### Patch Changes
87
-
88
- - 570c5800: Move KAS into khan/perseus repo
package/experimenter.html DELETED
@@ -1,100 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>KAS Experimenter</title>
5
- <!-- Include Underscore -->
6
- <script src="node_modules/underscore/underscore.js"></script>
7
- <!-- Include KAS -->
8
- <script src="src/parser.js"></script>
9
- <script src="src/nodes.js"></script>
10
- <script src="src/compare.js"></script>
11
- <style>
12
- * {
13
- font-family: "Courier New";
14
- }
15
- body {
16
- font-size: 28px;
17
- }
18
- #input {
19
- width: 100%;
20
- font-size: 72px;
21
- }
22
- .label {
23
- display: inline-block;
24
- margin-right: 30px;
25
- width: 400px;
26
- vertical-align: top;
27
- }
28
- .value {
29
- display: inline-block;
30
- }
31
- .code {
32
- font-size: 12px;
33
- }
34
- </style>
35
- </head>
36
- <body>
37
- <input type="text" id="input" />
38
- <div id="output"></div>
39
- <script>
40
- window.onload = function () {
41
- var input = document.getElementById("input");
42
- var out = document.getElementById("output");
43
-
44
- if ("oninput" in input) {
45
- input.addEventListener("input", reprocess, false);
46
- } else {
47
- input.attachEvent("onkeyup", reprocess);
48
- }
49
-
50
- function addInfo(el, label, value) {
51
- el.innerHTML +=
52
- "<div>" +
53
- "<div class='label'>" +
54
- label +
55
- "</div>" +
56
- "<div class='value'>" +
57
- value +
58
- "</div>" +
59
- "</div>";
60
- }
61
-
62
- function reprocess() {
63
- out.innerHTML = "";
64
- var parsed = KAS.parse(input.value, {}).expr;
65
- if (input.value === "") {
66
- return;
67
- }
68
- if (parsed === undefined) {
69
- return;
70
- }
71
- addInfo(out, "AST Representation:", parsed.repr());
72
- addInfo(
73
- out,
74
- "Printed Representation:",
75
- parsed.normalize().print(),
76
- );
77
- addInfo(out, "TeX Representation:", parsed.tex());
78
- addInfo(
79
- out,
80
- "Simplified?",
81
- parsed.isSimplified() ? "Yes" : "No",
82
- );
83
- addInfo(
84
- out,
85
- "Simplified",
86
- parsed.simplify().normalize().print(),
87
- );
88
- addInfo(
89
- out,
90
- "JSON Representation:",
91
- "<pre class='code'>" +
92
- JSON.stringify(parsed, null, 2) +
93
- "</pre>",
94
- );
95
- addInfo(out, "Compiled", parsed.compile().toString());
96
- }
97
- };
98
- </script>
99
- </body>
100
- </html>