mirror of
https://github.com/penpot/penpot.git
synced 2025-05-26 00:36:10 +02:00
💄 Rename some namespace aliases for consistency (#6485)
This commit is contained in:
parent
f5e81debbc
commit
e22a55334e
10 changed files with 26 additions and 25 deletions
|
@ -23,7 +23,7 @@
|
||||||
[app.main.ui.css-cursors :as cur]
|
[app.main.ui.css-cursors :as cur]
|
||||||
[app.main.ui.delete-shared]
|
[app.main.ui.delete-shared]
|
||||||
[app.main.ui.routes :as rt]
|
[app.main.ui.routes :as rt]
|
||||||
[app.main.worker :as worker]
|
[app.main.worker :as mw]
|
||||||
[app.plugins :as plugins]
|
[app.plugins :as plugins]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :as i18n]
|
[app.util.i18n :as i18n]
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
(defn ^:export init
|
(defn ^:export init
|
||||||
[]
|
[]
|
||||||
(worker/init!)
|
(mw/init!)
|
||||||
(i18n/init! cf/translations)
|
(i18n/init! cf/translations)
|
||||||
(theme/init! cf/themes)
|
(theme/init! cf/themes)
|
||||||
(cur/init-styles)
|
(cur/init-styles)
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
[app.main.data.helpers :as dsh]
|
[app.main.data.helpers :as dsh]
|
||||||
[app.main.data.workspace.shapes :as dwsh]
|
[app.main.data.workspace.shapes :as dwsh]
|
||||||
[app.main.data.workspace.undo :as dwu]
|
[app.main.data.workspace.undo :as dwu]
|
||||||
[app.main.worker :as uw]
|
[app.main.worker :as mw]
|
||||||
[beicon.v2.core :as rx]
|
[beicon.v2.core :as rx]
|
||||||
[potok.v2.core :as ptk]))
|
[potok.v2.core :as ptk]))
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
(rx/of (dwsh/add-shape shape {:no-select? (= tool :curve)}))
|
(rx/of (dwsh/add-shape shape {:no-select? (= tool :curve)}))
|
||||||
(if (cfh/frame-shape? shape)
|
(if (cfh/frame-shape? shape)
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(->> (uw/ask! {:cmd :selection/query
|
(->> (mw/ask! {:cmd :selection/query
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:rect (:selrect shape)
|
:rect (:selrect shape)
|
||||||
:include-frames? true
|
:include-frames? true
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.router :as rt]
|
[app.main.router :as rt]
|
||||||
[app.main.streams :as ms]
|
[app.main.streams :as ms]
|
||||||
[app.main.worker :as uw]
|
[app.main.worker :as mw]
|
||||||
[app.util.mouse :as mse]
|
[app.util.mouse :as mse]
|
||||||
[beicon.v2.core :as rx]
|
[beicon.v2.core :as rx]
|
||||||
[beicon.v2.operators :as rxo]
|
[beicon.v2.operators :as rxo]
|
||||||
|
@ -340,7 +340,7 @@
|
||||||
selrect (dm/get-in state [:workspace-local :selrect])
|
selrect (dm/get-in state [:workspace-local :selrect])
|
||||||
blocked? (fn [id] (dm/get-in objects [id :blocked] false))
|
blocked? (fn [id] (dm/get-in objects [id :blocked] false))
|
||||||
|
|
||||||
ask-worker (if buffered? uw/ask-buffered! uw/ask!)]
|
ask-worker (if buffered? mw/ask-buffered! mw/ask!)]
|
||||||
|
|
||||||
(if (some? selrect)
|
(if (some? selrect)
|
||||||
(->> (ask-worker
|
(->> (ask-worker
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
[app.common.math :as mth]
|
[app.common.math :as mth]
|
||||||
[app.common.uuid :refer [zero]]
|
[app.common.uuid :refer [zero]]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.worker :as uw]
|
[app.main.worker :as mw]
|
||||||
[app.util.range-tree :as rt]
|
[app.util.range-tree :as rt]
|
||||||
[beicon.v2.core :as rx]
|
[beicon.v2.core :as rx]
|
||||||
[clojure.set :as set]))
|
[clojure.set :as set]))
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
(let [value (get point coord)
|
(let [value (get point coord)
|
||||||
vbox @refs/vbox
|
vbox @refs/vbox
|
||||||
ranges [[(- value (/ 0.5 zoom)) (+ value (/ 0.5 zoom))]]]
|
ranges [[(- value (/ 0.5 zoom)) (+ value (/ 0.5 zoom))]]]
|
||||||
(->> (uw/ask! {:cmd :snaps/range-query
|
(->> (mw/ask! {:cmd :snaps/range-query
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:frame-id frame-id
|
:frame-id frame-id
|
||||||
:axis coord
|
:axis coord
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
(mapv #(vector (- % snap-accuracy)
|
(mapv #(vector (- % snap-accuracy)
|
||||||
(+ % snap-accuracy))))
|
(+ % snap-accuracy))))
|
||||||
vbox @refs/vbox]
|
vbox @refs/vbox]
|
||||||
(->> (uw/ask! {:cmd :snaps/range-query
|
(->> (mw/ask! {:cmd :snaps/range-query
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:frame-id frame-id
|
:frame-id frame-id
|
||||||
:axis coord
|
:axis coord
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
|
|
||||||
(defn select-shapes-area
|
(defn select-shapes-area
|
||||||
[page-id frame-id selected objects area]
|
[page-id frame-id selected objects area]
|
||||||
(->> (uw/ask! {:cmd :selection/query
|
(->> (mw/ask! {:cmd :selection/query
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:frame-id frame-id
|
:frame-id frame-id
|
||||||
:include-frames? true
|
:include-frames? true
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
[app.main.ui.ds.product.loader :refer [loader*]]
|
[app.main.ui.ds.product.loader :refer [loader*]]
|
||||||
[app.main.ui.hooks :as h]
|
[app.main.ui.hooks :as h]
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
[app.main.worker :as wrk]
|
[app.main.worker :as mw]
|
||||||
[app.util.color :as uc]
|
[app.util.color :as uc]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.dom.dnd :as dnd]
|
[app.util.dom.dnd :as dnd]
|
||||||
|
@ -56,9 +56,9 @@
|
||||||
|
|
||||||
(defn render-thumbnail
|
(defn render-thumbnail
|
||||||
[file-id revn]
|
[file-id revn]
|
||||||
(->> (wrk/ask! {:cmd :thumbnails/generate-for-file
|
(->> (mw/ask! {:cmd :thumbnails/generate-for-file
|
||||||
:revn revn
|
:revn revn
|
||||||
:file-id file-id})
|
:file-id file-id})
|
||||||
(rx/mapcat (fn [{:keys [fonts] :as result}]
|
(rx/mapcat (fn [{:keys [fonts] :as result}]
|
||||||
(->> (fonts/render-font-styles fonts)
|
(->> (fonts/render-font-styles fonts)
|
||||||
(rx/map (fn [styles]
|
(rx/map (fn [styles]
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
[app.main.ui.ds.product.loader :refer [loader*]]
|
[app.main.ui.ds.product.loader :refer [loader*]]
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
[app.main.ui.notifications.context-notification :refer [context-notification]]
|
[app.main.ui.notifications.context-notification :refer [context-notification]]
|
||||||
[app.main.worker :as uw]
|
[app.main.worker :as mw]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :as i18n :refer [tr]]
|
[app.util.i18n :as i18n :refer [tr]]
|
||||||
[app.util.keyboard :as kbd]
|
[app.util.keyboard :as kbd]
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
(defn- analyze-entries
|
(defn- analyze-entries
|
||||||
[state entries]
|
[state entries]
|
||||||
(let [features (get @st/state :features)]
|
(let [features (get @st/state :features)]
|
||||||
(->> (uw/ask-many!
|
(->> (mw/ask-many!
|
||||||
{:cmd :analyze-import
|
{:cmd :analyze-import
|
||||||
:files entries
|
:files entries
|
||||||
:features features})
|
:features features})
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
:num-files (count entries)}))
|
:num-files (count entries)}))
|
||||||
|
|
||||||
(let [features (get @st/state :features)]
|
(let [features (get @st/state :features)]
|
||||||
(->> (uw/ask-many!
|
(->> (mw/ask-many!
|
||||||
{:cmd :import-files
|
{:cmd :import-files
|
||||||
:project-id project-id
|
:project-id project-id
|
||||||
:files entries
|
:files entries
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.ds.product.loader :refer [loader*]]
|
[app.main.ui.ds.product.loader :refer [loader*]]
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
[app.main.worker :as uw]
|
[app.main.worker :as mw]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :as i18n :refer [tr]]
|
[app.util.i18n :as i18n :refer [tr]]
|
||||||
[beicon.v2.core :as rx]
|
[beicon.v2.core :as rx]
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
(mf/deps team-id selected files features)
|
(mf/deps team-id selected files features)
|
||||||
(fn []
|
(fn []
|
||||||
(swap! state* assoc :status :exporting)
|
(swap! state* assoc :status :exporting)
|
||||||
(->> (uw/ask-many!
|
(->> (mw/ask-many!
|
||||||
{:cmd :export-files
|
{:cmd :export-files
|
||||||
:format format
|
:format format
|
||||||
:team-id team-id
|
:team-id team-id
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
[app.main.ui.workspace.shapes.frame.dynamic-modifiers :as sfd]
|
[app.main.ui.workspace.shapes.frame.dynamic-modifiers :as sfd]
|
||||||
[app.main.ui.workspace.viewport.actions :as actions]
|
[app.main.ui.workspace.viewport.actions :as actions]
|
||||||
[app.main.ui.workspace.viewport.utils :as utils]
|
[app.main.ui.workspace.viewport.utils :as utils]
|
||||||
[app.main.worker :as uw]
|
[app.main.worker :as mw]
|
||||||
[app.util.debug :as dbg]
|
[app.util.debug :as dbg]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.globals :as globals]
|
[app.util.globals :as globals]
|
||||||
|
@ -206,7 +206,7 @@
|
||||||
|
|
||||||
(if (mf/ref-val hover-disabled-ref)
|
(if (mf/ref-val hover-disabled-ref)
|
||||||
(rx/of nil)
|
(rx/of nil)
|
||||||
(->> (uw/ask-buffered!
|
(->> (mw/ask-buffered!
|
||||||
{:cmd :selection/query
|
{:cmd :selection/query
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:rect rect
|
:rect rect
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
;; Copyright (c) KALEIDOS INC
|
;; Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
(ns app.main.worker
|
(ns app.main.worker
|
||||||
|
"Interface to communicate with the web worker"
|
||||||
(:require
|
(:require
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.main.errors :as err]
|
[app.main.errors :as errors]
|
||||||
[app.util.worker :as uw]
|
[app.util.worker :as uw]
|
||||||
[beicon.v2.core :as rx]))
|
[beicon.v2.core :as rx]))
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@
|
||||||
|
|
||||||
(defn init!
|
(defn init!
|
||||||
[]
|
[]
|
||||||
(let [worker (uw/init cf/worker-uri err/on-error)]
|
(let [worker (uw/init cf/worker-uri errors/on-error)]
|
||||||
(uw/ask! worker {:cmd :configure
|
(uw/ask! worker {:cmd :configure
|
||||||
:config {:public-uri cf/public-uri
|
:config {:public-uri cf/public-uri
|
||||||
:build-data cf/build-date
|
:build-data cf/build-date
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
[app.main.data.workspace.versions :as dwv]
|
[app.main.data.workspace.versions :as dwv]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.worker :as uw]
|
[app.main.worker :as mw]
|
||||||
[app.plugins.format :as format]
|
[app.plugins.format :as format]
|
||||||
[app.plugins.page :as page]
|
[app.plugins.page :as page]
|
||||||
[app.plugins.parser :as parser]
|
[app.plugins.parser :as parser]
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
(if (contains? cf/flags :export-file-v3)
|
(if (contains? cf/flags :export-file-v3)
|
||||||
:binfile-v3
|
:binfile-v3
|
||||||
:binfile-v1))]
|
:binfile-v1))]
|
||||||
(->> (uw/ask-many!
|
(->> (mw/ask-many!
|
||||||
{:cmd :export-files
|
{:cmd :export-files
|
||||||
:format format
|
:format format
|
||||||
:type type
|
:type type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue