File: .lake/packages/proofwidgets/ProofWidgets/Component/InteractiveSvg.lean

full_name: _private.«.lake».packages.proofwidgets.ProofWidgets.Component.InteractiveSvg.0.Float.toInt
code: private def _root_.Float.toInt (x : Float) : Int 
goal: Int

full_name: ProofWidgets.Svg.ActionKind.mouseup
code: inductive ActionKind where
  | timeout
  | mousedown
  | mouseup
  | mousemove -- [note] mouse moves only happen when mouse button is down.
  deriving ToJson, FromJson, DecidableEq
goal: ProofWidgets.Svg.ActionKind

full_name: ProofWidgets.Svg.instDecidableEqActionKind
code: inductive ActionKind where
  | timeout
  | mousedown
  | mouseup
  | mousemove -- [note] mouse moves only happen when mouse button is down.
  deriving ToJson, FromJson, DecidableEq
goal: DecidableEq ProofWidgets.Svg.ActionKind

full_name: ProofWidgets.Svg.ActionKind.mousedown
code: inductive ActionKind where
  | timeout
  | mousedown
  | mouseup
  | mousemove -- [note] mouse moves only happen when mouse button is down.
  deriving ToJson, FromJson, DecidableEq
goal: ProofWidgets.Svg.ActionKind

full_name: ProofWidgets.Svg.ActionKind.timeout
code: inductive ActionKind where
  | timeout
  | mousedown
  | mouseup
  | mousemove -- [note] mouse moves only happen when mouse button is down.
  deriving ToJson, FromJson, DecidableEq
goal: ProofWidgets.Svg.ActionKind

full_name: ProofWidgets.Svg.ActionKind.mousemove
code: inductive ActionKind where
  | timeout
  | mousedown
  | mouseup
  | mousemove -- [note] mouse moves only happen when mouse button is down.
  deriving ToJson, FromJson, DecidableEq
goal: ProofWidgets.Svg.ActionKind

full_name: ProofWidgets.Svg.ActionKind
code: inductive ActionKind where
  | timeout
  | mousedown
  | mouseup
  | mousemove -- [note] mouse moves only happen when mouse button is down.
  deriving ToJson, FromJson, DecidableEq
goal: Type

full_name: ProofWidgets.Svg.instToJsonActionKind
code: ToJson
goal: Lean.ToJson ProofWidgets.Svg.ActionKind

full_name: ProofWidgets.Svg.instFromJsonActionKind
code: FromJson
goal: Lean.FromJson ProofWidgets.Svg.ActionKind

full_name: ProofWidgets.Svg.Action.data
code: structure Action where
  kind : ActionKind
  id : Option String
  data : Option Json
  deriving ToJson, FromJson
goal: Option Lean.Json

full_name: ProofWidgets.Svg.Action
code: structure Action where
  kind : ActionKind
  id : Option String
  data : Option Json
  deriving ToJson, FromJson
goal: Type

full_name: ProofWidgets.Svg.Action.id
code: structure Action where
  kind : ActionKind
  id : Option String
  data : Option Json
  deriving ToJson, FromJson
goal: Option String

full_name: ProofWidgets.Svg.Action.kind
code: structure Action where
  kind : ActionKind
  id : Option String
  data : Option Json
  deriving ToJson, FromJson
goal: ProofWidgets.Svg.ActionKind

full_name: ProofWidgets.Svg.instToJsonAction
code: ToJson
goal: Lean.ToJson ProofWidgets.Svg.Action

full_name: ProofWidgets.Svg.instFromJsonAction
code: FromJson
goal: Lean.FromJson ProofWidgets.Svg.Action

full_name: ProofWidgets.Svg.SvgState.state
code: /-- The input type `State` is any state the user wants to use and update

SvgState in addition automatically handles tracking of time, selection and custom data -/
structure SvgState (State : Type) where
  state : State
  time : Float /-- time in milliseconds -/
  selected : Option String
  mousePos : Option (Int × Int)
  idToData : List (String × Json)
deriving ToJson, FromJson, Server.RpcEncodable
goal: State

full_name: ProofWidgets.Svg.SvgState
code: /-- The input type `State` is any state the user wants to use and update

