♻️ Make the namespacing independent of the branding.

This commit is contained in:
Andrey Antukh 2020-08-18 19:26:37 +02:00
parent aaf8b71837
commit 6c67c3c71b
305 changed files with 2399 additions and 2580 deletions

View file

@ -4,7 +4,7 @@
;;
;; Copyright (c) 2016-2019 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.common.data
(ns app.common.data
"Data manipulation and query helper functions."
(:refer-clojure :exclude [concat read-string])
(:require [clojure.set :as set]

View file

@ -4,7 +4,7 @@
;;
;; Copyright (c) 2016 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.common.exceptions
(ns app.common.exceptions
"A helpers for work with exceptions."
(:require [clojure.spec.alpha :as s]))

View file

@ -7,11 +7,11 @@
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.common.geom.matrix
(ns app.common.geom.matrix
(:require
[cuerdas.core :as str]
[uxbox.common.math :as mth]
[uxbox.common.geom.point :as gpt]))
[app.common.math :as mth]
[app.common.geom.point :as gpt]))
;; --- Matrix Impl

View file

@ -7,13 +7,13 @@
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.common.geom.point
(ns app.common.geom.point
(:refer-clojure :exclude [divide min max])
(:require
#?(:cljs [cljs.core :as c]
:clj [clojure.core :as c])
[cuerdas.core :as str]
[uxbox.common.math :as mth]))
[app.common.math :as mth]))
;; --- Point Impl

View file

@ -7,15 +7,15 @@
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.common.geom.shapes
(ns app.common.geom.shapes
(:require
[clojure.spec.alpha :as s]
[uxbox.common.spec :as us]
[uxbox.common.pages-helpers :as cph]
[uxbox.common.geom.matrix :as gmt]
[uxbox.common.geom.point :as gpt]
[uxbox.common.math :as mth]
[uxbox.common.data :as d]))
[app.common.spec :as us]
[app.common.pages-helpers :as cph]
[app.common.geom.matrix :as gmt]
[app.common.geom.point :as gpt]
[app.common.math :as mth]
[app.common.data :as d]))
(defn- nilf
"Returns a new function that if you pass nil as any argument will

View file

@ -7,7 +7,7 @@
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.common.math
(ns app.common.math
"A collection of math utils."
#?(:cljs
(:require [goog.math :as math])))

View file

@ -7,7 +7,7 @@
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.common.media
(ns app.common.media
(:require
[clojure.spec.alpha :as s]
[cuerdas.core :as str]))

View file

@ -7,18 +7,18 @@
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.common.pages
(ns app.common.pages
"A common (clj/cljs) functions and specs for pages."
(:require
[clojure.spec.alpha :as s]
[uxbox.common.data :as d]
[uxbox.common.pages-helpers :as cph]
[uxbox.common.exceptions :as ex]
[uxbox.common.geom.shapes :as geom]
[uxbox.common.geom.matrix :as gmt]
[uxbox.common.geom.point :as gpt]
[uxbox.common.spec :as us]
[uxbox.common.uuid :as uuid]))
[app.common.data :as d]
[app.common.pages-helpers :as cph]
[app.common.exceptions :as ex]
[app.common.geom.shapes :as geom]
[app.common.geom.matrix :as gmt]
[app.common.geom.point :as gpt]
[app.common.spec :as us]
[app.common.uuid :as uuid]))
(def page-version 5)

View file

@ -7,10 +7,10 @@
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.common.pages-helpers
(ns app.common.pages-helpers
(:require
[uxbox.common.data :as d]
[uxbox.common.uuid :as uuid]))
[app.common.data :as d]
[app.common.uuid :as uuid]))
(defn get-children
"Retrieve all children ids recursively for a given object"

View file

@ -1,12 +1,12 @@
(ns uxbox.common.pages-migrations
(ns app.common.pages-migrations
(:require
[uxbox.common.pages :as cp]
[uxbox.common.geom.shapes :as gsh]
[uxbox.common.geom.point :as gpt]
[uxbox.common.geom.matrix :as gmt]
[uxbox.common.spec :as us]
[uxbox.common.uuid :as uuid]
[uxbox.common.data :as d]))
[app.common.pages :as cp]
[app.common.geom.shapes :as gsh]
[app.common.geom.point :as gpt]
[app.common.geom.matrix :as gmt]
[app.common.spec :as us]
[app.common.uuid :as uuid]
[app.common.data :as d]))
;; TODO: revisit this

View file

@ -4,16 +4,16 @@
;;
;; Copyright (c) 2016-2019 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.common.spec
(ns app.common.spec
"Data manipulation and query helper functions."
(:refer-clojure :exclude [assert])
#?(:cljs (:require-macros [uxbox.common.spec :refer [assert]]))
#?(:cljs (:require-macros [app.common.spec :refer [assert]]))
(:require
#?(:clj [clojure.spec.alpha :as s]
:cljs [cljs.spec.alpha :as s])
[expound.alpha :as expound]
[uxbox.common.uuid :as uuid]
[uxbox.common.exceptions :as ex]
[app.common.uuid :as uuid]
[app.common.exceptions :as ex]
[cuerdas.core :as str]))
(s/check-asserts true)

View file

@ -7,14 +7,14 @@
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.common.uuid
(ns app.common.uuid
(:refer-clojure :exclude [next uuid zero?])
#?(:clj (:import java.util.UUID))
#?(:clj
(:require [clj-uuid :as impl]
[clojure.core :as c])
:cljs
(:require [uxbox.common.uuid-impl :as impl]
(:require [app.common.uuid-impl :as impl]
[cljs.core :as c])))
(def zero #uuid "00000000-0000-0000-0000-000000000000")

View file

@ -11,11 +11,11 @@
"use strict";
goog.require("cljs.core");
goog.provide("uxbox.common.uuid_impl");
goog.provide("app.common.uuid_impl");
goog.scope(function() {
const core = cljs.core;
const self = uxbox.common.uuid_impl;
const self = app.common.uuid_impl;
const fill = (() => {
if (typeof window === "object") {