Socket
Socket
Sign inDemoInstall

transparency

Package Overview
Dependencies
206
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.8 to 0.9.9

browser/contentEditable_files/jquery-1.9.1.js

24

dist/transparency.js

@@ -713,2 +713,12 @@ ;(function(e,t,n,r){function i(r){if(!n[r]){if(!t[r]){if(e)return e(r);throw new Error("Cannot find module '"+r+"'")}var s=n[r]={exports:{}};t[r][0](function(e){var n=t[r][1][e];return i(n?n:e)},s,s.exports)}return n[r].exports}for(var s=0;s<r.length;s++)i(r[s]);return i})(typeof require!=="undefined"&&require,{1:[function(require,module,exports){

}).call(this)).join('');
this.children = (function() {
var _i, _len, _ref, _results;
_ref = this.el.children;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
child = _ref[_i];
_results.push(child);
}
return _results;
}).call(this);
if (!(this.textNode = this.el.firstChild)) {

@@ -722,3 +732,15 @@ this.el.appendChild(this.textNode = this.el.ownerDocument.createTextNode(''));

Text.prototype.set = function(text) {
return this.textNode.nodeValue = text;
var child, _i, _len, _ref, _results;
while (child = this.el.firstChild) {
this.el.removeChild(child);
}
this.textNode.nodeValue = text;
this.el.appendChild(this.textNode);
_ref = this.children;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
child = _ref[_i];
_results.push(this.el.appendChild(child));
}
return _results;
};

@@ -725,0 +747,0 @@

2

dist/transparency.min.js

@@ -1,1 +0,1 @@