SvgState in addition automatically handles tracking of time, selection and custom data -/
structure SvgState (State : Type) where
  state : State
  time : Float /-- time in milliseconds -/
  selected : Option String
  mousePos : Option (Int × Int)
  idToData : List (String × Json)
deriving ToJson, FromJson, Server.RpcEncodable
goal: Type

full_name: ProofWidgets.Svg.SvgState.idToData
code: /-- The input type `State` is any state the user wants to use and update

SvgState in addition automatically handles tracking of time, selection and custom data -/
structure SvgState (State : Type) where
  state : State
  time : Float /-- time in milliseconds -/
  selected : Option String
  mousePos : Option (Int × Int)
  idToData : List (String × Json)
deriving ToJson, FromJson, Server.RpcEncodable
goal: List (String × Lean.Json)

full_name: ProofWidgets.Svg.SvgState.selected
code: /-- The input type `State` is any state the user wants to use and update

SvgState in addition automatically handles tracking of time, selection and custom data -/
structure SvgState (State : Type) where
  state : State
  time : Float /-- time in milliseconds -/
  selected : Option String
  mousePos : Option (Int × Int)
  idToData : List (String × Json)
deriving ToJson, FromJson, Server.RpcEncodable
goal: Option String

full_name: ProofWidgets.Svg.SvgState.time
code: /-- The input type `State` is any state the user wants to use and update

SvgState in addition automatically handles tracking of time, selection and custom data -/
structure SvgState (State : Type) where
  state : State
  time : Float /-- time in milliseconds -/
  selected : Option String
  mousePos : Option (Int × Int)
  idToData : List (String × Json)
deriving ToJson, FromJson, Server.RpcEncodable
goal: Float

full_name: ProofWidgets.Svg.SvgState.mousePos
code: /-- The input type `State` is any state the user wants to use and update

SvgState in addition automatically handles tracking of time, selection and custom data -/
structure SvgState (State : Type) where
  state : State
  time : Float /-- time in milliseconds -/
  selected : Option String
  mousePos : Option (Int × Int)
  idToData : List (String × Json)
deriving ToJson, FromJson, Server.RpcEncodable
goal: Option (Int × Int)

full_name: ProofWidgets.Svg.instToJsonSvgState
code: ToJson
goal: {State : Type} → [inst : Lean.ToJson State] → Lean.ToJson (ProofWidgets.Svg.SvgState State)

full_name: ProofWidgets.Svg.instFromJsonSvgState
code: FromJson
goal: {State : Type} → [inst : Lean.FromJson State] → Lean.FromJson (ProofWidgets.Svg.SvgState State)

full_name: ProofWidgets.Svg.ProofWidgets.Svg.SvgState.instToJsonRpcEncodablePacket
code: Server.RpcEncodable
goal: Lean.ToJson ProofWidgets.Svg.ProofWidgets.Svg.SvgState.RpcEncodablePacket✝

full_name: ProofWidgets.Svg.ProofWidgets.Svg.SvgState.instRpcEncodableSvgState
code: Server.RpcEncodable
goal: Lean.Server.RpcEncodable (ProofWidgets.Svg.SvgState State)

full_name: ProofWidgets.Svg.ProofWidgets.Svg.SvgState.instRpcEncodableSvgState.dec._@..lake.packages.proofwidgets.ProofWidgets.Component.InteractiveSvg._hyg.565
code: Server.RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) (ProofWidgets.Svg.SvgState State)

full_name: ProofWidgets.Svg.ProofWidgets.Svg.SvgState.RpcEncodablePacket._@..lake.packages.proofwidgets.ProofWidgets.Component.InteractiveSvg._hyg.565
code: Server.RpcEncodable
goal: Type

full_name: ProofWidgets.Svg.ProofWidgets.Svg.SvgState.instFromJsonRpcEncodablePacket
code: Server.RpcEncodable
goal: Lean.FromJson ProofWidgets.Svg.ProofWidgets.Svg.SvgState.RpcEncodablePacket✝

full_name: ProofWidgets.Svg.ProofWidgets.Svg.SvgState.instRpcEncodableSvgState.enc._@..lake.packages.proofwidgets.ProofWidgets.Component.InteractiveSvg._hyg.565
code: Server.RpcEncodable
goal: ProofWidgets.Svg.SvgState State → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: ProofWidgets.Svg.UpdateParams.actions
code: structure UpdateParams (State : Type) where
  elapsed : Float
  actions : Array Action
  state : SvgState State
  mousePos : Option (Float × Float) -- TODO: change to Option (Int × Int) or do we want to support subpixel precision?
  deriving ToJson, FromJson
