From 929a0a84da5c5e7942b2fa7cbec9eff3bb1a703e Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 14 Jun 2016 17:39:44 +0300 Subject: [PATCH] Restructure the source directory tree. In order to provide space for other applications that shares source with the main app. --- src/uxbox/common/constants.cljs | 9 ++++ src/uxbox/{util => common}/geom.cljs | 8 ++-- src/uxbox/{util => common}/geom/matrix.cljs | 4 +- src/uxbox/{util => common}/geom/point.cljs | 2 +- src/uxbox/{locales.cljs => common/i18n.cljs} | 14 +++--- src/uxbox/{ => common}/repo.cljs | 24 +++++----- src/uxbox/{ => common}/repo/auth.cljs | 7 ++- src/uxbox/{ => common}/repo/colors.cljs | 6 +-- src/uxbox/{ => common}/repo/images.cljs | 7 ++- .../{repo/core.cljs => common/repo/impl.cljs} | 21 ++++----- src/uxbox/{ => common}/repo/pages.cljs | 6 +-- src/uxbox/{ => common}/repo/projects.cljs | 10 ++--- src/uxbox/{ => common}/repo/users.cljs | 5 ++- src/uxbox/{ => common}/router.cljs | 4 +- src/uxbox/{ => common}/rstore.cljs | 5 +-- src/uxbox/{ => common}/schema.cljs | 6 +-- src/uxbox/{util => common}/workers.cljs | 2 +- src/uxbox/main.cljs | 10 +++-- src/uxbox/{ => main}/constants.cljs | 2 +- src/uxbox/{ => main}/data/auth.cljs | 29 ++++++------ src/uxbox/{ => main}/data/colors.cljs | 10 ++--- src/uxbox/{ => main}/data/core.cljs | 8 ++-- src/uxbox/{ => main}/data/dashboard.cljs | 18 ++++---- src/uxbox/{ => main}/data/forms.cljs | 12 ++--- src/uxbox/{ => main}/data/history.cljs | 18 ++++---- src/uxbox/{ => main}/data/images.cljs | 8 ++-- src/uxbox/{ => main}/data/lightbox.cljs | 4 +- src/uxbox/{ => main}/data/messages.cljs | 4 +- src/uxbox/{ => main}/data/pages.cljs | 16 +++---- src/uxbox/{ => main}/data/projects.cljs | 18 ++++---- src/uxbox/{ => main}/data/shapes.cljs | 26 +++++------ src/uxbox/{ => main}/data/users.cljs | 16 +++---- src/uxbox/{ => main}/data/workspace.cljs | 32 +++++++------- src/uxbox/{ => main}/library.cljs | 10 ++--- src/uxbox/{ => main}/library/colors.cljs | 2 +- src/uxbox/{ => main}/library/fonts.cljs | 2 +- src/uxbox/{ => main}/library/icons.cljs | 32 +++++++------- .../{ => main}/library/icons/material/LICENSE | 0 .../library/icons/material/actions.cljs | 2 +- .../library/icons/material/alerts.cljs | 2 +- .../{ => main}/library/icons/material/av.cljs | 2 +- .../library/icons/material/communication.cljs | 2 +- .../library/icons/material/content.cljs | 2 +- .../library/icons/material/device.cljs | 2 +- .../library/icons/material/editor.cljs | 2 +- .../library/icons/material/file.cljs | 2 +- .../library/icons/material/hardware.cljs | 2 +- .../library/icons/material/image.cljs | 2 +- .../library/icons/material/maps.cljs | 2 +- .../library/icons/material/navigation.cljs | 2 +- .../library/icons/material/notification.cljs | 2 +- .../library/icons/material/social.cljs | 2 +- .../library/icons/material/toggle.cljs | 2 +- src/uxbox/{ => main}/library/images.cljs | 2 +- src/uxbox/main/locales.cljs | 15 +++++++ src/uxbox/{ => main}/locales/en.cljs | 4 +- src/uxbox/{ => main}/state.cljs | 6 +-- src/uxbox/{ => main}/state/clipboard.cljs | 2 +- src/uxbox/{ => main}/state/colors.cljs | 2 +- src/uxbox/{ => main}/state/project.cljs | 2 +- src/uxbox/{ => main}/state/shapes.cljs | 4 +- src/uxbox/{ => main}/ui.cljs | 36 +++++++-------- src/uxbox/{ => main}/ui/auth.cljs | 10 ++--- src/uxbox/{ => main}/ui/auth/login.cljs | 20 ++++----- src/uxbox/{ => main}/ui/auth/recovery.cljs | 26 +++++------ .../{ => main}/ui/auth/recovery_request.cljs | 26 +++++------ src/uxbox/{ => main}/ui/auth/register.cljs | 26 +++++------ src/uxbox/{ => main}/ui/colorpicker.cljs | 6 +-- src/uxbox/{ => main}/ui/confirm.cljs | 10 ++--- src/uxbox/{ => main}/ui/core.cljs | 2 +- src/uxbox/main/ui/dashboard.cljs | 12 +++++ src/uxbox/{ => main}/ui/dashboard/colors.cljs | 32 +++++++------- .../{ => main}/ui/dashboard/elements.cljs | 18 ++++---- src/uxbox/{ => main}/ui/dashboard/header.cljs | 20 ++++----- src/uxbox/{ => main}/ui/dashboard/icons.cljs | 26 +++++------ src/uxbox/{ => main}/ui/dashboard/images.cljs | 28 ++++++------ .../{ => main}/ui/dashboard/projects.cljs | 28 ++++++------ src/uxbox/{ => main}/ui/forms.cljs | 6 +-- src/uxbox/{ => main}/ui/icons.cljs | 2 +- src/uxbox/{ => main}/ui/keyboard.cljs | 2 +- src/uxbox/{ => main}/ui/library_bar.cljs | 6 +-- src/uxbox/{ => main}/ui/lightbox.cljs | 10 ++--- src/uxbox/{ => main}/ui/loader.cljs | 12 ++--- src/uxbox/{ => main}/ui/messages.cljs | 10 ++--- src/uxbox/{ => main}/ui/mixins.cljs | 2 +- src/uxbox/{ => main}/ui/navigation.cljs | 2 +- src/uxbox/{ => main}/ui/settings.cljs | 18 ++++---- src/uxbox/{ => main}/ui/settings/header.cljs | 20 ++++----- .../{ => main}/ui/settings/notifications.cljs | 12 ++--- .../{ => main}/ui/settings/password.cljs | 26 +++++------ src/uxbox/{ => main}/ui/settings/profile.cljs | 24 +++++----- src/uxbox/{ => main}/ui/shapes.cljs | 8 ++-- src/uxbox/{ => main}/ui/shapes/attrs.cljs | 2 +- src/uxbox/{ => main}/ui/shapes/circle.cljs | 10 ++--- src/uxbox/{ => main}/ui/shapes/common.cljs | 14 +++--- src/uxbox/{ => main}/ui/shapes/group.cljs | 22 +++++----- src/uxbox/{ => main}/ui/shapes/icon.cljs | 10 ++--- src/uxbox/{ => main}/ui/shapes/line.cljs | 10 ++--- src/uxbox/{ => main}/ui/shapes/rect.cljs | 10 ++--- src/uxbox/{ => main}/ui/shapes/text.cljs | 16 +++---- src/uxbox/{ => main}/ui/users.cljs | 18 ++++---- src/uxbox/{ => main}/ui/workspace.cljs | 44 +++++++++---------- src/uxbox/{ => main}/ui/workspace/base.cljs | 14 +++--- src/uxbox/{ => main}/ui/workspace/canvas.cljs | 38 ++++++++-------- .../{ => main}/ui/workspace/clipboard.cljs | 16 +++---- .../{ => main}/ui/workspace/colorpalette.cljs | 20 ++++----- .../{ => main}/ui/workspace/colorpicker.cljs | 30 ++++++------- .../{ => main}/ui/workspace/download.cljs | 28 ++++++------ .../{ => main}/ui/workspace/drawarea.cljs | 24 +++++----- src/uxbox/{ => main}/ui/workspace/grid.cljs | 8 ++-- src/uxbox/{ => main}/ui/workspace/header.cljs | 28 ++++++------ src/uxbox/{ => main}/ui/workspace/images.cljs | 28 ++++++------ .../{ => main}/ui/workspace/movement.cljs | 18 ++++---- .../ui/workspace/recent_colors.cljs | 16 +++---- src/uxbox/{ => main}/ui/workspace/resize.cljs | 12 ++--- src/uxbox/{ => main}/ui/workspace/ruler.cljs | 12 ++--- src/uxbox/{ => main}/ui/workspace/rules.cljs | 10 ++--- src/uxbox/{ => main}/ui/workspace/scroll.cljs | 18 ++++---- .../{ => main}/ui/workspace/selection.cljs | 10 ++--- .../{ => main}/ui/workspace/selrect.cljs | 16 +++---- .../{ => main}/ui/workspace/settings.cljs | 28 ++++++------ .../{ => main}/ui/workspace/shortcuts.cljs | 14 +++--- .../{ => main}/ui/workspace/sidebar.cljs | 24 +++++----- .../ui/workspace/sidebar/drawtools.cljs | 20 ++++----- .../ui/workspace/sidebar/history.cljs | 26 +++++------ .../ui/workspace/sidebar/icons.cljs | 20 ++++----- .../ui/workspace/sidebar/layers.cljs | 22 +++++----- .../ui/workspace/sidebar/options.cljs | 42 +++++++++--------- .../sidebar/options/circle_measures.cljs | 26 +++++------ .../ui/workspace/sidebar/options/fill.cljs | 20 ++++----- .../sidebar/options/icon_measures.cljs | 26 +++++------ .../sidebar/options/line_measures.cljs | 26 +++++------ .../sidebar/options/rect_measures.cljs | 26 +++++------ .../ui/workspace/sidebar/options/stroke.cljs | 20 ++++----- .../ui/workspace/sidebar/options/text.cljs | 30 ++++++------- .../ui/workspace/sidebar/sitemap.cljs | 32 +++++++------- src/uxbox/ui/dashboard.cljs | 12 ----- src/uxbox/util/transit.cljs | 2 +- .../main.cljs => uxbox/worker.cljs} | 6 +-- src/{uxbox_worker => uxbox/worker}/align.cljs | 6 +-- src/{uxbox_worker => uxbox/worker}/impl.cljs | 2 +- 141 files changed, 955 insertions(+), 947 deletions(-) create mode 100644 src/uxbox/common/constants.cljs rename src/uxbox/{util => common}/geom.cljs (99%) rename src/uxbox/{util => common}/geom/matrix.cljs (97%) rename src/uxbox/{util => common}/geom/point.cljs (99%) rename src/uxbox/{locales.cljs => common/i18n.cljs} (82%) rename src/uxbox/{ => common}/repo.cljs (54%) rename src/uxbox/{ => common}/repo/auth.cljs (91%) rename src/uxbox/{ => common}/repo/colors.cljs (93%) rename src/uxbox/{ => common}/repo/images.cljs (93%) rename src/uxbox/{repo/core.cljs => common/repo/impl.cljs} (82%) rename src/uxbox/{ => common}/repo/pages.cljs (95%) rename src/uxbox/{ => common}/repo/projects.cljs (74%) rename src/uxbox/{ => common}/repo/users.cljs (91%) rename src/uxbox/{ => common}/router.cljs (96%) rename src/uxbox/{ => common}/rstore.cljs (97%) rename src/uxbox/{ => common}/schema.cljs (95%) rename src/uxbox/{util => common}/workers.cljs (98%) rename src/uxbox/{ => main}/constants.cljs (96%) rename src/uxbox/{ => main}/data/auth.cljs (89%) rename src/uxbox/{ => main}/data/colors.cljs (95%) rename src/uxbox/{ => main}/data/core.cljs (76%) rename src/uxbox/{ => main}/data/dashboard.cljs (79%) rename src/uxbox/{ => main}/data/forms.cljs (88%) rename src/uxbox/{ => main}/data/history.cljs (95%) rename src/uxbox/{ => main}/data/images.cljs (97%) rename src/uxbox/{ => main}/data/lightbox.cljs (93%) rename src/uxbox/{ => main}/data/messages.cljs (97%) rename src/uxbox/{ => main}/data/pages.cljs (94%) rename src/uxbox/{ => main}/data/projects.cljs (93%) rename src/uxbox/{ => main}/data/shapes.cljs (95%) rename src/uxbox/{ => main}/data/users.cljs (91%) rename src/uxbox/{ => main}/data/workspace.cljs (90%) rename src/uxbox/{ => main}/library.cljs (87%) rename src/uxbox/{ => main}/library/colors.cljs (97%) rename src/uxbox/{ => main}/library/fonts.cljs (99%) rename src/uxbox/{ => main}/library/icons.cljs (62%) rename src/uxbox/{ => main}/library/icons/material/LICENSE (100%) rename src/uxbox/{ => main}/library/icons/material/actions.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/alerts.cljs (94%) rename src/uxbox/{ => main}/library/icons/material/av.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/communication.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/content.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/device.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/editor.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/file.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/hardware.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/image.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/maps.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/navigation.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/notification.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/social.cljs (99%) rename src/uxbox/{ => main}/library/icons/material/toggle.cljs (98%) rename src/uxbox/{ => main}/library/images.cljs (99%) create mode 100644 src/uxbox/main/locales.cljs rename src/uxbox/{ => main}/locales/en.cljs (98%) rename src/uxbox/{ => main}/state.cljs (91%) rename src/uxbox/{ => main}/state/clipboard.cljs (93%) rename src/uxbox/{ => main}/state/colors.cljs (95%) rename src/uxbox/{ => main}/state/project.cljs (98%) rename src/uxbox/{ => main}/state/shapes.cljs (99%) rename src/uxbox/{ => main}/ui.cljs (83%) rename src/uxbox/{ => main}/ui/auth.cljs (63%) rename src/uxbox/{ => main}/ui/auth/login.cljs (85%) rename src/uxbox/{ => main}/ui/auth/recovery.cljs (81%) rename src/uxbox/{ => main}/ui/auth/recovery_request.cljs (80%) rename src/uxbox/{ => main}/ui/auth/register.cljs (85%) rename src/uxbox/{ => main}/ui/colorpicker.cljs (98%) rename src/uxbox/{ => main}/ui/confirm.cljs (88%) rename src/uxbox/{ => main}/ui/core.cljs (96%) create mode 100644 src/uxbox/main/ui/dashboard.cljs rename src/uxbox/{ => main}/ui/dashboard/colors.cljs (92%) rename src/uxbox/{ => main}/ui/dashboard/elements.cljs (92%) rename src/uxbox/{ => main}/ui/dashboard/header.cljs (81%) rename src/uxbox/{ => main}/ui/dashboard/icons.cljs (89%) rename src/uxbox/{ => main}/ui/dashboard/images.cljs (94%) rename src/uxbox/{ => main}/ui/dashboard/projects.cljs (93%) rename src/uxbox/{ => main}/ui/forms.cljs (71%) rename src/uxbox/{ => main}/ui/icons.cljs (99%) rename src/uxbox/{ => main}/ui/keyboard.cljs (90%) rename src/uxbox/{ => main}/ui/library_bar.cljs (94%) rename src/uxbox/{ => main}/ui/lightbox.cljs (89%) rename src/uxbox/{ => main}/ui/loader.cljs (76%) rename src/uxbox/{ => main}/ui/messages.cljs (92%) rename src/uxbox/{ => main}/ui/mixins.cljs (99%) rename src/uxbox/{ => main}/ui/navigation.cljs (92%) rename src/uxbox/{ => main}/ui/settings.cljs (59%) rename src/uxbox/{ => main}/ui/settings/header.cljs (78%) rename src/uxbox/{ => main}/ui/settings/notifications.cljs (85%) rename src/uxbox/{ => main}/ui/settings/password.cljs (83%) rename src/uxbox/{ => main}/ui/settings/profile.cljs (90%) rename src/uxbox/{ => main}/ui/shapes.cljs (81%) rename src/uxbox/{ => main}/ui/shapes/attrs.cljs (97%) rename src/uxbox/{ => main}/ui/shapes/circle.cljs (87%) rename src/uxbox/{ => main}/ui/shapes/common.cljs (86%) rename src/uxbox/{ => main}/ui/shapes/group.cljs (80%) rename src/uxbox/{ => main}/ui/shapes/icon.cljs (89%) rename src/uxbox/{ => main}/ui/shapes/line.cljs (86%) rename src/uxbox/{ => main}/ui/shapes/rect.cljs (87%) rename src/uxbox/{ => main}/ui/shapes/text.cljs (93%) rename src/uxbox/{ => main}/ui/users.cljs (83%) rename src/uxbox/{ => main}/ui/workspace.cljs (77%) rename src/uxbox/{ => main}/ui/workspace/base.cljs (90%) rename src/uxbox/{ => main}/ui/workspace/canvas.cljs (86%) rename src/uxbox/{ => main}/ui/workspace/clipboard.cljs (81%) rename src/uxbox/{ => main}/ui/workspace/colorpalette.cljs (88%) rename src/uxbox/{ => main}/ui/workspace/colorpicker.cljs (71%) rename src/uxbox/{ => main}/ui/workspace/download.cljs (61%) rename src/uxbox/{ => main}/ui/workspace/drawarea.cljs (88%) rename src/uxbox/{ => main}/ui/workspace/grid.cljs (91%) rename src/uxbox/{ => main}/ui/workspace/header.cljs (89%) rename src/uxbox/{ => main}/ui/workspace/images.cljs (70%) rename src/uxbox/{ => main}/ui/workspace/movement.cljs (74%) rename src/uxbox/{ => main}/ui/workspace/recent_colors.cljs (83%) rename src/uxbox/{ => main}/ui/workspace/resize.cljs (83%) rename src/uxbox/{ => main}/ui/workspace/ruler.cljs (94%) rename src/uxbox/{ => main}/ui/workspace/rules.cljs (96%) rename src/uxbox/{ => main}/ui/workspace/scroll.cljs (80%) rename src/uxbox/{ => main}/ui/workspace/selection.cljs (95%) rename src/uxbox/{ => main}/ui/workspace/selrect.cljs (90%) rename src/uxbox/{ => main}/ui/workspace/settings.cljs (85%) rename src/uxbox/{ => main}/ui/workspace/shortcuts.cljs (91%) rename src/uxbox/{ => main}/ui/workspace/sidebar.cljs (72%) rename src/uxbox/{ => main}/ui/workspace/sidebar/drawtools.cljs (88%) rename src/uxbox/{ => main}/ui/workspace/sidebar/history.cljs (90%) rename src/uxbox/{ => main}/ui/workspace/sidebar/icons.cljs (87%) rename src/uxbox/{ => main}/ui/workspace/sidebar/layers.cljs (95%) rename src/uxbox/{ => main}/ui/workspace/sidebar/options.cljs (73%) rename src/uxbox/{ => main}/ui/workspace/sidebar/options/circle_measures.cljs (82%) rename src/uxbox/{ => main}/ui/workspace/sidebar/options/fill.cljs (85%) rename src/uxbox/{ => main}/ui/workspace/sidebar/options/icon_measures.cljs (83%) rename src/uxbox/{ => main}/ui/workspace/sidebar/options/line_measures.cljs (80%) rename src/uxbox/{ => main}/ui/workspace/sidebar/options/rect_measures.cljs (86%) rename src/uxbox/{ => main}/ui/workspace/sidebar/options/stroke.cljs (88%) rename src/uxbox/{ => main}/ui/workspace/sidebar/options/text.cljs (87%) rename src/uxbox/{ => main}/ui/workspace/sidebar/sitemap.cljs (89%) delete mode 100644 src/uxbox/ui/dashboard.cljs rename src/{uxbox_worker/main.cljs => uxbox/worker.cljs} (84%) rename src/{uxbox_worker => uxbox/worker}/align.cljs (88%) rename src/{uxbox_worker => uxbox/worker}/impl.cljs (96%) diff --git a/src/uxbox/common/constants.cljs b/src/uxbox/common/constants.cljs new file mode 100644 index 000000000..0167b659a --- /dev/null +++ b/src/uxbox/common/constants.cljs @@ -0,0 +1,9 @@ +;; 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) 2016 Andrey Antukh + +(ns uxbox.common.constants) + +(goog-define url "http://127.0.0.1:6060/api") diff --git a/src/uxbox/util/geom.cljs b/src/uxbox/common/geom.cljs similarity index 99% rename from src/uxbox/util/geom.cljs rename to src/uxbox/common/geom.cljs index 124346bb8..f1232346b 100644 --- a/src/uxbox/util/geom.cljs +++ b/src/uxbox/common/geom.cljs @@ -4,11 +4,11 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.util.geom - (:require [uxbox.util.geom.matrix :as gmt] - [uxbox.util.geom.point :as gpt] +(ns uxbox.common.geom + (:require [uxbox.common.geom.matrix :as gmt] + [uxbox.common.geom.point :as gpt] [uxbox.util.math :as mth] - [uxbox.state :as st])) + [uxbox.main.state :as st])) ;; --- Types diff --git a/src/uxbox/util/geom/matrix.cljs b/src/uxbox/common/geom/matrix.cljs similarity index 97% rename from src/uxbox/util/geom/matrix.cljs rename to src/uxbox/common/geom/matrix.cljs index 04da25323..c5038b308 100644 --- a/src/uxbox/util/geom/matrix.cljs +++ b/src/uxbox/common/geom/matrix.cljs @@ -5,10 +5,10 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.util.geom.matrix +(ns uxbox.common.geom.matrix (:require [cuerdas.core :as str] [uxbox.util.math :as mth] - [uxbox.util.geom.point :as gpt])) + [uxbox.common.geom.point :as gpt])) (defrecord Matrix [a b c d tx ty]) diff --git a/src/uxbox/util/geom/point.cljs b/src/uxbox/common/geom/point.cljs similarity index 99% rename from src/uxbox/util/geom/point.cljs rename to src/uxbox/common/geom/point.cljs index b6b03be66..d197871ee 100644 --- a/src/uxbox/util/geom/point.cljs +++ b/src/uxbox/common/geom/point.cljs @@ -5,7 +5,7 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.util.geom.point +(ns uxbox.common.geom.point (:refer-clojure :exclude [divide]) (:require [uxbox.util.math :as mth])) diff --git a/src/uxbox/locales.cljs b/src/uxbox/common/i18n.cljs similarity index 82% rename from src/uxbox/locales.cljs rename to src/uxbox/common/i18n.cljs index 201ea4a8e..83b32db8e 100644 --- a/src/uxbox/locales.cljs +++ b/src/uxbox/common/i18n.cljs @@ -5,17 +5,13 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.locales +(ns uxbox.common.i18n "A i18n foundation." (:require [cuerdas.core :as str] - [uxbox.locales.en :as locales-en] [uxbox.util.storage :refer (storage)])) -(defonce +locales+ - {:en locales-en/+locales+}) - -(defonce +locale+ - (get storage ::locale :en)) +(defonce locales (volatile! {})) +(defonce locale (get storage ::locale :en)) ;; A marker type that is used just for mark ;; a parameter that reprsentes the counter. @@ -38,12 +34,12 @@ "Translate the string." ([t] (let [default (name t) - value (get-in +locales+ [+locale+ t] default)] + value (get-in @locales [locale t] default)] (if (vector? value) (or (second value) default) value))) ([t & args] - (let [value (get-in +locales+ [+locale+ t] (name t)) + (let [value (get-in @locales [locale t] (name t)) plural (first (filter c? args)) args (mapv #(if (c? %) @% %) args) value (cond diff --git a/src/uxbox/repo.cljs b/src/uxbox/common/repo.cljs similarity index 54% rename from src/uxbox/repo.cljs rename to src/uxbox/common/repo.cljs index a18ca21de..f2f829d97 100644 --- a/src/uxbox/repo.cljs +++ b/src/uxbox/common/repo.cljs @@ -4,26 +4,24 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.repo +(ns uxbox.common.repo "A main interface for access to remote resources." - (:refer-clojure :exclude [do]) - (:require [uxbox.repo.core :as core] - [uxbox.repo.auth] - [uxbox.repo.users] - [uxbox.repo.projects] - [uxbox.repo.pages] - [uxbox.repo.colors] - [uxbox.repo.images] - [httpurr.status :as status] - [beicon.core :as rx])) + (:require [httpurr.status :as status] + [uxbox.common.repo.auth] + [uxbox.common.repo.users] + [uxbox.common.repo.projects] + [uxbox.common.repo.pages] + [uxbox.common.repo.images] + [uxbox.common.repo.colors] + [uxbox.common.repo.impl :as impl])) (defn req "Perform a side effectfull action accesing remote resources." ([type] - (core/request type nil)) + (impl/request type nil)) ([type data] - (core/request type data))) + (impl/request type data))) (def client-error? status/client-error?) (def server-error? status/server-error?) diff --git a/src/uxbox/repo/auth.cljs b/src/uxbox/common/repo/auth.cljs similarity index 91% rename from src/uxbox/repo/auth.cljs rename to src/uxbox/common/repo/auth.cljs index a830c6d72..674c5b1b4 100644 --- a/src/uxbox/repo/auth.cljs +++ b/src/uxbox/common/repo/auth.cljs @@ -4,12 +4,11 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.repo.auth +(ns uxbox.common.repo.auth "A main interface for access to remote resources." - (:refer-clojure :exclude [do]) (:require [beicon.core :as rx] - [uxbox.repo.core :refer (request url send!)] - [uxbox.state :as ust])) + [uxbox.common.constants :refer (url)] + [uxbox.common.repo.impl :refer (request send!)])) (defmethod request :fetch/profile [type _] diff --git a/src/uxbox/repo/colors.cljs b/src/uxbox/common/repo/colors.cljs similarity index 93% rename from src/uxbox/repo/colors.cljs rename to src/uxbox/common/repo/colors.cljs index 2b116f150..ed89567bc 100644 --- a/src/uxbox/repo/colors.cljs +++ b/src/uxbox/common/repo/colors.cljs @@ -4,11 +4,11 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.repo.colors +(ns uxbox.common.repo.colors "A main interface for access to remote resources." (:require [beicon.core :as rx] - [uxbox.repo.core :refer (request url send!)] - [uxbox.state :as ust] + [uxbox.common.constants :refer (url)] + [uxbox.common.repo.impl :refer (request send!)] [uxbox.util.transit :as t])) (defn- decode-color-collection diff --git a/src/uxbox/repo/images.cljs b/src/uxbox/common/repo/images.cljs similarity index 93% rename from src/uxbox/repo/images.cljs rename to src/uxbox/common/repo/images.cljs index 98ceb6898..1761be6eb 100644 --- a/src/uxbox/repo/images.cljs +++ b/src/uxbox/common/repo/images.cljs @@ -4,14 +4,13 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.repo.images +(ns uxbox.common.repo.images "A main interface for access to remote resources." (:require [beicon.core :as rx] - [uxbox.repo.core :refer (request url send!)] - [uxbox.state :as ust] + [uxbox.common.constants :refer (url)] + [uxbox.common.repo.impl :refer (request send!)] [uxbox.util.transit :as t])) - (defmethod request :fetch/image-collections [_] (let [params {:url (str url "/library/image-collections") diff --git a/src/uxbox/repo/core.cljs b/src/uxbox/common/repo/impl.cljs similarity index 82% rename from src/uxbox/repo/core.cljs rename to src/uxbox/common/repo/impl.cljs index 6f254027b..db5f46b41 100644 --- a/src/uxbox/repo/core.cljs +++ b/src/uxbox/common/repo/impl.cljs @@ -4,20 +4,17 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.repo.core - "A main interface for access to remote resources." - (:refer-clojure :exclude [do]) +(ns uxbox.common.repo.impl (:require [clojure.walk :as walk] - [httpurr.client.xhr :as http] - [httpurr.status :as http.status] [promesa.core :as p :include-macros true] [beicon.core :as rx] - [uxbox.util.transit :as t] - [uxbox.state :as ust]) + [httpurr.client.xhr :as http] + [httpurr.status :as status] + [uxbox.common.constants :refer (url)] + [uxbox.util.storage :refer (storage)] + [uxbox.util.transit :as t]) (:import [goog.Uri QueryData])) -(goog-define url "http://127.0.0.1:5050/api") - (defn- conditional-decode [{:keys [body headers] :as response}] (if (= (get headers "content-type") "application/transit+json") @@ -26,16 +23,16 @@ (defn- handle-http-status [{:keys [body status] :as response}] - (if (http.status/success? response) + (if (status/success? response) (rx/of {:status status :payload body}) (rx/throw {:status status :payload body}))) -(def ^:private ^:const +headers+ +(def ^:private +headers+ {"content-type" "application/transit+json"}) (defn- auth-headers [] - (when-let [auth (:auth @ust/state)] + (when-let [auth (:uxbox/auth storage)] {"authorization" (str "Token " (:token auth "no-token"))})) (defn- encode-query diff --git a/src/uxbox/repo/pages.cljs b/src/uxbox/common/repo/pages.cljs similarity index 95% rename from src/uxbox/repo/pages.cljs rename to src/uxbox/common/repo/pages.cljs index c9bc9e50f..724915346 100644 --- a/src/uxbox/repo/pages.cljs +++ b/src/uxbox/common/repo/pages.cljs @@ -4,11 +4,11 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.repo.pages +(ns uxbox.common.repo.pages "A main interface for access to remote resources." (:require [beicon.core :as rx] - [uxbox.repo.core :refer (request url send!)] - [uxbox.state :as ust] + [uxbox.common.constants :refer (url)] + [uxbox.common.repo.impl :refer (request send!)] [uxbox.util.transit :as t])) (defn- decode-page diff --git a/src/uxbox/repo/projects.cljs b/src/uxbox/common/repo/projects.cljs similarity index 74% rename from src/uxbox/repo/projects.cljs rename to src/uxbox/common/repo/projects.cljs index f8d8caf98..d6ebb7dda 100644 --- a/src/uxbox/repo/projects.cljs +++ b/src/uxbox/common/repo/projects.cljs @@ -4,15 +4,11 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.repo.projects +(ns uxbox.common.repo.projects "A main interface for access to remote resources." (:require [beicon.core :as rx] - [uxbox.repo.core :refer (request url send!)] - [uxbox.state :as ust])) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Login -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + [uxbox.common.constants :refer (url)] + [uxbox.common.repo.impl :refer (request send!)])) (defmethod request :fetch/projects [type data] diff --git a/src/uxbox/repo/users.cljs b/src/uxbox/common/repo/users.cljs similarity index 91% rename from src/uxbox/repo/users.cljs rename to src/uxbox/common/repo/users.cljs index 07b2558c4..9d63a8852 100644 --- a/src/uxbox/repo/users.cljs +++ b/src/uxbox/common/repo/users.cljs @@ -4,10 +4,11 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.repo.users +(ns uxbox.common.repo.users "A main interface for access to remote resources." (:require [beicon.core :as rx] - [uxbox.repo.core :refer (request url send!)] + [uxbox.common.constants :refer (url)] + [uxbox.common.repo.impl :refer (request send!)] [uxbox.util.transit :as t])) (defn- decode-payload diff --git a/src/uxbox/router.cljs b/src/uxbox/common/router.cljs similarity index 96% rename from src/uxbox/router.cljs rename to src/uxbox/common/router.cljs index 5535a614b..7fbe5a451 100644 --- a/src/uxbox/router.cljs +++ b/src/uxbox/common/router.cljs @@ -5,13 +5,13 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.router +(ns uxbox.common.router (:require [bidi.router] [bidi.bidi :as bidi] [goog.events :as events] [lentes.core :as l] [beicon.core :as rx] - [uxbox.rstore :as rs])) + [uxbox.common.rstore :as rs])) (enable-console-print!) diff --git a/src/uxbox/rstore.cljs b/src/uxbox/common/rstore.cljs similarity index 97% rename from src/uxbox/rstore.cljs rename to src/uxbox/common/rstore.cljs index ac7ce9fd4..4c28a7230 100644 --- a/src/uxbox/rstore.cljs +++ b/src/uxbox/common/rstore.cljs @@ -5,10 +5,9 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.rstore +(ns uxbox.common.rstore "Reactive storage management architecture helpers." - (:require [beicon.core :as rx] - [uxbox.locales :refer (tr)])) + (:require [beicon.core :as rx])) ;; An abstraction for implement a simple state ;; transition. The `-apply-update` function receives diff --git a/src/uxbox/schema.cljs b/src/uxbox/common/schema.cljs similarity index 95% rename from src/uxbox/schema.cljs rename to src/uxbox/common/schema.cljs index a5f661c2b..01c2ed020 100644 --- a/src/uxbox/schema.cljs +++ b/src/uxbox/common/schema.cljs @@ -5,11 +5,11 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.schema +(ns uxbox.common.schema (:refer-clojure :exclude [keyword uuid vector boolean map set]) (:require [struct.core :as st] - [uxbox.locales :refer (tr)] - [uxbox.util.geom :refer (shape?)])) + [uxbox.common.i18n :refer (tr)] + [uxbox.common.geom :refer (shape?)])) ;; (def datetime ;; {:message "must be an instant" diff --git a/src/uxbox/util/workers.cljs b/src/uxbox/common/workers.cljs similarity index 98% rename from src/uxbox/util/workers.cljs rename to src/uxbox/common/workers.cljs index cc9327cdb..f0c42bdef 100644 --- a/src/uxbox/util/workers.cljs +++ b/src/uxbox/common/workers.cljs @@ -4,7 +4,7 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.util.workers +(ns uxbox.common.workers "A lightweight layer on top of webworkers api." (:require [beicon.core :as rx] [uuid.core :as uuid] diff --git a/src/uxbox/main.cljs b/src/uxbox/main.cljs index 7730ac7af..933eb4890 100644 --- a/src/uxbox/main.cljs +++ b/src/uxbox/main.cljs @@ -6,12 +6,14 @@ ;; Copyright (c) 2015-2016 Juan de la Cruz (ns uxbox.main - (:require [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.ui :as ui])) + (:require [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.main.locales :as lc] + [uxbox.main.ui :as ui])) -(defn ^:export main +(defn ^:export init [] + (lc/init) (st/init) (ui/init-routes) (ui/init)) diff --git a/src/uxbox/constants.cljs b/src/uxbox/main/constants.cljs similarity index 96% rename from src/uxbox/constants.cljs rename to src/uxbox/main/constants.cljs index 64151d602..1edc1ea11 100644 --- a/src/uxbox/constants.cljs +++ b/src/uxbox/main/constants.cljs @@ -5,7 +5,7 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.constants) +(ns uxbox.main.constants) (def ^:const grid-x-axis 10) (def ^:const grid-y-axis 10) diff --git a/src/uxbox/data/auth.cljs b/src/uxbox/main/data/auth.cljs similarity index 89% rename from src/uxbox/data/auth.cljs rename to src/uxbox/main/data/auth.cljs index 61f941ea8..4ad32aa1e 100644 --- a/src/uxbox/data/auth.cljs +++ b/src/uxbox/main/data/auth.cljs @@ -5,19 +5,19 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.data.auth +(ns uxbox.main.data.auth (:require [beicon.core :as rx] [promesa.core :as p] - [uxbox.repo :as rp] - [uxbox.rstore :as rs] - [uxbox.router :as rt] - [uxbox.state :as st] - [uxbox.schema :as us] - [uxbox.locales :refer (tr)] - [uxbox.data.projects :as udp] - [uxbox.data.users :as udu] - [uxbox.data.messages :as udm] - [uxbox.data.forms :as udf] + [uxbox.common.repo :as rp] + [uxbox.common.rstore :as rs] + [uxbox.common.router :as rt] + [uxbox.main.state :as st] + [uxbox.common.schema :as us] + [uxbox.common.i18n :refer (tr)] + [uxbox.main.data.projects :as udp] + [uxbox.main.data.users :as udu] + [uxbox.main.data.messages :as udm] + [uxbox.main.data.forms :as udf] [uxbox.util.storage :refer (storage)])) ;; --- Logged In @@ -29,12 +29,9 @@ rs/WatchEvent (-apply-watch [this state s] + (swap! storage assoc :uxbox/auth data) (rx/of (udu/fetch-profile) - (rt/navigate :dashboard/projects))) - - rs/EffectEvent - (-apply-effect [this state] - (swap! storage assoc :uxbox/auth data))) + (rt/navigate :dashboard/projects)))) (defn logged-in? [v] diff --git a/src/uxbox/data/colors.cljs b/src/uxbox/main/data/colors.cljs similarity index 95% rename from src/uxbox/data/colors.cljs rename to src/uxbox/main/data/colors.cljs index ebf17c88a..98df354fb 100644 --- a/src/uxbox/data/colors.cljs +++ b/src/uxbox/main/data/colors.cljs @@ -5,14 +5,14 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.data.colors +(ns uxbox.main.data.colors (:require [clojure.set :as set] [beicon.core :as rx] [uuid.core :as uuid] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.state.colors :as stc] - [uxbox.repo :as rp])) + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.main.state.colors :as stc] + [uxbox.common.repo :as rp])) ;; --- Initialize diff --git a/src/uxbox/data/core.cljs b/src/uxbox/main/data/core.cljs similarity index 76% rename from src/uxbox/data/core.cljs rename to src/uxbox/main/data/core.cljs index f116d88ef..3efa9722d 100644 --- a/src/uxbox/data/core.cljs +++ b/src/uxbox/main/data/core.cljs @@ -4,12 +4,12 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.data.core +(ns uxbox.main.data.core "Worker related api and initialization events." (:require [beicon.core :as rx] - [uxbox.rstore :as rs] - [uxbox.constants :as c] - [uxbox.util.workers :as uw])) + [uxbox.common.rstore :as rs] + [uxbox.common.workers :as uw] + [uxbox.main.constants :as c])) ;; This excludes webworker instantiation on nodejs where ;; the tests are run. diff --git a/src/uxbox/data/dashboard.cljs b/src/uxbox/main/data/dashboard.cljs similarity index 79% rename from src/uxbox/data/dashboard.cljs rename to src/uxbox/main/data/dashboard.cljs index cbcdfa392..bf2f1e524 100644 --- a/src/uxbox/data/dashboard.cljs +++ b/src/uxbox/main/data/dashboard.cljs @@ -5,17 +5,17 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.data.dashboard +(ns uxbox.main.data.dashboard (:require [beicon.core :as rx] [uuid.core :as uuid] - [uxbox.rstore :as rs] - [uxbox.router :as r] - [uxbox.state :as st] - [uxbox.schema :as sc] - [uxbox.repo :as rp] - [uxbox.data.projects :as dp] - [uxbox.data.colors :as dc] - [uxbox.data.images :as di] + [uxbox.common.rstore :as rs] + [uxbox.common.router :as r] + [uxbox.main.state :as st] + [uxbox.common.schema :as sc] + [uxbox.common.repo :as rp] + [uxbox.main.data.projects :as dp] + [uxbox.main.data.colors :as dc] + [uxbox.main.data.images :as di] [uxbox.util.data :refer (deep-merge)])) ;; --- Events diff --git a/src/uxbox/data/forms.cljs b/src/uxbox/main/data/forms.cljs similarity index 88% rename from src/uxbox/data/forms.cljs rename to src/uxbox/main/data/forms.cljs index 7ac297328..740a257f4 100644 --- a/src/uxbox/data/forms.cljs +++ b/src/uxbox/main/data/forms.cljs @@ -4,15 +4,15 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.data.forms +(ns uxbox.main.data.forms (:require [beicon.core :as rx] [promesa.core :as p] [lentes.core :as l] - [uxbox.repo :as rp] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.schema :as sc] - [uxbox.locales :refer (tr)])) + [uxbox.common.repo :as rp] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.common.schema :as sc] + [uxbox.common.i18n :refer (tr)])) ;; --- Assign Errors diff --git a/src/uxbox/data/history.cljs b/src/uxbox/main/data/history.cljs similarity index 95% rename from src/uxbox/data/history.cljs rename to src/uxbox/main/data/history.cljs index 61af4bdc9..b91794325 100644 --- a/src/uxbox/data/history.cljs +++ b/src/uxbox/main/data/history.cljs @@ -4,19 +4,19 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.data.history +(ns uxbox.main.data.history (:require [cuerdas.core :as str] [promesa.core :as p] [beicon.core :as rx] [lentes.core :as l] - [uxbox.rstore :as rs] - [uxbox.router :as r] - [uxbox.repo :as rp] - [uxbox.locales :refer (tr)] - [uxbox.schema :as sc] - [uxbox.data.pages :as udp] - [uxbox.state :as st] - [uxbox.state.project :as stpr] + [uxbox.common.rstore :as rs] + [uxbox.common.router :as r] + [uxbox.common.repo :as rp] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.schema :as sc] + [uxbox.main.data.pages :as udp] + [uxbox.main.state :as st] + [uxbox.main.state.project :as stpr] [uxbox.util.datetime :as dt] [uxbox.util.data :refer (without-keys replace-by-id diff --git a/src/uxbox/data/images.cljs b/src/uxbox/main/data/images.cljs similarity index 97% rename from src/uxbox/data/images.cljs rename to src/uxbox/main/data/images.cljs index b3321d010..26c6ea186 100644 --- a/src/uxbox/data/images.cljs +++ b/src/uxbox/main/data/images.cljs @@ -5,13 +5,13 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.data.images +(ns uxbox.main.data.images (:require [cuerdas.core :as str] [beicon.core :as rx] [uuid.core :as uuid] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.repo :as rp])) + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.common.repo :as rp])) ;; --- Initialize diff --git a/src/uxbox/data/lightbox.cljs b/src/uxbox/main/data/lightbox.cljs similarity index 93% rename from src/uxbox/data/lightbox.cljs rename to src/uxbox/main/data/lightbox.cljs index 166b0fb25..1ed256ca5 100644 --- a/src/uxbox/data/lightbox.cljs +++ b/src/uxbox/main/data/lightbox.cljs @@ -4,11 +4,11 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.data.lightbox +(ns uxbox.main.data.lightbox (:require [promesa.core :as p] [beicon.core :as rx] [lentes.core :as l] - [uxbox.rstore :as rs])) + [uxbox.common.rstore :as rs])) ;; --- Show Lightbox diff --git a/src/uxbox/data/messages.cljs b/src/uxbox/main/data/messages.cljs similarity index 97% rename from src/uxbox/data/messages.cljs rename to src/uxbox/main/data/messages.cljs index 88aa082b4..504888ef4 100644 --- a/src/uxbox/data/messages.cljs +++ b/src/uxbox/main/data/messages.cljs @@ -4,12 +4,12 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.data.messages +(ns uxbox.main.data.messages (:require [cuerdas.core :as str] [promesa.core :as p] [beicon.core :as rx] [lentes.core :as l] - [uxbox.rstore :as rs])) + [uxbox.common.rstore :as rs])) ;; --- Constants diff --git a/src/uxbox/data/pages.cljs b/src/uxbox/main/data/pages.cljs similarity index 94% rename from src/uxbox/data/pages.cljs rename to src/uxbox/main/data/pages.cljs index 0c9339836..c86443e83 100644 --- a/src/uxbox/data/pages.cljs +++ b/src/uxbox/main/data/pages.cljs @@ -5,18 +5,18 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.data.pages +(ns uxbox.main.data.pages (:require [cuerdas.core :as str] [promesa.core :as p] [beicon.core :as rx] [lentes.core :as l] - [uxbox.rstore :as rs] - [uxbox.router :as r] - [uxbox.repo :as rp] - [uxbox.locales :refer (tr)] - [uxbox.schema :as sc] - [uxbox.state :as st] - [uxbox.state.project :as stpr] + [uxbox.common.rstore :as rs] + [uxbox.common.router :as r] + [uxbox.common.repo :as rp] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.schema :as sc] + [uxbox.main.state :as st] + [uxbox.main.state.project :as stpr] [uxbox.util.datetime :as dt] [uxbox.util.data :refer (without-keys replace-by-id)])) diff --git a/src/uxbox/data/projects.cljs b/src/uxbox/main/data/projects.cljs similarity index 93% rename from src/uxbox/data/projects.cljs rename to src/uxbox/main/data/projects.cljs index 35ef5e906..8c729d0e9 100644 --- a/src/uxbox/data/projects.cljs +++ b/src/uxbox/main/data/projects.cljs @@ -5,17 +5,17 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.data.projects +(ns uxbox.main.data.projects (:require [cuerdas.core :as str] [beicon.core :as rx] - [uxbox.rstore :as rs] - [uxbox.router :as r] - [uxbox.state :as st] - [uxbox.repo :as rp] - [uxbox.locales :refer (tr)] - [uxbox.schema :as sc] - [uxbox.state.project :as stpr] - [uxbox.data.pages :as udp])) + [uxbox.common.rstore :as rs] + [uxbox.common.router :as r] + [uxbox.main.state :as st] + [uxbox.common.repo :as rp] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.schema :as sc] + [uxbox.main.state.project :as stpr] + [uxbox.main.data.pages :as udp])) ;; --- Initialize diff --git a/src/uxbox/data/shapes.cljs b/src/uxbox/main/data/shapes.cljs similarity index 95% rename from src/uxbox/data/shapes.cljs rename to src/uxbox/main/data/shapes.cljs index 8a72420c6..1d987aa11 100644 --- a/src/uxbox/data/shapes.cljs +++ b/src/uxbox/main/data/shapes.cljs @@ -5,21 +5,21 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.data.shapes +(ns uxbox.main.data.shapes (:require [beicon.core :as rx] [uuid.core :as uuid] - [uxbox.constants :as c] - [uxbox.rstore :as rs] - [uxbox.router :as r] - [uxbox.state :as st] - [uxbox.state.shapes :as stsh] - [uxbox.schema :as sc] - [uxbox.data.core :refer (worker)] - [uxbox.data.pages :as udp] - [uxbox.util.geom :as geom] - [uxbox.util.geom.point :as gpt] - [uxbox.util.data :refer (index-of)] - [uxbox.util.workers :as uw])) + [uxbox.main.constants :as c] + [uxbox.common.rstore :as rs] + [uxbox.common.router :as r] + [uxbox.common.schema :as sc] + [uxbox.common.geom :as geom] + [uxbox.common.geom.point :as gpt] + [uxbox.common.workers :as uw] + [uxbox.main.state :as st] + [uxbox.main.state.shapes :as stsh] + [uxbox.main.data.core :refer (worker)] + [uxbox.main.data.pages :as udp] + [uxbox.util.data :refer (index-of)])) (defn add-shape "Create and add shape to the current selected page." diff --git a/src/uxbox/data/users.cljs b/src/uxbox/main/data/users.cljs similarity index 91% rename from src/uxbox/data/users.cljs rename to src/uxbox/main/data/users.cljs index 30bfee06c..8bea70474 100644 --- a/src/uxbox/data/users.cljs +++ b/src/uxbox/main/data/users.cljs @@ -4,16 +4,16 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.data.users +(ns uxbox.main.data.users (:require [beicon.core :as rx] [promesa.core :as p] - [uxbox.repo :as rp] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.schema :as sc] - [uxbox.locales :refer (tr)] - [uxbox.data.forms :as udf] - [uxbox.data.messages :as udm])) + [uxbox.common.repo :as rp] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.common.schema :as sc] + [uxbox.common.i18n :refer (tr)] + [uxbox.main.data.forms :as udf] + [uxbox.main.data.messages :as udm])) ;; --- Profile Fetched diff --git a/src/uxbox/data/workspace.cljs b/src/uxbox/main/data/workspace.cljs similarity index 90% rename from src/uxbox/data/workspace.cljs rename to src/uxbox/main/data/workspace.cljs index d09aabfb8..fbe86ad65 100644 --- a/src/uxbox/data/workspace.cljs +++ b/src/uxbox/main/data/workspace.cljs @@ -5,26 +5,26 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.data.workspace +(ns uxbox.main.data.workspace (:require [beicon.core :as rx] [uuid.core :as uuid] - [uxbox.constants :as c] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.state.shapes :as stsh] - [uxbox.schema :as sc] - [uxbox.data.core :refer (worker)] - [uxbox.data.projects :as dp] - [uxbox.data.pages :as udp] - [uxbox.data.shapes :as uds] - [uxbox.data.forms :as udf] - [uxbox.data.lightbox :as udl] - [uxbox.data.history :as udh] + [uxbox.main.constants :as c] + [uxbox.common.rstore :as rs] + [uxbox.common.schema :as sc] + [uxbox.common.geom.point :as gpt] + [uxbox.common.workers :as uw] + [uxbox.main.state :as st] + [uxbox.main.state.shapes :as stsh] + [uxbox.main.data.core :refer (worker)] + [uxbox.main.data.projects :as dp] + [uxbox.main.data.pages :as udp] + [uxbox.main.data.shapes :as uds] + [uxbox.main.data.forms :as udf] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.data.history :as udh] [uxbox.util.datetime :as dt] [uxbox.util.math :as mth] - [uxbox.util.data :refer (index-of)] - [uxbox.util.geom.point :as gpt] - [uxbox.util.workers :as uw])) + [uxbox.util.data :refer (index-of)])) ;; --- Constants diff --git a/src/uxbox/library.cljs b/src/uxbox/main/library.cljs similarity index 87% rename from src/uxbox/library.cljs rename to src/uxbox/main/library.cljs index 8ee528ff4..ae2ab5309 100644 --- a/src/uxbox/library.cljs +++ b/src/uxbox/main/library.cljs @@ -5,11 +5,11 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.library - (:require [uxbox.library.colors :as colors] - [uxbox.library.images :as images] - [uxbox.library.icons :as icons] - [uxbox.library.fonts :as fonts] +(ns uxbox.main.library + (:require [uxbox.main.library.colors :as colors] + [uxbox.main.library.images :as images] + [uxbox.main.library.icons :as icons] + [uxbox.main.library.fonts :as fonts] [uxbox.util.data :refer (index-by-id)])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/uxbox/library/colors.cljs b/src/uxbox/main/library/colors.cljs similarity index 97% rename from src/uxbox/library/colors.cljs rename to src/uxbox/main/library/colors.cljs index fe7fab013..9587b5d22 100644 --- a/src/uxbox/library/colors.cljs +++ b/src/uxbox/main/library/colors.cljs @@ -5,7 +5,7 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.library.colors) +(ns uxbox.main.library.colors) (def ^:static +collections+ [{:name "Generic 1" diff --git a/src/uxbox/library/fonts.cljs b/src/uxbox/main/library/fonts.cljs similarity index 99% rename from src/uxbox/library/fonts.cljs rename to src/uxbox/main/library/fonts.cljs index eb2d4c8a5..85369a2e9 100644 --- a/src/uxbox/library/fonts.cljs +++ b/src/uxbox/main/library/fonts.cljs @@ -5,7 +5,7 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.library.fonts) +(ns uxbox.main.library.fonts) (def ^:const +collections+ [{:id "sourcesanspro" diff --git a/src/uxbox/library/icons.cljs b/src/uxbox/main/library/icons.cljs similarity index 62% rename from src/uxbox/library/icons.cljs rename to src/uxbox/main/library/icons.cljs index 7284b8178..8c7e15421 100644 --- a/src/uxbox/library/icons.cljs +++ b/src/uxbox/main/library/icons.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.library.icons - (:require [uxbox.library.icons.material.actions :as md-actions] - [uxbox.library.icons.material.alerts :as md-alerts] - [uxbox.library.icons.material.av :as md-av] - [uxbox.library.icons.material.communication :as md-comm] - [uxbox.library.icons.material.content :as md-content] - [uxbox.library.icons.material.device :as md-device] - [uxbox.library.icons.material.editor :as md-editor] - [uxbox.library.icons.material.file :as md-file] - [uxbox.library.icons.material.hardware :as md-hardware] - [uxbox.library.icons.material.image :as md-image] - [uxbox.library.icons.material.maps :as md-maps] - [uxbox.library.icons.material.navigation :as md-nav] - [uxbox.library.icons.material.notification :as md-not] - [uxbox.library.icons.material.social :as md-social] - [uxbox.library.icons.material.toggle :as md-toggle] +(ns uxbox.main.library.icons + (:require [uxbox.main.library.icons.material.actions :as md-actions] + [uxbox.main.library.icons.material.alerts :as md-alerts] + [uxbox.main.library.icons.material.av :as md-av] + [uxbox.main.library.icons.material.communication :as md-comm] + [uxbox.main.library.icons.material.content :as md-content] + [uxbox.main.library.icons.material.device :as md-device] + [uxbox.main.library.icons.material.editor :as md-editor] + [uxbox.main.library.icons.material.file :as md-file] + [uxbox.main.library.icons.material.hardware :as md-hardware] + [uxbox.main.library.icons.material.image :as md-image] + [uxbox.main.library.icons.material.maps :as md-maps] + [uxbox.main.library.icons.material.navigation :as md-nav] + [uxbox.main.library.icons.material.notification :as md-not] + [uxbox.main.library.icons.material.social :as md-social] + [uxbox.main.library.icons.material.toggle :as md-toggle] )) (def +collections+ diff --git a/src/uxbox/library/icons/material/LICENSE b/src/uxbox/main/library/icons/material/LICENSE similarity index 100% rename from src/uxbox/library/icons/material/LICENSE rename to src/uxbox/main/library/icons/material/LICENSE diff --git a/src/uxbox/library/icons/material/actions.cljs b/src/uxbox/main/library/icons/material/actions.cljs similarity index 99% rename from src/uxbox/library/icons/material/actions.cljs rename to src/uxbox/main/library/icons/material/actions.cljs index 9301ede63..fb09f24a1 100644 --- a/src/uxbox/library/icons/material/actions.cljs +++ b/src/uxbox/main/library/icons/material/actions.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.actions) +(ns uxbox.main.library.icons.material.actions) (def +icons+ [{:name "Attachment" diff --git a/src/uxbox/library/icons/material/alerts.cljs b/src/uxbox/main/library/icons/material/alerts.cljs similarity index 94% rename from src/uxbox/library/icons/material/alerts.cljs rename to src/uxbox/main/library/icons/material/alerts.cljs index d7e43dbaa..c38c5e351 100644 --- a/src/uxbox/library/icons/material/alerts.cljs +++ b/src/uxbox/main/library/icons/material/alerts.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.alerts) +(ns uxbox.main.library.icons.material.alerts) (def +icons+ [{:name "Error" diff --git a/src/uxbox/library/icons/material/av.cljs b/src/uxbox/main/library/icons/material/av.cljs similarity index 99% rename from src/uxbox/library/icons/material/av.cljs rename to src/uxbox/main/library/icons/material/av.cljs index 6cda4b551..db222dc4d 100644 --- a/src/uxbox/library/icons/material/av.cljs +++ b/src/uxbox/main/library/icons/material/av.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.av) +(ns uxbox.main.library.icons.material.av) (def +icons+ [{:name "Album" diff --git a/src/uxbox/library/icons/material/communication.cljs b/src/uxbox/main/library/icons/material/communication.cljs similarity index 99% rename from src/uxbox/library/icons/material/communication.cljs rename to src/uxbox/main/library/icons/material/communication.cljs index bcabd34c6..e9cfce738 100644 --- a/src/uxbox/library/icons/material/communication.cljs +++ b/src/uxbox/main/library/icons/material/communication.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.communication) +(ns uxbox.main.library.icons.material.communication) (def +icons+ [{:name "Business" diff --git a/src/uxbox/library/icons/material/content.cljs b/src/uxbox/main/library/icons/material/content.cljs similarity index 99% rename from src/uxbox/library/icons/material/content.cljs rename to src/uxbox/main/library/icons/material/content.cljs index dd290c5ea..d42625b7a 100644 --- a/src/uxbox/library/icons/material/content.cljs +++ b/src/uxbox/main/library/icons/material/content.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.content) +(ns uxbox.main.library.icons.material.content) (def +icons+ [{:name "Add" diff --git a/src/uxbox/library/icons/material/device.cljs b/src/uxbox/main/library/icons/material/device.cljs similarity index 99% rename from src/uxbox/library/icons/material/device.cljs rename to src/uxbox/main/library/icons/material/device.cljs index db2e42042..b22523b79 100644 --- a/src/uxbox/library/icons/material/device.cljs +++ b/src/uxbox/main/library/icons/material/device.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.device +(ns uxbox.main.library.icons.material.device (:require [sablono.core :as html :refer-macros [html]])) (def +icons+ diff --git a/src/uxbox/library/icons/material/editor.cljs b/src/uxbox/main/library/icons/material/editor.cljs similarity index 99% rename from src/uxbox/library/icons/material/editor.cljs rename to src/uxbox/main/library/icons/material/editor.cljs index 8c6f334d4..e981066fe 100644 --- a/src/uxbox/library/icons/material/editor.cljs +++ b/src/uxbox/main/library/icons/material/editor.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.editor) +(ns uxbox.main.library.icons.material.editor) (def +icons+ [{:name "Attach File" diff --git a/src/uxbox/library/icons/material/file.cljs b/src/uxbox/main/library/icons/material/file.cljs similarity index 99% rename from src/uxbox/library/icons/material/file.cljs rename to src/uxbox/main/library/icons/material/file.cljs index aa1c0548b..cfabc9fe8 100644 --- a/src/uxbox/library/icons/material/file.cljs +++ b/src/uxbox/main/library/icons/material/file.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.file) +(ns uxbox.main.library.icons.material.file) (def +icons+ [{:name "Attachment" diff --git a/src/uxbox/library/icons/material/hardware.cljs b/src/uxbox/main/library/icons/material/hardware.cljs similarity index 99% rename from src/uxbox/library/icons/material/hardware.cljs rename to src/uxbox/main/library/icons/material/hardware.cljs index 34e911454..bf0cce793 100644 --- a/src/uxbox/library/icons/material/hardware.cljs +++ b/src/uxbox/main/library/icons/material/hardware.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.hardware) +(ns uxbox.main.library.icons.material.hardware) (def +icons+ [{:name "Cast" diff --git a/src/uxbox/library/icons/material/image.cljs b/src/uxbox/main/library/icons/material/image.cljs similarity index 99% rename from src/uxbox/library/icons/material/image.cljs rename to src/uxbox/main/library/icons/material/image.cljs index cd83fba8c..df396161e 100644 --- a/src/uxbox/library/icons/material/image.cljs +++ b/src/uxbox/main/library/icons/material/image.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.image) +(ns uxbox.main.library.icons.material.image) (def +icons+ [{:name "Add To photos" diff --git a/src/uxbox/library/icons/material/maps.cljs b/src/uxbox/main/library/icons/material/maps.cljs similarity index 99% rename from src/uxbox/library/icons/material/maps.cljs rename to src/uxbox/main/library/icons/material/maps.cljs index d9e138e49..fef654dce 100644 --- a/src/uxbox/library/icons/material/maps.cljs +++ b/src/uxbox/main/library/icons/material/maps.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.maps) +(ns uxbox.main.library.icons.material.maps) (def +icons+ [{:name "Been Here" diff --git a/src/uxbox/library/icons/material/navigation.cljs b/src/uxbox/main/library/icons/material/navigation.cljs similarity index 99% rename from src/uxbox/library/icons/material/navigation.cljs rename to src/uxbox/main/library/icons/material/navigation.cljs index 26936a1d9..a3d59e078 100644 --- a/src/uxbox/library/icons/material/navigation.cljs +++ b/src/uxbox/main/library/icons/material/navigation.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.navigation) +(ns uxbox.main.library.icons.material.navigation) (def +icons+ [{:name "Apps" diff --git a/src/uxbox/library/icons/material/notification.cljs b/src/uxbox/main/library/icons/material/notification.cljs similarity index 99% rename from src/uxbox/library/icons/material/notification.cljs rename to src/uxbox/main/library/icons/material/notification.cljs index b5402cf67..b85e3b2be 100644 --- a/src/uxbox/library/icons/material/notification.cljs +++ b/src/uxbox/main/library/icons/material/notification.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.notification) +(ns uxbox.main.library.icons.material.notification) (def +icons+ [{:name "ADB" diff --git a/src/uxbox/library/icons/material/social.cljs b/src/uxbox/main/library/icons/material/social.cljs similarity index 99% rename from src/uxbox/library/icons/material/social.cljs rename to src/uxbox/main/library/icons/material/social.cljs index 1a3a512dc..a29497dd1 100644 --- a/src/uxbox/library/icons/material/social.cljs +++ b/src/uxbox/main/library/icons/material/social.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.social) +(ns uxbox.main.library.icons.material.social) (def +icons+ [{:name "Cake" diff --git a/src/uxbox/library/icons/material/toggle.cljs b/src/uxbox/main/library/icons/material/toggle.cljs similarity index 98% rename from src/uxbox/library/icons/material/toggle.cljs rename to src/uxbox/main/library/icons/material/toggle.cljs index b7207096e..441863fe4 100644 --- a/src/uxbox/library/icons/material/toggle.cljs +++ b/src/uxbox/main/library/icons/material/toggle.cljs @@ -2,7 +2,7 @@ ;; The original source can be found here: ;; https://github.com/google/material-design-icons -(ns uxbox.library.icons.material.toggle) +(ns uxbox.main.library.icons.material.toggle) (def +icons+ [{:name "Check Box" diff --git a/src/uxbox/library/images.cljs b/src/uxbox/main/library/images.cljs similarity index 99% rename from src/uxbox/library/images.cljs rename to src/uxbox/main/library/images.cljs index 2b93dacfd..e468cf6bd 100644 --- a/src/uxbox/library/images.cljs +++ b/src/uxbox/main/library/images.cljs @@ -5,7 +5,7 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.library.images) +(ns uxbox.main.library.images) (def ^:static +collections+ [{:name "Generic 1" diff --git a/src/uxbox/main/locales.cljs b/src/uxbox/main/locales.cljs new file mode 100644 index 000000000..e6b45b282 --- /dev/null +++ b/src/uxbox/main/locales.cljs @@ -0,0 +1,15 @@ +;; 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 Andrey Antukh +;; Copyright (c) 2015-2016 Juan de la Cruz + +(ns uxbox.main.locales + "Initialization namespace for i18n locale data." + (:require [uxbox.common.i18n :as i18n] + [uxbox.main.locales.en :as en])) + +(defn init + [] + (vswap! i18n/locales assoc :en en/locales)) diff --git a/src/uxbox/locales/en.cljs b/src/uxbox/main/locales/en.cljs similarity index 98% rename from src/uxbox/locales/en.cljs rename to src/uxbox/main/locales/en.cljs index 5f0d7318b..7614ebba8 100644 --- a/src/uxbox/locales/en.cljs +++ b/src/uxbox/main/locales/en.cljs @@ -5,9 +5,9 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.locales.en) +(ns uxbox.main.locales.en) -(defonce +locales+ +(defonce locales {"ds.projects" "PROJECTS" "ds.num-projects" ["No projects" "%s project" diff --git a/src/uxbox/state.cljs b/src/uxbox/main/state.cljs similarity index 91% rename from src/uxbox/state.cljs rename to src/uxbox/main/state.cljs index bf51b006f..7a3b6f909 100644 --- a/src/uxbox/state.cljs +++ b/src/uxbox/main/state.cljs @@ -5,11 +5,11 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.state +(ns uxbox.main.state (:require [beicon.core :as rx] [lentes.core :as l] - [uxbox.rstore :as rs] - [uxbox.locales :refer (tr)] + [uxbox.common.rstore :as rs] + [uxbox.common.i18n :refer (tr)] [uxbox.util.storage :refer (storage)])) (enable-console-print!) diff --git a/src/uxbox/state/clipboard.cljs b/src/uxbox/main/state/clipboard.cljs similarity index 93% rename from src/uxbox/state/clipboard.cljs rename to src/uxbox/main/state/clipboard.cljs index 8784acab7..8db84686f 100644 --- a/src/uxbox/state/clipboard.cljs +++ b/src/uxbox/main/state/clipboard.cljs @@ -1,4 +1,4 @@ -(ns uxbox.state.clipboard) +(ns uxbox.main.state.clipboard) (defonce ^:private ^:const +max-items+ 5) diff --git a/src/uxbox/state/colors.cljs b/src/uxbox/main/state/colors.cljs similarity index 95% rename from src/uxbox/state/colors.cljs rename to src/uxbox/main/state/colors.cljs index 9fca0f7b3..433891a2f 100644 --- a/src/uxbox/state/colors.cljs +++ b/src/uxbox/main/state/colors.cljs @@ -1,4 +1,4 @@ -(ns uxbox.state.colors +(ns uxbox.main.state.colors "A collection of functions for manage dashboard data insinde the state.") (defn assoc-collection diff --git a/src/uxbox/state/project.cljs b/src/uxbox/main/state/project.cljs similarity index 98% rename from src/uxbox/state/project.cljs rename to src/uxbox/main/state/project.cljs index fc5cfc8a3..faa4f9722 100644 --- a/src/uxbox/state/project.cljs +++ b/src/uxbox/main/state/project.cljs @@ -1,4 +1,4 @@ -(ns uxbox.state.project +(ns uxbox.main.state.project "A collection of functions for manage shapes insinde the state.") (defn assoc-project diff --git a/src/uxbox/state/shapes.cljs b/src/uxbox/main/state/shapes.cljs similarity index 99% rename from src/uxbox/state/shapes.cljs rename to src/uxbox/main/state/shapes.cljs index d0b0bfe96..aea15f126 100644 --- a/src/uxbox/state/shapes.cljs +++ b/src/uxbox/main/state/shapes.cljs @@ -1,8 +1,8 @@ -(ns uxbox.state.shapes +(ns uxbox.main.state.shapes "A collection of functions for manage shapes insinde the state." (:require [uuid.core :as uuid] [uxbox.util.data :refer (index-of)] - [uxbox.util.geom :as geom])) + [uxbox.common.geom :as geom])) ;; --- Shape Creation diff --git a/src/uxbox/ui.cljs b/src/uxbox/main/ui.cljs similarity index 83% rename from src/uxbox/ui.cljs rename to src/uxbox/main/ui.cljs index 174d4cb11..7179c4964 100644 --- a/src/uxbox/ui.cljs +++ b/src/uxbox/main/ui.cljs @@ -5,7 +5,7 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui +(ns uxbox.main.ui (:require [sablono.core :as html :refer-macros [html]] [bidi.bidi :as bidi] [promesa.core :as p] @@ -13,23 +13,23 @@ [goog.dom :as gdom] [rum.core :as rum] [lentes.core :as l] - [uxbox.state :as st] - [uxbox.router :as rt] - [uxbox.rstore :as rs] - [uxbox.locales :refer (tr)] - [uxbox.data.projects :as dp] - [uxbox.data.users :as udu] - [uxbox.data.auth :as dauth] - [uxbox.data.messages :as dmsg] - [uxbox.ui.loader :refer (loader)] - [uxbox.ui.lightbox :refer (lightbox)] - [uxbox.ui.icons :as i] - [uxbox.ui.auth :as auth] - [uxbox.ui.dashboard :as dashboard] - [uxbox.ui.settings :as settings] - [uxbox.ui.workspace :refer (workspace)] - [uxbox.ui.mixins :as mx] - [uxbox.ui.shapes])) + [uxbox.main.state :as st] + [uxbox.common.router :as rt] + [uxbox.common.rstore :as rs] + [uxbox.common.i18n :refer (tr)] + [uxbox.main.data.projects :as dp] + [uxbox.main.data.users :as udu] + [uxbox.main.data.auth :as dauth] + [uxbox.main.data.messages :as dmsg] + [uxbox.main.ui.loader :refer (loader)] + [uxbox.main.ui.lightbox :refer (lightbox)] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.auth :as auth] + [uxbox.main.ui.dashboard :as dashboard] + [uxbox.main.ui.settings :as settings] + [uxbox.main.ui.workspace :refer (workspace)] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.shapes])) ;; --- Constants diff --git a/src/uxbox/ui/auth.cljs b/src/uxbox/main/ui/auth.cljs similarity index 63% rename from src/uxbox/ui/auth.cljs rename to src/uxbox/main/ui/auth.cljs index 8e73fef80..8f6c840a3 100644 --- a/src/uxbox/ui/auth.cljs +++ b/src/uxbox/main/ui/auth.cljs @@ -4,11 +4,11 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.auth - (:require [uxbox.ui.auth.login :as login] - [uxbox.ui.auth.register :as register] - [uxbox.ui.auth.recovery-request :as recovery-request] - [uxbox.ui.auth.recovery :as recovery])) +(ns uxbox.main.ui.auth + (:require [uxbox.main.ui.auth.login :as login] + [uxbox.main.ui.auth.register :as register] + [uxbox.main.ui.auth.recovery-request :as recovery-request] + [uxbox.main.ui.auth.recovery :as recovery])) (def login-page login/login-page) (def register-page register/register-page) diff --git a/src/uxbox/ui/auth/login.cljs b/src/uxbox/main/ui/auth/login.cljs similarity index 85% rename from src/uxbox/ui/auth/login.cljs rename to src/uxbox/main/ui/auth/login.cljs index 8c38d3710..777871f2f 100644 --- a/src/uxbox/ui/auth/login.cljs +++ b/src/uxbox/main/ui/auth/login.cljs @@ -4,21 +4,21 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.auth.login +(ns uxbox.main.ui.auth.login (:require [sablono.core :as html :refer-macros [html]] [lentes.core :as l] [cuerdas.core :as str] [rum.core :as rum] - [uxbox.router :as rt] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.data.auth :as da] - [uxbox.data.messages :as udm] + [uxbox.common.router :as rt] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.main.data.auth :as da] + [uxbox.main.data.messages :as udm] [uxbox.util.dom :as dom] - [uxbox.ui.icons :as i] - [uxbox.ui.messages :as uum] - [uxbox.ui.navigation :as nav] - [uxbox.ui.mixins :as mx])) + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.messages :as uum] + [uxbox.main.ui.navigation :as nav] + [uxbox.main.ui.mixins :as mx])) (defn- login-submit [event local] diff --git a/src/uxbox/ui/auth/recovery.cljs b/src/uxbox/main/ui/auth/recovery.cljs similarity index 81% rename from src/uxbox/ui/auth/recovery.cljs rename to src/uxbox/main/ui/auth/recovery.cljs index 1df936dc5..3b2f0786e 100644 --- a/src/uxbox/ui/auth/recovery.cljs +++ b/src/uxbox/main/ui/auth/recovery.cljs @@ -4,23 +4,23 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.auth.recovery +(ns uxbox.main.ui.auth.recovery (:require [sablono.core :as html :refer-macros [html]] [lentes.core :as l] [cuerdas.core :as str] [rum.core :as rum] - [uxbox.router :as rt] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.schema :as us] - [uxbox.data.auth :as uda] - [uxbox.data.messages :as udm] - [uxbox.data.forms :as udf] - [uxbox.ui.forms :as forms] - [uxbox.ui.icons :as i] - [uxbox.ui.messages :as uum] - [uxbox.ui.navigation :as nav] - [uxbox.ui.mixins :as mx] + [uxbox.common.router :as rt] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.common.schema :as us] + [uxbox.main.data.auth :as uda] + [uxbox.main.data.messages :as udm] + [uxbox.main.data.forms :as udf] + [uxbox.main.ui.forms :as forms] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.messages :as uum] + [uxbox.main.ui.navigation :as nav] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom])) ;; --- Constants diff --git a/src/uxbox/ui/auth/recovery_request.cljs b/src/uxbox/main/ui/auth/recovery_request.cljs similarity index 80% rename from src/uxbox/ui/auth/recovery_request.cljs rename to src/uxbox/main/ui/auth/recovery_request.cljs index cc5787c13..4a04568b1 100644 --- a/src/uxbox/ui/auth/recovery_request.cljs +++ b/src/uxbox/main/ui/auth/recovery_request.cljs @@ -4,23 +4,23 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.auth.recovery-request +(ns uxbox.main.ui.auth.recovery-request (:require [sablono.core :as html :refer-macros [html]] [lentes.core :as l] [cuerdas.core :as str] [rum.core :as rum] - [uxbox.router :as rt] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.schema :as us] - [uxbox.data.auth :as uda] - [uxbox.data.messages :as udm] - [uxbox.data.forms :as udf] - [uxbox.ui.forms :as forms] - [uxbox.ui.icons :as i] - [uxbox.ui.messages :as uum] - [uxbox.ui.navigation :as nav] - [uxbox.ui.mixins :as mx] + [uxbox.common.router :as rt] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.common.schema :as us] + [uxbox.main.data.auth :as uda] + [uxbox.main.data.messages :as udm] + [uxbox.main.data.forms :as udf] + [uxbox.main.ui.forms :as forms] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.messages :as uum] + [uxbox.main.ui.navigation :as nav] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom])) ;; --- Recovery Request Constants diff --git a/src/uxbox/ui/auth/register.cljs b/src/uxbox/main/ui/auth/register.cljs similarity index 85% rename from src/uxbox/ui/auth/register.cljs rename to src/uxbox/main/ui/auth/register.cljs index ab463298c..e94c86e9d 100644 --- a/src/uxbox/ui/auth/register.cljs +++ b/src/uxbox/main/ui/auth/register.cljs @@ -4,23 +4,23 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.auth.register +(ns uxbox.main.ui.auth.register (:require [sablono.core :as html :refer-macros [html]] [lentes.core :as l] [cuerdas.core :as str] [rum.core :as rum] - [uxbox.router :as rt] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.schema :as us] - [uxbox.data.auth :as uda] - [uxbox.data.messages :as udm] - [uxbox.data.forms :as udf] - [uxbox.ui.forms :as forms] - [uxbox.ui.icons :as i] - [uxbox.ui.messages :as uum] - [uxbox.ui.navigation :as nav] - [uxbox.ui.mixins :as mx] + [uxbox.common.router :as rt] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.common.schema :as us] + [uxbox.main.data.auth :as uda] + [uxbox.main.data.messages :as udm] + [uxbox.main.data.forms :as udf] + [uxbox.main.ui.forms :as forms] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.messages :as uum] + [uxbox.main.ui.navigation :as nav] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom])) ;; --- Constants diff --git a/src/uxbox/ui/colorpicker.cljs b/src/uxbox/main/ui/colorpicker.cljs similarity index 98% rename from src/uxbox/ui/colorpicker.cljs rename to src/uxbox/main/ui/colorpicker.cljs index b8486238c..e5f2136a6 100644 --- a/src/uxbox/ui/colorpicker.cljs +++ b/src/uxbox/main/ui/colorpicker.cljs @@ -4,13 +4,13 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.colorpicker +(ns uxbox.main.ui.colorpicker (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] [goog.events :as events] - [uxbox.schema :as sc] - [uxbox.ui.mixins :as mx] + [uxbox.common.schema :as sc] + [uxbox.main.ui.mixins :as mx] [uxbox.util.math :as mth] [uxbox.util.data :as data] [uxbox.util.dom :as dom] diff --git a/src/uxbox/ui/confirm.cljs b/src/uxbox/main/ui/confirm.cljs similarity index 88% rename from src/uxbox/ui/confirm.cljs rename to src/uxbox/main/ui/confirm.cljs index 2c77e5953..2359579c9 100644 --- a/src/uxbox/ui/confirm.cljs +++ b/src/uxbox/main/ui/confirm.cljs @@ -5,13 +5,13 @@ ;; Copyright (c) 2016 Andrey Antukh ;; Copyright (c) 2016 Juan de la Cruz -(ns uxbox.ui.confirm +(ns uxbox.main.ui.confirm (:require [sablono.core :as html :refer-macros [html]] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom] - [uxbox.ui.lightbox :as lbx])) + [uxbox.main.ui.lightbox :as lbx])) (defn- confirm-dialog-render [own {:keys [on-accept on-cancel] :as ctx}] diff --git a/src/uxbox/ui/core.cljs b/src/uxbox/main/ui/core.cljs similarity index 96% rename from src/uxbox/ui/core.cljs rename to src/uxbox/main/ui/core.cljs index 753a934f3..d6478ba45 100644 --- a/src/uxbox/ui/core.cljs +++ b/src/uxbox/main/ui/core.cljs @@ -1,4 +1,4 @@ -(ns uxbox.ui.core +(ns uxbox.main.ui.core (:require [beicon.core :as rx] [cuerdas.core :as str])) diff --git a/src/uxbox/main/ui/dashboard.cljs b/src/uxbox/main/ui/dashboard.cljs new file mode 100644 index 000000000..0e14e5b25 --- /dev/null +++ b/src/uxbox/main/ui/dashboard.cljs @@ -0,0 +1,12 @@ +(ns uxbox.main.ui.dashboard + (:require [uxbox.main.ui.dashboard.projects :as projects] + [uxbox.main.ui.dashboard.elements :as elements] + [uxbox.main.ui.dashboard.icons :as icons] + [uxbox.main.ui.dashboard.images :as images] + [uxbox.main.ui.dashboard.colors :as colors])) + +(def projects-page projects/projects-page) +(def elements-page elements/elements-page) +(def icons-page icons/icons-page) +(def images-page images/images-page) +(def colors-page colors/colors-page) diff --git a/src/uxbox/ui/dashboard/colors.cljs b/src/uxbox/main/ui/dashboard/colors.cljs similarity index 92% rename from src/uxbox/ui/dashboard/colors.cljs rename to src/uxbox/main/ui/dashboard/colors.cljs index 31fd7d07a..bd99e5cb0 100644 --- a/src/uxbox/ui/dashboard/colors.cljs +++ b/src/uxbox/main/ui/dashboard/colors.cljs @@ -5,26 +5,26 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.dashboard.colors +(ns uxbox.main.ui.dashboard.colors (:require [sablono.core :refer-macros [html]] [rum.core :as rum] [cuerdas.core :as str] [lentes.core :as l] - [uxbox.locales :as t :refer (tr)] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.schema :as sc] - [uxbox.library :as library] - [uxbox.data.dashboard :as dd] - [uxbox.data.colors :as dc] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] - [uxbox.ui.forms :as form] - [uxbox.ui.lightbox :as lbx] - [uxbox.ui.colorpicker :refer (colorpicker)] - [uxbox.ui.mixins :as mx] - [uxbox.ui.dashboard.header :refer (header)] - [uxbox.ui.keyboard :as k] + [uxbox.common.i18n :as t :refer (tr)] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.common.schema :as sc] + [uxbox.main.library :as library] + [uxbox.main.data.dashboard :as dd] + [uxbox.main.data.colors :as dc] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.forms :as form] + [uxbox.main.ui.lightbox :as lbx] + [uxbox.main.ui.colorpicker :refer (colorpicker)] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.dashboard.header :refer (header)] + [uxbox.main.ui.keyboard :as k] [uxbox.util.dom :as dom] [uxbox.util.lens :as ul] [uxbox.util.color :refer (hex->rgb)])) diff --git a/src/uxbox/ui/dashboard/elements.cljs b/src/uxbox/main/ui/dashboard/elements.cljs similarity index 92% rename from src/uxbox/ui/dashboard/elements.cljs rename to src/uxbox/main/ui/dashboard/elements.cljs index bf552853c..578de9b4b 100644 --- a/src/uxbox/ui/dashboard/elements.cljs +++ b/src/uxbox/main/ui/dashboard/elements.cljs @@ -5,17 +5,17 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.dashboard.elements +(ns uxbox.main.ui.dashboard.elements (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] - [uxbox.rstore :as rs] - [uxbox.data.dashboard :as dd] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.lightbox :as lbx] - [uxbox.ui.library-bar :as ui.library-bar] - [uxbox.ui.dashboard.header :refer (header)] + [uxbox.common.rstore :as rs] + [uxbox.main.data.dashboard :as dd] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.lightbox :as lbx] + [uxbox.main.ui.library-bar :as ui.library-bar] + [uxbox.main.ui.dashboard.header :refer (header)] [uxbox.util.dom :as dom])) ;; --- Page Title diff --git a/src/uxbox/ui/dashboard/header.cljs b/src/uxbox/main/ui/dashboard/header.cljs similarity index 81% rename from src/uxbox/ui/dashboard/header.cljs rename to src/uxbox/main/ui/dashboard/header.cljs index c26ad0a94..c818c6c6b 100644 --- a/src/uxbox/ui/dashboard/header.cljs +++ b/src/uxbox/main/ui/dashboard/header.cljs @@ -5,19 +5,19 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.dashboard.header +(ns uxbox.main.ui.dashboard.header (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as s] - [uxbox.data.projects :as dp] - [uxbox.ui.navigation :as nav] - [uxbox.ui.icons :as i] - [uxbox.ui.users :as ui.u] - [uxbox.ui.mixins :as mx])) + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as s] + [uxbox.main.data.projects :as dp] + [uxbox.main.ui.navigation :as nav] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.users :as ui.u] + [uxbox.main.ui.mixins :as mx])) (def ^:static header-l (as-> (l/in [:dashboard]) $ diff --git a/src/uxbox/ui/dashboard/icons.cljs b/src/uxbox/main/ui/dashboard/icons.cljs similarity index 89% rename from src/uxbox/ui/dashboard/icons.cljs rename to src/uxbox/main/ui/dashboard/icons.cljs index 35d1cb448..281f35aae 100644 --- a/src/uxbox/ui/dashboard/icons.cljs +++ b/src/uxbox/main/ui/dashboard/icons.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.dashboard.icons +(ns uxbox.main.ui.dashboard.icons (:require [sablono.core :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.schema :as sc] - [uxbox.locales :refer (tr)] - [uxbox.library :as library] - [uxbox.data.dashboard :as dd] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] - [uxbox.ui.shapes.icon :as icon] - [uxbox.ui.lightbox :as lbx] - [uxbox.ui.mixins :as mx] - [uxbox.ui.dashboard.header :refer (header)] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.common.schema :as sc] + [uxbox.common.i18n :refer (tr)] + [uxbox.main.library :as library] + [uxbox.main.data.dashboard :as dd] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.shapes.icon :as icon] + [uxbox.main.ui.lightbox :as lbx] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.dashboard.header :refer (header)] [uxbox.util.dom :as dom])) ;; --- Lenses diff --git a/src/uxbox/ui/dashboard/images.cljs b/src/uxbox/main/ui/dashboard/images.cljs similarity index 94% rename from src/uxbox/ui/dashboard/images.cljs rename to src/uxbox/main/ui/dashboard/images.cljs index 65410c1a6..9eaf51bb6 100644 --- a/src/uxbox/ui/dashboard/images.cljs +++ b/src/uxbox/main/ui/dashboard/images.cljs @@ -5,24 +5,24 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.dashboard.images +(ns uxbox.main.ui.dashboard.images (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [cuerdas.core :as str] [lentes.core :as l] - [uxbox.locales :as t :refer (tr)] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.library :as library] - [uxbox.data.dashboard :as dd] - [uxbox.data.lightbox :as udl] - [uxbox.data.images :as di] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.lightbox :as lbx] - [uxbox.ui.keyboard :as kbd] - [uxbox.ui.library-bar :as ui.library-bar] - [uxbox.ui.dashboard.header :refer (header)] + [uxbox.common.i18n :as t :refer (tr)] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.main.library :as library] + [uxbox.main.data.dashboard :as dd] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.data.images :as di] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.lightbox :as lbx] + [uxbox.main.ui.keyboard :as kbd] + [uxbox.main.ui.library-bar :as ui.library-bar] + [uxbox.main.ui.dashboard.header :refer (header)] [uxbox.util.data :as data] [uxbox.util.lens :as ul] [uxbox.util.dom :as dom])) diff --git a/src/uxbox/ui/dashboard/projects.cljs b/src/uxbox/main/ui/dashboard/projects.cljs similarity index 93% rename from src/uxbox/ui/dashboard/projects.cljs rename to src/uxbox/main/ui/dashboard/projects.cljs index eefad4ad6..8af4d1da5 100644 --- a/src/uxbox/ui/dashboard/projects.cljs +++ b/src/uxbox/main/ui/dashboard/projects.cljs @@ -5,25 +5,25 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.dashboard.projects +(ns uxbox.main.ui.dashboard.projects (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] [cuerdas.core :as str] - [uxbox.locales :as t :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as s] - [uxbox.data.dashboard :as dd] - [uxbox.data.projects :as dp] - [uxbox.data.workspace :as dw] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] + [uxbox.common.i18n :as t :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as s] + [uxbox.main.data.dashboard :as dd] + [uxbox.main.data.projects :as dp] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] [uxbox.util.dom :as dom] - [uxbox.ui.dashboard.header :refer (header)] - [uxbox.ui.lightbox :as lbx] - [uxbox.ui.messages :as uum] - [uxbox.ui.mixins :as mx] + [uxbox.main.ui.dashboard.header :refer (header)] + [uxbox.main.ui.lightbox :as lbx] + [uxbox.main.ui.messages :as uum] + [uxbox.main.ui.mixins :as mx] [uxbox.util.datetime :as dt])) ;; --- Helpers & Constants diff --git a/src/uxbox/ui/forms.cljs b/src/uxbox/main/ui/forms.cljs similarity index 71% rename from src/uxbox/ui/forms.cljs rename to src/uxbox/main/ui/forms.cljs index 3ccee030b..db5bc5be0 100644 --- a/src/uxbox/ui/forms.cljs +++ b/src/uxbox/main/ui/forms.cljs @@ -1,7 +1,7 @@ -(ns uxbox.ui.forms +(ns uxbox.main.ui.forms (:require [sablono.core :refer-macros [html]] - [uxbox.locales :refer (tr)] - [uxbox.schema :as sc])) + [uxbox.common.i18n :refer (tr)] + [uxbox.common.schema :as sc])) (defn input-error [errors field] diff --git a/src/uxbox/ui/icons.cljs b/src/uxbox/main/ui/icons.cljs similarity index 99% rename from src/uxbox/ui/icons.cljs rename to src/uxbox/main/ui/icons.cljs index 7058ecfa0..9177b36f0 100644 --- a/src/uxbox/ui/icons.cljs +++ b/src/uxbox/main/ui/icons.cljs @@ -1,4 +1,4 @@ -(ns uxbox.ui.icons +(ns uxbox.main.ui.icons (:require [sablono.core :as html :refer-macros [html]])) (def logo diff --git a/src/uxbox/ui/keyboard.cljs b/src/uxbox/main/ui/keyboard.cljs similarity index 90% rename from src/uxbox/ui/keyboard.cljs rename to src/uxbox/main/ui/keyboard.cljs index 85a4fb1a8..e479a696e 100644 --- a/src/uxbox/ui/keyboard.cljs +++ b/src/uxbox/main/ui/keyboard.cljs @@ -1,4 +1,4 @@ -(ns uxbox.ui.keyboard) +(ns uxbox.main.ui.keyboard) (defn is-keycode? [keycode] diff --git a/src/uxbox/ui/library_bar.cljs b/src/uxbox/main/ui/library_bar.cljs similarity index 94% rename from src/uxbox/ui/library_bar.cljs rename to src/uxbox/main/ui/library_bar.cljs index 542db5e2b..ad5b4168a 100644 --- a/src/uxbox/ui/library_bar.cljs +++ b/src/uxbox/main/ui/library_bar.cljs @@ -1,8 +1,8 @@ -(ns uxbox.ui.library-bar +(ns uxbox.main.ui.library-bar (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] - [uxbox.ui.mixins :as mx] - [uxbox.ui.icons :as i])) + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.icons :as i])) (defn library-bar-render [own] diff --git a/src/uxbox/ui/lightbox.cljs b/src/uxbox/main/ui/lightbox.cljs similarity index 89% rename from src/uxbox/ui/lightbox.cljs rename to src/uxbox/main/ui/lightbox.cljs index 186f0b7cd..5cc55b5d0 100644 --- a/src/uxbox/ui/lightbox.cljs +++ b/src/uxbox/main/ui/lightbox.cljs @@ -1,11 +1,11 @@ -(ns uxbox.ui.lightbox +(ns uxbox.main.ui.lightbox (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.state :as st] - [uxbox.data.lightbox :as udl] - [uxbox.ui.mixins :as mx] - [uxbox.ui.keyboard :as k] + [uxbox.main.state :as st] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.keyboard :as k] [uxbox.util.dom :as dom] [uxbox.util.data :refer (classnames)] [goog.events :as events]) diff --git a/src/uxbox/ui/loader.cljs b/src/uxbox/main/ui/loader.cljs similarity index 76% rename from src/uxbox/ui/loader.cljs rename to src/uxbox/main/ui/loader.cljs index 0e6aaed03..1981bc329 100644 --- a/src/uxbox/ui/loader.cljs +++ b/src/uxbox/main/ui/loader.cljs @@ -4,14 +4,14 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.loader +(ns uxbox.main.ui.loader (:require [sablono.core :refer-macros [html]] [rum.core :as rum] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.shapes])) + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.shapes])) ;; --- Error Handling diff --git a/src/uxbox/ui/messages.cljs b/src/uxbox/main/ui/messages.cljs similarity index 92% rename from src/uxbox/ui/messages.cljs rename to src/uxbox/main/ui/messages.cljs index e63ec55dc..e78f1722f 100644 --- a/src/uxbox/ui/messages.cljs +++ b/src/uxbox/main/ui/messages.cljs @@ -1,12 +1,12 @@ -(ns uxbox.ui.messages +(ns uxbox.main.ui.messages (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [promesa.core :as p] [lentes.core :as l] - [uxbox.state :as st] - [uxbox.data.messages :as udm] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.main.state :as st] + [uxbox.main.data.messages :as udm] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.data :refer (classnames)] [uxbox.util.dom :as dom])) diff --git a/src/uxbox/ui/mixins.cljs b/src/uxbox/main/ui/mixins.cljs similarity index 99% rename from src/uxbox/ui/mixins.cljs rename to src/uxbox/main/ui/mixins.cljs index 60473b430..37a7045b3 100644 --- a/src/uxbox/ui/mixins.cljs +++ b/src/uxbox/main/ui/mixins.cljs @@ -1,4 +1,4 @@ -(ns uxbox.ui.mixins +(ns uxbox.main.ui.mixins (:refer-clojure :exclude [derive]) (:require [rum.core :as rum] [lentes.core :as l] diff --git a/src/uxbox/ui/navigation.cljs b/src/uxbox/main/ui/navigation.cljs similarity index 92% rename from src/uxbox/ui/navigation.cljs rename to src/uxbox/main/ui/navigation.cljs index 7eda22d44..33c0532eb 100644 --- a/src/uxbox/ui/navigation.cljs +++ b/src/uxbox/main/ui/navigation.cljs @@ -1,4 +1,4 @@ -(ns uxbox.ui.navigation +(ns uxbox.main.ui.navigation (:require [sablono.core :as html :refer-macros [html]] [goog.events :as events] [uxbox.util.dom :as dom])) diff --git a/src/uxbox/ui/settings.cljs b/src/uxbox/main/ui/settings.cljs similarity index 59% rename from src/uxbox/ui/settings.cljs rename to src/uxbox/main/ui/settings.cljs index b52282b73..1bc6bb81a 100644 --- a/src/uxbox/ui/settings.cljs +++ b/src/uxbox/main/ui/settings.cljs @@ -5,19 +5,19 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.settings +(ns uxbox.main.ui.settings (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [cuerdas.core :as str] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom] - [uxbox.ui.settings.profile :as profile] - [uxbox.ui.settings.password :as password] - [uxbox.ui.settings.notifications :as notifications] - [uxbox.ui.dashboard.header :refer (header)])) + [uxbox.main.ui.settings.profile :as profile] + [uxbox.main.ui.settings.password :as password] + [uxbox.main.ui.settings.notifications :as notifications] + [uxbox.main.ui.dashboard.header :refer (header)])) (def profile-page profile/profile-page) (def password-page password/password-page) diff --git a/src/uxbox/ui/settings/header.cljs b/src/uxbox/main/ui/settings/header.cljs similarity index 78% rename from src/uxbox/ui/settings/header.cljs rename to src/uxbox/main/ui/settings/header.cljs index 4e2ff3580..7c4f413ac 100644 --- a/src/uxbox/ui/settings/header.cljs +++ b/src/uxbox/main/ui/settings/header.cljs @@ -5,19 +5,19 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.settings.header +(ns uxbox.main.ui.settings.header (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.data.projects :as dp] - [uxbox.ui.navigation :as nav] - [uxbox.ui.icons :as i] - [uxbox.ui.users :refer (user)] - [uxbox.ui.mixins :as mx])) + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.data.projects :as dp] + [uxbox.main.ui.navigation :as nav] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.users :refer (user)] + [uxbox.main.ui.mixins :as mx])) (def ^:private section-l (-> (l/in [:route :id]) diff --git a/src/uxbox/ui/settings/notifications.cljs b/src/uxbox/main/ui/settings/notifications.cljs similarity index 85% rename from src/uxbox/ui/settings/notifications.cljs rename to src/uxbox/main/ui/settings/notifications.cljs index 6f6e3a439..c4195c4d8 100644 --- a/src/uxbox/ui/settings/notifications.cljs +++ b/src/uxbox/main/ui/settings/notifications.cljs @@ -5,16 +5,16 @@ ;; Copyright (c) 2016 Andrey Antukh ;; Copyright (c) 2016 Juan de la Cruz -(ns uxbox.ui.settings.notifications +(ns uxbox.main.ui.settings.notifications (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [cuerdas.core :as str] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom] - [uxbox.ui.settings.header :refer (header)])) + [uxbox.main.ui.settings.header :refer (header)])) (defn notifications-page-render [own] diff --git a/src/uxbox/ui/settings/password.cljs b/src/uxbox/main/ui/settings/password.cljs similarity index 83% rename from src/uxbox/ui/settings/password.cljs rename to src/uxbox/main/ui/settings/password.cljs index e1650e3b2..dad4480b9 100644 --- a/src/uxbox/ui/settings/password.cljs +++ b/src/uxbox/main/ui/settings/password.cljs @@ -5,23 +5,23 @@ ;; Copyright (c) 2016 Andrey Antukh ;; Copyright (c) 2016 Juan de la Cruz -(ns uxbox.ui.settings.password +(ns uxbox.main.ui.settings.password (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] [cuerdas.core :as str] - [uxbox.schema :as sc] - [uxbox.state :as st] - [uxbox.locales :as t :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.data.users :as udu] - [uxbox.data.forms :as udf] - [uxbox.ui.icons :as i] - [uxbox.ui.forms :as forms] - [uxbox.ui.messages :as uum] - [uxbox.ui.mixins :as mx] - [uxbox.ui.settings.header :refer (header)] + [uxbox.common.schema :as sc] + [uxbox.main.state :as st] + [uxbox.common.i18n :as t :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.data.users :as udu] + [uxbox.main.data.forms :as udf] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.forms :as forms] + [uxbox.main.ui.messages :as uum] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.settings.header :refer (header)] [uxbox.util.dom :as dom])) ;; --- Password Form diff --git a/src/uxbox/ui/settings/profile.cljs b/src/uxbox/main/ui/settings/profile.cljs similarity index 90% rename from src/uxbox/ui/settings/profile.cljs rename to src/uxbox/main/ui/settings/profile.cljs index 5e09497e5..a1aa841d1 100644 --- a/src/uxbox/ui/settings/profile.cljs +++ b/src/uxbox/main/ui/settings/profile.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2016 Andrey Antukh ;; Copyright (c) 2016 Juan de la Cruz -(ns uxbox.ui.settings.profile +(ns uxbox.main.ui.settings.profile (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [cuerdas.core :as str] [lentes.core :as l] - [uxbox.schema :as sc] - [uxbox.router :as r] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.forms :as forms] - [uxbox.ui.settings.header :refer (header)] - [uxbox.ui.messages :as uum] - [uxbox.data.users :as udu] - [uxbox.data.forms :as udf] + [uxbox.common.schema :as sc] + [uxbox.common.router :as r] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.forms :as forms] + [uxbox.main.ui.settings.header :refer (header)] + [uxbox.main.ui.messages :as uum] + [uxbox.main.data.users :as udu] + [uxbox.main.data.forms :as udf] [uxbox.util.interop :refer (iterable->seq)] [uxbox.util.dom :as dom])) diff --git a/src/uxbox/ui/shapes.cljs b/src/uxbox/main/ui/shapes.cljs similarity index 81% rename from src/uxbox/ui/shapes.cljs rename to src/uxbox/main/ui/shapes.cljs index 0a3f5091f..617914f15 100644 --- a/src/uxbox/ui/shapes.cljs +++ b/src/uxbox/main/ui/shapes.cljs @@ -4,12 +4,12 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.shapes +(ns uxbox.main.ui.shapes (:require [lentes.core :as l] [rum.core :as rum] - [uxbox.state :as st] - [uxbox.ui.mixins :as mx] - [uxbox.ui.shapes.group :as group])) + [uxbox.main.state :as st] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.shapes.group :as group])) (def render-component group/render-component) diff --git a/src/uxbox/ui/shapes/attrs.cljs b/src/uxbox/main/ui/shapes/attrs.cljs similarity index 97% rename from src/uxbox/ui/shapes/attrs.cljs rename to src/uxbox/main/ui/shapes/attrs.cljs index e0fb350b4..939244c84 100644 --- a/src/uxbox/ui/shapes/attrs.cljs +++ b/src/uxbox/main/ui/shapes/attrs.cljs @@ -4,7 +4,7 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.shapes.attrs) +(ns uxbox.main.ui.shapes.attrs) (def ^:private +style-attrs+ #{:fill :fill-opacity :opacity diff --git a/src/uxbox/ui/shapes/circle.cljs b/src/uxbox/main/ui/shapes/circle.cljs similarity index 87% rename from src/uxbox/ui/shapes/circle.cljs rename to src/uxbox/main/ui/shapes/circle.cljs index cff21f867..632745562 100644 --- a/src/uxbox/ui/shapes/circle.cljs +++ b/src/uxbox/main/ui/shapes/circle.cljs @@ -4,14 +4,14 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.shapes.circle +(ns uxbox.main.ui.shapes.circle (:require [sablono.core :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.ui.mixins :as mx] - [uxbox.ui.shapes.common :as common] - [uxbox.ui.shapes.attrs :as attrs] - [uxbox.util.geom :as geom])) + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.shapes.common :as common] + [uxbox.main.ui.shapes.attrs :as attrs] + [uxbox.common.geom :as geom])) ;; --- Circle Component diff --git a/src/uxbox/ui/shapes/common.cljs b/src/uxbox/main/ui/shapes/common.cljs similarity index 86% rename from src/uxbox/ui/shapes/common.cljs rename to src/uxbox/main/ui/shapes/common.cljs index 5ca6fd93a..799a2bd36 100644 --- a/src/uxbox/ui/shapes/common.cljs +++ b/src/uxbox/main/ui/shapes/common.cljs @@ -4,15 +4,15 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.shapes.common +(ns uxbox.main.ui.shapes.common (:require [sablono.core :refer-macros [html]] [lentes.core :as l] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.data.shapes :as uds] - [uxbox.ui.core :as ui] - [uxbox.ui.keyboard :as kbd] - [uxbox.util.geom :as geom] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.core :as ui] + [uxbox.main.ui.keyboard :as kbd] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom])) ;; --- Lenses diff --git a/src/uxbox/ui/shapes/group.cljs b/src/uxbox/main/ui/shapes/group.cljs similarity index 80% rename from src/uxbox/ui/shapes/group.cljs rename to src/uxbox/main/ui/shapes/group.cljs index f21a94a44..bf805de4d 100644 --- a/src/uxbox/ui/shapes/group.cljs +++ b/src/uxbox/main/ui/shapes/group.cljs @@ -4,20 +4,20 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.shapes.group +(ns uxbox.main.ui.shapes.group (:require [sablono.core :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.state :as st] - [uxbox.ui.mixins :as mx] - [uxbox.ui.shapes.common :as common] - [uxbox.ui.shapes.attrs :as attrs] - [uxbox.ui.shapes.icon :as icon] - [uxbox.ui.shapes.rect :as rect] - [uxbox.ui.shapes.circle :as circle] - [uxbox.ui.shapes.text :as text] - [uxbox.ui.shapes.line :as line] - [uxbox.util.geom :as geom])) + [uxbox.main.state :as st] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.shapes.common :as common] + [uxbox.main.ui.shapes.attrs :as attrs] + [uxbox.main.ui.shapes.icon :as icon] + [uxbox.main.ui.shapes.rect :as rect] + [uxbox.main.ui.shapes.circle :as circle] + [uxbox.main.ui.shapes.text :as text] + [uxbox.main.ui.shapes.line :as line] + [uxbox.common.geom :as geom])) ;; --- Helpers diff --git a/src/uxbox/ui/shapes/icon.cljs b/src/uxbox/main/ui/shapes/icon.cljs similarity index 89% rename from src/uxbox/ui/shapes/icon.cljs rename to src/uxbox/main/ui/shapes/icon.cljs index f7ca8a648..b8c8273be 100644 --- a/src/uxbox/ui/shapes/icon.cljs +++ b/src/uxbox/main/ui/shapes/icon.cljs @@ -4,13 +4,13 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.shapes.icon +(ns uxbox.main.ui.shapes.icon (:require [sablono.core :refer-macros [html]] [rum.core :as rum] - [uxbox.ui.mixins :as mx] - [uxbox.ui.shapes.common :as common] - [uxbox.ui.shapes.attrs :as attrs] - [uxbox.util.geom :as geom])) + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.shapes.common :as common] + [uxbox.main.ui.shapes.attrs :as attrs] + [uxbox.common.geom :as geom])) ;; --- Icon Component diff --git a/src/uxbox/ui/shapes/line.cljs b/src/uxbox/main/ui/shapes/line.cljs similarity index 86% rename from src/uxbox/ui/shapes/line.cljs rename to src/uxbox/main/ui/shapes/line.cljs index 44d7f91b6..a5b32e9b3 100644 --- a/src/uxbox/ui/shapes/line.cljs +++ b/src/uxbox/main/ui/shapes/line.cljs @@ -4,13 +4,13 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.shapes.line +(ns uxbox.main.ui.shapes.line (:require [sablono.core :refer-macros [html]] [rum.core :as rum] - [uxbox.ui.mixins :as mx] - [uxbox.ui.shapes.common :as common] - [uxbox.ui.shapes.attrs :as attrs] - [uxbox.util.geom :as geom])) + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.shapes.common :as common] + [uxbox.main.ui.shapes.attrs :as attrs] + [uxbox.common.geom :as geom])) ;; --- Line Component diff --git a/src/uxbox/ui/shapes/rect.cljs b/src/uxbox/main/ui/shapes/rect.cljs similarity index 87% rename from src/uxbox/ui/shapes/rect.cljs rename to src/uxbox/main/ui/shapes/rect.cljs index de66056ac..553e29fc5 100644 --- a/src/uxbox/ui/shapes/rect.cljs +++ b/src/uxbox/main/ui/shapes/rect.cljs @@ -4,13 +4,13 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.shapes.rect +(ns uxbox.main.ui.shapes.rect (:require [sablono.core :refer-macros [html]] [rum.core :as rum] - [uxbox.ui.shapes.common :as common] - [uxbox.ui.shapes.attrs :as attrs] - [uxbox.ui.mixins :as mx] - [uxbox.util.geom :as geom] + [uxbox.main.ui.shapes.common :as common] + [uxbox.main.ui.shapes.attrs :as attrs] + [uxbox.main.ui.mixins :as mx] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom])) ;; --- Rect Component diff --git a/src/uxbox/ui/shapes/text.cljs b/src/uxbox/main/ui/shapes/text.cljs similarity index 93% rename from src/uxbox/ui/shapes/text.cljs rename to src/uxbox/main/ui/shapes/text.cljs index 81ce6beeb..b53dbb011 100644 --- a/src/uxbox/ui/shapes/text.cljs +++ b/src/uxbox/main/ui/shapes/text.cljs @@ -4,19 +4,19 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.shapes.text +(ns uxbox.main.ui.shapes.text (:require [sablono.core :refer-macros [html]] [cuerdas.core :as str] [rum.core :as rum] [lentes.core :as l] [goog.events :as events] - [uxbox.rstore :as rs] - [uxbox.data.shapes :as uds] - [uxbox.ui.core :as ui] - [uxbox.ui.mixins :as mx] - [uxbox.ui.shapes.common :as common] - [uxbox.ui.shapes.attrs :as attrs] - [uxbox.util.geom :as geom] + [uxbox.common.rstore :as rs] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.core :as ui] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.shapes.common :as common] + [uxbox.main.ui.shapes.attrs :as attrs] + [uxbox.common.geom :as geom] [uxbox.util.color :as color] [uxbox.util.dom :as dom]) (:import goog.events.EventType)) diff --git a/src/uxbox/ui/users.cljs b/src/uxbox/main/ui/users.cljs similarity index 83% rename from src/uxbox/ui/users.cljs rename to src/uxbox/main/ui/users.cljs index e2fcd08b0..32ee0055c 100644 --- a/src/uxbox/ui/users.cljs +++ b/src/uxbox/main/ui/users.cljs @@ -4,19 +4,19 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox.ui.users +(ns uxbox.main.ui.users (:require [sablono.core :as html :refer-macros [html]] [cuerdas.core :as str] [lentes.core :as l] [rum.core :as rum] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as s] - [uxbox.data.auth :as da] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] - [uxbox.ui.navigation :as nav] - [uxbox.ui.mixins :as mx])) + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as s] + [uxbox.main.data.auth :as da] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.navigation :as nav] + [uxbox.main.ui.mixins :as mx])) ;; --- User Menu diff --git a/src/uxbox/ui/workspace.cljs b/src/uxbox/main/ui/workspace.cljs similarity index 77% rename from src/uxbox/ui/workspace.cljs rename to src/uxbox/main/ui/workspace.cljs index 469945862..aff8d7816 100644 --- a/src/uxbox/ui/workspace.cljs +++ b/src/uxbox/main/ui/workspace.cljs @@ -5,33 +5,33 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace +(ns uxbox.main.ui.workspace (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [beicon.core :as rx] - [uxbox.constants :as c] - [uxbox.rstore :as rs] - [uxbox.data.workspace :as dw] - [uxbox.data.pages :as udp] - [uxbox.data.history :as udh] + [uxbox.main.constants :as c] + [uxbox.common.rstore :as rs] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.pages :as udp] + [uxbox.main.data.history :as udh] [uxbox.util.dom :as dom] - [uxbox.util.geom.point :as gpt] + [uxbox.common.geom.point :as gpt] [uxbox.util.data :refer (classnames)] - [uxbox.ui.mixins :as mx] - [uxbox.ui.messages :as uum] - [uxbox.ui.confirm] - [uxbox.ui.workspace.images] - [uxbox.ui.keyboard :as kbd] - [uxbox.ui.workspace.scroll :as scroll] - [uxbox.ui.workspace.download] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.workspace.shortcuts :refer (shortcuts-mixin)] - [uxbox.ui.workspace.header :refer (header)] - [uxbox.ui.workspace.rules :refer (horizontal-rule vertical-rule)] - [uxbox.ui.workspace.sidebar.history :refer (history-dialog)] - [uxbox.ui.workspace.sidebar :refer (left-sidebar right-sidebar)] - [uxbox.ui.workspace.colorpalette :refer (colorpalette)] - [uxbox.ui.workspace.canvas :refer (viewport)])) + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.messages :as uum] + [uxbox.main.ui.confirm] + [uxbox.main.ui.workspace.images] + [uxbox.main.ui.keyboard :as kbd] + [uxbox.main.ui.workspace.scroll :as scroll] + [uxbox.main.ui.workspace.download] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.workspace.shortcuts :refer (shortcuts-mixin)] + [uxbox.main.ui.workspace.header :refer (header)] + [uxbox.main.ui.workspace.rules :refer (horizontal-rule vertical-rule)] + [uxbox.main.ui.workspace.sidebar.history :refer (history-dialog)] + [uxbox.main.ui.workspace.sidebar :refer (left-sidebar right-sidebar)] + [uxbox.main.ui.workspace.colorpalette :refer (colorpalette)] + [uxbox.main.ui.workspace.canvas :refer (viewport)])) ;; --- Workspace diff --git a/src/uxbox/ui/workspace/base.cljs b/src/uxbox/main/ui/workspace/base.cljs similarity index 90% rename from src/uxbox/ui/workspace/base.cljs rename to src/uxbox/main/ui/workspace/base.cljs index f3cd60a74..424dff683 100644 --- a/src/uxbox/ui/workspace/base.cljs +++ b/src/uxbox/main/ui/workspace/base.cljs @@ -5,15 +5,15 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.base +(ns uxbox.main.ui.workspace.base (:require [beicon.core :as rx] [lentes.core :as l] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.state.project :as stpr] - [uxbox.data.workspace :as dw] - [uxbox.data.shapes :as uds] - [uxbox.util.geom.point :as gpt] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.state.project :as stpr] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.shapes :as uds] + [uxbox.common.geom.point :as gpt] [uxbox.util.lens :as ul] [goog.events :as events]) (:import goog.events.EventType)) diff --git a/src/uxbox/ui/workspace/canvas.cljs b/src/uxbox/main/ui/workspace/canvas.cljs similarity index 86% rename from src/uxbox/ui/workspace/canvas.cljs rename to src/uxbox/main/ui/workspace/canvas.cljs index 93039f864..9ab5babdf 100644 --- a/src/uxbox/ui/workspace/canvas.cljs +++ b/src/uxbox/main/ui/workspace/canvas.cljs @@ -5,32 +5,32 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.canvas +(ns uxbox.main.ui.workspace.canvas (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [beicon.core :as rx] [lentes.core :as l] [goog.events :as events] - [uxbox.constants :as c] - [uxbox.rstore :as rs] - [uxbox.data.projects :as dp] - [uxbox.data.workspace :as dw] - [uxbox.data.shapes :as uds] - [uxbox.util.geom.point :as gpt] + [uxbox.main.constants :as c] + [uxbox.common.rstore :as rs] + [uxbox.main.data.projects :as dp] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.shapes :as uds] + [uxbox.common.geom.point :as gpt] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int)] - [uxbox.ui.core :as uuc] - [uxbox.ui.keyboard :as kbd] - [uxbox.ui.shapes :as uus] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.base :as uuwb] - [uxbox.ui.workspace.drawarea :refer (draw-area)] - [uxbox.ui.workspace.movement :as cmov] - [uxbox.ui.workspace.resize :as cres] - [uxbox.ui.workspace.ruler :refer (ruler)] - [uxbox.ui.workspace.selection :refer (selection-handlers)] - [uxbox.ui.workspace.selrect :refer (selrect)] - [uxbox.ui.workspace.grid :refer (grid)]) + [uxbox.main.ui.core :as uuc] + [uxbox.main.ui.keyboard :as kbd] + [uxbox.main.ui.shapes :as uus] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.base :as uuwb] + [uxbox.main.ui.workspace.drawarea :refer (draw-area)] + [uxbox.main.ui.workspace.movement :as cmov] + [uxbox.main.ui.workspace.resize :as cres] + [uxbox.main.ui.workspace.ruler :refer (ruler)] + [uxbox.main.ui.workspace.selection :refer (selection-handlers)] + [uxbox.main.ui.workspace.selrect :refer (selrect)] + [uxbox.main.ui.workspace.grid :refer (grid)]) (:import goog.events.EventType)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/uxbox/ui/workspace/clipboard.cljs b/src/uxbox/main/ui/workspace/clipboard.cljs similarity index 81% rename from src/uxbox/ui/workspace/clipboard.cljs rename to src/uxbox/main/ui/workspace/clipboard.cljs index 11798d962..fc6502da4 100644 --- a/src/uxbox/ui/workspace/clipboard.cljs +++ b/src/uxbox/main/ui/workspace/clipboard.cljs @@ -5,17 +5,17 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.clipboard +(ns uxbox.main.ui.workspace.clipboard (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.data.lightbox :as udl] - [uxbox.data.workspace :as udw] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.lightbox :as lbx] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.data.workspace :as udw] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.lightbox :as lbx] [uxbox.util.dom :as dom] [uxbox.util.datetime :as dt])) diff --git a/src/uxbox/ui/workspace/colorpalette.cljs b/src/uxbox/main/ui/workspace/colorpalette.cljs similarity index 88% rename from src/uxbox/ui/workspace/colorpalette.cljs rename to src/uxbox/main/ui/workspace/colorpalette.cljs index a04503bf9..063299678 100644 --- a/src/uxbox/ui/workspace/colorpalette.cljs +++ b/src/uxbox/main/ui/workspace/colorpalette.cljs @@ -5,24 +5,24 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.colorpalette +(ns uxbox.main.ui.workspace.colorpalette (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [beicon.core :as rx] [lentes.core :as l] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.workspace :as dw] - [uxbox.data.shapes :as uds] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.shapes :as uds] [uxbox.util.lens :as ul] [uxbox.util.data :refer (read-string)] [uxbox.util.color :refer (hex->rgb)] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.keyboard :as kbd] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.keyboard :as kbd] [uxbox.util.dom :as dom] - [uxbox.ui.mixins :as mx])) + [uxbox.main.ui.mixins :as mx])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Lenses diff --git a/src/uxbox/ui/workspace/colorpicker.cljs b/src/uxbox/main/ui/workspace/colorpicker.cljs similarity index 71% rename from src/uxbox/ui/workspace/colorpicker.cljs rename to src/uxbox/main/ui/workspace/colorpicker.cljs index 5bb53473f..0ef1b41fb 100644 --- a/src/uxbox/ui/workspace/colorpicker.cljs +++ b/src/uxbox/main/ui/workspace/colorpicker.cljs @@ -5,24 +5,24 @@ ;; Copyright (c) 2016 Andrey Antukh ;; Copyright (c) 2016 Juan de la Cruz -(ns uxbox.ui.workspace.colorpicker +(ns uxbox.main.ui.workspace.colorpicker (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.data.workspace :as udw] - [uxbox.data.shapes :as uds] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.lightbox :as lbx] - [uxbox.ui.colorpicker :as cp] - [uxbox.ui.workspace.recent-colors :refer (recent-colors)] - [uxbox.ui.workspace.base :as wb] - [uxbox.util.geom :as geom] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.lightbox :as lbx] + [uxbox.main.ui.colorpicker :as cp] + [uxbox.main.ui.workspace.recent-colors :refer (recent-colors)] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int parse-float read-string)])) diff --git a/src/uxbox/ui/workspace/download.cljs b/src/uxbox/main/ui/workspace/download.cljs similarity index 61% rename from src/uxbox/ui/workspace/download.cljs rename to src/uxbox/main/ui/workspace/download.cljs index 4b4ff612b..aab94ded0 100644 --- a/src/uxbox/ui/workspace/download.cljs +++ b/src/uxbox/main/ui/workspace/download.cljs @@ -5,23 +5,23 @@ ;; Copyright (c) 2016 Andrey Antukh ;; Copyright (c) 2016 Juan de la Cruz -(ns uxbox.ui.workspace.download +(ns uxbox.main.ui.workspace.download (:require [sablono.core :as html :refer-macros [html]] [lentes.core :as l] [rum.core :as rum] - [uxbox.constants :as c] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.data.pages :as udp] - [uxbox.data.forms :as udf] - [uxbox.data.workspace :as udw] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.forms :as forms] - [uxbox.ui.lightbox :as lbx] - [uxbox.ui.colorpicker :as uucp] - [uxbox.ui.workspace.base :as wb] + [uxbox.main.constants :as c] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.main.data.pages :as udp] + [uxbox.main.data.forms :as udf] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.forms :as forms] + [uxbox.main.ui.lightbox :as lbx] + [uxbox.main.ui.colorpicker :as uucp] + [uxbox.main.ui.workspace.base :as wb] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int)])) diff --git a/src/uxbox/ui/workspace/drawarea.cljs b/src/uxbox/main/ui/workspace/drawarea.cljs similarity index 88% rename from src/uxbox/ui/workspace/drawarea.cljs rename to src/uxbox/main/ui/workspace/drawarea.cljs index 9e3fe881d..e49fe9a63 100644 --- a/src/uxbox/ui/workspace/drawarea.cljs +++ b/src/uxbox/main/ui/workspace/drawarea.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.drawarea +(ns uxbox.main.ui.workspace.drawarea (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [beicon.core :as rx] [lentes.core :as l] - [uxbox.constants :as c] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.data.workspace :as udw] - [uxbox.data.shapes :as uds] - [uxbox.ui.core :as uuc] - [uxbox.ui.shapes :as shapes] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.mixins :as mx] - [uxbox.util.geom :as geom] - [uxbox.util.geom.point :as gpt] + [uxbox.main.constants :as c] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.core :as uuc] + [uxbox.main.ui.shapes :as shapes] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.mixins :as mx] + [uxbox.common.geom :as geom] + [uxbox.common.geom.point :as gpt] [uxbox.util.dom :as dom])) ;; --- State diff --git a/src/uxbox/ui/workspace/grid.cljs b/src/uxbox/main/ui/workspace/grid.cljs similarity index 91% rename from src/uxbox/ui/workspace/grid.cljs rename to src/uxbox/main/ui/workspace/grid.cljs index a5b864c48..9cbb06803 100644 --- a/src/uxbox/ui/workspace/grid.cljs +++ b/src/uxbox/main/ui/workspace/grid.cljs @@ -5,13 +5,13 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.grid +(ns uxbox.main.ui.workspace.grid (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [cuerdas.core :as str] - [uxbox.constants :as c] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.base :as wb])) + [uxbox.main.constants :as c] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.base :as wb])) ;; --- Grid (Component) diff --git a/src/uxbox/ui/workspace/header.cljs b/src/uxbox/main/ui/workspace/header.cljs similarity index 89% rename from src/uxbox/ui/workspace/header.cljs rename to src/uxbox/main/ui/workspace/header.cljs index 98f28e129..ed225e2f2 100644 --- a/src/uxbox/ui/workspace/header.cljs +++ b/src/uxbox/main/ui/workspace/header.cljs @@ -5,23 +5,23 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.header +(ns uxbox.main.ui.workspace.header (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [beicon.core :as rx] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.data.workspace :as dw] - [uxbox.data.history :as udh] - [uxbox.data.lightbox :as udl] - [uxbox.ui.workspace.clipboard] - [uxbox.ui.workspace.settings] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.users :as ui.u] - [uxbox.ui.navigation :as nav] - [uxbox.ui.mixins :as mx] - [uxbox.util.geom.point :as gpt] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.history :as udh] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.workspace.clipboard] + [uxbox.main.ui.workspace.settings] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.users :as ui.u] + [uxbox.main.ui.navigation :as nav] + [uxbox.main.ui.mixins :as mx] + [uxbox.common.geom.point :as gpt] [uxbox.util.math :as mth])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/uxbox/ui/workspace/images.cljs b/src/uxbox/main/ui/workspace/images.cljs similarity index 70% rename from src/uxbox/ui/workspace/images.cljs rename to src/uxbox/main/ui/workspace/images.cljs index 223b57aaf..fba2301af 100644 --- a/src/uxbox/ui/workspace/images.cljs +++ b/src/uxbox/main/ui/workspace/images.cljs @@ -5,23 +5,23 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.images +(ns uxbox.main.ui.workspace.images (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :as t :refer (tr)] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.library :as library] - [uxbox.data.dashboard :as dd] - [uxbox.data.lightbox :as udl] - [uxbox.data.images :as di] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.lightbox :as lbx] - [uxbox.ui.keyboard :as k] - [uxbox.ui.library-bar :as ui.library-bar] - [uxbox.ui.dashboard.header :refer (header)] + [uxbox.common.i18n :as t :refer (tr)] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.main.library :as library] + [uxbox.main.data.dashboard :as dd] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.data.images :as di] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.lightbox :as lbx] + [uxbox.main.ui.keyboard :as k] + [uxbox.main.ui.library-bar :as ui.library-bar] + [uxbox.main.ui.dashboard.header :refer (header)] [uxbox.util.lens :as ul] [uxbox.util.dom :as dom])) diff --git a/src/uxbox/ui/workspace/movement.cljs b/src/uxbox/main/ui/workspace/movement.cljs similarity index 74% rename from src/uxbox/ui/workspace/movement.cljs rename to src/uxbox/main/ui/workspace/movement.cljs index 0537ed789..e20c7ae6e 100644 --- a/src/uxbox/ui/workspace/movement.cljs +++ b/src/uxbox/main/ui/workspace/movement.cljs @@ -5,18 +5,18 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.movement +(ns uxbox.main.ui.workspace.movement "Shape movement in workspace logic." (:require [beicon.core :as rx] [lentes.core :as l] - [uxbox.constants :as c] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.ui.core :as uuc] - [uxbox.ui.workspace.base :as wb] - [uxbox.data.shapes :as uds] - [uxbox.util.geom :as geom] - [uxbox.util.geom.point :as gpt])) + [uxbox.main.constants :as c] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.ui.core :as uuc] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.data.shapes :as uds] + [uxbox.common.geom :as geom] + [uxbox.common.geom.point :as gpt])) ;; --- Public Api diff --git a/src/uxbox/ui/workspace/recent_colors.cljs b/src/uxbox/main/ui/workspace/recent_colors.cljs similarity index 83% rename from src/uxbox/ui/workspace/recent_colors.cljs rename to src/uxbox/main/ui/workspace/recent_colors.cljs index d14de70f8..4a7f00dc7 100644 --- a/src/uxbox/ui/workspace/recent_colors.cljs +++ b/src/uxbox/main/ui/workspace/recent_colors.cljs @@ -5,18 +5,18 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.recent-colors +(ns uxbox.main.ui.workspace.recent-colors (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.data.workspace :as dw] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.data.workspace :as dw] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom] - [uxbox.ui.workspace.base :as wb])) + [uxbox.main.ui.workspace.base :as wb])) ;; --- Helpers diff --git a/src/uxbox/ui/workspace/resize.cljs b/src/uxbox/main/ui/workspace/resize.cljs similarity index 83% rename from src/uxbox/ui/workspace/resize.cljs rename to src/uxbox/main/ui/workspace/resize.cljs index 8520995c3..0ad1e339d 100644 --- a/src/uxbox/ui/workspace/resize.cljs +++ b/src/uxbox/main/ui/workspace/resize.cljs @@ -5,13 +5,13 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.resize +(ns uxbox.main.ui.workspace.resize (:require [beicon.core :as rx] - [uxbox.rstore :as rs] - [uxbox.data.shapes :as uds] - [uxbox.ui.core :as uuc] - [uxbox.ui.workspace.base :as wb] - [uxbox.util.geom.point :as gpt])) + [uxbox.common.rstore :as rs] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.core :as uuc] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.common.geom.point :as gpt])) (declare initialize) diff --git a/src/uxbox/ui/workspace/ruler.cljs b/src/uxbox/main/ui/workspace/ruler.cljs similarity index 94% rename from src/uxbox/ui/workspace/ruler.cljs rename to src/uxbox/main/ui/workspace/ruler.cljs index 0afe957e9..c522239d1 100644 --- a/src/uxbox/ui/workspace/ruler.cljs +++ b/src/uxbox/main/ui/workspace/ruler.cljs @@ -5,16 +5,16 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.ruler +(ns uxbox.main.ui.workspace.ruler (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [beicon.core :as rx] - [uxbox.constants :as c] - [uxbox.rstore :as rs] + [uxbox.main.constants :as c] + [uxbox.common.rstore :as rs] [uxbox.util.math :as mth] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.mixins :as mx] - [uxbox.util.geom.point :as gpt] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.mixins :as mx] + [uxbox.common.geom.point :as gpt] [uxbox.util.dom :as dom])) (def ^:private ^:const immanted-zones diff --git a/src/uxbox/ui/workspace/rules.cljs b/src/uxbox/main/ui/workspace/rules.cljs similarity index 96% rename from src/uxbox/ui/workspace/rules.cljs rename to src/uxbox/main/ui/workspace/rules.cljs index 71062b1ae..c3d2cf7d8 100644 --- a/src/uxbox/ui/workspace/rules.cljs +++ b/src/uxbox/main/ui/workspace/rules.cljs @@ -5,16 +5,16 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.rules +(ns uxbox.main.ui.workspace.rules (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [cuerdas.core :as str] [beicon.core :as rx] - [uxbox.constants :as c] - [uxbox.state :as s] + [uxbox.main.constants :as c] + [uxbox.main.state :as s] [uxbox.util.dom :as dom] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.mixins :as mx])) + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.mixins :as mx])) ;; --- Constants & Helpers diff --git a/src/uxbox/ui/workspace/scroll.cljs b/src/uxbox/main/ui/workspace/scroll.cljs similarity index 80% rename from src/uxbox/ui/workspace/scroll.cljs rename to src/uxbox/main/ui/workspace/scroll.cljs index cfc63463e..51c3309a9 100644 --- a/src/uxbox/ui/workspace/scroll.cljs +++ b/src/uxbox/main/ui/workspace/scroll.cljs @@ -5,17 +5,17 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.scroll +(ns uxbox.main.ui.workspace.scroll (:require [beicon.core :as rx] [lentes.core :as l] - [uxbox.constants :as c] - [uxbox.rstore :as rs] - [uxbox.state :as ust] - [uxbox.data.shapes :as uds] - [uxbox.ui.core :as uuc] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.base :as uuwb] - [uxbox.util.geom.point :as gpt])) + [uxbox.main.constants :as c] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as ust] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.core :as uuc] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.base :as uuwb] + [uxbox.common.geom.point :as gpt])) (defn watch-scroll-interactions [own] diff --git a/src/uxbox/ui/workspace/selection.cljs b/src/uxbox/main/ui/workspace/selection.cljs similarity index 95% rename from src/uxbox/ui/workspace/selection.cljs rename to src/uxbox/main/ui/workspace/selection.cljs index 896899d4f..ab27a4538 100644 --- a/src/uxbox/ui/workspace/selection.cljs +++ b/src/uxbox/main/ui/workspace/selection.cljs @@ -5,15 +5,15 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.selection +(ns uxbox.main.ui.workspace.selection "Multiple selection handlers component." (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.state :as st] - [uxbox.ui.mixins :as mx] - [uxbox.ui.core :as uuc] - [uxbox.util.geom :as geom] + [uxbox.main.state :as st] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.core :as uuc] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom])) ;; --- Constants diff --git a/src/uxbox/ui/workspace/selrect.cljs b/src/uxbox/main/ui/workspace/selrect.cljs similarity index 90% rename from src/uxbox/ui/workspace/selrect.cljs rename to src/uxbox/main/ui/workspace/selrect.cljs index a0aaa1392..64900fadd 100644 --- a/src/uxbox/ui/workspace/selrect.cljs +++ b/src/uxbox/main/ui/workspace/selrect.cljs @@ -5,18 +5,18 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.selrect +(ns uxbox.main.ui.workspace.selrect "Components for indicate the user selection and selected shapes group." (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [beicon.core :as rx] - [uxbox.constants :as c] - [uxbox.rstore :as rs] - [uxbox.data.workspace :as dw] - [uxbox.data.shapes :as uds] - [uxbox.ui.core :as uuc] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.base :as wb])) + [uxbox.main.constants :as c] + [uxbox.common.rstore :as rs] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.core :as uuc] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.base :as wb])) (defonce position (atom nil)) diff --git a/src/uxbox/ui/workspace/settings.cljs b/src/uxbox/main/ui/workspace/settings.cljs similarity index 85% rename from src/uxbox/ui/workspace/settings.cljs rename to src/uxbox/main/ui/workspace/settings.cljs index 7e91becc9..c21b6dd4c 100644 --- a/src/uxbox/ui/workspace/settings.cljs +++ b/src/uxbox/main/ui/workspace/settings.cljs @@ -5,23 +5,23 @@ ;; Copyright (c) 2016 Andrey Antukh ;; Copyright (c) 2016 Juan de la Cruz -(ns uxbox.ui.workspace.settings +(ns uxbox.main.ui.workspace.settings (:require [sablono.core :as html :refer-macros [html]] [lentes.core :as l] [rum.core :as rum] - [uxbox.constants :as c] - [uxbox.state :as st] - [uxbox.rstore :as rs] - [uxbox.data.pages :as udp] - [uxbox.data.forms :as udf] - [uxbox.data.workspace :as udw] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.forms :as forms] - [uxbox.ui.lightbox :as lbx] - [uxbox.ui.colorpicker :as uucp] - [uxbox.ui.workspace.base :as wb] + [uxbox.main.constants :as c] + [uxbox.main.state :as st] + [uxbox.common.rstore :as rs] + [uxbox.main.data.pages :as udp] + [uxbox.main.data.forms :as udf] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.forms :as forms] + [uxbox.main.ui.lightbox :as lbx] + [uxbox.main.ui.colorpicker :as uucp] + [uxbox.main.ui.workspace.base :as wb] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int)])) diff --git a/src/uxbox/ui/workspace/shortcuts.cljs b/src/uxbox/main/ui/workspace/shortcuts.cljs similarity index 91% rename from src/uxbox/ui/workspace/shortcuts.cljs rename to src/uxbox/main/ui/workspace/shortcuts.cljs index 591e51955..48d1bdb9c 100644 --- a/src/uxbox/ui/workspace/shortcuts.cljs +++ b/src/uxbox/main/ui/workspace/shortcuts.cljs @@ -5,15 +5,15 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.shortcuts +(ns uxbox.main.ui.workspace.shortcuts (:require [goog.events :as events] [beicon.core :as rx] - [uxbox.rstore :as rs] - [uxbox.data.lightbox :as udl] - [uxbox.data.workspace :as dw] - [uxbox.data.shapes :as uds] - [uxbox.ui.workspace.sidebar.drawtools :as wsd] - [uxbox.data.history :as udh]) + [uxbox.common.rstore :as rs] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.workspace.sidebar.drawtools :as wsd] + [uxbox.main.data.history :as udh]) (:import goog.events.EventType goog.events.KeyCodes goog.ui.KeyboardShortcutHandler diff --git a/src/uxbox/ui/workspace/sidebar.cljs b/src/uxbox/main/ui/workspace/sidebar.cljs similarity index 72% rename from src/uxbox/ui/workspace/sidebar.cljs rename to src/uxbox/main/ui/workspace/sidebar.cljs index 0b792faf6..362fe0e3a 100644 --- a/src/uxbox/ui/workspace/sidebar.cljs +++ b/src/uxbox/main/ui/workspace/sidebar.cljs @@ -5,21 +5,21 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar +(ns uxbox.main.ui.workspace.sidebar (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.state :as st] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.workspace.sidebar.options :refer (options-toolbox)] - [uxbox.ui.workspace.sidebar.layers :refer (layers-toolbox)] - [uxbox.ui.workspace.sidebar.sitemap :refer (sitemap-toolbox)] - [uxbox.ui.workspace.sidebar.history :refer (history-toolbox)] - [uxbox.ui.workspace.sidebar.icons :refer (icons-toolbox)] - [uxbox.ui.workspace.sidebar.drawtools :refer (draw-toolbox)])) + [uxbox.main.state :as st] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.workspace.sidebar.options :refer (options-toolbox)] + [uxbox.main.ui.workspace.sidebar.layers :refer (layers-toolbox)] + [uxbox.main.ui.workspace.sidebar.sitemap :refer (sitemap-toolbox)] + [uxbox.main.ui.workspace.sidebar.history :refer (history-toolbox)] + [uxbox.main.ui.workspace.sidebar.icons :refer (icons-toolbox)] + [uxbox.main.ui.workspace.sidebar.drawtools :refer (draw-toolbox)])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Left Sidebar diff --git a/src/uxbox/ui/workspace/sidebar/drawtools.cljs b/src/uxbox/main/ui/workspace/sidebar/drawtools.cljs similarity index 88% rename from src/uxbox/ui/workspace/sidebar/drawtools.cljs rename to src/uxbox/main/ui/workspace/sidebar/drawtools.cljs index 6d01d6dd1..b8c380ec4 100644 --- a/src/uxbox/ui/workspace/sidebar/drawtools.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/drawtools.cljs @@ -5,20 +5,20 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.drawtools +(ns uxbox.main.ui.workspace.sidebar.drawtools (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] [uxbox.util.data :refer (read-string)] - [uxbox.data.workspace :as dw] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.main.data.workspace :as dw] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/uxbox/ui/workspace/sidebar/history.cljs b/src/uxbox/main/ui/workspace/sidebar/history.cljs similarity index 90% rename from src/uxbox/ui/workspace/sidebar/history.cljs rename to src/uxbox/main/ui/workspace/sidebar/history.cljs index 8bfb8c98a..fd9229610 100644 --- a/src/uxbox/ui/workspace/sidebar/history.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/history.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.history +(ns uxbox.main.ui.workspace.sidebar.history (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.workspace :as dw] - [uxbox.data.pages :as udp] - [uxbox.data.history :as udh] - [uxbox.data.messages :as udm] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.pages :as udp] + [uxbox.main.data.history :as udh] + [uxbox.main.data.messages :as udm] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.datetime :as dt] [uxbox.util.data :refer (read-string)] [uxbox.util.dom :as dom])) diff --git a/src/uxbox/ui/workspace/sidebar/icons.cljs b/src/uxbox/main/ui/workspace/sidebar/icons.cljs similarity index 87% rename from src/uxbox/ui/workspace/sidebar/icons.cljs rename to src/uxbox/main/ui/workspace/sidebar/icons.cljs index 7e57552ae..138543595 100644 --- a/src/uxbox/ui/workspace/sidebar/icons.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/icons.cljs @@ -5,19 +5,19 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.icons +(ns uxbox.main.ui.workspace.sidebar.icons (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.workspace :as dw] - [uxbox.ui.shapes.icon :as icon] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.workspace :as dw] + [uxbox.main.ui.shapes.icon :as icon] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom] [uxbox.util.data :refer (read-string)])) diff --git a/src/uxbox/ui/workspace/sidebar/layers.cljs b/src/uxbox/main/ui/workspace/sidebar/layers.cljs similarity index 95% rename from src/uxbox/ui/workspace/sidebar/layers.cljs rename to src/uxbox/main/ui/workspace/sidebar/layers.cljs index 7f4c70344..dcc023bfe 100644 --- a/src/uxbox/ui/workspace/sidebar/layers.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/layers.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.layers +(ns uxbox.main.ui.workspace.sidebar.layers (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] [goog.events :as events] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] [uxbox.util.data :refer (read-string classnames)] - [uxbox.data.workspace :as udw] - [uxbox.data.shapes :as uds] - [uxbox.ui.shapes.icon :as icon] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.shapes.icon :as icon] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom.dnd :as dnd] [uxbox.util.dom :as dom]) (:import goog.events.EventType)) diff --git a/src/uxbox/ui/workspace/sidebar/options.cljs b/src/uxbox/main/ui/workspace/sidebar/options.cljs similarity index 73% rename from src/uxbox/ui/workspace/sidebar/options.cljs rename to src/uxbox/main/ui/workspace/sidebar/options.cljs index 26744e19c..a16c56938 100644 --- a/src/uxbox/ui/workspace/sidebar/options.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/options.cljs @@ -5,30 +5,30 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.options +(ns uxbox.main.ui.workspace.sidebar.options (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.workspace :as udw] - [uxbox.data.shapes :as uds] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.colorpicker :refer (colorpicker)] - [uxbox.ui.workspace.recent-colors :refer (recent-colors)] - [uxbox.ui.workspace.sidebar.options.icon-measures :as options-iconm] - [uxbox.ui.workspace.sidebar.options.circle-measures :as options-circlem] - [uxbox.ui.workspace.sidebar.options.rect-measures :as options-rectm] - [uxbox.ui.workspace.sidebar.options.line-measures :as options-linem] - [uxbox.ui.workspace.sidebar.options.fill :as options-fill] - [uxbox.ui.workspace.sidebar.options.text :as options-text] - [uxbox.ui.workspace.sidebar.options.stroke :as options-stroke] - [uxbox.util.geom :as geom] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.colorpicker :refer (colorpicker)] + [uxbox.main.ui.workspace.recent-colors :refer (recent-colors)] + [uxbox.main.ui.workspace.sidebar.options.icon-measures :as options-iconm] + [uxbox.main.ui.workspace.sidebar.options.circle-measures :as options-circlem] + [uxbox.main.ui.workspace.sidebar.options.rect-measures :as options-rectm] + [uxbox.main.ui.workspace.sidebar.options.line-measures :as options-linem] + [uxbox.main.ui.workspace.sidebar.options.fill :as options-fill] + [uxbox.main.ui.workspace.sidebar.options.text :as options-text] + [uxbox.main.ui.workspace.sidebar.options.stroke :as options-stroke] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int parse-float read-string)])) diff --git a/src/uxbox/ui/workspace/sidebar/options/circle_measures.cljs b/src/uxbox/main/ui/workspace/sidebar/options/circle_measures.cljs similarity index 82% rename from src/uxbox/ui/workspace/sidebar/options/circle_measures.cljs rename to src/uxbox/main/ui/workspace/sidebar/options/circle_measures.cljs index 1901bb651..5f41c63c7 100644 --- a/src/uxbox/ui/workspace/sidebar/options/circle_measures.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/options/circle_measures.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.options.circle-measures +(ns uxbox.main.ui.workspace.sidebar.options.circle-measures (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.workspace :as udw] - [uxbox.data.shapes :as uds] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.colorpicker :refer (colorpicker)] - [uxbox.ui.workspace.recent-colors :refer (recent-colors)] - [uxbox.util.geom :as geom] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.colorpicker :refer (colorpicker)] + [uxbox.main.ui.workspace.recent-colors :refer (recent-colors)] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int parse-float read-string)])) diff --git a/src/uxbox/ui/workspace/sidebar/options/fill.cljs b/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs similarity index 85% rename from src/uxbox/ui/workspace/sidebar/options/fill.cljs rename to src/uxbox/main/ui/workspace/sidebar/options/fill.cljs index 9dcfa6701..70670811c 100644 --- a/src/uxbox/ui/workspace/sidebar/options/fill.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/options/fill.cljs @@ -5,19 +5,19 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.options.fill +(ns uxbox.main.ui.workspace.sidebar.options.fill (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.shapes :as uds] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.shapes :as uds] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int parse-float read-string)])) diff --git a/src/uxbox/ui/workspace/sidebar/options/icon_measures.cljs b/src/uxbox/main/ui/workspace/sidebar/options/icon_measures.cljs similarity index 83% rename from src/uxbox/ui/workspace/sidebar/options/icon_measures.cljs rename to src/uxbox/main/ui/workspace/sidebar/options/icon_measures.cljs index d9ce24eeb..2e480153c 100644 --- a/src/uxbox/ui/workspace/sidebar/options/icon_measures.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/options/icon_measures.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.options.icon-measures +(ns uxbox.main.ui.workspace.sidebar.options.icon-measures (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.workspace :as udw] - [uxbox.data.shapes :as uds] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.colorpicker :refer (colorpicker)] - [uxbox.ui.workspace.recent-colors :refer (recent-colors)] - [uxbox.util.geom :as geom] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.colorpicker :refer (colorpicker)] + [uxbox.main.ui.workspace.recent-colors :refer (recent-colors)] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int parse-float read-string)])) diff --git a/src/uxbox/ui/workspace/sidebar/options/line_measures.cljs b/src/uxbox/main/ui/workspace/sidebar/options/line_measures.cljs similarity index 80% rename from src/uxbox/ui/workspace/sidebar/options/line_measures.cljs rename to src/uxbox/main/ui/workspace/sidebar/options/line_measures.cljs index fce0e075c..6bef7240b 100644 --- a/src/uxbox/ui/workspace/sidebar/options/line_measures.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/options/line_measures.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.options.line-measures +(ns uxbox.main.ui.workspace.sidebar.options.line-measures (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.workspace :as udw] - [uxbox.data.shapes :as uds] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.colorpicker :refer (colorpicker)] - [uxbox.ui.workspace.recent-colors :refer (recent-colors)] - [uxbox.util.geom :as geom] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.colorpicker :refer (colorpicker)] + [uxbox.main.ui.workspace.recent-colors :refer (recent-colors)] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int parse-float read-string)])) diff --git a/src/uxbox/ui/workspace/sidebar/options/rect_measures.cljs b/src/uxbox/main/ui/workspace/sidebar/options/rect_measures.cljs similarity index 86% rename from src/uxbox/ui/workspace/sidebar/options/rect_measures.cljs rename to src/uxbox/main/ui/workspace/sidebar/options/rect_measures.cljs index 963bf2aac..68c6735a4 100644 --- a/src/uxbox/ui/workspace/sidebar/options/rect_measures.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/options/rect_measures.cljs @@ -5,22 +5,22 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.options.rect-measures +(ns uxbox.main.ui.workspace.sidebar.options.rect-measures (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.workspace :as udw] - [uxbox.data.shapes :as uds] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.colorpicker :refer (colorpicker)] - [uxbox.ui.workspace.recent-colors :refer (recent-colors)] - [uxbox.util.geom :as geom] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.colorpicker :refer (colorpicker)] + [uxbox.main.ui.workspace.recent-colors :refer (recent-colors)] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int parse-float read-string)])) diff --git a/src/uxbox/ui/workspace/sidebar/options/stroke.cljs b/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs similarity index 88% rename from src/uxbox/ui/workspace/sidebar/options/stroke.cljs rename to src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs index a7fc4a36c..f567166f4 100644 --- a/src/uxbox/ui/workspace/sidebar/options/stroke.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/options/stroke.cljs @@ -5,19 +5,19 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.options.stroke +(ns uxbox.main.ui.workspace.sidebar.options.stroke (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.shapes :as uds] - [uxbox.data.lightbox :as udl] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.shapes :as uds] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int parse-float read-string)])) diff --git a/src/uxbox/ui/workspace/sidebar/options/text.cljs b/src/uxbox/main/ui/workspace/sidebar/options/text.cljs similarity index 87% rename from src/uxbox/ui/workspace/sidebar/options/text.cljs rename to src/uxbox/main/ui/workspace/sidebar/options/text.cljs index 9a330c744..3b3728cd5 100644 --- a/src/uxbox/ui/workspace/sidebar/options/text.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/options/text.cljs @@ -5,24 +5,24 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.options.text +(ns uxbox.main.ui.workspace.sidebar.options.text (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.library :as library] - [uxbox.data.workspace :as udw] - [uxbox.data.shapes :as uds] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.workspace.colorpicker :refer (colorpicker)] - [uxbox.ui.workspace.recent-colors :refer (recent-colors)] - [uxbox.ui.workspace.base :as wb] - [uxbox.util.geom :as geom] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.library :as library] + [uxbox.main.data.workspace :as udw] + [uxbox.main.data.shapes :as uds] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.workspace.colorpicker :refer (colorpicker)] + [uxbox.main.ui.workspace.recent-colors :refer (recent-colors)] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.common.geom :as geom] [uxbox.util.dom :as dom] [uxbox.util.data :refer (parse-int parse-float read-string)])) diff --git a/src/uxbox/ui/workspace/sidebar/sitemap.cljs b/src/uxbox/main/ui/workspace/sidebar/sitemap.cljs similarity index 89% rename from src/uxbox/ui/workspace/sidebar/sitemap.cljs rename to src/uxbox/main/ui/workspace/sidebar/sitemap.cljs index ea291ec6b..ee4ce203a 100644 --- a/src/uxbox/ui/workspace/sidebar/sitemap.cljs +++ b/src/uxbox/main/ui/workspace/sidebar/sitemap.cljs @@ -5,26 +5,26 @@ ;; Copyright (c) 2015-2016 Andrey Antukh ;; Copyright (c) 2015-2016 Juan de la Cruz -(ns uxbox.ui.workspace.sidebar.sitemap +(ns uxbox.main.ui.workspace.sidebar.sitemap (:require [sablono.core :as html :refer-macros [html]] [rum.core :as rum] [lentes.core :as l] [cuerdas.core :as str] - [uxbox.locales :refer (tr)] - [uxbox.router :as r] - [uxbox.rstore :as rs] - [uxbox.state :as st] - [uxbox.state.project :as stpr] - [uxbox.library :as library] - [uxbox.data.projects :as dp] - [uxbox.data.pages :as udp] - [uxbox.data.workspace :as dw] - [uxbox.data.lightbox :as udl] - [uxbox.ui.dashboard.projects :refer (+layouts+)] - [uxbox.ui.workspace.base :as wb] - [uxbox.ui.icons :as i] - [uxbox.ui.mixins :as mx] - [uxbox.ui.lightbox :as lbx] + [uxbox.common.i18n :refer (tr)] + [uxbox.common.router :as r] + [uxbox.common.rstore :as rs] + [uxbox.main.state :as st] + [uxbox.main.state.project :as stpr] + [uxbox.main.library :as library] + [uxbox.main.data.projects :as dp] + [uxbox.main.data.pages :as udp] + [uxbox.main.data.workspace :as dw] + [uxbox.main.data.lightbox :as udl] + [uxbox.main.ui.dashboard.projects :refer (+layouts+)] + [uxbox.main.ui.workspace.base :as wb] + [uxbox.main.ui.icons :as i] + [uxbox.main.ui.mixins :as mx] + [uxbox.main.ui.lightbox :as lbx] [uxbox.util.lens :as ul] [uxbox.util.data :refer (read-string parse-int)] [uxbox.util.dom :as dom])) diff --git a/src/uxbox/ui/dashboard.cljs b/src/uxbox/ui/dashboard.cljs deleted file mode 100644 index f84d511c6..000000000 --- a/src/uxbox/ui/dashboard.cljs +++ /dev/null @@ -1,12 +0,0 @@ -(ns uxbox.ui.dashboard - (:require [uxbox.ui.dashboard.projects :as projects] - [uxbox.ui.dashboard.elements :as elements] - [uxbox.ui.dashboard.icons :as icons] - [uxbox.ui.dashboard.images :as images] - [uxbox.ui.dashboard.colors :as colors])) - -(def projects-page projects/projects-page) -(def elements-page elements/elements-page) -(def icons-page icons/icons-page) -(def images-page images/images-page) -(def colors-page colors/colors-page) diff --git a/src/uxbox/util/transit.cljs b/src/uxbox/util/transit.cljs index 4493f616a..806d7a3f9 100644 --- a/src/uxbox/util/transit.cljs +++ b/src/uxbox/util/transit.cljs @@ -9,7 +9,7 @@ (:require [cognitect.transit :as t] [com.cognitect.transit :as tr] [uxbox.util.data :refer (parse-int)] - [uxbox.util.geom.point :as gpt] + [uxbox.common.geom.point :as gpt] [uxbox.util.datetime :as dt])) ;; --- Transit Handlers diff --git a/src/uxbox_worker/main.cljs b/src/uxbox/worker.cljs similarity index 84% rename from src/uxbox_worker/main.cljs rename to src/uxbox/worker.cljs index b1044e8e3..665285ae0 100644 --- a/src/uxbox_worker/main.cljs +++ b/src/uxbox/worker.cljs @@ -4,11 +4,11 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox-worker.main +(ns uxbox.worker (:require [beicon.core :as rx] [uxbox.util.transit :as t] - [uxbox-worker.impl :as impl] - [uxbox-worker.align])) + [uxbox.worker.impl :as impl] + [uxbox.worker.align])) (enable-console-print!) diff --git a/src/uxbox_worker/align.cljs b/src/uxbox/worker/align.cljs similarity index 88% rename from src/uxbox_worker/align.cljs rename to src/uxbox/worker/align.cljs index cc2a58e3c..9dad2f704 100644 --- a/src/uxbox_worker/align.cljs +++ b/src/uxbox/worker/align.cljs @@ -4,12 +4,12 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox-worker.align +(ns uxbox.worker.align "Workspace aligment indexes worker." (:require [beicon.core :as rx] [kdtree.core :as kd] - [uxbox-worker.impl :as impl] - [uxbox.util.geom.point :as gpt])) + [uxbox.worker.impl :as impl] + [uxbox.common.geom.point :as gpt])) (defonce tree (kd/create)) diff --git a/src/uxbox_worker/impl.cljs b/src/uxbox/worker/impl.cljs similarity index 96% rename from src/uxbox_worker/impl.cljs rename to src/uxbox/worker/impl.cljs index e66bd6f01..1e21ea6f8 100644 --- a/src/uxbox_worker/impl.cljs +++ b/src/uxbox/worker/impl.cljs @@ -4,7 +4,7 @@ ;; ;; Copyright (c) 2016 Andrey Antukh -(ns uxbox-worker.impl +(ns uxbox.worker.impl (:require [uxbox.util.transit :as t])) (enable-console-print!)