<commit_before><!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="codemirror-import.html">

<polymer-element name="code-mirror" attributes="value mode theme tabSize lineNumbers">
  <template>
    <link rel="stylesheet" href="codemirror-5.0/lib/codemirror.css">
    <link href="codemirror-5.0/theme/ambiance.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/ambiance-mobile.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/blackboard.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/cobalt.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/eclipse.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/elegant.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/erlang-dark.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/lesser-dark.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/midnight.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/monokai.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/neat.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/night.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/rubyblue.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/solarized.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/twilight.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/vibrant-ink.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/xq-dark.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/xq-light.css" rel="stylesheet">
    <link href="codemirror-5.0/addon/fold/foldgutter.css" rel="stylesheet">

    <style>
      :host {
        display: block;
        height: auto;
      }
      .CodeMirror {
        border: 1px solid #eee;
        top: 0;
        left: 0;
        height: inherit;
      }
    </style>
  </template>
  <script>
    Polymer('code-mirror', {
      value: '',
      mode: 'htmlmixed',
      theme: 'xq-light',
      tabSize: 2,
      lineNumbers: true,
      viewportMargin: Infinity,
      ready: function() {
        if (!this.value) {
          this.value = this.textContent;
        }
        this.mirror = CodeMirror(this.shadowRoot, {
          value: this.value || this.textContent,
          mode: this.mode,
          theme: this.theme,
          tabSize: this.tabSize,
          lineNumbers: this.lineNumbers,
          viewportMargin: Infinity,
          foldGutter: true,
          gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
        });
        var self = this
        this.mirror.on("change", function () {
            self.currentValue = self.mirror.getValue()
            self.fire("change")
        })
      },
      refresh: function() {
        this.mirror.refresh();
      },
      valueChanged: function() {
        this.mirror.setValue(this.value);
      },
      modeChanged: function() {
        this.mirror.setOption('mode', this.mode);
      },
      themeChanged: function() {
        this.mirror.setOption('theme', this.theme);
      },
      tabSizeChanged: function() {
        this.mirror.setOption('tabSize', this.tabSize);
      },
      lineNumbersChanged: function() {
        this.mirror.setOption('lineNumbers', this.lineNumbers);
      },
      focus: function() {
        this.mirror.focus();
      }
    });
  </script>
</polymer-element>
<commit_msg>make code mirror default style more bare-bones<commit_after><!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="codemirror-import.html">

<polymer-element name="code-mirror" attributes="value mode theme tabSize lineNumbers">
  <template>
    <link rel="stylesheet" href="codemirror-5.0/lib/codemirror.css">
    <link href="codemirror-5.0/theme/ambiance.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/ambiance-mobile.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/blackboard.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/cobalt.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/eclipse.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/elegant.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/erlang-dark.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/lesser-dark.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/midnight.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/monokai.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/neat.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/night.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/rubyblue.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/solarized.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/twilight.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/vibrant-ink.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/xq-dark.css" rel="stylesheet">
    <link href="codemirror-5.0/theme/xq-light.css" rel="stylesheet">
    <link href="codemirror-5.0/addon/fold/foldgutter.css" rel="stylesheet">

    <style>
      :host {
        display: block;
        height: auto;
      }
      .CodeMirror {
        top: 0;
        left: 0;
        height: inherit;
      }
    </style>
  </template>
  <script>
    Polymer('code-mirror', {
      value: '',
      mode: 'htmlmixed',
      theme: 'xq-light',
      tabSize: 2,
      lineNumbers: true,
      viewportMargin: Infinity,
      ready: function() {
        if (!this.value) {
          this.value = this.textContent;
        }
        this.mirror = CodeMirror(this.shadowRoot, {
          value: this.value || this.textContent,
          mode: this.mode,
          theme: this.theme,
          tabSize: this.tabSize,
          readOnly: this.readOnly,
          lineNumbers: this.lineNumbers,
          viewportMargin: Infinity,
          foldGutter: true,
          gutters: ["CodeMirror-linenumbers"]
        });
        var self = this
        this.mirror.on("change", function () {
            self.currentValue = self.mirror.getValue()
            self.fire("change")
        })
      },
      refresh: function() {
        this.mirror.refresh();
      },
      valueChanged: function() {
        this.mirror.setValue(this.value);
      },
      modeChanged: function() {
        this.mirror.setOption('mode', this.mode);
      },
      themeChanged: function() {
        this.mirror.setOption('theme', this.theme);
      },
      tabSizeChanged: function() {
        this.mirror.setOption('tabSize', this.tabSize);
      },
      lineNumbersChanged: function() {
        this.mirror.setOption('lineNumbers', this.lineNumbers);
      },
      focus: function() {
        this.mirror.focus();
      }
    });
  </script>
</polymer-element>

{'fraction_non_alphanumeric': 0.15710012818686797, 'fraction_numerical': 0.013530836063238854, 'mean_word_length': 2.7331206804891015, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 65, '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': '4435935', 'n_tokens_mistral': 2371, 'n_tokens_neox': 2321, 'n_words': 393}