Skip to content

Releases: Respo/respo.cljs

new SVG elements: a, style, clipPath, marker

15 Jan 05:40
Compare
Choose a tag to compare

Feature

  • new elements a', style', marker, clip-path in SVG

Basic SVG elements rendering support

12 Jan 15:49
Compare
Choose a tag to compare

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 uses innerHTML to add text content, which is a property.

Added basic SVG elements(Initial work)

12 Jan 04:33
Compare
Choose a tag to compare

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`

11 Jan 07:15
Compare
Choose a tag to compare

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->

10 Jan 16:58
Compare
Choose a tag to compare

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->

01 Jan 16:25
Compare
Choose a tag to compare

Fix

  • list-> not updated during :on-click syntax update

support `(list-> props children)`

01 Jan 09:48
Compare
Choose a tag to compare

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

22 Dec 16:26
Compare
Choose a tag to compare

Refactor

  • now DOM ops are represented with numbers. no sigh of becoming faster though.

Support :on-click syntax

20 Dec 16:37
Compare
Choose a tag to compare

Feature

  • Support :on-click syntax. This is a syntax sugar with bad performance.

Fix textarea value in SSR

04 Dec 03:20
Compare
Choose a tag to compare

Fix

  • during SSR, attribute value= does not work, use innerHTML= instead.