UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

301 lines (300 loc) 5.51 kB
{ "type": "root", "children": [ { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteProperty", "name": "class", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 2, "column": 11, "offset": 15 }, "end": { "line": 11, "column": 7, "offset": 235 } }, "expression": { "type": "svelteExpression", "value": "clsxd(\n 'ui',\n horizontal && 'horizontal',\n stackable && 'stackable',\n raised && 'raised',\n stacked && 'stacked',\n piled && 'piled',\n className,\n 'segments'\n )", "position": { "start": { "line": 2, "column": 12, "offset": 16 }, "end": { "line": 11, "column": 6, "offset": 234 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 2, "column": 5, "offset": 9 }, "end": { "line": 11, "column": 7, "offset": 235 } } }, { "type": "svelteProperty", "name": "...exclude($$props, ['class', 'horizontal', 'stackable', 'stacked', 'raised', 'piled'])", "value": [ { "type": "svelteDynamicContent", "expression": { "type": "svelteExpression", "value": "...exclude($$props, ['class', 'horizontal', 'stackable', 'stacked', 'raised', 'piled'])", "position": { "start": { "line": 12, "column": 6, "offset": 241 }, "end": { "line": 12, "column": 93, "offset": 328 } } }, "position": { "start": { "line": 12, "column": 5, "offset": 240 }, "end": { "line": 12, "column": 93, "offset": 328 } } } ], "modifiers": [], "shorthand": "expression", "position": { "start": { "line": 12, "column": 5, "offset": 240 }, "end": { "line": 12, "column": 93, "offset": 328 } } } ], "selfClosing": false, "children": [ { "type": "svelteElement", "tagName": "slot", "properties": [], "selfClosing": false, "children": [], "position": { "start": { "line": 13, "column": 2, "offset": 331 }, "end": { "line": 13, "column": 15, "offset": 344 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 13, "column": 21, "offset": 350 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 13, "column": 21, "offset": 350 }, "end": { "line": 15, "column": 1, "offset": 352 } } }, { "type": "svelteScript", "tagName": "script", "properties": [ { "type": "svelteProperty", "name": "context", "value": [ { "type": "text", "value": "module", "position": { "start": { "line": 15, "column": 18, "offset": 369 }, "end": { "line": 15, "column": 25, "offset": 376 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 15, "column": 9, "offset": 360 }, "end": { "line": 15, "column": 25, "offset": 376 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n import { exclude, clsxd } from '../../lib'\n", "position": { "start": { "line": 15, "column": 26, "offset": 377 }, "end": { "line": 17, "column": 1, "offset": 425 } } } ], "position": { "start": { "line": 15, "column": 1, "offset": 352 }, "end": { "line": 17, "column": 10, "offset": 434 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 17, "column": 10, "offset": 434 }, "end": { "line": 19, "column": 1, "offset": 436 } } }, { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n let className = '';\n export { className as class };\n\n export let horizontal = false\n export let stackable = false\n export let stacked = false\n export let raised = false\n export let piled = false\n", "position": { "start": { "line": 19, "column": 9, "offset": 444 }, "end": { "line": 28, "column": 1, "offset": 662 } } } ], "position": { "start": { "line": 19, "column": 1, "offset": 436 }, "end": { "line": 28, "column": 10, "offset": 671 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 28, "column": 10, "offset": 671 } } }