Skip to content

Releases: taijiweb/domcom

Domcom 0.8.4

22 Dec 11:18
Compare
Choose a tag to compare
  • document update

domcom 0.8.0-- based on React

19 Dec 13:13
Compare
Choose a tag to compare

Now Domcom is based on React
this version of domcom is a whole rewrite

  • the most important api is component = dc(config), where config is object like{data, view, ...}
  • below is the key api to use domcom:
    component.mount, component.update, component.unmount, component.watch, component.copy, component.extend
  • see demo and todomvc to learn how to use domcom

domcom v0.5.3

16 Sep 00:49
Compare
Choose a tag to compare

What's new

  • minor upgrade
  • tagName can be changed dynamically and cause to recreate the element
  • can use tagName in attrs to instantiage Tag component

domcom v0.5.2

31 Jul 02:19
Compare
Choose a tag to compare

What's new

  • addEventListenerMap: for oncompositionstart like events, use node.addEventListener(eventName, domEventHandler), instead of node[eventName] = domEventHandler
  • fix a bug caused by missing this.valid = true in List.updateDom
  • use Component.valid, remove Text.textValid

domcom v0.5.1

14 Jun 04:14
Compare
Choose a tag to compare

What's new

  • add api: dc.clean(): remove all components in dc.removingChildren
  • fix bugs in domcom/demo
    wrong renderDom after the component is removed ( check component.removing and component.removed before calling renderDom in component.render())
    the component is not refreshed after switching each3, each4 (caused by wrong component.valid, component.attachValid field)

domcom v0.2.1

29 Mar 07:06
Compare
Choose a tag to compare

What's new

  • some fix and refactor, especially for Component.clone()
  • src/config is removed
  • Component.setReactive: set reaction between component's fields
  • setText for Html and Text component
  • toComponentList is renamed to toComponentArray
  • an universal domEventHandler
  • eventHandlerFromArray is renamed to domEventHandlerFromArray, and is not bound to node
  • classFn.coffee().clone()

domcom v0.2.0

17 Mar 03:12
Compare
Choose a tag to compare

What's new

  • a very big refactor: do not update from top to bottom, directly update the component in renderingMap instead
  • Each component is removed, in favor of the new every, each, funcEacn and mapEach function, which generate watched list component
  • Case component supports to use array as map
  • set attributes by using attr_xxx
  • new api: ListMixin.insertChildBefore, insertAfter;
  • fix bug about Component.destroy
  • rename life time events to willXXXX/didXXXX,
  • make Component.listeners and Tag.events field always be available, avoid to add .on or .bind after component super(...)

domcom v0.1.6

31 Jan 11:44
Compare
Choose a tag to compare

What's new

  • fix a bug in webpack.config, remove the file path in .min.js file
  • stop pass component as the parameter to eventHandlerFromArray, just use "node.component"
  • always emit "attach" event while component to the tree, and "detach" event while removing the component from the tree

domcom v0.1.5

16 Jan 14:01
Compare
Choose a tag to compare

What's new

  • api(new): new api for delegating event: Tag.delegateByHolder, Tag.delegateByComponent, Tag.delegate
  • api(new): dc.error, dc.onerror
  • api(change): rename component event: beforeMount -> mount, afterUnmount -> 'unmount', beforeAttatch -> attach, afterDetach -> detach; remove afterMount
  • api(change): Hmtl component's super class becomes Tag, wrap with div, add Html.text setter, add attrs
  • api(change): Component.renderDom() -> Component.renderDom(oldBaseComponent), delete Component.getBaseComponent
  • api(change): remove Component.setNode and Component.setFirstNode
  • api(change): add BaseComponent.removing field to mark removing, split Component.setParentAndNextNode to setParentNode and setNextNode
  • api(change): api for new If(test, then, else, , merge, recursive), dc.mergeIf, dc.recursiveIf
  • improvement: Tag.propBind, Tag.cssBind: return bound reactive function for Tag props or style props
  • improvement: Tag.prop(propName) and Tag.css(propName) return domValue of props at first, if undefined then return cache value
  • improvement: Component.on, Component.off
  • refactor: split property.coffee to core/property/ folder (classFn, events, style, ...), and move core/prop-util.coffee to core/property/css-arith.coffee
  • refactor: Both Tag and List use ListMixin
  • refactor: remove constructTextLikeComponent for Text, Comment, Html, Cdata, use super(text) directly
  • fix two bug: one in Component.setParentAndNextNode, another one in Component.on
  • fix a bug about List.nextNode

domcom v0.1.4

19 Dec 03:07
Compare
Choose a tag to compare

What's new

  • a group of new utilities: unitAdd, unitSub, unitMul, unitDiv, Tag.cssAdd, Tag.cssSub, Tag.cssMul, Tag.cssDiv
  • add lost minify js back (uglifyjs)