Create new
Bindings
Transitions
Animations
Easing
Component composition
Context API
Special elements
Module context
Debugging
Miscellaneous
App.svelte
Cell.js
Config.js
DFS.js
Stack.js
runes
This component is not in runes mode.
To enable runes mode, either start using runes in your code, or add the following to the top of your component:
<svelte:options runes />
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
⌄
<script>
import { fade } from "svelte/transition";
import { onMount } from "svelte";
import { writable } from "svelte/store";
import DFS from "./DFS.js";
import Cell from "./Cell.js";
import Config from "./Config.js"
const dataPoints = writable([]);
const initialNode = new Cell(50, 50);
dataPoints.update((visited) => (visited = [...visited, initialNode]));
onMount(async () => {
await DFS({ root: initialNode }, dataPoints);
});
</script>
<svg width={Config.mapWidth} height={Config.mapHeight}>
{#each $dataPoints as datapoint, index}
<rect
transition:fade={{ delay: index * 70 }}
x={datapoint.x}
y={datapoint.y}
width={Config.step}
height={Config.step}
/>
{/each}
<rect
x={Config.minPosition}
y={Config.minPosition}
style="fill:purple;"
width={Config.step}
height={Config.step}
bundling https://unpkg.com/clsx@2.1.1/dist/clsx.mjs
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
⌄
import 'svelte/internal/disclose-version';
import 'svelte/internal/flags/legacy';
import * as $ from 'svelte/internal/client';
import { fade } from "svelte/transition";
import { onMount } from "svelte";
import { writable } from "svelte/store";
import DFS from "./DFS.js";
import Cell from "./Cell.js";
import Config from "./Config.js";
var root_1 = $.ns_template(`<rect class="svelte-1meflgw"></rect>`);
var root = $.ns_template(`<svg class="svelte-1meflgw"><!><rect style="fill:purple;" class="svelte-1meflgw"></rect><rect style="fill:purple;" class="svelte-1meflgw"></rect></svg>`);
export default function App($$anchor, $$props) {
$.push($$props, false);
const [$$stores, $$cleanup] = $.setup_stores();
const $dataPoints = () => $.store_get(dataPoints, '$dataPoints', $$stores);
const dataPoints = writable([]);
const initialNode = new Cell(50, 50);
dataPoints.update((visited) => visited = [...visited, initialNode]);
onMount(async () => {
await DFS({ root: initialNode }, dataPoints);
});
$.init();
var svg = root();
var node = $.child(svg);
$.each(node, 1, $dataPoints, $.index, ($$anchor, datapoint, index) => {
var rect = root_1();
$.template_effect(() => {
result = svelte.compile(source, {
generate: ,
});9
1
2
3
4
5
6
7
8
›
svg.svelte-1meflgw {
background-color: whitesmoke;
}
rect.svelte-1meflgw {
fill: lightblue;
}
Root {
css: StyleSheet {...}
- type: "StyleSheet"
- start: 975
- end: 1063
- attributes: []
children: [...] (2)
Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 984
- end: 987
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 984
- end: 987
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "svg"
- start: 984
- end: 987
}
]- start: 984
- end: 987
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 988
- end: 1024
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 992
- end: 1020
- property: "background-color"
- value: "whitesmoke"
}
]
}- start: 984
- end: 1024
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1026
- end: 1030
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1026
- end: 1030
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "rect"
- start: 1026
- end: 1030
}
]- start: 1026
- end: 1030
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1031
- end: 1054
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 1035
- end: 1050
- property: "fill"
- value: "lightblue"
}
]
}- start: 1026
- end: 1054
}
]content: {...}
- start: 982
- end: 1055
- styles: "\n\tsvg {\n\t\tbackground-color: whitesmoke;\n\t}\n\trect {\n\t\tfill: lightblue;\n\t}\n"
- comment: null
}
}- js: []
- start: 461
- end: 973
- type: "Root"
fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 459
- end: 461
- raw: "\n\n"
- data: "\n\n"
} RegularElement {...}
- type: "RegularElement"
- start: 461
- end: 973
- name: "svg"
attributes: [...] (3)
Attribute {...}
- type: "Attribute"
- start: 466
- end: 489
- name: "width"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 472
- end: 489
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 473
- end: 488
loc: {...}
start: {...}
- line: 20
- column: 12
}end: {...}
- line: 20
- column: 27
}
}object: Identifier {...}
- type: "Identifier"
- start: 473
- end: 479
loc: {...}
start: {...}
- line: 20
- column: 12
}end: {...}
- line: 20
- column: 18
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 480
- end: 488
loc: {...}
start: {...}
- line: 20
- column: 19
}end: {...}
- line: 20
- column: 27
}
}- name: "mapWidth"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 490
- end: 515
- name: "height"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 497
- end: 515
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 498
- end: 514
loc: {...}
start: {...}
- line: 20
- column: 37
}end: {...}
- line: 20
- column: 53
}
}object: Identifier {...}
- type: "Identifier"
- start: 498
- end: 504
loc: {...}
start: {...}
- line: 20
- column: 37
}end: {...}
- line: 20
- column: 43
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 505
- end: 514
loc: {...}
start: {...}
- line: 20
- column: 44
}end: {...}
- line: 20
- column: 53
}
}- name: "mapHeight"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: ""
- raw: ""
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (7)
Text {...}
- type: "Text"
- start: 516
- end: 519
- raw: "\n\n\t"
- data: "\n\n\t"
} EachBlock {...}
- type: "EachBlock"
- start: 519
- end: 708
expression: Identifier {...}
- type: "Identifier"
- start: 526
- end: 537
loc: {...}
start: {...}
- line: 22
- column: 8
}end: {...}
- line: 22
- column: 19
}
}- name: "$dataPoints"
}body: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 558
- end: 561
- raw: "\n\t\t"
- data: "\n\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 561
- end: 699
- name: "rect"
attributes: [...] (6)
TransitionDirective {...}
- start: 570
- end: 609
- type: "TransitionDirective"
- name: "fade"
expression: ObjectExpression {...}
- type: "ObjectExpression"
- start: 587
- end: 608
loc: {...}
start: {...}
- line: 24
- column: 20
}end: {...}
- line: 24
- column: 41
}
}properties: [...] (1)
Property {...}
- type: "Property"
- start: 589
- end: 606
loc: {...}
start: {...}
- line: 24
- column: 22
}end: {...}
- line: 24
- column: 39
}
}- method: false
- shorthand: false
- computed: false
key: Identifier {...}
- type: "Identifier"
- start: 589
- end: 594
loc: {...}
start: {...}
- line: 24
- column: 22
}end: {...}
- line: 24
- column: 27
}
}- name: "delay"
}value: BinaryExpression {...}
- type: "BinaryExpression"
- start: 596
- end: 606
loc: {...}
start: {...}
- line: 24
- column: 29
}end: {...}
- line: 24
- column: 39
}
}left: Identifier {...}
- type: "Identifier"
- start: 596
- end: 601
loc: {...}
start: {...}
- line: 24
- column: 29
}end: {...}
- line: 24
- column: 34
}
}- name: "index"
}- operator: "*"
right: Literal {...}
- type: "Literal"
- start: 604
- end: 606
loc: {...}
start: {...}
- line: 24
- column: 37
}end: {...}
- line: 24
- column: 39
}
}- value: 70
- raw: "70"
}
}- kind: "init"
}
]
}- modifiers: []
- intro: true
- outro: true
} Attribute {...}
- type: "Attribute"
- start: 613
- end: 628
- name: "x"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 615
- end: 628
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 616
- end: 627
loc: {...}
start: {...}
- line: 25
- column: 6
}end: {...}
- line: 25
- column: 17
}
}object: Identifier {...}
- type: "Identifier"
- start: 616
- end: 625
loc: {...}
start: {...}
- line: 25
- column: 6
}end: {...}
- line: 25
- column: 15
}
}- name: "datapoint"
}property: Identifier {...}
- type: "Identifier"
- start: 626
- end: 627
loc: {...}
start: {...}
- line: 25
- column: 16
}end: {...}
- line: 25
- column: 17
}
}- name: "x"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 632
- end: 647
- name: "y"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 634
- end: 647
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 635
- end: 646
loc: {...}
start: {...}
- line: 26
- column: 6
}end: {...}
- line: 26
- column: 17
}
}object: Identifier {...}
- type: "Identifier"
- start: 635
- end: 644
loc: {...}
start: {...}
- line: 26
- column: 6
}end: {...}
- line: 26
- column: 15
}
}- name: "datapoint"
}property: Identifier {...}
- type: "Identifier"
- start: 645
- end: 646
loc: {...}
start: {...}
- line: 26
- column: 16
}end: {...}
- line: 26
- column: 17
}
}- name: "y"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 651
- end: 670
- name: "width"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 657
- end: 670
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 658
- end: 669
loc: {...}
start: {...}
- line: 27
- column: 10
}end: {...}
- line: 27
- column: 21
}
}object: Identifier {...}
- type: "Identifier"
- start: 658
- end: 664
loc: {...}
start: {...}
- line: 27
- column: 10
}end: {...}
- line: 27
- column: 16
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 665
- end: 669
loc: {...}
start: {...}
- line: 27
- column: 17
}end: {...}
- line: 27
- column: 21
}
}- name: "step"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 674
- end: 694
- name: "height"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 681
- end: 694
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 682
- end: 693
loc: {...}
start: {...}
- line: 28
- column: 11
}end: {...}
- line: 28
- column: 22
}
}object: Identifier {...}
- type: "Identifier"
- start: 682
- end: 688
loc: {...}
start: {...}
- line: 28
- column: 11
}end: {...}
- line: 28
- column: 17
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 689
- end: 693
loc: {...}
start: {...}
- line: 28
- column: 18
}end: {...}
- line: 28
- column: 22
}
}- name: "step"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: ""
- raw: ""
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 699
- end: 701
- raw: "\n\t"
- data: "\n\t"
}
]
}context: Identifier {...}
- type: "Identifier"
- name: "datapoint"
- start: 541
loc: {...}
start: {...}
- line: 22
- column: 23
- character: 541
}end: {...}
- line: 22
- column: 32
- character: 550
}
}- end: 550
- typeAnnotation: undefined
}- index: "index"
- key: undefined
} Text {...}
- type: "Text"
- start: 708
- end: 710
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 710
- end: 837
- name: "rect"
attributes: [...] (6)
Attribute {...}
- type: "Attribute"
- start: 718
- end: 740
- name: "x"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 720
- end: 740
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 721
- end: 739
loc: {...}
start: {...}
- line: 32
- column: 5
}end: {...}
- line: 32
- column: 23
}
}object: Identifier {...}
- type: "Identifier"
- start: 721
- end: 727
loc: {...}
start: {...}
- line: 32
- column: 5
}end: {...}
- line: 32
- column: 11
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 728
- end: 739
loc: {...}
start: {...}
- line: 32
- column: 12
}end: {...}
- line: 32
- column: 23
}
}- name: "minPosition"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 743
- end: 765
- name: "y"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 745
- end: 765
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 746
- end: 764
loc: {...}
start: {...}
- line: 33
- column: 5
}end: {...}
- line: 33
- column: 23
}
}object: Identifier {...}
- type: "Identifier"
- start: 746
- end: 752
loc: {...}
start: {...}
- line: 33
- column: 5
}end: {...}
- line: 33
- column: 11
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 753
- end: 764
loc: {...}
start: {...}
- line: 33
- column: 12
}end: {...}
- line: 33
- column: 23
}
}- name: "minPosition"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 768
- end: 788
- name: "style"
value: [...] (1)
Text {...}
- start: 775
- end: 787
- type: "Text"
- raw: "fill:purple;"
- data: "fill:purple;"
}
]
} Attribute {...}
- type: "Attribute"
- start: 791
- end: 810
- name: "width"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 797
- end: 810
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 798
- end: 809
loc: {...}
start: {...}
- line: 35
- column: 9
}end: {...}
- line: 35
- column: 20
}
}object: Identifier {...}
- type: "Identifier"
- start: 798
- end: 804
loc: {...}
start: {...}
- line: 35
- column: 9
}end: {...}
- line: 35
- column: 15
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 805
- end: 809
loc: {...}
start: {...}
- line: 35
- column: 16
}end: {...}
- line: 35
- column: 20
}
}- name: "step"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 813
- end: 833
- name: "height"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 820
- end: 833
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 821
- end: 832
loc: {...}
start: {...}
- line: 36
- column: 10
}end: {...}
- line: 36
- column: 21
}
}object: Identifier {...}
- type: "Identifier"
- start: 821
- end: 827
loc: {...}
start: {...}
- line: 36
- column: 10
}end: {...}
- line: 36
- column: 16
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 828
- end: 832
loc: {...}
start: {...}
- line: 36
- column: 17
}end: {...}
- line: 36
- column: 21
}
}- name: "step"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: ""
- raw: ""
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 837
- end: 839
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 839
- end: 966
- name: "rect"
attributes: [...] (6)
Attribute {...}
- type: "Attribute"
- start: 847
- end: 869
- name: "x"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 849
- end: 869
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 850
- end: 868
loc: {...}
start: {...}
- line: 39
- column: 5
}end: {...}
- line: 39
- column: 23
}
}object: Identifier {...}
- type: "Identifier"
- start: 850
- end: 856
loc: {...}
start: {...}
- line: 39
- column: 5
}end: {...}
- line: 39
- column: 11
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 857
- end: 868
loc: {...}
start: {...}
- line: 39
- column: 12
}end: {...}
- line: 39
- column: 23
}
}- name: "maxPosition"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 872
- end: 894
- name: "y"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 874
- end: 894
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 875
- end: 893
loc: {...}
start: {...}
- line: 40
- column: 5
}end: {...}
- line: 40
- column: 23
}
}object: Identifier {...}
- type: "Identifier"
- start: 875
- end: 881
loc: {...}
start: {...}
- line: 40
- column: 5
}end: {...}
- line: 40
- column: 11
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 882
- end: 893
loc: {...}
start: {...}
- line: 40
- column: 12
}end: {...}
- line: 40
- column: 23
}
}- name: "maxPosition"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 897
- end: 917
- name: "style"
value: [...] (1)
Text {...}
- start: 904
- end: 916
- type: "Text"
- raw: "fill:purple;"
- data: "fill:purple;"
}
]
} Attribute {...}
- type: "Attribute"
- start: 920
- end: 939
- name: "width"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 926
- end: 939
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 927
- end: 938
loc: {...}
start: {...}
- line: 42
- column: 9
}end: {...}
- line: 42
- column: 20
}
}object: Identifier {...}
- type: "Identifier"
- start: 927
- end: 933
loc: {...}
start: {...}
- line: 42
- column: 9
}end: {...}
- line: 42
- column: 15
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 934
- end: 938
loc: {...}
start: {...}
- line: 42
- column: 16
}end: {...}
- line: 42
- column: 20
}
}- name: "step"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 942
- end: 962
- name: "height"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 949
- end: 962
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 950
- end: 961
loc: {...}
start: {...}
- line: 43
- column: 10
}end: {...}
- line: 43
- column: 21
}
}object: Identifier {...}
- type: "Identifier"
- start: 950
- end: 956
loc: {...}
start: {...}
- line: 43
- column: 10
}end: {...}
- line: 43
- column: 16
}
}- name: "Config"
}property: Identifier {...}
- type: "Identifier"
- start: 957
- end: 961
loc: {...}
start: {...}
- line: 43
- column: 17
}end: {...}
- line: 43
- column: 21
}
}- name: "step"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: ""
- raw: ""
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 966
- end: 967
- raw: "\n"
- data: "\n"
}
]
}
} Text {...}
- type: "Text"
- start: 973
- end: 975
- raw: "\n\n"
- data: "\n\n"
}
]
}- options: null
instance: Script {...}
- type: "Script"
- start: 0
- end: 459
- context: "default"
content: Program {...}
- type: "Program"
- start: 8
- end: 450
loc: {...}
start: {...}
- line: 1
- column: 0
}end: {...}
- line: 18
- column: 0
}
}body: [...] (10)
ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 10
- end: 51
loc: {...}
start: {...}
- line: 2
- column: 1
}end: {...}
- line: 2
- column: 42
}
}specifiers: [...] (1)
ImportSpecifier {...}
- type: "ImportSpecifier"
- start: 19
- end: 23
loc: {...}
start: {...}
- line: 2
- column: 10
}end: {...}
- line: 2
- column: 14
}
}imported: Identifier {...}
- type: "Identifier"
- start: 19
- end: 23
loc: {...}
start: {...}
- line: 2
- column: 10
}end: {...}
- line: 2
- column: 14
}
}- name: "fade"
}local: Identifier {...}
- type: "Identifier"
- start: 19
- end: 23
loc: {...}
start: {...}
- line: 2
- column: 10
}end: {...}
- line: 2
- column: 14
}
}- name: "fade"
}
}
]source: Literal {...}
- type: "Literal"
- start: 31
- end: 50
loc: {...}
start: {...}
- line: 2
- column: 22
}end: {...}
- line: 2
- column: 41
}
}- value: "svelte/transition"
- raw: "\"svelte/transition\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 53
- end: 86
loc: {...}
start: {...}
- line: 3
- column: 1
}end: {...}
- line: 3
- column: 34
}
}specifiers: [...] (1)
ImportSpecifier {...}
- type: "ImportSpecifier"
- start: 62
- end: 69
loc: {...}
start: {...}
- line: 3
- column: 10
}end: {...}
- line: 3
- column: 17
}
}imported: Identifier {...}
- type: "Identifier"
- start: 62
- end: 69
loc: {...}
start: {...}
- line: 3
- column: 10
}end: {...}
- line: 3
- column: 17
}
}- name: "onMount"
}local: Identifier {...}
- type: "Identifier"
- start: 62
- end: 69
loc: {...}
start: {...}
- line: 3
- column: 10
}end: {...}
- line: 3
- column: 17
}
}- name: "onMount"
}
}
]source: Literal {...}
- type: "Literal"
- start: 77
- end: 85
loc: {...}
start: {...}
- line: 3
- column: 25
}end: {...}
- line: 3
- column: 33
}
}- value: "svelte"
- raw: "\"svelte\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 88
- end: 128
loc: {...}
start: {...}
- line: 4
- column: 1
}end: {...}
- line: 4
- column: 41
}
}specifiers: [...] (1)
ImportSpecifier {...}
- type: "ImportSpecifier"
- start: 97
- end: 105
loc: {...}
start: {...}
- line: 4
- column: 10
}end: {...}
- line: 4
- column: 18
}
}imported: Identifier {...}
- type: "Identifier"
- start: 97
- end: 105
loc: {...}
start: {...}
- line: 4
- column: 10
}end: {...}
- line: 4
- column: 18
}
}- name: "writable"
}local: Identifier {...}
- type: "Identifier"
- start: 97
- end: 105
loc: {...}
start: {...}
- line: 4
- column: 10
}end: {...}
- line: 4
- column: 18
}
}- name: "writable"
}
}
]source: Literal {...}
- type: "Literal"
- start: 113
- end: 127
loc: {...}
start: {...}
- line: 4
- column: 26
}end: {...}
- line: 4
- column: 40
}
}- value: "svelte/store"
- raw: "\"svelte/store\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 132
- end: 159
loc: {...}
start: {...}
- line: 6
- column: 1
}end: {...}
- line: 6
- column: 28
}
}specifiers: [...] (1)
ImportDefaultSpecifier {...}
- type: "ImportDefaultSpecifier"
- start: 139
- end: 142
loc: {...}
start: {...}
- line: 6
- column: 8
}end: {...}
- line: 6
- column: 11
}
}local: Identifier {...}
- type: "Identifier"
- start: 139
- end: 142
loc: {...}
start: {...}
- line: 6
- column: 8
}end: {...}
- line: 6
- column: 11
}
}- name: "DFS"
}
}
]source: Literal {...}
- type: "Literal"
- start: 148
- end: 158
loc: {...}
start: {...}
- line: 6
- column: 17
}end: {...}
- line: 6
- column: 27
}
}- value: "./DFS.js"
- raw: "\"./DFS.js\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 161
- end: 190
loc: {...}
start: {...}
- line: 7
- column: 1
}end: {...}
- line: 7
- column: 30
}
}specifiers: [...] (1)
ImportDefaultSpecifier {...}
- type: "ImportDefaultSpecifier"
- start: 168
- end: 172
loc: {...}
start: {...}
- line: 7
- column: 8
}end: {...}
- line: 7
- column: 12
}
}local: Identifier {...}
- type: "Identifier"
- start: 168
- end: 172
loc: {...}
start: {...}
- line: 7
- column: 8
}end: {...}
- line: 7
- column: 12
}
}- name: "Cell"
}
}
]source: Literal {...}
- type: "Literal"
- start: 178
- end: 189
loc: {...}
start: {...}
- line: 7
- column: 18
}end: {...}
- line: 7
- column: 29
}
}- value: "./Cell.js"
- raw: "\"./Cell.js\""
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 192
- end: 224
loc: {...}
start: {...}
- line: 8
- column: 1
}end: {...}
- line: 8
- column: 33
}
}specifiers: [...] (1)
ImportDefaultSpecifier {...}
- type: "ImportDefaultSpecifier"
- start: 199
- end: 205
loc: {...}
start: {...}
- line: 8
- column: 8
}end: {...}
- line: 8
- column: 14
}
}local: Identifier {...}
- type: "Identifier"
- start: 199
- end: 205
loc: {...}
start: {...}
- line: 8
- column: 8
}end: {...}
- line: 8
- column: 14
}
}- name: "Config"
}
}
]source: Literal {...}
- type: "Literal"
- start: 211
- end: 224
loc: {...}
start: {...}
- line: 8
- column: 20
}end: {...}
- line: 8
- column: 33
}
}- value: "./Config.js"
- raw: "\"./Config.js\""
}
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 227
- end: 259
loc: {...}
start: {...}
- line: 10
- column: 1
}end: {...}
- line: 10
- column: 33
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 233
- end: 258
loc: {...}
start: {...}
- line: 10
- column: 7
}end: {...}
- line: 10
- column: 32
}
}id: Identifier {...}
- type: "Identifier"
- start: 233
- end: 243
loc: {...}
start: {...}
- line: 10
- column: 7
}end: {...}
- line: 10
- column: 17
}
}- name: "dataPoints"
}init: CallExpression {...}
- type: "CallExpression"
- start: 246
- end: 258
loc: {...}
start: {...}
- line: 10
- column: 20
}end: {...}
- line: 10
- column: 32
}
}callee: Identifier {...}
- type: "Identifier"
- start: 246
- end: 254
loc: {...}
start: {...}
- line: 10
- column: 20
}end: {...}
- line: 10
- column: 28
}
}- name: "writable"
}arguments: [...] (1)
ArrayExpression {...}
- type: "ArrayExpression"
- start: 255
- end: 257
loc: {...}
start: {...}
- line: 10
- column: 29
}end: {...}
- line: 10
- column: 31
}
}- elements: []
}
]- optional: false
}
}
]- kind: "const"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 261
- end: 298
loc: {...}
start: {...}
- line: 11
- column: 1
}end: {...}
- line: 11
- column: 38
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 267
- end: 297
loc: {...}
start: {...}
- line: 11
- column: 7
}end: {...}
- line: 11
- column: 37
}
}id: Identifier {...}
- type: "Identifier"
- start: 267
- end: 278
loc: {...}
start: {...}
- line: 11
- column: 7
}end: {...}
- line: 11
- column: 18
}
}- name: "initialNode"
}init: NewExpression {...}
- type: "NewExpression"
- start: 281
- end: 297
loc: {...}
start: {...}
- line: 11
- column: 21
}end: {...}
- line: 11
- column: 37
}
}callee: Identifier {...}
- type: "Identifier"
- start: 285
- end: 289
loc: {...}
start: {...}
- line: 11
- column: 25
}end: {...}
- line: 11
- column: 29
}
}- name: "Cell"
}arguments: [...] (2)
Literal {...}
- type: "Literal"
- start: 290
- end: 292
loc: {...}
start: {...}
- line: 11
- column: 30
}end: {...}
- line: 11
- column: 32
}
}- value: 50
- raw: "50"
} Literal {...}
- type: "Literal"
- start: 294
- end: 296
loc: {...}
start: {...}
- line: 11
- column: 34
}end: {...}
- line: 11
- column: 36
}
}- value: 50
- raw: "50"
}
]
}
}
]- kind: "const"
} ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 302
- end: 372
loc: {...}
start: {...}
- line: 13
- column: 1
}end: {...}
- line: 13
- column: 71
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 302
- end: 371
loc: {...}
start: {...}
- line: 13
- column: 1
}end: {...}
- line: 13
- column: 70
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 302
- end: 319
loc: {...}
start: {...}
- line: 13
- column: 1
}end: {...}
- line: 13
- column: 18
}
}object: Identifier {...}
- type: "Identifier"
- start: 302
- end: 312
loc: {...}
start: {...}
- line: 13
- column: 1
}end: {...}
- line: 13
- column: 11
}
}- name: "dataPoints"
}property: Identifier {...}
- type: "Identifier"
- start: 313
- end: 319
loc: {...}
start: {...}
- line: 13
- column: 12
}end: {...}
- line: 13
- column: 18
}
}- name: "update"
}- computed: false
- optional: false
}arguments: [...] (1)
ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 320
- end: 370
loc: {...}
start: {...}
- line: 13
- column: 19
}end: {...}
- line: 13
- column: 69
}
}- id: null
- expression: true
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 321
- end: 328
loc: {...}
start: {...}
- line: 13
- column: 20
}end: {...}
- line: 13
- column: 27
}
}- name: "visited"
}
]body: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 334
- end: 369
loc: {...}
start: {...}
- line: 13
- column: 33
}end: {...}
- line: 13
- column: 68
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 334
- end: 341
loc: {...}
start: {...}
- line: 13
- column: 33
}end: {...}
- line: 13
- column: 40
}
}- name: "visited"
}right: ArrayExpression {...}
- type: "ArrayExpression"
- start: 344
- end: 369
loc: {...}
start: {...}
- line: 13
- column: 43
}end: {...}
- line: 13
- column: 68
}
}elements: [...] (2)
SpreadElement {...}
- type: "SpreadElement"
- start: 345
- end: 355
loc: {...}
start: {...}
- line: 13
- column: 44
}end: {...}
- line: 13
- column: 54
}
}argument: Identifier {...}
- type: "Identifier"
- start: 348
- end: 355
loc: {...}
start: {...}
- line: 13
- column: 47
}end: {...}
- line: 13
- column: 54
}
}- name: "visited"
}
} Identifier {...}
- type: "Identifier"
- start: 357
- end: 368
loc: {...}
start: {...}
- line: 13
- column: 56
}end: {...}
- line: 13
- column: 67
}
}- name: "initialNode"
}
]
}
}
}
]- optional: false
}
} ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 375
- end: 449
loc: {...}
start: {...}
- line: 15
- column: 1
}end: {...}
- line: 17
- column: 4
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 375
- end: 448
loc: {...}
start: {...}
- line: 15
- column: 1
}end: {...}
- line: 17
- column: 3
}
}callee: Identifier {...}
- type: "Identifier"
- start: 375
- end: 382
loc: {...}
start: {...}
- line: 15
- column: 1
}end: {...}
- line: 15
- column: 8
}
}- name: "onMount"
}arguments: [...] (1)
ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 383
- end: 447
loc: {...}
start: {...}
- line: 15
- column: 9
}end: {...}
- line: 17
- column: 2
}
}- id: null
- expression: false
- generator: false
- async: true
- params: []
body: BlockStatement {...}
- type: "BlockStatement"
- start: 395
- end: 447
loc: {...}
start: {...}
- line: 15
- column: 21
}end: {...}
- line: 17
- column: 2
}
}body: [...] (1)
ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 399
- end: 444
loc: {...}
start: {...}
- line: 16
- column: 2
}end: {...}
- line: 16
- column: 47
}
}expression: AwaitExpression {...}
- type: "AwaitExpression"
- start: 399
- end: 443
loc: {...}
start: {...}
- line: 16
- column: 2
}end: {...}
- line: 16
- column: 46
}
}argument: CallExpression {...}
- type: "CallExpression"
- start: 405
- end: 443
loc: {...}
start: {...}
- line: 16
- column: 8
}end: {...}
- line: 16
- column: 46
}
}callee: Identifier {...}
- type: "Identifier"
- start: 405
- end: 408
loc: {...}
start: {...}
- line: 16
- column: 8
}end: {...}
- line: 16
- column: 11
}
}- name: "DFS"
}arguments: [...] (2)
ObjectExpression {...}
- type: "ObjectExpression"
- start: 409
- end: 430
loc: {...}
start: {...}
- line: 16
- column: 12
}end: {...}
- line: 16
- column: 33
}
}properties: [...] (1)
Property {...}
- type: "Property"
- start: 411
- end: 428
loc: {...}
start: {...}
- line: 16
- column: 14
}end: {...}
- line: 16
- column: 31
}
}- method: false
- shorthand: false
- computed: false
key: Identifier {...}
- type: "Identifier"
- start: 411
- end: 415
loc: {...}
start: {...}
- line: 16
- column: 14
}end: {...}
- line: 16
- column: 18
}
}- name: "root"
}value: Identifier {...}
- type: "Identifier"
- start: 417
- end: 428
loc: {...}
start: {...}
- line: 16
- column: 20
}end: {...}
- line: 16
- column: 31
}
}- name: "initialNode"
}- kind: "init"
}
]
} Identifier {...}
- type: "Identifier"
- start: 432
- end: 442
loc: {...}
start: {...}
- line: 16
- column: 35
}end: {...}
- line: 16
- column: 45
}
}- name: "dataPoints"
}
]- optional: false
}
}
}
]
}
}
]- optional: false
}
}
]- sourceType: "module"
}- attributes: []
}
}
The AST is not public API and may change at any point in time