diff --git a/.eslintrc.js b/.eslintrc.js index d27a4e495..da08e5e79 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,11 +2,11 @@ module.exports = { env: { browser: true, es6: true, - jest: true, + jest: true }, extends: 'eslint:recommended', parserOptions: { - "ecmaVersion": 8 + ecmaVersion: 8 }, rules: { 'no-global-assign': 2, @@ -41,6 +41,7 @@ module.exports = { page: true, Prism: true, require: true, + ShadyCSS: true, test: true } }; diff --git a/js/editor.js b/js/editor.js index 95e5f1409..dd5834a1d 100644 --- a/js/editor.js +++ b/js/editor.js @@ -12,8 +12,14 @@ var timer; /** - * Called by the tabbed editor to combine code from all tabs. - * @returns Concatenated code from all tabs + * Called by the tabbed editor to combine code from all tabs in an Object + * @returns Object with code from each tab panel + * Example + * -------- + * { + * cssContent: 'h1 { background-color: #333; }', + * htmlContent: '

Title

' + * } */ function getOutput() { var htmlContent = tabby.editors.html.editor.getValue(); diff --git a/js/lib/webcomponents-hi-sd-ce.js b/js/lib/webcomponents-hi-sd-ce.js new file mode 100644 index 000000000..ef62d23f2 --- /dev/null +++ b/js/lib/webcomponents-hi-sd-ce.js @@ -0,0 +1,177 @@ +(function(){/* + + Copyright (c) 2016 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +'use strict';var p,q="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function ba(){ba=function(){};q.Symbol||(q.Symbol=da)}var da=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}(); +function ea(){ba();var a=q.Symbol.iterator;a||(a=q.Symbol.iterator=q.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(this)}});ea=function(){}}function fa(a){var b=0;return ha(function(){return b]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,A={Aa:function(a,b){a.href&&a.setAttribute("href",A.R(a.getAttribute("href"),b));a.src&&a.setAttribute("src",A.R(a.getAttribute("src"),b));if("style"===a.localName){var c=A.ja(a.textContent,b,Md);a.textContent=A.ja(c,b,Nd)}},ja:function(a,b,c){return a.replace(c, +function(a,c,d,e){a=d.replace(/["']/g,"");b&&(a=A.R(a,b));return c+"'"+a+"'"+e})},R:function(a,b){if(void 0===A.V){A.V=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";A.V="http://a/c%20d"===c.href}catch(Ef){}}if(A.V)return(new URL(a,b)).href;c=A.ra;c||(c=document.implementation.createHTMLDocument("temp"),A.ra=c,c.ea=c.createElement("base"),c.head.appendChild(c.ea),c.da=c.createElement("a"));c.ea.href=b;c.da.href=a;return c.da.href||a}},Mb={async:!0,load:function(a,b,c){if(a)if(a.match(/^data:/)){a= +a.split(",");var d=a[1];d=-1e.status?b(d,a):c(d)};e.send()}else c("error: href must be specified")}},Ia=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent); +k.prototype.loadImports=function(a){var b=this;a=m(a,"link[rel=import]");n(a,function(a){return b.m(a)})};k.prototype.m=function(a){var b=this,c=a.href;if(void 0!==this.a[c]){var d=this.a[c];d&&d.__loaded&&(a.__import=d,this.f(a))}else this.b++,this.a[c]="pending",Mb.load(c,function(a,d){a=b.Ha(a,d||c);b.a[c]=a;b.b--;b.loadImports(a);b.F()},function(){b.a[c]=null;b.b--;b.F()})};k.prototype.Ha=function(a,b){if(!a)return document.createDocumentFragment();Ia&&(a=a.replace(Od,function(a,b,c){return-1=== +a.indexOf("type=")?b+" type=import-disable "+c:a}));var c=document.createElement("template");c.innerHTML=a;if(c.content)a=c.content,l(a);else for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);if(c=a.querySelector("base"))b=A.R(c.getAttribute("href"),b),c.removeAttribute("href");c=m(a,'link[rel=import],link[rel=stylesheet][href][type=import-disable],style:not([type]),link[rel=stylesheet][href]:not([type]),script:not([type]),script[type="application/javascript"],script[type="text/javascript"]'); +var d=0;n(c,function(a){h(a);A.Aa(a,b);a.setAttribute("import-dependency","");"script"===a.localName&&!a.src&&a.textContent&&(a.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(d?"-"+d:"")+".js\n"))),a.textContent="",d++)});return a};k.prototype.F=function(){var a=this;if(!this.b){this.c.disconnect();this.flatten(document);var b=!1,c=!1,d=function(){c&&b&&(a.loadImports(document),a.b||(a.c.observe(document.head,{childList:!0,subtree:!0}), +a.Ea()))};this.Ja(function(){c=!0;d()});this.Ia(function(){b=!0;d()})}};k.prototype.flatten=function(a){var b=this;a=m(a,"link[rel=import]");n(a,function(a){var c=b.a[a.href];(a.__import=c)&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.__import=a,b.flatten(c),a.appendChild(c))})};k.prototype.Ia=function(a){function b(e){if(e]/g;function Za(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function $a(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:g=g.data;g=k&&bb[k.localName]?g:g.replace(Ya,Za);break a;case Node.COMMENT_NODE:g="\x3c!--"+g.data+"--\x3e";break a;default:throw window.console.error(g), +Error("not implemented");}}c+=g}return c};var y={},z=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),B=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);function db(a){var b=[];z.currentNode=a;for(a=z.firstChild();a;)b.push(a),a=z.nextSibling();return b}y.parentNode=function(a){z.currentNode=a;return z.parentNode()};y.firstChild=function(a){z.currentNode=a;return z.firstChild()};y.lastChild=function(a){z.currentNode=a;return z.lastChild()};y.previousSibling=function(a){z.currentNode=a;return z.previousSibling()}; +y.nextSibling=function(a){z.currentNode=a;return z.nextSibling()};y.childNodes=db;y.parentElement=function(a){B.currentNode=a;return B.parentNode()};y.firstElementChild=function(a){B.currentNode=a;return B.firstChild()};y.lastElementChild=function(a){B.currentNode=a;return B.lastChild()};y.previousElementSibling=function(a){B.currentNode=a;return B.previousSibling()};y.nextElementSibling=function(a){B.currentNode=a;return B.nextSibling()}; +y.children=function(a){var b=[];B.currentNode=a;for(a=B.firstChild();a;)b.push(a),a=B.nextSibling();return b};y.innerHTML=function(a){return cb(a,function(a){return db(a)})};y.textContent=function(a){switch(a.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:a=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+=c.nodeValue;return b;default:return a.nodeValue}};var eb=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),fb=document.implementation.createHTMLDocument("inert"),gb=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),hb={parentElement:{get:function(){var a=this.__shady&&this.__shady.parentNode;a&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:y.parentElement(this)},configurable:!0},parentNode:{get:function(){var a=this.__shady&&this.__shady.parentNode; +return void 0!==a?a:y.parentNode(this)},configurable:!0},nextSibling:{get:function(){var a=this.__shady&&this.__shady.nextSibling;return void 0!==a?a:y.nextSibling(this)},configurable:!0},previousSibling:{get:function(){var a=this.__shady&&this.__shady.previousSibling;return void 0!==a?a:y.previousSibling(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(a){this.setAttribute("class",a)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&& +void 0!==this.__shady.nextSibling){for(var a=this.nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return y.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var a=this.previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return y.previousElementSibling(this)},configurable:!0}},ib={childNodes:{get:function(){if(t(this)){if(!this.__shady.childNodes){this.__shady.childNodes= +[];for(var a=this.firstChild;a;a=a.nextSibling)this.__shady.childNodes.push(a)}var b=this.__shady.childNodes}else b=y.childNodes(this);b.item=function(a){return b[a]};return b},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var a=this.__shady&&this.__shady.firstChild;return void 0!==a?a:y.firstChild(this)},configurable:!0},lastChild:{get:function(){var a=this.__shady&&this.__shady.lastChild;return void 0!==a?a:y.lastChild(this)}, +configurable:!0},textContent:{get:function(){if(t(this)){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!==Node.COMMENT_NODE&&a.push(d.textContent);return a.join("")}return y.textContent(this)},set:function(a){if("undefined"===typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);(0b.__shady.assignedNodes.length&&(b.__shady.aa=!0)}b.__shady.aa&&(b.__shady.aa=!1,fc(this,b))}a=this.l;b=[];for(c=0;cb.indexOf(d))||b.push(d);for(a=0;a "+b}))}a=a.replace(ve,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,za:b,stop:f}}function te(a,b){a=a.split(we);a[0]+=b;return a.join(we)} +function se(a,b){var c=a.match(xe);return(c=c&&c[2].trim()||"")?c[0].match(ye)?a.replace(xe,function(a,c,f){return b+f}):c.split(ye)[0]===b?c:ze:a.replace(oe,b)}function Ae(a){a.selector===Be&&(a.selector="html")}ae.prototype.c=function(a){return a.match(re)?this.b(a,Ce):te(a.trim(),Ce)};q.Object.defineProperties(ae.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}}); +var me=/:(nth[-\w]+)\(([^)]+)\)/,Ce=":not(.style-scope)",ke=",",pe=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,ye=/[[.:#*]/,oe=":host",Be=":root",re="::slotted",ne=new RegExp("^("+re+")"),xe=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ue=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ve=/(.*):dir\((?:(ltr|rtl))\)/,ie=".",we=":",ee="class",ze="should_not_match",W=new ae;function De(a,b,c,d){this.u=a||null;this.b=b||null;this.ba=c||[];this.B=null;this.J=d||"";this.a=this.o=this.v=null}function X(a){return a?a.__styleInfo:null}function Ee(a,b){return a.__styleInfo=b}De.prototype.c=function(){return this.u};De.prototype._getStyleRules=De.prototype.c;var Fe,Ge=window.Element.prototype;Fe=Ge.matches||Ge.matchesSelector||Ge.mozMatchesSelector||Ge.msMatchesSelector||Ge.oMatchesSelector||Ge.webkitMatchesSelector;var He=navigator.userAgent.match("Trident");function Ie(){}function Je(a){var b={},c=[],d=0;T(a,function(a){Ke(a);a.index=d++;a=a.g.cssText;for(var c;c=Qd.exec(a);){var e=c[1];":"!==c[2]&&(b[e]=!0)}},function(a){c.push(a)});a.b=c;a=[];for(var e in b)a.push(e);return a} +function Ke(a){if(!a.g){var b={},c={};Le(a,c)&&(b.s=c,a.rules=null);b.cssText=a.parsedCssText.replace(Td,"").replace(Kd,"");a.g=b}}function Le(a,b){var c=a.g;if(c){if(c.s)return Object.assign(b,c.s),!0}else{c=a.parsedCssText;for(var d;a=Kd.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} +function Me(a,b,c){b&&(b=0<=b.indexOf(";")?Ne(a,b,c):Zd(b,function(b,e,f,h){if(!e)return b+h;(e=Me(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Me(a,c[f]||f,c)||f;return b+(e||"")+h}));return b&&b.trim()||""} +function Ne(a,b,c){b=b.split(";");for(var d=0,e,f;d *"===f||"html"===f,g=0===f.indexOf(":host")&&!h;"shady"===c&&(h=f===e+" > *."+e||-1!==f.indexOf("html"),g=!h&&0===f.indexOf(e));"shadow"===c&&(h=":host > *"===f||"html"===f,g=g&&!h);if(h||g)c=e,g&&(Q&&!b.j&&(b.j=je(W,b,W.b,a?ie+a:"",e)),c=b.j||e),d({Ma:c,Fa:g,Wa:h})}} +function Qe(a,b){var c={},d={},e=b&&b.__cssBuild;T(b,function(b){Pe(a,b,e,function(e){Fe.call(a.f||a,e.Ma)&&(e.Fa?Le(b,c):Le(b,d))})},null,!0);return{La:d,Da:c}} +function Re(a,b,c,d){var e=V(b),f=he(e.is,e.J),h=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");e=X(b).u;var g=Se(e,d);return fe(b,e,function(b){var e="";b.g||Ke(b);b.g.cssText&&(e=Ne(a,b.g.cssText,c));b.cssText=e;if(!Q&&!Wd(b)&&b.cssText){var k=e=b.cssText;null==b.ha&&(b.ha=Rd.test(e));if(b.ha)if(null==b.O){b.O=[];for(var n in g)k=g[n],k=k(e),e!==k&&(e=k,b.O.push(n))}else{for(n=0;n=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));Q?f.a?(f.a.textContent=e,d=f.a):e&&(d=Xd(e,g,a.shadowRoot,f.b)):d?d.parentNode|| +(He&&-1", "type": "tabbed" }, + "object": { + "baseTmpl": "tmpl/live-tabbed-tmpl.html", + "exampleCode": "live-examples/html-examples/embedded-content/object.html", + "cssExampleSrc": "live-examples/html-examples/embedded-content/css/object.css", + "fileName": "object.html", + "title": "HTML Demo: ", + "type": "tabbed" + }, "picture": { "baseTmpl": "tmpl/live-tabbed-tmpl.html", "exampleCode": "live-examples/html-examples/embedded-content/picture.html", @@ -23,6 +31,14 @@ "fileName": "picture.html", "title": "HTML Demo: ", "type": "tabbed" + }, + "source": { + "baseTmpl": "tmpl/live-tabbed-tmpl.html", + "exampleCode": "live-examples/html-examples/embedded-content/source.html", + "cssExampleSrc": "live-examples/html-examples/embedded-content/css/source.css", + "fileName": "source.html", + "title": "HTML Demo: ", + "type": "tabbed" } } } diff --git a/live-examples/html-examples/embedded-content/object.html b/live-examples/html-examples/embedded-content/object.html new file mode 100644 index 000000000..a351556b3 --- /dev/null +++ b/live-examples/html-examples/embedded-content/object.html @@ -0,0 +1,7 @@ + + + + diff --git a/live-examples/html-examples/embedded-content/source.html b/live-examples/html-examples/embedded-content/source.html new file mode 100644 index 000000000..1ffdaad55 --- /dev/null +++ b/live-examples/html-examples/embedded-content/source.html @@ -0,0 +1,12 @@ + + + diff --git a/live-examples/html-examples/inline-text-semantics/css/wbr.css b/live-examples/html-examples/inline-text-semantics/css/wbr.css new file mode 100644 index 000000000..3830a9573 --- /dev/null +++ b/live-examples/html-examples/inline-text-semantics/css/wbr.css @@ -0,0 +1,10 @@ +.output { + background-color: gray; +} + +#example-paragraphs { + background-color: white; + overflow: hidden; + resize: horizontal; + width: 7rem; +} diff --git a/live-examples/html-examples/inline-text-semantics/meta.json b/live-examples/html-examples/inline-text-semantics/meta.json index 467b0adfe..6c96e7fff 100644 --- a/live-examples/html-examples/inline-text-semantics/meta.json +++ b/live-examples/html-examples/inline-text-semantics/meta.json @@ -193,6 +193,14 @@ "fileName": "var.html", "title": "HTML Demo: ", "type": "tabbed" + }, + "wbr": { + "baseTmpl": "tmpl/live-tabbed-tmpl.html", + "exampleCode": "live-examples/html-examples/inline-text-semantics/wbr.html", + "cssExampleSrc": "live-examples/html-examples/inline-text-semantics/css/wbr.css", + "fileName": "wbr.html", + "title": "HTML Demo: ", + "type": "tabbed" } } } diff --git a/live-examples/html-examples/inline-text-semantics/wbr.html b/live-examples/html-examples/inline-text-semantics/wbr.html new file mode 100644 index 000000000..3aa3a37a8 --- /dev/null +++ b/live-examples/html-examples/inline-text-semantics/wbr.html @@ -0,0 +1,5 @@ +
+

Fernstraßenbauprivatfinanzierungsgesetz

+

Fernstraßenbauprivatfinanzierungsgesetz

+

Fernstraßen­bau­privat­finanzierungs­gesetz

+
diff --git a/live-examples/html-examples/input/checkbox.html b/live-examples/html-examples/input/checkbox.html index 9a83aec1e..f809b5f6a 100644 --- a/live-examples/html-examples/input/checkbox.html +++ b/live-examples/html-examples/input/checkbox.html @@ -1,16 +1,22 @@
Choose some monster features - -
+
+ + +
- -
+
+ + +
- - +
+ + +
diff --git a/live-examples/html-examples/input/color.html b/live-examples/html-examples/input/color.html index 564946e4e..4e415006a 100644 --- a/live-examples/html-examples/input/color.html +++ b/live-examples/html-examples/input/color.html @@ -1,16 +1,22 @@
Choose some monster colors - -
+
+ + +
- -
+
+ + +
- - +
+ + +
diff --git a/live-examples/html-examples/input/css/password.css b/live-examples/html-examples/input/css/password.css new file mode 100644 index 000000000..2efde6cea --- /dev/null +++ b/live-examples/html-examples/input/css/password.css @@ -0,0 +1,30 @@ +@font-face { + font-family: 'Fira Sans'; + src: local('FiraSans-Regular'), + url('/media/fonts/FiraSans-Regular.woff2') format('woff2'); +} + +legend { + background-color: #000; + color: #fff; + padding: 3px 6px; +} + +.output { + font: 1rem 'Fira Sans', sans-serif; +} + +label { + display: inline-block; + font-size: .9rem; + width: 35%; +} + +input[type="text"], +input[type="password"] { + width: 60%; +} + +input { + margin: .4rem 0; +} diff --git a/live-examples/html-examples/input/date.html b/live-examples/html-examples/input/date.html index 9bdc45982..38c2d02ef 100644 --- a/live-examples/html-examples/input/date.html +++ b/live-examples/html-examples/input/date.html @@ -1,14 +1,18 @@
Choose trip dates - -
+
+ + +
- - +
+ + +
diff --git a/live-examples/html-examples/input/datetime-local.html b/live-examples/html-examples/input/datetime-local.html index 1c8a44c61..b4b135fc5 100644 --- a/live-examples/html-examples/input/datetime-local.html +++ b/live-examples/html-examples/input/datetime-local.html @@ -1,10 +1,12 @@
Party settings - -
+
+ + +

+
+ + +
- - +
+ + +
diff --git a/live-examples/html-examples/input/meta.json b/live-examples/html-examples/input/meta.json index c72c6b482..5a75d5ad4 100644 --- a/live-examples/html-examples/input/meta.json +++ b/live-examples/html-examples/input/meta.json @@ -72,6 +72,14 @@ "title": "HTML Demo: ", "type": "tabbed" }, + "password": { + "baseTmpl": "tmpl/live-tabbed-tmpl.html", + "exampleCode": "live-examples/html-examples/input/password.html", + "cssExampleSrc": "live-examples/html-examples/input/css/password.css", + "fileName": "input-password.html", + "title": "HTML Demo: ", + "type": "tabbed" + }, "radio": { "baseTmpl": "tmpl/live-tabbed-tmpl.html", "exampleCode": "live-examples/html-examples/input/radio.html", diff --git a/live-examples/html-examples/input/password.html b/live-examples/html-examples/input/password.html new file mode 100644 index 000000000..be2388b81 --- /dev/null +++ b/live-examples/html-examples/input/password.html @@ -0,0 +1,19 @@ +
+ Sign in + +
+ + +
+ +
+ + +
+ + + +
diff --git a/live-examples/html-examples/text-content/css/hr.css b/live-examples/html-examples/text-content/css/hr.css new file mode 100644 index 000000000..5bfb99483 --- /dev/null +++ b/live-examples/html-examples/text-content/css/hr.css @@ -0,0 +1,16 @@ +hr { + border: none; + border-top: 3px double #333; + color: #333; + overflow: visible; + text-align: center; + height: 5px; +} + +hr:after { + background: #fff; + content: '§'; + padding: 0 4px; + position: relative; + top: -13px; +} diff --git a/live-examples/html-examples/text-content/css/li.css b/live-examples/html-examples/text-content/css/li.css new file mode 100644 index 000000000..8c306c2cb --- /dev/null +++ b/live-examples/html-examples/text-content/css/li.css @@ -0,0 +1,7 @@ +ol li { + font-weight: bold; +} + +ul li { + font-weight: normal; +} diff --git a/live-examples/html-examples/text-content/css/p.css b/live-examples/html-examples/text-content/css/p.css new file mode 100644 index 000000000..b9d1458b8 --- /dev/null +++ b/live-examples/html-examples/text-content/css/p.css @@ -0,0 +1,5 @@ +p { + margin: 10px 0; + padding: 5px; + border: 1px solid #999; +} diff --git a/live-examples/html-examples/text-content/css/ul.css b/live-examples/html-examples/text-content/css/ul.css new file mode 100644 index 000000000..020f3fc01 --- /dev/null +++ b/live-examples/html-examples/text-content/css/ul.css @@ -0,0 +1,7 @@ +li { + list-style-type: circle; +} + +li li { + list-style-type: square; +} diff --git a/live-examples/html-examples/text-content/hr.html b/live-examples/html-examples/text-content/hr.html new file mode 100644 index 000000000..8afbdbd29 --- /dev/null +++ b/live-examples/html-examples/text-content/hr.html @@ -0,0 +1,3 @@ +

§1: The first rule of Fight Club is: You do not talk about Fight Club.

+
+

§2: The second rule of Fight Club is: You do not talk about Fight Club.

diff --git a/live-examples/html-examples/text-content/li.html b/live-examples/html-examples/text-content/li.html new file mode 100644 index 000000000..84488fd4d --- /dev/null +++ b/live-examples/html-examples/text-content/li.html @@ -0,0 +1,19 @@ +
    +
  1. Apollo 11 +
      +
    • Neil Armstrong
    • +
    +
  2. +
  3. Apollo 12 +
      +
    • Alan Bean
    • +
    • Peter Conrad
    • +
    +
  4. +
  5. Apollo 14 +
      +
    • Edgar Mitchell
    • +
    • Alan Shepard
    • +
    +
  6. +
diff --git a/live-examples/html-examples/text-content/meta.json b/live-examples/html-examples/text-content/meta.json index 7bf402871..af43a6d29 100644 --- a/live-examples/html-examples/text-content/meta.json +++ b/live-examples/html-examples/text-content/meta.json @@ -38,6 +38,26 @@ "title": "HTML Demo:
", "type": "tabbed" }, + "hr": { + "baseTmpl": "tmpl/live-tabbed-tmpl.html", + "exampleCode": + "live-examples/html-examples/text-content/hr.html", + "cssExampleSrc": + "live-examples/html-examples/text-content/css/hr.css", + "fileName": "hr.html", + "title": "HTML Demo:
", + "type": "tabbed" + }, + "li": { + "baseTmpl": "tmpl/live-tabbed-tmpl.html", + "exampleCode": + "live-examples/html-examples/text-content/li.html", + "cssExampleSrc": + "live-examples/html-examples/text-content/css/li.css", + "fileName": "li.html", + "title": "HTML Demo:
  • ", + "type": "tabbed" + }, "ol": { "baseTmpl": "tmpl/live-tabbed-tmpl.html", "exampleCode": "live-examples/html-examples/text-content/ol.html", @@ -47,6 +67,15 @@ "title": "HTML Demo:
      ", "type": "tabbed" }, + "p": { + "baseTmpl": "tmpl/live-tabbed-tmpl.html", + "exampleCode": "live-examples/html-examples/text-content/p.html", + "cssExampleSrc": + "live-examples/html-examples/text-content/css/p.css", + "fileName": "p.html", + "title": "HTML Demo:

      ", + "type": "tabbed" + }, "pre": { "baseTmpl": "tmpl/live-tabbed-tmpl.html", "exampleCode": "live-examples/html-examples/text-content/pre.html", @@ -55,6 +84,15 @@ "fileName": "pre.html", "title": "HTML Demo:

      ",
                   "type": "tabbed"
      +        },
      +        "ul": {
      +            "baseTmpl": "tmpl/live-tabbed-tmpl.html",
      +            "exampleCode": "live-examples/html-examples/text-content/ul.html",
      +            "cssExampleSrc":
      +                "live-examples/html-examples/text-content/css/ul.css",
      +            "fileName": "ul.html",
      +            "title": "HTML Demo: 
        ", + "type": "tabbed" } } } diff --git a/live-examples/html-examples/text-content/p.html b/live-examples/html-examples/text-content/p.html new file mode 100644 index 000000000..db86f97a1 --- /dev/null +++ b/live-examples/html-examples/text-content/p.html @@ -0,0 +1,8 @@ +

        Lorem ipsum dolor sit amet, consectetur adipiscing elit. +Maecenas viverra facilisis rutrum

        + +

        Lorem ipsum dolor sit amet, consectetur adipiscing elit.
        +Maecenas viverra facilisis rutrum

        + +

        Lorem ipsum dolor sit amet, consectetur adipiscing elit.

        +

        Maecenas viverra facilisis rutrum.

        diff --git a/live-examples/html-examples/text-content/ul.html b/live-examples/html-examples/text-content/ul.html new file mode 100644 index 000000000..10e90220f --- /dev/null +++ b/live-examples/html-examples/text-content/ul.html @@ -0,0 +1,9 @@ +
          +
        • Milk
        • +
        • Cheese +
            +
          • Blue cheese
          • +
          • Feta
          • +
          +
        • +
        diff --git a/media/examples/pdf_open_parameters.pdf b/media/examples/pdf_open_parameters.pdf new file mode 100644 index 000000000..4a547d99e Binary files /dev/null and b/media/examples/pdf_open_parameters.pdf differ diff --git a/media/examples/stream_of_water.mp4 b/media/examples/stream_of_water.mp4 new file mode 100644 index 000000000..ce11f4b39 Binary files /dev/null and b/media/examples/stream_of_water.mp4 differ diff --git a/package-lock.json b/package-lock.json index 3fa15b110..afdfe1dc1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7140,6 +7140,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "nice-try": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "dev": true + }, "node-abi": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.4.0.tgz", @@ -7254,62 +7260,33 @@ "dev": true }, "npm-run-all": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.2.tgz", - "integrity": "sha512-Z2aRlajMK4SQ8u19ZA75NZZu7wupfCNQWdYosIi8S6FgBdGf/8Y6Hgyjdc8zU2cYmIRVCx1nM80tJPkdEd+UYg==", - "dev": true, - "requires": { - "ansi-styles": "3.2.1", - "chalk": "2.3.2", - "cross-spawn": "5.1.0", - "memorystream": "0.3.1", - "minimatch": "3.0.4", - "ps-tree": "1.1.0", - "read-pkg": "3.0.0", - "shell-quote": "1.6.1", - "string.prototype.padend": "3.0.0" + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.3.tgz", + "integrity": "sha512-aOG0N3Eo/WW+q6sUIdzcV2COS8VnTZCmdji0VQIAZF3b+a3YWb0AD0vFIyjKec18A7beLGbaQ5jFTNI2bPt9Cg==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.4", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "ps-tree": "^1.1.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" }, "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "3.0.0" - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "4.0.0", - "normalize-package-data": "2.4.0", - "path-type": "3.0.0" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } } } @@ -10326,9 +10303,9 @@ "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=", "dev": true, "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.11.0", - "function-bind": "1.1.1" + "define-properties": "^1.1.2", + "es-abstract": "^1.4.3", + "function-bind": "^1.0.2" } }, "string_decoder": { diff --git a/package.json b/package.json index 235ea83e3..6610972d8 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "jest": "22.4.3", "jest-puppeteer": "3.0.1", "node-dir": "0.1.17", - "npm-run-all": "4.1.2", + "npm-run-all": "4.1.3", "prettier": "1.12.1", "prettier-eslint": "8.8.1", "prettier-stylelint": "0.4.2", diff --git a/site.json b/site.json index 8e91edd46..d2b20e617 100644 --- a/site.json +++ b/site.json @@ -45,7 +45,10 @@ "destFileName": "editor-js" }, "tabbedEditor": { - "javascript": ["js/editor-bundle.js"], + "javascript": [ + "js/lib/webcomponents-hi-sd-ce.js", + "js/editor-bundle.js" + ], "css": [ "css/editor-libs/common.css", "css/editor-libs/tabby.css",