goal: Array ProofWidgets.Svg.Action

full_name: ProofWidgets.Svg.UpdateParams.state
code: structure UpdateParams (State : Type) where
  elapsed : Float
  actions : Array Action
  state : SvgState State
  mousePos : Option (Float × Float) -- TODO: change to Option (Int × Int) or do we want to support subpixel precision?
  deriving ToJson, FromJson
goal: ProofWidgets.Svg.SvgState State

full_name: ProofWidgets.Svg.UpdateParams
code: structure UpdateParams (State : Type) where
  elapsed : Float
  actions : Array Action
  state : SvgState State
  mousePos : Option (Float × Float) -- TODO: change to Option (Int × Int) or do we want to support subpixel precision?
  deriving ToJson, FromJson
goal: Type

full_name: ProofWidgets.Svg.UpdateParams.elapsed
code: structure UpdateParams (State : Type) where
  elapsed : Float
  actions : Array Action
  state : SvgState State
  mousePos : Option (Float × Float) -- TODO: change to Option (Int × Int) or do we want to support subpixel precision?
  deriving ToJson, FromJson
goal: Float

full_name: ProofWidgets.Svg.UpdateParams.mousePos
code: structure UpdateParams (State : Type) where
  elapsed : Float
  actions : Array Action
  state : SvgState State
  mousePos : Option (Float × Float) -- TODO: change to Option (Int × Int) or do we want to support subpixel precision?
  deriving ToJson, FromJson
goal: Option (Float × Float)

full_name: ProofWidgets.Svg.instToJsonUpdateParams
code: ToJson
goal: {State : Type} → [inst : Lean.ToJson State] → Lean.ToJson (ProofWidgets.Svg.UpdateParams State)

full_name: ProofWidgets.Svg.instFromJsonUpdateParams
code: FromJson
goal: {State : Type} → [inst : Lean.FromJson State] → Lean.FromJson (ProofWidgets.Svg.UpdateParams State)

full_name: ProofWidgets.Svg.UpdateResult.state
code: structure UpdateResult (State : Type) where
  html : Html
  state : SvgState State
  /-- Approximate number of milliseconds to wait before calling again. -/
  callbackTime : Option Float := some 33
  deriving Server.RpcEncodable
goal: ProofWidgets.Svg.SvgState State

full_name: ProofWidgets.Svg.UpdateResult.html
code: structure UpdateResult (State : Type) where
  html : Html
  state : SvgState State
  /-- Approximate number of milliseconds to wait before calling again. -/
  callbackTime : Option Float := some 33
  deriving Server.RpcEncodable
goal: ProofWidgets.Html

full_name: ProofWidgets.Svg.UpdateResult.callbackTime
code: structure UpdateResult (State : Type) where
  html : Html
  state : SvgState State
  /-- Approximate number of milliseconds to wait before calling again. -/
  callbackTime : Option Float := some 33
  deriving Server.RpcEncodable
goal: Option Float

full_name: ProofWidgets.Svg.UpdateResult
code: structure UpdateResult (State : Type) where
  html : Html
  state : SvgState State
  /-- Approximate number of milliseconds to wait before calling again. -/
  callbackTime : Option Float := some 33
  deriving Server.RpcEncodable
goal: Type

full_name: ProofWidgets.Svg.ProofWidgets.Svg.UpdateResult.RpcEncodablePacket._@..lake.packages.proofwidgets.ProofWidgets.Component.InteractiveSvg._hyg.2050
code: Server.RpcEncodable
goal: Type

full_name: ProofWidgets.Svg.ProofWidgets.Svg.UpdateResult.instToJsonRpcEncodablePacket
code: Server.RpcEncodable
goal: Lean.ToJson ProofWidgets.Svg.ProofWidgets.Svg.UpdateResult.RpcEncodablePacket✝

full_name: ProofWidgets.Svg.ProofWidgets.Svg.UpdateResult.instRpcEncodableUpdateResult.enc._@..lake.packages.proofwidgets.ProofWidgets.Component.InteractiveSvg._hyg.2050
code: Server.RpcEncodable
goal: ProofWidgets.Svg.UpdateResult State → StateM Lean.Server.RpcObjectStore Lean.Json

