diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index b63015375f4..94044e665c4 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -125,7 +125,6 @@ jobs: run: | cp -r static public/ rm -rvf public/static/js/publishing - rm -rvf public/workspaces rm -rvf public/static/js/*.js.map || true rm -rvf public/static/*.* rm -rvf public/static/ios diff --git a/Dockerfile b/Dockerfile index baa42cda305..dba12ac0b4f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update && apt-get install ca-certificates && \ WORKDIR /data/ # Build for static resources -RUN git clone https://github.com/logseq/logseq.git && cd /data/logseq && yarn && yarn release && mv ./static ./public && rm -r ./public/workspaces +RUN git clone https://github.com/logseq/logseq.git && cd /data/logseq && yarn && yarn release && mv ./static ./public # Web App Runner image FROM nginx:stable-alpine diff --git a/deps.edn b/deps.edn index 22b121d39e5..ac12fe35189 100755 --- a/deps.edn +++ b/deps.edn @@ -1,4 +1,4 @@ -{:paths ["src/main" "src/electron" "src/workspaces" "templates"] +{:paths ["src/main" "src/electron" "templates"] :deps {org.clojure/clojure {:mvn/version "1.10.0"} rum/rum {:mvn/version "0.12.9"} @@ -28,7 +28,6 @@ binaryage/devtools {:mvn/version "1.0.5"} camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.2"} instaparse/instaparse {:mvn/version "1.4.10"} - nubank/workspaces {:mvn/version "1.1.1"} org.clojars.mmb90/cljs-cache {:mvn/version "0.1.4"} logseq/graph-parser {:local/root "deps/graph-parser"}} diff --git a/public/workspaces/index.html b/public/workspaces/index.html deleted file mode 100644 index a0b8deeafbc..00000000000 --- a/public/workspaces/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - -
- - - - - - - - - - - - diff --git a/shadow-cljs.edn b/shadow-cljs.edn index f1462f54a5d..16ec720af40 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -3,8 +3,7 @@ :nrepl {:port 8701} ;; "." for /static - :dev-http {3001 ["static" "."] - 3002 ["public/workspaces" "."]} + :dev-http {3001 ["static" "."]} :builds {:app {:target :browser @@ -95,16 +94,4 @@ :devtools {:before-load frontend.core/stop :after-load frontend.core/start :preloads [devtools.preload]}} - - :cards {:target nubank.workspaces.shadow-cljs.target - :ns-regexp "(test|cards)$" - :output-dir "./public/workspaces/static/js/workspaces" - :asset-path "/static/js/workspaces" - :preloads [] ;; optional, list namespaces to be pre loaded - :devtools {:after-load nubank.workspaces.core/after-load - :loader-mode :eval - :watch-path "/static" - :watch-dir "static" - :preloads [devtools.preload - shadow.remote.runtime.cljs.browser]} - :modules {:main {:entries [workspaces.main]}}}}} + }} diff --git a/src/workspaces/workspaces/cards.cljs b/src/workspaces/workspaces/cards.cljs deleted file mode 100644 index abda0900d7f..00000000000 --- a/src/workspaces/workspaces/cards.cljs +++ /dev/null @@ -1,79 +0,0 @@ -(ns workspaces.cards - (:require [frontend.extensions.graph :as graph] - [frontend.ui :as ui] - [nubank.workspaces.card-types.react :as ct.react] - [nubank.workspaces.core :as ws] - [rum.core :as rum])) - -;; simple function to create react elemnents -(defn element [name props & children] - (apply js/React.createElement name (clj->js props) children)) - -(ws/defcard hello-card - (ct.react/react-card - (element "div" {} "Hello World"))) - -(rum/defc ui-button - [] - (ui/button "Text" - :background "green" - :on-click (fn [] (js/alert "button clicked")))) - -(ws/defcard button-card - (ct.react/react-card - (ui-button))) - -(rum/defc graph - [] - (graph/graph-2d - {:data {:nodes [{:id "a" :label "a"} {:id "b" :label "b"}] - :edges [{:source "a" :target "b"}]} - :width 150 - :height 150 - :fitView true})) - -(ws/defcard graph-card - (ct.react/react-card - (graph))) - -(defn random-graph - [n] - (let [nodes (for [i (range 0 n)] - {:id (str i) - :label (str i)}) - edges (-> - (for [i (range 0 (/ n 2))] - (let [source i - target (inc i)] - {:id (str source target) - :source (str source) - :target (str target)})) - (distinct))] - {:nodes nodes - :links edges})) - -;; (rum/defc pixi-graph -;; [] -;; (let [{:keys [nodes links]} (random-graph 4000)] -;; (pixi/graph (fn [] -;; {:nodes nodes -;; :links links -;; :style {:node {:size 15 -;; :color "#666666" -;; :border {:width 2 -;; :color "#ffffff"} -;; :label {:content (fn [node] (.-id node)) -;; :type js/window.PixiGraph.TextType.TEXT -;; :fontSize 12 -;; :color "#333333" -;; :backgroundColor "rgba(255, 255, 255, 0.5)" -;; :padding 4}} -;; :edge {:width 1 -;; :color "#cccccc"}} -;; :hover-style {:node {:border {:color "#000000"} -;; :label {:backgroundColor "rgba(238, 238, 238, 1)"}} -;; :edge {:color "#999999"}}})))) - -;; (ws/defcard pixi-graph-card -;; (ct.react/react-card -;; (pixi-graph))) diff --git a/src/workspaces/workspaces/main.cljs b/src/workspaces/workspaces/main.cljs deleted file mode 100644 index cc7ca3851ca..00000000000 --- a/src/workspaces/workspaces/main.cljs +++ /dev/null @@ -1,5 +0,0 @@ -(ns workspaces.main - (:require [nubank.workspaces.core :as ws] - [workspaces.cards])) - -(defonce init (ws/mount))