!iH      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx y z { | } ~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGNone/6K glazier-reactQThis is used store the react "ref" to a javascript instance of a react Component. glazier-reactgReturns a reference to the javascript *class* definition of the shim wrapper around ReactPureComponent glazier-react|This returns the javascript class definition of ShimComponent. There is ever only one shim class, so it is purely available glazier-reactARerenders an instance of a component created using ShimComponent.None/HNone/6K) glazier-reactNB. No FromJS provided. See  below. glazier-reactUnfortunately, ReactJS did not export an easy way to check if something is a ReactElement, although they do so in the internal code with REACT_ELEMENT_TYPE. This function allow coercing a ReactElement from a JSVal and is named unsafe as a reminder that the coersion is unchecked. This function is required when receiving ReactElement from javascript (eg in a callback) or to interface with foreign React Elements. glazier-reactCCreate a react element (with children) from a HashMap of properties glazier-reactFCreate a react element (with no children) from a HashMap of properties glazier-react.Not an IO action because JSString is immutable glazier-reactqReact only allows a single top most element. Provide a handly function to wrap a list of ReactElements inside a HQ if required. If there is only one element in the list, then nothing is changed.I glazier-reactThis is an IO action because even if the same args was used a different ReactElement may be created, because JSVal and JSArray are mutable.None/6K,# glazier-react'The object that dispatched the event. =https://developer.mozilla.org/en-US/docs/Web/API/Event/target#$#$None/,`##None  /;<=>?FTA 2 glazier-reactCThe parameters required to create a leaf ReactElement (no children)4 glazier-reactEThe parameters required to create a branch ReactElement with children6 glazier-reactCreate  ReactElement s from a -7 glazier-reactTo use an exisitng ReactElement8 glazier-react(Convert the ReactMlt to [Z.ReactElement]9 glazier-react6Fully render the ReactMlt into a single Z.ReactElement: glazier-reactFor text content; glazier-react!For the contentless elements: eg br_. Memonic: lf for leaf. Duplicate listeners with the same key will be combined, but it is a silent error if the same key is used across listeners and props. "If an attribute/prop is duplicated the last one defined wins." 7https://www.reactenlightenment.com/react-nodes/4.4.html< glazier-reactCreate a MonadState that run the given given a combining function where the first arg is the state from running the markup producing MonadState with mempty, and the 2nd arg the starting state of the resultant MonadState.= glazier-react For the contentful elements: eg div_. Memonic: bh for branch. Duplicate listeners with the same key will be combined, but it is a silent error if the same key is used across listeners and props. "If an attribute/prop is duplicated the last one defined wins." 7https://www.reactenlightenment.com/react-nodes/4.4.html-./0123456789:;<=>?@-./0145236789:;=<>?@None/6KDA glazier-reactThe native event 6https://developer.mozilla.org/en-US/docs/Web/API/EventABABNone/D_AANone/6KVK glazier-reactEvery event in React is a synthetic event, a cross-browser wrapper around the native event. which reused from a pool. So it is dangerous to keep a reference to a K` since it may expire and contain other things without you knowing. All relevant data from the K1 must be consumed as soon you get one. That is, K( must only be used in the first part of  handleEventZ. It is not an instance of NFData and so cannot be returned into the second lazy part of  handleEventQ glazier-reactWithin the strict part of  handleEventM the Notice is effectively immutable. We want to maintain this lie so that we can lazily parse only the properties the event handler is interested in. This will throw if J.JSVal is null, or not convertible to the desired type so we are assuming that Notice will behave nicely.R glazier-reactSee  ;https://www.w3.org/TR/DOM-Level-3-Events-key/#keys-modifierh This will throw if J.JSVal is null, but shouldn't happen since we've already check for a valid NoticeJ glazier-react9unsafe and non-IO to enable lazy parsing. See handleEventK glazier-react.unsafe to enable lazy parsing. See handleEventKLMNOPQRKLMNOPQRNone/WKMNOPKMNOPNone/6[hV glazier-reactEvery K can be parsed to an V. V( must only be used in the first part of  handleEvent.b glazier-reactIWe can lie about this not being in IO because within the strict part of  handleEventM& the Notice is effectively immutable. VWXYZ[\]^_`ab VWXYZ[\]^_`abNone/6he glazier-reactMouse and Drag/Drop events e( must only be used in the first part of  handleEvent.  >https://facebook.github.io/react/docs/events.html#mouse-events  3https://developer.mozilla.org/en-US/docs/Web/Events Event names (eventType) onClick (click) onContextMenu (contextmenu) onDoubleClick (dblclick) onDrag (drag) onDragEnd (dragend) onDragEnter (dragenter) onDragExit (dragexit) onDragLeave (dragleave) onDragOver (dragover) onDragStart (dragstart) onDrop (drop) onMouseDown (mousedown) onMouseEnter (mouseenter) onMouseLeave (mouseleave) onMouseMove (mousemove) onMouseOut (mouseout) onMouseOver (mouseover) onMouseUp (mouseup)u glazier-reactIWe can lie about this not being in IO because within the strict part of  handleEventM& the Notice is effectively immutable.efghijklmnopqrstuefghijklmnopqrstu None/6pZx glazier-reactKeyboard events x( must only be used in the first part of  handleEvent.  Ahttps://facebook.github.io/react/docs/events.html#keyboard-events  >https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEventT Event names (eventType) onKeyDown (keydown) onKeyPress (keypress) onKeyUp (keyyp) glazier-reactIWe can lie about this not being in IO because within the strict part of  handleEventM& the Notice is effectively immutable.xy~z|}{xy~z|}{ None/6sY glazier-reactIWe can lie about this not being in IO because within the strict part of  handleEventM& the Notice is effectively immutable. None/v} glazier-reactUsing a React Element (first arg) give React rendering control over a DOM element (second arg). This should only be called for the topmost component. None/KvNone/w! None/KyJ glazier-react_NB. Don't export ReadSubject constructor to guarantee that that it only contains non-blocking L IO.None/yNone "+-/36;<=>?AFQTVbi} glazier-react+Interactivity for a particular DOM element. glazier-react(Interactivity data for a react component glazier-reactA G contains interactivity data for all widgets as well as the model data.44None/ glazier-reactUsing MVar for synchronizing because it guarantees FIFO wakeup which will help prevent old updates overriding new updates. The constructor is hidden to maintain the expectation that the last two member will keep the  inside the 7 alive. Before removing Subject from a container, use X to store the prolonging IO action "nextRenderedListener" action handler, so that the I is garbage collected only after the child widget is no longer rendered. glazier-react`Creates an IO action whose existence will keep the lease alive. Running it has no side effects.None/iNone/<QVNone/<  glazier-reactThe s state can be magnified with None  +-/3<QVi glazier-reactInteractive version of ;# using listeners obtained from the  for a  ElementalId. glazier-reactInteractive version of = glazier-reacteg "div" or "input"None -/36<FQTV glazier-reactA  is a  that fires M a  or a value. glazier-reactWUse this function to verify at compile time that the first widget doesn't require any AsFacet (IO cmd) cmd. glazier-react Convert a  into a       None&'+-/;<=FQSTVi   glazier-reactNB.  ! is not a functor because of the  Widget cmd in   glazier-reactMake a unique named id glazier-reactMthe the rendering function in a Subject, replace any existing render callback glazier-reactRMake a fully initialized subject (with ShimCallbacks) from a widget spec and state glazier-react*Keep subject alive until the next rerender glazier-react3Generate a list of commands from reading the model. glazier-react/Rerender a ShimComponent using the given state. glazier-reactUpdate and rerender. glazier-react"Create and register a dom callback glazier-react_Create and register a react callback If the callback is for "ref", then an listener to update  elementalRef for GetEventTarget: will automatically be added just before the listener in . glazier-react4Create and register a callback for the mounted event glazier-react5Create and register a callback for the rendered event glazier-react5Create and register a callback for the rendered event glazier-react:Create and register a callback for the state updated event glazier-reactMake a unique named id  glazier-reactMake an initialized # for a given model using the given .! glazier-reactMake an initialized # for a given model using the given ." glazier-reactMake an initialized # for a given model using the given .# glazier-reactGSchedule cleanup of the callbacks when the parent widget is rerendered.$ glazier-react-Rerender the ShimComponent using the current Entity context% glazier-reactGet the Model% and exec actions, using the current Entity context& glazier-react4Get the event target If a "ref" callback to update  elementalRefI has not been added; then add it, rerender, then return the EventTarget.' glazier-react Update the Model using the current Entity context( glazier-react Update the Scene using the current Entity6 context, and also return the next action to execute.) glazier-reactCreate a callback for a N4 and add it to this elementals's dlist of listeners.* glazier-reactOA variation of trigger which ignores the event but fires the given arg instead.O glazier-reactCreate a callback for a N4 and add it to this elementals's dlist of listeners.+ glazier-reactCreate a callback for a K4 and add it to this elementals's dlist of listeners., glazier-reactOA variation of trigger which ignores the event but fires the given arg instead.- glazier-react;Register actions to execute after a render. It is safe to postCmd' a  TickScene or 9. These command will not trigger another rendered event.NB. This is trigged by react componentDidMountj See jsbits/react.js hgr$shimComponent. These callbacks are called after the ref callback by React See  .https://reactjs.org/docs/refs-and-the-dom.html.. glazier-react;Register actions to execute after a render. It is safe to postCmd' a  TickScene or 9. These command will not trigger another rendered event.NB. This is trigged by react componentDidUpdate and componentDidMount so it is also called for the initial render. See jsbits/react.js hgr$shimComponent. These callbacks are called after the ref callback by React See  .https://reactjs.org/docs/refs-and-the-dom.html.0 glazier-react\Register actions to execute after the state has been updated with TickState. It is safe to postCmd' another  TickScene2, another onRendered event will not be generated.NB. This is trigged by react componentDidUpdate and componentDidMount so it is also called for the initial render. See jsbits/react.js hgr$shimComponent. These callbacks are called after the ref callback by React See  .https://reactjs.org/docs/refs-and-the-dom.html.%   !"#$%&'()*+,-./0%   !"#%&$'()*+,-./0None-/;<=>?FQTVi'P glazier-reactCreate ref handler to assign 7 glazier-react?An example of starting an app using the glazier-react framework< glazier-reactMake an initialized $ for a given model using the given D rendering function. The original window should be dropped and the  reduced to just a  to emphasis the fact that the  was used up. & should be used to render the subject.@ glazier-reactvNo need to run in a separate thread because it should never block for a significant amount of time. Update the scene Q1 with the given action. Also triggers a rerender.R glazier-react Using the NFData idea from ReactFlux'PropertiesAndEvents.hs React re-uses Notice from a pool, which means it may no longer be valid if we lazily parse it. However, we still want lazy parsing so we don't parse unnecessary fields. Additionally, we don't want to block during the event handling.The reason this is a problem is because Javascript is single threaded, but Haskell is lazy. Therefore GHCJS threads are a strange mixture of synchronous and asynchronous threads, where a synchronous thread might be converted to an asynchronous thread if a "black hole" is encountered. See  Chttps://github.com/ghcjs/ghcjs-base/blob/master/GHCJS/Concurrent.hs This safe interface requires two input functions: 1. a function to reduce Notice to a NFData. The handleEvent will ensure that the NFData is forced which will ensure all the required fields from Synthetic event has been parsed. This function must not block. 2. a second function that uses the NFData. This function is allowed to block. handleEvent results in a function that you can safely pass into  with  . I have innovated further with the NFData idea to return two functions: 1. (evt -> IO ()) function to preprocess the event, which is guaranteed to be non blocking. 2. An IO () postprocessor function which may block. This allows for multiple handlers for the same event to be processed safely, by allowing a way for all the preprocessor handlers are all run first before running all of the postprocessor handlers.S glazier-react"This one doesn't take the sceneVar23456789:;<=>?@ABCDEFG23456789:;<=>A?@GBDEFC!None/TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*#-./0123456789:;<=>?@AKMNOP      !"#$%&'()*+,-./023456789:;<=>?@ABCDEFG+""##$%&'()*+,-./0123456789:;<=>?@ABCCDEFGHIJKLMNOPQQRRSTUVWXYZ[\]^^_`abcdefgghijklmnopqqrstuvwxyz{|}~     y { r s           !"#$%&'()*+,-./01234567899:;<=>?@ABCDEFGHIJKLMNOPQRSNTUNVWXYZ[\N]^_`NabNcdNceNcfNcgNchNciNcjNckNlmNlnNopNoqNcrNcsNctNcuNcvNcwxyzxy{xy|xy}x~x~x~x~NcNcNcNNNaNaNaNaNaNaNaNaNaNaNaNaNaNaNoNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNcNcNcNcNcNcNcxxxx~xxxxx x     xxx~x~xyx !"#$%&'()**+,-./01212131415161718191:1;1<1=>?@ABCDE,glazier-react-1.0.0.0-DAsVOnciJu1LqT93cng4yY Glazier.React.Component.InternalGlazier.React.Element"Glazier.React.EventTarget.InternalGlazier.React.Markup"Glazier.React.NativeEvent.InternalGlazier.React.Notice.InternalGlazier.React.Event.SyntheticGlazier.React.Event.MouseGlazier.React.Event.KeyboardGlazier.React.Event.HashChangeGlazier.React.ReactDOMGlazier.React.ReactId.Internal Glazier.React.ReadIORef.InternalGlazier.React.SceneGlazier.React.Subject.InternalGlazier.React.EntityGlazier.React.GadgetGlazier.React.WindowGlazier.React.WidgetGlazier.React.ReactorGlazier.React.Reactor.ExecGlazier.React.ComponentGlazier.React.EventTargetGlazier.React.NativeEventGlazier.React.NoticeGlazier.React.ReactIdGlazier.React.ReadIORefGlazier.React.SubjectGHC.Foreign.Callback syncCallback1GHCJS.Foreign.Callback ContinueAsync Glazier.React ComponentRef ShimComponent shimComponent rerenderShim$fFromJSComponentRef$fGenericShimComponent$fShowShimComponent$fIsJSValShimComponent$fPToJSValShimComponent$fToJSShimComponent$fIsStringShimComponent$fNFDataShimComponent$fGenericComponentRef$fShowComponentRef$fIsJSValComponentRef$fPToJSValComponentRef$fToJSComponentRef$fIsStringComponentRef$fNFDataComponentRef ReactElementunsafeCoerceElementmkBranchElement mkLeafElement textElementmkCombinedElements$fNewtypeReactElement$fGenericReactElement$fShowReactElement$fIsJSValReactElement$fPToJSValReactElement$fToJSReactElement$fIsStringReactElement$fNFDataReactElement EventTarget$fFromJSEventTarget$fGenericEventTarget$fShowEventTarget$fIsJSValEventTarget$fPToJSValEventTarget$fToJSEventTarget$fIsStringEventTarget$fNFDataEventTarget ReactMarkup ElementMarkup TextMarkup BranchMarkup LeafMarkup LeafParam BranchParam fromMarkup fromElement toElements toElementtxtlf withMarkupbh modifyMarkupoverSurfacePropertiesoverAllProperties NativeEvent$fFromJSNativeEvent$fGenericNativeEvent$fShowNativeEvent$fIsJSValNativeEvent$fPToJSValNativeEvent$fToJSNativeEvent$fIsStringNativeEvent$fNFDataNativeEventNoticepreventDefaultisDefaultPreventedstopPropagationisPropagationStoppedunsafeGetPropertyunsafeGetModifierState$fFromJSNotice$fGenericNotice $fShowNoticeSyntheticEventbubbles cancelable currentTargetdefaultPrevented eventPhase isTrusted nativeEventtarget timeStamp eventTypetoSyntheticEvent$fNFDataSyntheticEvent$fGenericSyntheticEvent MouseEventaltKeybuttonbuttonsclientXclientYctrlKeygetModifierStatemetaKeypageXpageY relatedTargetscreenXscreenYshiftKey toMouseEvent$fNFDataMouseEvent$fGenericMouseEvent KeyboardEventcharCodekeykeyCodelocalelocationrepeatshiftkeywhichtoKeyboardEvent$fNFDataKeyboardEvent$fGenericKeyboardEventHashChangeEventoldURLnewURLtoHashChangeEvent$fNFDataHashChangeEvent$fGenericHashChangeEvent renderDOMReactId unReactId $fReadReactId $fShowReactId $fEqReactId $fOrdReactId $fToJSReactId$fIsStringReactId$fIsJSValReactId$fPToJSValReactId ReadIORef unReadIORef doReadIORef$fMonoidReadIORef$fSemigroupReadIORef$fShowReadIORef$fFunctorReadIORef$fApplicativeReadIORef$fMonadReadIORef Elemental$sel:elementalRef:Elemental$sel:reactListeners:Elemental$fGenericElemental ShimCallbacks$sel:shimRender:ShimCallbacks$sel:shimMounted:ShimCallbacks$sel:shimRendered:ShimCallbacks$sel:shimRef:ShimCallbacks _elementalRef_reactListeners$fGenericShimCallbacksPlan$sel:planId:Plan$sel:componentRef:Plan$sel:shimCallbacks:Plan$sel:tickedListener:Plan$sel:renderedListener:Plan$sel:mountedListener:Plan$sel:nextRenderedListener:Plan$sel:elementals:Plan$sel:domlListeners:Plan$sel:finalCleanup:Plan$sel:tickedNotified:Plan$sel:rerenderRequired:Plan _shimMounted_shimRef _shimRender _shimRendered $fGenericPlanScene$sel:plan:Scene$sel:model:Scene _componentRef_domlListeners _elementals _finalCleanup_mountedListener_nextRenderedListener_planId_renderedListener_rerenderRequired_shimCallbacks_tickedListener_tickedNotified_model_planeditSceneModelmagnifiedScene zoomedScene elementTarget $fShowPlan$fGenericScene $fShowScene$fFunctorSceneSubjectsceneRefsceneVarrenderLeaseRef otherLeaseVarprolong $fEqSubjectEntity_subject_selfmagnifiedEntityGadgettoGadget runGadget gadgetWith evalGadgetWindow getListenerslf'bh'bindListenerContextdisplaySubjectjs_bindListenerContextWidget noIOWidget magnifyWidgetwidget runWidget mapWidgetdisplay overWindow overWindow2 overWindow3 overWindow2' overWindow3' withWindow withWindow' ReactorCmd MkReactId SetRender MkSubjectBookSubjectCleanupGetModelGetElementalRefRerender TickModelRegisterDOMListenerRegisterReactListenerRegisterMountedListenerRegisterRenderedListenerRegisterNextRenderedListenerRegisterTickedListener ModelState MonadReactor AsReactor mkReactId setRender mkSubject mkSubject' withMkSubjectbookSubjectCleanuprerendergetModelgetElementalRef tickModel tickModelThen domTrigger domTrigger_triggertrigger_ onMounted onRenderedonNextRenderedonTicked$fShowReactorCmd ReactorEnv reactIdEnvreactorBackgroundEnvmkReactorEnvIOstartAppreactorBackgroundWorkexecReactorCmd execMkReactId execSetRender execMkSubjectexecBookSubjectCleanup execGetModel execRerender execTickModelexecGetElementalRefexecRegisterReactListenerexecRegisterTickedListenerexecRegisterMountedListenerexecRegisterRenderedListener execRegisterNextRenderedListenerexecRegisterDOMListenerbaseGHC.Realdivjs_mkBranchElementjs_unsafeGetPropertyjs_unsafeGetModifierState GHC.IORef readIORef Data.EitherEither0javascript-extras-0.5.0.0-FnIKV4JEOADEry4bPmAtGdJavaScript.Extras.JSRepJSRep doTrigger FreshnessGHC.MVarMVarmkEventHandlerregisterRefCoreListener Control.MonadguardGHC.BasejoinMonadfail>>=>>returnFunctorfmapControl.Monad.FixMonadFixmfixData.TraversablemapMsequence<>MonoidmemptymappendmconcatliftM mtl-2.2.2Control.Monad.Reader.Class MonadReaderreaderlocalaskControl.Monad.State.Class MonadStategetstateputtransformers-0.5.5.0Control.Monad.Trans.ExceptExceptTControl.Monad.Trans.MaybeMaybeT runMaybeT*alternators-1.0.0.0-CUyj9MLFkvaJMknoptjMiE Control.Monad.Trans.Maybe.Extras evalMaybeTControl.Monad.Delegate maybeDelegate finishRight finishLeftbindLeft bindRightbind2 multitaskfinish MonadDelegatedelegate Control.AlsoAlsoalsoalsoZeroAlsgetAls MonadPlusmzeromplusControl.Monad.IO.ClassMonadIOliftIOmfilter<$!>unless replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterMforM Data.Foldablemsum sequence_forM_mapM_ Data.MonoidFirstgetFirstLastgetLastData.Semigroup.InternalDualgetDualEndoappEndoAllgetAllAnygetAnySumgetSumProduct getProductAltgetAlt Data.Functionfix Data.FunctorvoidapliftM5liftM4liftM3liftM2when=<<&glazier-1.0.0.0-9X8oFuaSxEN4EAfq4DMMBjGlazier.Command.Exec execConcur orMaybeExec verifyFixExec verifyExecfixExec maybeExecCmdTypesNoIOCmd unNoIOCmdGlazier.Command concurringly_ concurringlyunNewEmptyMVar dispatch_dispatch sequentiallyevaleval'exec_exec'exec instructsinstructcommandscommand_command'commandcodify'codify codifies' MonadCodifycodifies MonadCommandAsConcurConcur runConcur NewEmptyMVarControl.Monad.Error.Class MonadError throwError catchErrorControl.Monad.Trans.ReaderReadergetsControl.Monad.Writer.Classcensor MonadWritertelllistenpasswriterControl.Monad.Trans.Class MonadTransliftControl.Monad.RWS.ClassMonadRWSlistensmodify'modifyasks liftEitherExcept runExcept mapExcept withExcept runExceptT mapExceptT withExceptTControl.Monad.Trans.RWS.StrictRWSTrunRWSTRWSrwsrunRWSevalRWSexecRWSmapRWSwithRWSevalRWSTexecRWSTmapRWSTwithRWSTReaderT runReaderT runReader mapReader withReader mapReaderT withReaderT Control.Monad.Trans.State.StrictStateT runStateTStaterunState evalState execStatemapState withState evalStateT execStateT mapStateT withStateTliftPass liftListen liftCatch liftCallCCexceptToMaybeTmaybeToExceptT mapMaybeT