regen.mde 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/LICENSE +16 -16
  2. package/bin/build-corpus-editor.js +83 -83
  3. package/bin/build-corpus.js +41 -41
  4. package/bin/regen-mdeditor-install.js +27 -27
  5. package/bin/regen-mdeditor-uninstall.js +19 -19
  6. package/bin/validate-katex.js +93 -93
  7. package/desktop/BuildCorpusEditor/BuildCorpusEditor.csproj +22 -22
  8. package/desktop/BuildCorpusEditor/app.manifest +16 -16
  9. package/dist/release/{regen-mde-0.7.0-win-x64.zip → regen-mde-0.8.0-win-x64.zip} +0 -0
  10. package/dist/windows-editor/BuildCorpusEditor.dll +0 -0
  11. package/dist/windows-editor/BuildCorpusEditor.exe +0 -0
  12. package/dist/windows-editor/BuildCorpusEditor.pdb +0 -0
  13. package/dist/windows-editor/BuildCorpusEditor.runtimeconfig.json +1 -1
  14. package/dist/windows-editor/wwwroot/index.html +20 -20
  15. package/editor-web/index.html +21 -21
  16. package/editor-web/vite.config.js +13 -13
  17. package/examples/build-corpus.config.example.json +21 -21
  18. package/installer/install-regen-mde.ps1 +214 -214
  19. package/installer/regen-mde.nsi +81 -81
  20. package/package.json +90 -90
  21. package/pyproject.toml +34 -35
  22. package/requirements.txt +0 -1
  23. package/scripts/build-windows-editor.ps1 +47 -47
  24. package/scripts/package-windows-editor.ps1 +90 -90
  25. package/scripts/run-corpus.ps1 +28 -28
  26. package/scripts/run-editor-implementation-plane.ps1 +226 -226
  27. package/scripts/run-required-tests.ps1 +98 -98
  28. package/scripts/run-smoke.ps1 +28 -28
  29. package/src/build_corpus/__init__.py +1 -1
  30. package/src/build_corpus/equations.py +1345 -80
  31. package/src/build_corpus/templates/__init__.py +1 -1
  32. package/src/build_corpus/validate_assets.py +46 -46
  33. package/tools/audit_corpus.py +203 -203
  34. package/tools/collect_microsoft_word_templates.py +228 -228
  35. package/tools/collect_online_docx_corpus.py +272 -272
  36. package/tools/collect_online_pptx_corpus.py +252 -252
  37. package/tools/compare_pptx_inputs_outputs.py +87 -87
  38. package/tools/roundtrip_docx_corpus.py +171 -171
  39. package/dist/release/regen-mde-0.3.0-win-x64-setup.exe +0 -0
  40. package/dist/release/regen-mde-0.3.0-win-x64.zip +0 -0
  41. package/dist/release/regen-mde-0.7.0-win-x64-setup.exe +0 -0
