Skip to content

Commit d090902

Browse files
committed
fix
2 parents 1f4ff06 + ee110ec commit d090902

File tree

10 files changed

+749
-530
lines changed

10 files changed

+749
-530
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
run: lake build ProofWidgets
5151

5252
- name: Try publishing @leanprover-community/proofwidgets4
53-
if: ${{ startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-pre') && matrix.os == 'ubuntu-latest' }}
53+
if: ${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-pre') && matrix.os == 'ubuntu-latest' }}
5454
continue-on-error: true
5555
run: cd widget/ && npm publish --access=public
5656

@@ -59,7 +59,9 @@ jobs:
5959

6060
- name: Create GitHub release for tag (Ubuntu)
6161
if: github.ref_type == 'tag' && matrix.os == 'ubuntu-latest'
62-
uses: softprops/action-gh-release@v1
62+
uses: softprops/action-gh-release@v2
63+
with:
64+
prerelease: ${{ contains(github.ref, '-pre') }}
6365

6466
- name: Upload release archive (Ubuntu)
6567
if: github.ref_type == 'tag' && matrix.os == 'ubuntu-latest'

ProofWidgets/Component/Recharts.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,20 @@ def LineChart : Component LineChartProps where
3838
javascript := Recharts.javascript
3939
«export» := "LineChart"
4040

41+
inductive AxisType where
42+
/-- Treat values as numbers: spacing on axis by numeric difference. -/
43+
| number
44+
/-- Treat values as categorical: equal spacing between values. -/
45+
| category
46+
deriving FromJson, ToJson
47+
4148
structure AxisProps where
4249
dataKey? : Option Json := none
4350
domain? : Option (Array Json) := none
4451
allowDataOverflow : Bool := false
52+
/-- How values along this axis should be interpreted.
53+
The Recharts default is `category`. -/
54+
type : AxisType := .number
4555
-- TODO: There are many more props
4656
deriving FromJson, ToJson
4757

ProofWidgets/Data/Svg.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ end Svg
158158

159159
def mkIdToIdx {f} (elements : Array (Svg.Element f)) : Std.HashMap String (Fin elements.size) :=
160160
let idToIdx := elements
161-
|>.mapFinIdx (λ idx el => (idx, el)) -- zip with index
161+
|>.mapFinIdx (λ idx el h => (idx, h⟩, el)) -- zip with `Fin` index
162162
|>.filterMap (λ (idx,el) => el.id.map (λ id => (id, idx))) -- keep only elements with specified id
163163
|>.toList
164164
|> Std.HashMap.ofList

lake-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"type": "git",
66
"subDir": null,
77
"scope": "leanprover-community",
8-
"rev": "7805acf1864ba1a2e359f86a8f092ccf1438ad83",
8+
"rev": "e8dc5fc16c625fc4fe08f42d625523275ddbbb4b",
99
"name": "batteries",
1010
"manifestFile": "lake-manifest.json",
11-
"inputRev": "v4.15.0-rc1",
11+
"inputRev": "v4.15.0",
1212
"inherited": false,
1313
"configFile": "lakefile.toml"}],
1414
"name": "proofwidgets",

lakefile.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package proofwidgets where
66
buildArchive? := "ProofWidgets4.tar.gz"
77
releaseRepo := "https://github.com/leanprover-community/ProofWidgets4"
88

9-
require "leanprover-community" / "batteries" @ git "v4.15.0-rc1"
9+
require "leanprover-community" / "batteries" @ git "v4.16.0-rc2"
1010

1111
def npmCmd : String :=
1212
if Platform.isWindows then "npm.cmd" else "npm"

lean-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
leanprover/lean4:nightly-2024-12-19
1+
leanprover/lean4:nightly-2025-01-20

package-lock.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)