Пример #1
0
  (model:Model, address:Address<Action>):DOM =>
  html.main
  ( { className: 'root'
    , style: styleSheet.root
    , tabIndex: 1
    , onKeyDown: onWindow(address, decodeKeyDown)
    , onKeyUp: onWindow(address, decodeKeyUp)
    , onBlur: onWindow(address, always(Blur))
    , onFocus: onWindow(address, always(Focus))
    , onUnload: onWindow(address, always(Unload))
    , onServoMouseForceDown: on(address, always(ShowTabs))
    , onWebkitMouseForceDown: on(address, always(ShowTabs))
    }
  , [ Navigators.view
      ( model.navigators
      , forward(address, NavigatorsAction)
      )

    , Sidebar.view
      ( model.sidebar
      , model.navigators.deck
      , forward(address, SidebarAction)
      )

    , Shell.view
      ( model.shell
      , forward(address, ShellAction)
      )

    , Devtools.view
      ( model.devtools
      , forward(address, DevtoolsAction)
      )
    ]
  );
Пример #2
0
 (model:Model, address:Address<Action>):DOM =>
 html.div
 ( { style: styleSheet.base
   , id: 'repl'
   , onWindowFocus: onWindow(address, always(Focus))
   }
 , [ ...Object
     .keys(model.cells)
     .map
     ( id =>
       Cell.view
       ( model.cells[id]
       , forward(address, ByID(id))
       )
     )
   , html.meta
     ( { name: 'theme-color'
       , content: `${styleSheet.base.backgroundColor}|${styleSheet.base.color}`
       }
     )
   ]
 );
Пример #3
0
  (model/*:Model*/, address/*:Address<Action>*/)/*:DOM*/ =>
  html.main
  ( { className: 'root'
    , style: styleSheet.root
    , tabIndex: 1
    , onKeyDown: onWindow(address, decodeKeyDown)
    , onKeyUp: onWindow(address, decodeKeyUp)
    , onBlur: onWindow(address, always(Blur))
    , onFocus: onWindow(address, always(Focus))
    , onUnload: onWindow(address, always(Unload))
    }
  , [ html.div
      ( { className: 'browser-content'
        , style:
          Style
          ( styleSheet.content
          , { width: `calc(100vw - ${model.display.rightOffset}px)`
            }
          )
        }
      , [ thunk
          ( 'web-views'
          , WebViews.view
          , model.webViews
          , forward(address, WebViewsAction)
          )
        , thunk
          ( 'overlay'
          , Overlay.view
          , model.overlay
          , forward(address, OverlayAction))
        , thunk
          ( 'assistant'
          , Assistant.view
          , model.assistant
          , forward(address, AssistantAction)
          )
        , thunk
          ( 'input'
          , Input.view
          , model.input
          , forward(address, InputAction)
          )
        , thunk
          ( 'devtools'
          , Devtools.view
          , model.devtools
          , forward(address, DevtoolsAction)
          )
        ]
      )
      , thunk
      ( 'sidebar'
      , Sidebar.view
      , model.sidebar
      , model.webViews
      , forward(address, SidebarAction)
      )

    , thunk
      ( 'shell'
      , Shell.view
      , model.shell
      , forward(address, ShellAction)
      )
    ]
  );