🔧 Fix typos in source code

Found via `codespell -q 3 -S *.po,./frontend/yarn.lock -L childs,clen,fpr,inflight,ody,ot,ro,te,trys,ue`
This commit is contained in:
luz paz 2022-10-02 14:00:19 -04:00 committed by Andrey Antukh
parent ac4218a3c2
commit e30bea0b6f
72 changed files with 110 additions and 110 deletions

View file

@ -17,7 +17,7 @@
[clojure.spec.alpha :as s]
[cuerdas.core :as str]))
;; --- Auxiliar Functions
;; --- Auxiliary Functions
(s/def ::platform #{:windows :linux :macos :other})
(s/def ::browser #{:chrome :firefox :safari :edge :other})

View file

@ -229,9 +229,9 @@
(swap! st/ongoing-tasks disj :export))))
;; We hide need to hide the ui elements of the export after
;; some interval. We also delay a litle bit more the stopper
;; some interval. We also delay a little bit more the stopper
;; for ensure that after some security time, the stream is
;; completelly closed.
;; completely closed.
(->> progress-stream
(rx/filter #(= "ended" (:status %)))
(rx/take 1)

View file

@ -124,7 +124,7 @@
(try
(assoc params :font (ot/parse data))
(catch :default _e
(log/warn :msg (str/fmt "skiping file %s, unsupported format" (:name params)))
(log/warn :msg (str/fmt "skipping file %s, unsupported format" (:name params)))
nil)))
(read-blob [blob]
@ -169,7 +169,7 @@
(defn rename-and-regroup
"Function responsible to rename a font in a local state and properly
regroup it to the apropriate `font-id` having in account current
regroup it to the appropriate `font-id` having in account current
fonts and installed fonts."
[current-fonts id name installed-fonts]
(let [famdb (-> (merge current-fonts installed-fonts)

View file

@ -198,7 +198,7 @@
:invitation-token invitation-token}]
;; NOTE: We can't take the profile value from login because
;; there are cases when login is successfull but the cookie is
;; there are cases when login is successful but the cookie is
;; not set properly (because of possible misconfiguration).
;; So, we proceed to make an additional call to fetch the
;; profile, and ensure that cookie is set correctly. If

View file

@ -573,7 +573,7 @@
(let [page-id (:current-page-id state)
objects (wsh/lookup-page-objects state page-id)
;; Ignore any shape whose parent is also intented to be moved
;; Ignore any shape whose parent is also intended to be moved
ids (cph/clean-loops objects ids)
;; If we try to move a parent into a child we remove it
@ -624,7 +624,7 @@
ids)
;; TODO: Probably implementing this using loop/recur will
;; be more efficient than using reduce and continuos data
;; be more efficient than using reduce and continuous data
;; desturcturing.
;; Sets the correct components metadata for the moved shapes

View file

@ -17,7 +17,7 @@
(log/set-level! :warn)
(defn initialized?
"Check if the state is properly intialized in a workspace. This means
"Check if the state is properly initialized in a workspace. This means
it has the `:current-page-id` and `:current-file-id` properly set."
[state]
(and (uuid? (:current-file-id state))

View file

@ -26,7 +26,7 @@
(sort-by ::index)))
(defn- get-empty-groups-after-group-creation
"An auxiliar function that finds and returns a set of ids that
"An auxiliary function that finds and returns a set of ids that
corresponds to groups that should be deleted after a group creation.
The corner case happens when you selects two (or more) shapes that

View file

@ -342,7 +342,7 @@
update-fn
(fn [component]
;; NOTE: we need to ensure the component exists,
;; because there are small posibilities of race
;; because there are small possibilities of race
;; conditions with component deletion.
(when component
(-> component

View file

@ -164,7 +164,7 @@
that use assets of the given type in the given library.
If an asset id is given, only shapes linked to this particular asset will
be syncrhonized."
be synchronized."
[it file-id asset-type asset-id library-id state]
(s/assert #{:colors :components :typographies} asset-type)
(s/assert (s/nilable ::us/uuid) asset-id)
@ -198,7 +198,7 @@
the given library.
If an asset id is given, only shapes linked to this particular asset will
be syncrhonized."
be synchronized."
[it file-id asset-type asset-id library-id state]
(s/assert #{:colors :components :typographies} asset-type)
(s/assert (s/nilable ::us/uuid) asset-id)

View file

@ -244,7 +244,7 @@
;; TODO: it is really need handle SVG here, looks like it already
;; handled separatelly
;; handled separately
(defn upload-media-workspace
[{:keys [position file-id] :as params}]
(let [params (assoc params

View file

@ -219,7 +219,7 @@
(fn [[page-id changes]]
(dch/update-indices page-id changes))
;; We update `position-data` from the incomming message
;; We update `position-data` from the incoming message
changes (->> changes (mapv update-position-data))
changes-by-pages (group-by :page-id changes)]

View file

@ -304,7 +304,7 @@
(update :workspace-pages dissoc id)))
(defn preload-data-uris
"Preloads the image data so it's ready when necesary"
"Preloads the image data so it's ready when necessary"
[]
(ptk/reify ::preload-data-uris
ptk/WatchEvent

View file

@ -222,7 +222,7 @@
ptk/UpdateEvent
(update [_ state]
;; Only deselect if there is no modal openned
;; Only deselect if there is no modal opened
(cond-> state
(or (not check-modal)
(not (::md/modal state)))

View file

@ -766,7 +766,7 @@
(pcb/with-objects objects)
(pcb/update-shapes moving-frames
(fn [shape]
;; Hide in viwer must be enabled just when a board is moved
;; Hide in viewer must be enabled just when a board is moved
;; inside another artboard an nested to it, we have to avoid
;; situations like: 1. Moving inside the same frame; 2. Moving
;; outside the frame

View file

@ -214,7 +214,7 @@
;; https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
(defn use-previous
"Returns the value from previuous render cycle."
"Returns the value from previous render cycle."
[value]
(let [ref (mf/use-ref value)]
(mf/use-effect
@ -234,7 +234,7 @@
(defn use-ref-callback
"Returns a stable callback pointer what calls the interned
callback. The interned callback will be automatically updated on
each reander if the reference changes and works as noop if the
each render if the reference changes and works as noop if the
pointer references to nil value."
[f]
(let [ptr (mf/use-ref nil)]

View file

@ -59,7 +59,7 @@
{::mf/wrap-props false
::mf/register modal/components
::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.
[props]
(let [project-id (unchecked-get props "project-id")

View file

@ -22,7 +22,7 @@
(try
(upf/format-path content)
(catch :default e
(log/error :hint "unexpected error on formating path"
(log/error :hint "unexpected error on formatting path"
:shape-name (:name shape)
:shape-id (:id shape)
:cause e)

View file

@ -62,7 +62,7 @@
transform (gsh/transform-str shape {:no-flip true})
;; These position attributes are not really necesary but they are convenient for for the export
;; These position attributes are not really necessary but they are convenient for for the export
group-props (-> #js {:transform transform
:className "text-container"
:x x

View file

@ -44,7 +44,7 @@
;; In other all cases we only allowed to have a single
;; shape-id because multiple shape-ids are handled
;; separatelly by the export-modal.
;; separately by the export-modal.
(let [defaults {:page-id page-id
:file-id file-id
:name filename

View file

@ -113,7 +113,7 @@
::mf/wrap-props false}
[props]
(let [;; NOTE: with `use-equal-memo` hook we ensure that all values
;; conserves the reference identity for avoid unnecesary dummy
;; conserves the reference identity for avoid unnecessary dummy
;; rerenders.
mode (h/use-equal-memo (unchecked-get props "interactions-mode"))
offset (h/use-equal-memo (unchecked-get props "frame-offset"))

View file

@ -116,7 +116,7 @@
(mf/use-effect
(fn []
;; When a change in the data is received a "force-render" event is emited
;; When a change in the data is received a "force-render" event is emitted
;; that will force the component to be mounted in memory
(let [sub
(->> (dwt/force-render-stream (:id shape))

View file

@ -232,7 +232,7 @@
(when (some? node)
(cond
(= (dom/get-tag-name node) "foreignObject")
;; The shape width/height will be automaticaly setup when the modifiers are applied
;; The shape width/height will be automatically setup when the modifiers are applied
nil
(or (= (dom/get-tag-name node) "mask")

View file

@ -103,7 +103,7 @@
(when @show-frame-thumbnail
(reset! show-frame-thumbnail false))
;; If we don't have the thumbnail data saved (normaly the first load) we update the data
;; If we don't have the thumbnail data saved (normally the first load) we update the data
;; when available
(when (not @thumbnail-data-ref)
(st/emit! (dwt/update-thumbnail page-id id) ))

View file

@ -241,7 +241,7 @@
editing-shape (get text-shapes edition)
;; This memo is necesary so the viewport-text-wrapper memoize its props correctly
;; This memo is necessary so the viewport-text-wrapper memoize its props correctly
text-shapes-wrapper
(mf/use-memo
(mf/deps text-shapes edition)

View file

@ -53,7 +53,7 @@
;; In other all cases we only allowed to have a single
;; shape-id because multiple shape-ids are handled
;; separatelly by the export-modal.
;; separately by the export-modal.
(let [defaults {:page-id page-id
:file-id file-id
:name sname

View file

@ -79,7 +79,7 @@
;; To show interactively the measures while the user is manipulating
;; the shape with the mouse, generate a copy of the shapes applying
;; the transient tranformations.
;; the transient transformations.
shapes (as-> old-shapes $
(map gsh/transform-shape $)
(map gsh/translate-to-frame $ frames))
@ -256,7 +256,7 @@
;; FRAME PRESETS
(when (and (options :presets)
(or (nil? all-types) (= (count all-types) 1))) ;; Dont' show presets if multi selected
(or (nil? all-types) (= (count all-types) 1))) ;; Don't show presets if multi selected
[:div.row-flex ;; some frames and some non frames
[:div.presets.custom-select.flex-grow {:on-click #(reset! show-presets-dropdown? true)}
[:span (tr "workspace.options.size-presets")]

View file

@ -76,7 +76,7 @@
It receives a function to execute for retrieve the stream that will
be used for creating the subscription. The function should be
stable, so is the responsability of the user of this hook to
stable, so is the responsibility of the user of this hook to
properly memoize it.
TODO: this should be placed in some generic hooks namespace but his

View file

@ -14,7 +14,7 @@
;; https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
;;
;; The API is broken in several ways. Here is some discussion of the problems,
;; and many uncomplete solutions:
;; and many incomplete solutions:
;; https://github.com/lolmaus/jquery.dragbetter/#what-this-is-all-about
;; https://www.w3schools.com/jsref/event_relatedtarget.asp
;; https://stackoverflow.com/questions/14194324/firefox-firing-dragleave-when-dragging-over-text?noredirect=1&lq=1

View file

@ -69,7 +69,7 @@
(autodetect))))
;; 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 standard
;; clojure functions. This is for performance reasons because this
;; code is executed in the critical part (application bootstrap) and
;; used in many parts of the application.

View file

@ -76,7 +76,7 @@
(defn make-curve-point
"Changes the content to make the point a 'curve'. The handlers will be positioned
in the same vector that results from te previous->next points but with fixed length."
in the same vector that results from the previous->next points but with fixed length."
[content point]
(let [indices (upc/point-indices content point)

View file

@ -5,8 +5,8 @@
;; Copyright (c) KALEIDOS INC
(ns app.util.snap-data
"Data structure that holds and retrieves the data to make the snaps. Internaly
is implemented with a balanced binary tree that queries by range.
"Data structure that holds and retrieves the data to make the snaps.
Internally is implemented with a balanced binary tree that queries by range.
https://en.wikipedia.org/wiki/Range_tree"
(:require
[app.common.data :as d]