-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bundle of widget improvements (#2964)
Implements RFC #2963. Leftover tasks: - [x] Provide companion PR to vscode-lean4 (leanprover/vscode-lean4#376) - [x] Companion PR to std4 (leanprover-community/batteries#467) - [x] Companion PR to ProofWidgets4 (leanprover-community/ProofWidgets4#36) - [X] Companion commit to mathlib4 (leanprover-community/mathlib4@0f4660f) - [ ] ~~Update the manual chapter~~ (will do in a follow-up)
- Loading branch information
Showing
14 changed files
with
554 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/- | ||
Copyright (c) 2023 Wojciech Nawrocki. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Wojciech Nawrocki | ||
-/ | ||
import Lean.Server.Rpc.Basic | ||
|
||
namespace Lean.Widget | ||
|
||
/-- An instance of a widget component: | ||
the identifier of a widget module and the hash of its JS source code | ||
together with props. | ||
See the [manual entry](https://lean-lang.org/lean4/doc/examples/widgets.lean.html) | ||
for more information about widgets. -/ | ||
structure WidgetInstance where | ||
/-- Name of the `@[widget_module]`. -/ | ||
id : Name | ||
/-- Hash of the JS source of the widget module. -/ | ||
javascriptHash : UInt64 | ||
/-- Arguments to be passed to the component's default exported function. | ||
Props may contain RPC references, | ||
so must be stored as a computation | ||
with access to the RPC object store. -/ | ||
props : StateM Server.RpcObjectStore Json | ||
|
||
end Lean.Widget |
Oops, something went wrong.