Skip to content

Commit

Permalink
Manually re-inline latest reagent and re-frame dependencies
Browse files Browse the repository at this point in the history
Due to benedekfazekas/mranderson#44 or similar issue the automatic
inlining throws an exception so this was done by hand.
  • Loading branch information
superstructor committed Mar 11, 2020
1 parent 55313b3 commit 9b1050e
Show file tree
Hide file tree
Showing 50 changed files with 250 additions and 408 deletions.
@@ -1,15 +1,15 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.cofx
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.cofx
(:require
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interceptor :refer [->interceptor]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.registrar :refer [get-handler clear-handlers register-handler] :as re-frame.registrar]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]))
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interceptor :refer [->interceptor]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.registrar :refer [get-handler clear-handlers register-handler]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]))


;; -- Registration ------------------------------------------------------------

(def kind :cofx)
(assert (re-frame.registrar/kinds kind))
(assert (day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.registrar/kinds kind))

(defn reg-cofx
"Register the given coeffect `handler` for the given `id`, for later use
Expand Down
@@ -1,16 +1,16 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.core
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.core
(:require
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.events :as events]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.subs :as subs]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop :as interop]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.db :as db]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.fx :as fx]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.cofx :as cofx]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.router :as router]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :as loggers]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.registrar :as registrar]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interceptor :as interceptor]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.std-interceptors :as std-interceptors :refer [db-handler->interceptor
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.events :as events]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.subs :as subs]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop :as interop]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.db :as db]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.fx :as fx]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.cofx :as cofx]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.router :as router]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :as loggers]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.registrar :as registrar]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interceptor :as interceptor]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.std-interceptors :as std-interceptors :refer [db-handler->interceptor
fx-handler->interceptor
ctx-handler->interceptor]]
[clojure.set :as set]))
Expand Down Expand Up @@ -194,7 +194,7 @@
(defn purge-event-queue
"Remove all events queued for processing"
[]
(router/purge router/event-queue))
(router/purge re-frame.router/event-queue))

;; -- Event Processing Callbacks ---------------------------------------------

Expand All @@ -216,12 +216,12 @@
([f]
(add-post-event-callback f f)) ;; use f as its own identifier
([id f]
(router/add-post-event-callback router/event-queue id f)))
(router/add-post-event-callback re-frame.router/event-queue id f)))


(defn remove-post-event-callback
[id]
(router/remove-post-event-callback router/event-queue id))
(router/remove-post-event-callback re-frame.router/event-queue id))


;; -- Deprecation ------------------------------------------------------------
Expand Down
@@ -1,5 +1,5 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.db
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop :refer [ratom]]))
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.db
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop :refer [ratom]]))


;; -- Application State --------------------------------------------------------------------------
Expand Down
@@ -1,15 +1,15 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.events
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.utils :refer [first-in-vector]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop :refer [empty-queue debug-enabled?]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.registrar :refer [get-handler register-handler] :as re-frame.registrar]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interceptor :as interceptor]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.trace :as trace :include-macros true]))
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.events
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.utils :refer [first-in-vector]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop :refer [empty-queue debug-enabled?]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.registrar :as registrar :refer [get-handler register-handler]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interceptor :as interceptor]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.trace :as trace :include-macros true]))


(def kind :event)
(assert (re-frame.registrar/kinds kind))
(assert (registrar/kinds kind))

(defn- flatten-and-remove-nils
"`interceptors` might have nested collections, and contain nil elements.
Expand Down
@@ -1,19 +1,19 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.fx
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.fx
(:require
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.router :as router]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interceptor :refer [->interceptor]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop :refer [set-timeout!]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.events :as events]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.registrar :refer [get-handler clear-handlers register-handler] :as re-frame.registrar]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.trace :as trace :include-macros true]))
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.router :as router]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interceptor :refer [->interceptor]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop :refer [set-timeout!]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.events :as events]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.registrar :as registrar :refer [get-handler clear-handlers register-handler]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.trace :as trace :include-macros true]))


;; -- Registration ------------------------------------------------------------

(def kind :fx)
(assert (re-frame.registrar/kinds kind))
(assert (registrar/kinds kind))

(defn reg-fx
"Register the given effect `handler` for the given `id`.
Expand Down
@@ -1,8 +1,8 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interceptor
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interceptor
(:require
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop :refer [empty-queue debug-enabled?]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.trace :as trace :include-macros true]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop :refer [empty-queue debug-enabled?]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.trace :as trace :include-macros true]
[clojure.set :as set]))


Expand Down
@@ -1,4 +1,4 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop
(:import [java.util.concurrent Executor Executors]))


Expand Down
@@ -1,13 +1,13 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop
(:require [goog.async.nextTick]
[day8.re-frame-10x.inlined-deps.reagent.v0v9v1.reagent.core :as reagent.core]
[day8.re-frame-10x.inlined-deps.reagent.v0v9v1.reagent.ratom :as reagent.ratom]))
[day8.re-frame-10x.inlined-deps.reagent.v0v10v0.reagent.core :as reagent]
[day8.re-frame-10x.inlined-deps.reagent.v0v10v0.reagent.ratom :as ratom]))

(def next-tick goog.async.nextTick)

