Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deku

Package Overview
Dependencies
Maintainers
3
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deku - npm Package Compare versions

Comparing version 0.5.6 to 1.0.0

20

History.md
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'
}

2

lib/index.js

@@ -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
[![version](https://img.shields.io/npm/v/deku.svg?style=flat-square)](https://www.npmjs.com/package/deku) [![Circle CI](https://img.shields.io/circleci/project/BrightFlair/PHP.Gt.svg?style=flat-square)](https://circleci.com/gh/dekujs/deku) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) [![Slack](https://img.shields.io/badge/Slack-Join%20Chat%20→-blue.svg?style=flat-square)](https://dekujs.herokuapp.com)
[![version](https://img.shields.io/npm/v/deku.svg?style=flat-square)](https://www.npmjs.com/package/deku) [![Circle CI](https://img.shields.io/circleci/project/BrightFlair/PHP.Gt.svg?style=flat-square)](https://circleci.com/gh/dekujs/deku) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) [![Chat](https://img.shields.io/badge/Discord-Join%20Chat%20→-blue.svg?style=flat-square)](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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc