Create new
Bindings
Transitions
Animations
Easing
Component composition
Context API
Special elements
Module context
Debugging
Miscellaneous
App.svelte
points.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 * as Pancake from '@sveltejs/pancake';
import points from './points.js';
</script>
<div class="chart">
<Pancake.Chart x1={1979} x2={2016} y1={0} y2={8}>
<Pancake.Grid horizontal count={5} let:value let:first>
<div class="grid-line horizontal" class:first><span>{value}</span></div>
</Pancake.Grid>
<Pancake.Grid vertical count={10} let:value>
<div class="grid-line vertical"></div>
<span class="year-label">{value}</span>
</Pancake.Grid>
<Pancake.Svg>
<Pancake.SvgScatterplot data={points} x="{d => d.myX}" y="{d => d.myY}" let:d>
<path class="data" {d}/>
</Pancake.SvgScatterplot>
<Pancake.Quadtree data={points} x="{d => d.myX}" y="{d => d.myY}" let:closest>
{#if closest}
<Pancake.SvgPoint x={closest.myX} y={closest.myY} let:d>
<path class="highlight" d={d}/>
</Pancake.SvgPoint>
{/if}
</Pancake.Quadtree>
</Pancake.Svg>
</Pancake.Chart>
</div>
<style>
.chart {
height: 200px;
padding: 3em 0 2em 2em;
resolving https://unpkg.com/svelte@5.20.5/src/internal/shared/utils.js
999
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 * as Pancake from '@sveltejs/pancake';
import points from './points.js';
var root_2 = $.template(`<div><span class="svelte-17e4q0"> </span></div>`);
var root_3 = $.template(`<div class="grid-line vertical svelte-17e4q0"></div> <span class="year-label svelte-17e4q0"> </span>`, 1);
var root_5 = $.ns_template(`<path class="data svelte-17e4q0"></path>`);
var root_8 = $.ns_template(`<path class="highlight svelte-17e4q0"></path>`);
var root_4 = $.template(`<!> <!>`, 1);
var root_1 = $.template(`<!> <!> <!>`, 1);
var root = $.template(`<div class="chart svelte-17e4q0"><!></div>`);
export default function App($$anchor) {
var div = root();
var node = $.child(div);
Pancake.Chart(node, {
x1: 1979,
x2: 2016,
y1: 0,
y2: 8,
children: ($$anchor, $$slotProps) => {
var fragment = root_1();
var node_1 = $.first_child(fragment);
Pancake.Grid(node_1, {
horizontal: true,
count: 5,
children: $.invalid_default_snippet,
$$slots: {
default: ($$anchor, $$slotProps) => {
const value = $.derived_safe_equal(() => $$slotProps.value);
const first = $.derived_safe_equal(() => $$slotProps.first);
var div_1 = root_2();
result = svelte.compile(source, {
generate: ,
});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
›
.chart.svelte-17e4q0 {
height: 200px;
padding: 3em 0 2em 2em;
margin: 0 0 36px 0;
}
.grid-line.svelte-17e4q0 {
position: relative;
display: block;
}
.grid-line.horizontal.svelte-17e4q0 {
width: calc(100% + 2em);
left: -2em;
border-bottom: 1px dashed #ccc;
}
.grid-line.vertical.svelte-17e4q0 {
height: 100%;
border-left: 1px dashed #ccc;
}
.grid-line.first.svelte-17e4q0 {
border-bottom: 1px solid #333;
}
.grid-line.svelte-17e4q0 span:where(.svelte-17e4q0) {
position: absolute;
left: 0;
bottom: 2px;
font-family: sans-serif;
font-size: 14px;
color: #999;
}
Root {
css: StyleSheet {...}
- type: "StyleSheet"
- start: 935
- end: 1892
- attributes: []
children: [...] (9)
Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 944
- end: 950
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 944
- end: 950
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
ClassSelector {...}
- type: "ClassSelector"
- name: "chart"
- start: 944
- end: 950
}
]- start: 944
- end: 950
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 951
- end: 1020
children: [...] (3)
Declaration {...}
- type: "Declaration"
- start: 955
- end: 968
- property: "height"
- value: "200px"
} Declaration {...}
- type: "Declaration"
- start: 972
- end: 994
- property: "padding"
- value: "3em 0 2em 2em"
} Declaration {...}
- type: "Declaration"
- start: 998
- end: 1016
- property: "margin"
- value: "0 0 36px 0"
}
]
}- start: 944
- end: 1020
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1023
- end: 1033
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1023
- end: 1033
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
ClassSelector {...}
- type: "ClassSelector"
- name: "grid-line"
- start: 1023
- end: 1033
}
]- start: 1023
- end: 1033
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1034
- end: 1078
children: [...] (2)
Declaration {...}
- type: "Declaration"
- start: 1038
- end: 1056
- property: "position"
- value: "relative"
} Declaration {...}
- type: "Declaration"
- start: 1060
- end: 1074
- property: "display"
- value: "block"
}
]
}- start: 1023
- end: 1078
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1081
- end: 1102
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1081
- end: 1102
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (2)
ClassSelector {...}
- type: "ClassSelector"
- name: "grid-line"
- start: 1081
- end: 1091
} ClassSelector {...}
- type: "ClassSelector"
- name: "horizontal"
- start: 1091
- end: 1102
}
]- start: 1081
- end: 1102
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1103
- end: 1182
children: [...] (3)
Declaration {...}
- type: "Declaration"
- start: 1107
- end: 1130
- property: "width"
- value: "calc(100% + 2em)"
} Declaration {...}
- type: "Declaration"
- start: 1134
- end: 1144
- property: "left"
- value: "-2em"
} Declaration {...}
- type: "Declaration"
- start: 1148
- end: 1178
- property: "border-bottom"
- value: "1px dashed #ccc"
}
]
}- start: 1081
- end: 1182
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1185
- end: 1204
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1185
- end: 1204
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (2)
ClassSelector {...}
- type: "ClassSelector"
- name: "grid-line"
- start: 1185
- end: 1195
} ClassSelector {...}
- type: "ClassSelector"
- name: "vertical"
- start: 1195
- end: 1204
}
]- start: 1185
- end: 1204
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1205
- end: 1257
children: [...] (2)
Declaration {...}
- type: "Declaration"
- start: 1209
- end: 1221
- property: "height"
- value: "100%"
} Declaration {...}
- type: "Declaration"
- start: 1225
- end: 1253
- property: "border-left"
- value: "1px dashed #ccc"
}
]
}- start: 1185
- end: 1257
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1260
- end: 1276
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1260
- end: 1276
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (2)
ClassSelector {...}
- type: "ClassSelector"
- name: "grid-line"
- start: 1260
- end: 1270
} ClassSelector {...}
- type: "ClassSelector"
- name: "first"
- start: 1270
- end: 1276
}
]- start: 1260
- end: 1276
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1277
- end: 1314
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 1281
- end: 1310
- property: "border-bottom"
- value: "1px solid #333"
}
]
}- start: 1260
- end: 1314
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1317
- end: 1332
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1317
- end: 1332
children: [...] (2)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
ClassSelector {...}
- type: "ClassSelector"
- name: "grid-line"
- start: 1317
- end: 1327
}
]- start: 1317
- end: 1327
} RelativeSelector {...}
- type: "RelativeSelector"
combinator: Combinator {...}
- type: "Combinator"
- name: " "
- start: 1327
- end: 1328
}selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "span"
- start: 1328
- end: 1332
}
]- start: 1327
- end: 1332
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1333
- end: 1446
children: [...] (6)
Declaration {...}
- type: "Declaration"
- start: 1337
- end: 1355
- property: "position"
- value: "absolute"
} Declaration {...}
- type: "Declaration"
- start: 1359
- end: 1366
- property: "left"
- value: "0"
} Declaration {...}
- type: "Declaration"
- start: 1370
- end: 1381
- property: "bottom"
- value: "2px"
} Declaration {...}
- type: "Declaration"
- start: 1385
- end: 1408
- property: "font-family"
- value: "sans-serif"
} Declaration {...}
- type: "Declaration"
- start: 1412
- end: 1427
- property: "font-size"
- value: "14px"
} Declaration {...}
- type: "Declaration"
- start: 1431
- end: 1442
- property: "color"
- value: "#999"
}
]
}- start: 1317
- end: 1446
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1449
- end: 1460
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1449
- end: 1460
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
ClassSelector {...}
- type: "ClassSelector"
- name: "year-label"
- start: 1449
- end: 1460
}
]- start: 1449
- end: 1460
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1461
- end: 1615
children: [...] (8)
Declaration {...}
- type: "Declaration"
- start: 1465
- end: 1483
- property: "position"
- value: "absolute"
} Declaration {...}
- type: "Declaration"
- start: 1487
- end: 1497
- property: "width"
- value: "4em"
} Declaration {...}
- type: "Declaration"
- start: 1501
- end: 1511
- property: "left"
- value: "-2em"
} Declaration {...}
- type: "Declaration"
- start: 1515
- end: 1528
- property: "bottom"
- value: "-22px"
} Declaration {...}
- type: "Declaration"
- start: 1532
- end: 1555
- property: "font-family"
- value: "sans-serif"
} Declaration {...}
- type: "Declaration"
- start: 1559
- end: 1574
- property: "font-size"
- value: "14px"
} Declaration {...}
- type: "Declaration"
- start: 1578
- end: 1589
- property: "color"
- value: "#999"
} Declaration {...}
- type: "Declaration"
- start: 1593
- end: 1611
- property: "text-align"
- value: "center"
}
]
}- start: 1449
- end: 1615
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1618
- end: 1627
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1618
- end: 1627
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (2)
TypeSelector {...}
- type: "TypeSelector"
- name: "path"
- start: 1618
- end: 1622
} ClassSelector {...}
- type: "ClassSelector"
- name: "data"
- start: 1622
- end: 1627
}
]- start: 1618
- end: 1627
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1628
- end: 1746
children: [...] (5)
Declaration {...}
- type: "Declaration"
- start: 1632
- end: 1656
- property: "stroke"
- value: "rgb(171, 0, 214)"
} Declaration {...}
- type: "Declaration"
- start: 1660
- end: 1682
- property: "stroke-linejoin"
- value: "round"
} Declaration {...}
- type: "Declaration"
- start: 1686
- end: 1707
- property: "stroke-linecap"
- value: "round"
} Declaration {...}
- type: "Declaration"
- start: 1711
- end: 1728
- property: "stroke-width"
- value: "6px"
} Declaration {...}
- type: "Declaration"
- start: 1732
- end: 1742
- property: "fill"
- value: "none"
}
]
}- start: 1618
- end: 1746
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 1749
- end: 1763
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 1749
- end: 1763
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (2)
TypeSelector {...}
- type: "TypeSelector"
- name: "path"
- start: 1749
- end: 1753
} ClassSelector {...}
- type: "ClassSelector"
- name: "highlight"
- start: 1753
- end: 1763
}
]- start: 1749
- end: 1763
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 1764
- end: 1883
children: [...] (5)
Declaration {...}
- type: "Declaration"
- start: 1768
- end: 1792
- property: "stroke"
- value: "rgb(171, 0, 214)"
} Declaration {...}
- type: "Declaration"
- start: 1796
- end: 1818
- property: "stroke-linejoin"
- value: "round"
} Declaration {...}
- type: "Declaration"
- start: 1822
- end: 1843
- property: "stroke-linecap"
- value: "round"
} Declaration {...}
- type: "Declaration"
- start: 1847
- end: 1865
- property: "stroke-width"
- value: "10px"
} Declaration {...}
- type: "Declaration"
- start: 1869
- end: 1879
- property: "fill"
- value: "none"
}
]
}- start: 1749
- end: 1883
}
]content: {...}
- start: 942
- end: 1884
- styles: "\n\t.chart {\n\t\theight: 200px;\n\t\tpadding: 3em 0 2em 2em;\n\t\tmargin: 0 0 36px 0;\n\t}\n\n\t.grid-line {\n\t\tposition: relative;\n\t\tdisplay: block;\n\t}\n\n\t.grid-line.horizontal {\n\t\twidth: calc(100% + 2em);\n\t\tleft: -2em;\n\t\tborder-bottom: 1px dashed #ccc;\n\t}\n\n\t.grid-line.vertical {\n\t\theight: 100%;\n\t\tborder-left: 1px dashed #ccc;\n\t}\n\n\t.grid-line.first {\n\t\tborder-bottom: 1px solid #333;\n\t}\n\n\t.grid-line span {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 2px;\n\t\tfont-family: sans-serif;\n\t\tfont-size: 14px;\n\t\tcolor: #999;\n\t}\n\n\t.year-label {\n\t\tposition: absolute;\n\t\twidth: 4em;\n\t\tleft: -2em;\n\t\tbottom: -22px;\n\t\tfont-family: sans-serif;\n\t\tfont-size: 14px;\n\t\tcolor: #999;\n\t\ttext-align: center;\n\t}\n\n\tpath.data {\n\t\tstroke: rgb(171, 0, 214);\n\t\tstroke-linejoin: round;\n\t\tstroke-linecap: round;\n\t\tstroke-width: 6px;\n\t\tfill: none;\n\t}\n\n\tpath.highlight {\n\t\tstroke: rgb(171, 0, 214);\n\t\tstroke-linejoin: round;\n\t\tstroke-linecap: round;\n\t\tstroke-width: 10px;\n\t\tfill: none;\n\t}\n"
- comment: null
}
}- js: []
- start: 102
- end: 933
- type: "Root"
fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 100
- end: 102
- raw: "\n\n"
- data: "\n\n"
} RegularElement {...}
- type: "RegularElement"
- start: 102
- end: 933
- name: "div"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 107
- end: 120
- name: "class"
value: [...] (1)
Text {...}
- start: 114
- end: 119
- type: "Text"
- raw: "chart"
- data: "chart"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 121
- end: 123
- raw: "\n\t"
- data: "\n\t"
} Component {...}
- type: "Component"
- start: 123
- end: 926
- name: "Pancake.Chart"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 138
- end: 147
- name: "x1"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 141
- end: 147
expression: Literal {...}
- type: "Literal"
- start: 142
- end: 146
loc: {...}
start: {...}
- line: 7
- column: 20
}end: {...}
- line: 7
- column: 24
}
}- value: 1979
- raw: "1979"
}
}
} Attribute {...}
- type: "Attribute"
- start: 148
- end: 157
- name: "x2"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 151
- end: 157
expression: Literal {...}
- type: "Literal"
- start: 152
- end: 156
loc: {...}
start: {...}
- line: 7
- column: 30
}end: {...}
- line: 7
- column: 34
}
}- value: 2016
- raw: "2016"
}
}
} Attribute {...}
- type: "Attribute"
- start: 158
- end: 164
- name: "y1"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 161
- end: 164
expression: Literal {...}
- type: "Literal"
- start: 162
- end: 163
loc: {...}
start: {...}
- line: 7
- column: 40
}end: {...}
- line: 7
- column: 41
}
}- value: 0
- raw: "0"
}
}
} Attribute {...}
- type: "Attribute"
- start: 165
- end: 171
- name: "y2"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 168
- end: 171
expression: Literal {...}
- type: "Literal"
- start: 169
- end: 170
loc: {...}
start: {...}
- line: 7
- column: 47
}end: {...}
- line: 7
- column: 48
}
}- value: 8
- raw: "8"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (7)
Text {...}
- type: "Text"
- start: 172
- end: 175
- raw: "\n\t\t"
- data: "\n\t\t"
} Component {...}
- type: "Component"
- start: 175
- end: 324
- name: "Pancake.Grid"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 189
- end: 199
- name: "horizontal"
- value: true
} Attribute {...}
- type: "Attribute"
- start: 200
- end: 209
- name: "count"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 206
- end: 209
expression: Literal {...}
- type: "Literal"
- start: 207
- end: 208
loc: {...}
start: {...}
- line: 8
- column: 34
}end: {...}
- line: 8
- column: 35
}
}- value: 5
- raw: "5"
}
}
} LetDirective {...}
- start: 210
- end: 219
- type: "LetDirective"
- name: "value"
- expression: null
- modifiers: []
} LetDirective {...}
- start: 220
- end: 229
- type: "LetDirective"
- name: "first"
- expression: null
- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 230
- end: 234
- raw: "\n\t\t\t"
- data: "\n\t\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 234
- end: 306
- name: "div"
attributes: [...] (2)
Attribute {...}
- type: "Attribute"
- start: 239
- end: 267
- name: "class"
value: [...] (1)
Text {...}
- start: 246
- end: 266
- type: "Text"
- raw: "grid-line horizontal"
- data: "grid-line horizontal"
}
]
} ClassDirective {...}
- start: 268
- end: 279
- type: "ClassDirective"
- name: "first"
expression: Identifier {...}
- start: 274
- end: 279
- type: "Identifier"
- name: "first"
}- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (1)
RegularElement {...}
- type: "RegularElement"
- start: 280
- end: 300
- name: "span"
attributes: [...] (1)
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: [...] (1)
ExpressionTag {...}
- type: "ExpressionTag"
- start: 286
- end: 293
expression: Identifier {...}
- type: "Identifier"
- start: 287
- end: 292
loc: {...}
start: {...}
- line: 9
- column: 56
}end: {...}
- line: 9
- column: 61
}
}- name: "value"
}
}
]
}
}
]
}
} Text {...}
- type: "Text"
- start: 306
- end: 309
- raw: "\n\t\t"
- data: "\n\t\t"
}
]
}
} Text {...}
- type: "Text"
- start: 324
- end: 328
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 328
- end: 475
- name: "Pancake.Grid"
attributes: [...] (3)
Attribute {...}
- type: "Attribute"
- start: 342
- end: 350
- name: "vertical"
- value: true
} Attribute {...}
- type: "Attribute"
- start: 351
- end: 361
- name: "count"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 357
- end: 361
expression: Literal {...}
- type: "Literal"
- start: 358
- end: 360
loc: {...}
start: {...}
- line: 12
- column: 32
}end: {...}
- line: 12
- column: 34
}
}- value: 10
- raw: "10"
}
}
} LetDirective {...}
- start: 362
- end: 371
- type: "LetDirective"
- name: "value"
- expression: null
- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (5)
Text {...}
- type: "Text"
- start: 372
- end: 376
- raw: "\n\t\t\t"
- data: "\n\t\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 376
- end: 414
- name: "div"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 381
- end: 407
- name: "class"
value: [...] (1)
Text {...}
- start: 388
- end: 406
- type: "Text"
- raw: "grid-line vertical"
- data: "grid-line vertical"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 414
- end: 418
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 418
- end: 457
- name: "span"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 424
- end: 442
- name: "class"
value: [...] (1)
Text {...}
- start: 431
- end: 441
- type: "Text"
- raw: "year-label"
- data: "year-label"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (1)
ExpressionTag {...}
- type: "ExpressionTag"
- start: 443
- end: 450
expression: Identifier {...}
- type: "Identifier"
- start: 444
- end: 449
loc: {...}
start: {...}
- line: 14
- column: 29
}end: {...}
- line: 14
- column: 34
}
}- name: "value"
}
}
]
}
} Text {...}
- type: "Text"
- start: 457
- end: 460
- raw: "\n\t\t"
- data: "\n\t\t"
}
]
}
} Text {...}
- type: "Text"
- start: 475
- end: 479
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 479
- end: 908
- name: "Pancake.Svg"
- attributes: []
fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (5)
Text {...}
- type: "Text"
- start: 492
- end: 496
- raw: "\n\t\t\t"
- data: "\n\t\t\t"
} Component {...}
- type: "Component"
- start: 496
- end: 632
- name: "Pancake.SvgScatterplot"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 520
- end: 533
- name: "data"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 525
- end: 533
expression: Identifier {...}
- type: "Identifier"
- start: 526
- end: 532
loc: {...}
start: {...}
- line: 18
- column: 33
}end: {...}
- line: 18
- column: 39
}
}- name: "points"
}
}
} Attribute {...}
- type: "Attribute"
- start: 534
- end: 550
- name: "x"
value: [...] (1)
ExpressionTag {...}
- type: "ExpressionTag"
- start: 537
- end: 549
expression: ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 538
- end: 548
loc: {...}
start: {...}
- line: 18
- column: 45
}end: {...}
- line: 18
- column: 55
}
}- id: null
- expression: true
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 538
- end: 539
loc: {...}
start: {...}
- line: 18
- column: 45
}end: {...}
- line: 18
- column: 46
}
}- name: "d"
}
]body: MemberExpression {...}
- type: "MemberExpression"
- start: 543
- end: 548
loc: {...}
start: {...}
- line: 18
- column: 50
}end: {...}
- line: 18
- column: 55
}
}object: Identifier {...}
- type: "Identifier"
- start: 543
- end: 544
loc: {...}
start: {...}
- line: 18
- column: 50
}end: {...}
- line: 18
- column: 51
}
}- name: "d"
}property: Identifier {...}
- type: "Identifier"
- start: 545
- end: 548
loc: {...}
start: {...}
- line: 18
- column: 52
}end: {...}
- line: 18
- column: 55
}
}- name: "myX"
}- computed: false
- optional: false
}
}
}
]
} Attribute {...}
- type: "Attribute"
- start: 551
- end: 567
- name: "y"
value: [...] (1)
ExpressionTag {...}
- type: "ExpressionTag"
- start: 554
- end: 566
expression: ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 555
- end: 565
loc: {...}
start: {...}
- line: 18
- column: 62
}end: {...}
- line: 18
- column: 72
}
}- id: null
- expression: true
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 555
- end: 556
loc: {...}
start: {...}
- line: 18
- column: 62
}end: {...}
- line: 18
- column: 63
}
}- name: "d"
}
]body: MemberExpression {...}
- type: "MemberExpression"
- start: 560
- end: 565
loc: {...}
start: {...}
- line: 18
- column: 67
}end: {...}
- line: 18
- column: 72
}
}object: Identifier {...}
- type: "Identifier"
- start: 560
- end: 561
loc: {...}
start: {...}
- line: 18
- column: 67
}end: {...}
- line: 18
- column: 68
}
}- name: "d"
}property: Identifier {...}
- type: "Identifier"
- start: 562
- end: 565
loc: {...}
start: {...}
- line: 18
- column: 69
}end: {...}
- line: 18
- column: 72
}
}- name: "myY"
}- computed: false
- optional: false
}
}
}
]
} LetDirective {...}
- start: 568
- end: 573
- type: "LetDirective"
- name: "d"
- expression: null
- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 574
- end: 579
- raw: "\n\t\t\t\t"
- data: "\n\t\t\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 579
- end: 603
- name: "path"
attributes: [...] (2)
Attribute {...}
- type: "Attribute"
- start: 585
- end: 597
- name: "class"
value: [...] (1)
Text {...}
- start: 592
- end: 596
- type: "Text"
- raw: "data"
- data: "data"
}
]
} Attribute {...}
- type: "Attribute"
- start: 598
- end: 601
- name: "d"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 599
- end: 600
expression: Identifier {...}
- start: 599
- end: 600
- type: "Identifier"
- name: "d"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 603
- end: 607
- raw: "\n\t\t\t"
- data: "\n\t\t\t"
}
]
}
} Text {...}
- type: "Text"
- start: 632
- end: 637
- raw: " "
- data: " "
} Component {...}
- type: "Component"
- start: 637
- end: 891
- name: "Pancake.Quadtree"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 655
- end: 668
- name: "data"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 660
- end: 668
expression: Identifier {...}
- type: "Identifier"
- start: 661
- end: 667
loc: {...}
start: {...}
- line: 22
- column: 27
}end: {...}
- line: 22
- column: 33
}
}- name: "points"
}
}
} Attribute {...}
- type: "Attribute"
- start: 669
- end: 685
- name: "x"
value: [...] (1)
ExpressionTag {...}
- type: "ExpressionTag"
- start: 672
- end: 684
expression: ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 673
- end: 683
loc: {...}
start: {...}
- line: 22
- column: 39
}end: {...}
- line: 22
- column: 49
}
}- id: null
- expression: true
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 673
- end: 674
loc: {...}
start: {...}
- line: 22
- column: 39
}end: {...}
- line: 22
- column: 40
}
}- name: "d"
}
]body: MemberExpression {...}
- type: "MemberExpression"
- start: 678
- end: 683
loc: {...}
start: {...}
- line: 22
- column: 44
}end: {...}
- line: 22
- column: 49
}
}object: Identifier {...}
- type: "Identifier"
- start: 678
- end: 679
loc: {...}
start: {...}
- line: 22
- column: 44
}end: {...}
- line: 22
- column: 45
}
}- name: "d"
}property: Identifier {...}
- type: "Identifier"
- start: 680
- end: 683
loc: {...}
start: {...}
- line: 22
- column: 46
}end: {...}
- line: 22
- column: 49
}
}- name: "myX"
}- computed: false
- optional: false
}
}
}
]
} Attribute {...}
- type: "Attribute"
- start: 686
- end: 702
- name: "y"
value: [...] (1)
ExpressionTag {...}
- type: "ExpressionTag"
- start: 689
- end: 701
expression: ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 690
- end: 700
loc: {...}
start: {...}
- line: 22
- column: 56
}end: {...}
- line: 22
- column: 66
}
}- id: null
- expression: true
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 690
- end: 691
loc: {...}
start: {...}
- line: 22
- column: 56
}end: {...}
- line: 22
- column: 57
}
}- name: "d"
}
]body: MemberExpression {...}
- type: "MemberExpression"
- start: 695
- end: 700
loc: {...}
start: {...}
- line: 22
- column: 61
}end: {...}
- line: 22
- column: 66
}
}object: Identifier {...}
- type: "Identifier"
- start: 695
- end: 696
loc: {...}
start: {...}
- line: 22
- column: 61
}end: {...}
- line: 22
- column: 62
}
}- name: "d"
}property: Identifier {...}
- type: "Identifier"
- start: 697
- end: 700
loc: {...}
start: {...}
- line: 22
- column: 63
}end: {...}
- line: 22
- column: 66
}
}- name: "myY"
}- computed: false
- optional: false
}
}
}
]
} LetDirective {...}
- start: 703
- end: 714
- type: "LetDirective"
- name: "closest"
- expression: null
- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 715
- end: 720
- raw: "\n\t\t\t\t"
- data: "\n\t\t\t\t"
} IfBlock {...}
- type: "IfBlock"
- elseif: false
- start: 720
- end: 868
test: Identifier {...}
- type: "Identifier"
- start: 725
- end: 732
loc: {...}
start: {...}
- line: 23
- column: 9
}end: {...}
- line: 23
- column: 16
}
}- name: "closest"
}consequent: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 733
- end: 739
- raw: "\n\t\t\t\t\t"
- data: "\n\t\t\t\t\t"
} Component {...}
- type: "Component"
- start: 739
- end: 858
- name: "Pancake.SvgPoint"
attributes: [...] (3)
Attribute {...}
- type: "Attribute"
- start: 757
- end: 772
- name: "x"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 759
- end: 772
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 760
- end: 771
loc: {...}
start: {...}
- line: 24
- column: 26
}end: {...}
- line: 24
- column: 37
}
}object: Identifier {...}
- type: "Identifier"
- start: 760
- end: 767
loc: {...}
start: {...}
- line: 24
- column: 26
}end: {...}
- line: 24
- column: 33
}
}- name: "closest"
}property: Identifier {...}
- type: "Identifier"
- start: 768
- end: 771
loc: {...}
start: {...}
- line: 24
- column: 34
}end: {...}
- line: 24
- column: 37
}
}- name: "myX"
}- computed: false
- optional: false
}
}
} Attribute {...}
- type: "Attribute"
- start: 773
- end: 788
- name: "y"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 775
- end: 788
expression: MemberExpression {...}
- type: "MemberExpression"
- start: 776
- end: 787
loc: {...}
start: {...}
- line: 24
- column: 42
}end: {...}
- line: 24
- column: 53
}
}object: Identifier {...}
- type: "Identifier"
- start: 776
- end: 783
loc: {...}
start: {...}
- line: 24
- column: 42
}end: {...}
- line: 24
- column: 49
}
}- name: "closest"
}property: Identifier {...}
- type: "Identifier"
- start: 784
- end: 787
loc: {...}
start: {...}
- line: 24
- column: 50
}end: {...}
- line: 24
- column: 53
}
}- name: "myY"
}- computed: false
- optional: false
}
}
} LetDirective {...}
- start: 789
- end: 794
- type: "LetDirective"
- name: "d"
- expression: null
- modifiers: []
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 795
- end: 802
- raw: "\n\t\t\t\t\t\t"
- data: "\n\t\t\t\t\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 802
- end: 833
- name: "path"
attributes: [...] (2)
Attribute {...}
- type: "Attribute"
- start: 808
- end: 825
- name: "class"
value: [...] (1)
Text {...}
- start: 815
- end: 824
- type: "Text"
- raw: "highlight"
- data: "highlight"
}
]
} Attribute {...}
- type: "Attribute"
- start: 826
- end: 831
- name: "d"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 828
- end: 831
expression: Identifier {...}
- type: "Identifier"
- start: 829
- end: 830
loc: {...}
start: {...}
- line: 25
- column: 33
}end: {...}
- line: 25
- column: 34
}
}- name: "d"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 833
- end: 839
- raw: "\n\t\t\t\t\t"
- data: "\n\t\t\t\t\t"
}
]
}
} Text {...}
- type: "Text"
- start: 858
- end: 863
- raw: "\n\t\t\t\t"
- data: "\n\t\t\t\t"
}
]
}- alternate: null
} Text {...}
- type: "Text"
- start: 868
- end: 872
- raw: "\n\t\t\t"
- data: "\n\t\t\t"
}
]
}
} Text {...}
- type: "Text"
- start: 891
- end: 894
- raw: "\n\t\t"
- data: "\n\t\t"
}
]
}
} Text {...}
- type: "Text"
- start: 908
- end: 910
- raw: "\n\t"
- data: "\n\t"
}
]
}
} Text {...}
- type: "Text"
- start: 926
- end: 927
- raw: "\n"
- data: "\n"
}
]
}
} Text {...}
- type: "Text"
- start: 933
- end: 935
- raw: "\n\n"
- data: "\n\n"
}
]
}- options: null
instance: Script {...}
- type: "Script"
- start: 0
- end: 100
- context: "default"
content: Program {...}
- type: "Program"
- start: 8
- end: 91
loc: {...}
start: {...}
- line: 1
- column: 0
}end: {...}
- line: 4
- column: 0
}
}body: [...] (2)
ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 10
- end: 55
loc: {...}
start: {...}
- line: 2
- column: 1
}end: {...}
- line: 2
- column: 46
}
}specifiers: [...] (1)
ImportNamespaceSpecifier {...}
- type: "ImportNamespaceSpecifier"
- start: 17
- end: 29
loc: {...}
start: {...}
- line: 2
- column: 8
}end: {...}
- line: 2
- column: 20
}
}local: Identifier {...}
- type: "Identifier"
- start: 22
- end: 29
loc: {...}
start: {...}
- line: 2
- column: 13
}end: {...}
- line: 2
- column: 20
}
}- name: "Pancake"
}
}
]source: Literal {...}
- type: "Literal"
- start: 35
- end: 54
loc: {...}
start: {...}
- line: 2
- column: 26
}end: {...}
- line: 2
- column: 45
}
}- value: "@sveltejs/pancake"
- raw: "'@sveltejs/pancake'"
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 57
- end: 90
loc: {...}
start: {...}
- line: 3
- column: 1
}end: {...}
- line: 3
- column: 34
}
}specifiers: [...] (1)
ImportDefaultSpecifier {...}
- type: "ImportDefaultSpecifier"
- start: 64
- end: 70
loc: {...}
start: {...}
- line: 3
- column: 8
}end: {...}
- line: 3
- column: 14
}
}local: Identifier {...}
- type: "Identifier"
- start: 64
- end: 70
loc: {...}
start: {...}
- line: 3
- column: 8
}end: {...}
- line: 3
- column: 14
}
}- name: "points"
}
}
]source: Literal {...}
- type: "Literal"
- start: 76
- end: 89
loc: {...}
start: {...}
- line: 3
- column: 20
}end: {...}
- line: 3
- column: 33
}
}- value: "./points.js"
- raw: "'./points.js'"
}
}
]- sourceType: "module"
}- attributes: []
}
}
The AST is not public API and may change at any point in time