From 8dbcf03d3d4505441528d7a46a38f2d254259918 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:46:37 +0000 Subject: [PATCH 01/32] Delete layout-manager.js --- layout-manager.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 layout-manager.js diff --git a/layout-manager.js b/layout-manager.js deleted file mode 100644 index 9d46eb1..0000000 --- a/layout-manager.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";this._root=document;let ImageResource=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol(),o=Symbol();return class{constructor(){this.source=null,this.sizes=null,this.type=null,this.purpose=null,this.platform=null}set source(e){e=null!=e?e[WebAddress.to]():WebAddress.empty,this[t]=e}get source(){return this[t]}set sizes(t){t=null!=t?t[String.to]():String.empty,this[e]=t}get sizes(){return this[e]}set type(t){t=null!=t?t[String.to]():String.empty,this[s]=t}get type(){return this[s]}set purpose(t){t=null!=t?t[String.to]():String.empty,this[i]=t}get purpose(){return this[i]}set platform(t){t=null!=t?t[String.to]():String.empty,this[o]=t}get platform(){return this[o]}get src(){return this.source}toJSON(){let t={};return t.source=this.source,t.sizes=this.sizes,t.type=this.type,t.purpose=this.purpose,t.platform=this.platform,t}}})(),ApplicationManifest=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol(),o=Symbol(),r=Symbol();return class{constructor(){this.name=null,this.description=null,this.icons=null,this.display="standalone",this.orientation="natural",this.start_url=null}set name(e){e=null!=e?e[String.to]():String.empty,this[t]=e}get name(){return this[t]}set description(t){t=null!=t?t[String.to]():String.empty,this[e]=t}get description(){return this[e]}set icons(t){t=null!=t?t[List.to]():List.empty,this[s]=t}get icons(){return this[s]}set display(t){this[i]=t}get display(){return this[i]}set orientation(t){this[o]=t}get orientation(){return this[o]}set start_url(t){t=null!=t?t[String.to]():String.empty,this[r]=t}get start_url(){return this[r]}addTo(t){this.name||(this.name=document.title),this.icons.size||(this.icons=List.of({src:document.icons[0].source})),this.start_url||(this.start_url=document.location.pathname),HTMLElement.create("link").fillWith({rel:"manifest",source:new Blob(Array.of(JSON.stringify(this)),{type:"application/manifest+json"}),parentNode:t.head}),HTMLElement.create("meta").fillWith({name:"viewport",content:"width=device-width,initial-scale=1,maximum-scale=1",parentNode:t.head})}toJSON(){let t={};return t.name=this.name,t.description=this.description,t.icons=this.icons,t.display=this.display,t.orientation=this.orientation,t.start_url=this.start_url,t}}})(),UnitValue=(()=>{let t=Symbol(),e=Symbol(),s=RegExp.from`^([+-]?\d+(?:\.\d+)?)(.*)$`;class i{constructor(){this.value=null,this.unit="px"}set value(e){e=null!=e?e[RealNumber.to]():RealNumber.empty,this[t]=e}get value(){return this[t]}set unit(t){this[e]=t}get unit(){return this[e]}[String.to](){return`${this.value}${this.unit}`}toJSON(){let t={};return t.value=this.value,t.unit=this.unit,t}}return RealNumber.implements(class{[i.to](){return(new i).fillWith({value:this})}}),String.implements(class{[i.to](){s.lastIndex=0;let t=s.exec(this);return(new i).fillWith({value:t[1],unit:t[2]})}}),i})(),PositionValue=(()=>{let t=Symbol(),e=Symbol();return class{constructor(){this.x="50%",this.y="50%"}set x(e){e=null!=e?e[UnitValue.to]():UnitValue.empty,this[t]=e}get x(){return this[t]}set y(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[e]=t}get y(){return this[e]}set all(t){this.x=t,this.y=t}[String.to](){return`${this.x} ${this.y}`}toJSON(){let t={};return t.x=this.x,t.y=this.y,t}}})(),LookBase=class t{addTo(t){}removeFrom(t){}static mapFromLogicalName(t){return t.replace("start","right").replace("end","left")}static set(t,e,s){t.style.setProperty(e,s)}static append(e,s,i,o){null==o&&(o=",");let r=e.style.getPropertyValue(s);r&&(i=`${r}${o}${i}`),t.set(e,s,i)}},InnerSpacing=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol();return class extends LookBase{constructor(){super(...arguments),this.top="unset",this.start="unset",this.bottom="unset",this.end="unset"}set top(e){this[t]=e}get top(){return this[t]}set start(t){this[e]=t}get start(){return this[e]}set bottom(t){this[s]=t}get bottom(){return this[s]}set end(t){this[i]=t}get end(){return this[i]}set all(t){this.top=t,this.start=t,this.bottom=t,this.end=t}set topBottom(t){this.top=t,this.bottom=t}set startEnd(t){this.start=t,this.end=t}addTo(t){let e=function(e,s){"unset"!=s&&LookBase.set(t,`padding-${e}`,String.isObjectModelOf(s)?s:`${s}px`)}.bind(this);e("top",this.top),e("bottom",this.bottom),e(LookBase.mapFromLogicalName("start"),this.start),e(LookBase.mapFromLogicalName("end"),this.end)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.top=this.top,t.start=this.start,t.bottom=this.bottom,t.end=this.end,t}}})(),Border=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol();return class extends LookBase{constructor(){super(...arguments),this.edge="all",this.width=1,this.style="solid",this.color=null}set edge(e){this[t]=e}get edge(){return this[t]}set width(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[e]=t}get width(){return this[e]}set style(t){this[s]=t}get style(){return this[s]}set color(t){t=null!=t?t[Color.to]():Color.empty,this[i]=t}get color(){return this[i]}addTo(t){let e=function(e){LookBase.set(t,`border${e}`,`${this.width} ${this.style} ${this.color}`)}.bind(this);if("all"==this.edge)e("");else for(let t of LookBase.mapFromLogicalName(this.edge).split("-"))e(`-${t}`)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.edge=this.edge,t.width=this.width,t.style=this.style,t.color=this.color,t}}})(),BorderRadius=(()=>{let t=Symbol(),e=Symbol(),s=Symbol();return class extends LookBase{constructor(){super(...arguments),this.corner="all",this.width=null,this.height=null}set corner(e){this[t]=e}get corner(){return this[t]}set width(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[e]=t}get width(){return this[e]}set height(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[s]=t}get height(){return this[s]}set all(t){this.width=t,this.height=t}addTo(t){let e=LookBase.mapFromLogicalName(this.corner),s=function(e,s){null==s&&(s=" "),LookBase.set(t,`border${e}-radius`,`${this.width}${s}${this.height}`)}.bind(this);"all"==e?s("","/"):e.includes("-")?s(`-${e}`):"top"==this.corner||"bottom"==this.corner?(s(`-${e}-left`),s(`-${e}-right`)):(s(`-top-${e}`),s(`-bottom-${e}`))}toJSON(){let t=super.toJSON?super.toJSON():{};return t.corner=this.corner,t.width=this.width,t.height=this.height,t}}})(),ColorStop=(()=>{let t=Symbol(),e=Symbol();return class{constructor(){this.color=null,this.position=null}set color(e){e=null!=e?e[Color.to]():Color.empty,this[t]=e}get color(){return this[t]}set position(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[e]=t}get position(){return this[e]}[String.to](){return`${this.color} ${this.position}`}toJSON(){let t={};return t.color=this.color,t.position=this.position,t}}})(),LinearGradient=(()=>{let t=Symbol(),e=Symbol(),s=Symbol();return class extends LookBase{constructor(){super(...arguments),this.direction=180,this.colors=null,this.repeatable=null}set direction(e){e=null!=e?e[RealNumber.to]():RealNumber.empty,this[t]=e}get direction(){return this[t]}set colors(t){t=null!=t?t[List.to]():List.empty,this[e]=t}get colors(){return this[e]}set repeatable(t){t=null!=t?t[Boolean.to]():Boolean.empty,this[s]=t}get repeatable(){return this[s]}[Symbol.add](t,e){Color.isObjectModelOf(t)&&(t=(new ColorStop).fillWith({color:t,position:(new UnitValue).fillWith({value:e?100:0,unit:"%"})})),this.colors.add(t)}addTo(t){1==this.colors.size&&this.colors.add(this.colors[0]),LookBase.append(t,"background",`${this.repeatable?"repeating-":""}linear-gradient(${this.direction}deg,${this.colors.join()})`)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.direction=this.direction,t.colors=this.colors,t.repeatable=this.repeatable,t}}})(),RadialGradient=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol(),o=Symbol();return class extends LookBase{constructor(){super(...arguments),this.shape="ellipse",this.position=null,this.extent="farthest-corner",this.colors=null,this.repeatable=null}set shape(e){this[t]=e}get shape(){return this[t]}set position(t){t=null!=t?t[PositionValue.to]():PositionValue.empty,this[e]=t}get position(){return this[e]}set extent(t){this[s]=t}get extent(){return this[s]}set colors(t){t=null!=t?t[List.to]():List.empty,this[i]=t}get colors(){return this[i]}set repeatable(t){t=null!=t?t[Boolean.to]():Boolean.empty,this[o]=t}get repeatable(){return this[o]}[Symbol.add](t,e){Color.isObjectModelOf(t)&&(t=(new ColorStop).fillWith({color:t,position:(new UnitValue).fillWith({value:e?100:0,unit:"%"})})),this.colors.add(t)}addTo(t){1==this.colors.size&&this.colors.add(this.colors[0]),LookBase.append(t,"background",`${this.repeatable?"repeating-":""}radial-gradient(${this.shape} ${this.extent} at ${this.position},${this.colors.join()})`)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.shape=this.shape,t.position=this.position,t.extent=this.extent,t.colors=this.colors,t.repeatable=this.repeatable,t}}})(),FontLook=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol(),o=Symbol();return class extends LookBase{constructor(){super(...arguments),this.name="unset",this.size="unset",this.style="unset",this.weight="unset",this.lineHeight="unset"}set name(e){this[t]=e}get name(){return this[t]}set size(t){this[e]=t}get size(){return this[e]}set style(t){this[s]=t}get style(){return this[s]}set weight(t){this[i]=t}get weight(){return this[i]}set lineHeight(t){this[o]=t}get lineHeight(){return this[o]}addTo(t){let e=function(t,e){"unset"!=e&&LookBase.set(t,e)}.bind(this);e("font-family",this.name),e("font-size",this.size),e("font-style",this.style),e("font-weight",this.weight),e("line-height",this.lineHeight)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.name=this.name,t.size=this.size,t.style=this.style,t.weight=this.weight,t.lineHeight=this.lineHeight,t}}})(),TextLook=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol(),o=Symbol(),r=Symbol(),l=Symbol();return class extends LookBase{constructor(){super(...arguments),this.align="unset",this.verticalAlign="unset",this.color="unset",this.indent="unset",this.decoration="unset",this.transform="unset",this.overflow="unset"}set align(e){this[t]=e}get align(){return this[t]}set verticalAlign(t){this[e]=t}get verticalAlign(){return this[e]}set color(t){this[s]=t}get color(){return this[s]}set indent(t){this[i]=t}get indent(){return this[i]}set decoration(t){this[o]=t}get decoration(){return this[o]}set transform(t){this[r]=t}get transform(){return this[r]}set overflow(t){this[l]=t}get overflow(){return this[l]}addTo(t){let e=function(e,s){"unset"!=s&&LookBase.set(t,e,s)}.bind(this);e("text-align",this.align),e("vertical-align",this.verticalAlign),e("color",this.color),e("text-indent",this.indent),e("text-decoration",this.decoration),e("text-transform",this.transform),e("text-overflow",this.overflow)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.align=this.align,t.verticalAlign=this.verticalAlign,t.color=this.color,t.indent=this.indent,t.decoration=this.decoration,t.transform=this.transform,t.overflow=this.overflow,t}}})(),BoxShadow=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol(),o=Symbol(),r=Symbol();return class extends LookBase{constructor(){super(...arguments),this.horizontal=null,this.vertical=null,this.blur=null,this.color=null,this.spread=null,this.inset=null}set horizontal(e){e=null!=e?e[UnitValue.to]():UnitValue.empty,this[t]=e}get horizontal(){return this[t]}set vertical(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[e]=t}get vertical(){return this[e]}set blur(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[s]=t}get blur(){return this[s]}set color(t){t=null!=t?t[Color.to]():Color.empty,this[i]=t}get color(){return this[i]}set spread(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[o]=t}get spread(){return this[o]}set inset(t){t=null!=t?t[Boolean.to]():Boolean.empty,this[r]=t}get inset(){return this[r]}addTo(t){LookBase.append(t,"box-shadow",`${this.horizontal} ${this.vertical} ${this.blur} ${this.spread} ${this.color}${this.inset?" inset":""}`)}static clear(){return(new LookDefinition).fillWith({boxShadow:"unset"})}toJSON(){let t=super.toJSON?super.toJSON():{};return t.horizontal=this.horizontal,t.vertical=this.vertical,t.blur=this.blur,t.color=this.color,t.spread=this.spread,t.inset=this.inset,t}}})(),TextShadow=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol();return class extends LookBase{constructor(){super(...arguments),this.horizontal=null,this.vertical=null,this.blur=null,this.color=null}set horizontal(e){e=null!=e?e[UnitValue.to]():UnitValue.empty,this[t]=e}get horizontal(){return this[t]}set vertical(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[e]=t}get vertical(){return this[e]}set blur(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[s]=t}get blur(){return this[s]}set color(t){t=null!=t?t[Color.to]():Color.empty,this[i]=t}get color(){return this[i]}addTo(t){LookBase.append(t,"text-shadow",`${this.horizontal} ${this.vertical} ${this.blur} ${this.color}`)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.horizontal=this.horizontal,t.vertical=this.vertical,t.blur=this.blur,t.color=this.color,t}}})(),LookShadow=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol();return class extends LookBase{constructor(){super(...arguments),this.horizontal=null,this.vertical=null,this.blur=null,this.color=null}set horizontal(e){e=null!=e?e[UnitValue.to]():UnitValue.empty,this[t]=e}get horizontal(){return this[t]}set vertical(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[e]=t}get vertical(){return this[e]}set blur(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[s]=t}get blur(){return this[s]}set color(t){t=null!=t?t[Color.to]():Color.empty,this[i]=t}get color(){return this[i]}addTo(t){LookBase.append(t,"filter",`drop-shadow(${this.horizontal} ${this.vertical} ${this.blur} ${this.color})`," ")}toJSON(){let t=super.toJSON?super.toJSON():{};return t.horizontal=this.horizontal,t.vertical=this.vertical,t.blur=this.blur,t.color=this.color,t}}})(),LookOpacity=(()=>{let t=Symbol();return class extends LookBase{constructor(){super(...arguments),this.amount=null}set amount(e){e=null!=e?e[RealNumber.to]():RealNumber.empty,this[t]=e}get amount(){return this[t]}addTo(t){LookBase.set(t,"opacity",this.amount/100)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.amount=this.amount,t}}})(),LookGrayscale=(()=>{let t=Symbol();return class extends LookBase{constructor(){super(...arguments),this.amount=null}set amount(e){e=null!=e?e[RealNumber.to]():RealNumber.empty,this[t]=e}get amount(){return this[t]}addTo(t){LookBase.append(t,"filter",`grayscale(${this.amount}%)`," ")}toJSON(){let t=super.toJSON?super.toJSON():{};return t.amount=this.amount,t}}})(),LookBlur=(()=>{let t=Symbol();return class extends LookBase{constructor(){super(...arguments),this.amount=null}set amount(e){e=null!=e?e[UnitValue.to]():UnitValue.empty,this[t]=e}get amount(){return this[t]}addTo(t){LookBase.append(t,"filter",`blur(${this.amount})`," ")}toJSON(){let t=super.toJSON?super.toJSON():{};return t.amount=this.amount,t}}})(),LookVector=(()=>{let t,e,s,i=Symbol(),o=Symbol(),r=Symbol();class l{constructor(){this.x=null,this.y=null,this.z=null}set x(t){t=null!=t?t[RealNumber.to]():RealNumber.empty,this[i]=t}get x(){return this[i]}set y(t){t=null!=t?t[RealNumber.to]():RealNumber.empty,this[o]=t}get y(){return this[o]}set z(t){t=null!=t?t[RealNumber.to]():RealNumber.empty,this[r]=t}get z(){return this[r]}set all(t){this.x=t,this.y=t,this.z=t}static set X(e){t=e}static get X(){return t}static set Y(t){e=t}static get Y(){return e}static set Z(t){s=t}static get Z(){return s}toJSON(){let t={};return t.x=this.x,t.y=this.y,t.z=this.z,t}}return l.Z=(new l).fillWith({z:1}),l.Y=(new l).fillWith({y:1}),l.X=(new l).fillWith({x:1}),l})(),LookTransform=(()=>{let t=Symbol();return class extends LookBase{constructor(){super(...arguments),this.origin=null}set origin(e){e=null!=e?e[PositionValue.to]():PositionValue.empty,this[t]=e}get origin(){return this[t]}addTo(t){LookBase.set(t,"transform-origin",this.origin)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.origin=this.origin,t}}})(),LookTranslate=(()=>{let t=Symbol(),e=Symbol(),s=Symbol();return class extends LookBase{constructor(){super(...arguments),this.x=null,this.y=null,this.z=null}set x(e){e=null!=e?e[UnitValue.to]():UnitValue.empty,this[t]=e}get x(){return this[t]}set y(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[e]=t}get y(){return this[e]}set z(t){t=null!=t?t[UnitValue.to]():UnitValue.empty,this[s]=t}get z(){return this[s]}set all(t){this.x=t,this.y=t,this.z=t}addTo(t){LookBase.append(t,"transform",`translate3d(${this.x},${this.y},${this.z})`," ")}toJSON(){let t=super.toJSON?super.toJSON():{};return t.x=this.x,t.y=this.y,t.z=this.z,t}}})(),LookSkew=(()=>{let t=Symbol(),e=Symbol();return class extends LookBase{constructor(){super(...arguments),this.x=null,this.y=null}set x(e){e=null!=e?e[RealNumber.to]():RealNumber.empty,this[t]=e}get x(){return this[t]}set y(t){t=null!=t?t[RealNumber.to]():RealNumber.empty,this[e]=t}get y(){return this[e]}set all(t){this.x=t,this.y=t}addTo(t){LookBase.append(t,"transform",`skew(${this.x}deg,${this.y}deg)`," ")}toJSON(){let t=super.toJSON?super.toJSON():{};return t.x=this.x,t.y=this.y,t}}})(),LookScale=(()=>{let t=Symbol(),e=Symbol(),s=Symbol();return class extends LookBase{constructor(){super(...arguments),this.x=null,this.y=null,this.z=null}set x(e){e=null!=e?e[RealNumber.to]():RealNumber.empty,this[t]=e}get x(){return this[t]}set y(t){t=null!=t?t[RealNumber.to]():RealNumber.empty,this[e]=t}get y(){return this[e]}set z(t){t=null!=t?t[RealNumber.to]():RealNumber.empty,this[s]=t}get z(){return this[s]}set all(t){this.x=t,this.y=t,this.z=t}addTo(t){LookBase.append(t,"transform",`scale3d(${this.x},${this.y},${this.z})`," ")}toJSON(){let t=super.toJSON?super.toJSON():{};return t.x=this.x,t.y=this.y,t.z=this.z,t}}})(),LookRotate=(()=>{let t=Symbol(),e=Symbol();return class extends LookBase{constructor(){super(...arguments),this.angle=null,this.vector=LookVector.Z}set angle(e){e=null!=e?e[RealNumber.to]():RealNumber.empty,this[t]=e}get angle(){return this[t]}set vector(t){t=null!=t?t[LookVector.to]():LookVector.empty,this[e]=t}get vector(){return this[e]}addTo(t){LookBase.append(t,"transform",`rotate3d(${this.vector.x},${this.vector.y},${this.vector.z},${this.angle}deg)`," ")}toJSON(){let t=super.toJSON?super.toJSON():{};return t.angle=this.angle,t.vector=this.vector,t}}})(),LookPerspective=(()=>{let t=Symbol(),e=Symbol();return class extends LookBase{constructor(){super(...arguments),this.length=null,this.origin=null}set length(e){e=null!=e?e[UnitValue.to]():UnitValue.empty,this[t]=e}get length(){return this[t]}set origin(t){t=null!=t?t[PositionValue.to]():PositionValue.empty,this[e]=t}get origin(){return this[e]}addTo(t){LookBase.append(t,"transform",`perspective(${this.length})`," "),LookBase.set(t,"perspective-origin",this.origin)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.length=this.length,t.origin=this.origin,t}}})(),Layout=class extends LookBase{constructor(){super(...arguments)}},LookDefinition=class{[Symbol.add](t){this[t[0]]=t[1]}addTo(t){for(let e of this)t.style.setProperty(e[0],e[1])}removeFrom(t){}},LookMixin=class extends Set{constructor(){super(...arguments)}addTo(t){for(let e of this)e.addTo(t)}removeFrom(t){for(let e of this)e.removeFrom(t)}},LookState=(()=>{let t=Symbol(),e=Symbol(),s=Symbol();class i extends LookBase{constructor(){super(...arguments),this.name="base",this.when=null,this.changes=null}set name(e){e=null!=e?e[String.to]():String.empty,this[t]=e}get name(){return this[t]}set when(t){t=null!=t?t[Boolean.to]():Boolean.empty,this[e]=t}get when(){return this[e]}set changes(t){t=null!=t?t[Set.to]():Set.empty,this[s]=t}get changes(){return this[s]}[Symbol.add](t){this.changes.add(t)}addTo(t){t.states?t.lastState.size&&t.classes.toggle("dummy-state"):t.fillWith({states:new Map,lastState:new Set},function*(){t.style.cssText&&(yield(new i).fillWith({name:"inlineStyle",when:!0},[(new LookDefinition).fillWith({},function*(){for(let e of t.style)yield[e,t.style.getPropertyValue(e)]},this)]))},this),t.states.set(this.name,this)}toJSON(){let t=super.toJSON?super.toJSON():{};return t.name=this.name,t.when=this.when,t.changes=this.changes,t}}let o=function(t,e){for(let s of t.source.path)s.states&&s.classes.remove(e)}.bind(this),r=function(t,e){for(let s of t.source.path)s.states&&s.classes.add(e)}.bind(this);return document.fillWith({},[(new When).fillWith({name:"focusin",resolver(t){r(t,"in-focus")}}),(new When).fillWith({name:"focusout",resolver(t){o(t,"in-focus")}}),(new When).fillWith({name:"mouseover",resolver(t){r(t,"in-over")}}),(new When).fillWith({name:"mouseout",resolver(t){o(t,"in-over")}}),(new When).fillWith({name:"mousedown",resolver(t){r(t,"is-pressed")}}),(new When).fillWith({name:"mouseup",resolver(t){o(t,"is-pressed")}})]),new MutationObserver(function(t){let e=new Set,s=function(t){let s=function(e){for(let s of e.changes)t.lastState.add(s),s.addTo(t)}.bind(this);if(t.states&&!e.includes(t)){for(let e of t.lastState)e.removeFrom(t);t.lastState.clear(),t.style.fillWith({cssText:"",overflow:"hidden",position:"relative"}),t.states.includes("base")&&s(t.states.get("base"));for(let e of t.states){Sequence.isObjectModelOf(e)&&(e=e[List.to]());let i=e[Symbol.get](1);(t.classes.includes(i.name)||i.when)&&s(i)}e.add(t)}}.bind(this),i=new Event("in-view"),o=new Event("out-of-view"),r=function(t){for(let e of t)e.nodes&&(o.sendTo(e),r(e.nodes))}.bind(this),l=function(t){for(let e of t)e.nodes&&(s(e),i.sendTo(e),l(e.nodes))}.bind(this);for(let e of t)"childList"==e.type?(r(e.removedNodes),l(e.addedNodes)):s(e.target)}.bind(this)).observe(document,{subtree:!0,childList:!0,attributes:!0,attributeFilter:(new List).fillWith({},["class"])}),i})(),PropertyChanges=(()=>{let t=Symbol(),e=Symbol(),s=Symbol();return class{constructor(){this.target=null,this.properties=null,this.state=null}set target(e){this[t]=e}get target(){return this[t]}set properties(t){t=null!=t?t[Set.to]():Set.empty,this[e]=t}get properties(){return this[e]}set state(t){this[s]=t}get state(){return this[s]}[Symbol.add](t){this.properties.add(t)}addTo(t){let e=this.target?this.target():t;for(let t of Object.getOwnPropertyNames(this))e[t]=this[t];this.state&&e.classes.add(this.state);for(let t of this.properties)t.addTo(e)}removeFrom(t){let e=this.target?this.target():t;this.state&&e.classes.remove(this.state);for(let t of this.properties)t.removeFrom(e)}toJSON(){let t={};return t.target=this.target,t.properties=this.properties,t.state=this.state,t}}})(),Color=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol();class o{constructor(){this.red=null,this.green=null,this.blue=null,this.alpha=255}set red(e){e=null!=e?e[Integer.to]():Integer.empty,this[t]=e}get red(){return this[t]}set green(t){t=null!=t?t[Integer.to]():Integer.empty,this[e]=t}get green(){return this[e]}set blue(t){t=null!=t?t[Integer.to]():Integer.empty,this[s]=t}get blue(){return this[s]}set alpha(t){t=null!=t?t[Integer.to]():Integer.empty,this[i]=t}get alpha(){return this[i]}[String.to](){return`rgba(${this.red},${this.green},${this.blue},${this.alpha/255})`}static fromGray(t,e){return null==e&&(e=255),(new o).fillWith({red:t,green:t,blue:t,alpha:e})}toJSON(){let t={};return t.red=this.red,t.green=this.green,t.blue=this.blue,t.alpha=this.alpha,t}}return o})(),LookRule=(()=>{let t,e=Symbol(),s=Symbol();class i{constructor(){this.selector=null,this.properties=null}set selector(t){t=null!=t?t[String.to]():String.empty,this[e]=t}get selector(){return this[e]}set properties(t){t=null!=t?t[List.to]():List.empty,this[s]=t}get properties(){return this[s]}[Symbol.add](t){this.properties.add(t)}addTo(t){let e,s="";CSSRule.isObjectModelOf(t)?(e=t.parentStyleSheet,s=t.selectorText):e=(t=i.ruleSet).sheet;let o=e.insertRule(`${s}${this.selector}{}`,e.cssRules.length),r=e.cssRules[o];for(let t of this.properties)t.addTo(r)}static set ruleSet(e){t=e}static get ruleSet(){return t}toJSON(){let t={};return t.selector=this.selector,t.properties=this.properties,t}}return i.ruleSet=HTMLElement.create("style").fillWith({parentNode:document.head}),document.fillWith({},[(new i).fillWith({selector:"*"},[(new LookDefinition).fillWith({"box-sizing":"border-box",margin:0,padding:0,border:0,"font-family":"inherit","font-size":"100%","text-align":"start",transition:"background .5s ease, opacity .5s ease-out, transform .5s, width .5s, height .5s, box-shadow .5s, border .5s"})]),(new i).fillWith({selector:":focus"},[(new LookDefinition).fillWith({outline:0})]),(new i).fillWith({selector:"img"},[(new LookDefinition).fillWith({"max-width":"100%"})]),(new i).fillWith({selector:"button"},[(new LookDefinition).fillWith({background:"none","text-align":"center",cursor:"pointer"}),(new InnerSpacing).fillWith({all:8})])]),i})(),LookFontFace=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol();return class{constructor(){this.source=null,this.name=null,this.style="normal",this.weight="normal"}set source(e){e=null!=e?e[WebAddress.to]():WebAddress.empty,this[t]=e}get source(){return this[t]}set name(t){t=null!=t?t[String.to]():String.empty,this[e]=t}get name(){return this[e]}set style(t){this[s]=t}get style(){return this[s]}set weight(t){this[i]=t}get weight(){return this[i]}addTo(t){t=LookRule.ruleSet,Sequence.isObjectModelOf(t)&&(t=t[List.to]());let e=t[Symbol.get]("sheet"),s=e.insertRule("@font-face{}",e.cssRules.length);e.cssRules[s].fillWith({},[(new LookDefinition).fillWith({src:`url(${this.source})`,"font-family":this.name,"font-style":this.style,"font-weight":this.weight})])}toJSON(){let t={};return t.source=this.source,t.name=this.name,t.style=this.style,t.weight=this.weight,t}}})(),DistributingChildren=(()=>{let t=Symbol(),e=Symbol(),s=Symbol(),i=Symbol(),o=Symbol();return document.fillWith({},[(new LookRule).fillWith({selector:".MyGridView"},[(new LookDefinition).fillWith({display:"flex","flex-wrap":"wrap"})]),(new LookRule).fillWith({selector:".MyGridView.filledSpace::after"},[(new LookDefinition).fillWith({content:"''",width:"var(--filledSpace, 0)"})])]),class extends Layout{constructor(){super(...arguments),this.containerAlignment="space-between",this.spacing=16,this.itemWidth="fit-content",this.itemHeight="max-content",this.itemAlignment="start"}set containerAlignment(e){this[t]=e}get containerAlignment(){return this[t]}set spacing(t){t=null!=t?t[Integer.to]():Integer.empty,this[e]=t}get spacing(){return this[e]}set itemWidth(t){this[s]=t}get itemWidth(){return this[s]}set itemHeight(t){this[i]=t}get itemHeight(){return this[i]}set itemAlignment(t){this[o]=t}get itemAlignment(){return this[o]}addTo(t){let e,s=function(){this.execute(t)}.bind(this);t.fillWith({classes:"MyGridView"},[(new When).fillWith({name:"in-view",resolver(){s(),(e=new MutationObserver(s)).observe(t,{childList:!0}),visualViewport.addEventListener("resize",s,{passive:!0})}}),(new When).fillWith({name:"out-of-view",resolver(){e.disconnect(),visualViewport.removeEventListener("resize",s)}})])}execute(t){if(!t.firstChild)return;let e=function(t){return"start"==t||"end"==t?`${t}-value`:t}.bind(this),s=(new List).fillWith({},["start","end","center"]).includes(this.containerAlignment)||"stretch"==this.itemWidth,i=getComputedStyle(t),o=t.getBoundingClientRect().width-(i.paddingLeft[RealNumber.to]()+i.paddingRight[RealNumber.to]()),r=getComputedStyle(t).direction,l=t.firstChild.getBoundingClientRect().width,n=o%l,h=Math.floor(o/l),a=t.nodes.length%h,u=Math.ceil(t.nodes.length/h),c=h-a,m=c*l;m+=s?c*this.spacing:n/h*(c-1),t.classes.toggle("filledSpace",u>1&&m),t.fillWith({},[(new LookState).fillWith({name:"MyGridView",when:!0},[(new LookDefinition).fillWith({"justify-content":1==h?"space-around":e(this.containerAlignment),"align-items":"max-content"==this.itemHeight?"stretch":e(this.itemAlignment),"--filledSpace":`${m}px`})])]);let d="rtl"==r?"margin-right":"margin-left";{let e=0;for(let i of t.nodes)i.fillWith({},[(new LookState).fillWith({name:"MyGridViewItem",when:!0},[(new LookDefinition).fillWith({margin:0,"margin-top":h<=e?`${this.spacing}px`:0,"flex-grow":"stretch"==this.itemWidth?1:0},[Array.of(d,s&&e%h!=0?`${this.spacing}px`:0)])])]),e+=1}}toJSON(){let t=super.toJSON?super.toJSON():{};return t.containerAlignment=this.containerAlignment,t.spacing=this.spacing,t.itemWidth=this.itemWidth,t.itemHeight=this.itemHeight,t.itemAlignment=this.itemAlignment,t}}})(),PositionRelative=(()=>{let t=Symbol(),e=Symbol(),s=Symbol();return class extends Layout{constructor(){super(...arguments),this.origin=null,this.distance=(new PositionValue).fillWith({all:0}),this.container="parent"}set origin(e){e=null!=e?e[PositionValue.to]():PositionValue.empty,this[t]=e}get origin(){return this[t]}set distance(t){t=null!=t?t[PositionValue.to]():PositionValue.empty,this[e]=t}get distance(){return this[e]}set container(t){this[s]=t}get container(){return this[s]}addTo(t){t.fillWith({},[(new LookDefinition).fillWith({position:"parent"==this.container?"absolute":"fixed",left:`calc(${this.origin.x} + ${this.distance.x})`,top:`calc(${this.origin.y} + ${this.distance.y})`,transform:`translate(-${this.origin.x}, -${this.origin.y})`})])}toJSON(){let t=super.toJSON?super.toJSON():{};return t.origin=this.origin,t.distance=this.distance,t.container=this.container,t}}})(),Group=class{constructor(){return HTMLElement.create("div")}},EditableList=(()=>{let t=Symbol();return class{constructor(){this.selectRender=null}set selectRender(e){e=null!=e?e[Function.to]():Function.empty,this[t]=e}get selectRender(){return this[t]}toJSON(){let t={};return t.selectRender=this.selectRender,t}}})(),EditableText=(()=>{return document.fillWith({},[(new LookRule).fillWith({selector:"input"},[(new InnerSpacing).fillWith({all:8})])]),class{constructor(){return HTMLElement.create("input").fillWith({})}}})(),NavigationLink=(()=>{return document.fillWith({},[(new LookRule).fillWith({selector:"a"},[(new LookDefinition).fillWith({"text-decoration":"none",cursor:"pointer",color:"inherit"})])]),class{constructor(){return HTMLElement.create("a")}}})(),NavigationLinks=class{constructor(){return HTMLElement.create("nav")}},LineBreak=class{constructor(){return HTMLElement.create("br")}},Paragraph=class{constructor(){return HTMLElement.create("p")}},UserInterfaceElement=(()=>{let t=Symbol();class e extends EventTarget{constructor(){super(...arguments),this.renderedElement=null}set renderedElement(e){this[t]=e}get renderedElement(){return this[t]}whenObjectStateChanged(){this.renderedElement&&this.renderedElement.replaceWith(this.render())}[Node.to](){return this.render()}render(){return this.renderedElement=this.renderer(),e.isObjectModelOf(this.renderedElement)&&(this.renderedElement=this.renderedElement.render()),this.renderedElement}renderer(){}toJSON(){let t=super.toJSON?super.toJSON():{};return t.renderedElement=this.renderedElement,t}}return e})(),HistoryRecord=(()=>{let t=Symbol(),e=Symbol();return class{constructor(){this.pageAddress=null,this.scrollPosition=null}set pageAddress(e){this[t]=e}get pageAddress(){return this[t]}set scrollPosition(t){t=null!=t?t[PositionValue.to]():PositionValue.empty,this[e]=t}get scrollPosition(){return this[e]}toJSON(){let t={};return t.pageAddress=this.pageAddress,t.scrollPosition=this.scrollPosition,t}}})(),Router=(()=>{let t=Symbol(),e=Symbol();return window.fillWith({},[(new When).fillWith({name:"hashchange",resolver(){}})]),class{constructor(){this.rules=null,this.root="/"}set rules(e){e=null!=e?e[Set.to]():Set.empty,this[t]=e}get rules(){return this[t]}set root(t){t=null!=t?t[String.to]():String.empty,this[e]=t}get root(){return this[e]}transitionTo(){}resolve(){}toJSON(){let t={};return t.rules=this.rules,t.root=this.root,t}}})(); \ No newline at end of file From 8d06b6d6647e75818e3e7d18dd3b6ff8daaaa4ef Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:46:48 +0000 Subject: [PATCH 02/32] Delete light-framework.js --- light-framework.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 light-framework.js diff --git a/light-framework.js b/light-framework.js deleted file mode 100644 index 1da61ec..0000000 --- a/light-framework.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";{(()=>{let e=new Function("object","property","delete object[property]"),t=function(t,s,n){for(let r of Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s))){let i=Object.getOwnPropertyDescriptor(s,r);null==i.value&&(i.set||e(i,"set"),i.get||e(i,"get")),i.configurable=!1,n.has(r)||Object.defineProperty(t,r,i)}}.bind(this),n=new Set(Array.of("name","length","prototype")),r=new Set(Array.of("constructor"));Function.prototype.implements=function(e){return t(this,e,n),t(this.prototype,e.prototype,r),this};let i=function(){return this},l=Object.prototype.hasOwnProperty,o=Symbol.for("to");Symbol.implements((()=>{class e{}return e.set=Symbol(),e.get=Symbol(),e.add=Symbol(),e.clone=Symbol(),e.objectModel=Symbol(),e})());class a{get to(){if(l.call(this,o))return this[o];{let e=Symbol(`to${this.name}`);return this.prototype[e]=i,this[o]=e,e}}get empty(){return new this}isObjectModelOf(e){{let t=this.prototype;for(;e;)if((e=e[Symbol.objectModel])==t)return!0}return!1}[Symbol.clone](){return this}schedule(e,t){null==e&&(e=0),null==t&&(t=1);let s,n=this,r=function(){s=setTimeout(function(){(t-=1)&&r(),n()}.bind(this),e)}.bind(this);return r(),(new Object).fillWith({stop(){clearTimeout(s)}})}}Function.implements(a),Object.implements((()=>{let t;class n{static*getElementsOf(e){for(let t of Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)))yield new s(t,e[t])}static set removeElementOf(e){t=e}static get removeElementOf(){return t}static setBaseOf(e,t){e[Symbol.objectModel]=t,e.prototype[Symbol.objectModel]=t.prototype}[Symbol.iterator](){return Object.getElementsOf(this)}set[Symbol.objectModel](e){Object.setPrototypeOf(this,e)}get[Symbol.objectModel](){return Object.getPrototypeOf(this)}[Symbol.clone](e){e=null!=e?e[Boolean.to]():Boolean.empty;let t=new(0,this.constructor);for(let s of Object.getElementsOf(this)){Sequence.isObjectModelOf(s)&&(s=s[List.to]());let n=s[Symbol.get]("name"),r=s[Symbol.get]("value");t[n]=e&&null!=r?r[Symbol.clone](e):r}return t}[Symbol.get](e){return this[e]}fillWith(e,t,s){let n=this;if(Object.assign(n,e),t){let e=0;for(let r of s?t.call(s):t)n[Symbol.add](r,e),e+=1}return n.whenObjectStateChanged&&n.whenObjectStateChanged(),n}}return n.removeElementOf=e,n})())})(),(()=>{let e;class t{static set empty(t){e=t}static get empty(){return e}static[Symbol.hasInstance](e){return null!=e&&e.constructor==this}[Symbol.clone](){return this}}t.empty=!1,Boolean.implements(t)})(),(()=>{let e;class t{static set to(t){e=t}static get to(){return e}static*empty(){}*filter(e){null==e&&(e=function(e){return null!=e}.bind(this));for(let t of this)e(t)&&(yield t)}*map(e){for(let t of this)yield e(t)}forEach(e){for(let t of this)e(t)}forAllExists(e){for(let t of this)if(!e(t))return!1;return!0}forAnyExists(e){for(let t of this)if(e(t))return!0;return!1}includes(e){return this.forAnyExists(function(t){return e==t}.bind(this))}find(e){for(let t of this)if(e(t))return t}}t.to=Symbol.iterator,this.Sequence=function*(){}.bind(this)[Symbol.objectModel],Sequence.implements(t)})(),(()=>{class e{}this.AsyncSequence=e})();let e=(()=>{let e;class t{static set empty(t){e=t}static get empty(){return e}static*range(e,t,s){if(null==t&&(t=0),null==s&&(s=1),e>t&&!t)for(;e;)yield e-=s;else for(s*=Math.sign(t-e);e{let t;class s{static set empty(e){t=e}static get empty(){return t}[Sequence.to](){return e.range(this)}[e.to](){return this>>>0}static[Symbol.hasInstance](e){return null!=e&&e.constructor==this}[Symbol.clone](){return this}}s.empty=0,this.RealNumber=Number,RealNumber.implements(s)})(),(()=>{let t,s;class n{static set to(e){t=e}static get to(){return t}static set empty(e){s=e}static get empty(){return s}static[Symbol.hasInstance](e){return null!=e&&e.constructor==this}[Symbol.clone](){return this}[e.to](e){null==e&&(e=10);let t=Number.parseInt(this,e);if(Number.isNaN(t))throw Number.NaN;return t}[RealNumber.to](){let e=Number.parseFloat(this);if(Number.isNaN(e))throw Number.NaN;return e}clean(){return this.replace(RegExp.from`\x20{2,}`," ").replace(RegExp.from`[\r\n|\r]`,"\n").trim()}get size(){return this.length}trimStart(){return this.trimLeft()}trimEnd(){return this.trimRight()}}n.empty="",n.to="toString",String.implements(n)})(),(()=>{class e{[Symbol.clone](e){return(new(0,this.constructor)).fillWith({},function*(){for(let t of this)yield e&&null!=t?t[Symbol.clone](e):t},this)}[Symbol.add](e){this.add(e)}addAll(e){e=null!=e?e[Sequence.to]():Sequence.empty;for(let t of e)this.add(t);return this}includes(e,t){{let s=0;for(let n of this){if(n==e&&s>=t)return!0;s+=1}}return!1}excludes(e,t){return!this.includes(e,t)}get isEmpty(){return 0==this.size}get size(){return this.length}set size(e){this.length=e}}return this.Collection=e,e})()),s=((()=>{class s{addAll(e,t){e=null!=e?e[Sequence.to]():Sequence.empty,null!=t?this.splice(t,0,...e):this.push(...e)}add(e,t){return null!=t?this.splice(t,0,e):this.push(e),this}clear(){return this.size=0,this}trim(e){this.size=e}remove(e){let t=this.indexOf(e);return t>-1&&(this.splice(t,1),!0)}replaceWith(t,s,n){return t=null!=t?t[e.to]():e.empty,s=null!=s?s[e.to]():e.empty,null==n&&(n=new List),n=null!=n?n[Sequence.to]():Sequence.empty,this.splice(t,s,...n)}orderBy(e){return this.sort(e)}*[Sequence.to](){for(let t of e.range(0,this.size))yield this[t]}}this.List=Array,List.implements(s),Object.setBaseOf(List,t),Sequence.implements(class{[List.to](){return(new List).fillWith({},function*(){for(let e of this)yield e},this)}})})(),(()=>{class e{remove(e){return this.delete(e)}includes(e){return this.has(e)}}Set.implements(e),Object.setBaseOf(Set,t)})(),(()=>{class e{remove(e){return this.delete(e)}includes(e){return this.has(e)}[Symbol.get](e){return this.get(e)}add(e){this.set(e[0],e[1])}}Map.implements(e),Object.setBaseOf(Map,t)})(),(()=>{return List.implements(class{get name(){return this[0]}get value(){return this[1]}}),class{constructor(){this.name=arguments[0],this.value=arguments[1]}get 0(){return this.name}get 1(){return this.value}*[Sequence.to](){yield this.name,yield this.value}}})());(()=>{class e{static from(e,...t){return new RegExp(`${e.raw[0]}${t.map(function(t,s){return`${t}${e.raw[s+1]}`}.bind(this)).join("")}`,"g")}hasMatch(e){return this.test(e)}*findAllMatches(e,t){null==t&&(t=0),this.lastIndex=t;{let t;for(;t=this.exec(e);)t.start=t.position,t.pattern=this,yield t}}[Symbol.clone](){return new RegExp(this.source,this.flags)}}RegExp.implements(e)})();Math.fillWith({modulo:(e,t)=>e-t*Math.floor(e/t)}),JSON.fillWith({decode(e){return JSON.parse(e,function(e,t){return null==t?new Reference:(t.constructor==Object&&(t=new Map(t)),t)}.bind(this))},encode:e=>JSON.stringify(e),to:"toJSON"});(()=>{class e{set getter(e){this.get=e}set setter(e){this.set=e}}this.Accessor=e})()}{let e=(()=>{let e=Symbol(),t=Symbol(),s=Symbol(),n=Symbol(),r=Symbol();class i{constructor(){this.name=null,this.resolver=null,this.phase="bottom-up",this.once=null,this.passive=null}set name(t){t=null!=t?t[String.to]():String.empty,this[e]=t}get name(){return this[e]}set resolver(e){e=null!=e?e[Function.to]():Function.empty,this[t]=e}get resolver(){return this[t]}set phase(e){this[s]=e}get phase(){return this[s]}set once(e){e=null!=e?e[Boolean.to]():Boolean.empty,this[n]=e}get once(){return this[n]}set passive(e){e=null!=e?e[Boolean.to]():Boolean.empty,this[r]=e}get passive(){return this[r]}addTo(e){e.addEventListener(this.name,this.resolver,{capture:"top-down"==this.phase,once:this.once,passive:this.passive})}removeFrom(e){e.removeEventListener(this.name,this.resolver,{capture:"top-down"==this.phase})}toJSON(){let e={};return e.name=this.name,e.resolver=this.resolver,e.phase=this.phase,e.once=this.once,e.passive=this.passive,e}}return this.When=i,i})();Node.implements(class{addTo(e){e.append(this)}removeFrom(e){this.remove()}}),String.implements(class{addTo(e){e.append(new Text(this))}removeFrom(e){throw new Error(`String#removeFrom ${this}`)}}),DOMTokenList.implements(class{includes(e){return this.contains(e)}clear(){return this.remove(...this),this}}),NamedNodeMap.implements(class{set(e,t,s){null==s&&(s=null);let n=document.createAttributeNS(s,e);return n.value=t,this.setNamedItemNS(n),this}get(e,t){null==t&&(t=null);let s=this.getNamedItemNS(t,e);if(s)return s.value}includes(e,t){return null==t&&(t=null),null!=this.get(e,t)}remove(e,t){return null==t&&(t=null),this.removeNamedItemNS(t,e),this}}),HTMLElement.implements(class{static create(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}}),SVGElement.implements(class{static create(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}}),EventTarget.implements(class{[Symbol.add](e){e.addTo(this)}});{Object.setBaseOf(NodeList,Collection);let e=Symbol();NodeList.implements(class{add(t,s){return t=null!=t?t[Node.to]():Node.empty,null==s&&(s=this.size),this.size>s?this[s].before(t):this[e].append(t),this}clear(){for(let e of this)e.remove();return this}*[Sequence.to](){if(this[e]){let e,t=this[0];for(;t;)yield t,t=e=t.nextSibling}else for(let e of Integer.range(0,this.size))yield this[e]}}),Element.implements(class{set classes(e){String.isObjectModelOf(e)?this.classList.add(e):this.classList.add(...e)}get classes(){return this.classList}set nodes(e){e=null!=e?e[Node.to]():Node.empty,this.innerHTML="",this.append(e)}get nodes(){return this.childNodes[e]=this,this.childNodes}find(e){let t=this.querySelector(e);if(t)return t;throw new Fault.Miss}findAll(e){return this.querySelectorAll(e)}get path(){return function*(){{let e=this;for(;e;)yield e,e=e.parentNode}}.bind(this)()}});(()=>{class e{}Node.implements(class{[e.to](){return this}set parentNode(e){e&&e.append(this)}}),String.implements(class{[Node.to](){return new Text(this)}});let t=class{[Node.to](){let e=new DocumentFragment;for(let t of this)e.append(t[Node.to]());return e}};List.implements(t),Sequence.implements(t)})()}HTMLElement.implements(class{set style(e){for(let t of e){Sequence.isObjectModelOf(t)&&(t=t[List.to]());let e=t[Symbol.get]("name"),s=t[Symbol.get]("value");this.style.setProperty(e,s)}}set dataset(e){for(let t of e){Sequence.isObjectModelOf(t)&&(t=t[List.to]());let e=t[Symbol.get]("name"),s=t[Symbol.get]("value");this.dataset[e]=s}}set _focus(e){this.focus()}}),HTMLDocument.implements((()=>{return document.scripts.fillWith({add(e){return new Promise(function(t,s){HTMLElement.create("script").fillWith({source:e,load:t,error:s,parentNode:document.head})}.bind(this))}}),class{set icons(e){HTMLElement.create("link").fillWith({rel:"icon",source:e.source,type:e.type,sizes:e.sizes,parentNode:document.head})}get icons(){return document.head.findAll("link[rel~=icon]")}set baseAddress(e){HTMLElement.create("base").fillWith({href:e,parentNode:document.head})}get baseAddress(){return this.baseURI}}})());{let e=class{set source(e){e=null!=e?e[WebAddress.to]():WebAddress.empty,this.src=e}get source(){return this.src}};for(let t of(new List).fillWith({},[HTMLScriptElement,HTMLIFrameElement,HTMLImageElement,HTMLAudioElement,HTMLVideoElement]))t.implements(e);HTMLStyleElement.implements(class{set source(e){e=null!=e?e[WebAddress.to]():WebAddress.empty,this.attributes.set("src",e),this.textContent=`@import url("${e}");`}get source(){return this.attributes.get("src")}}),HTMLLinkElement.implements(class{set source(e){e=null!=e?e[WebAddress.to]():WebAddress.empty,this.href=e}get source(){return this.href}}),HTMLAnchorElement.implements(class{set destination(e){e=null!=e?e[WebAddress.to]():WebAddress.empty,this.href=e}get destination(){return this.href}})}URL.implements((()=>{let e=new URL("scheme:");return this.WebAddress=URL,String.implements(class{[WebAddress.to](e){return null==e&&(e=document.baseAddress),new URL(this,e)}}),class{get scheme(){return this.protocol.slice(0,-1)}revoke(){WebAddress.revokeObjectURL(this)}static get empty(){return e}}})()),Request.implements(class{fetch(){return fetch(this)}}),Headers.implements(class{[Symbol.add](e){this.set(e[0],e[1])}});(()=>{this.ObjectImage=Blob;class t{get body(){return new Promise(function(t,s){let n=(new FileReader).fillWith({},[(new e).fillWith({name:"load",resolver(){t(n.result)}}),(new e).fillWith({name:"error",resolver(){s(n.error)}})]);n.readAsArrayBuffer(this)}.bind(this))}saveAs(e){let t=HTMLElement.create("a").fillWith({download:e,href:this[WebAddress.to](),parentNode:document.head});t.click(),t.remove()}[WebAddress.to](){return new WebAddress(WebAddress.createObjectURL(this))}[ObjectImage.to](e){return e?new Blob(Array.of(this),{type:e}):this}}Blob.implements(t),Object.implements(class{[ObjectImage.to](e){return new Blob(Array.of(JSON.encode(this)),{type:e?`${e}+json`:"application/json"})}}),HTMLTemplateElement.implements(class{[ObjectImage.to](e){return new Blob(Array.of(this.innerHTML),{type:e})}})})();HTMLTemplateElement.implements(class{static from(e){(function(){}).bind(this)}resolve(e){}});let t=class{},s=class{};HTMLCanvasElement.implements(class{[t.to](e){return new Promise(function(t){this.toBlob(t,"image/jpeg",e)}.bind(this))}[s.to](){return new Promise(function(e){this.toBlob(e,"image/png")}.bind(this))}}),ArrayBuffer.implements((()=>{return class{[String.to](e,t,s){return e=null!=e?e[Integer.to]():Integer.empty,null==t&&(t=this.byteLength),null==s&&(s="utf-8"),new TextDecoder(s).decode(new Uint8Array(this,e,t))}}})()),Event.implements(class{get source(){return this.target}sendTo(e){return e.dispatchEvent(this)}stop(){this.preventDefault(),this.stopImmediatePropagation()}}),MessageEvent.implements(class{sendTo(e,t){null==t&&(t="*"),e.postMessage(this.data,t)}respondWith(e){this.source.postMessage(e.data,this.origin)}});{let e=function(){new Event("AnimationFrame").sendTo(document),requestAnimationFrame(e)}.bind(this);e()}this.DataTransferItemList&&this.BroadcastChannel&&(DataTransferItemList.implements((()=>{let t=new Set,s=function(e){"clear"==e.data?t.clear():t.add(e.data)}.bind(this),n=function(e){e.sendTo(r),s(e)}.bind(this),r=new BroadcastChannel("DragDrop#items").fillWith({message:s});window.fillWith({},[(new e).fillWith({name:"dragstart",resolver(e){let t=e.dataTransfer;Sequence.isObjectModelOf(t)&&(t=t[List.to]());let s=t[Symbol.get]("items");for(let e of Integer.range(s.length)){let t=s[e];"file"==t.kind&&(n(new MessageEvent("message",{data:t.getAsFile()})),s.remove(e))}}}),(new e).fillWith({name:"dragend",resolver(e){n(new MessageEvent("message",{data:"clear"}))}})]);return class{*[Sequence.to](){for(let e of Integer.range(0,this.length))yield this[e];for(let e of t)yield(new Object).fillWith({type:e.type,get:()=>e,kind:"file",getAsFile:()=>e})}}})()),DataTransferItem.implements((()=>{let e=(()=>{let e=Symbol();return class{constructor(){this.source=null}set source(t){this[e]=t}get source(){return this[e]}get type(){return"directory"}get name(){return this.source.name}toJSON(){let e={};return e.source=this.source,e}}})();return class{get(){try{let t=this.webkitGetAsEntry();return t.isFile?this.getAsFile():(new e).fillWith({source:t})}catch(e){return this.getAsFile()}}}})()));(()=>{let t=Symbol();class s{constructor(){this.rules=null}set rules(e){e=null!=e?e[List.to]():List.empty,this[t]=e}get rules(){return this[t]}addTo(t){let s=this;t.fillWith({},[(new e).fillWith({name:"dragover",resolver(e){if(!e.defaultPrevented)for(let t of e.dataTransfer.items)try{return e.dataTransfer.dropEffect=s.rules.find(function(e){return e.type==t.type}.bind(this)).effect,void e.preventDefault()}catch(e){}}}),(new e).fillWith({name:"drop",resolver(e){for(let t of e.dataTransfer.items)try{s.rules.find(function(e){return e.type==t.type}.bind(this)).action(t.getAsFile()),e.preventDefault()}catch(e){}}})])}toJSON(){let e={};return e.rules=this.rules,e}}this.DropZone=s})();if(Selection.implements((()=>{return HTMLDocument.implements(class{get selection(){return this.getSelection()}}),class{get size(){return this.rangeCount}add(e){return this.addRange(e)}[Symbol.add](e){this.add(e)}[Symbol.get](e){return this.getRangeAt(e)}remove(e){return this.removeRange(e)}clear(){return this.removeAllRanges(),this}*[Sequence.to](){for(let e of Integer.range(0,this.size))yield this.getRangeAt(e)}}})()),Range.implements(class{[Symbol.clone](){return this.cloneRange()}includes(e){return this.intersectsNode(e)}removeContents(){return this.extractContents()}replaceWith(e){this.removeContents();let t=this;Sequence.isObjectModelOf(t)&&(t=t[List.to]());let s=t[Symbol.get]("startContainer"),n=t[Symbol.get]("startOffset");Text.isObjectModelOf(s)?s.splitText(n).before(e):s.nodes[n].before(e)}addNode(e,t){}set startContainer(e){this.setStart(e,this.startPosition)}set startPosition(e){let t=this;Sequence.isObjectModelOf(t)&&(t=t[List.to]());let s=t[Symbol.get]("startContainer");-1==e&&(e=Text.isObjectModelOf(s)?s.data.size:s.nodes.size),this.setStart(s,e)}get startPosition(){return this.startOffset}set endContainer(e){this.setEnd(e,this.endPosition)}set endPosition(e){let t=this;Sequence.isObjectModelOf(t)&&(t=t[List.to]());let s=t[Symbol.get]("endContainer");-1==e&&(e=Text.isObjectModelOf(s)?s.data.size:s.nodes.size),this.setEnd(s,e)}get endPosition(){return this.endOffset}get isCollapsed(){return this.collapsed}set collapsePosition(e){this.startPosition=e,this.endPosition=e}set collapseContainer(e){this.startContainer=e,this.endContainer=e}}),Element.implements(class{get disabled(){return this.classes.includes("disabled")}set disabled(e){this.classes.toggle("disabled",e)}get active(){return this.classes.includes("active")}set active(e){this.classes.toggle("active",e)}}),Function.implements(class{throttle(e){null==e&&(e=250);let t,s=this;return function(){t&&t.stop(),t=s.bind(this,...arguments).schedule(e)}.bind(this)}}),RealNumber.implements(class{format(e,t){null==e&&(e=1e3),null==t&&(t=1e3);let s=this;return`${Math.round(s/Math.pow(t,s=(Math.log(s)/Math.log(t))[Integer.to]())*e)/e}${"\ufeffKMGTPEZY"[s]}`}toBytes(){return`${this.format(1e3,1024)}iB`}}),!this.visualViewport){let e=class{[Symbol.add](e){e.addTo(this)}get width(){return document.documentElement.offsetWidth}get height(){return document.documentElement.offsetHeight}addEventListener(){window.addEventListener(...arguments)}removeEventListener(){window.removeEventListener(...arguments)}};this.visualViewport=new e}} \ No newline at end of file From b0eaaec2a008c685c12b648a44a7b53e56ef107f Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:46:59 +0000 Subject: [PATCH 03/32] Delete web-browsers.png --- web-browsers.png | Bin 8262 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 web-browsers.png diff --git a/web-browsers.png b/web-browsers.png deleted file mode 100644 index f43ffb59c9fa54127f611ab7cdb8ab07ddaf9b15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8262 zcmbVxWmr`0+V)UV(%mE7In>Y$Al;=XH4HFxGcYvLjdX*6GzdtFAl;Hul2QVKAe|r2 z-p{kY_s2foAMZMjweDEgd0xGK+$&03^En<4H4Xp(z*A9H(0v?(9&cH!Cy&pmZ-If2 z1C@uOv4@_swTHKb8w?<4|v~-4u(2A@>={Q z!;5fqc|-#Mk}?Pv3#dKJ1851efjdbt9<_He0^wFtj7Gv5{2DG0m@Qn{*A1rUtEmt5 zwTFsZG0I2-B@y690!NsK1rXur;N%WQNHPA47yLN?YnzV|_%9I;dnv|$8)dAa4TLzm z!GOZNB0Nw5Au*t+IIn=PxR@Y_8z{&xAi~El&L;rk;THh&i-Y+EfPY_%kJ{XLW61ar7A|}Oy!?EQj(_>} zFKKrVUD*FO-)IC_;g|J&Yo`2$9z~b{R4iC-T$uWFTqD^z*=tb$D~*|C^$ns z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RX}uCpb3l%G3%V+9Tv%6kK}M31bO`$ zMli)6GM|K7V2>GcL&K4Yfv7P=W`!sAR``}{&M2O;CZgpC^CE-8s9>K+6cLiWi$uaKFA_ySSTXAK~~%E7Z`Q@A^qg0cU4KpnB__=;B4KpM8`M-ODoQ-~X{c_7z0gv_f6svAnsKlr-tBOg%=VXcNx#2jDvD)m_u~rGQ-8(PR~ywk4#&6kRQ=aXrj;P}>9Xe9a3dLsfkMzO(FFnr=&L`0}Y<#cBVyA@mynoMR6$N6@*exeQEk>0$2+)YG23 z8hhQ5#q*_siE25ccO^95VZd~+E{;46@eZfG`Kx!{F*`}bX2&anq^fsVAs4u&cL~B@ zHZFtP*l=T(vQN6C`F@H*Z{H9RRekXm4ZAqKn$cv9xT2qtu{1F(QzlgNN zirChD<;xaN!A0Y1z*t>?Q34s(_DDq?UV832X7&4K_y#pU>AHv-c|8t}-k;xgt=1)y zDPaCgu_=n)EOt?2v!6DgA7j1ZB7mW|LOLu%DolT7qxQ=_rQ0O&_(CvO{M#yP&WXtW zoX%H)7zq#Df{Qtgm$ns##Ti$w!SYy73YcMk|lMNG*i7!wj8dSZuKxuU;aXA(SyUQK(*gYIugR#{rN*SJ>QpA zf7@$!iw@{Iut+oo{~(dkb4=Ps$hvMchjuRi?B$EdlMN#IiH@41yt;VGhw=olc*Sq^ UGLY@yuRr@Likb>F^5!A`5098fk^lez From 846c6923d73a9267a7b9c9f64f8897b42d119792 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:47:14 +0000 Subject: [PATCH 04/32] Delete symbol-definitions.svg --- symbol-definitions.svg | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 symbol-definitions.svg diff --git a/symbol-definitions.svg b/symbol-definitions.svg deleted file mode 100644 index 7c010ef..0000000 --- a/symbol-definitions.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - \ No newline at end of file From 28481fc83148a54f7ed0673ff479b2eb0163af29 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:47:30 +0000 Subject: [PATCH 05/32] Delete web-browser-features-checklist.html --- web-browser-features-checklist.html | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 web-browser-features-checklist.html diff --git a/web-browser-features-checklist.html b/web-browser-features-checklist.html deleted file mode 100644 index d1423a9..0000000 --- a/web-browser-features-checklist.html +++ /dev/null @@ -1,27 +0,0 @@ - From 2101ac939d541f28f9a25bff82ae6c902378c89f Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:50:13 +0000 Subject: [PATCH 06/32] Update README.md --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c81aff..17a9ef9 100644 --- a/README.md +++ b/README.md @@ -1 +1,46 @@ -# runtime +# TinyFeature +**a fast, tiny, simple browser feature detection** + +# How Works? +open `demo.html` file on a browser. +it's a demo file. + +# How to Use? + + + +# Sample Output of Demo : + + FunctionGenerator : true + FunctionAsync : true + FunctionGeneratorAsync : false + EventTarget : true + DataTransferItem : true + DataTransferItemList : true + BroadCastChannel : true + ViewPort : false + Font : true + CustomElement : true + Animate : false + SVG : true + Touch : false + WebGL : true + From d09a577737b1ee946e4c6fce14f2fe4b38e6ad20 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:50:28 +0000 Subject: [PATCH 07/32] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 17a9ef9..6dcacf9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **a fast, tiny, simple browser feature detection** # How Works? -open `demo.html` file on a browser. +open `Demo.html` file on a browser. it's a demo file. # How to Use? From e2d26ecbb91d2938fd228bd431ad464ca103a2b5 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:51:43 +0000 Subject: [PATCH 08/32] Create TinyFeature.js --- TinyFeature.js | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 TinyFeature.js diff --git a/TinyFeature.js b/TinyFeature.js new file mode 100644 index 0000000..85dd9b2 --- /dev/null +++ b/TinyFeature.js @@ -0,0 +1,71 @@ +/* + * TinyFeature + * a fast, tiny, simple browser feature detection. +*/ +;(function(window,document,undefined) +{ + "use strict"; + var utilities = + { + create : function(element) + { + return document.createElement(element); + }, + bool : function(name,bool) + { + if(bool) + { + return true; + } + return false; + }, + function : function(name,value) + { + try + { + Function(value); + return true; + } + catch(why) + { + return false; + } + }, + reference : function(name) + { + if(window[name]) + { + return true; + } + return false; + }, + }; + var browser= + { + function_generator : utilities.function('GeneratorFunction','function* g(){}'), + function_async : utilities.function('AsyncFunction','async function f(){}'), + function_generator_async : utilities.function('AsyncGeneratorFunction','async function* fg(){}'), + event_target : utilities.function('EventTarget.constructor','new EventTarget'), + data_transfer_item : utilities.reference('DataTransferItem'), + data_transfer_item_list : utilities.reference('DataTransferItemList'), + broad_cast_channel : utilities.reference('BroadcastChannel'), + viewport : utilities.reference('VisualViewport'), + font : utilities.reference('FontFace'), + custom_element : utilities.reference('customElements'), + animate : utilities.reference('Element.prototype.animate'), + svg : !!document.createElementNS && !!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect, + touch : !!(("ontouchstart" in window) || window.navigator && window.navigator.msPointerEnabled && window.MSGesture || window.DocumentTouch && document instanceof DocumentTouch), + webgl : (function(element) + { + try + { + return !!(window.WebGLRenderingContext && (element.getContext("webgl") || element.getContext("experimental-webgl"))); + } + catch(error) + { + return false; + } + })(utilities.create("canvas")), + }; + window.browser = browser; +}(window,document)); From de74b226f9ce2898709e31e5c0875993c78ac7de Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:52:19 +0000 Subject: [PATCH 09/32] Create Demo.html --- Demo.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Demo.html diff --git a/Demo.html b/Demo.html new file mode 100644 index 0000000..02336a4 --- /dev/null +++ b/Demo.html @@ -0,0 +1,21 @@ + + + From fda7742f638aab8848157cbccdbee2f75ec5c58c Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:54:16 +0000 Subject: [PATCH 10/32] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6dcacf9..8392d40 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# TinyFeature -**a fast, tiny, simple browser feature detection** +# Tiny Browser Feature +a fast, tiny, simple browser feature detection. # How Works? open `Demo.html` file on a browser. From 267c1be9267457160c0a28ceb58d091122105ce9 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:56:21 +0000 Subject: [PATCH 11/32] Delete warning.svg --- symbols/warning.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/warning.svg diff --git a/symbols/warning.svg b/symbols/warning.svg deleted file mode 100644 index 02def5a..0000000 --- a/symbols/warning.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From ded00b0bd40d71619846551e7d3ed41a8fa63cd3 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:56:30 +0000 Subject: [PATCH 12/32] Delete vertical-ellipsis.svg --- symbols/vertical-ellipsis.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/vertical-ellipsis.svg diff --git a/symbols/vertical-ellipsis.svg b/symbols/vertical-ellipsis.svg deleted file mode 100644 index 2307225..0000000 --- a/symbols/vertical-ellipsis.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From fcd03a6762476cef58b1cdad86cbe2b7fd30cd8e Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:56:37 +0000 Subject: [PATCH 13/32] Delete angle-down.svg --- symbols/angle-down.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/angle-down.svg diff --git a/symbols/angle-down.svg b/symbols/angle-down.svg deleted file mode 100644 index 6064450..0000000 --- a/symbols/angle-down.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 3ed5f1a659099dca93813ec09784f32ff2237f67 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:56:44 +0000 Subject: [PATCH 14/32] Delete angle-left.svg --- symbols/angle-left.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/angle-left.svg diff --git a/symbols/angle-left.svg b/symbols/angle-left.svg deleted file mode 100644 index 0361e2d..0000000 --- a/symbols/angle-left.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From af3a56a22f13764b3ea98ac81a6a2e0f8cf9e5a8 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:56:53 +0000 Subject: [PATCH 15/32] Delete angle-right.svg --- symbols/angle-right.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/angle-right.svg diff --git a/symbols/angle-right.svg b/symbols/angle-right.svg deleted file mode 100644 index 8a1ce80..0000000 --- a/symbols/angle-right.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 6cfbe148289c867651214aa9825a93db8924dfac Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:57:00 +0000 Subject: [PATCH 16/32] Delete angle-up.svg --- symbols/angle-up.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/angle-up.svg diff --git a/symbols/angle-up.svg b/symbols/angle-up.svg deleted file mode 100644 index 182b846..0000000 --- a/symbols/angle-up.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 406c30db2b41de44d5fb8201cf0b63e9546fa2c2 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:57:09 +0000 Subject: [PATCH 17/32] Delete check.svg --- symbols/check.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/check.svg diff --git a/symbols/check.svg b/symbols/check.svg deleted file mode 100644 index b054d4e..0000000 --- a/symbols/check.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 9abc3cd4399f5f5ad3e83757d3039780b383f01f Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:57:18 +0000 Subject: [PATCH 18/32] Delete pen.svg --- symbols/pen.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/pen.svg diff --git a/symbols/pen.svg b/symbols/pen.svg deleted file mode 100644 index a73e2e4..0000000 --- a/symbols/pen.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 7d579fbef1c7c9e58a1edcf0563db4d037fdd8d5 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:57:25 +0000 Subject: [PATCH 19/32] Delete information.svg --- symbols/information.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/information.svg diff --git a/symbols/information.svg b/symbols/information.svg deleted file mode 100644 index d838dfc..0000000 --- a/symbols/information.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From d2cb17ace31f1523e9620f09710295e018558881 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:57:32 +0000 Subject: [PATCH 20/32] Delete minus.svg --- symbols/minus.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/minus.svg diff --git a/symbols/minus.svg b/symbols/minus.svg deleted file mode 100644 index c37d27a..0000000 --- a/symbols/minus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From f026643fabd5a76c8847996cfc8bbfc19c2cf5a4 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:57:38 +0000 Subject: [PATCH 21/32] Delete plus.svg --- symbols/plus.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/plus.svg diff --git a/symbols/plus.svg b/symbols/plus.svg deleted file mode 100644 index 0d042aa..0000000 --- a/symbols/plus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From c73c01d8312ff4212ed5aa3c6cd202d5cd4b6c2c Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:57:46 +0000 Subject: [PATCH 22/32] Delete times.svg --- symbols/times.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/times.svg diff --git a/symbols/times.svg b/symbols/times.svg deleted file mode 100644 index ac64ff3..0000000 --- a/symbols/times.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 825fb331e2c532d40a0a281ea928fd36f5f128ac Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 07:57:53 +0000 Subject: [PATCH 23/32] Delete trash.svg --- symbols/trash.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 symbols/trash.svg diff --git a/symbols/trash.svg b/symbols/trash.svg deleted file mode 100644 index 384b399..0000000 --- a/symbols/trash.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 161b830ac67307d73021db4f2d4eac798bdb6d49 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 08:02:44 +0000 Subject: [PATCH 24/32] Update Demo.html --- Demo.html | 1 - 1 file changed, 1 deletion(-) diff --git a/Demo.html b/Demo.html index 02336a4..d4fd8b7 100644 --- a/Demo.html +++ b/Demo.html @@ -1,4 +1,3 @@ - -# Sample Output of Demo : +# Output of Demo : FunctionGenerator : true FunctionAsync : true From 57ee007702c486aceb0970ec1212ec4cdcbe4354 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 08:22:23 +0000 Subject: [PATCH 26/32] Update TinyFeature.js --- TinyFeature.js | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/TinyFeature.js b/TinyFeature.js index 85dd9b2..ee480ce 100644 --- a/TinyFeature.js +++ b/TinyFeature.js @@ -7,19 +7,11 @@ "use strict"; var utilities = { - create : function(element) + create : function(value) { - return document.createElement(element); + return document.createElement(value); }, - bool : function(name,bool) - { - if(bool) - { - return true; - } - return false; - }, - function : function(name,value) + function : function(value) { try { @@ -31,9 +23,9 @@ return false; } }, - reference : function(name) + reference : function(value) { - if(window[name]) + if(window[value]) { return true; } @@ -42,10 +34,10 @@ }; var browser= { - function_generator : utilities.function('GeneratorFunction','function* g(){}'), - function_async : utilities.function('AsyncFunction','async function f(){}'), - function_generator_async : utilities.function('AsyncGeneratorFunction','async function* fg(){}'), - event_target : utilities.function('EventTarget.constructor','new EventTarget'), + function_generator : utilities.function('function* g(){}'), + function_async : utilities.function('async function f(){}'), + function_generator_async : utilities.function('async function* fg(){}'), + event_target : utilities.function('new EventTarget'), data_transfer_item : utilities.reference('DataTransferItem'), data_transfer_item_list : utilities.reference('DataTransferItemList'), broad_cast_channel : utilities.reference('BroadcastChannel'), From 5d95093959ed2f479017c3d0eb7337a4171fd48e Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 08:23:58 +0000 Subject: [PATCH 27/32] Update Demo.html --- Demo.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Demo.html b/Demo.html index d4fd8b7..254672d 100644 --- a/Demo.html +++ b/Demo.html @@ -2,19 +2,33 @@ From 5cfa520c1cd530be9beda1ff2bddf845702c0395 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 08:27:03 +0000 Subject: [PATCH 28/32] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 7f2bc7c..96a64ca 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ open `Demo.html` file on a browser. it's a demo file. # How to Use? +you can access to result of detect and check from variable. + +type of all variable is `bool`. + +list of variables : - browser.function_generator - browser.function_async From 43c7855eb63af8a86edca748c41a1540c1bc9f2f Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 08:28:18 +0000 Subject: [PATCH 29/32] Update Demo.html From 3352454e56f6d0f62d683a07780e3a9bc635f8c2 Mon Sep 17 00:00:00 2001 From: BaseMax <25328620+BaseMax@users.noreply.github.com> Date: Sun, 20 May 2018 08:28:53 +0000 Subject: [PATCH 30/32] Update TinyFeature.js From 7c3a1039fefc3c2a9c2ca6e2264ff9332844003b Mon Sep 17 00:00:00 2001 From: Max <25328620+BaseMax@users.noreply.github.com> Date: Mon, 21 May 2018 18:26:18 +0000 Subject: [PATCH 31/32] Update TinyFeature.js --- TinyFeature.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TinyFeature.js b/TinyFeature.js index ee480ce..653b233 100644 --- a/TinyFeature.js +++ b/TinyFeature.js @@ -2,7 +2,7 @@ * TinyFeature * a fast, tiny, simple browser feature detection. */ -;(function(window,document,undefined) +;(function(window,document) { "use strict"; var utilities = From 6b4a2de3a8cf121dd3876667a6e1bd541bce2deb Mon Sep 17 00:00:00 2001 From: Max <25328620+BaseMax@users.noreply.github.com> Date: Mon, 21 May 2018 18:35:48 +0000 Subject: [PATCH 32/32] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 96a64ca..02cede0 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,12 @@ list of variables : - browser.webgl +# Future capabilities : +- placeholder +- canvas +- querySelectorAll +- More... + # Demo :