Skip to content

Commit 3bef959

Browse files
committed
0.0.34
1 parent f7fe557 commit 3bef959

File tree

3 files changed

+43
-43
lines changed

3 files changed

+43
-43
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"mathjs"
1717
],
1818
"author": "[email protected]",
19-
"version": "0.0.33",
19+
"version": "0.0.34",
2020
"main": "dist/src/index.js",
2121
"module": "dist/src/index.js",
2222
"exports": {

src/ExpressionVisualizerWebComponent.ts

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ const themeMap = new Map([
1515
[
1616
'light',
1717
{
18-
expressionVisualizerStyle: 'background-color: #fff;'
19-
}
18+
expressionVisualizerStyle: 'background-color: #fff;',
19+
},
2020
],
2121
[
2222
'dark',
2323
{
24-
expressionVisualizerStyle: 'background-color: #000;'
25-
}
26-
]
24+
expressionVisualizerStyle: 'background-color: #000;',
25+
},
26+
],
2727
]);
2828

2929
const operatorMap = new Map([
@@ -42,7 +42,7 @@ const operatorMap = new Map([
4242
['and', 'and'],
4343
['or', 'or'],
4444
['xor', 'xor'],
45-
['not', 'not']
45+
['not', 'not'],
4646
]);
4747

4848
const funcMap = new Map([['equalText', true]]);
@@ -272,7 +272,7 @@ export class ExpressionVisualizerWebComponent extends LitElement {
272272
{ name: 'and' },
273273
{ name: 'or' },
274274
{ name: 'xor' },
275-
{ name: 'not' }
275+
{ name: 'not' },
276276
];
277277

278278
@property({ type: Array }) funcs: {
@@ -316,13 +316,13 @@ export class ExpressionVisualizerWebComponent extends LitElement {
316316
const detail = {
317317
expression: this._expression,
318318
result: this._result,
319-
errMsg: this._errMsg
319+
errMsg: this._errMsg,
320320
};
321321
const event = new CustomEvent('expression-changed', {
322322
detail,
323323
bubbles: true,
324324
composed: true,
325-
cancelable: true
325+
cancelable: true,
326326
});
327327
this.dispatchEvent(event);
328328
}
@@ -461,19 +461,19 @@ export class ExpressionVisualizerWebComponent extends LitElement {
461461
this.constantList.push(value);
462462
const event = new CustomEvent('variableList-changed', {
463463
detail: {
464-
constantList: this.constantList
464+
constantList: this.constantList,
465465
},
466466
bubbles: true,
467467
composed: true,
468-
cancelable: true
468+
cancelable: true,
469469
});
470470
this.dispatchEvent(event);
471471
}
472472

473473
const block = {
474474
type: 'ConstantNode',
475475
value,
476-
uuid: uuidv4()
476+
uuid: uuidv4(),
477477
};
478478

479479
this._blocks = [block, ...this._blocks];
@@ -507,7 +507,7 @@ export class ExpressionVisualizerWebComponent extends LitElement {
507507
const block = {
508508
type: 'ConstantNode',
509509
value,
510-
uuid: uuidv4()
510+
uuid: uuidv4(),
511511
};
512512

513513
this._blocks = [block, ...this._blocks];
@@ -541,10 +541,10 @@ export class ExpressionVisualizerWebComponent extends LitElement {
541541
uuid: uuidv4(),
542542
isUnknown: true,
543543
path: 'args[0]',
544-
index: 0
545-
}
544+
index: 0,
545+
},
546546
],
547-
type: 'OperatorNode'
547+
type: 'OperatorNode',
548548
};
549549
} else {
550550
block = {
@@ -560,18 +560,18 @@ export class ExpressionVisualizerWebComponent extends LitElement {
560560
uuid: uuidv4(),
561561
isUnknown: true,
562562
path: 'args[0]',
563-
index: 0
563+
index: 0,
564564
},
565565
{
566566
type: 'ConstantNode',
567567
value: 'U',
568568
uuid: uuidv4(),
569569
isUnknown: true,
570570
path: 'args[1]',
571-
index: 1
572-
}
571+
index: 1,
572+
},
573573
],
574-
type: 'OperatorNode'
574+
type: 'OperatorNode',
575575
};
576576
}
577577

