@rippling/rippling-sdk 0.2.0-alpha.107 → 0.2.0-alpha.109
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/client.d.mts +10 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -1
- package/client.d.ts.map +1 -1
- package/client.js +10 -1
- package/client.js.map +1 -1
- package/client.mjs +10 -1
- package/client.mjs.map +1 -1
- package/lib/charts/builders.d.mts +18 -19
- package/lib/charts/builders.d.mts.map +1 -1
- package/lib/charts/builders.d.ts +18 -19
- package/lib/charts/builders.d.ts.map +1 -1
- package/lib/charts/builders.js +35 -28
- package/lib/charts/builders.js.map +1 -1
- package/lib/charts/builders.mjs +35 -28
- package/lib/charts/builders.mjs.map +1 -1
- package/lib/charts/describe.d.mts +6 -7
- package/lib/charts/describe.d.mts.map +1 -1
- package/lib/charts/describe.d.ts +6 -7
- package/lib/charts/describe.d.ts.map +1 -1
- package/lib/charts/describe.js +26 -27
- package/lib/charts/describe.js.map +1 -1
- package/lib/charts/describe.mjs +27 -28
- package/lib/charts/describe.mjs.map +1 -1
- package/lib/charts/errors.d.mts +2 -6
- package/lib/charts/errors.d.mts.map +1 -1
- package/lib/charts/errors.d.ts +2 -6
- package/lib/charts/errors.d.ts.map +1 -1
- package/lib/charts/errors.js +2 -6
- package/lib/charts/errors.js.map +1 -1
- package/lib/charts/errors.mjs +2 -6
- package/lib/charts/errors.mjs.map +1 -1
- package/lib/charts/evaluate.d.mts +5 -7
- package/lib/charts/evaluate.d.mts.map +1 -1
- package/lib/charts/evaluate.d.ts +5 -7
- package/lib/charts/evaluate.d.ts.map +1 -1
- package/lib/charts/evaluate.js +21 -35
- package/lib/charts/evaluate.js.map +1 -1
- package/lib/charts/evaluate.mjs +22 -36
- package/lib/charts/evaluate.mjs.map +1 -1
- package/lib/charts/schema.d.mts +8 -97
- package/lib/charts/schema.d.mts.map +1 -1
- package/lib/charts/schema.d.ts +8 -97
- package/lib/charts/schema.d.ts.map +1 -1
- package/lib/charts/schema.js +186 -65
- package/lib/charts/schema.js.map +1 -1
- package/lib/charts/schema.mjs +185 -65
- package/lib/charts/schema.mjs.map +1 -1
- package/lib/charts/types.d.mts +40 -25
- package/lib/charts/types.d.mts.map +1 -1
- package/lib/charts/types.d.ts +40 -25
- package/lib/charts/types.d.ts.map +1 -1
- package/lib/charts/types.js +8 -10
- package/lib/charts/types.js.map +1 -1
- package/lib/charts/types.mjs +8 -10
- package/lib/charts/types.mjs.map +1 -1
- package/lib/charts/visualization-grammar.d.mts +66 -0
- package/lib/charts/visualization-grammar.d.mts.map +1 -0
- package/lib/charts/visualization-grammar.d.ts +66 -0
- package/lib/charts/visualization-grammar.d.ts.map +1 -0
- package/lib/charts/visualization-grammar.js +70 -0
- package/lib/charts/visualization-grammar.js.map +1 -0
- package/lib/charts/visualization-grammar.mjs +67 -0
- package/lib/charts/visualization-grammar.mjs.map +1 -0
- package/lib/charts/vocabulary.d.mts +7 -0
- package/lib/charts/vocabulary.d.mts.map +1 -0
- package/lib/charts/vocabulary.d.ts +7 -0
- package/lib/charts/vocabulary.d.ts.map +1 -0
- package/lib/charts/vocabulary.js +10 -0
- package/lib/charts/vocabulary.js.map +1 -0
- package/lib/charts/vocabulary.mjs +7 -0
- package/lib/charts/vocabulary.mjs.map +1 -0
- package/lib/charts.d.mts +3 -3
- package/lib/charts.d.mts.map +1 -1
- package/lib/charts.d.ts +3 -3
- package/lib/charts.d.ts.map +1 -1
- package/lib/charts.js +2 -1
- package/lib/charts.js.map +1 -1
- package/lib/charts.mjs +1 -1
- package/lib/charts.mjs.map +1 -1
- package/package.json +4 -2
- package/resources/card-transactions.d.mts +579 -0
- package/resources/card-transactions.d.mts.map +1 -0
- package/resources/card-transactions.d.ts +579 -0
- package/resources/card-transactions.d.ts.map +1 -0
- package/resources/card-transactions.js +116 -0
- package/resources/card-transactions.js.map +1 -0
- package/resources/card-transactions.mjs +112 -0
- package/resources/card-transactions.mjs.map +1 -0
- package/resources/earning-types.d.mts +50 -10
- package/resources/earning-types.d.mts.map +1 -1
- package/resources/earning-types.d.ts +50 -10
- package/resources/earning-types.d.ts.map +1 -1
- package/resources/earning-types.js +21 -2
- package/resources/earning-types.js.map +1 -1
- package/resources/earning-types.mjs +21 -2
- package/resources/earning-types.mjs.map +1 -1
- package/resources/index.d.mts +4 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -1
- package/resources/index.mjs.map +1 -1
- package/resources/reimbursements.d.mts +954 -0
- package/resources/reimbursements.d.mts.map +1 -0
- package/resources/reimbursements.d.ts +954 -0
- package/resources/reimbursements.d.ts.map +1 -0
- package/resources/reimbursements.js +140 -0
- package/resources/reimbursements.js.map +1 -0
- package/resources/reimbursements.mjs +136 -0
- package/resources/reimbursements.mjs.map +1 -0
- package/resources/spend-categories.d.mts +140 -0
- package/resources/spend-categories.d.mts.map +1 -0
- package/resources/spend-categories.d.ts +140 -0
- package/resources/spend-categories.d.ts.map +1 -0
- package/resources/spend-categories.js +83 -0
- package/resources/spend-categories.js.map +1 -0
- package/resources/spend-categories.mjs +79 -0
- package/resources/spend-categories.mjs.map +1 -0
- package/resources/workflows/executions.d.mts +153 -0
- package/resources/workflows/executions.d.mts.map +1 -0
- package/resources/workflows/executions.d.ts +153 -0
- package/resources/workflows/executions.d.ts.map +1 -0
- package/resources/workflows/executions.js +74 -0
- package/resources/workflows/executions.js.map +1 -0
- package/resources/workflows/executions.mjs +70 -0
- package/resources/workflows/executions.mjs.map +1 -0
- package/resources/workflows/index.d.mts +3 -0
- package/resources/workflows/index.d.mts.map +1 -0
- package/resources/workflows/index.d.ts +3 -0
- package/resources/workflows/index.d.ts.map +1 -0
- package/resources/workflows/index.js +9 -0
- package/resources/workflows/index.js.map +1 -0
- package/resources/workflows/index.mjs +4 -0
- package/resources/workflows/index.mjs.map +1 -0
- package/resources/workflows/workflows.d.mts +977 -0
- package/resources/workflows/workflows.d.mts.map +1 -0
- package/resources/workflows/workflows.d.ts +977 -0
- package/resources/workflows/workflows.d.ts.map +1 -0
- package/resources/workflows/workflows.js +246 -0
- package/resources/workflows/workflows.js.map +1 -0
- package/resources/workflows/workflows.mjs +241 -0
- package/resources/workflows/workflows.mjs.map +1 -0
- package/resources/workflows.d.mts +1 -972
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +1 -972
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +2 -234
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +1 -232
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +63 -12
- package/src/lib/charts/README.md +35 -28
- package/src/lib/charts/agent-reference.md +73 -0
- package/src/lib/charts/builders.ts +51 -35
- package/src/lib/charts/capabilities.json +96 -0
- package/src/lib/charts/describe.ts +31 -29
- package/src/lib/charts/errors.ts +2 -6
- package/src/lib/charts/evaluate.ts +25 -38
- package/src/lib/charts/schema.ts +232 -66
- package/src/lib/charts/types.ts +42 -31
- package/src/lib/charts/visualization-grammar.ts +67 -0
- package/src/lib/charts/vocabulary.ts +7 -0
- package/src/lib/charts.ts +8 -1
- package/src/resources/card-transactions.ts +718 -0
- package/src/resources/earning-types.ts +52 -10
- package/src/resources/index.ts +22 -1
- package/src/resources/reimbursements.ts +1157 -0
- package/src/resources/spend-categories.ts +175 -0
- package/src/resources/workflows/executions.ts +191 -0
- package/src/resources/workflows/index.ts +15 -0
- package/src/resources/workflows/workflows.ts +1661 -0
- package/src/resources/workflows.ts +1 -1647
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/lib/charts/guards.d.mts +0 -15
- package/lib/charts/guards.d.mts.map +0 -1
- package/lib/charts/guards.d.ts +0 -15
- package/lib/charts/guards.d.ts.map +0 -1
- package/lib/charts/guards.js +0 -38
- package/lib/charts/guards.js.map +0 -1
- package/lib/charts/guards.mjs +0 -34
- package/lib/charts/guards.mjs.map +0 -1
- package/src/lib/charts/guards.ts +0 -42
package/lib/charts/describe.js
CHANGED
|
@@ -1,62 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.describe = describe;
|
|
4
|
-
const builders_1 = require("./builders.js");
|
|
5
4
|
const errors_1 = require("./errors.js");
|
|
6
|
-
const
|
|
7
|
-
const types_1 = require("./types.js");
|
|
5
|
+
const schema_1 = require("./schema.js");
|
|
8
6
|
/**
|
|
9
7
|
* Turn a rule into the shape the settings panel renders: a label plus its
|
|
10
|
-
* editable parts. Accepts a `{$rule}` placeholder or a bare
|
|
11
|
-
*
|
|
8
|
+
* editable parts. Accepts a `{$rule}` placeholder or a bare node. Reads the same
|
|
9
|
+
* value `evaluate` runs — and validates it the same way — so a malformed or
|
|
12
10
|
* unknown node throws a `ChartRuleError` here too, never a native `TypeError`.
|
|
13
|
-
* The
|
|
14
|
-
*
|
|
15
|
-
* A tree nested past `MAX_RULE_DEPTH` throws `RuleDepthError`.
|
|
11
|
+
* The Valibot parser rejects malformed or nested values before this flat
|
|
12
|
+
* formatter reads them.
|
|
16
13
|
*/
|
|
17
14
|
function describe(rule) {
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
const parsedRule = (0, schema_1.parseChartRule)(rule);
|
|
16
|
+
if ('$rule' in parsedRule) {
|
|
17
|
+
return visit(parsedRule.$rule);
|
|
20
18
|
}
|
|
21
|
-
return visit(
|
|
19
|
+
return visit(parsedRule);
|
|
22
20
|
}
|
|
23
|
-
function visit(node
|
|
24
|
-
if (depth > types_1.MAX_RULE_DEPTH) {
|
|
25
|
-
throw new errors_1.RuleDepthError(types_1.MAX_RULE_DEPTH);
|
|
26
|
-
}
|
|
27
|
-
(0, guards_1.assertRuleNode)(node);
|
|
28
|
-
const next = depth + 1;
|
|
21
|
+
function visit(node) {
|
|
29
22
|
switch (node.kind) {
|
|
30
23
|
case 'value':
|
|
31
24
|
return { role: 'ref', label: "this row's value" };
|
|
32
25
|
case 'literal': {
|
|
33
|
-
const scalar =
|
|
26
|
+
const scalar = node.value;
|
|
34
27
|
return { role: 'literal', label: String(scalar), value: scalar };
|
|
35
28
|
}
|
|
36
29
|
case 'equals':
|
|
37
|
-
return comparison('is', node.left, node.right
|
|
30
|
+
return comparison('is', node.left, node.right);
|
|
38
31
|
case 'isNot':
|
|
39
|
-
return comparison('is not', node.left, node.right
|
|
32
|
+
return comparison('is not', node.left, node.right);
|
|
40
33
|
case 'lessThan':
|
|
41
|
-
return comparison('is under', node.left, node.right
|
|
34
|
+
return comparison('is under', node.left, node.right);
|
|
42
35
|
case 'greaterThan':
|
|
43
|
-
return comparison('is over', node.left, node.right
|
|
36
|
+
return comparison('is over', node.left, node.right);
|
|
44
37
|
case 'lessOrEqual':
|
|
45
|
-
return comparison('is at most', node.left, node.right
|
|
38
|
+
return comparison('is at most', node.left, node.right);
|
|
46
39
|
case 'greaterOrEqual':
|
|
47
|
-
return comparison('is at least', node.left, node.right
|
|
40
|
+
return comparison('is at least', node.left, node.right);
|
|
48
41
|
case 'ifElse':
|
|
49
42
|
return {
|
|
50
43
|
role: 'rule',
|
|
51
44
|
label: 'when',
|
|
52
|
-
parts: [visit(node.cond
|
|
45
|
+
parts: [visit(node.cond), literalControl(node.then.value), literalControl(node.else.value)],
|
|
53
46
|
};
|
|
54
47
|
default:
|
|
55
48
|
return unreachable(node);
|
|
56
49
|
}
|
|
57
50
|
}
|
|
58
|
-
function comparison(label, left, right
|
|
59
|
-
return { role: 'comparison', label, parts: [
|
|
51
|
+
function comparison(label, left, right) {
|
|
52
|
+
return { role: 'comparison', label, parts: [operandControl(left), operandControl(right)] };
|
|
53
|
+
}
|
|
54
|
+
function operandControl(node) {
|
|
55
|
+
return node.kind === 'value' ? { role: 'ref', label: "this row's value" } : literalControl(node.value);
|
|
56
|
+
}
|
|
57
|
+
function literalControl(value) {
|
|
58
|
+
return { role: 'literal', label: String(value), value };
|
|
60
59
|
}
|
|
61
60
|
function unreachable(node) {
|
|
62
61
|
throw new errors_1.UnknownNodeError(node.kind);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../src/lib/charts/describe.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../src/lib/charts/describe.ts"],"names":[],"mappings":";;AAYA,4BAMC;AAlBD,wCAA4C;AAC5C,wCAA0C;AAG1C;;;;;;;GAOG;AACH,SAAgB,QAAQ,CAAC,IAAa;IACpC,MAAM,UAAU,GAAG,IAAA,uBAAc,EAAC,IAAI,CAAC,CAAC;IACxC,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,KAAK,CAAC,IAAc;IAC3B,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,OAAO;YACV,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;QACpD,KAAK,SAAS,CAAC,CAAC,CAAC;YACf,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;YAC1B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QACnE,CAAC;QAED,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,KAAK,OAAO;YACV,OAAO,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACrD,KAAK,UAAU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O,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;AAC1D,CAAC;AAED,SAAS,WAAW,CAAC,IAAW;IAC9B,MAAM,IAAI,yBAAgB,CAAE,IAA0B,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC"}
|
package/lib/charts/describe.mjs
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { assertRuleNode, literalValue } from "./guards.mjs";
|
|
4
|
-
import { MAX_RULE_DEPTH } from "./types.mjs";
|
|
1
|
+
import { UnknownNodeError } from "./errors.mjs";
|
|
2
|
+
import { parseChartRule } from "./schema.mjs";
|
|
5
3
|
/**
|
|
6
4
|
* Turn a rule into the shape the settings panel renders: a label plus its
|
|
7
|
-
* editable parts. Accepts a `{$rule}` placeholder or a bare
|
|
8
|
-
*
|
|
5
|
+
* editable parts. Accepts a `{$rule}` placeholder or a bare node. Reads the same
|
|
6
|
+
* value `evaluate` runs — and validates it the same way — so a malformed or
|
|
9
7
|
* unknown node throws a `ChartRuleError` here too, never a native `TypeError`.
|
|
10
|
-
* The
|
|
11
|
-
*
|
|
12
|
-
* A tree nested past `MAX_RULE_DEPTH` throws `RuleDepthError`.
|
|
8
|
+
* The Valibot parser rejects malformed or nested values before this flat
|
|
9
|
+
* formatter reads them.
|
|
13
10
|
*/
|
|
14
11
|
export function describe(rule) {
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const parsedRule = parseChartRule(rule);
|
|
13
|
+
if ('$rule' in parsedRule) {
|
|
14
|
+
return visit(parsedRule.$rule);
|
|
17
15
|
}
|
|
18
|
-
return visit(
|
|
16
|
+
return visit(parsedRule);
|
|
19
17
|
}
|
|
20
|
-
function visit(node
|
|
21
|
-
if (depth > MAX_RULE_DEPTH) {
|
|
22
|
-
throw new RuleDepthError(MAX_RULE_DEPTH);
|
|
23
|
-
}
|
|
24
|
-
assertRuleNode(node);
|
|
25
|
-
const next = depth + 1;
|
|
18
|
+
function visit(node) {
|
|
26
19
|
switch (node.kind) {
|
|
27
20
|
case 'value':
|
|
28
21
|
return { role: 'ref', label: "this row's value" };
|
|
29
22
|
case 'literal': {
|
|
30
|
-
const scalar =
|
|
23
|
+
const scalar = node.value;
|
|
31
24
|
return { role: 'literal', label: String(scalar), value: scalar };
|
|
32
25
|
}
|
|
33
26
|
case 'equals':
|
|
34
|
-
return comparison('is', node.left, node.right
|
|
27
|
+
return comparison('is', node.left, node.right);
|
|
35
28
|
case 'isNot':
|
|
36
|
-
return comparison('is not', node.left, node.right
|
|
29
|
+
return comparison('is not', node.left, node.right);
|
|
37
30
|
case 'lessThan':
|
|
38
|
-
return comparison('is under', node.left, node.right
|
|
31
|
+
return comparison('is under', node.left, node.right);
|
|
39
32
|
case 'greaterThan':
|
|
40
|
-
return comparison('is over', node.left, node.right
|
|
33
|
+
return comparison('is over', node.left, node.right);
|
|
41
34
|
case 'lessOrEqual':
|
|
42
|
-
return comparison('is at most', node.left, node.right
|
|
35
|
+
return comparison('is at most', node.left, node.right);
|
|
43
36
|
case 'greaterOrEqual':
|
|
44
|
-
return comparison('is at least', node.left, node.right
|
|
37
|
+
return comparison('is at least', node.left, node.right);
|
|
45
38
|
case 'ifElse':
|
|
46
39
|
return {
|
|
47
40
|
role: 'rule',
|
|
48
41
|
label: 'when',
|
|
49
|
-
parts: [visit(node.cond
|
|
42
|
+
parts: [visit(node.cond), literalControl(node.then.value), literalControl(node.else.value)],
|
|
50
43
|
};
|
|
51
44
|
default:
|
|
52
45
|
return unreachable(node);
|
|
53
46
|
}
|
|
54
47
|
}
|
|
55
|
-
function comparison(label, left, right
|
|
56
|
-
return { role: 'comparison', label, parts: [
|
|
48
|
+
function comparison(label, left, right) {
|
|
49
|
+
return { role: 'comparison', label, parts: [operandControl(left), operandControl(right)] };
|
|
50
|
+
}
|
|
51
|
+
function operandControl(node) {
|
|
52
|
+
return node.kind === 'value' ? { role: 'ref', label: "this row's value" } : literalControl(node.value);
|
|
53
|
+
}
|
|
54
|
+
function literalControl(value) {
|
|
55
|
+
return { role: 'literal', label: String(value), value };
|
|
57
56
|
}
|
|
58
57
|
function unreachable(node) {
|
|
59
58
|
throw new UnknownNodeError(node.kind);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.mjs","sourceRoot":"","sources":["../../src/lib/charts/describe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"describe.mjs","sourceRoot":"","sources":["../../src/lib/charts/describe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,qBAAiB;AAC5C,OAAO,EAAE,cAAc,EAAE,qBAAiB;AAG1C;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAa;IACpC,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,KAAK,CAAC,IAAc;IAC3B,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,OAAO;YACV,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;QACpD,KAAK,SAAS,CAAC,CAAC,CAAC;YACf,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;YAC1B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QACnE,CAAC;QAED,KAAK,QAAQ;YACX,OAAO,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,KAAK,OAAO;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CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACzG,CAAC;AAED,SAAS,cAAc,CAAC,KAAuC;IAC7D,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;AAC1D,CAAC;AAED,SAAS,WAAW,CAAC,IAAW;IAC9B,MAAM,IAAI,gBAAgB,CAAE,IAA0B,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC"}
|
package/lib/charts/errors.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ export declare class RuleTypeError extends ChartRuleError {
|
|
|
14
14
|
constructor(message: string);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* A structurally invalid node in a deserialized
|
|
17
|
+
* A structurally invalid node in a deserialized value: not an object, no string
|
|
18
18
|
* `kind`, or a `literal` without a scalar `value`. Distinct from
|
|
19
19
|
* `UnknownNodeError` (a well-formed node whose `kind` is simply not in the
|
|
20
20
|
* vocabulary — the intentional escape hatch). Like the others it is a
|
|
@@ -24,11 +24,7 @@ export declare class RuleTypeError extends ChartRuleError {
|
|
|
24
24
|
export declare class MalformedRuleError extends ChartRuleError {
|
|
25
25
|
constructor(message: string);
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
* A rule nested deeper than the evaluator will walk. Guards against a
|
|
29
|
-
* stack-overflowing tree from untrusted, deserialized input; like the others it
|
|
30
|
-
* is a `ChartRuleError`, so the caller's escape hatch catches it.
|
|
31
|
-
*/
|
|
27
|
+
/** @deprecated v1 is non-recursive. Retained for source compatibility. */
|
|
32
28
|
export declare class RuleDepthError extends ChartRuleError {
|
|
33
29
|
constructor(maxDepth: number);
|
|
34
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../../src/lib/charts/errors.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,qBAAa,cAAe,SAAQ,KAAK;CAAG;AAE5C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;aACtB,IAAI,CAAC,EAAE,MAAM;gBAAb,IAAI,CAAC,EAAE,MAAM,YAAA;CAI1C;AAED,gFAAgF;AAChF,qBAAa,aAAc,SAAQ,cAAc;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,OAAO,EAAE,MAAM;CAI5B;AAED
|
|
1
|
+
{"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../../src/lib/charts/errors.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,qBAAa,cAAe,SAAQ,KAAK;CAAG;AAE5C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;aACtB,IAAI,CAAC,EAAE,MAAM;gBAAb,IAAI,CAAC,EAAE,MAAM,YAAA;CAI1C;AAED,gFAAgF;AAChF,qBAAa,aAAc,SAAQ,cAAc;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,OAAO,EAAE,MAAM;CAI5B;AAED,0EAA0E;AAC1E,qBAAa,cAAe,SAAQ,cAAc;gBACpC,QAAQ,EAAE,MAAM;CAI7B"}
|
package/lib/charts/errors.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare class RuleTypeError extends ChartRuleError {
|
|
|
14
14
|
constructor(message: string);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* A structurally invalid node in a deserialized
|
|
17
|
+
* A structurally invalid node in a deserialized value: not an object, no string
|
|
18
18
|
* `kind`, or a `literal` without a scalar `value`. Distinct from
|
|
19
19
|
* `UnknownNodeError` (a well-formed node whose `kind` is simply not in the
|
|
20
20
|
* vocabulary — the intentional escape hatch). Like the others it is a
|
|
@@ -24,11 +24,7 @@ export declare class RuleTypeError extends ChartRuleError {
|
|
|
24
24
|
export declare class MalformedRuleError extends ChartRuleError {
|
|
25
25
|
constructor(message: string);
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
* A rule nested deeper than the evaluator will walk. Guards against a
|
|
29
|
-
* stack-overflowing tree from untrusted, deserialized input; like the others it
|
|
30
|
-
* is a `ChartRuleError`, so the caller's escape hatch catches it.
|
|
31
|
-
*/
|
|
27
|
+
/** @deprecated v1 is non-recursive. Retained for source compatibility. */
|
|
32
28
|
export declare class RuleDepthError extends ChartRuleError {
|
|
33
29
|
constructor(maxDepth: number);
|
|
34
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/charts/errors.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,qBAAa,cAAe,SAAQ,KAAK;CAAG;AAE5C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;aACtB,IAAI,CAAC,EAAE,MAAM;gBAAb,IAAI,CAAC,EAAE,MAAM,YAAA;CAI1C;AAED,gFAAgF;AAChF,qBAAa,aAAc,SAAQ,cAAc;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,OAAO,EAAE,MAAM;CAI5B;AAED
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/charts/errors.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,qBAAa,cAAe,SAAQ,KAAK;CAAG;AAE5C;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;aACtB,IAAI,CAAC,EAAE,MAAM;gBAAb,IAAI,CAAC,EAAE,MAAM,YAAA;CAI1C;AAED,gFAAgF;AAChF,qBAAa,aAAc,SAAQ,cAAc;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,OAAO,EAAE,MAAM;CAI5B;AAED,0EAA0E;AAC1E,qBAAa,cAAe,SAAQ,cAAc;gBACpC,QAAQ,EAAE,MAAM;CAI7B"}
|
package/lib/charts/errors.js
CHANGED
|
@@ -26,7 +26,7 @@ class RuleTypeError extends ChartRuleError {
|
|
|
26
26
|
}
|
|
27
27
|
exports.RuleTypeError = RuleTypeError;
|
|
28
28
|
/**
|
|
29
|
-
* A structurally invalid node in a deserialized
|
|
29
|
+
* A structurally invalid node in a deserialized value: not an object, no string
|
|
30
30
|
* `kind`, or a `literal` without a scalar `value`. Distinct from
|
|
31
31
|
* `UnknownNodeError` (a well-formed node whose `kind` is simply not in the
|
|
32
32
|
* vocabulary — the intentional escape hatch). Like the others it is a
|
|
@@ -40,11 +40,7 @@ class MalformedRuleError extends ChartRuleError {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
exports.MalformedRuleError = MalformedRuleError;
|
|
43
|
-
/**
|
|
44
|
-
* A rule nested deeper than the evaluator will walk. Guards against a
|
|
45
|
-
* stack-overflowing tree from untrusted, deserialized input; like the others it
|
|
46
|
-
* is a `ChartRuleError`, so the caller's escape hatch catches it.
|
|
47
|
-
*/
|
|
43
|
+
/** @deprecated v1 is non-recursive. Retained for source compatibility. */
|
|
48
44
|
class RuleDepthError extends ChartRuleError {
|
|
49
45
|
constructor(maxDepth) {
|
|
50
46
|
super(`chart rule nested deeper than ${maxDepth} levels`);
|
package/lib/charts/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/charts/errors.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACrE,MAAa,cAAe,SAAQ,KAAK;CAAG;AAA5C,wCAA4C;AAE5C;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,cAAc;IAClD,YAA4B,IAAa;QACvC,KAAK,CAAC,4BAA4B,IAAI,IAAI,gBAAgB,EAAE,CAAC,CAAC;QADpC,SAAI,GAAJ,IAAI,CAAS;QAEvC,IAAI,CAAC,IAAI,GAAG,kBA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,CAAC,CAAC;QAC1D,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AALD,wCAKC"}
|
package/lib/charts/errors.mjs
CHANGED
|
@@ -20,7 +20,7 @@ export class RuleTypeError extends ChartRuleError {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* A structurally invalid node in a deserialized
|
|
23
|
+
* A structurally invalid node in a deserialized value: not an object, no string
|
|
24
24
|
* `kind`, or a `literal` without a scalar `value`. Distinct from
|
|
25
25
|
* `UnknownNodeError` (a well-formed node whose `kind` is simply not in the
|
|
26
26
|
* vocabulary — the intentional escape hatch). Like the others it is a
|
|
@@ -33,11 +33,7 @@ export class MalformedRuleError extends ChartRuleError {
|
|
|
33
33
|
this.name = 'MalformedRuleError';
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
/**
|
|
37
|
-
* A rule nested deeper than the evaluator will walk. Guards against a
|
|
38
|
-
* stack-overflowing tree from untrusted, deserialized input; like the others it
|
|
39
|
-
* is a `ChartRuleError`, so the caller's escape hatch catches it.
|
|
40
|
-
*/
|
|
36
|
+
/** @deprecated v1 is non-recursive. Retained for source compatibility. */
|
|
41
37
|
export class RuleDepthError extends ChartRuleError {
|
|
42
38
|
constructor(maxDepth) {
|
|
43
39
|
super(`chart rule nested deeper than ${maxDepth} levels`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.mjs","sourceRoot":"","sources":["../../src/lib/charts/errors.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,OAAO,cAAe,SAAQ,KAAK;CAAG;AAE5C;;;GAGG;AACH,MAAM,OAAO,gBAAiB,SAAQ,cAAc;IAClD,YAA4B,IAAa;QACvC,KAAK,CAAC,4BAA4B,IAAI,IAAI,gBAAgB,EAAE,CAAC,CAAC;QADpC,SAAI,GAAJ,IAAI,CAAS;QAEvC,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,C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B,CAAC;CACF"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type RuleContext, type RuleValue } from "./types.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Resolve a rule to a value against `ctx`. Accepts a `{$rule}` placeholder or a
|
|
4
|
-
* bare
|
|
4
|
+
* bare node. A malformed or unknown node throws a `ChartRuleError` (never a
|
|
5
5
|
* native `TypeError`), so a caller reading an untrusted, deserialized rule can
|
|
6
6
|
* catch every failure with one type. When the rule is a colour placeholder, the
|
|
7
7
|
* result is checked to be a colour (`string | null`) — a rule that resolves to a
|
|
8
8
|
* number or boolean is a `RuleTypeError`, not something the renderer paints.
|
|
9
9
|
*
|
|
10
|
-
* Pure: the only inputs are the
|
|
11
|
-
*
|
|
12
|
-
* and identical across the renderer, the panel readout, and a test. A tree
|
|
13
|
-
* nested past `MAX_RULE_DEPTH` throws `RuleDepthError` rather than overflowing.
|
|
10
|
+
* Pure and non-recursive: the only inputs are the validated flat rule and the
|
|
11
|
+
* context. No clock, randomness, callbacks, or I/O.
|
|
14
12
|
*/
|
|
15
|
-
export declare function evaluate(rule:
|
|
13
|
+
export declare function evaluate(rule: unknown, ctx: RuleContext): RuleValue;
|
|
16
14
|
//# sourceMappingURL=evaluate.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.d.mts","sourceRoot":"","sources":["../../src/lib/charts/evaluate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evaluate.d.mts","sourceRoot":"","sources":["../../src/lib/charts/evaluate.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,WAAW,EAEhB,KAAK,SAAS,EACf,oBAAgB;AAEjB;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,GAAG,SAAS,CAMnE"}
|
package/lib/charts/evaluate.d.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type RuleContext, type RuleValue } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Resolve a rule to a value against `ctx`. Accepts a `{$rule}` placeholder or a
|
|
4
|
-
* bare
|
|
4
|
+
* bare node. A malformed or unknown node throws a `ChartRuleError` (never a
|
|
5
5
|
* native `TypeError`), so a caller reading an untrusted, deserialized rule can
|
|
6
6
|
* catch every failure with one type. When the rule is a colour placeholder, the
|
|
7
7
|
* result is checked to be a colour (`string | null`) — a rule that resolves to a
|
|
8
8
|
* number or boolean is a `RuleTypeError`, not something the renderer paints.
|
|
9
9
|
*
|
|
10
|
-
* Pure: the only inputs are the
|
|
11
|
-
*
|
|
12
|
-
* and identical across the renderer, the panel readout, and a test. A tree
|
|
13
|
-
* nested past `MAX_RULE_DEPTH` throws `RuleDepthError` rather than overflowing.
|
|
10
|
+
* Pure and non-recursive: the only inputs are the validated flat rule and the
|
|
11
|
+
* context. No clock, randomness, callbacks, or I/O.
|
|
14
12
|
*/
|
|
15
|
-
export declare function evaluate(rule:
|
|
13
|
+
export declare function evaluate(rule: unknown, ctx: RuleContext): RuleValue;
|
|
16
14
|
//# sourceMappingURL=evaluate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../src/lib/charts/evaluate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../src/lib/charts/evaluate.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,WAAW,EAEhB,KAAK,SAAS,EACf,mBAAgB;AAEjB;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,GAAG,SAAS,CAMnE"}
|
package/lib/charts/evaluate.js
CHANGED
|
@@ -1,54 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.evaluate = evaluate;
|
|
4
|
-
const builders_1 = require("./builders.js");
|
|
5
4
|
const errors_1 = require("./errors.js");
|
|
6
|
-
const
|
|
7
|
-
const types_1 = require("./types.js");
|
|
5
|
+
const schema_1 = require("./schema.js");
|
|
8
6
|
/**
|
|
9
7
|
* Resolve a rule to a value against `ctx`. Accepts a `{$rule}` placeholder or a
|
|
10
|
-
* bare
|
|
8
|
+
* bare node. A malformed or unknown node throws a `ChartRuleError` (never a
|
|
11
9
|
* native `TypeError`), so a caller reading an untrusted, deserialized rule can
|
|
12
10
|
* catch every failure with one type. When the rule is a colour placeholder, the
|
|
13
11
|
* result is checked to be a colour (`string | null`) — a rule that resolves to a
|
|
14
12
|
* number or boolean is a `RuleTypeError`, not something the renderer paints.
|
|
15
13
|
*
|
|
16
|
-
* Pure: the only inputs are the
|
|
17
|
-
*
|
|
18
|
-
* and identical across the renderer, the panel readout, and a test. A tree
|
|
19
|
-
* nested past `MAX_RULE_DEPTH` throws `RuleDepthError` rather than overflowing.
|
|
14
|
+
* Pure and non-recursive: the only inputs are the validated flat rule and the
|
|
15
|
+
* context. No clock, randomness, callbacks, or I/O.
|
|
20
16
|
*/
|
|
21
17
|
function evaluate(rule, ctx) {
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const parsedRule = (0, schema_1.parseChartRule)(rule);
|
|
19
|
+
if ('$rule' in parsedRule) {
|
|
20
|
+
return coerceForChannel(parsedRule.channel, visit(parsedRule.$rule, ctx));
|
|
24
21
|
}
|
|
25
|
-
return visit(
|
|
22
|
+
return visit(parsedRule, ctx);
|
|
26
23
|
}
|
|
27
|
-
function visit(node, ctx
|
|
28
|
-
if (depth > types_1.MAX_RULE_DEPTH) {
|
|
29
|
-
throw new errors_1.RuleDepthError(types_1.MAX_RULE_DEPTH);
|
|
30
|
-
}
|
|
31
|
-
(0, guards_1.assertRuleNode)(node);
|
|
32
|
-
const next = depth + 1;
|
|
24
|
+
function visit(node, ctx) {
|
|
33
25
|
switch (node.kind) {
|
|
34
26
|
case 'value':
|
|
35
27
|
return ctx.value;
|
|
36
28
|
case 'literal':
|
|
37
|
-
return
|
|
29
|
+
return node.value;
|
|
38
30
|
case 'equals':
|
|
39
|
-
return
|
|
31
|
+
return operand(node.left, ctx) === operand(node.right, ctx);
|
|
40
32
|
case 'isNot':
|
|
41
|
-
return
|
|
33
|
+
return operand(node.left, ctx) !== operand(node.right, ctx);
|
|
42
34
|
case 'lessThan':
|
|
43
|
-
return
|
|
35
|
+
return numericOperand(node.left, ctx) < numericOperand(node.right, ctx);
|
|
44
36
|
case 'greaterThan':
|
|
45
|
-
return
|
|
37
|
+
return numericOperand(node.left, ctx) > numericOperand(node.right, ctx);
|
|
46
38
|
case 'lessOrEqual':
|
|
47
|
-
return
|
|
39
|
+
return numericOperand(node.left, ctx) <= numericOperand(node.right, ctx);
|
|
48
40
|
case 'greaterOrEqual':
|
|
49
|
-
return
|
|
41
|
+
return numericOperand(node.left, ctx) >= numericOperand(node.right, ctx);
|
|
50
42
|
case 'ifElse':
|
|
51
|
-
return
|
|
43
|
+
return visit(node.cond, ctx) ? node.then.value : node.else.value;
|
|
52
44
|
default:
|
|
53
45
|
return unreachable(node);
|
|
54
46
|
}
|
|
@@ -56,17 +48,11 @@ function visit(node, ctx, depth) {
|
|
|
56
48
|
/* -------------------------------------------------------------------------- */
|
|
57
49
|
/* Coercions — narrow a RuleValue, or throw a typed error. */
|
|
58
50
|
/* -------------------------------------------------------------------------- */
|
|
59
|
-
function
|
|
60
|
-
|
|
61
|
-
return value;
|
|
62
|
-
}
|
|
63
|
-
throw new errors_1.RuleTypeError(`expected a number, got ${typeName(value)}`);
|
|
51
|
+
function operand(node, ctx) {
|
|
52
|
+
return node.kind === 'value' ? ctx.value : node.value;
|
|
64
53
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
return value;
|
|
68
|
-
}
|
|
69
|
-
throw new errors_1.RuleTypeError(`expected a boolean, got ${typeName(value)}`);
|
|
54
|
+
function numericOperand(node, ctx) {
|
|
55
|
+
return node.kind === 'value' ? ctx.value : node.value;
|
|
70
56
|
}
|
|
71
57
|
/** A colour channel must resolve to a colour string, or null for "no override". */
|
|
72
58
|
function asColor(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.js","sourceRoot":"","sources":["../../src/lib/charts/evaluate.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"evaluate.js","sourceRoot":"","sources":["../../src/lib/charts/evaluate.ts"],"names":[],"mappings":";;AAsBA,4BAMC;AA5BD,wCAA+E;AAC/E,wCAA0C;AAU1C;;;;;;;;;;GAUG;AACH,SAAgB,QAAQ,CAAC,IAAa,EAAE,GAAgB;IACtD,MAAM,UAAU,GAAG,IAAA,uBAAc,EAAC,IAAI,CAAC,CAAC;IACxC,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;QAC1B,OAAO,gBAAgB,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,KAAK,CAAC,IAAc,EAAE,GAAgB;IAC7C,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,OAAO;YACV,OAAO,GAAG,CAAC,KAAK,CAAC;QACnB,KAAK,SAAS;YACZ,OAAO,IAAI,CAAC,KAAK,CAAC;QAEpB,KAAK,QAAQ;YACX,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9D,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9D,KAAK,UAAU;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gB;IAC/B,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,IAAI,sBAAa,CAAC,8DAA8D,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC3G,CAAC;AAED;;;;;;GAMG;AACH,SAAS,gBAAgB,CAAC,OAAoB,EAAE,KAAgB;IAC9D,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;QACxB;YACE,MAAM,IAAI,2BAAkB,CAAC,kDAAkD,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtG,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,KAAgB;IAChC,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC;AAChD,CAAC;AAED,SAAS,WAAW,CAAC,IAAW;IAC9B,MAAM,IAAI,yBAAgB,CAAE,IAA0B,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC"}
|
package/lib/charts/evaluate.mjs
CHANGED
|
@@ -1,51 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { assertRuleNode, literalValue } from "./guards.mjs";
|
|
4
|
-
import { MAX_RULE_DEPTH, } from "./types.mjs";
|
|
1
|
+
import { MalformedRuleError, RuleTypeError, UnknownNodeError } from "./errors.mjs";
|
|
2
|
+
import { parseChartRule } from "./schema.mjs";
|
|
5
3
|
/**
|
|
6
4
|
* Resolve a rule to a value against `ctx`. Accepts a `{$rule}` placeholder or a
|
|
7
|
-
* bare
|
|
5
|
+
* bare node. A malformed or unknown node throws a `ChartRuleError` (never a
|
|
8
6
|
* native `TypeError`), so a caller reading an untrusted, deserialized rule can
|
|
9
7
|
* catch every failure with one type. When the rule is a colour placeholder, the
|
|
10
8
|
* result is checked to be a colour (`string | null`) — a rule that resolves to a
|
|
11
9
|
* number or boolean is a `RuleTypeError`, not something the renderer paints.
|
|
12
10
|
*
|
|
13
|
-
* Pure: the only inputs are the
|
|
14
|
-
*
|
|
15
|
-
* and identical across the renderer, the panel readout, and a test. A tree
|
|
16
|
-
* nested past `MAX_RULE_DEPTH` throws `RuleDepthError` rather than overflowing.
|
|
11
|
+
* Pure and non-recursive: the only inputs are the validated flat rule and the
|
|
12
|
+
* context. No clock, randomness, callbacks, or I/O.
|
|
17
13
|
*/
|
|
18
14
|
export function evaluate(rule, ctx) {
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const parsedRule = parseChartRule(rule);
|
|
16
|
+
if ('$rule' in parsedRule) {
|
|
17
|
+
return coerceForChannel(parsedRule.channel, visit(parsedRule.$rule, ctx));
|
|
21
18
|
}
|
|
22
|
-
return visit(
|
|
19
|
+
return visit(parsedRule, ctx);
|
|
23
20
|
}
|
|
24
|
-
function visit(node, ctx
|
|
25
|
-
if (depth > MAX_RULE_DEPTH) {
|
|
26
|
-
throw new RuleDepthError(MAX_RULE_DEPTH);
|
|
27
|
-
}
|
|
28
|
-
assertRuleNode(node);
|
|
29
|
-
const next = depth + 1;
|
|
21
|
+
function visit(node, ctx) {
|
|
30
22
|
switch (node.kind) {
|
|
31
23
|
case 'value':
|
|
32
24
|
return ctx.value;
|
|
33
25
|
case 'literal':
|
|
34
|
-
return
|
|
26
|
+
return node.value;
|
|
35
27
|
case 'equals':
|
|
36
|
-
return
|
|
28
|
+
return operand(node.left, ctx) === operand(node.right, ctx);
|
|
37
29
|
case 'isNot':
|
|
38
|
-
return
|
|
30
|
+
return operand(node.left, ctx) !== operand(node.right, ctx);
|
|
39
31
|
case 'lessThan':
|
|
40
|
-
return
|
|
32
|
+
return numericOperand(node.left, ctx) < numericOperand(node.right, ctx);
|
|
41
33
|
case 'greaterThan':
|
|
42
|
-
return
|
|
34
|
+
return numericOperand(node.left, ctx) > numericOperand(node.right, ctx);
|
|
43
35
|
case 'lessOrEqual':
|
|
44
|
-
return
|
|
36
|
+
return numericOperand(node.left, ctx) <= numericOperand(node.right, ctx);
|
|
45
37
|
case 'greaterOrEqual':
|
|
46
|
-
return
|
|
38
|
+
return numericOperand(node.left, ctx) >= numericOperand(node.right, ctx);
|
|
47
39
|
case 'ifElse':
|
|
48
|
-
return
|
|
40
|
+
return visit(node.cond, ctx) ? node.then.value : node.else.value;
|
|
49
41
|
default:
|
|
50
42
|
return unreachable(node);
|
|
51
43
|
}
|
|
@@ -53,17 +45,11 @@ function visit(node, ctx, depth) {
|
|
|
53
45
|
/* -------------------------------------------------------------------------- */
|
|
54
46
|
/* Coercions — narrow a RuleValue, or throw a typed error. */
|
|
55
47
|
/* -------------------------------------------------------------------------- */
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
return value;
|
|
59
|
-
}
|
|
60
|
-
throw new RuleTypeError(`expected a number, got ${typeName(value)}`);
|
|
48
|
+
function operand(node, ctx) {
|
|
49
|
+
return node.kind === 'value' ? ctx.value : node.value;
|
|
61
50
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
64
|
-
return value;
|
|
65
|
-
}
|
|
66
|
-
throw new RuleTypeError(`expected a boolean, got ${typeName(value)}`);
|
|
51
|
+
function numericOperand(node, ctx) {
|
|
52
|
+
return node.kind === 'value' ? ctx.value : node.value;
|
|
67
53
|
}
|
|
68
54
|
/** A colour channel must resolve to a colour string, or null for "no override". */
|
|
69
55
|
function asColor(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.mjs","sourceRoot":"","sources":["../../src/lib/charts/evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"evaluate.mjs","sourceRoot":"","sources":["../../src/lib/charts/evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,qBAAiB;AAC/E,OAAO,EAAE,cAAc,EAAE,qBAAiB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