desmost 0.7.3 → 0.8.1
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/compiler/compile.d.ts +25 -1
- package/dist/compiler/compile.d.ts.map +1 -1
- package/dist/compiler/compile.js +32 -2
- package/dist/compiler/compile.js.map +1 -1
- package/dist/compiler/evaluate.d.ts +11 -0
- package/dist/compiler/evaluate.d.ts.map +1 -1
- package/dist/compiler/evaluate.js +15 -11
- package/dist/compiler/evaluate.js.map +1 -1
- package/dist/compiler/format.d.ts +13 -0
- package/dist/compiler/format.d.ts.map +1 -1
- package/dist/compiler/format.js +23 -0
- package/dist/compiler/format.js.map +1 -1
- package/dist/compiler/index.d.ts.map +1 -1
- package/dist/compiler/index.js.map +1 -1
- package/dist/compiler/options.d.ts +79 -0
- package/dist/compiler/options.d.ts.map +1 -1
- package/dist/compiler/options.js +18 -11
- package/dist/compiler/options.js.map +1 -1
- package/dist/decompiler/decompile.d.ts +20 -0
- package/dist/decompiler/decompile.d.ts.map +1 -0
- package/dist/decompiler/decompile.js +32 -0
- package/dist/decompiler/decompile.js.map +1 -0
- package/dist/decompiler/emit.d.ts +10 -0
- package/dist/decompiler/emit.d.ts.map +1 -0
- package/dist/decompiler/emit.js +37 -0
- package/dist/decompiler/emit.js.map +1 -0
- package/dist/decompiler/extract.d.ts +14 -0
- package/dist/decompiler/extract.d.ts.map +1 -0
- package/dist/decompiler/extract.js +63 -0
- package/dist/decompiler/extract.js.map +1 -0
- package/dist/decompiler/format.d.ts +3 -0
- package/dist/decompiler/format.d.ts.map +1 -0
- package/dist/decompiler/format.js +14 -0
- package/dist/decompiler/format.js.map +1 -0
- package/dist/decompiler/index.d.ts +2 -0
- package/dist/decompiler/index.d.ts.map +1 -0
- package/dist/decompiler/index.js +2 -0
- package/dist/decompiler/index.js.map +1 -0
- package/dist/desmos.d.ts +3 -0
- package/dist/desmos.d.ts.map +1 -1
- package/dist/desmos.js +3 -0
- package/dist/desmos.js.map +1 -1
- package/dist/errors.d.ts +18 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +13 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.internal.d.ts +2 -1
- package/dist/index.internal.d.ts.map +1 -1
- package/dist/index.internal.js +2 -1
- package/dist/index.internal.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/magic/expr/index.js.map +1 -1
- package/dist/magic/expr/latex.d.ts.map +1 -1
- package/dist/magic/expr/latex.js +1 -0
- package/dist/magic/expr/latex.js.map +1 -1
- package/dist/magic/expr/text.d.ts.map +1 -1
- package/dist/magic/expr/text.js +1 -0
- package/dist/magic/expr/text.js.map +1 -1
- package/dist/magic/global/dark-mode.d.ts.map +1 -1
- package/dist/magic/global/dark-mode.js.map +1 -1
- package/dist/magic/global/desmos.d.ts +3 -1
- package/dist/magic/global/desmos.d.ts.map +1 -1
- package/dist/magic/global/desmos.js.map +1 -1
- package/dist/magic/global/index.d.ts +3 -0
- package/dist/magic/global/index.d.ts.map +1 -1
- package/dist/magic/global/index.js +3 -0
- package/dist/magic/global/index.js.map +1 -1
- package/dist/magic/global/viewport.d.ts.map +1 -1
- package/dist/magic/global/viewport.js +0 -1
- package/dist/magic/global/viewport.js.map +1 -1
- package/dist/magic/incantation.d.ts +44 -0
- package/dist/magic/incantation.d.ts.map +1 -1
- package/dist/magic/incantation.js +38 -0
- package/dist/magic/incantation.js.map +1 -1
- package/dist/magic/index.d.ts +7 -0
- package/dist/magic/index.d.ts.map +1 -1
- package/dist/magic/index.js +7 -0
- package/dist/magic/index.js.map +1 -1
- package/dist/magic/local/anim.d.ts.map +1 -1
- package/dist/magic/local/anim.js +1 -0
- package/dist/magic/local/anim.js.map +1 -1
- package/dist/magic/local/colour.d.ts.map +1 -1
- package/dist/magic/local/colour.js.map +1 -1
- package/dist/magic/local/dashed.d.ts.map +1 -1
- package/dist/magic/local/dashed.js.map +1 -1
- package/dist/magic/local/fill.d.ts.map +1 -1
- package/dist/magic/local/fill.js.map +1 -1
- package/dist/magic/local/hide.d.ts.map +1 -1
- package/dist/magic/local/hide.js.map +1 -1
- package/dist/magic/local/index.js.map +1 -1
- package/dist/magic/local/label.d.ts.map +1 -1
- package/dist/magic/local/label.js +1 -0
- package/dist/magic/local/label.js.map +1 -1
- package/dist/magic/local/line.d.ts.map +1 -1
- package/dist/magic/local/line.js.map +1 -1
- package/dist/magic/local/no-line.d.ts.map +1 -1
- package/dist/magic/local/no-line.js.map +1 -1
- package/dist/magic/local/point.d.ts.map +1 -1
- package/dist/magic/local/point.js.map +1 -1
- package/dist/magic/local/secret.d.ts.map +1 -1
- package/dist/magic/local/secret.js.map +1 -1
- package/dist/magic/local/slider.d.ts.map +1 -1
- package/dist/magic/local/slider.js +1 -0
- package/dist/magic/local/slider.js.map +1 -1
- package/dist/parser/ast.d.ts +9 -0
- package/dist/parser/ast.d.ts.map +1 -1
- package/dist/parser/ast.js +1 -0
- package/dist/parser/ast.js.map +1 -1
- package/dist/parser/desmost-parser.d.ts +101 -1
- package/dist/parser/desmost-parser.d.ts.map +1 -1
- package/dist/parser/desmost-parser.js +129 -2
- package/dist/parser/desmost-parser.js.map +1 -1
- package/dist/parser/generic-parser.d.ts +47 -0
- package/dist/parser/generic-parser.d.ts.map +1 -1
- package/dist/parser/generic-parser.js +50 -0
- package/dist/parser/generic-parser.js.map +1 -1
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +5 -2
- package/src/compiler/compile.ts +124 -124
- package/src/compiler/evaluate.ts +86 -118
- package/src/compiler/format.ts +39 -6
- package/src/compiler/index.ts +0 -7
- package/src/compiler/options.ts +83 -77
- package/src/compiler/readme.md +5 -0
- package/src/decompiler/decompile.ts +48 -0
- package/src/decompiler/emit.ts +47 -0
- package/src/decompiler/extract.ts +100 -0
- package/src/decompiler/format.ts +20 -0
- package/src/decompiler/index.ts +1 -0
- package/src/decompiler/readme.md +34 -0
- package/src/desmos.ts +6 -6
- package/src/errors.ts +19 -19
- package/src/index.internal.ts +3 -1
- package/src/index.ts +1 -0
- package/src/magic/expr/index.ts +2 -2
- package/src/magic/expr/latex.ts +16 -16
- package/src/magic/expr/text.ts +13 -13
- package/src/magic/global/dark-mode.ts +10 -10
- package/src/magic/global/desmos.ts +18 -15
- package/src/magic/global/index.ts +8 -3
- package/src/magic/global/viewport.ts +19 -20
- package/src/magic/incantation.ts +94 -94
- package/src/magic/local/anim.ts +10 -10
- package/src/magic/local/colour.ts +26 -26
- package/src/magic/local/dashed.ts +9 -9
- package/src/magic/local/fill.ts +12 -12
- package/src/magic/local/hide.ts +9 -9
- package/src/magic/local/index.ts +11 -11
- package/src/magic/local/label.ts +51 -51
- package/src/magic/local/line.ts +16 -16
- package/src/magic/local/no-line.ts +9 -9
- package/src/magic/local/point.ts +16 -16
- package/src/magic/local/secret.ts +9 -9
- package/src/magic/local/slider.ts +15 -15
- package/src/magic/readme.md +5 -0
- package/src/parser/ast.ts +46 -46
- package/src/parser/desmost-parser.ts +550 -550
- package/src/parser/generic-parser.ts +176 -176
- package/src/parser/index.ts +0 -4
- package/src/parser/readme.md +21 -0
- package/src/utils.ts +33 -33
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { stringify_json5, prettify_source } from "./format.js";
|
|
2
|
+
import { Ast } from "../parser/index.js";
|
|
3
|
+
import { DesmosIncantation, ViewportIncantation } from "../magic/global/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Extract a `/desmos` incantation from the settings of `desmos`.
|
|
6
|
+
*/
|
|
7
|
+
export function extract_settings(desmos, blank) {
|
|
8
|
+
let defaults = blank.settings;
|
|
9
|
+
let arg_raw = stringify_json5(desmos.settings, (k, v) => (v === defaults[k]
|
|
10
|
+
|| k === "__observers"
|
|
11
|
+
|| k === "guid"
|
|
12
|
+
|| k === "randomSeed"
|
|
13
|
+
|| k === "colors") ? undefined : v, " ");
|
|
14
|
+
if (arg_raw.trim() === "")
|
|
15
|
+
return null;
|
|
16
|
+
return {
|
|
17
|
+
kind: Ast.Kind.INCANTATION_INVOCATION,
|
|
18
|
+
incantation: new DesmosIncantation(),
|
|
19
|
+
arg_raw,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Extract a `/viewport` incantation from the viewport bounds of `desmos`.
|
|
24
|
+
*/
|
|
25
|
+
export function extract_viewport(desmos, blank) {
|
|
26
|
+
let defaults = blank.graphpaperBounds.mathCoordinates;
|
|
27
|
+
let { left, right, bottom, top } = desmos.graphpaperBounds.mathCoordinates;
|
|
28
|
+
let arg_raw = stringify_json5({ left, right, bottom, top }, (k, v) => v === defaults[k] ? undefined : v, " ");
|
|
29
|
+
if (arg_raw.trim() === "")
|
|
30
|
+
return null;
|
|
31
|
+
return {
|
|
32
|
+
kind: Ast.Kind.INCANTATION_INVOCATION,
|
|
33
|
+
incantation: new ViewportIncantation(),
|
|
34
|
+
arg_raw,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Extract an expression and the local incantations that reproduce its state.
|
|
39
|
+
*/
|
|
40
|
+
export function extract_expression(expression) {
|
|
41
|
+
let data;
|
|
42
|
+
// @ts-expect-error: outdated types
|
|
43
|
+
if (expression.latex?.trim() === "") {
|
|
44
|
+
data = { latex: ` ` };
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
data = Object.fromEntries(Object.entries(expression)
|
|
48
|
+
.filter(([key, value]) => !is_insignificant(key, value)));
|
|
49
|
+
}
|
|
50
|
+
if ("latex" in data) {
|
|
51
|
+
data.latex = prettify_source(data.latex);
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
kind: Ast.Kind.EXPRESSION,
|
|
55
|
+
data,
|
|
56
|
+
incantations: [], // TODO
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function is_insignificant(key, value) {
|
|
60
|
+
return (value === ""
|
|
61
|
+
|| typeof value === "object" && Object.values(value).every(v => v === ""));
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=extract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/decompiler/extract.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/decompiler/format.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAE,CAAC,OAAO,IAAI,CAAC,SAAS,CAWnD,CAAA;AAGD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKtD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const stringify_json5 = (data, replacer, space) => {
|
|
2
|
+
return (
|
|
3
|
+
/// @ts-expect-error: random `null`??
|
|
4
|
+
JSON.stringify(data, replacer, space)
|
|
5
|
+
.slice(1, -1) // strip surrounding {}
|
|
6
|
+
.trim()
|
|
7
|
+
.replaceAll(/"([^"]+)":/g, "$1:") // "key": <value> -> key: <value>
|
|
8
|
+
);
|
|
9
|
+
};
|
|
10
|
+
export function prettify_source(source) {
|
|
11
|
+
source = source.replaceAll(/(?<=[^ ])=(?=[^ ])/g, " = ");
|
|
12
|
+
return source;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/decompiler/format.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAA4B,CACrD,IAAI,EAAE,QAAQ,EAAE,KAAK,EACtB,EAAE;IAED,OAAO;IACJ,qCAAqC;IACrC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC;SACpC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,uBAAuB;SACrC,IAAI,EAAE;SACN,UAAU,CAAC,aAAa,EAAE,KAAK,CAAC,CAAE,iCAAiC;KACtE,CAAC;AACL,CAAC,CAAA;AAGD,MAAM,UAAU,eAAe,CAAC,MAAc;IAE3C,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;IAEzD,OAAO,MAAM,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decompiler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decompiler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/desmos.d.ts
CHANGED
package/dist/desmos.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desmos.d.ts","sourceRoot":"","sources":["../src/desmos.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"desmos.d.ts","sourceRoot":"","sources":["../src/desmos.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oBAAY,YAAY;IAEvB,GAAG,YAAe;IAClB,IAAI,YAAc;IAClB,KAAK,YAAa;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,KAAK,YAAa;CAClB"}
|
package/dist/desmos.js
CHANGED
package/dist/desmos.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desmos.js","sourceRoot":"","sources":["../src/desmos.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"desmos.js","sourceRoot":"","sources":["../src/desmos.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IAEvB,+BAAkB,CAAA;IAClB,gCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,kCAAkB,CAAA;IAClB,kCAAkB,CAAA;IAClB,iCAAkB,CAAA;AACnB,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
+
/** The parser failed to parse something (usually during speculative parsing), which only results in internal backtracking. */
|
|
2
|
+
export declare const NO_MATCH: unique symbol;
|
|
3
|
+
/** The compiler encountered a non-fatal recoverable failure (usually during speculative parsing), which only results in internal backtracking. */
|
|
4
|
+
export type NoMatch = typeof NO_MATCH & {
|
|
5
|
+
readonly __brand?: unique symbol;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The compiler encountered a fatal unrecoverable error, which will reach the end user.
|
|
9
|
+
*
|
|
10
|
+
* It's not *literally* unrecoverable in the sense that it will crash the compiler completely, but it means there are no further fallbacks to try.
|
|
11
|
+
*/
|
|
1
12
|
export declare class UnrecoverableError extends Error {
|
|
2
13
|
}
|
|
3
14
|
export declare namespace UnrecoverableError {
|
|
15
|
+
/** The parser unexpectedly reached the end of its entire input source code. */
|
|
4
16
|
class UnexpectedEnd extends UnrecoverableError {
|
|
5
17
|
}
|
|
18
|
+
/** The parser did not receive input that it expected. */
|
|
6
19
|
class MissingInput extends UnrecoverableError {
|
|
7
20
|
}
|
|
21
|
+
/** The parser received input that did not match what it expected. */
|
|
8
22
|
class UnexpectedInput extends UnrecoverableError {
|
|
9
23
|
}
|
|
24
|
+
/** The parser received excess input that it did not expect. */
|
|
10
25
|
class ExcessInput extends UnrecoverableError {
|
|
11
26
|
}
|
|
27
|
+
/** An incantation can't be applied here. */
|
|
12
28
|
class IllegalIncantation extends UnrecoverableError {
|
|
13
29
|
}
|
|
30
|
+
/** An incantation's argument couldn't be parsed. */
|
|
14
31
|
class InvalidArgument extends UnrecoverableError {
|
|
15
32
|
}
|
|
16
33
|
}
|
|
17
|
-
|
|
18
|
-
export type NoMatch = typeof NO_MATCH & {
|
|
19
|
-
readonly __brand?: unique symbol;
|
|
20
|
-
};
|
|
34
|
+
/** Indicates that a function may throw an `UnrecoverableError`. */
|
|
21
35
|
export type Unrecoverable<Result> = Result | Result & {
|
|
22
36
|
readonly __brand?: unique symbol;
|
|
23
37
|
};
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,8HAA8H;AAC9H,eAAO,MAAM,QAAQ,eAAqB,CAAC;AAE3C,kJAAkJ;AAClJ,MAAM,MAAM,OAAO,GAAG,OAAO,QAAQ,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,MAAM,CAAA;CAAE,CAAC;AAG7E;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;CAAG;AAEhD,yBAAiB,kBAAkB,CACnC;IACC,+EAA+E;IAC/E,MAAa,aAAc,SAAQ,kBAAkB;KAAG;IAExD,yDAAyD;IACzD,MAAa,YAAa,SAAQ,kBAAkB;KAAG;IAEvD,qEAAqE;IACrE,MAAa,eAAgB,SAAQ,kBAAkB;KAAG;IAE1D,+DAA+D;IAC/D,MAAa,WAAY,SAAQ,kBAAkB;KAAG;IAGtD,4CAA4C;IAC5C,MAAa,kBAAmB,SAAQ,kBAAkB;KAAG;IAE7D,oDAAoD;IACpD,MAAa,eAAgB,SAAQ,kBAAkB;KAAG;CAC1D;AAGD,mEAAmE;AACnE,MAAM,MAAM,aAAa,CAAC,MAAM,IAAI,MAAM,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,MAAM,CAAA;CAAE,CAAC"}
|
package/dist/errors.js
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
|
+
/** The parser failed to parse something (usually during speculative parsing), which only results in internal backtracking. */
|
|
2
|
+
export const NO_MATCH = Symbol("no-match");
|
|
3
|
+
/**
|
|
4
|
+
* The compiler encountered a fatal unrecoverable error, which will reach the end user.
|
|
5
|
+
*
|
|
6
|
+
* It's not *literally* unrecoverable in the sense that it will crash the compiler completely, but it means there are no further fallbacks to try.
|
|
7
|
+
*/
|
|
1
8
|
export class UnrecoverableError extends Error {
|
|
2
9
|
}
|
|
3
10
|
(function (UnrecoverableError) {
|
|
11
|
+
/** The parser unexpectedly reached the end of its entire input source code. */
|
|
4
12
|
class UnexpectedEnd extends UnrecoverableError {
|
|
5
13
|
}
|
|
6
14
|
UnrecoverableError.UnexpectedEnd = UnexpectedEnd;
|
|
15
|
+
/** The parser did not receive input that it expected. */
|
|
7
16
|
class MissingInput extends UnrecoverableError {
|
|
8
17
|
}
|
|
9
18
|
UnrecoverableError.MissingInput = MissingInput;
|
|
19
|
+
/** The parser received input that did not match what it expected. */
|
|
10
20
|
class UnexpectedInput extends UnrecoverableError {
|
|
11
21
|
}
|
|
12
22
|
UnrecoverableError.UnexpectedInput = UnexpectedInput;
|
|
23
|
+
/** The parser received excess input that it did not expect. */
|
|
13
24
|
class ExcessInput extends UnrecoverableError {
|
|
14
25
|
}
|
|
15
26
|
UnrecoverableError.ExcessInput = ExcessInput;
|
|
27
|
+
/** An incantation can't be applied here. */
|
|
16
28
|
class IllegalIncantation extends UnrecoverableError {
|
|
17
29
|
}
|
|
18
30
|
UnrecoverableError.IllegalIncantation = IllegalIncantation;
|
|
31
|
+
/** An incantation's argument couldn't be parsed. */
|
|
19
32
|
class InvalidArgument extends UnrecoverableError {
|
|
20
33
|
}
|
|
21
34
|
UnrecoverableError.InvalidArgument = InvalidArgument;
|
|
22
35
|
})(UnrecoverableError || (UnrecoverableError = {}));
|
|
23
|
-
export const NO_MATCH = Symbol("no-match");
|
|
24
36
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,8HAA8H;AAC9H,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAM3C;;;;GAIG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;CAAG;AAEhD,WAAiB,kBAAkB;IAElC,+EAA+E;IAC/E,MAAa,aAAc,SAAQ,kBAAkB;KAAG;IAA3C,gCAAa,gBAA8B,CAAA;IAExD,yDAAyD;IACzD,MAAa,YAAa,SAAQ,kBAAkB;KAAG;IAA1C,+BAAY,eAA8B,CAAA;IAEvD,qEAAqE;IACrE,MAAa,eAAgB,SAAQ,kBAAkB;KAAG;IAA7C,kCAAe,kBAA8B,CAAA;IAE1D,+DAA+D;IAC/D,MAAa,WAAY,SAAQ,kBAAkB;KAAG;IAAzC,8BAAW,cAA8B,CAAA;IAGtD,4CAA4C;IAC5C,MAAa,kBAAmB,SAAQ,kBAAkB;KAAG;IAAhD,qCAAkB,qBAA8B,CAAA;IAE7D,oDAAoD;IACpD,MAAa,eAAgB,SAAQ,kBAAkB;KAAG;IAA7C,kCAAe,kBAA8B,CAAA;AAC3D,CAAC,EApBgB,kBAAkB,KAAlB,kBAAkB,QAoBlC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.internal.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { fill_defaults } from "./compiler/options.js";
|
|
1
|
+
export { fill_defaults, DEFAULT_OPTIONS } from "./compiler/options.js";
|
|
2
2
|
export type { DesmostDebug } from "./compiler/compile.js";
|
|
3
3
|
export { Ast } from "./parser/index.js";
|
|
4
|
+
export { desmos_to_ast, ast_to_source } from "./decompiler/decompile.js";
|
|
4
5
|
//# sourceMappingURL=index.internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.internal.d.ts","sourceRoot":"","sources":["../src/index.internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.internal.d.ts","sourceRoot":"","sources":["../src/index.internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACpE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.internal.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { fill_defaults } from "./compiler/options.js";
|
|
1
|
+
export { fill_defaults, DEFAULT_OPTIONS } from "./compiler/options.js";
|
|
2
2
|
export { Ast } from "./parser/index.js";
|
|
3
|
+
export { desmos_to_ast, ast_to_source } from "./decompiler/decompile.js";
|
|
3
4
|
//# sourceMappingURL=index.internal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.internal.js","sourceRoot":"","sources":["../src/index.internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.internal.js","sourceRoot":"","sources":["../src/index.internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGpE,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAuB,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/magic/expr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAa,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAGzC,MAAM,CAAC,MAAM,iBAAiB,GAC9B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/magic/expr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAa,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAGzC,MAAM,CAAC,MAAM,iBAAiB,GAC9B;IACC,IAAI,gBAAgB,EAAE;IACtB,IAAI,eAAe,EAAE;CACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"latex.d.ts","sourceRoot":"","sources":["../../../src/magic/expr/latex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGxE,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"latex.d.ts","sourceRoot":"","sources":["../../../src/magic/expr/latex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGxE,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,IAAI,CAAC;IAEzD,SAAkB,WAAW,+EACiD;IAE9E,SAAkB,UAAU,WAAY;IACxC,SAAkB,YAAY,QAAO;IACrC,SAAkB,QAAQ,6BAAgC;IAE1D,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAOhD,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAI3C"}
|
package/dist/magic/expr/latex.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"latex.js","sourceRoot":"","sources":["../../../src/magic/expr/latex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAa,MAAM,gBAAgB,CAAC;AAGxE,MAAM,OAAO,gBAAiB,SAAQ,cAAoB;
|
|
1
|
+
{"version":3,"file":"latex.js","sourceRoot":"","sources":["../../../src/magic/expr/latex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAa,MAAM,gBAAgB,CAAC;AAGxE,MAAM,OAAO,gBAAiB,SAAQ,cAAoB;IAEvC,WAAW,GAC1B,2EAA2E,CAAA;IAE5D,UAAU,GAAK,OAAO,CAAA;IACtB,YAAY,GAAG,IAAI,CAAA;IACnB,QAAQ,GAAO,WAAW,CAAC,OAAO,CAAC,KAAK,CAAA;IAE1D,KAAK,CAAC,MAA8B,EAAE,IAAY;QAEjD,MAAM,CAAC,IAAI,GAAG,YAAY,CAAC;QAC3B,mCAAmC;QACnC,MAAM,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IACzC,CAAC;IAEQ,YAAY,CAAC,IAAY;QAEjC,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/magic/expr/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGxE,qBAAa,eAAgB,SAAQ,cAAc,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/magic/expr/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGxE,qBAAa,eAAgB,SAAQ,cAAc,CAAC,IAAI,CAAC;IAExD,SAAkB,WAAW,yEACiC;IAE9D,SAAkB,UAAU,UAAW;IACvC,SAAkB,KAAK,UAAgB;IACvC,SAAkB,YAAY,QAAO;IACrC,SAAkB,QAAQ,8BAAiC;IAElD,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,IAAI,EAAE,MAAM;CAM3D"}
|
package/dist/magic/expr/text.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/magic/expr/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAa,MAAM,gBAAgB,CAAC;AAGxE,MAAM,OAAO,eAAgB,SAAQ,cAAoB;
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/magic/expr/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAa,MAAM,gBAAgB,CAAC;AAGxE,MAAM,OAAO,eAAgB,SAAQ,cAAoB;IAEtC,WAAW,GAC1B,2DAA2D,CAAA;IAE5C,UAAU,GAAK,MAAM,CAAA;IACrB,KAAK,GAAU,MAAM,CAAA;IACrB,YAAY,GAAG,IAAI,CAAA;IACnB,QAAQ,GAAO,WAAW,CAAC,OAAO,CAAC,MAAM,CAAA;IAElD,KAAK,CAAC,MAA8B,EAAE,IAAY;QAE1D,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;QACrB,mCAAmC;QACnC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dark-mode.d.ts","sourceRoot":"","sources":["../../../src/magic/global/dark-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG1D,qBAAa,mBAAoB,SAAQ,WAAW,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"dark-mode.d.ts","sourceRoot":"","sources":["../../../src/magic/global/dark-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG1D,qBAAa,mBAAoB,SAAQ,WAAW,CAAC,MAAM,CAAC;IAE3D,SAAkB,WAAW,qEACuC;IAEpE,SAAkB,UAAU,UAAS;IAErC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU;CAM/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dark-mode.js","sourceRoot":"","sources":["../../../src/magic/global/dark-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,gBAAgB,CAAC;AAG1D,MAAM,OAAO,mBAAoB,SAAQ,WAAmB;
|
|
1
|
+
{"version":3,"file":"dark-mode.js","sourceRoot":"","sources":["../../../src/magic/global/dark-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,gBAAgB,CAAC;AAG1D,MAAM,OAAO,mBAAoB,SAAQ,WAAmB;IAEzC,WAAW,GAC1B,iEAAiE,CAAA;IAElD,UAAU,GAAG,MAAM,CAAA;IAErC,KAAK,CAAC,MAAyB;QAE9B,MAAM,CAAC,cAAc,CAAC;YACrB,cAAc,EAAE,IAAI;SACpB,CAAC,CAAC;IACJ,CAAC;CACD"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Incantation, ArgIncantation, type GLOBAL } from "../incantation.js";
|
|
2
|
+
type DesmosSettings = Desmos.GraphConfiguration & Desmos.GraphSettings;
|
|
2
3
|
export declare class DesmosIncantation extends ArgIncantation<GLOBAL> {
|
|
3
4
|
readonly description = "Set the configuration of the calculator via `Calculator.updateSettings()`.";
|
|
4
5
|
readonly identifier = "desmos";
|
|
5
6
|
readonly requires_arg = false;
|
|
6
7
|
readonly arg_type = Incantation.ArgType.OBJECT;
|
|
7
|
-
apply(target: Desmos.Calculator, data?:
|
|
8
|
+
apply(target: Desmos.Calculator, data?: DesmosSettings): void;
|
|
8
9
|
}
|
|
10
|
+
export {};
|
|
9
11
|
//# sourceMappingURL=desmos.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desmos.d.ts","sourceRoot":"","sources":["../../../src/magic/global/desmos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG1E,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"desmos.d.ts","sourceRoot":"","sources":["../../../src/magic/global/desmos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG1E,KAAK,cAAc,GAAG,MAAM,CAAC,kBAAkB,GAAG,MAAM,CAAC,aAAa,CAAA;AAGtE,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,MAAM,CAAC;IAE5D,SAAkB,WAAW,gFACkD;IAE/E,SAAkB,UAAU,YAAa;IACzC,SAAkB,YAAY,SAAQ;IACtC,SAAkB,QAAQ,8BAAiC;IAElD,KAAK,CACb,MAAM,EAAE,MAAM,CAAC,UAAU,EACzB,IAAI,CAAC,EAAE,cAAc,GACnB,IAAI;CAMP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desmos.js","sourceRoot":"","sources":["../../../src/magic/global/desmos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAe,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"desmos.js","sourceRoot":"","sources":["../../../src/magic/global/desmos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAe,MAAM,gBAAgB,CAAC;AAM1E,MAAM,OAAO,iBAAkB,SAAQ,cAAsB;IAE1C,WAAW,GAC1B,4EAA4E,CAAA;IAE7D,UAAU,GAAK,QAAQ,CAAA;IACvB,YAAY,GAAG,KAAK,CAAA;IACpB,QAAQ,GAAO,WAAW,CAAC,OAAO,CAAC,MAAM,CAAA;IAElD,KAAK,CACb,MAAyB,EACzB,IAAqB;QAGrB,IAAI,IAAI,IAAI,SAAS,EAAE,CAAC;YACvB,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;IACF,CAAC;CACD"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { DesmosIncantation } from "./desmos.js";
|
|
2
|
+
export { ViewportIncantation } from "./viewport.js";
|
|
3
|
+
export { DarkModeIncantation } from "./dark-mode.js";
|
|
1
4
|
import { Incantation, type GLOBAL } from "../incantation.js";
|
|
2
5
|
export declare const GLOBAL_INCANTATIONS: Incantation<GLOBAL>[];
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/magic/global/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAO1D,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,EAKpD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/magic/global/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAO1D,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,EAKpD,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { DesmosIncantation } from "./desmos.js";
|
|
2
|
+
export { ViewportIncantation } from "./viewport.js";
|
|
3
|
+
export { DarkModeIncantation } from "./dark-mode.js";
|
|
1
4
|
import { Incantation } from "../incantation.js";
|
|
2
5
|
import { DesmosIncantation } from "./desmos.js";
|
|
3
6
|
import { ViewportIncantation } from "./viewport.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/magic/global/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,gBAAgB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,MAAM,CAAC,MAAM,mBAAmB,GAChC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/magic/global/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAe,MAAM,gBAAgB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,MAAM,CAAC,MAAM,mBAAmB,GAChC;IACC,IAAI,iBAAiB,EAAE;IACvB,IAAI,mBAAmB,EAAE;IACzB,IAAI,mBAAmB,EAAE;CACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../../../src/magic/global/viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG1E,UAAU,cAAc;
|
|
1
|
+
{"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../../../src/magic/global/viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG1E,UAAU,cAAc;IAEvB,IAAI,CAAC,EAAI,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAI,MAAM,CAAC;CAChC;AAGD,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,MAAM,CAAC;IAE9D,SAAkB,WAAW,sEACwC;IAErE,SAAkB,UAAU,cAAe;IAC3C,SAAkB,YAAY,QAAO;IACrC,SAAkB,QAAQ,8BAAiC;IAE3D,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,cAAc;CAarD"}
|
|
@@ -6,7 +6,6 @@ export class ViewportIncantation extends ArgIncantation {
|
|
|
6
6
|
arg_type = Incantation.ArgType.OBJECT;
|
|
7
7
|
apply(target, data) {
|
|
8
8
|
let existing = target.graphpaperBounds.mathCoordinates;
|
|
9
|
-
console.log(`existing =`, existing);
|
|
10
9
|
let { left = existing.left, right = existing.right, bottom = existing.bottom, top = existing.top, } = data;
|
|
11
10
|
target.setMathBounds({ left, right, bottom, top });
|
|
12
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.js","sourceRoot":"","sources":["../../../src/magic/global/viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAe,MAAM,gBAAgB,CAAC;AAU1E,MAAM,OAAO,mBAAoB,SAAQ,cAAsB;
|
|
1
|
+
{"version":3,"file":"viewport.js","sourceRoot":"","sources":["../../../src/magic/global/viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAe,MAAM,gBAAgB,CAAC;AAU1E,MAAM,OAAO,mBAAoB,SAAQ,cAAsB;IAE5C,WAAW,GAC1B,kEAAkE,CAAA;IAEnD,UAAU,GAAK,UAAU,CAAA;IACzB,YAAY,GAAG,IAAI,CAAA;IACnB,QAAQ,GAAO,WAAW,CAAC,OAAO,CAAC,MAAM,CAAA;IAE3D,KAAK,CAAC,MAAyB,EAAE,IAAoB;QAEpD,IAAI,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC,eAAe,CAAC;QAEvD,IAAI,EACH,IAAI,GAAK,QAAQ,CAAC,IAAI,EACtB,KAAK,GAAI,QAAQ,CAAC,KAAK,EACvB,MAAM,GAAG,QAAQ,CAAC,MAAM,EACxB,GAAG,GAAM,QAAQ,CAAC,GAAG,GACrB,GAAG,IAAI,CAAC;QAET,MAAM,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IACpD,CAAC;CACD"}
|
|
@@ -1,30 +1,74 @@
|
|
|
1
1
|
import { type Unrecoverable } from "../errors.js";
|
|
2
|
+
/**
|
|
3
|
+
* An *Incantation* is like a slash command that tells Desmost to do something - like changing the properties of an expression, or applying some settings to the calculator as a whole.
|
|
4
|
+
*
|
|
5
|
+
* Incantations must be prefixed by a `/`. They look like this:
|
|
6
|
+
*
|
|
7
|
+
* ```math
|
|
8
|
+
* /viewport{ left: -1, right: 1 }
|
|
9
|
+
* /hidden :: x = 69
|
|
10
|
+
* /text :: Never gonna give you up
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* Incantations that accept an argument derive from `ArgIncantation`.
|
|
14
|
+
*/
|
|
2
15
|
export declare abstract class Incantation<Effect extends Incantation.Effect = Incantation.Effect> {
|
|
16
|
+
/** Short user-facing description of what the incantation does. */
|
|
3
17
|
abstract readonly description: string;
|
|
18
|
+
/** The raw text sequence that matches this incantation, such as `viewport` or `hidden`. */
|
|
4
19
|
abstract readonly identifier: string;
|
|
20
|
+
/** An alternative `.identifier`, strictly for localisation purposes only. */
|
|
5
21
|
readonly alias?: string;
|
|
22
|
+
/** Apply this incantation's effect to `target`, using the provided `data` if required. */
|
|
6
23
|
abstract apply(target: Effect extends GLOBAL ? Desmos.Calculator : Desmos.ExpressionState, data?: unknown): void;
|
|
24
|
+
/** Error if the `actual` type of the given expression is not `required`. */
|
|
7
25
|
protected require_expr_type<T extends Desmos.ExpressionState["type"]>(actual: unknown, required: T): asserts actual is T;
|
|
8
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* An incantation that accepts an argument.
|
|
29
|
+
*/
|
|
9
30
|
export declare abstract class ArgIncantation<Effect extends Incantation.Effect = Incantation.Effect> extends Incantation<Effect> {
|
|
31
|
+
/** Does this incantation always require an argument to be passed? */
|
|
10
32
|
readonly requires_arg: boolean;
|
|
33
|
+
/** What type of argument does this incantation accept? */
|
|
11
34
|
abstract readonly arg_type: Incantation.ArgType;
|
|
35
|
+
/**
|
|
36
|
+
* Evaluate the argument provided to this incantation, throwing if an error is encountered.
|
|
37
|
+
*
|
|
38
|
+
* For instance, for `/viewport{ left: -1, right: 1 }`, this returns the POJO `{ left: -1, right: 1 }`.
|
|
39
|
+
*
|
|
40
|
+
* ## Notes
|
|
41
|
+
*
|
|
42
|
+
* Child incantation classes should override this method, though the defaults should cover most cases (except `ArgType.ENUM`).
|
|
43
|
+
*/
|
|
12
44
|
evaluate_arg(raw: string): Unrecoverable<unknown>;
|
|
13
45
|
}
|
|
14
46
|
export declare namespace Incantation {
|
|
47
|
+
/** The kind of effect an incantation produces - it either modifies only one block, or modifies the calculator as a whole. */
|
|
15
48
|
enum Effect {
|
|
49
|
+
/** An incantation that affects the entire Desmos calculator state, like `/desmos` or `/viewport`. */
|
|
16
50
|
GLOBAL = 0,
|
|
51
|
+
/** An incantation that affects only the expression immediately following it, like `/hide` or `/slider`. */
|
|
17
52
|
LOCAL = 1,
|
|
53
|
+
/** An incantation that produces an expression, like `/latex` or `/text`. */
|
|
18
54
|
EXPR = 2
|
|
19
55
|
}
|
|
56
|
+
/** The type of argument an incantation accepts, which affects how it is parsed. */
|
|
20
57
|
enum ArgType {
|
|
58
|
+
/** Any arbitrary user text content, where characters like `"` and `'` don't have semantic meaning and can be ignored. */
|
|
21
59
|
STRING = "String",
|
|
60
|
+
/** LaTeX, which should have balanced `{}` braces. */
|
|
22
61
|
LATEX = "LaTeX",
|
|
62
|
+
/** Specific value from an allowed set of values, which will map to an enum value in the Desmos API. */
|
|
23
63
|
ENUM = "Enum",
|
|
64
|
+
/** JavaScript object fields, where characters like `{}` and `"` all have semantic meaning, and must be balanced. */
|
|
24
65
|
OBJECT = "Object"
|
|
25
66
|
}
|
|
26
67
|
}
|
|
68
|
+
/** An incantation that affects the entire Desmos calculator state, like `/desmos` or `/viewport`. */
|
|
27
69
|
export type GLOBAL = Incantation.Effect.GLOBAL;
|
|
70
|
+
/** An incantation that affects only the expression immediately following it, like `/hide` or `/slider`. */
|
|
28
71
|
export type LOCAL = Incantation.Effect.LOCAL;
|
|
72
|
+
/** An incantation that produces an expression, like `/latex` or `/text`. */
|
|
29
73
|
export type EXPR = Incantation.Effect.EXPR;
|
|
30
74
|
//# sourceMappingURL=incantation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incantation.d.ts","sourceRoot":"","sources":["../../src/magic/incantation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"incantation.d.ts","sourceRoot":"","sources":["../../src/magic/incantation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAGnE;;;;;;;;;;;;GAYG;AACH,8BAAsB,WAAW,CAChC,MAAM,SAAS,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM;IAGtD,kEAAkE;IAClE,kBAAyB,WAAW,EAAE,MAAM,CAAA;IAE5C,2FAA2F;IAC3F,kBAAyB,UAAU,EAAE,MAAM,CAAA;IAE3C,6EAA6E;IAC7E,SAAgB,KAAK,CAAC,EAAE,MAAM,CAAA;IAG9B,0FAA0F;aAC1E,KAAK,CACpB,MAAM,EAAE,MAAM,SAAS,MAAM,GAAG,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,eAAe,EAC1E,IAAI,CAAC,EAAE,OAAO,GACZ,IAAI;IAEP,4EAA4E;IAC5E,SAAS,CAAC,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,EACnE,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,CAAC,GACT,OAAO,CAAC,MAAM,IAAI,CAAC;CAStB;AAGD;;GAEG;AACH,8BAAsB,cAAc,CACnC,MAAM,SAAS,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAEtD,SAAQ,WAAW,CAAC,MAAM,CAAC;IAE3B,qEAAqE;IACrE,SAAgB,YAAY,EAAE,OAAO,CAAO;IAE5C,0DAA0D;IAC1D,kBAAyB,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAA;IAGtD;;;;;;;;OAQG;IACI,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC;CAkBxD;AAGD,yBAAiB,WAAW,CAC5B;IACC,6HAA6H;IAC7H,KAAY,MAAM;QAEjB,qGAAqG;QACrG,MAAM,IAAA;QAEN,2GAA2G;QAC3G,KAAK,IAAA;QAEL,4EAA4E;QAC5E,IAAI,IAAA;KACJ;IAED,mFAAmF;IACnF,KAAY,OAAO;QAElB,yHAAyH;QACzH,MAAM,WAAW;QAEjB,qDAAqD;QACrD,KAAK,UAAU;QAEf,uGAAuG;QACvG,IAAI,SAAS;QAEb,oHAAoH;QACpH,MAAM,WAAW;KACjB;CACD;AAKD,qGAAqG;AACrG,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;AAE/C,2GAA2G;AAC3G,MAAM,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC;AAE7C,4EAA4E;AAC5E,MAAM,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC"}
|
|
@@ -1,15 +1,43 @@
|
|
|
1
1
|
import Json5 from "json5";
|
|
2
2
|
import { UnrecoverableError } from "../errors.js";
|
|
3
|
+
/**
|
|
4
|
+
* An *Incantation* is like a slash command that tells Desmost to do something - like changing the properties of an expression, or applying some settings to the calculator as a whole.
|
|
5
|
+
*
|
|
6
|
+
* Incantations must be prefixed by a `/`. They look like this:
|
|
7
|
+
*
|
|
8
|
+
* ```math
|
|
9
|
+
* /viewport{ left: -1, right: 1 }
|
|
10
|
+
* /hidden :: x = 69
|
|
11
|
+
* /text :: Never gonna give you up
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* Incantations that accept an argument derive from `ArgIncantation`.
|
|
15
|
+
*/
|
|
3
16
|
export class Incantation {
|
|
17
|
+
/** An alternative `.identifier`, strictly for localisation purposes only. */
|
|
4
18
|
alias;
|
|
19
|
+
/** Error if the `actual` type of the given expression is not `required`. */
|
|
5
20
|
require_expr_type(actual, required) {
|
|
6
21
|
if ((actual ?? "expression") !== required) {
|
|
7
22
|
throw new UnrecoverableError.IllegalIncantation(`/${this.identifier} can only applied to ${required === "expression" ? "latex" : required} expressions, but target block has type: ${actual}`);
|
|
8
23
|
}
|
|
9
24
|
}
|
|
10
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* An incantation that accepts an argument.
|
|
28
|
+
*/
|
|
11
29
|
export class ArgIncantation extends Incantation {
|
|
30
|
+
/** Does this incantation always require an argument to be passed? */
|
|
12
31
|
requires_arg = true;
|
|
32
|
+
/**
|
|
33
|
+
* Evaluate the argument provided to this incantation, throwing if an error is encountered.
|
|
34
|
+
*
|
|
35
|
+
* For instance, for `/viewport{ left: -1, right: 1 }`, this returns the POJO `{ left: -1, right: 1 }`.
|
|
36
|
+
*
|
|
37
|
+
* ## Notes
|
|
38
|
+
*
|
|
39
|
+
* Child incantation classes should override this method, though the defaults should cover most cases (except `ArgType.ENUM`).
|
|
40
|
+
*/
|
|
13
41
|
evaluate_arg(raw) {
|
|
14
42
|
switch (this.arg_type) {
|
|
15
43
|
case Incantation.ArgType.STRING: return raw;
|
|
@@ -20,6 +48,7 @@ export class ArgIncantation extends Incantation {
|
|
|
20
48
|
return Json5.parse(`{${raw}}`);
|
|
21
49
|
}
|
|
22
50
|
catch (e) {
|
|
51
|
+
// @ts-expect-error: fine
|
|
23
52
|
throw new UnrecoverableError.InvalidArgument(e.message);
|
|
24
53
|
}
|
|
25
54
|
}
|
|
@@ -27,17 +56,26 @@ export class ArgIncantation extends Incantation {
|
|
|
27
56
|
}
|
|
28
57
|
}
|
|
29
58
|
(function (Incantation) {
|
|
59
|
+
/** The kind of effect an incantation produces - it either modifies only one block, or modifies the calculator as a whole. */
|
|
30
60
|
let Effect;
|
|
31
61
|
(function (Effect) {
|
|
62
|
+
/** An incantation that affects the entire Desmos calculator state, like `/desmos` or `/viewport`. */
|
|
32
63
|
Effect[Effect["GLOBAL"] = 0] = "GLOBAL";
|
|
64
|
+
/** An incantation that affects only the expression immediately following it, like `/hide` or `/slider`. */
|
|
33
65
|
Effect[Effect["LOCAL"] = 1] = "LOCAL";
|
|
66
|
+
/** An incantation that produces an expression, like `/latex` or `/text`. */
|
|
34
67
|
Effect[Effect["EXPR"] = 2] = "EXPR";
|
|
35
68
|
})(Effect = Incantation.Effect || (Incantation.Effect = {}));
|
|
69
|
+
/** The type of argument an incantation accepts, which affects how it is parsed. */
|
|
36
70
|
let ArgType;
|
|
37
71
|
(function (ArgType) {
|
|
72
|
+
/** Any arbitrary user text content, where characters like `"` and `'` don't have semantic meaning and can be ignored. */
|
|
38
73
|
ArgType["STRING"] = "String";
|
|
74
|
+
/** LaTeX, which should have balanced `{}` braces. */
|
|
39
75
|
ArgType["LATEX"] = "LaTeX";
|
|
76
|
+
/** Specific value from an allowed set of values, which will map to an enum value in the Desmos API. */
|
|
40
77
|
ArgType["ENUM"] = "Enum";
|
|
78
|
+
/** JavaScript object fields, where characters like `{}` and `"` all have semantic meaning, and must be balanced. */
|
|
41
79
|
ArgType["OBJECT"] = "Object";
|
|
42
80
|
})(ArgType = Incantation.ArgType || (Incantation.ArgType = {}));
|
|
43
81
|
})(Incantation || (Incantation = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incantation.js","sourceRoot":"","sources":["../../src/magic/incantation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAsB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"incantation.js","sourceRoot":"","sources":["../../src/magic/incantation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAsB,MAAM,WAAW,CAAC;AAGnE;;;;;;;;;;;;GAYG;AACH,MAAM,OAAgB,WAAW;IAUhC,6EAA6E;IAC7D,KAAK,CAAS;IAS9B,4EAA4E;IAClE,iBAAiB,CAC1B,MAAe,EACf,QAAW;QAGX,IAAI,CAAC,MAAM,IAAI,YAAY,CAAC,KAAK,QAAQ,EACzC,CAAC;YACA,MAAM,IAAI,kBAAkB,CAAC,kBAAkB,CAC9C,IAAI,IAAI,CAAC,UAAU,wBAAwB,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,4CAA4C,MAAM,EAAE,CAC7I,CAAC;QACH,CAAC;IACF,CAAC;CACD;AAGD;;GAEG;AACH,MAAM,OAAgB,cAGrB,SAAQ,WAAmB;IAE3B,qEAAqE;IACrD,YAAY,GAAY,IAAI,CAAA;IAM5C;;;;;;;;OAQG;IACI,YAAY,CAAC,GAAW;QAE9B,QAAQ,IAAI,CAAC,QAAQ,EAAE,CAAC;YACvB,KAAK,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,GAAG,CAAC;YAC5C,KAAK,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAE,OAAO,GAAG,CAAC;YAC5C,KAAK,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAG,OAAO,GAAG,CAAC;YAE5C,KAAK,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;gBACjC,IAAI,CAAC;oBACJ,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;gBAChC,CAAC;gBACD,OAAO,CAAC,EAAE,CAAC;oBACV,yBAAyB;oBACzB,MAAM,IAAI,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;gBACzD,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAGD,WAAiB,WAAW;IAE3B,6HAA6H;IAC7H,IAAY,MAUX;IAVD,WAAY,MAAM;QAEjB,qGAAqG;QACrG,uCAAM,CAAA;QAEN,2GAA2G;QAC3G,qCAAK,CAAA;QAEL,4EAA4E;QAC5E,mCAAI,CAAA;IACL,CAAC,EAVW,MAAM,GAAN,kBAAM,KAAN,kBAAM,QAUjB;IAED,mFAAmF;IACnF,IAAY,OAaX;IAbD,WAAY,OAAO;QAElB,yHAAyH;QACzH,4BAAiB,CAAA;QAEjB,qDAAqD;QACrD,0BAAe,CAAA;QAEf,uGAAuG;QACvG,wBAAa,CAAA;QAEb,oHAAoH;QACpH,4BAAiB,CAAA;IAClB,CAAC,EAbW,OAAO,GAAP,mBAAO,KAAP,mBAAO,QAalB;AACF,CAAC,EA9BgB,WAAW,KAAX,WAAW,QA8B3B"}
|