🐛 Fix typos in frontend

This commit is contained in:
Josh Soref 2021-11-15 09:51:34 -05:00
parent b7ba3098ae
commit 589e646023
65 changed files with 128 additions and 128 deletions

View file

@ -6,7 +6,7 @@
(enable-console-print!) (enable-console-print!)
;; --- Index Initialization Bechmark ;; --- Index Initialization Benchmark
(defn- bench-init-10000 (defn- bench-init-10000
[] []
@ -60,9 +60,9 @@
(bench-knn-160000) (bench-knn-160000)
(bench-knn-360000)) (bench-knn-360000))
;; --- Accuracity tests ;; --- Accuracy tests
(defn test-accuracity (defn test-accuracy
[] []
(let [tree (k/create)] (let [tree (k/create)]
(k/setup tree 4000 4000 20 20) (k/setup tree 4000 4000 20 20)
@ -101,7 +101,7 @@
(bench-knn) (bench-knn)
(= type "kd-test") (= type "kd-test")
(test-accuracity) (test-accuracy)
(= type "interval") (= type "interval")
(test-interval) (test-interval)

View file

@ -64,7 +64,7 @@
/// This mixing allow you to add placeholder colors in all availables browsers /// This mixing allow you to add placeholder colors in all available browsers
/// @group Mixins /// @group Mixins
@mixin placeholder { @mixin placeholder {

View file

@ -431,7 +431,7 @@ ul.slider-dots {
} }
} }
&.miliseconds { &.milliseconds {
&::after { &::after {
content: "ms"; content: "ms";

View file

@ -31,7 +31,7 @@ svg#loader-icon {
animation: pen3 2s infinite ease; animation: pen3 2s infinite ease;
} }
// btn prncil loader // btn pencil loader
svg#loader-pencil { svg#loader-pencil {
fill: $color-primary-darker; fill: $color-primary-darker;
width: 60px; width: 60px;

View file

@ -85,7 +85,7 @@
(def browser (atom (parse-browser))) (def browser (atom (parse-browser)))
(def platform (atom (parse-platform))) (def platform (atom (parse-platform)))
;; mantain for backward compatibility ;; maintain for backward compatibility
(let [login-with-ldap (obj/get global "penpotLoginWithLDAP" false) (let [login-with-ldap (obj/get global "penpotLoginWithLDAP" false)
registration (obj/get global "penpotRegistrationEnabled" true)] registration (obj/get global "penpotRegistrationEnabled" true)]
(when login-with-ldap (when login-with-ldap

View file

@ -206,7 +206,7 @@
(defn login-from-register (defn login-from-register
"Event used mainly for mark current session as logged-in in after the "Event used mainly for mark current session as logged-in in after the
user sucessfully registred using third party auth provider (in this user successfully registered using third party auth provider (in this
case we dont need to verify the email)." case we dont need to verify the email)."
[] []
(ptk/reify ::login-from-register (ptk/reify ::login-from-register
@ -351,7 +351,7 @@
(defn mark-onboarding-as-viewed (defn mark-onboarding-as-viewed
([] (mark-onboarding-as-viewed nil)) ([] (mark-onboarding-as-viewed nil))
([{:keys [version]}] ([{:keys [version]}]
(ptk/reify ::mark-oboarding-as-viewed (ptk/reify ::mark-onboarding-as-viewed
ptk/WatchEvent ptk/WatchEvent
(watch [_ state _] (watch [_ state _]
(let [version (or version (:main @cf/version)) (let [version (or version (:main @cf/version))

View file

@ -1645,7 +1645,7 @@
(not= root-file-id (:current-file-id state)) (not= root-file-id (:current-file-id state))
(nil? (get-in state [:workspace-libraries root-file-id]))))) (nil? (get-in state [:workspace-libraries root-file-id])))))
;; Procceed with the standard shape paste procediment. ;; Proceed with the standard shape paste process.
(do-paste [it state mouse-pos media] (do-paste [it state mouse-pos media]
(let [page-objects (wsh/lookup-page-objects state) (let [page-objects (wsh/lookup-page-objects state)
media-idx (d/index-by :prev-id media) media-idx (d/index-by :prev-id media)
@ -1673,7 +1673,7 @@
page-id (:current-page-id state) page-id (:current-page-id state)
unames (-> (wsh/lookup-page-objects state page-id) unames (-> (wsh/lookup-page-objects state page-id)
(dwc/retrieve-used-names)) ;; TODO: move this calculation inside prepare-duplcate-changes? (dwc/retrieve-used-names)) ;; TODO: move this calculation inside prepare-duplicate-changes?
rchanges (->> (dws/prepare-duplicate-changes all-objects page-id unames selected delta) rchanges (->> (dws/prepare-duplicate-changes all-objects page-id unames selected delta)
(mapv (partial process-rchange media-idx)) (mapv (partial process-rchange media-idx))
@ -1799,7 +1799,7 @@
(watch [it state _] (watch [it state _]
(let [page-id (get state :current-page-id) (let [page-id (get state :current-page-id)
options (wsh/lookup-page-options state page-id) options (wsh/lookup-page-options state page-id)
previus-color (:background options)] previous-color (:background options)]
(rx/of (dch/commit-changes (rx/of (dch/commit-changes
{:redo-changes [{:type :set-option {:redo-changes [{:type :set-option
:page-id page-id :page-id page-id
@ -1808,7 +1808,7 @@
:undo-changes [{:type :set-option :undo-changes [{:type :set-option
:page-id page-id :page-id page-id
:option :background :option :background
:value previus-color}] :value previous-color}]
:origin it})))))) :origin it}))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -252,7 +252,7 @@
[objects selected attrs] [objects selected attrs]
(if (= :frame (:type attrs)) (if (= :frame (:type attrs))
;; Frames are alwasy positioned on the root frame ;; Frames are always positioned on the root frame
[uuid/zero uuid/zero nil] [uuid/zero uuid/zero nil]
;; Calculate the frame over which we're drawing ;; Calculate the frame over which we're drawing

View file

@ -104,7 +104,7 @@
:page-id page-id})) :page-id page-id}))
;; Look at the `get-empty-groups-after-group-creation` ;; Look at the `get-empty-groups-after-group-creation`
;; doctring to understand the real purpuse of this code ;; docstring to understand the real purpose of this code
ids-to-delete (get-empty-groups-after-group-creation objects parent-id shapes) ids-to-delete (get-empty-groups-after-group-creation objects parent-id shapes)
delete-group delete-group

View file

@ -690,7 +690,7 @@
;; update to finish, before marking this file as synced. ;; update to finish, before marking this file as synced.
;; TODO: look for a more precise way of syncing this. ;; TODO: look for a more precise way of syncing this.
;; Maybe by using the stream (second argument passed to watch) ;; Maybe by using the stream (second argument passed to watch)
;; to wait for the corresponding changes-commited and then proced ;; to wait for the corresponding changes-committed and then proceed
;; with the :update-sync mutation. ;; with the :update-sync mutation.
(rx/concat (rx/timer 3000) (rx/concat (rx/timer 3000)
(rp/mutation :update-sync (rp/mutation :update-sync

View file

@ -159,7 +159,7 @@
color color
(get-next-color presence))) (get-next-color presence)))
(update-sesion [session presence] (update-session [session presence]
(-> session (-> session
(assoc :id session-id) (assoc :id session-id)
(assoc :profile-id profile-id) (assoc :profile-id profile-id)
@ -168,7 +168,7 @@
(update-presence [presence] (update-presence [presence]
(-> presence (-> presence
(update session-id update-sesion presence) (update session-id update-session presence)
(d/without-nils))) (d/without-nils)))
] ]

View file

@ -161,7 +161,7 @@
points (upg/content->points content)] points (upg/content->points content)]
(rx/concat (rx/concat
;; This stream checks the consecutive mouse positions to do the draging ;; This stream checks the consecutive mouse positions to do the dragging
(->> points (->> points
(streams/move-points-stream snap-toggled start-position selected-points) (streams/move-points-stream snap-toggled start-position selected-points)
(rx/take-until stopper) (rx/take-until stopper)

View file

@ -108,7 +108,7 @@
:params position}))) :params position})))
(defn append-node (defn append-node
"Creates a new node in the path. Usualy used when drawing." "Creates a new node in the path. Usually used when drawing."
[shape position prev-point prev-handler] [shape position prev-point prev-handler]
(let [command (next-node shape position prev-point prev-handler)] (let [command (next-node shape position prev-point prev-handler)]
(-> shape (-> shape

View file

@ -26,7 +26,7 @@
ks))) ks)))
(defn get-path (defn get-path
"Retrieves the location of the path object and additionaly can pass "Retrieves the location of the path object and additionally can pass
the arguments. This location can be used in get-in, assoc-in... functions" the arguments. This location can be used in get-in, assoc-in... functions"
[state & ks] [state & ks]
(let [path-loc (get-path-location state) (let [path-loc (get-path-location state)

View file

@ -39,7 +39,7 @@
[tubax.core :as tubax])) [tubax.core :as tubax]))
(declare persist-changes) (declare persist-changes)
(declare persist-sychronous-changes) (declare persist-synchronous-changes)
(declare shapes-changes-persisted) (declare shapes-changes-persisted)
(declare update-persistence-status) (declare update-persistence-status)
@ -99,7 +99,7 @@
(rx/map deref) (rx/map deref)
(rx/filter library-file?) (rx/filter library-file?)
(rx/filter (complement #(empty? (:changes %)))) (rx/filter (complement #(empty? (:changes %))))
(rx/map persist-sychronous-changes) (rx/map persist-synchronous-changes)
(rx/take-until (rx/delay 100 stoper))) (rx/take-until (rx/delay 100 stoper)))
(->> stream (->> stream
(rx/filter (ptk/type? ::changes-persisted)) (rx/filter (ptk/type? ::changes-persisted))
@ -167,7 +167,7 @@
(rx/mapcat handle-response) (rx/mapcat handle-response)
(rx/catch on-error))))))) (rx/catch on-error)))))))
(defn persist-sychronous-changes (defn persist-synchronous-changes
[{:keys [file-id changes]}] [{:keys [file-id changes]}]
(us/verify ::us/uuid file-id) (us/verify ::us/uuid file-id)
(ptk/reify ::persist-synchronous-changes (ptk/reify ::persist-synchronous-changes
@ -201,7 +201,7 @@
(s/def ::shapes-changes-persisted (s/def ::shapes-changes-persisted
(s/keys :req-un [::revn ::cp/changes])) (s/keys :req-un [::revn ::cp/changes]))
(defn shapes-persited-event? [event] (defn shapes-persisted-event? [event]
(= (ptk/type event) ::changes-persisted)) (= (ptk/type event) ::changes-persisted))
(defn shapes-changes-persisted (defn shapes-changes-persisted
@ -376,7 +376,7 @@
(= (:code error) :media-type-not-allowed) (= (:code error) :media-type-not-allowed)
(rx/of (dm/error (tr "errors.media-type-not-allowed"))) (rx/of (dm/error (tr "errors.media-type-not-allowed")))
(= (:code error) :ubable-to-access-to-url) (= (:code error) :unable-to-access-to-url)
(rx/of (dm/error (tr "errors.media-type-not-allowed"))) (rx/of (dm/error (tr "errors.media-type-not-allowed")))
(= (:code error) :invalid-image) (= (:code error) :invalid-image)
@ -486,7 +486,7 @@
;; Media objects are blob of data to be upload ;; Media objects are blob of data to be upload
(process-blobs params)) (process-blobs params))
;; Every stream has its own sideffect. We need to ignore the result ;; Every stream has its own sideeffect. We need to ignore the result
(rx/ignore) (rx/ignore)
(handle-upload-error on-error) (handle-upload-error on-error)
(rx/finalize (st/emitf (dm/hide-tag :media-loading)))))))) (rx/finalize (st/emitf (dm/hide-tag :media-loading))))))))
@ -566,7 +566,7 @@
(ptk/event ::update-frame-thumbnail {:frame-id frame-id})) (ptk/event ::update-frame-thumbnail {:frame-id frame-id}))
(defn- extract-frame-changes (defn- extract-frame-changes
"Process a changes set in a commit to extract the frames that are channging" "Process a changes set in a commit to extract the frames that are changing"
[[event [old-objects new-objects]]] [[event [old-objects new-objects]]]
(let [changes (-> event deref :changes) (let [changes (-> event deref :changes)
@ -643,7 +643,7 @@
(->> (rx/from no-thumb-frames) (->> (rx/from no-thumb-frames)
(rx/map #(update-frame-thumbnail %))) (rx/map #(update-frame-thumbnail %)))
;; We remove the thumbnails inmediately but defer their generation ;; We remove the thumbnails immediately but defer their generation
(rx/merge (rx/merge
(->> frame-changes (->> frame-changes
(rx/take-until stopper) (rx/take-until stopper)

View file

@ -307,7 +307,7 @@
chgs)))) chgs))))
(defn duplicate-changes-update-indices (defn duplicate-changes-update-indices
"Parses the change set when duplicating to set-up the appropiate indices" "Parses the change set when duplicating to set-up the appropriate indices"
[objects ids changes] [objects ids changes]
(let [process-id (let [process-id

View file

@ -414,7 +414,7 @@
reducer-fn (partial add-svg-child-changes page-id objects selected frame-id shape-id svg-data)] reducer-fn (partial add-svg-child-changes page-id objects selected frame-id shape-id svg-data)]
(reduce reducer-fn [unames changes] (d/enumerate children))) (reduce reducer-fn [unames changes] (d/enumerate children)))
;; Cannot create the data from curren tags ;; Cannot create the data from current tags
[unames [rchs uchs]]))) [unames [rchs uchs]])))
(declare create-svg-shapes) (declare create-svg-shapes)
@ -425,7 +425,7 @@
ptk/WatchEvent ptk/WatchEvent
(watch [_ _ _] (watch [_ _ _]
;; Once the SVG is uploaded, we need to extract all the bitmap ;; Once the SVG is uploaded, we need to extract all the bitmap
;; images and upload them separatelly, then proceed to create ;; images and upload them separately, then proceed to create
;; all shapes. ;; all shapes.
(->> (rx/from (usvg/collect-images svg-data)) (->> (rx/from (usvg/collect-images svg-data))
(rx/map (fn [uri] (rx/map (fn [uri]

View file

@ -300,7 +300,7 @@
;; Stop buffering after time without resizes ;; Stop buffering after time without resizes
stop-buffer (->> resize-events (rx/debounce 100)) stop-buffer (->> resize-events (rx/debounce 100))
;; Agregates the resizes so only send the resize when the sizes are stable ;; Aggregates the resizes so only send the resize when the sizes are stable
resize-batch resize-batch
(->> resize-events (->> resize-events
(rx/take-until stop-buffer) (rx/take-until stop-buffer)

View file

@ -62,7 +62,7 @@
(ts/schedule (ts/schedule
(st/emitf (rt/assign-exception error)))) (st/emitf (rt/assign-exception error))))
;; Error that happens on an active bussines model validation does not ;; Error that happens on an active business model validation does not
;; passes an validation (example: profile can't leave a team). From ;; passes an validation (example: profile can't leave a team). From
;; the user perspective a error flash message should be visualized but ;; the user perspective a error flash message should be visualized but
;; user can continue operate on the application. ;; user can continue operate on the application.

View file

@ -143,7 +143,7 @@
best-snap best-snap
(fn [acc val] (fn [acc val]
;; Using a number is faster than accesing the variable. ;; Using a number is faster than accessing the variable.
;; Keep up to date with `snap-distance-accuracy` ;; Keep up to date with `snap-distance-accuracy`
(if (and (<= val snap-distance-accuracy) (>= val (- snap-distance-accuracy))) (if (and (<= val snap-distance-accuracy) (>= val (- snap-distance-accuracy)))
(min acc val) (min acc val)

View file

@ -114,8 +114,8 @@
(rx/filter kbd/altKey?) (rx/filter kbd/altKey?)
(rx/map #(= :down (:type %)))) (rx/map #(= :down (:type %))))
;; Fix a situation caused by using `ctrl+alt` kind of shortcuts, ;; Fix a situation caused by using `ctrl+alt` kind of shortcuts,
;; that makes keyboard-alt stream registring the key pressed but ;; that makes keyboard-alt stream registering the key pressed but
;; on bluring the window (unfocus) the key down is never arrived. ;; on blurring the window (unfocus) the key down is never arrived.
(->> window-blur (->> window-blur
(rx/map (constantly false)))) (rx/map (constantly false))))
(rx/dedupe))] (rx/dedupe))]
@ -130,8 +130,8 @@
(rx/filter kbd/ctrlKey?) (rx/filter kbd/ctrlKey?)
(rx/map #(= :down (:type %)))) (rx/map #(= :down (:type %))))
;; Fix a situation caused by using `ctrl+alt` kind of shortcuts, ;; Fix a situation caused by using `ctrl+alt` kind of shortcuts,
;; that makes keyboard-alt stream registring the key pressed but ;; that makes keyboard-alt stream registering the key pressed but
;; on bluring the window (unfocus) the key down is never arrived. ;; on blurring the window (unfocus) the key down is never arrived.
(->> window-blur (->> window-blur
(rx/map (constantly false)))) (rx/map (constantly false))))
(rx/dedupe))] (rx/dedupe))]

View file

@ -28,7 +28,7 @@
(mf/defc on-main-error (mf/defc on-main-error
[{:keys [error] :as props}] [{:keys [error] :as props}]
(mf/use-effect (st/emitf (rt/assign-exception error))) (mf/use-effect (st/emitf (rt/assign-exception error)))
[:span "Internal application errror"]) [:span "Internal application error"])
(mf/defc main-page (mf/defc main-page
{::mf/wrap [#(mf/catch % {:fallback on-main-error})]} {::mf/wrap [#(mf/catch % {:fallback on-main-error})]}

View file

@ -42,7 +42,7 @@
(defn- on-success (defn- on-success
[_] [_]
(st/emit! (dm/info (tr "auth.notifications.password-changed-succesfully")) (st/emit! (dm/info (tr "auth.notifications.password-changed-successfully"))
(rt/nav :auth-login))) (rt/nav :auth-login)))
(defn- on-submit (defn- on-submit

View file

@ -37,7 +37,7 @@
(wapi/exit-fullscreen)))))))] (wapi/exit-fullscreen)))))))]
;; NOTE: the user interaction with F11 keyboard hot-key does not ;; NOTE: the user interaction with F11 keyboard hot-key does not
;; emits the `fullscreenchange` event; that event is emmited only ;; emits the `fullscreenchange` event; that event is emitted only
;; when API is used. There are no way to detect the F11 behavior ;; when API is used. There are no way to detect the F11 behavior
;; in a uniform cross browser way. ;; in a uniform cross browser way.
@ -47,7 +47,7 @@
(fn [] (fn []
(.removeEventListener js/document "fullscreenchange" change)))) (.removeEventListener js/document "fullscreenchange" change))))
[:div.fulllscreen-wrapper {:ref container :class (dom/classnames :fullscreen @state)} [:div.fullscreen-wrapper {:ref container :class (dom/classnames :fullscreen @state)}
[:& (mf/provider fullscreen-context) {:value manager} [:& (mf/provider fullscreen-context) {:value manager}
children]])) children]]))

