@cycle-robot-drivers/screen
Advanced tools
Comparing version 0.0.23 to 0.0.24
@@ -22,3 +22,3 @@ export declare enum ExpressCommandType { | ||
* @return {Driver} the TabletFace Cycle.js driver function. It takes a stream | ||
* of `Command` and returns `DOM`, `react`, animationFinish`, and `load` streams. | ||
* of `Command` and returns `DOM`, animationFinish`, and `load` streams. | ||
*/ | ||
@@ -36,5 +36,4 @@ export declare function makeTabletFaceDriver({styles: {faceColor, faceHeight, faceWidth, eyeColor, eyeSize, eyelidColor}}?: { | ||
DOM: any; | ||
react: any; | ||
animationFinish: any; | ||
load: any; | ||
}; |
@@ -8,3 +8,2 @@ "use strict"; | ||
var dom_1 = require("@cycle/dom"); | ||
var react_dom_1 = require("@cycle/react-dom"); | ||
var adapt_1 = require("@cycle/run/lib/adapt"); | ||
@@ -230,3 +229,3 @@ // adapted from | ||
* @return {Driver} the TabletFace Cycle.js driver function. It takes a stream | ||
* of `Command` and returns `DOM`, `react`, animationFinish`, and `load` streams. | ||
* of `Command` and returns `DOM`, animationFinish`, and `load` streams. | ||
*/ | ||
@@ -332,29 +331,26 @@ function makeTabletFaceDriver(_a) { | ||
}); | ||
function createVDOM(div) { | ||
return xstream_1.default.of(div("#" + id + ".face", { style: styles.face }, [ | ||
div('.eye.left', { | ||
style: Object.assign({}, styles.eye, styles.left), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: Object.assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: Object.assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
div('.eye.right', { | ||
style: Object.assign({}, styles.eye, styles.right), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: Object.assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: Object.assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
])); | ||
} | ||
var vdom$ = xstream_1.default.of(dom_1.div("#" + id + ".face", { style: styles.face }, [ | ||
dom_1.div('.eye.left', { | ||
style: Object.assign({}, styles.eye, styles.left), | ||
}, [ | ||
dom_1.div('.eyelid.upper', { | ||
style: Object.assign({}, styles.eyelid, styles.upper), | ||
}), | ||
dom_1.div('.eyelid.lower', { | ||
style: Object.assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
dom_1.div('.eye.right', { | ||
style: Object.assign({}, styles.eye, styles.right), | ||
}, [ | ||
dom_1.div('.eyelid.upper', { | ||
style: Object.assign({}, styles.eyelid, styles.upper), | ||
}), | ||
dom_1.div('.eyelid.lower', { | ||
style: Object.assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
])); | ||
return { | ||
DOM: adapt_1.adapt(createVDOM(dom_1.div)), | ||
react: adapt_1.adapt(createVDOM(react_dom_1.div)), | ||
DOM: adapt_1.adapt(vdom$), | ||
animationFinish: adapt_1.adapt(animationFinish$$.flatten()), | ||
@@ -361,0 +357,0 @@ load: adapt_1.adapt(load$), |
@@ -22,3 +22,3 @@ export declare enum ExpressCommandType { | ||
* @return {Driver} the TabletFace Cycle.js driver function. It takes a stream | ||
* of `Command` and returns `DOM`, `react`, animationFinish`, and `load` streams. | ||
* of `Command` and returns `DOM`, animationFinish`, and `load` streams. | ||
*/ | ||
@@ -36,5 +36,4 @@ export declare function makeTabletFaceDriver({styles: {faceColor, faceHeight, faceWidth, eyeColor, eyeSize, eyelidColor}}?: { | ||
DOM: any; | ||
react: any; | ||
animationFinish: any; | ||
load: any; | ||
}; |
import xs from 'xstream'; | ||
import { div as cdiv } from '@cycle/dom'; | ||
import { div as rdiv } from '@cycle/react-dom'; | ||
import { div } from '@cycle/dom'; | ||
import { adapt } from '@cycle/run/lib/adapt'; | ||
@@ -224,3 +223,3 @@ // adapted from | ||
* @return {Driver} the TabletFace Cycle.js driver function. It takes a stream | ||
* of `Command` and returns `DOM`, `react`, animationFinish`, and `load` streams. | ||
* of `Command` and returns `DOM`, animationFinish`, and `load` streams. | ||
*/ | ||
@@ -326,29 +325,26 @@ export function makeTabletFaceDriver(_a) { | ||
}); | ||
function createVDOM(div) { | ||
return xs.of(div("#" + id + ".face", { style: styles.face }, [ | ||
div('.eye.left', { | ||
style: Object.assign({}, styles.eye, styles.left), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: Object.assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: Object.assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
div('.eye.right', { | ||
style: Object.assign({}, styles.eye, styles.right), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: Object.assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: Object.assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
])); | ||
} | ||
var vdom$ = xs.of(div("#" + id + ".face", { style: styles.face }, [ | ||
div('.eye.left', { | ||
style: Object.assign({}, styles.eye, styles.left), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: Object.assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: Object.assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
div('.eye.right', { | ||
style: Object.assign({}, styles.eye, styles.right), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: Object.assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: Object.assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
])); | ||
return { | ||
DOM: adapt(createVDOM(cdiv)), | ||
react: adapt(createVDOM(rdiv)), | ||
DOM: adapt(vdom$), | ||
animationFinish: adapt(animationFinish$$.flatten()), | ||
@@ -355,0 +351,0 @@ load: adapt(load$), |
{ | ||
"name": "@cycle-robot-drivers/screen", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Michael Jae-Yoon Chung", |
@@ -105,5 +105,5 @@ <!-- This README.md is automatically generated. Edit the JSDoc comments in source code or the md files in docs/readmes/. --> | ||
* **Driver** the TabletFace Cycle.js driver function. It takes a stream of `Command` and returns `DOM`, `react`, animationFinish`, and `load` streams. | ||
* **Driver** the TabletFace Cycle.js driver function. It takes a stream of `Command` and returns `DOM`, animationFinish`, and `load` streams. | ||
<!-- End src/makeTabletFaceDriver.ts --> | ||
import xs from 'xstream'; | ||
import {Stream} from 'xstream'; | ||
import {div as cdiv} from '@cycle/dom'; | ||
import {div as rdiv} from '@cycle/react-dom'; | ||
import {div} from '@cycle/dom'; | ||
import {adapt} from '@cycle/run/lib/adapt'; | ||
@@ -283,3 +282,3 @@ | ||
* @return {Driver} the TabletFace Cycle.js driver function. It takes a stream | ||
* of `Command` and returns `DOM`, `react`, animationFinish`, and `load` streams. | ||
* of `Command` and returns `DOM`, animationFinish`, and `load` streams. | ||
*/ | ||
@@ -411,32 +410,29 @@ export function makeTabletFaceDriver({ | ||
function createVDOM(div) { | ||
return xs.of( | ||
div(`#${id}.face`, {style: styles.face}, [ | ||
div('.eye.left', { | ||
style: (Object as any).assign({}, styles.eye, styles.left), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: (Object as any).assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: (Object as any).assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
div('.eye.right', { | ||
style: (Object as any).assign({}, styles.eye, styles.right), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: (Object as any).assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: (Object as any).assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
]) | ||
); | ||
} | ||
const vdom$ = xs.of( | ||
div(`#${id}.face`, {style: styles.face}, [ | ||
div('.eye.left', { | ||
style: (Object as any).assign({}, styles.eye, styles.left), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: (Object as any).assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: (Object as any).assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
div('.eye.right', { | ||
style: (Object as any).assign({}, styles.eye, styles.right), | ||
}, [ | ||
div('.eyelid.upper', { | ||
style: (Object as any).assign({}, styles.eyelid, styles.upper), | ||
}), | ||
div('.eyelid.lower', { | ||
style: (Object as any).assign({}, styles.eyelid, styles.lower), | ||
}), | ||
]), | ||
]) | ||
); | ||
return { | ||
DOM: adapt(createVDOM(cdiv)), | ||
react: adapt(createVDOM(rdiv)), | ||
DOM: adapt(vdom$), | ||
animationFinish: adapt(animationFinish$$.flatten()), | ||
@@ -443,0 +439,0 @@ load: adapt(load$), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
206247
3888