Releases: Respo/respo.cljs
Releases · Respo/respo.cljs
new SVG elements: a, style, clipPath, marker
Feature
- new elements
a'
,style'
,marker
,clip-path
in SVG
Basic SVG elements rendering support
Feature
- now SVG elements are rendered with
document.createElementNS('http://www.w3.org/2000/svg', tag)
. - attribute updates on SVG elements should use
setAttribute
, rather than setting property. <text>
element in SVG usesinnerHTML
to add text content, which is a property.
Added basic SVG elements(Initial work)
Feature
- support some basic SVG elements.
(def svg-elements '[svg animate circle defs ellipse font font font-face g
image line mask path pattern polygon polyline rect stop style
text view])
(defmacro filter' [props & children] `(respo.core/create-element :filter ~props ~@children))
(defmacro fe-blend [props & children] `(respo.core/create-element :feBlend ~props ~@children))
(defmacro fe-offset' [props & children] `(respo.core/create-element :feOffset ~props ~@children))
However, Respo has not supported SVG elements by now.
`*cursor*` renamed to `%cursor`
Refactor
%cursor
to be consistent with%e
This is not commonly used by users, but instead generated by library. However there's small chance that code break when defining states in child components inside functions, for example:
(defn render-y [states *cursor*]
(cursor-> :key comp-y states)) ; <-- this line will break, now should use `%cursor`
(defcomp comp-x [states]
(render-y states *cursor*)
new macros: action-> mutation->
Feature
- with new macros, simple actions are simpler written in code
(defmacro action-> [op op-data]
`(fn [~'%e d!# m!#]
(d!# ~op ~op-data)))
(defmacro mutation-> [state]
`(fn [~'%e d!# m!#]
(m!# ~state)))
Fixed new event syntax used in list->
Fix
list->
not updated during:on-click
syntax update
support `(list-> props children)`
Refine
- calling
(list-> props children)
is identical to(list-> :div props children)
since<div>
is frequently used. code would look more consistent.
Represent DOM ops with number
Refactor
- now DOM ops are represented with numbers. no sigh of becoming faster though.
Support :on-click syntax
Feature
- Support
:on-click
syntax. This is a syntax sugar with bad performance.
Fix textarea value in SSR
Fix
- during SSR, attribute
value=
does not work, useinnerHTML=
instead.