View file

@ -25,7 +25,7 @@
;; Remove comments ;; Remove comments
(str/replace #"<\!\-\-(.*?(?=\-\->))\-\->" "") (str/replace #"<\!\-\-(.*?(?=\-\->))\-\->" "")
;; Remofe end of line ;; Remove end of line
(str/replace #"\r?\n|\r" " ") (str/replace #"\r?\n|\r" " ")
;; Replace double quotes for single ;; Replace double quotes for single

View file

@ -113,8 +113,8 @@
;; that the team is a implicit context variable that is ;; that the team is a implicit context variable that is
;; available using react context or accessing ;; available using react context or accessing
;; the :current-team-id on the state. We set the key to the ;; the :current-team-id on the state. We set the key to the
;; team-id becase we want to completly refresh all the ;; team-id because we want to completely refresh all the
;; components on team change. Many components assumess that the ;; components on team change. Many components assumes that the
;; team is already set so don't put the team into mf/deps. ;; team is already set so don't put the team into mf/deps.
(when team (when team
[:section.dashboard-layout {:key (:id team)} [:section.dashboard-layout {:key (:id team)}

View file

@ -100,7 +100,7 @@
(mf/use-effect (mf/use-effect
(fn [] (fn []
(when-not has-libraries? (when-not has-libraries?
;; Start download automaticaly ;; Start download automatically
(start-export)))) (start-export))))
[:div.modal-overlay [:div.modal-overlay

View file

@ -234,7 +234,7 @@
(let [form (fm/use-form :spec ::leave-modal-form :initial {}) (let [form (fm/use-form :spec ::leave-modal-form :initial {})
members (some->> members (filterv #(not= (:id %) (:id profile)))) members (some->> members (filterv #(not= (:id %) (:id profile))))
options (into [{:value "" options (into [{:value ""
:label (tr "modals.leave-and-reassign.select-memeber-to-promote")}] :label (tr "modals.leave-and-reassign.select-member-to-promote")}]
(map #(hash-map :label (:name %) :value (str (:id %))) members)) (map #(hash-map :label (:name %) :value (str (:id %))) members))
on-cancel (st/emitf (modal/hide)) on-cancel (st/emitf (modal/hide))

View file

@ -25,14 +25,14 @@
(defn- on-create-success (defn- on-create-success
[_form response] [_form response]
(let [msg "Team created successfuly"] (let [msg "Team created successfully"]
(st/emit! (dm/success msg) (st/emit! (dm/success msg)
(modal/hide) (modal/hide)
(rt/nav :dashboard-projects {:team-id (:id response)})))) (rt/nav :dashboard-projects {:team-id (:id response)}))))
(defn- on-update-success (defn- on-update-success
[_form _response] [_form _response]
(let [msg "Team created successfuly"] (let [msg "Team created successfully"]
(st/emit! (dm/success msg) (st/emit! (dm/success msg)
(modal/hide)))) (modal/hide))))

View file

@ -191,7 +191,7 @@
(defn use-stream (defn use-stream
"Wraps the subscription to a strem into a `use-effect` call" "Wraps the subscription to a stream into a `use-effect` call"
([stream on-subscribe] ([stream on-subscribe]
(use-stream stream (mf/deps) on-subscribe)) (use-stream stream (mf/deps) on-subscribe))
([stream deps on-subscribe] ([stream deps on-subscribe]

View file

@ -393,7 +393,7 @@
(mf/defc onboarding-templates-modal (mf/defc onboarding-templates-modal
{::mf/register modal/components {::mf/register modal/components
::mf/register-as :onboarding-templates} ::mf/register-as :onboarding-templates}
;; NOTE: the project usually comes empty, it only comes fullfilled ;; NOTE: the project usually comes empty, it only comes fulfilled
;; when a user creates a new team just after signup. ;; when a user creates a new team just after signup.
[{:keys [project-id] :as props}] [{:keys [project-id] :as props}]
(let [close-fn (mf/use-callback #(st/emit! (modal/hide))) (let [close-fn (mf/use-callback #(st/emit! (modal/hide)))

View file

@ -181,7 +181,7 @@
[:& cap-markers {:shape shape [:& cap-markers {:shape shape
:render-id render-id}]))) :render-id render-id}])))
;; Outer alingmnent: display the shape in two layers. One ;; Outer alignment: display the shape in two layers. One
;; without stroke (only fill), and another one only with stroke ;; without stroke (only fill), and another one only with stroke
;; at double width (transparent fill) and passed through a mask ;; at double width (transparent fill) and passed through a mask
;; that shows the whole shape, but hides the original shape ;; that shows the whole shape, but hides the original shape

View file

@ -38,6 +38,6 @@
#(when sub #(when sub
(rx/dispose! sub))))) (rx/dispose! sub)))))
;; Use ref so if the urls are cached will return inmediately instead of the ;; Use ref so if the urls are cached will return immediately instead of the
;; next render ;; next render
(mf/ref-val uri-data))) (mf/ref-val uri-data)))

View file

@ -49,7 +49,7 @@
:in2 "SourceGraphic" :in2 "SourceGraphic"
:operator "in" :operator "in"
:result "comp"}]] :result "comp"}]]
;; Clip path is necesary so the elements inside the mask won't affect ;; Clip path is necessary so the elements inside the mask won't affect
;; the events outside. Clip hides the elements but mask doesn't (like display vs visibility) ;; the events outside. Clip hides the elements but mask doesn't (like display vs visibility)
;; we cannot use clips instead of mask because clips can only be simple shapes ;; we cannot use clips instead of mask because clips can only be simple shapes
[:clipPath {:id (clip-id render-id mask)} [:clipPath {:id (clip-id render-id mask)}

View file

@ -208,7 +208,7 @@
:height (if (#{:auto-height :auto-width} grow-type) 100000 height) :height (if (#{:auto-height :auto-width} grow-type) 100000 height)
:style (-> (obj/new) (attrs/add-layer-props shape)) :style (-> (obj/new) (attrs/add-layer-props shape))
:ref ref} :ref ref}
;; We use a class here because react has a bug that won't use the appropiate selector for ;; We use a class here because react has a bug that won't use the appropriate selector for
;; `background-clip` ;; `background-clip`
[:style ".text-node { background-clip: text; [:style ".text-node { background-clip: text;
-webkit-background-clip: text;" ] -webkit-background-clip: text;" ]

View file

@ -166,8 +166,8 @@
(mapv (fn [[style text]] (vector (merge txt/default-text-attrs style) text))))] (mapv (fn [[style text]] (vector (merge txt/default-text-attrs style) text))))]
(for [[idx [full-style text]] (map-indexed vector style-text-blocks)] (for [[idx [full-style text]] (map-indexed vector style-text-blocks)]
(let [previus-style (first (nth style-text-blocks (dec idx) nil)) (let [previous-style (first (nth style-text-blocks (dec idx) nil))
style (remove-equal-values full-style previus-style) style (remove-equal-values full-style previous-style)
;; If the color is set we need to add opacity otherwise the display will not work ;; If the color is set we need to add opacity otherwise the display will not work
style (cond-> style style (cond-> style

View file

@ -50,7 +50,7 @@
;; :style {:filter "sepia(1)"} ;; :style {:filter "sepia(1)"}
}]))) }])))
;; This custom deffered don't deffer rendering when ghost rendering is ;; This custom deferred don't defer rendering when ghost rendering is
;; used. ;; used.
(defn custom-deferred (defn custom-deferred
[component] [component]

View file

@ -110,7 +110,7 @@
[:> shape-container {:shape shape} [:> shape-container {:shape shape}
;; We keep hidden the shape when we're editing so it keeps track of the size ;; We keep hidden the shape when we're editing so it keeps track of the size
;; and updates the selrect acordingly ;; and updates the selrect accordingly
[:g.text-shape {:opacity (when edition? 0) [:g.text-shape {:opacity (when edition? 0)
:pointer-events "none"} :pointer-events "none"}

View file

@ -98,7 +98,7 @@
state (get state-map id empty-editor-state) state (get state-map id empty-editor-state)
self-ref (mf/use-ref) self-ref (mf/use-ref)
blured (mf/use-var false) blurred (mf/use-var false)
on-key-up on-key-up
(fn [event] (fn [event]
@ -123,13 +123,13 @@
(fn [event] (fn [event]
(dom/stop-propagation event) (dom/stop-propagation event)
(dom/prevent-default event) (dom/prevent-default event)
(reset! blured true))) (reset! blurred true)))
on-focus on-focus
(mf/use-callback (mf/use-callback
(mf/deps shape state) (mf/deps shape state)
(fn [_] (fn [_]
(reset! blured false))) (reset! blurred false)))
prev-value (mf/use-ref state) prev-value (mf/use-ref state)
@ -159,7 +159,7 @@
(mf/use-callback (mf/use-callback
(fn [val] (fn [val]
(let [val (handle-change val) (let [val (handle-change val)
val (if (true? @blured) val (if (true? @blurred)
(ted/add-editor-blur-selection val) (ted/add-editor-blur-selection val)
(ted/remove-editor-blur-selection val))] (ted/remove-editor-blur-selection val))]
(st/emit! (dwt/update-editor-state shape val))))) (st/emit! (dwt/update-editor-state shape val)))))

View file

@ -1087,7 +1087,7 @@
(mf/defc typographies-group (mf/defc typographies-group
[{:keys [file-id prefix groups open-groups file local? selected-typographies local [{:keys [file-id prefix groups open-groups file local? selected-typographies local
editting-id on-asset-click handle-change apply-typography editing-id on-asset-click handle-change apply-typography
on-rename-group on-ungroup on-context-menu]}] on-rename-group on-ungroup on-context-menu]}]
(let [group-open? (get open-groups prefix true)] (let [group-open? (get open-groups prefix true)]
@ -1113,7 +1113,7 @@
:selected? (contains? selected-typographies (:id typography)) :selected? (contains? selected-typographies (:id typography))
:on-click #(on-asset-click % (:id typography) :on-click #(on-asset-click % (:id typography)
(partial apply-typography typography)) (partial apply-typography typography))
:editting? (= editting-id (:id typography)) :editing? (= editing-id (:id typography))
:focus-name? (= (:rename-typography local) (:id typography))}])]) :focus-name? (= (:rename-typography local) (:id typography))}])])
(for [[path-item content] groups] (for [[path-item content] groups]
@ -1125,7 +1125,7 @@
:file file :file file
:local? local? :local? local?
:selected-typographies selected-typographies :selected-typographies selected-typographies
:editting-id editting-id :editing-id editing-id
:local local :local local
:on-asset-click on-asset-click :on-asset-click on-asset-click
:handle-change handle-change :handle-change handle-change
@ -1272,7 +1272,7 @@
(dwl/sync-file file-id file-id) (dwl/sync-file file-id file-id)
(dwu/commit-undo-transaction))))) (dwu/commit-undo-transaction)))))
editting-id (or (:rename-typography local) (:edit-typography local))] editing-id (or (:rename-typography local) (:edit-typography local))]
(mf/use-effect (mf/use-effect
(mf/deps local) (mf/deps local)
@ -1301,7 +1301,7 @@
:file file :file file
:local? local? :local? local?
:selected-typographies selected-typographies :selected-typographies selected-typographies
:editting-id editting-id :editing-id editing-id
:local local :local local
:on-asset-click (partial on-asset-click groups) :on-asset-click (partial on-asset-click groups)
:handle-change handle-change :handle-change handle-change

View file

@ -21,7 +21,7 @@
(l/derived :workspace-undo st/state)) (l/derived :workspace-undo st/state))
(defn get-object (defn get-object
"Searchs for a shape inside the objects list or inside the undo history" "Searches for a shape inside the objects list or inside the undo history"
[id entries objects] [id entries objects]
(let [search-deleted-shape (let [search-deleted-shape
(fn [id entries] (fn [id entries]
@ -144,7 +144,7 @@
maybe-keyword)) maybe-keyword))
(defn select-entry (defn select-entry
"Selects the entry the user will see inside a list of posible entries. "Selects the entry the user will see inside a list of possible entries.
Sometimes the result will be a combination." Sometimes the result will be a combination."
[candidates] [candidates]
(let [;; Group by id and type (let [;; Group by id and type

View file

@ -249,7 +249,7 @@
[:div.interactions-summary {:on-click #(swap! extended-open? not)} [:div.interactions-summary {:on-click #(swap! extended-open? not)}
[:div.trigger-name (event-type-name interaction)] [:div.trigger-name (event-type-name interaction)]
[:div.action-summary (action-summary interaction destination)]] [:div.action-summary (action-summary interaction destination)]]
[:div.elemen-set-actions {:on-click #(remove-interaction index)} [:div.element-set-actions {:on-click #(remove-interaction index)}
[:div.element-set-actions-button i/minus]] [:div.element-set-actions-button i/minus]]
(when @extended-open? (when @extended-open?

View file

@ -269,12 +269,12 @@
on-convert-to-typography on-convert-to-typography
(fn [_] (fn [_]
(let [setted-values (-> (d/without-nils values) (let [set-values (-> (d/without-nils values)
(select-keys (select-keys
(d/concat text-font-attrs (d/concat text-font-attrs
text-spacing-attrs text-spacing-attrs
text-transform-attrs))) text-transform-attrs)))
typography (merge txt/default-typography setted-values) typography (merge txt/default-typography set-values)
typography (generate-typography-name typography) typography (generate-typography-name typography)
id (uuid/next)] id (uuid/next)]
(st/emit! (dwl/add-typography (assoc typography :id id) false)) (st/emit! (dwl/add-typography (assoc typography :id id) false))

View file

@ -433,8 +433,8 @@
;; In summary, this need to a good UX/UI/IMPL rework. ;; In summary, this need to a good UX/UI/IMPL rework.
(mf/defc typography-entry (mf/defc typography-entry
[{:keys [typography read-only? selected? on-click on-change on-detach on-context-menu editting? focus-name? file]}] [{:keys [typography read-only? selected? on-click on-change on-detach on-context-menu editing? focus-name? file]}]
(let [open? (mf/use-state editting?) (let [open? (mf/use-state editing?)
hover-detach (mf/use-state false) hover-detach (mf/use-state false)
name-input-ref (mf/use-ref) name-input-ref (mf/use-ref)
@ -458,10 +458,10 @@
(mf/set-ref-val! name-ref (dom/get-target-val event))))] (mf/set-ref-val! name-ref (dom/get-target-val event))))]
(mf/use-effect (mf/use-effect
(mf/deps editting?) (mf/deps editing?)
(fn [] (fn []
(when editting? (when editing?
(reset! open? editting?)))) (reset! open? editing?))))
(mf/use-effect (mf/use-effect
(mf/deps focus-name?) (mf/deps focus-name?)

View file

@ -280,13 +280,13 @@
{:name "Twitter post" {:name "Twitter post"
:width 1024 :width 1024
:height 512} :height 512}
{:name "Youtube profile" {:name "YouTube profile"
:width 800 :width 800
:height 800} :height 800}
{:name "Youtube banner" {:name "YouTube banner"
:width 2560 :width 2560
:height 1440} :height 1440}
{:name "Youtube thumb" {:name "YouTube thumb"
:width 1280 :width 1280
:height 720} :height 720}
]) ])

View file

@ -369,7 +369,7 @@
(/ zoom))] (/ zoom))]
(dom/prevent-default event) (dom/prevent-default event)
(dom/stop-propagation event) (dom/stop-propagation event)
(if (and (not (cfg/check-platform? :macos)) ;; macos sends delta-x automaticaly, don't need to do it (if (and (not (cfg/check-platform? :macos)) ;; macos sends delta-x automatically, don't need to do it
(kbd/shift? event)) (kbd/shift? event))
(st/emit! (dw/update-viewport-position {:x #(+ % delta-y)})) (st/emit! (dw/update-viewport-position {:x #(+ % delta-y)}))
(st/emit! (dw/update-viewport-position {:x #(+ % delta-x) (st/emit! (dw/update-viewport-position {:x #(+ % delta-x)

View file

@ -83,9 +83,9 @@
:height (+ (/ (* 2 gradient-width-handler-radius) zoom) (/ 2 zoom) 4) :height (+ (/ (* 2 gradient-width-handler-radius) zoom) (/ 2 zoom) 4)
:offset (/ 2 zoom)}]) :offset (/ 2 zoom)}])
(def checkboard "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAIAAAC0tAIdAAACvUlEQVQoFQGyAk39AeLi4gAAAAAAAB0dHQAAAAAAAOPj4wAAAAAAAB0dHQAAAAAAAOPj4wAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB////AAAAAAAA4+PjAAAAAAAAHR0dAAAAAAAA4+PjAAAAAAAAHR0dAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATj4+MAAAAAAAAdHR0AAAAAAADj4+MAAAAAAAAdHR0AAAAAAADj4+MAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjScaa0cU7nIAAAAASUVORK5CYII=") (def checkerboard "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAIAAAC0tAIdAAACvUlEQVQoFQGyAk39AeLi4gAAAAAAAB0dHQAAAAAAAOPj4wAAAAAAAB0dHQAAAAAAAOPj4wAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB////AAAAAAAA4+PjAAAAAAAAHR0dAAAAAAAA4+PjAAAAAAAAHR0dAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATj4+MAAAAAAAAdHR0AAAAAAADj4+MAAAAAAAAdHR0AAAAAAADj4+MAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjScaa0cU7nIAAAAASUVORK5CYII=")
#_(def checkboard "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAADFJREFUOE9jZGBgEAFifOANPknGUQMYhkkYEEgG+NMJKAwIAbwJbdQABnBCIgRoG4gAIF8IsXB/Rs4AAAAASUVORK5CYII=") #_(def checkerboard "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAADFJREFUOE9jZGBgEAFifOANPknGUQMYhkkYEEgG+NMJKAwIAbwJbdQABnBCIgRoG4gAIF8IsXB/Rs4AAAAASUVORK5CYII=")
(mf/defc gradient-color-handler (mf/defc gradient-color-handler
[{:keys [filter-id zoom point color angle selected [{:keys [filter-id zoom point color angle selected
@ -93,7 +93,7 @@
[:g {:filter (str/fmt "url(#%s)" filter-id) [:g {:filter (str/fmt "url(#%s)" filter-id)
:transform (gmt/rotate-matrix angle point)} :transform (gmt/rotate-matrix angle point)}
[:image {:href checkboard [:image {:href checkerboard
:x (- (:x point) (/ gradient-square-width 2 zoom)) :x (- (:x point) (/ gradient-square-width 2 zoom))
:y (- (:y point) (/ gradient-square-width 2 zoom)) :y (- (:y point) (/ gradient-square-width 2 zoom))
:width (/ gradient-square-width zoom) :width (/ gradient-square-width zoom)
@ -173,7 +173,7 @@
[:g.gradient-handlers [:g.gradient-handlers
[:defs [:defs
[:& gradient-line-drop-shadow-filter {:id "gradient_line_drop_shadow" :from-p from-p :to-p to-p :zoom zoom}] [:& gradient-line-drop-shadow-filter {:id "gradient_line_drop_shadow" :from-p from-p :to-p to-p :zoom zoom}]
[:& gradient-line-drop-shadow-filter {:id "gradient_widh_line_drop_shadow" :from-p from-p :to-p width-p :zoom zoom}] [:& gradient-line-drop-shadow-filter {:id "gradient_width_line_drop_shadow" :from-p from-p :to-p width-p :zoom zoom}]
[:& gradient-square-drop-shadow-filter {:id "gradient_square_from_drop_shadow" :point from-p :zoom zoom}] [:& gradient-square-drop-shadow-filter {:id "gradient_square_from_drop_shadow" :point from-p :zoom zoom}]
[:& gradient-square-drop-shadow-filter {:id "gradient_square_to_drop_shadow" :point to-p :zoom zoom}] [:& gradient-square-drop-shadow-filter {:id "gradient_square_to_drop_shadow" :point to-p :zoom zoom}]
[:& gradient-width-handler-shadow-filter {:id "gradient_width_handler_drop_shadow" :point width-p :zoom zoom}]] [:& gradient-width-handler-shadow-filter {:id "gradient_width_handler_drop_shadow" :point width-p :zoom zoom}]]
@ -187,7 +187,7 @@
:stroke-width (/ gradient-line-stroke-width zoom)}]] :stroke-width (/ gradient-line-stroke-width zoom)}]]
(when width-p (when width-p
[:g {:filter "url(#gradient_widh_line_drop_shadow)"} [:g {:filter "url(#gradient_width_line_drop_shadow)"}
[:line {:x1 (:x from-p) [:line {:x1 (:x from-p)
:y1 (:y from-p) :y1 (:y from-p)
:x2 (:x width-p) :x2 (:x width-p)

View file

@ -179,7 +179,7 @@
)])) )]))
(mf/defc resize-side-handler (mf/defc resize-side-handler
"The side handler is always rendered horizontaly and then rotated" "The side handler is always rendered horizontally and then rotated"
[{:keys [x y length align angle zoom position rotation transform on-resize]}] [{:keys [x y length align angle zoom position rotation transform on-resize]}]
(let [res-point (if (#{:top :bottom} position) (let [res-point (if (#{:top :bottom} position)
{:y y} {:y y}

View file

@ -44,7 +44,7 @@
(.insertAdjacentHTML head "beforeend" (.insertAdjacentHTML head "beforeend"
(str "<style>" (str "<style>"
" @page {" style-str "}" " @page {" style-str "}"
" html, body {" ; Fix issue having Chromium to add random 1px marging at the bottom " html, body {" ; Fix issue having Chromium to add random 1px margin at the bottom
" overflow: hidden;" ; https://github.com/puppeteer/puppeteer/issues/2278#issuecomment-410381934 " overflow: hidden;" ; https://github.com/puppeteer/puppeteer/issues/2278#issuecomment-410381934
" font-size: 0;" " font-size: 0;"
" }" " }"
@ -81,7 +81,7 @@
(defn get-current-target (defn get-current-target
"Extract the current target from event instance (different from target "Extract the current target from event instance (different from target
when event triggered in a child of the suscribing element)." when event triggered in a child of the subscribing element)."
[event] [event]
(.-currentTarget event)) (.-currentTarget event))
@ -241,7 +241,7 @@
:else :else
(ex/raise :type :not-supported (ex/raise :type :not-supported
:hint "seems like the current browset does not support fullscreen api."))) :hint "seems like the current browser does not support fullscreen api.")))
(defn ^boolean blob? (defn ^boolean blob?
[v] [v]

View file

@ -20,7 +20,7 @@ goog.provide("app.util.globals");
goog.scope(function() { goog.scope(function() {
app.util.globals.global = goog.global; app.util.globals.global = goog.global;
function createGlobalEventEmiter(k) { function createGlobalEventEmitter(k) {
/* Allow mocked objects to be event emitters, so other modules /* Allow mocked objects to be event emitters, so other modules
* may subscribe to them. * may subscribe to them.
*/ */
@ -36,7 +36,7 @@ goog.scope(function() {
if (typeof goog.global.window !== "undefined") { if (typeof goog.global.window !== "undefined") {
return goog.global.window; return goog.global.window;
} else { } else {
return createGlobalEventEmiter(); return createGlobalEventEmitter();
} }
})(); })();
@ -44,7 +44,7 @@ goog.scope(function() {
if (typeof goog.global.document !== "undefined") { if (typeof goog.global.document !== "undefined") {
return goog.global.document; return goog.global.document;
} else { } else {
return createGlobalEventEmiter(); return createGlobalEventEmitter();
} }
})(); })();
@ -52,7 +52,7 @@ goog.scope(function() {
if (typeof goog.global.location !== "undefined") { if (typeof goog.global.location !== "undefined") {
return goog.global.location; return goog.global.location;
} else { } else {
return createGlobalEventEmiter(); return createGlobalEventEmitter();
} }
})(); })();
@ -60,7 +60,7 @@ goog.scope(function() {
if (typeof goog.global.navigator !== "undefined") { if (typeof goog.global.navigator !== "undefined") {
return goog.global.navigator; return goog.global.navigator;
} else { } else {
return createGlobalEventEmiter(); return createGlobalEventEmitter();
} }
})(); })();

View file

@ -20,7 +20,7 @@
[promesa.core :as p])) [promesa.core :as p]))
(defprotocol IBodyData (defprotocol IBodyData
"A helper for define body data with the appropiate headers." "A helper for define body data with the appropriate headers."
(-update-headers [_ headers]) (-update-headers [_ headers])
(-get-body-data [_])) (-get-body-data [_]))
@ -136,8 +136,8 @@
(defn conditional-decode-transit (defn conditional-decode-transit
[{:keys [body headers] :as response}] [{:keys [body headers] :as response}]
(let [contentype (get headers "content-type")] (let [contenttype (get headers "content-type")]
(if (and (str/starts-with? contentype "application/transit+json") (if (and (str/starts-with? contenttype "application/transit+json")
(pos? (count body))) (pos? (count body)))
(assoc response :body (t/decode-str body)) (assoc response :body (t/decode-str body))
response))) response)))

View file

@ -58,7 +58,7 @@
(defonce locale (l/atom (or (get @storage ::locale) (defonce locale (l/atom (or (get @storage ::locale)
(autodetect)))) (autodetect))))
;; The traslations `data` is a javascript object and should be treated ;; The translations `data` is a javascript object and should be treated
;; with `goog.object` namespace functions instead of a standart ;; with `goog.object` namespace functions instead of a standart
;; clojure functions. This is for performance reasons because this ;; clojure functions. This is for performance reasons because this
;; code is executed in the critical part (application bootstrap) and ;; code is executed in the critical part (application bootstrap) and
@ -102,7 +102,7 @@
;; A main public api for translate strings. ;; A main public api for translate strings.
;; A marker type that is used just for mark ;; A marker type that is used just for mark
;; a parameter that reprsentes the counter. ;; a parameter that represented the counter.
(defn c (defn c
[x] [x]

View file

@ -15,7 +15,7 @@
(defn setup! (defn setup!
"Generate new kd-tree instance with provided generation parameter "Generate new kd-tree instance with provided generation parameter
or just return a prevuously created from internal LRU cache." or just return a previously created from internal LRU cache."
[t w h ws hs] [t w h ws hs]
(impl/setup t w h ws hs)) (impl/setup t w h ws hs))

View file

@ -1,7 +1,7 @@
/** /**
* Arc to Bezier curves transformer * Arc to Bezier curves transformer
* *
* Is a modified and google closure complatible version of the a2c * Is a modified and google closure compatible version of the a2c
* functions by https://github.com/fontello/svgpath * functions by https://github.com/fontello/svgpath
* *
* @author UXBOX Labs SL * @author UXBOX Labs SL

View file

@ -197,8 +197,8 @@
"Removes some commands and convert relative to absolute coordinates" "Removes some commands and convert relative to absolute coordinates"
[commands] [commands]
(let [simplify-command (let [simplify-command
;; prev-pos : previous position for the current path. Necesary for relative commands ;; prev-pos : previous position for the current path. Necessary for relative commands
;; prev-start : previous move-to necesary for Z commands ;; prev-start : previous move-to necessary for Z commands
;; prev-cc : previous command control point for cubic beziers ;; prev-cc : previous command control point for cubic beziers
;; prev-qc : previous command control point for quadratic curves ;; prev-qc : previous command control point for quadratic curves
(fn [[result prev-pos prev-start prev-cc prev-qc] [command _prev]] (fn [[result prev-pos prev-start prev-cc prev-qc] [command _prev]]

View file

@ -15,7 +15,7 @@
(defn remove-line-curves (defn remove-line-curves
"Remove all curves that have both handlers in the same position that the "Remove all curves that have both handlers in the same position that the
beggining and end points. This makes them really line-to commands" beginning and end points. This makes them really line-to commands"
[content] [content]
(let [with-prev (d/enumerate (d/with-prev content)) (let [with-prev (d/enumerate (d/with-prev content))
process-command process-command
@ -426,7 +426,7 @@
(mapv replace-command)))) (mapv replace-command))))
(defn merge-nodes (defn merge-nodes
"Reduces the continguous segments in points to a single point" "Reduces the contiguous segments in points to a single point"
[content points] [content points]
(let [point->merge-point (-> content (let [point->merge-point (-> content
(get-segments points) (get-segments points)

View file

@ -25,7 +25,7 @@
;; ;;
;; This will catch all renders and print to the console the ;; This will catch all renders and print to the console the
;; percentiles of render time measures. The log function is ;; percentiles of render time measures. The log function is
;; automatically debouced for avod excesive spam to the console. ;; automatically debounced to avoid excessive spam to the console.
(defn tdigest (defn tdigest
[] []

View file

@ -26,7 +26,7 @@
* Changes to the original code: * Changes to the original code:
* - Use ES6+. * - Use ES6+.
* - Add the Node class for manage childs. * - Add the Node class for manage childs.
* - Use generators where is posible. * - Use generators where is possible.
**/ **/
"use strict"; "use strict";

View file

@ -37,7 +37,7 @@ goog.scope(function() {
// Will store a map from key to list of data // Will store a map from key to list of data
// value => [ data ] // value => [ data ]
// The values can be queried in range and the data stored will be retrived whole // The values can be queried in range and the data stored will be retrieved whole
// but can be removed/updated individually using clojurescript equality // but can be removed/updated individually using clojurescript equality
class RangeTree { class RangeTree {
constructor() { constructor() {
@ -151,7 +151,7 @@ goog.scope(function() {
} }
} }
// Remove the lefmost node of the current branch // Remove the leftmost node of the current branch
function recRemoveMin(branch) { function recRemoveMin(branch) {
if (!branch.left) { if (!branch.left) {
return null; return null;

View file

@ -463,7 +463,7 @@
#{:mask-type}) #{:mask-type})
;; Defaults for some tags per spec https://www.w3.org/TR/SVG11/single-page.html ;; Defaults for some tags per spec https://www.w3.org/TR/SVG11/single-page.html
;; they are basicaly the defaults that can be percents and we need to replace because ;; they are basically the defaults that can be percents and we need to replace because
;; otherwise won't work as expected in the workspace ;; otherwise won't work as expected in the workspace
(defonce svg-tag-defaults (defonce svg-tag-defaults
(let [filter-default {:units :filterUnits (let [filter-default {:units :filterUnits

View file

@ -115,7 +115,7 @@
:else :else
(ex/raise :type :not-supported (ex/raise :type :not-supported
:hint "seems like the current browset does not support fullscreen api."))) :hint "seems like the current browser does not support fullscreen api.")))
(defn exit-fullscreen (defn exit-fullscreen
[] []
@ -128,7 +128,7 @@
:else :else
(ex/raise :type :not-supported (ex/raise :type :not-supported
:hint "seems like the current browset does not support fullscreen api."))) :hint "seems like the current browser does not support fullscreen api.")))
(defn observe-resize (defn observe-resize
[node] [node]

View file

@ -15,7 +15,7 @@
goog.net.WebSocket.EventType)) goog.net.WebSocket.EventType))
(defprotocol IWebSocket (defprotocol IWebSocket
(-stream [_] "Retrienve the message stream") (-stream [_] "Retrieve the message stream")
(-send [_ message] "send a message") (-send [_ message] "send a message")
(-close [_] "close websocket")) (-close [_] "close websocket"))

View file

@ -78,7 +78,7 @@
(reply-error err))))) (reply-error err)))))
(defn- drop-message (defn- drop-message
"Sends to the client a notifiction that its messages have been dropped" "Sends to the client a notification that its messages have been dropped"
[{:keys [sender-id] :as message}] [{:keys [sender-id] :as message}]
(us/assert ::message message) (us/assert ::message message)
(.postMessage js/self (t/encode-str {:reply-to sender-id (.postMessage js/self (t/encode-str {:reply-to sender-id
@ -96,7 +96,7 @@
;; This scan will store the last message per type in `messages` ;; This scan will store the last message per type in `messages`
;; when a previous message is dropped is stored in `dropped` ;; when a previous message is dropped is stored in `dropped`
;; we also store the last message processed in order to detect ;; we also store the last message processed in order to detect
;; posible infinite loops ;; possible infinite loops
(rx/scan (rx/scan
(fn [[messages dropped _last] message] (fn [[messages dropped _last] message]
(let [cmd (get-in message [:payload :cmd]) (let [cmd (get-in message [:payload :cmd])

View file

@ -10,7 +10,7 @@
(defn create-random-tree [num-nodes]) (defn create-random-tree [num-nodes])
(t/deftest test-insert-and-retrive-data (t/deftest test-insert-and-retrieve-data
(t/testing "Retrieve on empty tree" (t/testing "Retrieve on empty tree"
(let [tree (rt/make-tree)] (let [tree (rt/make-tree)]
(t/is (= (rt/get tree 100) nil)))) (t/is (= (rt/get tree 100) nil))))
@ -93,7 +93,7 @@
tree (reduce #(rt/remove %1 %2 :x) tree (range 0 (dec size)))] tree (reduce #(rt/remove %1 %2 :x) tree (range 0 (dec size)))]
(t/is (rt/empty? tree))) (t/is (rt/empty? tree)))
;; Try a decreasing range ;; Try a decreleasing range
(let [size 10000 (let [size 10000
tree (rt/make-tree) tree (rt/make-tree)
tree (reduce #(rt/insert %1 %2 :x) tree (range (dec size) -1 -1)) tree (reduce #(rt/insert %1 %2 :x) tree (range (dec size) -1 -1))

View file

@ -35,7 +35,7 @@ msgstr "Just wanna try it?"
msgid "auth.demo-warning" msgid "auth.demo-warning"
msgstr "" msgstr ""
"This is a DEMO service, DO NOT USE for real work, the projects will be " "This is a DEMO service, DO NOT USE for real work, the projects will be "
"periodicaly wiped." "periodically wiped."
#: src/app/main/ui/auth/register.cljs, src/app/main/ui/auth/recovery_request.cljs, src/app/main/ui/auth/login.cljs #: src/app/main/ui/auth/register.cljs, src/app/main/ui/auth/recovery_request.cljs, src/app/main/ui/auth/login.cljs
msgid "auth.email" msgid "auth.email"
@ -67,7 +67,7 @@ msgstr "Great to see you again!"
#: src/app/main/ui/auth/login.cljs #: src/app/main/ui/auth/login.cljs
msgid "auth.login-with-github-submit" msgid "auth.login-with-github-submit"
msgstr "Login with Github" msgstr "Login with GitHub"
#: src/app/main/ui/auth/login.cljs #: src/app/main/ui/auth/login.cljs
msgid "auth.login-with-gitlab-submit" msgid "auth.login-with-gitlab-submit"
@ -98,7 +98,7 @@ msgid "auth.notifications.invalid-token-error"
msgstr "The recovery token is invalid." msgstr "The recovery token is invalid."
#: src/app/main/ui/auth/recovery.cljs #: src/app/main/ui/auth/recovery.cljs
msgid "auth.notifications.password-changed-succesfully" msgid "auth.notifications.password-changed-successfully"
msgstr "Password successfully changed" msgstr "Password successfully changed"
#: src/app/main/ui/auth/recovery_request.cljs #: src/app/main/ui/auth/recovery_request.cljs
@ -111,7 +111,7 @@ msgstr "Password recovery link sent to your inbox."
#: src/app/main/ui/auth/verify_token.cljs #: src/app/main/ui/auth/verify_token.cljs
msgid "auth.notifications.team-invitation-accepted" msgid "auth.notifications.team-invitation-accepted"
msgstr "Joined the team succesfully" msgstr "Joined the team successfully"
#: src/app/main/ui/auth/register.cljs, src/app/main/ui/auth/login.cljs #: src/app/main/ui/auth/register.cljs, src/app/main/ui/auth/login.cljs
msgid "auth.password" msgid "auth.password"
@ -338,7 +338,7 @@ msgid "dashboard.import.import-error"
msgstr "There was a problem importing the file. The file wasn't imported." msgstr "There was a problem importing the file. The file wasn't imported."
msgid "dashboard.import.import-message" msgid "dashboard.import.import-message"
msgstr "%s files have been imported succesfully." msgstr "%s files have been imported successfully."
msgid "dashboard.import.progress.process-colors" msgid "dashboard.import.progress.process-colors"
msgstr "Processing colors" msgstr "Processing colors"
@ -1468,7 +1468,7 @@ msgid "modals.leave-and-reassign.promote-and-leave"
msgstr "Promote and leave" msgstr "Promote and leave"
#: src/app/main/ui/dashboard/sidebar.cljs #: src/app/main/ui/dashboard/sidebar.cljs
msgid "modals.leave-and-reassign.select-memeber-to-promote" msgid "modals.leave-and-reassign.select-member-to-promote"
msgstr "Select a member to promote" msgstr "Select a member to promote"
#: src/app/main/ui/dashboard/sidebar.cljs #: src/app/main/ui/dashboard/sidebar.cljs
@ -1988,7 +1988,7 @@ msgstr "Disable snap to grid"
#: src/app/main/ui/workspace/header.cljs #: src/app/main/ui/workspace/header.cljs
msgid "workspace.header.menu.enable-dynamic-alignment" msgid "workspace.header.menu.enable-dynamic-alignment"
msgstr "Enable dynamic aligment" msgstr "Enable dynamic alignment"
#: src/app/main/ui/workspace/header.cljs #: src/app/main/ui/workspace/header.cljs
msgid "workspace.header.menu.enable-scale-text" msgid "workspace.header.menu.enable-scale-text"