<commit_before>import mediumZoom from 'medium-zoom'

const camelCased = string =>
  string.replace(/-([a-z])/g, g => g[1].toUpperCase())

const template = document.createElement('template')
template.innerHTML = `
<style>
  :host {
    display: block;
  }
  img {
    max-width: 100%;
  }
  .medium-zoom-image {
    cursor: zoom-in;
  }
</style>
<img />
`

export default class MediumZoom extends HTMLElement {
  static get optionAttributes() {
    return [
      'margin',
      'background',
      'scroll-offset',
      'disable-metaclick',
      'zoom-target'
    ]
  }

  static get observedAttributes() {
    return [...MediumZoom.optionAttributes, 'width', 'height']
  }

  static getOptionName(value) {
    return value === 'disable-metaclick' ? 'metaClick' : camelCased(value)
  }

  constructor() {<commit_msg>Observe `src` and `alt` attributes<commit_after>import mediumZoom from 'medium-zoom'

const camelCased = string =>
  string.replace(/-([a-z])/g, g => g[1].toUpperCase())

const template = document.createElement('template')
template.innerHTML = `
<style>
  :host {
    display: block;
  }
  img {
    max-width: 100%;
  }
  .medium-zoom-image {
    cursor: zoom-in;
  }
</style>
<img />
`

export default class MediumZoom extends HTMLElement {
  static get optionAttributes() {
    return [
      'margin',
      'background',
      'scroll-offset',
      'disable-metaclick',
      'zoom-target'
    ]
  }

  static get observedAttributes() {
    return [...MediumZoom.optionAttributes, 'src', 'alt', 'width', 'height']
  }

  static getOptionName(value) {
    return value === 'disable-metaclick' ? 'metaClick' : camelCased(value)
  }

  constructor() {
{'fraction_non_alphanumeric': 0.15421398684997012, 'fraction_numerical': 0.004781829049611476, 'mean_word_length': 3.1538461538461537, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2413908', 'n_tokens_mistral': 562, 'n_tokens_neox': 549, 'n_words': 118}