UNPKG

svelte-parse

Version:

An increidbly relaxed svelte-parser

390 lines (389 loc) 7.14 kB
{ "type": "root", "children": [ { "type": "svelteElement", "tagName": "div", "properties": [ { "type": "svelteDirective", "name": "use", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 2, "column": 17, "offset": 21 }, "end": { "line": 2, "column": 22, "offset": 26 } }, "expression": { "type": "svelteExpression", "value": "use", "position": { "start": { "line": 2, "column": 18, "offset": 22 }, "end": { "line": 2, "column": 21, "offset": 25 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 2, "column": 5, "offset": 9 }, "end": { "line": 2, "column": 22, "offset": 26 } }, "specifier": "actions" }, { "type": "svelteDirective", "name": "use", "value": [], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 3, "column": 5, "offset": 31 }, "end": { "line": 3, "column": 15, "offset": 41 } }, "specifier": "events" }, { "type": "svelteProperty", "name": "class", "value": [ { "type": "svelteDynamicContent", "position": { "start": { "line": 4, "column": 12, "offset": 53 }, "end": { "line": 11, "column": 7, "offset": 246 } }, "expression": { "type": "svelteExpression", "value": "clsxd(\n 'ui',\n [alignment, { 'aligned': alignment && alignment !== 'justified' }],\n fluid && 'fluid',\n text && 'text',\n className,\n 'container'\n )", "position": { "start": { "line": 4, "column": 13, "offset": 54 }, "end": { "line": 11, "column": 6, "offset": 245 } } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 4, "column": 5, "offset": 46 }, "end": { "line": 11, "column": 8, "offset": 247 } } }, { "type": "svelteProperty", "name": "...exclude($$props, ['use', 'class', 'alignment', 'fluid', 'text'])", "value": [ { "type": "svelteDynamicContent", "expression": { "type": "svelteExpression", "value": "...exclude($$props, ['use', 'class', 'alignment', 'fluid', 'text'])", "position": { "start": { "line": 12, "column": 6, "offset": 253 }, "end": { "line": 12, "column": 73, "offset": 320 } } }, "position": { "start": { "line": 12, "column": 5, "offset": 252 }, "end": { "line": 12, "column": 73, "offset": 320 } } } ], "modifiers": [], "shorthand": "expression", "position": { "start": { "line": 12, "column": 5, "offset": 252 }, "end": { "line": 12, "column": 73, "offset": 320 } } } ], "selfClosing": false, "children": [ { "type": "svelteElement", "tagName": "slot", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "No content is provided", "position": { "start": { "line": 13, "column": 8, "offset": 329 }, "end": { "line": 13, "column": 30, "offset": 351 } } } ], "position": { "start": { "line": 13, "column": 2, "offset": 323 }, "end": { "line": 13, "column": 37, "offset": 358 } } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 13, "column": 43, "offset": 364 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 13, "column": 43, "offset": 364 }, "end": { "line": 15, "column": 1, "offset": 366 } } }, { "type": "svelteScript", "tagName": "script", "properties": [ { "type": "svelteProperty", "name": "context", "value": [ { "type": "text", "value": "module", "position": { "start": { "line": 15, "column": 18, "offset": 383 }, "end": { "line": 15, "column": 25, "offset": 390 } } } ], "modifiers": [], "shorthand": "none", "position": { "start": { "line": 15, "column": 9, "offset": 374 }, "end": { "line": 15, "column": 25, "offset": 390 } } } ], "selfClosing": false, "children": [ { "type": "text", "value": "\n import { exclude, eventsBuilder, actions, clsxd } from '../../lib'\n import { current_component } from 'svelte/internal'\n", "position": { "start": { "line": 15, "column": 26, "offset": 391 }, "end": { "line": 18, "column": 1, "offset": 519 } } } ], "position": { "start": { "line": 15, "column": 1, "offset": 366 }, "end": { "line": 18, "column": 10, "offset": 528 } } }, { "type": "text", "value": "\n\n", "position": { "start": { "line": 18, "column": 10, "offset": 528 }, "end": { "line": 20, "column": 1, "offset": 530 } } }, { "type": "svelteScript", "tagName": "script", "properties": [], "selfClosing": false, "children": [ { "type": "text", "value": "\n const events = eventsBuilder(current_component)\n\n export let use = [];\n let className = '';\n export { className as class };\n\n export let fluid = false;\n export let text = false;\n export let alignment = '';\n", "position": { "start": { "line": 20, "column": 9, "offset": 538 }, "end": { "line": 30, "column": 1, "offset": 767 } } } ], "position": { "start": { "line": 20, "column": 1, "offset": 530 }, "end": { "line": 30, "column": 10, "offset": 776 } } } ], "position": { "start": { "column": 1, "line": 1, "offset": 0 }, "end": { "line": 30, "column": 10, "offset": 776 } } }