<commit_before>'use strict';

module.exports = {
  enter: function(el, done) {

  },

  enterCancelled: function(el) {

  },

  leave: function(el, done) {

  },

  leaveCancelled: function(el) {

  },
};<commit_msg>create slide animation<commit_after>'use strict';

function slide(el, value, done) {

  if (!this.rect) {
    el.style.height = null;
    this.rect = el.getBoundingClientRect().height;
  }

  value = typeof value != 'number' ? this.rect : value;

  dyn.stop(el);
  dyn.animate(el, {
    height: value,
  }, {
    duration: 700,
    complete: function() {
      if (done) done.call();
    },
  });
};

module.exports = {
  enter: function(el, done) {
    slide.call(this, el, null, done);
  },

  enterCancelled: function(el) {
    slide.call(this, el, 0);

  },

  leave: function(el, done) {
    slide.call(this, el, 0, done);
  },

  leaveCancelled: function(el) {
    slide.call(this, el, null);
  },
};
{'fraction_non_alphanumeric': 0.17678958785249457, 'fraction_numerical': 0.005422993492407809, 'mean_word_length': 2.9956709956709955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '927005', 'n_tokens_mistral': 356, 'n_tokens_neox': 335, 'n_words': 69}