<commit_before>import MDCRippleFoundation from '@material/ripple/foundation.js'
import {supportsCssVariables, getMatchesProperty, applyPassive} from '@material/ripple/util'

export class RippleBase extends MDCRippleFoundation {

  static get MATCHES () {
    /* global HTMLElement */
    return RippleBase._matches ||
      ( RippleBase._matches = getMatchesProperty(HTMLElement.prototype))
  }

  static isSurfaceActive (ref) {
    return ref[RippleBase.MATCHES](':active')
  }

  constructor (vm, options) {
    super(Object.assign({
      browserSupportsCssVars: () => {
        return supportsCssVariables(window)
      },
      isUnbounded: () => {
        return false
      },
      isSurfaceActive: () => {
        return vm.$el[RippleBase.MATCHES](':active')
      },
      isSurfaceDisabled: () => {
        return vm.disabled
      },
      addClass (className) {
        vm.$set(vm.classes, className, true)
      },
      removeClass (className) {
        vm.$delete(vm.classes, className)
      },
      registerInteractionHandler: (evt, handler) => {
        vm.$el.addEventListener(evt, handler)
      },
      deregisterInteractionHandler: (evt, handler) => {
        vm.$el.removeEventListener(evt, handler)
      },
      registerDocumentInteractionHandler: (evtType, handler) =>
        document.documentElement.addEventListener(evtType, handler, applyPassive()),
      deregisterDocumentInteractionHandler: (evtType, handler) =>
        document.documentElement.removeEventListener(evtType, handler, applyPassive()),
      registerResizeHandler: (handler) => {
        return window.addEventListener('resize', handler)
      },
      deregisterResizeHandler: (handler) => {
        return window.removeEventListener('resize', handler)
      },
      updateCssVariable: (varName, value) => {
        vm.$set(vm.styles, varName, value)<commit_msg>feat(ripple): new ripple style and behavior as per MDCWeb 0.30.0<commit_after>import MDCRippleFoundation from '@material/ripple/foundation.js'
import {supportsCssVariables, getMatchesProperty, applyPassive} from '@material/ripple/util'

export class RippleBase extends MDCRippleFoundation {

  static get MATCHES () {
    /* global HTMLElement */
    return RippleBase._matches ||
      ( RippleBase._matches = getMatchesProperty(HTMLElement.prototype))
  }

  static isSurfaceActive (ref) {
    return ref[RippleBase.MATCHES](':active')
  }

  constructor (vm, options) {
    super(Object.assign({
      browserSupportsCssVars: () => {
        return supportsCssVariables(window)
      },
      isUnbounded: () => {
        return false
      },
      isSurfaceActive: () => {
        return vm.$el[RippleBase.MATCHES](':active')
      },
      isSurfaceDisabled: () => {
        return vm.disabled
      },
      addClass (className) {
        vm.$set(vm.classes, className, true)
      },
      removeClass (className) {
        vm.$delete(vm.classes, className)
      },
      containsEventTarget: (target) => vm.$el.contains(target),
      registerInteractionHandler: (evt, handler) => {
        vm.$el.addEventListener(evt, handler)
      },
      deregisterInteractionHandler: (evt, handler) => {
        vm.$el.removeEventListener(evt, handler)
      },
      registerDocumentInteractionHandler: (evtType, handler) =>
        document.documentElement.addEventListener(evtType, handler, applyPassive()),
      deregisterDocumentInteractionHandler: (evtType, handler) =>
        document.documentElement.removeEventListener(evtType, handler, applyPassive()),
      registerResizeHandler: (handler) => {
        return window.addEventListener('resize', handler)
      },
      deregisterResizeHandler: (handler) => {
        return window.removeEventListener('resize', handler)
      },
      updateCssVariable: (varName, value) => {
        vm.$set(vm.styles, varName, value)
{'fraction_non_alphanumeric': 0.1221731219131791, 'fraction_numerical': 0.0010397712503249284, 'mean_word_length': 3.1826086956521737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 26, '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': '6628904', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1071, 'n_words': 195}