Skip to content

Commit 5ec48ce

Browse files
committed
refactor: update "MarkPad" to "MarkTex"
1 parent b99faaa commit 5ec48ce

183 files changed

Lines changed: 157 additions & 357 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/desktop-windows.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Rust cache
5454
uses: swatinem/rust-cache@v2
5555
with:
56-
workspaces: artifacts/artifacts/markpad/src-tauri -> target
56+
workspaces: artifacts/artifacts/marktex/src-tauri -> target
5757

5858
- name: Install workspace dependencies
5959
run: pnpm install --no-frozen-lockfile --force
@@ -91,7 +91,7 @@ jobs:
9191
shell: pwsh
9292
run: |
9393
$ErrorActionPreference = "Stop"
94-
pnpm --filter @workspace/markpad exec node --input-type=module -e "import { loadConfigFromFile } from 'vite'; const loaded = await loadConfigFromFile({ command: 'build', mode: 'production' }, 'vite.config.ts'); if (!loaded) { throw new Error('Vite config did not load'); } console.log('vite config load OK');"
94+
pnpm --filter @workspace/marktex exec node --input-type=module -e "import { loadConfigFromFile } from 'vite'; const loaded = await loadConfigFromFile({ command: 'build', mode: 'production' }, 'vite.config.ts'); if (!loaded) { throw new Error('Vite config did not load'); } console.log('vite config load OK');"
9595
9696
- name: Typecheck workspace
9797
run: pnpm run typecheck
@@ -100,17 +100,17 @@ jobs:
100100
run: pnpm --filter @workspace/api-server run build
101101

102102
- name: Build desktop frontend bundle
103-
run: pnpm --filter @workspace/markpad run build:desktop:web
103+
run: pnpm --filter @workspace/marktex run build:desktop:web
104104

105105
- name: Stage desktop backend resources
106-
run: pnpm --filter @workspace/markpad run prepare:desktop:resources
106+
run: pnpm --filter @workspace/marktex run prepare:desktop:resources
107107