(def empty-queue #queue [])

(def after-render reagent.core/after-render)
(def after-render reagent/after-render)

;; Make sure the Google Closure compiler sees this as a boolean constant,
;; otherwise Dead Code Elimination won't happen in `:advanced` builds.
Expand All @@ -16,7 +16,7 @@
(def ^boolean debug-enabled? "@define {boolean}" ^boolean goog/DEBUG)

(defn ratom [x]
(reagent.core/atom x))
(reagent/atom x))

(defn ratom? [x]
(satisfies? reagent.ratom/IReactiveAtom x))
Expand All @@ -26,13 +26,13 @@


(defn make-reaction [f]
(reagent.ratom/make-reaction f))
(ratom/make-reaction f))

(defn add-on-dispose! [a-ratom f]
(reagent.ratom/add-on-dispose! a-ratom f))
(ratom/add-on-dispose! a-ratom f))

(defn dispose! [a-ratom]
(reagent.ratom/dispose! a-ratom))
(ratom/dispose! a-ratom))

(defn set-timeout! [f ms]
(js/setTimeout f ms))
Expand All @@ -48,11 +48,11 @@
"Produces an id for reactive Reagent values
e.g. reactions, ratoms, cursors."
[reactive-val]
(when (implements? reagent.ratom/IReactiveAtom reactive-val)
(when (implements? ratom/IReactiveAtom reactive-val)
(str (condp instance? reactive-val
reagent.ratom/RAtom "ra"
reagent.ratom/RCursor "rc"
reagent.ratom/Reaction "rx"
reagent.ratom/Track "tr"
ratom/RAtom "ra"
ratom/RCursor "rc"
ratom/Reaction "rx"
ratom/Track "tr"
"other")
(hash reactive-val))))
@@ -1,4 +1,4 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers
(:require
[clojure.set :refer [difference]]
#?@(:clj [[clojure.string :as str]
Expand Down
@@ -1,9 +1,9 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.registrar
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.registrar
"In many places, re-frame asks you to associate an `id` (keyword)
with a `handler` (function). This namespace contains the
central registry of such associations."
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop :refer [debug-enabled?]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]))
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop :refer [debug-enabled?]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]))


;; kinds of handlers
Expand Down
@@ -1,8 +1,8 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.router
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.events :refer [handle]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop :refer [after-render empty-queue next-tick]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.trace :as trace :include-macros true]))
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.router
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.events :refer [handle]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop :refer [after-render empty-queue next-tick]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.trace :as trace :include-macros true]))


;; -- Router Loop ------------------------------------------------------------
Expand Down
@@ -1,14 +1,14 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.std-interceptors
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.std-interceptors
"contains re-frame supplied, standard interceptors"
(:require
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interceptor :refer [->interceptor get-effect get-coeffect assoc-coeffect assoc-effect]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.registrar :as registrar]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interceptor :refer [->interceptor get-effect get-coeffect assoc-coeffect assoc-effect]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.registrar :as registrar]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.db :refer [app-db]]
[clojure.data :as data]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.cofx :as cofx]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.utils :as utils]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.trace :as trace :include-macros true]))
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.cofx :as cofx]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.utils :as utils]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.trace :as trace :include-macros true]))


(def debug
Expand Down
@@ -1,14 +1,14 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.subs
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.subs
(:require
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop :refer [add-on-dispose! debug-enabled? make-reaction ratom? deref? dispose! reagent-id]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.utils :refer [first-in-vector]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.registrar :refer [get-handler clear-handlers register-handler] :as re-frame.registrar]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.trace :as trace :include-macros true]))
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop :refer [add-on-dispose! debug-enabled? make-reaction ratom? deref? dispose! reagent-id]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.utils :refer [first-in-vector]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.registrar :as registrar :refer [get-handler clear-handlers register-handler]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.trace :as trace :include-macros true]))

(def kind :sub)
(assert (re-frame.registrar/kinds kind))
(assert (registrar/kinds kind))

;; -- cache -------------------------------------------------------------------
;;
Expand Down
@@ -1,10 +1,10 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.trace
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.trace
"Tracing for re-frame.
Alpha quality, subject to change/break at any time."
#?(:cljs (:require-macros [net.cgrand.macrovich :as macros]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.trace :refer [finish-trace with-trace merge-trace!]]))
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.interop :as interop]
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.trace :refer [finish-trace with-trace merge-trace!]]))
(:require [day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.interop :as interop]
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]
#?(:clj [net.cgrand.macrovich :as macros])
#?(:cljs [goog.functions])))

Expand Down
@@ -1,6 +1,6 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.utils
(ns day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.utils
(:require
[day8.re-frame-10x.inlined-deps.re-frame.v0v11v0.re-frame.loggers :refer [console]]))
[day8.re-frame-10x.inlined-deps.re-frame.v0v12v0.re-frame.loggers :refer [console]]))

(defn dissoc-in
"Dissociates an entry from a nested associative structure returning a new
Expand Down
@@ -1,5 +1,5 @@
(ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.reagent.v0v9v1.reagent.core
(:require [day8.re-frame-10x.inlined-deps.reagent.v0v9v1.reagent.ratom :as ra]))
(ns day8.re-frame-10x.inlined-deps.reagent.v0v10v0.reagent.core
(:require [day8.re-frame-10x.inlined-deps.reagent.v0v10v0.reagent.ratom :as ra]))

(defmacro with-let
"Bind variables as with let, except that when used in a component
Expand Down

0 comments on commit 9b1050e

Please sign in to comment.