packages feed

miso 0.1.0.4 → 0.1.1.0

raw patch · 6 files changed

+24/−7 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Miso.Html.Element: center_ :: [Attribute action] -> [View action] -> View action

Files

README.md view
@@ -7,15 +7,20 @@ [![Slack Status](https://haskell-miso-slack.herokuapp.com/badge.svg)](https://haskell-miso-slack.herokuapp.com) [![Build Status](https://travis-ci.org/dmjio/miso.svg?branch=master)](https://travis-ci.org/dmjio/miso) -**Miso** is a small [isomorphic](http://nerds.airbnb.com/isomorphic-javascript-future-web-apps/) [Haskell](https://www.haskell.org/) front-end framework featuring a virtual-dom, diffing / patching algorithm, event delegation, event batching, SVG, Server-sent events, Websockets, and an extensible Subscription-based subsystem. Inspired by [Elm](http://elm-lang.org/), [Redux](http://redux.js.org/) and [Bobril](http://github.com/bobris/bobril). `IO` and other effects (like `XHR`) can be introduced into the system via the `Effect` data type. Miso makes heavy use of the [GHCJS](https://github.com/ghcjs/ghcjs) FFI and therefore has minimal dependencies.+**Miso** is a small "[isomorphic](http://nerds.airbnb.com/isomorphic-javascript-future-web-apps/)" [Haskell](https://www.haskell.org/) front-end framework featuring a virtual-dom, diffing / patching algorithm, event delegation, event batching, SVG, Server-sent events, Websockets, and an extensible Subscription-based subsystem. Inspired by [Elm](http://elm-lang.org/), [Redux](http://redux.js.org/) and [Bobril](http://github.com/bobris/bobril). `IO` and other effects (like `XHR`) can be introduced into the system via the `Effect` data type. Miso makes heavy use of the [GHCJS](https://github.com/ghcjs/ghcjs) FFI and therefore has minimal dependencies.  ## Examples   - TodoMVC-    - [Link](http://miso-todomvc.bitballoon.com/)+    - [Link](https://d3u8rq3uy5wnb9.cloudfront.net/)     - [Source](https://github.com/dmjio/miso/blob/master/examples/todo-mvc/Main.hs)   - Mario-    - [Link](https://s3.amazonaws.com/aws-website-mario-5u38b/index.html)+    - [Link](https://dfhxhtlu1tq0x.cloudfront.net/)     - [Source](https://github.com/dmjio/miso/blob/master/examples/mario/Main.hs)+ - SVG+    - [Link](https://d2dwfl7f3j7of0.cloudfront.net/)+ - Simple+    - [Link](https://dco9lhtzw9c6i.cloudfront.net)+    - [Source](https://github.com/dmjio/miso/blob/master/exe/Main.hs)  ## Documentation   - [GHCJS](https://d10z4r8eai3cm9.cloudfront.net/)
ghcjs-src/Miso/Effect.hs view
@@ -14,6 +14,7 @@ , Effect (..) , noEff , (<#)+, (#>) ) where  import Miso.Effect.Storage@@ -32,3 +33,7 @@ -- | `Effect` smart constructor (<#) :: model -> IO action -> Effect model action (<#) = Effect++-- | `Effect` smart constructor, flipped+(#>) :: IO action -> model -> Effect model action+(#>) = flip (<#)
ghcjs-src/Miso/Effect/XHR.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE ScopedTypeVariables  #-} {-# LANGUAGE LambdaCase           #-} {-# LANGUAGE OverloadedStrings    #-}+{-# LANGUAGE CPP                  #-} ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Effect.XHR@@ -91,13 +92,15 @@   type XHR (Capture sym a :> api) = a -> XHR api   xhrWithRoute Proxy _ (_ :: a) = undefined +#if MIN_VERSION_servant(0,8,1) -- | CaptureAll instance (KnownSymbol capture, ToHttpApiData a, HasXHR sublayout)    => HasXHR (CaptureAll capture a :> sublayout) where   type XHR (CaptureAll capture a :> sublayout) = [a] -> XHR sublayout   xhrWithRoute Proxy _ _ = undefined     -- xhrWithRoute (Proxy :: Proxy sublayout)-      -- (foldl' (flip appendToPath) req ps)+    --   (foldl' (flip appendToPath) req ps)+#endif  -- | Path (done) instance (HasXHR api, KnownSymbol sym) => HasXHR (sym :> api) where
jsbits/diff.js view
@@ -5,11 +5,11 @@   else if (currentObj && !newObj) parent.removeChild (currentObj.domRef);   else {     if (currentObj.type === "vtext") {-      if (newObj.type === "vnode") replaceElementWithText (currentObj, newObj, parent);+      if (newObj.type === "vnode") replaceTextWithElement (currentObj, newObj, parent);       else diffTextNodes (currentObj, newObj);     } else {       if (newObj.type === "vnode") diffVNodes (currentObj, newObj, parent);-      else replaceTextWithElement (currentObj, newObj, parent);+      else replaceElementWithText (currentObj, newObj, parent);     }   } }
miso.cabal view
@@ -1,5 +1,5 @@ name:                miso-version:             0.1.0.4+version:             0.1.1.0 category:            Web, Miso, Data Structures license:             BSD3 license-file:        LICENSE
src/Miso/Html/Element.hs view
@@ -91,6 +91,7 @@     , output_     , progress_     , meter_+    , center_     -- * Audio and Video     , audio_     , video_@@ -323,6 +324,9 @@ -- | https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter meter_ :: [Attribute action] -> [View action] -> View action meter_ = nodeHtml "meter"+-- | https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center+center_ :: [Attribute action] -> [View action] -> View action+center_ = nodeHtml "center" -- | https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio audio_ :: [Attribute action] -> [View action] -> View action audio_ = nodeHtml "audio"