(function(t,e,n,r){function i(r){if(!n[r]){if(!e[r]){if(t)return t(r);throw Error("Cannot find module '"+r+"'")}var o=n[r]={exports:{}};e[r][0](function(t){var n=e[r][1][t];return i(n?n:t)},o,o.exports)}return n[r].exports}for(var o=0;r.length>o;o++)i(r[o]);return i})("undefined"!=typeof require&&require,{1:[function(t){(function(){var e,n,r,i=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};r=t("./helpers"),e=t("./context"),n=window.Transparency={},n.render=function(t,n,i,o){var s,u;return null==n&&(n=[]),null==i&&(i={}),null==o&&(o={}),s=o.debug&&console?r.consoleLogger:r.nullLogger,s("Transparency.render:",t,n,i,o),t?(r.isArray(n)||(n=[n]),t=(u=r.data(t)).context||(u.context=new e(t)),t.render(n,i,o).el):void 0},n.jQueryPlugin=r.chainable(function(t,e,r){var i,o,s,u;for(u=[],o=0,s=this.length;s>o;o++)i=this[o],u.push(n.render(i,t,e,r));return u}),n.matcher=function(t,e){return t.el.id===e||i.call(t.classNames,e)>=0||t.el.name===e||t.el.getAttribute("data-bind")===e},n.clone=r.onlyWith$(function(){return function(t){return $(t).clone()[0]}}),r.onlyWith$(function(){return $.fn.render=n.jQueryPlugin}),("undefined"!=typeof define&&null!==define?define.amd:void 0)&&define(function(){return n})}).call(this)},{"./helpers":2,"./context":3}],2:[function(t,e,n){(function(){var e,r,i,o;e=t("./ElementFactory"),n.before=function(t){return function(e){return function(){return t.apply(this,arguments),e.apply(this,arguments)}}},n.after=function(t){return function(e){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}},n.chainable=n.after(function(){return this}),n.onlyWith$=function(t){return"undefined"!=typeof jQuery&&null!==jQuery||"undefined"!=typeof Zepto&&null!==Zepto?function(){return t(arguments)}(jQuery||Zepto):void 0},n.getChildNodes=function(t){var e,n;for(n=[],e=t.firstChild;e;)n.push(e),e=e.nextSibling;return n},n.getElements=function(t){var e;return e=[],o(t,e),e},o=function(t,r){var i,s;for(i=t.firstChild,s=[];i;)i.nodeType===n.ELEMENT_NODE&&(r.push(new e.createElement(i)),o(i,r)),s.push(i=i.nextSibling);return s},n.ELEMENT_NODE=1,n.TEXT_NODE=3,i=function(){return"<:nav></:nav>"!==document.createElement("nav").cloneNode(!0).outerHTML},n.cloneNode="undefined"==typeof document||null===document||i()?function(t){return t.cloneNode(!0)}:function(t){var e,i,o,s,u;if(e=Transparency.clone(t),e.nodeType===n.ELEMENT_NODE)for(e.removeAttribute(r),u=e.getElementsByTagName("*"),o=0,s=u.length;s>o;o++)i=u[o],i.removeAttribute(r);return e},r="transparency",n.data=function(t){return t[r]||(t[r]={})},n.nullLogger=function(){},n.consoleLogger=function(){return console.log(arguments)},n.log=n.nullLogger,n.toString=Object.prototype.toString,n.isArray=Array.isArray||function(t){return"[object Array]"===n.toString.call(t)},n.isDate=function(t){return"[object Date]"===n.toString.call(t)},n.isDomElement=function(t){return t.nodeType===n.ELEMENT_NODE},n.isPlainValue=function(t){var e;return e=typeof t,"object"!==e&&"function"!==e||n.isDate(t)},n.isBoolean=function(t){return t===!0||t===!1}}).call(this)},{"./ElementFactory":4}],3:[function(t,e){(function(){var n,r,i;i=t("./helpers"),r=t("./instance"),e.exports=n=function(){function t(t){this.el=t,this.template=i.cloneNode(this.el),this.instances=[new r(this.el)],this.instanceCache=[]}var e,n;return n=i.chainable(function(){return this.parent=this.el.parentNode,this.parent?(this.nextSibling=this.el.nextSibling,this.parent.removeChild(this.el)):void 0}),e=i.chainable(function(){return this.parent?this.nextSibling?this.parent.insertBefore(this.el,this.nextSibling):this.parent.appendChild(this.el):void 0}),t.prototype.render=i.before(n)(i.after(e)(i.chainable(function(t,e,n){for(var o,s,u,l,a,c,h;t.length<this.instances.length;)this.instanceCache.push(this.instances.pop().remove());for(;t.length>this.instances.length;)u=this.instanceCache.pop()||new r(i.cloneNode(this.template)),this.instances.push(u.appendTo(this.el));for(h=[],s=a=0,c=t.length;c>a;s=++a)l=t[s],u=this.instances[s],o=[],h.push(u.prepare(l,o).renderValues(l,o).renderDirectives(l,s,e).renderChildren(l,o,e,n));return h}))),t}()}).call(this)},{"./helpers":2,"./instance":5}],4:[function(t,e){(function(){var n,r,i,o,s,u,l,a,c,h,p={}.hasOwnProperty,f=function(t,e){function n(){this.constructor=t}for(var r in e)p.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};n=t("./attributeFactory"),h=t("./helpers"),e.exports=o={Elements:{input:{}},createElement:function(t){var e,n;return e="input"===(n=t.nodeName.toLowerCase())?o.Elements[n][t.type.toLowerCase()]||s:o.Elements[n]||i,new e(t)}},i=function(){function t(t){this.el=t,this.attributes={},this.childNodes=h.getChildNodes(this.el),this.nodeName=this.el.nodeName.toLowerCase(),this.classNames=this.el.className.split(" "),this.originalAttributes={}}return t.prototype.empty=function(){for(var t;t=this.el.firstChild;)this.el.removeChild(t);return this},t.prototype.reset=function(){var t,e,n,r;n=this.attributes,r=[];for(e in n)t=n[e],r.push(t.set(t.templateValue));return r},t.prototype.render=function(t){return this.attr("text",t)},t.prototype.attr=function(t,e){var r,i;return r=(i=this.attributes)[t]||(i[t]=n.createAttribute(this.el,t,e)),null!=e&&r.set(e),r},t.prototype.renderDirectives=function(t,e,n){var r,i,o,s;s=[];for(i in n)p.call(n,i)&&(r=n[i],"function"==typeof r&&(o=r.call(t,{element:this.el,index:e,value:this.attr(i).templateValue}),null!=o?s.push(this.attr(i,o)):s.push(void 0)));return s},t}(),l=function(t){function e(t){e.__super__.constructor.call(this,t),this.elements=h.getElements(t)}return f(e,t),o.Elements.select=e,e.prototype.render=function(t){var e,n,r,i,o;for(t=""+t,i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],"option"===e.nodeName&&o.push(e.attr("selected",e.el.value===t));return o},e}(i),c=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}var n,r,i,s;for(f(e,t),n=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],i=0,s=n.length;s>i;i++)r=n[i],o.Elements[r]=e;return e.prototype.attr=function(t,n){return"text"!==t&&"html"!==t?e.__super__.attr.call(this,t,n):void 0},e}(i),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.render=function(t){return this.attr("value",t)},e}(c),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),o.Elements.textarea=e,e}(s),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),o.Elements.input.checkbox=e,e.prototype.render=function(t){return this.attr("checked",Boolean(t))},e}(s),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),o.Elements.input.radio=e,e}(r)}).call(this)},{"./attributeFactory":6,"./helpers":2}],5:[function(t,e){(function(){var n,r,i={}.hasOwnProperty;r=t("./helpers"),e.exports=n=function(){function t(t){this.queryCache={},this.childNodes=r.getChildNodes(t),this.elements=r.getElements(t)}return t.prototype.remove=r.chainable(function(){var t,e,n,r,i;for(r=this.childNodes,i=[],e=0,n=r.length;n>e;e++)t=r[e],i.push(t.parentNode.removeChild(t));return i}),t.prototype.appendTo=r.chainable(function(t){var e,n,r,i,o;for(i=this.childNodes,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(t.appendChild(e));return o}),t.prototype.prepare=r.chainable(function(t){var e,n,i,o,s;for(o=this.elements,s=[],n=0,i=o.length;i>n;n++)e=o[n],e.reset(),s.push(r.data(e.el).model=t);return s}),t.prototype.renderValues=r.chainable(function(t,e){var n,o,s,u;if(r.isDomElement(t)&&(n=this.elements[0]))return n.empty().el.appendChild(t);if("object"==typeof t){u=[];for(o in t)i.call(t,o)&&(s=t[o],null!=s&&(r.isPlainValue(s)?u.push(function(){var t,e,r,i;for(r=this.matchingElements(o),i=[],t=0,e=r.length;e>t;t++)n=r[t],i.push(n.render(s));return i}.call(this)):"object"==typeof s?u.push(e.push(o)):u.push(void 0)));return u}}),t.prototype.renderDirectives=r.chainable(function(t,e,n){var r,o,s,u;u=[];for(s in n)i.call(n,s)&&(r=n[s],"object"==typeof r&&("object"!=typeof t&&(t={value:t}),u.push(function(){var n,i,u,l;for(u=this.matchingElements(s),l=[],n=0,i=u.length;i>n;n++)o=u[n],l.push(o.renderDirectives(t,e,r));return l}.call(this))));return u}),t.prototype.renderChildren=r.chainable(function(t,e,n,r){var i,o,s,u,l;for(l=[],s=0,u=e.length;u>s;s++)o=e[s],l.push(function(){var e,s,u,l;for(u=this.matchingElements(o),l=[],e=0,s=u.length;s>e;e++)i=u[e],l.push(Transparency.render(i.el,t[o],n[o],r));return l}.call(this));return l}),t.prototype.matchingElements=function(t){var e,n,i;return n=(i=this.queryCache)[t]||(i[t]=function(){var n,r,i,o;for(i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],Transparency.matcher(e,t)&&o.push(e);return o}.call(this)),r.log("Matching elements for '"+t+"':",n),n},t}()}).call(this)},{"./helpers":2}],6:[function(t,e){(function(){var n,r,i,o,s,u,l,a={}.hasOwnProperty,c=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};l=t("./helpers"),e.exports=r={Attributes:{},createAttribute:function(t,e){var i;return i=r.Attributes[e]||n,new i(t,e)}},n=function(){function t(t,e){this.el=t,this.name=e,this.templateValue=this.el.getAttribute(this.name)||""}return t.prototype.set=function(t){return this.el[this.name]=t,this.el.setAttribute(this.name,""+t)},t}(),i=function(t){function e(t,e){this.el=t,this.name=e,this.templateValue=this.el.getAttribute(this.name)||!1}var n,i,o,s;for(c(e,t),n=["hidden","async","defer","autofocus","formnovalidate","disabled","autofocus","formnovalidate","multiple","readonly","required","checked","scoped","reversed","selected","loop","muted","autoplay","controls","seamless","default","ismap","novalidate","open","typemustmatch","truespeed"],o=0,s=n.length;s>o;o++)i=n[o],r.Attributes[i]=e;return e.prototype.set=function(t){return this.el[this.name]=t,t?this.el.setAttribute(this.name,this.name):this.el.removeAttribute(this.name)},e}(n),u=function(t){function e(t,e){var n;this.el=t,this.name=e,this.templateValue=function(){var t,e,r,i;for(r=l.getChildNodes(this.el),i=[],t=0,e=r.length;e>t;t++)n=r[t],n.nodeType===l.TEXT_NODE&&i.push(n.nodeValue);return i}.call(this).join(""),(this.textNode=this.el.firstChild)?this.textNode.nodeType!==l.TEXT_NODE&&(this.textNode=this.el.insertBefore(this.el.ownerDocument.createTextNode(""),this.textNode)):this.el.appendChild(this.textNode=this.el.ownerDocument.createTextNode(""))}return c(e,t),r.Attributes.text=e,e.prototype.set=function(t){return this.textNode.nodeValue=t},e}(n),s=function(t){function e(t){var e;this.el=t,this.templateValue="",this.children=function(){var t,n,r,i;for(r=this.el.children,i=[],t=0,n=r.length;n>t;t++)e=r[t],i.push(e);return i}.call(this)}return c(e,t),r.Attributes.html=e,e.prototype.set=function(t){for(var e,n,r,i,o;e=this.el.firstChild;)this.el.removeChild(e);for(this.el.innerHTML=t+this.templateValue,i=this.children,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(this.el.appendChild(e));return o},e}(n),o=function(t){function e(t){e.__super__.constructor.call(this,t,"class")}return c(e,t),r.Attributes["class"]=e,e}(n)}).call(this)},{"./helpers":2}]},{},[1]);
(function(t,e,n,r){function i(r){if(!n[r]){if(!e[r]){if(t)return t(r);throw Error("Cannot find module '"+r+"'")}var o=n[r]={exports:{}};e[r][0](function(t){var n=e[r][1][t];return i(n?n:t)},o,o.exports)}return n[r].exports}for(var o=0;r.length>o;o++)i(r[o]);return i})("undefined"!=typeof require&&require,{1:[function(t){(function(){var e,n,r,i=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};r=t("./helpers"),e=t("./context"),n=window.Transparency={},n.render=function(t,n,i,o){var s,u;return null==n&&(n=[]),null==i&&(i={}),null==o&&(o={}),s=o.debug&&console?r.consoleLogger:r.nullLogger,s("Transparency.render:",t,n,i,o),t?(r.isArray(n)||(n=[n]),t=(u=r.data(t)).context||(u.context=new e(t)),t.render(n,i,o).el):void 0},n.jQueryPlugin=r.chainable(function(t,e,r){var i,o,s,u;for(u=[],o=0,s=this.length;s>o;o++)i=this[o],u.push(n.render(i,t,e,r));return u}),n.matcher=function(t,e){return t.el.id===e||i.call(t.classNames,e)>=0||t.el.name===e||t.el.getAttribute("data-bind")===e},n.clone=r.onlyWith$(function(){return function(t){return $(t).clone()[0]}}),r.onlyWith$(function(){return $.fn.render=n.jQueryPlugin}),("undefined"!=typeof define&&null!==define?define.amd:void 0)&&define(function(){return n})}).call(this)},{"./helpers":2,"./context":3}],2:[function(t,e,n){(function(){var e,r,i,o;e=t("./ElementFactory"),n.before=function(t){return function(e){return function(){return t.apply(this,arguments),e.apply(this,arguments)}}},n.after=function(t){return function(e){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}},n.chainable=n.after(function(){return this}),n.onlyWith$=function(t){return"undefined"!=typeof jQuery&&null!==jQuery||"undefined"!=typeof Zepto&&null!==Zepto?function(){return t(arguments)}(jQuery||Zepto):void 0},n.getChildNodes=function(t){var e,n;for(n=[],e=t.firstChild;e;)n.push(e),e=e.nextSibling;return n},n.getElements=function(t){var e;return e=[],o(t,e),e},o=function(t,r){var i,s;for(i=t.firstChild,s=[];i;)i.nodeType===n.ELEMENT_NODE&&(r.push(new e.createElement(i)),o(i,r)),s.push(i=i.nextSibling);return s},n.ELEMENT_NODE=1,n.TEXT_NODE=3,i=function(){return"<:nav></:nav>"!==document.createElement("nav").cloneNode(!0).outerHTML},n.cloneNode="undefined"==typeof document||null===document||i()?function(t){return t.cloneNode(!0)}:function(t){var e,i,o,s,u;if(e=Transparency.clone(t),e.nodeType===n.ELEMENT_NODE)for(e.removeAttribute(r),u=e.getElementsByTagName("*"),o=0,s=u.length;s>o;o++)i=u[o],i.removeAttribute(r);return e},r="transparency",n.data=function(t){return t[r]||(t[r]={})},n.nullLogger=function(){},n.consoleLogger=function(){return console.log(arguments)},n.log=n.nullLogger,n.toString=Object.prototype.toString,n.isArray=Array.isArray||function(t){return"[object Array]"===n.toString.call(t)},n.isDate=function(t){return"[object Date]"===n.toString.call(t)},n.isDomElement=function(t){return t.nodeType===n.ELEMENT_NODE},n.isPlainValue=function(t){var e;return e=typeof t,"object"!==e&&"function"!==e||n.isDate(t)},n.isBoolean=function(t){return t===!0||t===!1}}).call(this)},{"./ElementFactory":4}],3:[function(t,e){(function(){var n,r,i;i=t("./helpers"),r=t("./instance"),e.exports=n=function(){function t(t){this.el=t,this.template=i.cloneNode(this.el),this.instances=[new r(this.el)],this.instanceCache=[]}var e,n;return n=i.chainable(function(){return this.parent=this.el.parentNode,this.parent?(this.nextSibling=this.el.nextSibling,this.parent.removeChild(this.el)):void 0}),e=i.chainable(function(){return this.parent?this.nextSibling?this.parent.insertBefore(this.el,this.nextSibling):this.parent.appendChild(this.el):void 0}),t.prototype.render=i.before(n)(i.after(e)(i.chainable(function(t,e,n){for(var o,s,u,l,a,h,c;t.length<this.instances.length;)this.instanceCache.push(this.instances.pop().remove());for(;t.length>this.instances.length;)u=this.instanceCache.pop()||new r(i.cloneNode(this.template)),this.instances.push(u.appendTo(this.el));for(c=[],s=a=0,h=t.length;h>a;s=++a)l=t[s],u=this.instances[s],o=[],c.push(u.prepare(l,o).renderValues(l,o).renderDirectives(l,s,e).renderChildren(l,o,e,n));return c}))),t}()}).call(this)},{"./helpers":2,"./instance":5}],4:[function(t,e){(function(){var n,r,i,o,s,u,l,a,h,c,p={}.hasOwnProperty,f=function(t,e){function n(){this.constructor=t}for(var r in e)p.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};n=t("./attributeFactory"),c=t("./helpers"),e.exports=o={Elements:{input:{}},createElement:function(t){var e,n;return e="input"===(n=t.nodeName.toLowerCase())?o.Elements[n][t.type.toLowerCase()]||s:o.Elements[n]||i,new e(t)}},i=function(){function t(t){this.el=t,this.attributes={},this.childNodes=c.getChildNodes(this.el),this.nodeName=this.el.nodeName.toLowerCase(),this.classNames=this.el.className.split(" "),this.originalAttributes={}}return t.prototype.empty=function(){for(var t;t=this.el.firstChild;)this.el.removeChild(t);return this},t.prototype.reset=function(){var t,e,n,r;n=this.attributes,r=[];for(e in n)t=n[e],r.push(t.set(t.templateValue));return r},t.prototype.render=function(t){return this.attr("text",t)},t.prototype.attr=function(t,e){var r,i;return r=(i=this.attributes)[t]||(i[t]=n.createAttribute(this.el,t,e)),null!=e&&r.set(e),r},t.prototype.renderDirectives=function(t,e,n){var r,i,o,s;s=[];for(i in n)p.call(n,i)&&(r=n[i],"function"==typeof r&&(o=r.call(t,{element:this.el,index:e,value:this.attr(i).templateValue}),null!=o?s.push(this.attr(i,o)):s.push(void 0)));return s},t}(),l=function(t){function e(t){e.__super__.constructor.call(this,t),this.elements=c.getElements(t)}return f(e,t),o.Elements.select=e,e.prototype.render=function(t){var e,n,r,i,o;for(t=""+t,i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],"option"===e.nodeName&&o.push(e.attr("selected",e.el.value===t));return o},e}(i),h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}var n,r,i,s;for(f(e,t),n=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],i=0,s=n.length;s>i;i++)r=n[i],o.Elements[r]=e;return e.prototype.attr=function(t,n){return"text"!==t&&"html"!==t?e.__super__.attr.call(this,t,n):void 0},e}(i),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.render=function(t){return this.attr("value",t)},e}(h),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),o.Elements.textarea=e,e}(s),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),o.Elements.input.checkbox=e,e.prototype.render=function(t){return this.attr("checked",Boolean(t))},e}(s),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),o.Elements.input.radio=e,e}(r)}).call(this)},{"./attributeFactory":6,"./helpers":2}],5:[function(t,e){(function(){var n,r,i={}.hasOwnProperty;r=t("./helpers"),e.exports=n=function(){function t(t){this.queryCache={},this.childNodes=r.getChildNodes(t),this.elements=r.getElements(t)}return t.prototype.remove=r.chainable(function(){var t,e,n,r,i;for(r=this.childNodes,i=[],e=0,n=r.length;n>e;e++)t=r[e],i.push(t.parentNode.removeChild(t));return i}),t.prototype.appendTo=r.chainable(function(t){var e,n,r,i,o;for(i=this.childNodes,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(t.appendChild(e));return o}),t.prototype.prepare=r.chainable(function(t){var e,n,i,o,s;for(o=this.elements,s=[],n=0,i=o.length;i>n;n++)e=o[n],e.reset(),s.push(r.data(e.el).model=t);return s}),t.prototype.renderValues=r.chainable(function(t,e){var n,o,s,u;if(r.isDomElement(t)&&(n=this.elements[0]))return n.empty().el.appendChild(t);if("object"==typeof t){u=[];for(o in t)i.call(t,o)&&(s=t[o],null!=s&&(r.isPlainValue(s)?u.push(function(){var t,e,r,i;for(r=this.matchingElements(o),i=[],t=0,e=r.length;e>t;t++)n=r[t],i.push(n.render(s));return i}.call(this)):"object"==typeof s?u.push(e.push(o)):u.push(void 0)));return u}}),t.prototype.renderDirectives=r.chainable(function(t,e,n){var r,o,s,u;u=[];for(s in n)i.call(n,s)&&(r=n[s],"object"==typeof r&&("object"!=typeof t&&(t={value:t}),u.push(function(){var n,i,u,l;for(u=this.matchingElements(s),l=[],n=0,i=u.length;i>n;n++)o=u[n],l.push(o.renderDirectives(t,e,r));return l}.call(this))));return u}),t.prototype.renderChildren=r.chainable(function(t,e,n,r){var i,o,s,u,l;for(l=[],s=0,u=e.length;u>s;s++)o=e[s],l.push(function(){var e,s,u,l;for(u=this.matchingElements(o),l=[],e=0,s=u.length;s>e;e++)i=u[e],l.push(Transparency.render(i.el,t[o],n[o],r));return l}.call(this));return l}),t.prototype.matchingElements=function(t){var e,n,i;return n=(i=this.queryCache)[t]||(i[t]=function(){var n,r,i,o;for(i=this.elements,o=[],n=0,r=i.length;r>n;n++)e=i[n],Transparency.matcher(e,t)&&o.push(e);return o}.call(this)),r.log("Matching elements for '"+t+"':",n),n},t}()}).call(this)},{"./helpers":2}],6:[function(t,e){(function(){var n,r,i,o,s,u,l,a={}.hasOwnProperty,h=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};l=t("./helpers"),e.exports=r={Attributes:{},createAttribute:function(t,e){var i;return i=r.Attributes[e]||n,new i(t,e)}},n=function(){function t(t,e){this.el=t,this.name=e,this.templateValue=this.el.getAttribute(this.name)||""}return t.prototype.set=function(t){return this.el[this.name]=t,this.el.setAttribute(this.name,""+t)},t}(),i=function(t){function e(t,e){this.el=t,this.name=e,this.templateValue=this.el.getAttribute(this.name)||!1}var n,i,o,s;for(h(e,t),n=["hidden","async","defer","autofocus","formnovalidate","disabled","autofocus","formnovalidate","multiple","readonly","required","checked","scoped","reversed","selected","loop","muted","autoplay","controls","seamless","default","ismap","novalidate","open","typemustmatch","truespeed"],o=0,s=n.length;s>o;o++)i=n[o],r.Attributes[i]=e;return e.prototype.set=function(t){return this.el[this.name]=t,t?this.el.setAttribute(this.name,this.name):this.el.removeAttribute(this.name)},e}(n),u=function(t){function e(t,e){var n;this.el=t,this.name=e,this.templateValue=function(){var t,e,r,i;for(r=l.getChildNodes(this.el),i=[],t=0,e=r.length;e>t;t++)n=r[t],n.nodeType===l.TEXT_NODE&&i.push(n.nodeValue);return i}.call(this).join(""),this.children=function(){var t,e,r,i;for(r=this.el.children,i=[],t=0,e=r.length;e>t;t++)n=r[t],i.push(n);return i}.call(this),(this.textNode=this.el.firstChild)?this.textNode.nodeType!==l.TEXT_NODE&&(this.textNode=this.el.insertBefore(this.el.ownerDocument.createTextNode(""),this.textNode)):this.el.appendChild(this.textNode=this.el.ownerDocument.createTextNode(""))}return h(e,t),r.Attributes.text=e,e.prototype.set=function(t){for(var e,n,r,i,o;e=this.el.firstChild;)this.el.removeChild(e);for(this.textNode.nodeValue=t,this.el.appendChild(this.textNode),i=this.children,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(this.el.appendChild(e));return o},e}(n),s=function(t){function e(t){var e;this.el=t,this.templateValue="",this.children=function(){var t,n,r,i;for(r=this.el.children,i=[],t=0,n=r.length;n>t;t++)e=r[t],i.push(e);return i}.call(this)}return h(e,t),r.Attributes.html=e,e.prototype.set=function(t){for(var e,n,r,i,o;e=this.el.firstChild;)this.el.removeChild(e);for(this.el.innerHTML=t+this.templateValue,i=this.children,o=[],n=0,r=i.length;r>n;n++)e=i[n],o.push(this.el.appendChild(e));return o},e}(n),o=function(t){function e(t){e.__super__.constructor.call(this,t,"class")}return h(e,t),r.Attributes["class"]=e,e}(n)}).call(this)},{"./helpers":2}]},{},[1]);
{
"name": "transparency",
"version": "0.9.8",
"version": "0.9.9",
"main": "dist/transparency",

@@ -68,6 +68,6 @@ "description": "Transparency is a minimal template engine for browsers. It maps JSON objects to DOM elements with zero configuration.",

"ie/8..latest",
"chrome/20..latest",
"firefox/10..latest",
"chrome/23..latest",
"firefox/17..latest",
"safari/5.1..latest",
"opera/11.0..latest",
"opera/11.5..latest",
"iphone/6",

@@ -74,0 +74,0 @@ "ipad/6"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc