GithubHelp home page GithubHelp logo

statebox / purescript-studio Goto Github PK

View Code? Open in Web Editor NEW
4.0 8.0 0.0 1.88 MB

Statebox studio + core + API + REST client

Home Page: https://studio.statebox.cloud

PureScript 86.29% JavaScript 2.58% Dhall 1.51% Shell 0.76% HTML 1.43% CSS 5.16% TypeScript 2.27%
statebox purescript petrinet string-diagram editor protocol-oriented-programming gui api

purescript-studio's Introduction

Statebox PureScript monorepo

studio demo: Netlify Status.

source code docs: Netlify Status

monorepo: Build Status


This contains Statebox Studio, Statebox REST API, Statebox REST client and associated projects.

See the docs in the studio directory.

purescript-studio's People

Contributors

andrevidela avatar antonleviathan avatar clayrat avatar epost avatar marcosh avatar sjoerdvisscher avatar wires avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

purescript-studio's Issues

Scale Petri nets

Related links:
github.com/klangner/purescript-linear-algebra
pursuit.purescript.org/search?q=vec

@epost ter informatie

Add Route data type

This captures some of the 'routing' (menu navigation) that we're already doing more neatly.

Make the UI look pretty.

  • gradient background
  • highlight selected net in chooser
  • breadcrumbs should show path
  • Select diagram editor by clicking menu on the left instead of ugly menu options
  • hide place/transition editor forms when not focused
  • put place/transition editor forms in the same column
  • don't show both place and transition editors at the same time, by default
  • focused transitions should be highlighted
  • Fix the object chooser treelist menu for multi-projects

Implement authorization, roles

  • Allow for user-definable roles
  • Attach a set of roles to a project
  • Allow the Petri net editor to label certain transitions of nets within a project with a set of roles

Indicate label visibility state with the buttons

There are 3 buttons for toggling the visibility of arcs, places and transitions (ElemKinds) respectively. We would like to show whether labels for a given ElemKind are currently visible or not.

We can modify the style of the buttons or simply use checkboxes.

Set SVG pointer-events in code instead of CSS

The pointer-events: none is to ensure that dragging operators around also works when dragging the operator's label. We do this in CSS now but we don't want someone to accidentally delete this from the CSS and mess up the behaviour (rather than the styling) of the draggable operators.

The current CSS is:

  pointer-events: none; /* mouse should click through to the underlying rectangle */

A Halogen SVG Attribute should be introduced for this.

Create arc editor

The arc editor should be able to edit:

  • name label (should this be String (for now?) or some type variable?)
  • guard label (newtype Guard = Guard String for now, similar to the Typedef newtype we're using)

Look at the PlaceEditor and TransitionEditor for inspiration.

TODO:

  1. A click on an arc should emit an ArcFocused event, similar to ArcFocused and PlaceFocused.
  2. This should bring up an ArcEditor.form as described above.
  3. The arc editor form should emit arc update events that should be handled in PetriNetViews's eval function. For now, don't update the state or anything yet, just do pure next
  4. Update the state. (Needs some changes to the model, etc.)

Allow enabling/disabling of place and transition labels.

The user should be able to switch them on or off individually. Also, show them on hover may be nice. Places have a title attr to sort of do that now but that sucks, for one because it takes a long time before the title appears.

Componentise

  • Make the viewer/editor usable as a child component
  • Move object chooser treeview menu into its own module
  • ...

Token should appear in new place only after animation is completed

Currently when a tx is fired the token is animated travelling along arcs to appropriate places but they also immediately appear in their destination places (effectively showing the same token twice). It should be the case that the tokens only appear in the new place once the animation is finished.

Create a screen for viewing typedefs

  • define (another) fake Typedef with products, sums, unit
  • add menu option
  • add screen
  • add a (sort of) tree view renderer
  • render type tree recursively
  • componentise
  • make the accolades look more like accolades (HTML+CSS structure is there already, needs a bit of tweaking)
  • allow alternatives for +, *, in the accolades, like choice and combination or something

Embed String Diagram Editor component into Studio

fyi @wires

  • Create an embeddable component
  • Embed it as a child component of Studio
    • switch studio to multi-component setup
    • correct mouse coordinates relative to component's getBoundingClientRect
  • move styling from code over to CSS
  • restyle to fit in with Studio

Load project over HTTP

  • Decide on http client. Options:
  • Use it to load a net definition (String), for example journal-process.PNPRO.
  • Parse it using the PNPRO parser like we do here:
     pnproNetInfos1 :: Array NetInfo
     pnproNetInfos1 = PNPRO.mkNetInfo <$> pnproProject1.project.gspn
      where
        pnproProject1 :: PNPRO.Document
        pnproProject1 = PNPRO.fromStringUnsafe pnproXml1
  • Add an import PNPRO project menu to the navbar .
  • Set the Studio state to the resulting list of nets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.