@cycle-robot-drivers/screen
Advanced tools
Comparing version 0.0.26 to 0.0.27
@@ -59,11 +59,12 @@ "use strict"; | ||
fontFamily: 'helvetica', | ||
fontSize: '3em', | ||
fontSize: '12.5vmin', | ||
fontWeight: 'lighter', | ||
}, | ||
button: { | ||
margin: '0 0.25em 0 0.25em', | ||
margin: '0 0.25em 0.25em 0.25em', | ||
backgroundColor: 'transparent', | ||
border: '0.05em solid black', | ||
borderRadius: '0.25em', | ||
fontFamily: 'helvetica', | ||
fontSize: '2.5em', | ||
fontSize: '10vmin', | ||
fontWeight: 'lighter', | ||
@@ -70,0 +71,0 @@ }, |
"use strict"; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -257,5 +249,8 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
position: 'absolute', | ||
width: '100vw', | ||
width: '96vw', | ||
zIndex: 1, | ||
margin: '1em', | ||
margin: '2vw', | ||
backgroundColor: 'white', | ||
border: '0.2vmin solid lightgray', | ||
borderRadius: '3vmin 3vmin 3vmin 3vmin', | ||
}, | ||
@@ -265,3 +260,4 @@ bubble: { | ||
padding: '1em', | ||
maxWidth: '90%', | ||
maxWidth: '100%', | ||
textAlign: 'center', | ||
}, | ||
@@ -272,6 +268,17 @@ }; | ||
var robotVTree = _a[0], humanVTree = _a[1]; | ||
return dom_1.div({ style: styles.outer }, [ | ||
dom_1.div({ style: styles.bubble }, [dom_1.span(robotVTree)]), | ||
dom_1.div({ style: __assign({}, styles.bubble, { textAlign: 'right' }) }, [dom_1.span(humanVTree)]), | ||
]); | ||
if (robotVTree === "" && humanVTree === "") { | ||
return ""; | ||
} | ||
else if (robotVTree !== "" && humanVTree === "") { | ||
return dom_1.div({ style: styles.outer }, dom_1.div({ style: styles.bubble }, dom_1.span(robotVTree))); | ||
} | ||
else if (robotVTree !== "" && humanVTree === "") { | ||
return dom_1.div({ style: styles.outer }, dom_1.div({ style: styles.bubble }, dom_1.span(humanVTree))); | ||
} | ||
else { | ||
return dom_1.div({ style: styles.outer }, [ | ||
dom_1.div({ style: styles.bubble }, [dom_1.span(robotVTree)]), | ||
dom_1.div({ style: styles.bubble }, [dom_1.span(humanVTree)]), | ||
]); | ||
} | ||
}); | ||
@@ -278,0 +285,0 @@ return { |
@@ -54,11 +54,12 @@ import xs from 'xstream'; | ||
fontFamily: 'helvetica', | ||
fontSize: '3em', | ||
fontSize: '12.5vmin', | ||
fontWeight: 'lighter', | ||
}, | ||
button: { | ||
margin: '0 0.25em 0 0.25em', | ||
margin: '0 0.25em 0.25em 0.25em', | ||
backgroundColor: 'transparent', | ||
border: '0.05em solid black', | ||
borderRadius: '0.25em', | ||
fontFamily: 'helvetica', | ||
fontSize: '2.5em', | ||
fontSize: '10vmin', | ||
fontWeight: 'lighter', | ||
@@ -65,0 +66,0 @@ }, |
@@ -1,9 +0,1 @@ | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
import xs from 'xstream'; | ||
@@ -252,5 +244,8 @@ import { adapt } from '@cycle/run/lib/adapt'; | ||
position: 'absolute', | ||
width: '100vw', | ||
width: '96vw', | ||
zIndex: 1, | ||
margin: '1em', | ||
margin: '2vw', | ||
backgroundColor: 'white', | ||
border: '0.2vmin solid lightgray', | ||
borderRadius: '3vmin 3vmin 3vmin 3vmin', | ||
}, | ||
@@ -260,3 +255,4 @@ bubble: { | ||
padding: '1em', | ||
maxWidth: '90%', | ||
maxWidth: '100%', | ||
textAlign: 'center', | ||
}, | ||
@@ -267,6 +263,17 @@ }; | ||
var robotVTree = _a[0], humanVTree = _a[1]; | ||
return div({ style: styles.outer }, [ | ||
div({ style: styles.bubble }, [span(robotVTree)]), | ||
div({ style: __assign({}, styles.bubble, { textAlign: 'right' }) }, [span(humanVTree)]), | ||
]); | ||
if (robotVTree === "" && humanVTree === "") { | ||
return ""; | ||
} | ||
else if (robotVTree !== "" && humanVTree === "") { | ||
return div({ style: styles.outer }, div({ style: styles.bubble }, span(robotVTree))); | ||
} | ||
else if (robotVTree !== "" && humanVTree === "") { | ||
return div({ style: styles.outer }, div({ style: styles.bubble }, span(humanVTree))); | ||
} | ||
else { | ||
return div({ style: styles.outer }, [ | ||
div({ style: styles.bubble }, [span(robotVTree)]), | ||
div({ style: styles.bubble }, [span(humanVTree)]), | ||
]); | ||
} | ||
}); | ||
@@ -273,0 +280,0 @@ return { |
{ | ||
"name": "@cycle-robot-drivers/screen", | ||
"version": "0.0.26", | ||
"description": "", | ||
"version": "0.0.27", | ||
"description": "Cycle.js drivers for rendering a robot face", | ||
"author": "Michael Jae-Yoon Chung", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -98,11 +98,12 @@ import xs from 'xstream'; | ||
fontFamily: 'helvetica', | ||
fontSize: '3em', | ||
fontSize: '12.5vmin', | ||
fontWeight: 'lighter', | ||
}, | ||
button: { | ||
margin: '0 0.25em 0 0.25em', | ||
margin: '0 0.25em 0.25em 0.25em', | ||
backgroundColor: 'transparent', | ||
border: '0.05em solid black', | ||
borderRadius: '0.25em', | ||
fontFamily: 'helvetica', | ||
fontSize: '2.5em', | ||
fontSize: '10vmin', | ||
fontWeight: 'lighter', | ||
@@ -109,0 +110,0 @@ }, |
@@ -179,4 +179,4 @@ import xs from 'xstream'; | ||
}), | ||
[InputType.RESULT]: (variables, inputValue) => | ||
isEqual(inputValue.status.goal_id, variables.goal_id) | ||
[InputType.RESULT]: (variables, inputValue) => | ||
isEqual(inputValue.status.goal_id, variables.goal_id) | ||
&& typeof inputValue.result === 'string' ? { // CHOICES SUCCEEDED | ||
@@ -261,5 +261,5 @@ state: State.DONE, | ||
* TwoSpeechbubbles, Robot and Human, action component. | ||
* | ||
* | ||
* @param sources | ||
* | ||
* | ||
* * goal: a stream of `null` (as "cancel"), | ||
@@ -270,8 +270,8 @@ * `{type: 'SET_MESSAGE', value: 'Hello world'}` or `'Hello world'` (as | ||
* * DOM: Cycle.js [DOMSource](https://cycle.js.org/api/dom.html). | ||
* | ||
* | ||
* @return sinks | ||
* | ||
* | ||
* * DOM: a stream of virtual DOM objects, i.e, [Snabbdom “VNode” objects](https://github.com/snabbdom/snabbdom). | ||
* * result: a stream of action results. | ||
* | ||
* | ||
*/ | ||
@@ -317,5 +317,8 @@ | ||
position: 'absolute', | ||
width: '100vw', | ||
width: '96vw', | ||
zIndex: 1, // face has zIndex === 0, eyes has zIndex === 1 | ||
margin: '1em', | ||
margin: '2vw', | ||
backgroundColor: 'white', | ||
border: '0.2vmin solid lightgray', | ||
borderRadius: '3vmin 3vmin 3vmin 3vmin', | ||
}, | ||
@@ -325,3 +328,4 @@ bubble: { | ||
padding: '1em', | ||
maxWidth: '90%', | ||
maxWidth: '100%', | ||
textAlign: 'center', | ||
}, | ||
@@ -331,6 +335,18 @@ }; | ||
.map(([robotVTree, humanVTree]) => { | ||
return div({style: styles.outer}, [ | ||
div({style: styles.bubble}, [span(robotVTree)]), | ||
div({style: {...styles.bubble, textAlign: 'right'}}, [span(humanVTree)]), | ||
]) | ||
if (robotVTree === "" && humanVTree === "") { | ||
return ""; | ||
} else if (robotVTree !== "" && humanVTree === "") { | ||
return div({style: styles.outer}, | ||
div({style: styles.bubble}, span(robotVTree)) | ||
); | ||
} else if (robotVTree !== "" && humanVTree === "") { | ||
return div({style: styles.outer}, | ||
div({style: styles.bubble}, span(humanVTree)) | ||
); | ||
} else { | ||
return div({style: styles.outer}, [ | ||
div({style: styles.bubble}, [span(robotVTree)]), | ||
div({style: styles.bubble}, [span(humanVTree)]), | ||
]); | ||
} | ||
}); | ||
@@ -337,0 +353,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
209889
3943