@ -57,441 +57,432 @@ function e(node, code, message) {
}
/ * *
* Declaration cannot be empty
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid _css _declaration ( node ) {
e ( node , "invalid_css_declaration" , "Declaration cannot be empty" ) ;
}
/ * *
* Declaration cannot be empty
* Invalid compiler option : % details %
* @ param { null | number | NodeLike } node
* @ param { string } details
* @ returns { never }
* /
export function invalid_css _empty _declaration ( node ) {
e ( node , " invalid_css_empty_declaration", "Declaration cannot be empty" ) ;
export function options _invalid _value ( node , details ) {
e ( node , "options_invalid_value" , ` Invalid compiler option: ${ details } ` ) ;
}
/ * *
* A : global { ... } block cannot follow a % name % combinator
* Invalid compiler option : % details %
* @ param { null | number | NodeLike } node
* @ param { string } name
* @ param { string } details
* @ returns { never }
* /
export function invalid_css _global _block _combinator ( node , name ) {
e ( node , " invalid_css_global_block_combinator", ` A :global {...} block cannot follow a ${ name } combinator ` ) ;
export function options_removed ( node , details ) {
e ( node , " options_removed", ` Invalid compiler option: ${ details } ` ) ;
}
/ * *
* A : global { ... } block can only contain rules , not declarations
* Unrecognised compiler option % keypath %
* @ param { null | number | NodeLike } node
* @ param { string } keypath
* @ returns { never }
* /
export function invalid_css _global _block _declaration ( node ) {
e ( node , " invalid_css_global_block_declaration", "A :global {...} block can only contain rules, not declarations" ) ;
export function options_unrecognised ( node , keypath ) {
e ( node , " options_unrecognised", ` Unrecognised compiler option ${ keypath } ` ) ;
}
/ * *
* A : global { ... } block cannot be part of a selector list with more than one item
* ` $ bindable() ` can only be used inside a ` $ props() ` declaration
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_css _global _block _list ( node ) {
e ( node , " invalid_css_global_block_list", "A :global {...} block cannot be part of a selector list with more than one item ") ;
export function bindable_invalid _location ( node ) {
e ( node , " bindable_invalid_location", "`$bindable()` can only be used inside a `$props()` declaration ") ;
}
/ * *
* A : global { ... } block cannot modify an existing selector
* Cannot assign to % thing %
* @ param { null | number | NodeLike } node
* @ param { string } thing
* @ returns { never }
* /
export function invalid_css _global _block _modifier ( node ) {
e ( node , " invalid_css_global_block_modifier", "A :global {...} block cannot modify an existing selector" ) ;
export function constant_assignment ( node , thing ) {
e ( node , " constant_assignment", ` Cannot assign to ${ thing } ` ) ;
}
/ * *
* : global ( ... ) can be at the start or end of a selector sequence , but not in the middle
* Cannot bind to % thing %
* @ param { null | number | NodeLike } node
* @ param { string } thing
* @ returns { never }
* /
export function invalid_css _global _placement ( node ) {
e ( node , " invalid_css_global_placement", ":global(...) can be at the start or end of a selector sequence, but not in the middle" ) ;
export function constant_binding ( node , thing ) {
e ( node , " constant_binding", ` Cannot bind to ${ thing } ` ) ;
}
/ * *
* : global ( ... ) must contain exactly one selector
* ` %name% ` has already been declared
* @ param { null | number | NodeLike } node
* @ param { string } name
* @ returns { never }
* /
export function invalid_css _global _selector ( nod e) {
e ( node , " invalid_css_global_selector", ":global(...) must contain exactly one selector" ) ;
export function declaration_duplicate ( node , nam e) {
e ( node , " declaration_duplicate", ` \` ${ name } \` has already been declared ` ) ;
}
/ * *
* : global ( ... ) must not contain type or universal selectors when used in a compound selector
* Cannot declare same variable name which is imported inside ` <script context="module"> `
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_css _global _selector _lis t( node ) {
e ( node , " invalid_css_global_selector_list", ":global(...) must not contain type or universal selectors when used in a compound selector ") ;
export function declaration_duplicate _module _impor t( node ) {
e ( node , " declaration_duplicate_module_import", "Cannot declare same variable name which is imported inside `<script context=\"module\">` ") ;
}
/ * *
* Expected a valid CSS identifier
* Cannot export derived state from a module . To expose the current derived value , export a function returning its value
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_css _identifier ( node ) {
e ( node , " invalid_css_identifier", "Expected a valid CSS identifier ") ;
export function derived_invalid _export ( node ) {
e ( node , " derived_invalid_export", "Cannot export derived state from a module. To expose the current derived value, export a function returning its value ") ;
}
/ * *
* Invalid selector
* The $ name is reserved , and cannot be used for variables and imports
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_css _selector ( node ) {
e ( node , " invalid_css_selector", "Invalid selector ") ;
export function dollar_binding _invalid ( node ) {
e ( node , " dollar_binding_invalid", "The $ name is reserved, and cannot be used for variables and imports ") ;
}
/ * *
* : global ( ... ) must not be followed with a type selector
* The $ prefix is reserved , and cannot be used for variables and imports
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_css _type _selector _placement ( node ) {
e ( node , " invalid_css_type_selector_placement", ":global(...) must not be followed with a type selector ") ;
export function dollar_prefix _invalid ( node ) {
e ( node , " dollar_prefix_invalid", "The $ prefix is reserved, and cannot be used for variables and imports ") ;
}
/ * *
* Nesting selectors can only be used inside a rule
* Cannot reassign or bind to each block argument in runes mode . Use the array and index variables instead ( e . g . ` array[i] = value ` instead of ` entry = value ` )
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_nesting _selector ( node ) {
e ( node , " invalid_nesting_selector", "Nesting selectors can only be used inside a rule ") ;
export function each_item _invalid _assignment ( node ) {
e ( node , " each_item_invalid_assignment", "Cannot reassign or bind to each block argument in runes mode. Use the array and index variables instead (e.g. `array[i] = value` instead of `entry = value`) ") ;
}
/ * *
* Invalid compiler option : % details %
* ` $ effect() ` can only be used as an expression statement
* @ param { null | number | NodeLike } node
* @ param { string } details
* @ returns { never }
* /
export function options_invalid _value ( node , details ) {
e ( node , " options_invalid_value", ` Invalid compiler option: ${ details } ` ) ;
export function effect_invalid _placement ( node ) {
e ( node , " effect_invalid_placement", "`$effect()` can only be used as an expression statement" ) ;
}
/ * *
* Invalid compiler option : % details %
* ` %name% ` is an illegal variable name . To reference a global variable called ` %name% ` , use ` globalThis.%name% `
* @ param { null | number | NodeLike } node
* @ param { string } details
* @ param { string } name
* @ returns { never }
* /
export function options_removed ( node , details ) {
e ( node , " options_removed", ` Invalid compiler option: ${ details } ` ) ;
export function global_reference _invalid ( node , name ) {
e ( node , " global_reference_invalid", ` \` ${ name } \` is an illegal variable name. To reference a global variable called \` ${ name } \` , use \` globalThis. ${ name } \` ` ) ;
}
/ * *
* Unrecognised compiler option % keypath %
* ` $ host() ` can only be used inside custom element component instances
* @ param { null | number | NodeLike } node
* @ param { string } keypath
* @ returns { never }
* /
export function options_unrecognised ( node , keypath ) {
e ( node , " options_unrecognised", ` Unrecognised compiler option ${ keypath } ` ) ;
export function host_invalid _placement ( node ) {
e ( node , " host_invalid_placement", "`$host()` can only be used inside custom element component instances" ) ;
}
/ * *
* ` %name% ` has already been declare d
* Cannot use ` export let ` in runes mode — use $props instea d
* @ param { null | number | NodeLike } node
* @ param { string } name
* @ returns { never }
* /
export function declaration_duplicate ( node , nam e) {
e ( node , " declaration_duplicate", ` \` ${ name } \` has already been declared ` ) ;
export function legacy_export _invalid ( nod e) {
e ( node , " legacy_export_invalid", "Cannot use `export let` in runes mode — use $props instead" ) ;
}
/ * *
* Cannot declare same variable name which is imported inside ` <script context="module"> `
* Cannot use ` $ $ props ` in runes mode
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function declaration_duplicate _module _import ( node ) {
e ( node , " declaration_duplicate_module_import", "Cannot declare same variable name which is imported inside `<script context=\"module\">` ") ;
export function legacy_props _invalid ( node ) {
e ( node , " legacy_props_invalid", "Cannot use `$$props` in runes mode ") ;
}
/ * *
* The $ name is reserved , and cannot be used for variables and imports
* ` $ : ` is not allowed in runes mode , use ` $ derived ` or ` $ effect ` instead
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function dollar_binding _invalid ( node ) {
e ( node , " dollar_binding_invalid", "The $ name is reserved, and cannot be used for variables and imports ") ;
export function legacy_reactive _statement _invalid ( node ) {
e ( node , " legacy_reactive_statement_invalid", "`$:` is not allowed in runes mode, use `$derived` or `$effect` instead ") ;
}
/ * *
* The $ prefix is reserved , and cannot be used for variables and imports
* Cannot use ` $ $ restProps ` in runes mode
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function dollar_prefix _invalid ( node ) {
e ( node , " dollar_prefix_invalid", "The $ prefix is reserved, and cannot be used for variables and imports ") ;
export function legacy_rest _props _invalid ( node ) {
e ( node , " legacy_rest_props_invalid", "Cannot use `$$restProps` in runes mode ") ;
}
/ * *
* ` %name% ` is an illegal variable name . To reference a global variable called ` %name% ` , use ` globalThis.%name% `
* A component cannot have a default export
* @ param { null | number | NodeLike } node
* @ param { string } name
* @ returns { never }
* /
export function global_reference _invalid ( node , nam e) {
e ( node , " global_reference_invalid", ` \` ${ name } \` is an illegal variable name. To reference a global variable called \` ${ name } \` , use \` globalThis. ${ name } \` ` ) ;
export function module_illegal _default _export ( nod e) {
e ( node , " module_illegal_default_export", "A component cannot have a default export" ) ;
}
/ * *
* A component cannot have a default export
* Cannot use ` $ props() ` more than once
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function module_illegal _default _export ( node ) {
e ( node , " module_illegal_default_export", "A component cannot have a default export ") ;
export function props_duplicate ( node ) {
e ( node , " props_duplicate", "Cannot use `$props()` more than once ") ;
}
/ * *
* Cyclical dependency detected : % cycle %
* ` $ props() ` can only be used with an object destructuring pattern
* @ param { null | number | NodeLike } node
* @ param { string } cycle
* @ returns { never }
* /
export function reactive_declaration _cycle ( node , cycl e) {
e ( node , " reactive_declaration_cycle", ` Cyclical dependency detected: ${ cycle } ` ) ;
export function props_invalid _identifier ( nod e) {
e ( node , " props_invalid_identifier", "`$props()` can only be used with an object destructuring pattern" ) ;
}
/ * *
* Cannot subscribe to stores that are not declared at the top level of the component
* ` $ props() ` assignment must not contain nested properties or computed keys
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function store_invalid _scoped _subscriptio n( node ) {
e ( node , " store_invalid_scoped_subscription", "Cannot subscribe to stores that are not declared at the top level of the component ") ;
export function props_invalid _patter n( node ) {
e ( node , " props_invalid_pattern", "`$props()` assignment must not contain nested properties or computed keys ") ;
}
/ * *
* Cannot reference store value inside ` <script context="module"> `
* ` $ props() ` can only be used at the top level of components as a variable declaration initializer
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function store_invalid _subscription ( node ) {
e ( node , " store_invalid_subscription", "Cannot reference store value inside `<script context=\"module\">` ") ;
export function props_invalid _placement ( node ) {
e ( node , " props_invalid_placement", "`$props()` can only be used at the top level of components as a variable declaration initializer ") ;
}
/ * *
* ` $ bindable() ` can only be used inside a ` $ props() ` declaration
* Cyclical dependency detected : % cycle %
* @ param { null | number | NodeLike } node
* @ param { string } cycle
* @ returns { never }
* /
export function bindable_invalid _location ( nod e) {
e ( node , " bindable_invalid_location", "`$bindable()` can only be used inside a `$props()` declaration" ) ;
export function reactive_declaration _cycle ( node , cycl e) {
e ( node , " reactive_declaration_cycle", ` Cyclical dependency detected: ${ cycle } ` ) ;
}
/ * *
* Cannot assign to % thing %
* ` %rune% ` cannot be called with arguments
* @ param { null | number | NodeLike } node
* @ param { string } thing
* @ param { string } rune
* @ returns { never }
* /
export function constant_assignment ( node , thing ) {
e ( node , " constant_assignment", ` Cannot assign to ${ thing } ` ) ;
export function rune_invalid _arguments ( node , rune ) {
e ( node , " rune_invalid_arguments", ` \` ${ rune } \` cannot be called with arguments ` ) ;
}
/ * *
* Cannot bind to % thing %
* ` %rune% ` must be called with % args %
* @ param { null | number | NodeLike } node
* @ param { string } thing
* @ param { string } rune
* @ param { string } args
* @ returns { never }
* /
export function constant_binding ( node , thing ) {
e ( node , " constant_binding", ` Cannot bind to ${ thing } ` ) ;
export function rune_invalid _arguments _length ( node , rune , args ) {
e ( node , " rune_invalid_arguments_length", ` \` ${ rune } \` must be called with ${ args } ` ) ;
}
/ * *
* Cannot export derived state from a module . To expose the current derived value , export a function returning its valu e
* Cannot use % rune % rune in non - runes mod e
* @ param { null | number | NodeLike } node
* @ param { string } rune
* @ returns { never }
* /
export function derived_invalid _export ( nod e) {
e ( node , " derived_invalid_export", "Cannot export derived state from a module. To expose the current derived value, export a function returning its value" ) ;
export function rune_invalid _usage ( node , run e) {
e ( node , " rune_invalid_usage", ` Cannot use ${ rune } rune in non-runes mode ` ) ;
}
/ * *
* Cannot reassign or bind to each block argument in runes mode . Use the array and index variables instead ( e . g . ` array[i] = value ` instead of ` entry = value ` )
* % name % cannot be used in runes mode
* @ param { null | number | NodeLike } node
* @ param { string } name
* @ returns { never }
* /
export function each_item _invalid _assignment ( nod e) {
e ( node , " each_item_invalid_assignment", "Cannot reassign or bind to each block argument in runes mode. Use the array and index variables instead (e.g. `array[i] = value` instead of `entry = value`)" ) ;
export function runes_mode _invalid _import ( node , nam e) {
e ( node , " runes_mode_invalid_import", ` ${ name } cannot be used in runes mode ` ) ;
}
/ * *
* ` $ effect() ` can only be used as an expression statement
* Cannot reassign or bind to snippet parameter
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function effect_invalid _place ment( node ) {
e ( node , " effect_invalid_placement", "`$effect()` can only be used as an expression statement ") ;
export function snippet_parameter _assign ment( node ) {
e ( node , " snippet_parameter_assignment", "Cannot reassign or bind to snippet parameter ") ;
}
/ * *
* ` $ host() ` can only be used inside custom element component instanc es
* Cannot export state from a module if it is reassigned . Either export a function returning the state value or only mutate the state value ' s properti es
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function host_invalid _placemen t( node ) {
e ( node , " host_invalid_placement", "`$host()` can only be used inside custom element component instanc es") ;
export function state_invalid _expor t( node ) {
e ( node , " state_invalid_export", "Cannot export state from a module if it is reassigned. Either export a function returning the state value or only mutate the state value's properti es") ;
}
/ * *
* Cannot use ` export let ` in runes mode — use $props instea d
* ` %rune%(...) ` can only be used as a variable declaration initializer or a class fiel d
* @ param { null | number | NodeLike } node
* @ param { string } rune
* @ returns { never }
* /
export function legacy_export _invalid ( nod e) {
e ( node , " legacy_export_invalid", "Cannot use `export let` in runes mode — use $props instead" ) ;
export function state_invalid _placement ( node , run e) {
e ( node , " state_invalid_placement", ` \` ${ rune } (...) \` can only be used as a variable declaration initializer or a class field ` ) ;
}
/ * *
* Cannot use ` $ $ props ` in runes mode
* Cannot subscribe to stores that are not declared at the top level of the component
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function legacy_props _invalid ( node ) {
e ( node , " legacy_props_invalid", "Cannot use `$$props` in runes mode ") ;
export function store_invalid _scoped _subscription ( node ) {
e ( node , " store_invalid_scoped_subscription", "Cannot subscribe to stores that are not declared at the top level of the component ") ;
}
/ * *
* ` $ : ` is not allowed in runes mode , use ` $ derived ` or ` $ effect ` instead
* Cannot reference store value inside ` <script context="module"> `
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function legacy_reactive _statement _invalid ( node ) {
e ( node , " legacy_reactive_statement_invalid", "`$:` is not allowed in runes mode, use `$derived` or `$effect` instead ") ;
export function store_invalid _subscription ( node ) {
e ( node , " store_invalid_subscription", "Cannot reference store value inside `<script context=\"module\">` ") ;
}
/ * *
* Cannot use ` $ $ restProps ` in runes mode
* Declaration cannot be empty
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function legacy_rest _props _invalid ( node ) {
e ( node , " legacy_rest_props_invalid", "Cannot use `$$restProps` in runes mode ") ;
export function css_empty _declaration ( node ) {
e ( node , " css_empty_declaration", "Declaration cannot be empty ") ;
}
/ * *
* Cannot use ` $ props() ` more than once
* A : global { ... } block cannot follow a % name % combinator
* @ param { null | number | NodeLike } node
* @ param { string } name
* @ returns { never }
* /
export function props_duplicate ( nod e) {
e ( node , " props_duplicate", "Cannot use `$props()` more than once" ) ;
export function css_global _block _invalid _combinator ( node , nam e) {
e ( node , " css_global_block_invalid_combinator", ` A :global {...} block cannot follow a ${ name } combinator ` ) ;
}
/ * *
* ` $ props() ` can only be used with an object destructuring pattern
* A : global { ... } block can only contain rules , not declarations
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function props_invalid _identifier ( node ) {
e ( node , " props_invalid_identifier", "`$props()` can only be used with an object destructuring pattern ") ;
export function css_global _block _invalid _declaration ( node ) {
e ( node , " css_global_block_invalid_declaration", "A :global {...} block can only contain rules, not declarations ") ;
}
/ * *
* ` $ props() ` assignment must not contain nested properties or computed keys
* A : global { ... } block cannot be part of a selector list with more than one item
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function props_invalid _pattern ( node ) {
e ( node , " props_invalid_pattern", "`$props()` assignment must not contain nested properties or computed keys ") ;
export function css_global _block _invalid _list ( node ) {
e ( node , " css_global_block_invalid_list", "A :global {...} block cannot be part of a selector list with more than one item ") ;
}
/ * *
* ` $ props() ` can only be used at the top level of components as a variable declaration initialize r
* A : global { ... } block cannot modify an existing selecto r
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function props_invalid _placement ( node ) {
e ( node , " props_invalid_placement", "`$props()` can only be used at the top level of components as a variable declaration initialize r") ;
export function css_global _block _invalid _modifier ( node ) {
e ( node , " css_global_block_invalid_modifier", "A :global {...} block cannot modify an existing selecto r") ;
}
/ * *
* ` %rune% ` cannot be called with arguments
* : global ( ... ) can be at the start or end of a selector sequence , but not in the middle
* @ param { null | number | NodeLike } node
* @ param { string } rune
* @ returns { never }
* /
export function rune_invalid _arguments ( node , run e) {
e ( node , " rune_invalid_arguments", ` \` ${ rune } \` cannot be called with arguments ` ) ;
export function css_global _invalid _placement ( nod e) {
e ( node , " css_global_invalid_placement", ":global(...) can be at the start or end of a selector sequence, but not in the middle" ) ;
}
/ * *
* ` %rune% ` must be called with % args %
* : global ( ... ) must contain exactly one selector
* @ param { null | number | NodeLike } node
* @ param { string } rune
* @ param { string } args
* @ returns { never }
* /
export function rune_invalid _arguments _length ( node , rune , args ) {
e ( node , " rune_invalid_arguments_length", ` \` ${ rune } \` must be called with ${ args } ` ) ;
export function css_global _invalid _selector ( node ) {
e ( node , " css_global_invalid_selector", ":global(...) must contain exactly one selector" ) ;
}
/ * *
* Cannot use % rune % rune in non - runes mode
* : global ( ... ) must not contain type or universal selectors when used in a compound selector
* @ param { null | number | NodeLike } node
* @ param { string } rune
* @ returns { never }
* /
export function rune_invalid _usage ( node , run e) {
e ( node , " rune_invalid_usage", ` Cannot use ${ rune } rune in non-runes mode ` ) ;
export function css_global _invalid _selector _list ( nod e) {
e ( node , " css_global_invalid_selector_list", ":global(...) must not contain type or universal selectors when used in a compound selector" ) ;
}
/ * *
* % name % cannot be used in runes mode
* Expected a valid CSS identifier
* @ param { null | number | NodeLike } node
* @ param { string } name
* @ returns { never }
* /
export function runes_mode _invalid _import ( node , nam e) {
e ( node , " runes_mode_invalid_import", ` ${ name } cannot be used in runes mode ` ) ;
export function css_expected _identifier ( nod e) {
e ( node , " css_expected_identifier", "Expected a valid CSS identifier" ) ;
}
/ * *
* Cannot reassign or bind to snippet paramete r
* Invalid selecto r
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function snippet_parameter _assignment ( node ) {
e ( node , " snippet_parameter_assignment", "Cannot reassign or bind to snippet paramete r") ;
export function css_selector _invalid ( node ) {
e ( node , " css_selector_invalid", "Invalid selecto r") ;
}
/ * *
* Cannot export state from a module if it is reassigned . Either export a function returning the state value or only mutate the state value ' s properties
* : global ( ... ) must not be followed with a type selector
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function state_invalid _expor t( node ) {
e ( node , " state_invalid_export", "Cannot export state from a module if it is reassigned. Either export a function returning the state value or only mutate the state value's properties ") ;
export function css_type _selector _invalid _placemen t( node ) {
e ( node , " css_type_selector_invalid_placement", ":global(...) must not be followed with a type selector ") ;
}
/ * *
* ` %rune%(...) ` can only be used as a variable declaration initializer or a class field
* Nesting selectors can only be used inside a rule
* @ param { null | number | NodeLike } node
* @ param { string } rune
* @ returns { never }
* /
export function state _invalid _placement ( nod e, run e) {
e ( node , " state_invalid_placement", ` \` ${ rune } (...) \` can only be used as a variable declaration initializer or a class field ` ) ;
export function css_nesting _selector _invalid _placement ( nod e) {
e ( node , " css_nesting_selector_invalid_placement", "Nesting selectors can only be used inside a rule" ) ;
}
/ * *