index.es.js.map 9.8 KB

1
  1. {"version":3,"file":"index.es.js","sources":["../src/index.js"],"sourcesContent":["/** @license MIT License (c) copyright 2015-2016 original author or authors */\n/** @author Brian Cavalier */\nimport { currentTime } from '@most/scheduler'\n\n// domEvent :: (EventTarget t, Event e) => String -> t -> boolean=false -> Stream e\nexport const domEvent = (event, node, capture = false) =>\n new DomEvent(event, node, capture)\n\nexport const blur = (node, capture = false) => domEvent('blur', node, capture)\nexport const focus = (node, capture = false) => domEvent('focus', node, capture)\nexport const focusin = (node, capture = false) => domEvent('focusin', node, capture)\nexport const focusout = (node, capture = false) => domEvent('focusout', node, capture)\nexport const click = (node, capture = false) => domEvent('click', node, capture)\nexport const dblclick = (node, capture = false) => domEvent('dblclick', node, capture)\nexport const mousedown = (node, capture = false) => domEvent('mousedown', node, capture)\nexport const mouseup = (node, capture = false) => domEvent('mouseup', node, capture)\nexport const mousemove = (node, capture = false) => domEvent('mousemove', node, capture)\nexport const mouseover = (node, capture = false) => domEvent('mouseover', node, capture)\nexport const mouseenter = (node, capture = false) => domEvent('mouseenter', node, capture)\nexport const mouseout = (node, capture = false) => domEvent('mouseout', node, capture)\nexport const mouseleave = (node, capture = false) => domEvent('mouseleave', node, capture)\nexport const change = (node, capture = false) => domEvent('change', node, capture)\nexport const select = (node, capture = false) => domEvent('select', node, capture)\nexport const submit = (node, capture = false) => domEvent('submit', node, capture)\nexport const keydown = (node, capture = false) => domEvent('keydown', node, capture)\nexport const keypress = (node, capture = false) => domEvent('keypress', node, capture)\nexport const keyup = (node, capture = false) => domEvent('keyup', node, capture)\nexport const input = (node, capture = false) => domEvent('input', node, capture)\nexport const contextmenu = (node, capture = false) => domEvent('contextmenu', node, capture)\nexport const resize = (node, capture = false) => domEvent('resize', node, capture)\nexport const scroll = (node, capture = false) => domEvent('scroll', node, capture)\nexport const error = (node, capture = false) => domEvent('error', node, capture)\n\nexport const hashchange = (node, capture = false) => domEvent('hashchange', node, capture)\nexport const popstate = (node, capture = false) => domEvent('popstate', node, capture)\nexport const load = (node, capture = false) => domEvent('load', node, capture)\nexport const unload = (node, capture = false) => domEvent('unload', node, capture)\n\nexport const pointerdown = (node, capture = false) => domEvent('pointerdown', node, capture)\nexport const pointerup = (node, capture = false) => domEvent('pointerup', node, capture)\nexport const pointermove = (node, capture = false) => domEvent('pointermove', node, capture)\nexport const pointerover = (node, capture = false) => domEvent('pointerover', node, capture)\nexport const pointerenter = (node, capture = false) => domEvent('pointerenter', node, capture)\nexport const pointerout = (node, capture = false) => domEvent('pointerout', node, capture)\nexport const pointerleave = (node, capture = false) => domEvent('pointerleave', node, capture)\n\nexport const touchstart = (node, capture = false) => domEvent('touchstart', node, capture)\nexport const touchend = (node, capture = false) => domEvent('touchend', node, capture)\nexport const touchmove = (node, capture = false) => domEvent('touchmove', node, capture)\nexport const touchcancel = (node, capture = false) => domEvent('touchcancel', node, capture)\n\nclass DomEvent {\n constructor (event, node, capture) {\n this.event = event\n this.node = node\n this.capture = capture\n }\n\n run (sink, scheduler) {\n const send = e => tryEvent(currentTime(scheduler), e, sink)\n const dispose = () => this.node.removeEventListener(this.event, send, this.capture)\n\n this.node.addEventListener(this.event, send, this.capture)\n\n return { dispose }\n }\n}\n\nfunction tryEvent (t, x, sink) {\n try {\n sink.event(t, x)\n } catch (e) {\n sink.error(t, e)\n }\n}\n"],"names":["const","scheduler","this"],"mappings":";;AAAA;;AAEA;AAGA,AAAOA,IAAM,QAAQ,GAAG,UAAC,KAAK,EAAE,IAAI,EAAE,OAAe,EAAE;qCAAV,GAAG,KAAK;;WACnD,IAAI,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC;EAAA;;AAEpC,AAAOA,IAAM,IAAI,GAAG,UAAC,IAAI,EAAE,OAAe,EAAE;mCAAV,GAAG,KAAK;;SAAK,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC;EAAA;AAC9E,AAAOA,IAAM,KAAK,GAAG,UAAC,IAAI,EAAE,OAAe,EAAE;m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