full_name: ProofWidgets.Svg.ProofWidgets.Svg.UpdateResult.instRpcEncodableUpdateResult
code: Server.RpcEncodable
goal: Lean.Server.RpcEncodable (ProofWidgets.Svg.UpdateResult State)

full_name: ProofWidgets.Svg.ProofWidgets.Svg.UpdateResult.instRpcEncodableUpdateResult.dec._@..lake.packages.proofwidgets.ProofWidgets.Component.InteractiveSvg._hyg.2050
code: Server.RpcEncodable
goal: Lean.Json → ExceptT String (ReaderT Lean.Server.RpcObjectStore Id) (ProofWidgets.Svg.UpdateResult State)

full_name: ProofWidgets.Svg.ProofWidgets.Svg.UpdateResult.instFromJsonRpcEncodablePacket
code: Server.RpcEncodable
goal: Lean.FromJson ProofWidgets.Svg.ProofWidgets.Svg.UpdateResult.RpcEncodablePacket✝

full_name: ProofWidgets.Svg.InteractiveSvg.render
code: structure InteractiveSvg (State : Type) where
  init : State
  frame : Svg.Frame
  update (time_ms Δt_ms : Float) (action : Action)
         (mouseStart mouseEnd : Option (Svg.Point frame))
         (selectedId : Option String) (getSelectedData : (α : Type) → [FromJson α] → Option α)
         : State → State
  render (time_ms : Float) (mouseStart mouseEnd : Option (Svg.Point frame)) : State → Svg frame
goal: State → ProofWidgets.Svg self.frame

full_name: ProofWidgets.Svg.InteractiveSvg.frame
code: structure InteractiveSvg (State : Type) where
  init : State
  frame : Svg.Frame
  update (time_ms Δt_ms : Float) (action : Action)
         (mouseStart mouseEnd : Option (Svg.Point frame))
         (selectedId : Option String) (getSelectedData : (α : Type) → [FromJson α] → Option α)
         : State → State
  render (time_ms : Float) (mouseStart mouseEnd : Option (Svg.Point frame)) : State → Svg frame
goal: ProofWidgets.Svg.Frame

full_name: ProofWidgets.Svg.InteractiveSvg.update
code: structure InteractiveSvg (State : Type) where
  init : State
  frame : Svg.Frame
  update (time_ms Δt_ms : Float) (action : Action)
         (mouseStart mouseEnd : Option (Svg.Point frame))
         (selectedId : Option String) (getSelectedData : (α : Type) → [FromJson α] → Option α)
         : State → State
  render (time_ms : Float) (mouseStart mouseEnd : Option (Svg.Point frame)) : State → Svg frame
goal: State → State

full_name: ProofWidgets.Svg.InteractiveSvg
code: structure InteractiveSvg (State : Type) where
  init : State
  frame : Svg.Frame
  update (time_ms Δt_ms : Float) (action : Action)
         (mouseStart mouseEnd : Option (Svg.Point frame))
         (selectedId : Option String) (getSelectedData : (α : Type) → [FromJson α] → Option α)
         : State → State
  render (time_ms : Float) (mouseStart mouseEnd : Option (Svg.Point frame)) : State → Svg frame
goal: Type 1

full_name: ProofWidgets.Svg.InteractiveSvg.init
code: structure InteractiveSvg (State : Type) where
  init : State
  frame : Svg.Frame
  update (time_ms Δt_ms : Float) (action : Action)
         (mouseStart mouseEnd : Option (Svg.Point frame))
         (selectedId : Option String) (getSelectedData : (α : Type) → [FromJson α] → Option α)
         : State → State
  render (time_ms : Float) (mouseStart mouseEnd : Option (Svg.Point frame)) : State → Svg frame
goal: State

full_name: ProofWidgets.Svg.InteractiveSvg.serverRpcMethod
code: def InteractiveSvg.serverRpcMethod {State : Type} (isvg : InteractiveSvg State) (params : UpdateParams State)
  : RequestM (RequestTask (UpdateResult State)) 
goal: Lean.Server.RequestM (Lean.Server.RequestTask (ProofWidgets.Svg.UpdateResult State))