<commit_before>;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2015-2016 <NAME> <<EMAIL>>
;; Copyright (c) 2015-2016 <NAME> <<EMAIL>>

(ns uxbox.state
  (:require [beicon.core :as rx]
            [lentes.core :as l]
            [uxbox.rstore :as rs]
            [uxbox.util.storage :refer (storage)]))

(defonce state (atom {}))

(def auth-l
  (-> (l/key :auth)
      (l/focus-atom state)))

(def loader-l
  (-> (l/key :loader)
      (l/focus-atom state)))

(defn get-initial-state
  []
  {:dashboard {:project-order :name
               :project-filter ""}
   :route nil
   :auth (:uxbox/auth storage nil)
   :clipboard #queue []
   :profile nil
   :workspace nil
   :shapes-by-id {}
   :elements-by-id {}
   :colors-by-id {}
   :icons-by-id {}<commit_msg>Move loader state under sparated atom under uxbox.state ns.<commit_after>;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2015-2016 <NAME> <<EMAIL>>
;; Copyright (c) 2015-2016 <NAME> <<EMAIL>>

(ns uxbox.state
  (:require [beicon.core :as rx]
            [lentes.core :as l]
            [uxbox.rstore :as rs]
            [uxbox.util.storage :refer (storage)]))

(defonce state (atom {}))

(def auth-l
  (-> (l/key :auth)
      (l/focus-atom state)))

(def loader (atom false))

(defn get-initial-state
  []
  {:dashboard {:project-order :name
               :project-filter ""}
   :route nil
   :auth (:uxbox/auth storage nil)
   :clipboard #queue []
   :profile nil
   :workspace nil
   :shapes-by-id {}
   :elements-by-id {}
   :colors-by-id {}
   :icons-by-id {}
{'fraction_non_alphanumeric': 0.16211878009630817, 'fraction_numerical': 0.021401819154628143, 'mean_word_length': 2.659491193737769, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 18, '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': '4513399', 'n_tokens_mistral': 698, 'n_tokens_neox': 659, 'n_words': 200}