@@ -1,90 +1,90 @@
1
- [CmdletBinding()]
2
- param(
3
- [string]$Root = "",
4
- [string]$Version = ""
5
- )
6
-
7
- $ErrorActionPreference = "Stop"
8
-
9
- if ([string]::IsNullOrWhiteSpace($Root)) {
10
- $Root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
11
- }
12
-
13
- if ([string]::IsNullOrWhiteSpace($Version)) {
14
- $pkg = Get-Content -Raw -LiteralPath (Join-Path $Root "package.json") | ConvertFrom-Json
15
- $Version = $pkg.version
16
- }
17
-
18
- $releaseRoot = Join-Path $Root "dist\release"
19
- $stage = Join-Path $releaseRoot "regen-mde-$Version-win-x64"
20
- $app = Join-Path $stage "app"
21
- $zip = Join-Path $releaseRoot "regen-mde-$Version-win-x64.zip"
22
- $setupExe = Join-Path $releaseRoot "regen-mde-$Version-win-x64-setup.exe"
23
-
24
- Remove-Item -LiteralPath $stage -Recurse -Force -ErrorAction SilentlyContinue
25
- Remove-Item -LiteralPath $zip -Force -ErrorAction SilentlyContinue
26
- Remove-Item -LiteralPath $setupExe -Force -ErrorAction SilentlyContinue
27
- New-Item -ItemType Directory -Force -Path $app | Out-Null
28
-
29
- Copy-Item -Path (Join-Path $Root "dist\windows-editor\*") -Destination $app -Recurse -Force
30
- Remove-Item -LiteralPath (Join-Path $app "BuildCorpusEditor.exe.WebView2") -Recurse -Force -ErrorAction SilentlyContinue
31
- Copy-Item -LiteralPath (Join-Path $Root "bin") -Destination $app -Recurse -Force
32
- Copy-Item -LiteralPath (Join-Path $Root "src") -Destination $app -Recurse -Force
33
- Copy-Item -LiteralPath (Join-Path $Root "requirements.txt") -Destination $app -Force
34
- Copy-Item -LiteralPath (Join-Path $Root "pyproject.toml") -Destination $app -Force
35
- Copy-Item -LiteralPath (Join-Path $Root "package.json") -Destination $app -Force
36
- Copy-Item -LiteralPath (Join-Path $Root "package-lock.json") -Destination $app -Force
37
-
38
- Copy-Item -LiteralPath (Join-Path $Root "installer\install-regen-mde.ps1") -Destination $stage -Force
39
-
40
- $readme = @"
41
- regen-mde for Windows
42
- =====================
43
-
44
- Install:
45
- Right-click install-regen-mde.ps1 and choose "Run with PowerShell"
46
-
47
- After install:
48
- Open the Windows Start menu and search for "regen-mde".
49
- Right-click .md or .docx files and choose "Open in regen-mde".
50
- Use "Uninstall regen-mde" from the Start menu to remove the app and shell verbs.
51
-
52
- Requirements:
53
- Windows with Microsoft Edge WebView2 runtime
54
- Node.js on PATH
55
- Python 3 on PATH with the Build Corpus Python requirements installed
56
-
57
- The installer copies the app to:
58
- %LOCALAPPDATA%\Programs\regen-mde
59
- "@
60
- Set-Content -LiteralPath (Join-Path $stage "README-INSTALL.txt") -Value $readme -Encoding UTF8
61
-
62
- Compress-Archive -Path (Join-Path $stage "*") -DestinationPath $zip -Force
63
-
64
- if (-not (Test-Path -LiteralPath $zip)) {
65
- throw "Package zip was not created: $zip"
66
- }
67
-
68
- $makensis = @(
69
- "C:\Program Files (x86)\NSIS\makensis.exe",
70
- "C:\Program Files (x86)\NSIS\Bin\makensis.exe"
71
- ) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
72
-
73
- if ($makensis) {
74
- & $makensis `
75
- "/DVERSION=$Version" `
76
- "/DAPP_SOURCE=$app" `
77
- "/DOUT_FILE=$setupExe" `
78
- (Join-Path $Root "installer\regen-mde.nsi")
79
- if ($LASTEXITCODE -ne 0) {
80
- throw "NSIS installer build failed with exit code $LASTEXITCODE"
81
- }
82
- if (-not (Test-Path -LiteralPath $setupExe)) {
83
- throw "Installer exe was not created: $setupExe"
84
- }
85
- Write-Host "Packaged $setupExe"
86
- } else {
87
- Write-Warning "NSIS makensis.exe was not found; skipped setup EXE package."
88
- }
89
-
90
- Write-Host "Packaged $zip"
1
+ [CmdletBinding()]
2
+ param(
3
+ [string]$Root = "",
4
+ [string]$Version = ""
5
+ )
6
+
7
+ $ErrorActionPreference = "Stop"
8
+
9
+ if ([string]::IsNullOrWhiteSpace($Root)) {
10
+ $Root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
11
+ }
12
+
13
+ if ([string]::IsNullOrWhiteSpace($Version)) {
14
+ $pkg = Get-Content -Raw -LiteralPath (Join-Path $Root "package.json") | ConvertFrom-Json
15
+ $Version = $pkg.version
16
+ }
17
+
18
+ $releaseRoot = Join-Path $Root "dist\release"
19
+ $stage = Join-Path $releaseRoot "regen-mde-$Version-win-x64"
20
+ $app = Join-Path $stage "app"
21
+ $zip = Join-Path $releaseRoot "regen-mde-$Version-win-x64.zip"
22
+ $setupExe = Join-Path $releaseRoot "regen-mde-$Version-win-x64-setup.exe"
23
+
24
+ Remove-Item -LiteralPath $stage -Recurse -Force -ErrorAction SilentlyContinue
25
+ Remove-Item -LiteralPath $zip -Force -ErrorAction SilentlyContinue
26
+ Remove-Item -LiteralPath $setupExe -Force -ErrorAction SilentlyContinue
27
+ New-Item -ItemType Directory -Force -Path $app | Out-Null
28
+
29
+ Copy-Item -Path (Join-Path $Root "dist\windows-editor\*") -Destination $app -Recurse -Force
30
+ Remove-Item -LiteralPath (Join-Path $app "BuildCorpusEditor.exe.WebView2") -Recurse -Force -ErrorAction SilentlyContinue
31
+ Copy-Item -LiteralPath (Join-Path $Root "bin") -Destination $app -Recurse -Force
32
+ Copy-Item -LiteralPath (Join-Path $Root "src") -Destination $app -Recurse -Force
33
+ Copy-Item -LiteralPath (Join-Path $Root "requirements.txt") -Destination $app -Force
34
+ Copy-Item -LiteralPath (Join-Path $Root "pyproject.toml") -Destination $app -Force
35
+ Copy-Item -LiteralPath (Join-Path $Root "package.json") -Destination $app -Force
36
+ Copy-Item -LiteralPath (Join-Path $Root "package-lock.json") -Destination $app -Force
37
+
38
+ Copy-Item -LiteralPath (Join-Path $Root "installer\install-regen-mde.ps1") -Destination $stage -Force
39
+
40
+ $readme = @"
41
+ regen-mde for Windows
42
+ =====================
43
+
44
+ Install:
45
+ Right-click install-regen-mde.ps1 and choose "Run with PowerShell"
46
+
47
+ After install:
48
+ Open the Windows Start menu and search for "regen-mde".
49
+ Right-click .md or .docx files and choose "Open in regen-mde".
50
+ Use "Uninstall regen-mde" from the Start menu to remove the app and shell verbs.
51
+
52
+ Requirements:
53
+ Windows with Microsoft Edge WebView2 runtime
54
+ Node.js on PATH
55
+ Python 3 on PATH with the Build Corpus Python requirements installed
56
+
57
+ The installer copies the app to:
58
+ %LOCALAPPDATA%\Programs\regen-mde
59
+ "@
60
+ Set-Content -LiteralPath (Join-Path $stage "README-INSTALL.txt") -Value $readme -Encoding UTF8
61
+
62
+ Compress-Archive -Path (Join-Path $stage "*") -DestinationPath $zip -Force
63
+
64
+ if (-not (Test-Path -LiteralPath $zip)) {
65
+ throw "Package zip was not created: $zip"
66
+ }
67
+
68
+ $makensis = @(
69
+ "C:\Program Files (x86)\NSIS\makensis.exe",
70
+ "C:\Program Files (x86)\NSIS\Bin\makensis.exe"
71
+ ) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
72
+
73
+ if ($makensis) {
74
+ & $makensis `
75
+ "/DVERSION=$Version" `
76
+ "/DAPP_SOURCE=$app" `
77
+ "/DOUT_FILE=$setupExe" `
78
+ (Join-Path $Root "installer\regen-mde.nsi")
79
+ if ($LASTEXITCODE -ne 0) {
80
+ throw "NSIS installer build failed with exit code $LASTEXITCODE"
81
+ }
82
+ if (-not (Test-Path -LiteralPath $setupExe)) {
83
+ throw "Installer exe was not created: $setupExe"
84
+ }
85
+ Write-Host "Packaged $setupExe"
86
+ } else {
87
+ Write-Warning "NSIS makensis.exe was not found; skipped setup EXE package."
88
+ }
89
+
90
+ Write-Host "Packaged $zip"
@@ -1,28 +1,28 @@
1
- param(
2
- [Parameter(Mandatory=$true)]
3
- [string]$Source,
4
-
5
- [string]$Out = ".tmp\corpus",
6
-
7
- [ValidateSet("assets", "base64", "s3")]
8
- [string]$Images = "assets",
9
-
10
- [string]$Config = ""
11
- )
12
-
13
- $ErrorActionPreference = "Stop"
14
- $root = Split-Path -Parent $PSScriptRoot
15
- $buildCorpus = Join-Path $root "bin\build-corpus.js"
16
- $katex = Join-Path $root "bin\validate-katex.js"
17
- $assetValidator = Join-Path $root "src\build_corpus\validate_assets.py"
18
-
19
- $args = @($buildCorpus, $Source, "--out", $Out, "--images", $Images)
20
- if ($Config) {
21
- $args += @("--config", $Config)
22
- }
23
-
24
- node @args
25
- node $katex $Out | Set-Content -Path (Join-Path $Out "katex-report.json") -Encoding UTF8
26
- py -3 $assetValidator $Out | Set-Content -Path (Join-Path $Out "asset-report.json") -Encoding UTF8
27
-
28
- Write-Host "Corpus test passed: $Out"
1
+ param(
2
+ [Parameter(Mandatory=$true)]
3
+ [string]$Source,
4
+
5
+ [string]$Out = ".tmp\corpus",
6
+
7
+ [ValidateSet("assets", "base64", "s3")]
8
+ [string]$Images = "assets",
9
+
10
+ [string]$Config = ""
11
+ )
12
+
13
+ $ErrorActionPreference = "Stop"
14
+ $root = Split-Path -Parent $PSScriptRoot
15
+ $buildCorpus = Join-Path $root "bin\build-corpus.js"
16
+ $katex = Join-Path $root "bin\validate-katex.js"
17
+ $assetValidator = Join-Path $root "src\build_corpus\validate_assets.py"
18
+
19
+ $args = @($buildCorpus, $Source, "--out", $Out, "--images", $Images)
20
+ if ($Config) {
21
+ $args += @("--config", $Config)
22
+ }
23
+
24
+ node @args
25
+ node $katex $Out | Set-Content -Path (Join-Path $Out "katex-report.json") -Encoding UTF8
26
+ py -3 $assetValidator $Out | Set-Content -Path (Join-Path $Out "asset-report.json") -Encoding UTF8
27
+
28
+ Write-Host "Corpus test passed: $Out"