Comparing version
1.0.0 / 2015-12-04 | ||
================== | ||
* Add load event | ||
* fix counter example | ||
* Fixed bug with adding events | ||
* Add HTML5 media events | ||
* add babel 6 instructions yet point back to babel@5 | ||
* alias npm test script to make test for sake of convention | ||
* add to install guide using webpack | ||
* Don't treat number as a falsy attribute | ||
* Add failing test for input values | ||
* getting examples working using duo-serve | ||
0.5.6 / 2015-09-21 | ||
@@ -144,3 +158,3 @@ ================== | ||
* Fixed: Fixed issue with components rendered as root nodes. | ||
* Fixed: Fixed issue with components rendered as root nodes. | ||
* New: initialState now takes the props as a param | ||
@@ -350,3 +364,3 @@ * New: afterMount, afterRender and event handlers can now return a promise. This means you can use ES7 async functions to have pure lifecycle functions too. | ||
* Breaking change: Updated the scene/renderer API to allow for more powerful plugins. The Component API is now decoupled from the renderer. | ||
* Breaking change: Updated the scene/renderer API to allow for more powerful plugins. The Component API is now decoupled from the renderer. | ||
* Tests now using ES6 | ||
@@ -453,3 +467,3 @@ * Fixed beforeMount not firing with renderString | ||
* Add .send and .onMessage methods. You can call this.send(name, payload) within components and listen for those events on the scene with scene.onMessage(name, fn); | ||
* Add .send and .onMessage methods. You can call this.send(name, payload) within components and listen for those events on the scene with scene.onMessage(name, fn); | ||
@@ -456,0 +470,0 @@ 0.0.13 / 2015-01-20 |
@@ -6,3 +6,6 @@ /** | ||
module.exports = { | ||
onAbort: 'abort', | ||
onBlur: 'blur', | ||
onCanPlay: 'canplay', | ||
onCanPlayThrough: 'canplaythrough', | ||
onChange: 'change', | ||
@@ -22,2 +25,6 @@ onClick: 'click', | ||
onDrop: 'drop', | ||
onDurationChange: 'durationchange', | ||
onEmptied: 'emptied', | ||
onEncrypted: 'encrypted', | ||
onEnded: 'ended', | ||
onError: 'error', | ||
@@ -30,2 +37,10 @@ onFocus: 'focus', | ||
onKeyUp: 'keyup', | ||
onLoad: 'load', | ||
onLoadedData: 'loadeddata', | ||
onLoadedMetadata: 'loadedmetadata', | ||
onLoadStart: 'loadstart', | ||
onPause: 'pause', | ||
onPlay: 'play', | ||
onPlaying: 'playing', | ||
onProgress: 'progress', | ||
onMouseDown: 'mousedown', | ||
@@ -39,5 +54,11 @@ onMouseEnter: 'mouseenter', | ||
onPaste: 'paste', | ||
onRateChange: 'ratechange', | ||
onReset: 'reset', | ||
onScroll: 'scroll', | ||
onSeeked: 'seeked', | ||
onSeeking: 'seeking', | ||
onSubmit: 'submit', | ||
onStalled: 'stalled', | ||
onSuspend: 'suspend', | ||
onTimeUpdate: 'timeupdate', | ||
onTouchCancel: 'touchcancel', | ||
@@ -47,3 +68,5 @@ onTouchEnd: 'touchend', | ||
onTouchStart: 'touchstart', | ||
onVolumeChange: 'volumechange', | ||
onWaiting: 'waiting', | ||
onWheel: 'wheel' | ||
} |
@@ -21,2 +21,2 @@ /** | ||
exports.renderString = require('./stringify') | ||
exports.renderString = require('./stringify') |
@@ -125,4 +125,4 @@ /** | ||
function onupdate (name, data) { | ||
if (!connections[name]) return; | ||
connections[name].forEach(function(update) { | ||
if (!connections[name]) return | ||
connections[name].forEach(function (update) { | ||
update(data) | ||
@@ -179,3 +179,3 @@ }) | ||
removeAllEvents(entityId) | ||
var componentEntities = components[entityId].entities; | ||
var componentEntities = components[entityId].entities | ||
delete componentEntities[entityId] | ||
@@ -285,3 +285,2 @@ delete components[entityId] | ||
isRendering = false | ||
} | ||
@@ -547,3 +546,2 @@ | ||
if (hasKeys) { | ||
// Removals | ||
@@ -612,6 +610,4 @@ forEach(leftKeys, function (leftNode, key) { | ||
}) | ||
} else { | ||
var maxLength = Math.max(prev.children.length, next.children.length) | ||
// Now diff all of the nodes that don't have keys | ||
@@ -748,6 +744,4 @@ for (var i = 0; i < maxLength; i++) { | ||
} else { | ||
// Just remove the text node | ||
if (!isElement(el)) return el && el.parentNode.removeChild(el) | ||
// Then we need to find any components within this | ||
@@ -848,3 +842,3 @@ // branch and unmount them. | ||
function setAttribute (entityId, path, el, name, value) { | ||
if (!value) { | ||
if (!value && typeof value !== 'number') { | ||
removeAttribute(entityId, path, el, name) | ||
@@ -899,2 +893,3 @@ return | ||
el.innerHTML = '' | ||
/* falls through */ | ||
case 'value': | ||
@@ -1050,3 +1045,3 @@ setElementValue(el, null) | ||
function registerEntity(entity) { | ||
function registerEntity (entity) { | ||
var component = entity.component | ||
@@ -1067,3 +1062,3 @@ // all entities for this component type. | ||
function registerSources(entity) { | ||
function registerSources (entity) { | ||
var component = components[entity.id] | ||
@@ -1176,5 +1171,5 @@ // get 'class-level' sources. | ||
if (entity) { | ||
return fn.call(null, e, entity.context, setState(entity)) | ||
return fn(e, entity.context, setState(entity)) | ||
} else { | ||
return fn.call(null, e) | ||
return fn(e) | ||
} | ||
@@ -1316,3 +1311,3 @@ }) | ||
function canSelectText (el) { | ||
return el.tagName === 'INPUT' && ['text','search','password','tel','url'].indexOf(el.type) > -1 | ||
return el.tagName === 'INPUT' && ['text', 'search', 'password', 'tel', 'url'].indexOf(el.type) > -1 | ||
} |
@@ -26,3 +26,3 @@ var defaults = require('object-defaults') | ||
var state = component.initialState ? component.initialState(props) : {} | ||
props.children = children; | ||
props.children = children | ||
@@ -123,12 +123,12 @@ for (var name in propTypes) { | ||
switch (valueType) { | ||
case 'string': | ||
case 'number': | ||
return true; | ||
case 'string': | ||
case 'number': | ||
return true | ||
case 'boolean': | ||
return value; | ||
case 'boolean': | ||
return value | ||
default: | ||
return false; | ||
default: | ||
return false | ||
} | ||
} |
{ | ||
"name": "deku", | ||
"version": "0.5.6", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
@@ -9,29 +9,36 @@ "repository": "dekujs/deku", | ||
"devDependencies": { | ||
"babelify": "^6.1.1", | ||
"bfc": "~0.3.1", | ||
"browserify": "^11.0.0", | ||
"bump": "*", | ||
"envify": "^3.4.0", | ||
"hihat": "^2.4.0", | ||
"minify": "^1.4.11", | ||
"snazzy": "^1.0.1", | ||
"standard": "^4.5.4", | ||
"tap-dev-tool": "^1.3.0", | ||
"tape": "^4.0.1", | ||
"trigger-event": "^1.0.0", | ||
"virtual-element": "^1.2.0", | ||
"zuul": "^3.2.0" | ||
"babelify": "6.4.0", | ||
"bfc": "0.3.1", | ||
"browserify": "12.0.1", | ||
"bump": "0.2.5", | ||
"duo-babel": "^6.0.0", | ||
"duo-serve": "^0.14.5", | ||
"envify": "3.4.0", | ||
"express": "^4.13.3", | ||
"hihat": "2.5.0", | ||
"minify": "2.0.1", | ||
"snazzy": "2.0.1", | ||
"standard": "5.3.1", | ||
"tap-dev-tool": "1.3.0", | ||
"tape": "4.2.2", | ||
"trigger-event": "1.0.2", | ||
"virtual-element": "1.2.0", | ||
"zuul": "3.7.2" | ||
}, | ||
"dependencies": { | ||
"component-emitter": "^1.1.3", | ||
"component-raf": "^1.2.0", | ||
"component-type": "^1.1.0", | ||
"fast.js": "^0.1.1", | ||
"get-uid": "^1.0.1", | ||
"is-dom": "^1.0.5", | ||
"is-svg-attribute": "^1.0.2", | ||
"is-svg-element": "^1.0.1", | ||
"object-defaults": "^0.1.0", | ||
"object-path": "^0.9.2" | ||
"component-emitter": "1.2.0", | ||
"component-raf": "1.2.0", | ||
"component-type": "1.2.0", | ||
"fast.js": "0.1.1", | ||
"get-uid": "1.0.1", | ||
"is-dom": "1.0.5", | ||
"is-svg-attribute": "1.0.2", | ||
"is-svg-element": "1.0.1", | ||
"object-defaults": "0.1.0", | ||
"object-path": "0.9.2" | ||
}, | ||
"scripts": { | ||
"start": "node docs/examples/server.js", | ||
"test": "make test" | ||
} | ||
} |
# Deku | ||
[](https://www.npmjs.com/package/deku) [](https://circleci.com/gh/dekujs/deku) [](https://github.com/feross/standard) [](https://dekujs.herokuapp.com) | ||
[](https://www.npmjs.com/package/deku) [](https://circleci.com/gh/dekujs/deku) [](https://github.com/feross/standard) [](https://discord.gg/0gNkyCAVkDYsBaFe) | ||
@@ -33,3 +33,3 @@ A library for creating UI components using virtual DOM as an alternative to [React](https://github.com/facebook/react). Deku has a smaller footprint (~6kb), a functional API, and doesn't support legacy browsers. | ||
**Heads up:** These examples are written using ES2015 syntax. You'll want to make sure you're familiar with modules and destructuring to follow along. | ||
**Heads up:** These examples are written using ES2015 syntax. You'll want to make sure you're familiar with [modules](https://babeljs.io/docs/learn-es2015/#modules) and [destructuring](https://babeljs.io/docs/learn-es2015/#destructuring) to follow along. | ||
@@ -72,3 +72,3 @@ Virtual elements are plain objects that represent real DOM elements: | ||
```js | ||
import {render,app} from 'deku' | ||
import {render,tree} from 'deku' | ||
@@ -75,0 +75,0 @@ // Define our custom element. The render method should |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
175165
41.44%5093
44.77%1
-50%17
21.43%+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated