(svelteSource: string): ComponentCss import {analyzeComponentCss} from 'svelte-docinfo/svelte-css.js'; Read a component's styling API: the custom properties its top-level
<style> and its markup's static style text read through an outermost
var() with a fallback, or that its style registers with @property,
minus the ones it sets itself. The policy is
ComponentDeclarationJson.cssCustomProperties's.
One parse with Svelte's parser (modern, loose) over the source with its
script content blanked, so script syntax never fails it. A style whose
lang or type names another language is blanked too, and reported as
css_lang_unsupported. A parse failure reports css_parse_failed, with
the parser's position. A source without <style text is parsed only when
its non-script text has var(, for its markup's reads; otherwise it reads
nothing, with empty reads. Every
read, the ones it doesn't list included, lands in reads for
documentCssProperties.
svelteSource
the full Svelte source code
stringreturns
ComponentCss the styling API, plus the problem when the style wasn't read