108108
- name: Download and stage runtime binaries
109109
shell: pwsh
110110
run: |
111111
$ErrorActionPreference = "Stop"
112112
113-
$resourceRoot = "artifacts/artifacts/markpad/src-tauri/resources"
113+
$resourceRoot = "artifacts/artifacts/marktex/src-tauri/resources"
114114
New-Item -ItemType Directory -Force -Path "$resourceRoot/runtime" | Out-Null
115115
New-Item -ItemType Directory -Force -Path "$resourceRoot/bin" | Out-Null
116116
@@ -168,12 +168,12 @@ jobs:
168168
run: |
169169
$ErrorActionPreference = "Stop"
170170
171-
$resourceRoot = "artifacts/artifacts/markpad/src-tauri/resources"
171+
$resourceRoot = "artifacts/artifacts/marktex/src-tauri/resources"
172172
$nodeExe = Join-Path $resourceRoot "runtime/node/node.exe"
173173
$pandocExe = Join-Path $resourceRoot "bin/pandoc.exe"
174174
$typstExe = Join-Path $resourceRoot "bin/typst.exe"
175-
$backendEntry = "artifacts/artifacts/markpad/src-tauri/resources/backend/dist/index.mjs"
176-
$dataDir = Join-Path $env:RUNNER_TEMP "markpad-data"
175+
$backendEntry = "artifacts/artifacts/marktex/src-tauri/resources/backend/dist/index.mjs"
176+
$dataDir = Join-Path $env:RUNNER_TEMP "marktex-data"
177177
New-Item -ItemType Directory -Force -Path $dataDir | Out-Null
178178
179179
if (-not (Test-Path $pandocExe)) {
@@ -192,9 +192,9 @@ jobs:
192192
$envMap = @{
193193
PORT = "18080"
194194
NODE_ENV = "production"
195-
MARKPAD_DATA_DIR = $dataDir
196-
MARKPAD_PANDOC_BIN = $pandocExe
197-
MARKPAD_TYPST_BIN = $typstExe
195+
MARKTEX_DATA_DIR = $dataDir
196+
MARKTEX_PANDOC_BIN = $pandocExe
197+
MARKTEX_TYPST_BIN = $typstExe
198198
PATH = "$resourceRoot/bin;$resourceRoot/runtime/node;$env:PATH"
199199
}
200200
@@ -272,7 +272,7 @@ jobs:
272272
shell: pwsh
273273
run: |
274274
$ErrorActionPreference = "Stop"
275-
$resourceRoot = "artifacts/artifacts/markpad/src-tauri/resources"
275+
$resourceRoot = "artifacts/artifacts/marktex/src-tauri/resources"
276276
$requiredDirs = @("backend", "runtime", "bin")
277277
278278
foreach ($dir in $requiredDirs) {
@@ -290,15 +290,15 @@ jobs:
290290
Write-Host "Tauri resource validation passed"
291291
292292
- name: Build NSIS installer (.exe)
293-
run: pnpm --filter @workspace/markpad exec tauri build --config src-tauri/tauri.conf.json --bundles nsis --target ${{ matrix.rust_target }}
293+
run: pnpm --filter @workspace/marktex exec tauri build --config src-tauri/tauri.conf.json --bundles nsis --target ${{ matrix.rust_target }}
294294

295295
- name: Upload installer artifacts
296296
uses: actions/upload-artifact@v7
297297
with:
298-
name: markpad-windows-installer-${{ matrix.arch }}-${{ github.sha }}
298+
name: marktex-windows-installer-${{ matrix.arch }}-${{ github.sha }}
299299
path: |
300-
artifacts/artifacts/markpad/src-tauri/target/${{ matrix.rust_target }}/release/bundle/nsis/*.exe
301-
artifacts/artifacts/markpad/src-tauri/target/${{ matrix.rust_target }}/release/bundle/nsis/*.zip
300+
artifacts/artifacts/marktex/src-tauri/target/${{ matrix.rust_target }}/release/bundle/nsis/*.exe
301+
artifacts/artifacts/marktex/src-tauri/target/${{ matrix.rust_target }}/release/bundle/nsis/*.zip
302302
if-no-files-found: error
303303

304304
- name: Publish GitHub Release (tags only)
@@ -308,5 +308,5 @@ jobs:
308308
tag_name: ${{ github.ref_name }}
309309
generate_release_notes: true
310310
files: |
311-
artifacts/artifacts/markpad/src-tauri/target/${{ matrix.rust_target }}/release/bundle/nsis/*.exe
311+
artifacts/artifacts/marktex/src-tauri/target/${{ matrix.rust_target }}/release/bundle/nsis/*.exe
312312
fail_on_unmatched_files: true

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Thumbs.db
4747
.cache/
4848
.local/
4949

50-
# MarkPad desktop generated resources
51-
artifacts/artifacts/markpad/src-tauri/resources/backend/
52-
artifacts/artifacts/markpad/src-tauri/resources/runtime/
53-
artifacts/artifacts/markpad/src-tauri/resources/bin/
54-
artifacts/artifacts/api-server/.markpad/
55-
artifacts/artifacts/markpad/src-tauri/nsis/installer.nsi
50+
# MarkTex desktop generated resources
51+
artifacts/artifacts/marktex/src-tauri/resources/backend/
52+
artifacts/artifacts/marktex/src-tauri/resources/runtime/
53+
artifacts/artifacts/marktex/src-tauri/resources/bin/
54+
artifacts/artifacts/api-server/.marktex/
55+
artifacts/artifacts/marktex/src-tauri/nsis/installer.nsi

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions

README.md

Lines changed: 22 additions & 22 deletions

artifacts/artifacts/api-server/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const server = app.listen(port, (err) => {
3535

3636
setupWebSocket(server);
3737

38-
const disableRendererWarmup = process.env.MARKPAD_DISABLE_RENDERER_WARMUP === "1";
39-
const warmupDelayMs = parseWarmupDelayMs(process.env.MARKPAD_RENDERER_WARMUP_DELAY_MS);
38+
const disableRendererWarmup = process.env.MARKTEX_DISABLE_RENDERER_WARMUP === "1";
39+
const warmupDelayMs = parseWarmupDelayMs(process.env.MARKTEX_RENDERER_WARMUP_DELAY_MS);
4040

4141
if (!disableRendererWarmup) {
4242
if (warmupDelayMs > 0) {
@@ -48,5 +48,5 @@ if (!disableRendererWarmup) {
4848
void prewarmPdfRenderer();
4949
}
5050
} else {
51-
logger.info("PDF renderer warmup disabled by MARKPAD_DISABLE_RENDERER_WARMUP");
51+
logger.info("PDF renderer warmup disabled by MARKTEX_DISABLE_RENDERER_WARMUP");
5252
}

artifacts/artifacts/api-server/src/lib/renderer.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { db } from "@workspace/db";
88
import { filesTable } from "@workspace/db";
99
import { logger } from "./logger";
1010

11-
const tmpDir = join(tmpdir(), "markpad-render");
11+
const tmpDir = join(tmpdir(), "marktex-render");
1212

1313
export interface RenderOptions {
1414
pageSize?: "a4" | "letter" | "legal" | "a5";
@@ -35,7 +35,7 @@ let latexEngineUnavailable = false;
3535
let typstLinkStyleIncludeFilePath: string | null = null;
3636

3737
function isLatexEngineDisabledByConfig(): boolean {
38-
const value = process.env.MARKPAD_PDF_DISABLE_LATEX?.trim().toLowerCase();
38+
const value = process.env.MARKTEX_PDF_DISABLE_LATEX?.trim().toLowerCase();
3939
return value === "1" || value === "true" || value === "yes" || value === "on";
4040
}
4141

@@ -293,8 +293,8 @@ ${latexFontBlock(options.documentFont)}
293293
\setlength{\tabcolsep}{7pt}
294294
\renewcommand{\arraystretch}{1.2}
295295
\urlstyle{same}
296-
\let\markpadhref\href
297-
\renewcommand{\href}[2]{\markpadhref{#1}{\textcolor{blue}{\underline{#2}}}}
296+
\let\marktexhref\href
297+
\renewcommand{\href}[2]{\marktexhref{#1}{\textcolor{blue}{\underline{#2}}}}
298298
\sloppy
299299
\setstretch{${options.lineStretch}}
300300
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
@@ -552,7 +552,7 @@ export function normalizeMarkdownForPdf(markdown: string): string {
552552
}
553553

554554
function resolvePandocBinary(): string {
555-
const configured = process.env.MARKPAD_PANDOC_BIN?.trim();
555+
const configured = process.env.MARKTEX_PANDOC_BIN?.trim();
556556
if (configured && configured.length > 0) {
557557
return isAbsolute(configured) ? configured : resolve(configured);
558558
}
@@ -565,7 +565,7 @@ function resolvePdfEngineBinary(engine: "typst" | "latex"): string {
565565
return "pdflatex";
566566
}
567567

568-
const configured = process.env.MARKPAD_TYPST_BIN?.trim();
568+
const configured = process.env.MARKTEX_TYPST_BIN?.trim();
569569
if (configured && configured.length > 0) {
570570
return isAbsolute(configured) ? configured : resolve(configured);
571571
}
@@ -760,7 +760,7 @@ export async function renderMarkdownToPdf(
760760
export function prewarmPdfRenderer() {
761761
if (warmupPromise) return warmupPromise;
762762

763-
warmupPromise = renderMarkdownToPdf("# MarkPad\n\nPreview warmup.", DEFAULT_RENDER_OPTIONS)
763+
warmupPromise = renderMarkdownToPdf("# MarkTex\n\nPreview warmup.", DEFAULT_RENDER_OPTIONS)
764764
.then(() => {
765765
logger.info("PDF renderer warmup completed");
766766
})

artifacts/artifacts/api-server/src/lib/websocket.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ function parseIntegerSetting(
3333

3434
export function resolveWebSocketPreviewConfig(env: NodeJS.ProcessEnv = process.env): WebSocketPreviewConfig {
3535
return {
36-
debounceMs: parseIntegerSetting(env.MARKPAD_PREVIEW_WS_DEBOUNCE_MS, DEFAULT_WS_PREVIEW_DEBOUNCE_MS, 0, 500),
37-
cancelInFlight: env.MARKPAD_PREVIEW_CANCEL_INFLIGHT !== "0",
38-
metricsEnabled: env.MARKPAD_PREVIEW_METRICS === "1",
36+
debounceMs: parseIntegerSetting(env.MARKTEX_PREVIEW_WS_DEBOUNCE_MS, DEFAULT_WS_PREVIEW_DEBOUNCE_MS, 0, 500),
37+
cancelInFlight: env.MARKTEX_PREVIEW_CANCEL_INFLIGHT !== "0",
38+
metricsEnabled: env.MARKTEX_PREVIEW_METRICS === "1",
3939
};
4040
}
4141

artifacts/artifacts/api-server/src/routes/export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ router.post("/projects/:projectId/export/latex", async (req, res) => {
182182
const options = parseRenderOptions((req.body as { options?: unknown })?.options);
183183
const latex = await renderMarkdownToLatex(content, options);
184184
res.setHeader("Content-Type", "application/x-latex");
185-
res.setHeader("Content-Disposition", "attachment; filename=markpad.tex");
185+
res.setHeader("Content-Disposition", "attachment; filename=marktex.tex");
186186
res.send(latex);
187187
} catch (err) {
188188
handleRouteError(req, res, err, {
-245 KB
Binary file not shown.

artifacts/artifacts/markpad/src-tauri/resources/backend/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)