diff --git a/src/compiler/compile/render_dom/wrappers/Element/Attribute.js b/src/compiler/compile/render_dom/wrappers/Element/Attribute.js index 7906a2ee67..615f238c4c 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Attribute.js +++ b/src/compiler/compile/render_dom/wrappers/Element/Attribute.js @@ -6,332 +6,334 @@ import { namespaces } from '../../../../utils/namespaces.js'; import { boolean_attributes } from '../../../../../shared/boolean_attributes.js'; import { regex_double_quotes } from '../../../../utils/patterns.js'; const non_textlike_input_types = new Set([ - 'button', - 'checkbox', - 'color', - 'date', - 'datetime-local', - 'file', - 'hidden', - 'image', - 'radio', - 'range', - 'reset', - 'submit' + 'button', + 'checkbox', + 'color', + 'date', + 'datetime-local', + 'file', + 'hidden', + 'image', + 'radio', + 'range', + 'reset', + 'submit' ]); /** */ export class BaseAttributeWrapper { + /** @type {import('../../../nodes/Attribute.js').default} */ + node; - /** @type {import('../../../nodes/Attribute.js').default} */ - node; + /** @type {import('./index.js').default} */ + parent; + constructor(parent, block, node) { + this.node = node; + this.parent = parent; + if (node.dependencies.size > 0) { + block.add_dependencies(node.dependencies); + } + } - /** @type {import('./index.js').default} */ - parent; - constructor(parent, block, node) { - this.node = node; - this.parent = parent; - if (node.dependencies.size > 0) { - block.add_dependencies(node.dependencies); - } - } - - /** @param {import('../../Block.js').default} _block */ - render(_block) { } + /** @param {import('../../Block.js').default} _block */ + render(_block) {} } const regex_minus_sign = /-/; const regex_invalid_variable_identifier_characters = /[^a-zA-Z_$]/g; /** @extends BaseAttributeWrapper */ export default class AttributeWrapper extends BaseAttributeWrapper { + /** @type {import('../../../nodes/Attribute.js').default} */ + node; - /** @type {import('../../../nodes/Attribute.js').default} */ - node; - - /** @type {import('./index.js').default} */ - parent; + /** @type {import('./index.js').default} */ + parent; - /** @type {any} */ - metadata; + /** @type {any} */ + metadata; - /** @type {string} */ - name; + /** @type {string} */ + name; - /** @type {string} */ - property_name; + /** @type {string} */ + property_name; - /** @type {boolean} */ - is_indirectly_bound_value; + /** @type {boolean} */ + is_indirectly_bound_value; - /** @type {boolean} */ - is_src; + /** @type {boolean} */ + is_src; - /** @type {boolean} */ - is_select_value_attribute; + /** @type {boolean} */ + is_select_value_attribute; - /** @type {boolean} */ - is_input_value; + /** @type {boolean} */ + is_input_value; - /** @type {boolean} */ - should_cache; + /** @type {boolean} */ + should_cache; - /** @type {import('estree').Identifier} */ - last; - constructor(parent, block, node) { - super(parent, block, node); - if (node.dependencies.size > 0) { - // special case —