Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
26
gaia/tv_apps/smart-home/bower_components/smart-dialog/.bower.json
vendored
Executable file
26
gaia/tv_apps/smart-home/bower_components/smart-dialog/.bower.json
vendored
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "smart-dialog",
|
||||
"homepage": "https://github.com/smart-components/smart-dialog",
|
||||
"main": "script.js",
|
||||
"license": "MPL",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests",
|
||||
"examples",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"_release": "8910d99b8f",
|
||||
"_resolution": {
|
||||
"type": "branch",
|
||||
"branch": "master",
|
||||
"commit": "8910d99b8fb7c624b32ac494fea63c0898e886df"
|
||||
},
|
||||
"_source": "git://github.com/smart-components/smart-dialog.git",
|
||||
"_target": "*",
|
||||
"_originalSource": "smart-components/smart-dialog",
|
||||
"_direct": true
|
||||
}
|
||||
17
gaia/tv_apps/smart-home/bower_components/smart-dialog/bower.json
vendored
Executable file
17
gaia/tv_apps/smart-home/bower_components/smart-dialog/bower.json
vendored
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "smart-dialog",
|
||||
"version": "0.0.0",
|
||||
"homepage": "https://github.com/smart-components/smart-dialog",
|
||||
"main": "script.js",
|
||||
"license": "MPL",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests",
|
||||
"examples",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
]
|
||||
}
|
||||
123
gaia/tv_apps/smart-home/bower_components/smart-dialog/script.js
vendored
Executable file
123
gaia/tv_apps/smart-home/bower_components/smart-dialog/script.js
vendored
Executable file
|
|
@ -0,0 +1,123 @@
|
|||
/**
|
||||
* Smart-Dialog
|
||||
* - Event:
|
||||
* 1. will-open
|
||||
* 2. opened
|
||||
* 3. will-close
|
||||
* 4. closed
|
||||
* - API:
|
||||
* 1. open - open a smart-dialog: closed -> opening -> opened
|
||||
* 2. close - close a smart-dialog: opened -> closing -> closed
|
||||
* - Attribute:
|
||||
* 1. title - title of the smart-dialog
|
||||
* 2. esc-close - close dialog when ESC key is clicked (default true).
|
||||
* Default scale: 1920x1080 (2*sqrt(960*960 + 1080*1080) / 20 = 144.5)
|
||||
*/
|
||||
|
||||
window.SmartDialog = (function(win) {
|
||||
'use strict';
|
||||
|
||||
// The value of openDuration and closeDuration should be the same as
|
||||
// transitionDuration in opening and closing css class.
|
||||
const openDuration = 1000;
|
||||
const closeDuration = 650;
|
||||
|
||||
// Extend from the HTMLElement prototype
|
||||
var proto = Object.create(HTMLElement.prototype);
|
||||
|
||||
proto.createdCallback = function sd_createdCallback() {
|
||||
this.addEventListener('transitionend', this);
|
||||
document.addEventListener('keyup', this);
|
||||
this.transitionTimer = null;
|
||||
this.classList.add('closed');
|
||||
if (this.hasAttribute('background-color')) {
|
||||
this.style.backgroundColor = this.getAttribute('background-color');
|
||||
}
|
||||
};
|
||||
|
||||
proto._onOpened = function sd_onOpened() {
|
||||
this.classList.remove('opening');
|
||||
this.classList.add('opened');
|
||||
this.fireEvent('opened');
|
||||
};
|
||||
|
||||
proto._onClosed = function sd_onClosed() {
|
||||
this.classList.remove('closing');
|
||||
this.classList.add('closed');
|
||||
this.fireEvent('closed');
|
||||
};
|
||||
|
||||
proto.open = function sd_open() {
|
||||
if (this.classList.contains('opened') ||
|
||||
this.classList.contains('opening')) {
|
||||
return;
|
||||
}
|
||||
this.fireEvent('will-open');
|
||||
this.classList.remove('closing');
|
||||
this.classList.remove('closed');
|
||||
this.classList.add('opening');
|
||||
// handle the case when transitionend event is not fired
|
||||
clearTimeout(this.transitionTimer);
|
||||
this.transitionTimer = setTimeout(function() {
|
||||
this._onOpened();
|
||||
this.transitionTimer = null;
|
||||
}.bind(this), openDuration);
|
||||
};
|
||||
|
||||
proto.close = function sd_close() {
|
||||
if (this.classList.contains('closed') ||
|
||||
this.classList.contains('closing')) {
|
||||
return;
|
||||
}
|
||||
this.fireEvent('will-close');
|
||||
this.classList.remove('opening');
|
||||
this.classList.remove('opened');
|
||||
this.classList.add('closing');
|
||||
// handle the case when transitionend event is not fired
|
||||
clearTimeout(this.transitionTimer);
|
||||
this.transitionTimer = setTimeout(function() {
|
||||
this._onClosed();
|
||||
this.transitionTimer = null;
|
||||
}.bind(this), closeDuration);
|
||||
};
|
||||
|
||||
proto.handleEvent = function sd_handleEvent(evt) {
|
||||
|
||||
switch(evt.type) {
|
||||
case 'transitionend':
|
||||
if (evt.target === this && this.transitionTimer) {
|
||||
if (this.classList.contains('opening')) {
|
||||
this._onOpened();
|
||||
} else if (this.classList.contains('closing')) {
|
||||
this._onClosed();
|
||||
}
|
||||
clearTimeout(this.transitionTimer);
|
||||
this.transitionTimer = null;
|
||||
}
|
||||
break;
|
||||
case 'keyup':
|
||||
// close dialog when Back is triggered
|
||||
if (this.getAttribute('esc-close') != 'false' &&
|
||||
(evt.keyCode === window.KeyEvent.DOM_VK_BACK_SPACE ||
|
||||
evt.key === 'Backspace') &&
|
||||
this.classList.contains('opened')) {
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
this.close();
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
proto.fireEvent = function sd_fireEvent(event, detail) {
|
||||
var evtObject = new CustomEvent(event, {
|
||||
bubbles: false,
|
||||
detail: detail || this
|
||||
});
|
||||
this.dispatchEvent(evtObject);
|
||||
};
|
||||
|
||||
// Register and return the constructor
|
||||
return document.registerElement('smart-dialog', { prototype: proto });
|
||||
})(window);
|
||||
103
gaia/tv_apps/smart-home/bower_components/smart-dialog/style.css
vendored
Executable file
103
gaia/tv_apps/smart-home/bower_components/smart-dialog/style.css
vendored
Executable file
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
* Smart-Dialog
|
||||
* - State:
|
||||
* 1. closed
|
||||
* 2. opening
|
||||
* 3. opened - content visible
|
||||
* 4. closing
|
||||
* Default scale: 1920x1080 (2*sqrt(960*960 + 1080*1080) / 20 = 144.5)
|
||||
*/
|
||||
|
||||
smart-dialog {
|
||||
position: fixed;
|
||||
z-index: 2147483647;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
smart-dialog:before {
|
||||
content: attr(title);
|
||||
display: block;
|
||||
margin-top: 5rem;
|
||||
margin-left: 7.6rem;
|
||||
font-family: "Fira Sans";
|
||||
font-size: 5.4rem;
|
||||
font-style: italic;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
smart-dialog:after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: fixed;
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
top: calc(100% - 1rem);
|
||||
left: calc(50% - 1rem);
|
||||
background-color: rgba(0, 0, 0, 0.9);
|
||||
transition: none;
|
||||
transform: scale(20);
|
||||
}
|
||||
|
||||
smart-dialog.closed > *,
|
||||
smart-dialog.closing > *,
|
||||
smart-dialog.opening > *,
|
||||
smart-dialog.closed:before,
|
||||
smart-dialog.closing:before,
|
||||
smart-dialog.opening:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
smart-dialog.closed {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
smart-dialog.opened {
|
||||
background-color: rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
|
||||
smart-dialog.opened:after {
|
||||
visibility: hidden;
|
||||
border-radius: 50%;
|
||||
transform: scale(144.5);
|
||||
}
|
||||
|
||||
smart-dialog.opening:after {
|
||||
border-radius: 50%;
|
||||
transform: scale(144.5);
|
||||
/* transitionDuration should be the same as openDuration variable in script */
|
||||
transition: transform 1s cubic-bezier(0, 0, 0 ,1);
|
||||
}
|
||||
|
||||
smart-dialog.closing:after {
|
||||
border-radius: 50%;
|
||||
transform: scale(20);
|
||||
/* transitionDuration should be the same as closeDuration variable in script */
|
||||
transition: transform 0.65s cubic-bezier(0.6, 0, 1 ,1);
|
||||
}
|
||||
|
||||
/* 1280x800 for flatfish */
|
||||
@media (width: 1280px) and (height: 800px) {
|
||||
smart-dialog:after,
|
||||
smart-dialog.closing:after {
|
||||
transform: scale(7.5);
|
||||
}
|
||||
|
||||
smart-dialog.opening:after {
|
||||
transform: scale(102.5);
|
||||
}
|
||||
}
|
||||
|
||||
/* 800x1280 for flatfish vertical */
|
||||
@media (width: 800px) and (height: 1280px) {
|
||||
smart-dialog:after,
|
||||
smart-dialog.closing:after {
|
||||
transform: scale(8.3);
|
||||
}
|
||||
|
||||
smart-dialog.opening:after {
|
||||
transform: scale(134);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue