View fileInput.css
.fileContainer {
overflow: hidden;
position: relative;
}
.fileContainer [type=file] {
cursor: inherit;
display: block;
font-size: 999px;
filter: alpha(opacity=0);
View stalling-list.1684.js
export default {
onbeforeupdate(now, then){
const keys = now.children.map(({key}) => key)
const departed = then.children.filter(({key}) => !keys.includes(key))
if(!departed.length)
return true
const departures = departed.map(vnode =>
View animator.js
var animating = false;
// Define an animator consisting of optional incoming and outgoing animations.
// alwaysAnimate is false unless specified as true: false means an incoming animation will only trigger if an outgoing animation is also in progress.
// forcing dontClone to true means the outward animation will use the original element rather than a clone. This could improve performance by recycling elements, but can lead to trouble: clones have the advantage of being stripped of all event listeners.
function animator( incoming, outgoing, alwaysAnimate, dontClone ){
// The resulting animator can be applied to any number of components
return function animate( x, y, z ){
var config;
var parent;
View mRouteStream.js
import m from 'mithril'
import stream from 'mithril/stream/stream'
export default function routeStream(
defaultRoute = '/',
routes = ['/:path...']
){
const routeStream = stream()
m.route(
View Drag.js
import m from 'mithril'
import {stream} from 'flyd'
import PointerStream from 'pointer-stream'
// The component state object is provided wholesale for the author API, therefore we store our internal API state in a Map
const= new Map()
// Bind a temporal vnode to the private store associated with its persistent state
// This allows us to reliably access the last render's dom and attribute data
function update(vnode){
View HotComponent.js
const= new Map()
const queue = new Set()
let scheduled = false
function schedule(){
if(scheduled) return
scheduled = true
View m.sideEffects.js
export default function mSideEffects(lifecycle){
m.mount(document.createDocumentFragment(), Object.assign({
view : () => ''
},
lifecycle
))
}
View ancestors.js
export default function * ancestors({parentNode}){
if(parentNode){
yield parentNode
yield * ancestors(parentNode)
}
}
View vTreeWalker.js
export default function * vTreeWalker(vnode){
yield vnode
if(vnode.instance)
yield * vTreeWalker(vnode.instance)
else if(Array.isArray(vnode.children))
for(const child in vnode.children)
yield * vTreeWalker(child)
}
View mithril-displacer.js
const patch = (dom, now, then) => {
const host = document.createDocumentFragment()
const {domSize} = then
host.vnodes = then
for(
let i = 0, node = then.dom;
i < domSize;
i++, node = node.nextSibling