UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

2,012 lines (2,011 loc) 53.4 kB
{ "type": "root", "children": [ { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\timport { scaleLinear } from 'd3-scale';\n\n\tconst points = [\n\t\t{ year: 1990, birthrate: 16.7 },\n\t\t{ year: 1995, birthrate: 14.6 },\n\t\t{ year: 2000, birthrate: 14.4 },\n\t\t{ year: 2005, birthrate: 14 },\n\t\t{ year: 2010, birthrate: 13 },\n\t\t{ year: 2015, birthrate: 12.4 }\n\t];\n\n\tconst xTicks = [1990, 1995, 2000, 2005, 2010, 2015];\n\tconst yTicks = [0, 5, 10, 15, 20];\n\tconst padding = { top: 20, right: 15, bottom: 20, left: 25 };\n\n\tlet width = 500;\n\tlet height = 200;\n\n\tfunction formatMobile(tick) {\n\t\treturn \"'\" + tick % 100;\n\t}\n\n\t$: xScale = scaleLinear()\n\t\t.domain([0, xTicks.length])\n\t\t.range([padding.left, width - padding.right]);\n\n\t$: yScale = scaleLinear()\n\t\t.domain([0, Math.max.apply(null, yTicks)])\n\t\t.range([height - padding.bottom, padding.top]);\n\n\t$: innerWidth = width - (padding.left + padding.right);\n\t$: barWidth = innerWidth / xTicks.length;\n", "position": { "start": { "line": 1, "column": 9, "offset": 8 }, "end": { "line": 34, "column": 1, "offset": 863 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 34, "column": 10, "offset": 872 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 34, "column": 10, "offset": 872 }, "end": { "line": 36, "column": 1, "offset": 874 } } }, { "type": "svelteStyle", "tagName": "style", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\th2 {\n\t\ttext-align: center;\n\t}\n\n\t.chart {\n\t\twidth: 100%;\n\t\tmax-width: 500px;\n\t\tmargin: 0 auto;\n\t}\n\n\tsvg {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\theight: 200px;\n\t}\n\n\t.tick {\n\t\tfont-family: Helvetica, Arial;\n\t\tfont-size: .725em;\n\t\tfont-weight: 200;\n\t}\n\n\t.tick line {\n\t\tstroke: #e2e2e2;\n\t\tstroke-dasharray: 2;\n\t}\n\n\t.tick text {\n\t\tfill: #ccc;\n\t\ttext-anchor: start;\n\t}\n\n\t.tick.tick-0 line {\n\t\tstroke-dasharray: 0;\n\t}\n\n\t.x-axis .tick text {\n\t\ttext-anchor: middle;\n\t}\n\n\t.bars rect {\n\t\tfill: #a11;\n\t\tstroke: none;\n\t\topacity: 0.65;\n\t}\n", "position": { "start": { "line": 36, "column": 8, "offset": 881 }, "end": { "line": 82, "column": 1, "offset": 1408 } } } ], "position": { "start": { "line": 36, "column": 1, "offset": 874 }, "end": { "line": 82, "column": 9, "offset": 1416 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 82, "column": 9, "offset": 1416 }, "end": { "line": 84, "column": 1, "offset": 1418 } } }, { "type": "svelteElement", "tagName": "h2", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "US birthrate by year", "position": { "start": { "line": 84, "column": 5, "offset": 1422 }, "end": { "line": 84, "column": 25, "offset": 1442 } } } ], "position": { "start": { "line": 84, "column": 1, "offset": 1418 }, "end": { "line": 84, "column": 30, "offset": 1447 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 84, "column": 30, "offset": 1447 }, "end": { "line": 86, "column": 1, "offset": 1449 } } }, { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "chart", "position": { "start": { "line": 86, "column": 13, "offset": 1461 }, "end": { "line": 86, "column": 19, "offset": 1467 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 86, "column": 6, "offset": 1454 }, "end": { "line": 86, "column": 19, "offset": 1467 } } }, { "type": "svelteDirective", "name": "bind", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 86, "column": 37, "offset": 1485 }, "end": { "line": 86, "column": 44, "offset": 1492 } }, "expression": { "type": "svelteExpression", "value": "width", "position": { "start": { "line": 86, "column": 38, "offset": 1486 }, "end": { "line": 86, "column": 43, "offset": 1491 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 86, "column": 20, "offset": 1468 }, "end": { "line": 86, "column": 44, "offset": 1492 } }, "specifier": "clientWidth" }, { "type": "svelteDirective", "name": "bind", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 86, "column": 63, "offset": 1511 }, "end": { "line": 86, "column": 71, "offset": 1519 } }, "expression": { "type": "svelteExpression", "value": "height", "position": { "start": { "line": 86, "column": 64, "offset": 1512 }, "end": { "line": 86, "column": 70, "offset": 1518 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 86, "column": 45, "offset": 1493 }, "end": { "line": 86, "column": 71, "offset": 1519 } }, "specifier": "clientHeight" } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t", "position": { "start": { "line": 86, "column": 72, "offset": 1520 }, "end": { "line": 87, "column": 2, "offset": 1522 } } }, { "type": "svelteElement", "tagName": "svg", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t", "position": { "start": { "line": 87, "column": 7, "offset": 1527 }, "end": { "line": 88, "column": 3, "offset": 1530 } } }, { "type": "comment", "value": " y axis ", "position": { "start": { "line": 88, "column": 3, "offset": 1530 }, "end": { "line": 88, "column": 18, "offset": 1545 } } }, { "type": "text", "value": "\n\t\t", "position": { "start": { "line": 88, "column": 18, "offset": 1545 }, "end": { "line": 89, "column": 3, "offset": 1548 } } }, { "type": "svelteElement", "tagName": "g", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "axis", "position": { "start": { "line": 89, "column": 13, "offset": 1558 }, "end": {} } }, { "type": "text", "value": " ", "position": { "start": { "line": 89, "column": 17, "offset": 1562 }, "end": {} } }, { "type": "text", "value": "y-axis", "position": { "start": { "line": 89, "column": 18, "offset": 1563 }, "end": { "line": 89, "column": 25, "offset": 1570 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 89, "column": 6, "offset": 1551 }, "end": { "line": 89, "column": 25, "offset": 1570 } } }, { "type": "svelteProperty", "name": "transform", "value": [ { "type": "text", "value": "translate(0,", "position": { "start": { "line": 89, "column": 37, "offset": 1582 }, "end": { "line": 89, "column": 49, "offset": 1594 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 89, "column": 49, "offset": 1594 }, "end": { "line": 89, "column": 62, "offset": 1607 } }, "expression": { "type": "svelteExpression", "value": "padding.top", "position": { "start": { "line": 89, "column": 50, "offset": 1595 }, "end": { "line": 89, "column": 61, "offset": 1606 } } } }, { "type": "text", "value": ")", "position": { "start": { "line": 89, "column": 62, "offset": 1607 }, "end": { "line": 89, "column": 64, "offset": 1609 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 89, "column": 26, "offset": 1571 }, "end": { "line": 89, "column": 64, "offset": 1609 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t\t", "position": { "start": { "line": 89, "column": 65, "offset": 1610 }, "end": { "line": 90, "column": 4, "offset": 1614 } } }, { "type": "svelteBranchingBlock", "name": "each", "branches": [ { "type": "svelteBranch", "name": "each", "expression": { "type": "svelteExpression", "value": "yTicks as tick", "position": { "start": { "line": 90, "column": 11, "offset": 1621 }, "end": { "line": 90, "column": 25, "offset": 1635 } } }, "children": [ { "type": "text", "value": "\n\t\t\t\t", "position": { "start": { "line": 90, "column": 26, "offset": 1636 }, "end": { "line": 91, "column": 5, "offset": 1641 } } }, { "type": "svelteElement", "tagName": "g", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "tick", "position": { "start": { "line": 91, "column": 15, "offset": 1651 }, "end": {} } }, { "type": "text", "value": " ", "position": { "start": { "line": 91, "column": 19, "offset": 1655 }, "end": {} } }, { "type": "text", "value": "tick-", "position": { "start": { "line": 91, "column": 20, "offset": 1656 }, "end": { "line": 91, "column": 25, "offset": 1661 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 91, "column": 25, "offset": 1661 }, "end": { "line": 91, "column": 31, "offset": 1667 } }, "expression": { "type": "svelteExpression", "value": "tick", "position": { "start": { "line": 91, "column": 26, "offset": 1662 }, "end": { "line": 91, "column": 30, "offset": 1666 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 91, "column": 8, "offset": 1644 }, "end": { "line": 91, "column": 32, "offset": 1668 } } }, { "type": "svelteProperty", "name": "transform", "value": [ { "type": "text", "value": "translate(0,", "position": { "start": { "line": 91, "column": 44, "offset": 1680 }, "end": {} } }, { "type": "text", "value": " ", "position": { "start": { "line": 91, "column": 56, "offset": 1692 }, "end": { "line": 91, "column": 57, "offset": 1693 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 91, "column": 57, "offset": 1693 }, "end": { "line": 91, "column": 88, "offset": 1724 } }, "expression": { "type": "svelteExpression", "value": "yScale(tick) - padding.bottom", "position": { "start": { "line": 91, "column": 58, "offset": 1694 }, "end": { "line": 91, "column": 87, "offset": 1723 } } } }, { "type": "text", "value": ")", "position": { "start": { "line": 91, "column": 88, "offset": 1724 }, "end": { "line": 91, "column": 90, "offset": 1726 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 91, "column": 33, "offset": 1669 }, "end": { "line": 91, "column": 90, "offset": 1726 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t\t\t\t", "position": { "start": { "line": 91, "column": 91, "offset": 1727 }, "end": { "line": 92, "column": 6, "offset": 1733 } } }, { "type": "svelteElement", "tagName": "line", "properties": [ { "type": "svelteProperty", "name": "x2", "value": [ { "type": "text", "value": "100%", "position": { "start": { "line": 92, "column": 16, "offset": 1743 }, "end": { "line": 92, "column": 21, "offset": 1748 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 92, "column": 12, "offset": 1739 }, "end": { "line": 92, "column": 21, "offset": 1748 } } } ], "selfClosing": false, "children": [], "position": { "start": { "line": 92, "column": 6, "offset": 1733 }, "end": { "line": 92, "column": 29, "offset": 1756 } } }, { "type": "text", "value": "\n\t\t\t\t\t", "position": { "start": { "line": 92, "column": 29, "offset": 1756 }, "end": { "line": 93, "column": 6, "offset": 1762 } } }, { "type": "svelteElement", "tagName": "text", "properties": [ { "type": "svelteProperty", "name": "y", "value": [ { "type": "text", "value": "-4", "position": { "start": { "line": 93, "column": 15, "offset": 1771 }, "end": { "line": 93, "column": 18, "offset": 1774 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 93, "column": 12, "offset": 1768 }, "end": { "line": 93, "column": 18, "offset": 1774 } } } ], "selfClosing": false, "children": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 93, "column": 19, "offset": 1775 }, "end": { "line": 93, "column": 25, "offset": 1781 } }, "expression": { "type": "svelteExpression", "value": "tick", "position": { "start": { "line": 93, "column": 20, "offset": 1776 }, "end": { "line": 93, "column": 24, "offset": 1780 } } } }, { "type": "text", "value": " ", "position": { "start": { "line": 93, "column": 25, "offset": 1781 }, "end": { "line": 93, "column": 26, "offset": 1782 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 93, "column": 26, "offset": 1782 }, "end": { "line": 93, "column": 70, "offset": 1826 } }, "expression": { "type": "svelteExpression", "value": "tick === 20 ? ' per 1,000 population' : ''", "position": { "start": { "line": 93, "column": 27, "offset": 1783 }, "end": { "line": 93, "column": 69, "offset": 1825 } } } } ], "position": { "start": { "line": 93, "column": 6, "offset": 1762 }, "end": { "line": 93, "column": 77, "offset": 1833 } } }, { "type": "text", "value": "\n\t\t\t\t", "position": { "start": { "line": 93, "column": 77, "offset": 1833 }, "end": { "line": 94, "column": 5, "offset": 1838 } } } ], "position": { "start": { "line": 91, "column": 5, "offset": 1641 }, "end": { "line": 94, "column": 9, "offset": 1842 } } }, { "type": "text", "value": "\n\t\t\t", "position": { "start": { "line": 94, "column": 9, "offset": 1842 }, "end": { "line": 95, "column": 4, "offset": 1846 } } } ], "position": { "start": { "line": 90, "column": 4, "offset": 1614 }, "end": { "line": 95, "column": 4, "offset": 1846 } } } ], "position": { "start": { "line": 90, "column": 4, "offset": 1614 }, "end": { "line": 95, "column": 11, "offset": 1853 } } }, { "type": "text", "value": "\n\t\t", "position": { "start": { "line": 95, "column": 11, "offset": 1853 }, "end": { "line": 96, "column": 3, "offset": 1856 } } } ], "position": { "start": { "line": 89, "column": 3, "offset": 1548 }, "end": { "line": 96, "column": 7, "offset": 1860 } } }, { "type": "text", "value": "\n\n\t\t", "position": { "start": { "line": 96, "column": 7, "offset": 1860 }, "end": { "line": 98, "column": 3, "offset": 1864 } } }, { "type": "comment", "value": " x axis ", "position": { "start": { "line": 98, "column": 3, "offset": 1864 }, "end": { "line": 98, "column": 18, "offset": 1879 } } }, { "type": "text", "value": "\n\t\t", "position": { "start": { "line": 98, "column": 18, "offset": 1879 }, "end": { "line": 99, "column": 3, "offset": 1882 } } }, { "type": "svelteElement", "tagName": "g", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "axis", "position": { "start": { "line": 99, "column": 13, "offset": 1892 }, "end": {} } }, { "type": "text", "value": " ", "position": { "start": { "line": 99, "column": 17, "offset": 1896 }, "end": {} } }, { "type": "text", "value": "x-axis", "position": { "start": { "line": 99, "column": 18, "offset": 1897 }, "end": { "line": 99, "column": 25, "offset": 1904 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 99, "column": 6, "offset": 1885 }, "end": { "line": 99, "column": 25, "offset": 1904 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t\t", "position": { "start": { "line": 99, "column": 26, "offset": 1905 }, "end": { "line": 100, "column": 4, "offset": 1909 } } }, { "type": "svelteBranchingBlock", "name": "each", "branches": [ { "type": "svelteBranch", "name": "each", "expression": { "type": "svelteExpression", "value": "points as point, i", "position": { "start": { "line": 100, "column": 11, "offset": 1916 }, "end": { "line": 100, "column": 29, "offset": 1934 } } }, "children": [ { "type": "text", "value": "\n\t\t\t\t", "position": { "start": { "line": 100, "column": 30, "offset": 1935 }, "end": { "line": 101, "column": 5, "offset": 1940 } } }, { "type": "svelteElement", "tagName": "g", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "tick", "position": { "start": { "line": 101, "column": 15, "offset": 1950 }, "end": { "line": 101, "column": 20, "offset": 1955 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 101, "column": 8, "offset": 1943 }, "end": { "line": 101, "column": 20, "offset": 1955 } } }, { "type": "svelteProperty", "name": "transform", "value": [ { "type": "text", "value": "translate(", "position": { "start": { "line": 101, "column": 32, "offset": 1967 }, "end": { "line": 101, "column": 42, "offset": 1977 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 101, "column": 42, "offset": 1977 }, "end": { "line": 101, "column": 53, "offset": 1988 } }, "expression": { "type": "svelteExpression", "value": "xScale(i)", "position": { "start": { "line": 101, "column": 43, "offset": 1978 }, "end": { "line": 101, "column": 52, "offset": 1987 } } } }, { "type": "text", "value": ",", "position": { "start": { "line": 101, "column": 53, "offset": 1988 }, "end": { "line": 101, "column": 54, "offset": 1989 } } }, { "type": "svelteDynamicContent", "position": { "start": { "line": 101, "column": 54, "offset": 1989 }, "end": { "line": 101, "column": 62, "offset": 1997 } }, "expression": { "type": "svelteExpression", "value": "height", "position": { "start": { "line": 101, "column": 55, "offset": 1990 }, "end": { "line": 101, "column": 61, "offset": 1996 } } } }, { "type": "text", "value": ")", "position": { "start": { "line": 101, "column": 62, "offset": 1997 }, "end": { "line": 101, "column": 64, "offset": 1999 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 101, "column": 21, "offset": 1956 }, "end": { "line": 101, "column": 64, "offset": 1999 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t\t\t\t", "position": { "start": { "line": 101, "column": 65, "offset": 2000 }, "end": { "line": 102, "column": 6, "offset": 2006 } } }, { "type": "svelteElement", "tagName": "text", "properties": [ { "type": "svelteProperty", "name": "x", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 102, "column": 15, "offset": 2015 }, "end": { "line": 102, "column": 27, "offset": 2027 } }, "expression": { "type": "svelteExpression", "value": "barWidth/2", "position": { "start": { "line": 102, "column": 16, "offset": 2016 }, "end": { "line": 102, "column": 26, "offset": 2026 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 102, "column": 12, "offset": 2012 }, "end": { "line": 102, "column": 28, "offset": 2028 } } }, { "type": "svelteProperty", "name": "y", "value": [ { "type": "text", "value": "-4", "position": { "start": { "line": 102, "column": 32, "offset": 2032 }, "end": { "line": 102, "column": 35, "offset": 2035 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 102, "column": 29, "offset": 2029 }, "end": { "line": 102, "column": 35, "offset": 2035 } } } ], "selfClosing": false, "children": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 102, "column": 36, "offset": 2036 }, "end": { "line": 102, "column": 89, "offset": 2089 } }, "expression": { "type": "svelteExpression", "value": "width > 380 ? point.year : formatMobile(point.year)", "position": { "start": { "line": 102, "column": 37, "offset": 2037 }, "end": { "line": 102, "column": 88, "offset": 2088 } } } } ], "position": { "start": { "line": 102, "column": 6, "offset": 2006 }, "end": { "line": 102, "column": 96, "offset": 2096 } } }, { "type": "text", "value": "\n\t\t\t\t", "position": { "start": { "line": 102, "column": 96, "offset": 2096 }, "end": { "line": 103, "column": 5, "offset": 2101 } } } ], "position": { "start": { "line": 101, "column": 5, "offset": 1940 }, "end": { "line": 103, "column": 9, "offset": 2105 } } }, { "type": "text", "value": "\n\t\t\t", "position": { "start": { "line": 103, "column": 9, "offset": 2105 }, "end": { "line": 104, "column": 4, "offset": 2109 } } } ], "position": { "start": { "line": 100, "column": 4, "offset": 1909 }, "end": { "line": 104, "column": 4, "offset": 2109 } } } ], "position": { "start": { "line": 100, "column": 4, "offset": 1909 }, "end": { "line": 104, "column": 11, "offset": 2116 } } }, { "type": "text", "value": "\n\t\t", "position": { "start": { "line": 104, "column": 11, "offset": 2116 }, "end": { "line": 105, "column": 3, "offset": 2119 } } } ], "position": { "start": { "line": 99, "column": 3, "offset": 1882 }, "end": { "line": 105, "column": 7, "offset": 2123 } } }, { "type": "text", "value": "\n\n\t\t", "position": { "start": { "line": 105, "column": 7, "offset": 2123 }, "end": { "line": 107, "column": 3, "offset": 2127 } } }, { "type": "svelteElement", "tagName": "g", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "text", "value": "bars", "position": { "start": { "line": 107, "column": 13, "offset": 2137 }, "end": { "line": 107, "column": 18, "offset": 2142 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 107, "column": 6, "offset": 2130 }, "end": { "line": 107, "column": 18, "offset": 2142 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n\t\t\t", "position": { "start": { "line": 107, "column": 19, "offset": 2143 }, "end": { "line": 108, "column": 4, "offset": 2147 } } }, { "type": "svelteBranchingBlock", "name": "each", "branches": [ { "type": "svelteBranch", "name": "each", "expression": { "type": "svelteExpression", "value": "points as point, i", "position": { "start": { "line": 108, "column": 11, "offset": 2154 }, "end": { "line": 108, "column": 29, "offset": 2172 } } }, "children": [ { "type": "text", "value": "\n\t\t\t\t", "position": { "start": { "line": 108, "column": 30, "offset": 2173 }, "end": { "line": 109, "column": 5, "offset": 2178 } } }, { "type": "svelteElement", "tagName": "rect", "properties": [ { "type": "svelteProperty", "name": "x", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 110, "column": 9, "offset": 2192 }, "end": { "line": 110, "column": 24, "offset": 2207 } }, "expression": { "type": "svelteExpression", "value": "xScale(i) + 2", "position": { "start": { "line": 110, "column": 10, "offset": 2193 }, "end": { "line": 110, "column": 23, "offset": 2206 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 110, "column": 6, "offset": 2189 }, "end": { "line": 110, "column": 25, "offset": 2208 } } }, { "type": "svelteProperty", "name": "y", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 111, "column": 9, "offset": 2217 }, "end": { "line": 111, "column": 34, "offset": 2242 } }, "expression": { "type": "svelteExpression", "value": "yScale(point.birthrate)", "position": { "start": { "line": 111, "column": 10, "offset": 2218 }, "end": { "line": 111, "column": 33, "offset": 2241 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 111, "column": 6, "offset": 2214 }, "end": { "line": 111, "column": 35, "offset": 2243 } } }, { "type": "svelteProperty", "name": "width", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 112, "column": 13, "offset": 2256 }, "end": { "line": 112, "column": 27, "offset": 2270 } }, "expression": { "type": "svelteExpression", "value": "barWidth - 4", "position": { "start": { "line": 112, "column": 14, "offset": 2257 }, "end": { "line": 112, "column": 26, "offset": 2269 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 112, "column": 6, "offset": 2249 }, "end": { "line": 112, "column": 28, "offset": 2271 } } }, { "type": "svelteProperty", "name": "height", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 113, "column": 14, "offset": 2285 }, "end": { "line": 113, "column": 65, "offset": 2336 } }, "expression": { "type": "svelteExpression", "value": "height - padding.bottom - yScale(point.birthrate)", "position": { "start": { "line": 113, "column": 15, "offset": 2286 }, "end": { "line": 113, "column": 64, "offset": 2335 } } }