@@ -590,7 +590,7 @@ export class ExpressionVisualizerWebComponent extends LitElement {
590590
implicit: false,
591591
isPercentage: false,
592592
fn: {
593-
name
593+
name,
594594
},
595595
args: [
596596
{
@@ -599,18 +599,18 @@ export class ExpressionVisualizerWebComponent extends LitElement {
599599
uuid: uuidv4(),
600600
isUnknown: true,
601601
path: 'args[0]',
602-
index: 0
602+
index: 0,
603603
},
604604
{
605605
type: 'ConstantNode',
606606
value: 'U',
607607
uuid: uuidv4(),
608608
isUnknown: true,
609609
path: 'args[1]',
610-
index: 1
611-
}
610+
index: 1,
611+
},
612612
],
613-
type: 'FunctionNode'
613+
type: 'FunctionNode',
614614
};
615615

616616
this._blocks = [block, ...this._blocks];
@@ -626,7 +626,7 @@ export class ExpressionVisualizerWebComponent extends LitElement {
626626
const block = {
627627
type: 'SymbolNode',
628628
name,
629-
uuid: uuidv4()
629+
uuid: uuidv4(),
630630
};
631631

632632
this._blocks = [block, ...this._blocks];
@@ -649,23 +649,23 @@ export class ExpressionVisualizerWebComponent extends LitElement {
649649
uuid: uuidv4(),
650650
path: 'args[0]',
651651
index: 0,
652-
name: variable.name
652+
name: variable.name,
653653
},
654654
{
655655
type: 'ConstantNode',
656656
value: variable.test,
657657
uuid: uuidv4(),
658658
path: 'args[1]',
659-
index: 1
660-
}
659+
index: 1,
660+
},
661661
],
662662
fn: {
663-
name: variable.isFn
663+
name: variable.isFn,
664664
},
665665
implicit: false,
666666
isPercentage: false,
667667
type: 'FunctionNode',
668-
uuid: uuidv4()
668+
uuid: uuidv4(),
669669
};
670670
} else {
671671
block = {
@@ -680,17 +680,17 @@ export class ExpressionVisualizerWebComponent extends LitElement {
680680
uuid: uuidv4(),
681681
path: 'args[0]',
682682
index: 0,
683-
name: variable.name
683+
name: variable.name,
684684
},
685685
{
686686
type: 'ConstantNode',
687687
value: variable.test,
688688
uuid: uuidv4(),
689689
path: 'args[1]',
690-
index: 1
691-
}
690+
index: 1,
691+
},
692692
],
693-
type: 'OperatorNode'
693+
type: 'OperatorNode',
694694
};
695695
}
696696

@@ -732,7 +732,7 @@ export class ExpressionVisualizerWebComponent extends LitElement {
732732
uuid: uuidv4(),
733733
isUnknown: true,
734734
path,
735-
index
735+
index,
736736
});
737737
this._blocks = blocks;
738738
} else {
@@ -767,7 +767,7 @@ export class ExpressionVisualizerWebComponent extends LitElement {
767767
uuid: uuidv4(),
768768
isUnknown: true,
769769
path: node!.path,
770-
index: node!.index!
770+
index: node!.index!,
771771
});
772772

773773
// e.target 一定是class="expression-visualizer" 的 div
@@ -813,7 +813,7 @@ export class ExpressionVisualizerWebComponent extends LitElement {
813813
detail,
814814
bubbles: true,
815815
composed: true,
816-
cancelable: true
816+
cancelable: true,
817817
});
818818
this.dispatchEvent(event);
819819
});
@@ -877,11 +877,11 @@ export class ExpressionVisualizerWebComponent extends LitElement {
877877
}
878878
const event = new CustomEvent('variableList-changed', {
879879
detail: {
880-
constantList: this.constantList
880+
constantList: this.constantList,
881881
},
882882
bubbles: true,
883883
composed: true,
884-
cancelable: true
884+
cancelable: true,
885885
});
886886
this.dispatchEvent(event);
887887
}

0 commit comments

Comments
 (0)