<commit_before><link rel="import" href="noflo-main.html">
<link rel="import" href="../bower_components/the-graph/the-graph-editor/the-graph-editor.html">
<link rel="import" href="noflo-library.html">
<link rel="import" href="noflo-context.html">
<link rel="import" href="noflo-runtime.html">
<link rel="import" href="noflo-journal.html">
<link rel="import" href="noflo-component-editor.html">
<link rel="import" href="noflo-search.html">
<link rel="import" href="noflo-project.html">
<link rel="import" href="noflo-packets.html">
<polymer-element name="noflo-ui" attributes="width height">
  <template>
    <style>
      the-graph-editor {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
      }

      noflo-component-editor {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 36px;
        right: 0;
        z-index: 0;
      }
    </style>
    <noflo-main id="main"></noflo-main>
    <the-graph-editor id="grapheditor" width="{{ width }}" height="{{ height }}"></the-graph-editor>
    <noflo-library></noflo-library>
    <noflo-runtime id="runtime"></noflo-runtime>
    <noflo-journal id="journal"></noflo-journal>
    <noflo-component-editor id="componenteditor" width="{{ width }}" height="{{ height }}"></noflo-component-editor>
    <noflo-search id="search"></noflo-search>
    <noflo-project id="project"></noflo-project>
    <noflo-packets></noflo-packets>
  </template>
  <script>
    Polymer('noflo-ui', {
      width: window.innerWidth,
      height: window.innerHeight,
      runtimes: function (runtimes) {
        runtimes.forEach(this.$.main.runtimes.bind(this.$.main));
      },
      projects: function (projects) {
        projects.forEach(this.$.main.projects.bind(this.$.main));
      },
      ready: function () {
        this.$.main.addEventListener('logout', function (event) {
          this.fire('user:logout', true);
        }.bind(this));
        this.$.main.addEventListener('login', function (event) {
          this.fire('user:login', true);
        }.bind(this));
        this.$.search.addEventListener('search', function (event) {
          this.fire('search', event.detail.search);
        }.bind(this));
        this.$.journal.editor = this.$.grapheditor;
      },
      context: function (context) {
        console.log('CTX is', context);
        if (context.state === 'loading') {
          return;<commit_msg>Subscribe to selection events<commit_after><link rel="import" href="noflo-main.html">
<link rel="import" href="../bower_components/the-graph/the-graph-editor/the-graph-editor.html">
<link rel="import" href="noflo-library.html">
<link rel="import" href="noflo-context.html">
<link rel="import" href="noflo-runtime.html">
<link rel="import" href="noflo-journal.html">
<link rel="import" href="noflo-component-editor.html">
<link rel="import" href="noflo-search.html">
<link rel="import" href="noflo-project.html">
<link rel="import" href="noflo-packets.html">
<polymer-element name="noflo-ui" attributes="width height">
  <template>
    <style>
      the-graph-editor {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
      }

      noflo-component-editor {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 36px;
        right: 0;
        z-index: 0;
      }
    </style>
    <noflo-main id="main"></noflo-main>
    <the-graph-editor id="grapheditor" width="{{ width }}" height="{{ height }}"></the-graph-editor>
    <noflo-library></noflo-library>
    <noflo-runtime id="runtime"></noflo-runtime>
    <noflo-journal id="journal"></noflo-journal>
    <noflo-component-editor id="componenteditor" width="{{ width }}" height="{{ height }}"></noflo-component-editor>
    <noflo-search id="search"></noflo-search>
    <noflo-project id="project"></noflo-project>
    <noflo-packets></noflo-packets>
  </template>
  <script>
    Polymer('noflo-ui', {
      width: window.innerWidth,
      height: window.innerHeight,
      runtimes: function (runtimes) {
        runtimes.forEach(this.$.main.runtimes.bind(this.$.main));
      },
      projects: function (projects) {
        projects.forEach(this.$.main.projects.bind(this.$.main));
      },
      ready: function () {
        this.$.main.addEventListener('logout', function (event) {
          this.fire('user:logout', true);
        }.bind(this));
        this.$.main.addEventListener('login', function (event) {
          this.fire('user:login', true);
        }.bind(this));
        this.$.grapheditor.addEventListener('edges', function (event) {
          this.fire('context:edges', event.detail);
        }.bind(this));
        this.$.grapheditor.addEventListener('nodes', function (event) {
          this.fire('context:nodes', event.detail);
        }.bind(this));
        this.$.search.addEventListener('search', function (event) {
          this.fire('context:search', event.detail.search);
        }.bind(this));
        this.$.journal.editor = this.$.grapheditor;
      },
      context: function (context) {
        console.log('CTX is', context);
        if (context.state === 'loading') {
          return;
{'fraction_non_alphanumeric': 0.18366951124903025, 'fraction_numerical': 0.003878975950349108, 'mean_word_length': 2.930640243902439, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, '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': '475970', 'n_tokens_mistral': 1695, 'n_tokens_neox': 1664, 'n_words': 282}