Commit Graph
63 Commits
Author SHA1 Message Date
Libin YANG fa341b438b chore(deps): upgrade project dependencies (#2037)
Bump direct dependencies, catalog pins, and security overrides to the latest
versions the toolchain accepts, and refresh the lockfile. Retarget the
@codemirror/view patch to 6.44.2 and the Mermaid patch to 12.4.0.

Keep Prettier at 2.8.8 and TypeScript at 6.0.3. @typescript-eslint still
requires typescript < 6.1.0. Follow Vite 8.4's dev.sourcemap.css option.
2026-11-28 22:17:53 +08:00
Libin YANG ef12f358a8 chore(deps): upgrade project dependencies (#2033)
Bump direct dependencies, catalog pins, and security overrides to the latest
versions the toolchain accepts, and refresh the lockfile. Retarget the
@codemirror/view patch to 6.44.0 (MeasureRequest export and macOS Alt+Shift).

Keep Prettier at 2.8.8 and TypeScript at 6.0.3 (@typescript-eslint still requires
typescript < 6.1.0). Leave the Mermaid patch unchanged.
2026-11-25 22:09:00 +08:00
Cursor Agent 38107095bb chore(deps): upgrade project dependencies
Bump direct dependencies, catalog pins, and security overrides to the latest
versions the toolchain accepts, and refresh the lockfile. Move pnpm to 12.23.0
and wrangler to 4.167.0 now that workerd postinstall matches the published binary.

Keep Prettier at 2.8.8 and TypeScript at 6.0.3 (@typescript-eslint still requires
typescript < 6.1.0). Leave CodeMirror and Mermaid patches unchanged.
2026-11-24 21:33:02 +08:00
Libin YANG 2e668391a4 chore(deps): upgrade project dependencies (#2027)
Bump direct dependencies, catalog pins, and security overrides to the latest versions the toolchain accepts, and refresh the lockfile. Move pnpm to 12.21.0.

Keep Prettier at 2.8.8 and TypeScript at 6.0.3. Pin wrangler at 4.163.0 because 4.164.0 ships a workerd binary whose postinstall rejects itself.
2026-11-18 08:36:41 +08:00
Libin YANG 08a382086a chore(deps): upgrade project dependencies (#2017)
Bump direct dependencies to the latest versions the toolchain accepts, including entities 9 and jsdom 31. Keep Prettier at 2.8.8 and TypeScript at 6.0.3.
2026-11-12 19:54:33 +08:00
Libin YANG 31896a825f chore(deps): upgrade project dependencies (#2014) 2026-11-11 08:32:37 +08:00
Libin YANG d9132ab5a1 chore(deps): upgrade project dependencies (#1985) 2026-10-09 09:50:23 +08:00
Libin YANG 9bae922611 chore(deps): bump dependencies to latest compatible versions (#1978)
Upgrade pnpm to 12.6.0 and refresh direct packages, including VueUse 15,
Mermaid 12, and juice 12.2.0. Keep Prettier 2.8.8, TypeScript 6.0.3, and
the wrangler 4.134.0 preview-deploy pin.
2026-09-29 17:37:06 +08:00
Libin YANG b732988fbf fix: persist drafts across GitHub login and accept pasted images (#1971)
Clipboard screenshots without a filename were rejected as invalid images.
Cancelling GitHub login from md-cli left a JSON error page, and drafts
could be lost because IndexedDB writes may not finish on unload.

Closes #1969
Closes #1970
2026-09-22 19:22:47 +08:00
Libin YANG 8770fde1d2 chore(deps): bump wrangler, CodeMirror, vsce, and related packages (#1964) 2026-09-16 19:27:09 +08:00
Libin YANG 0fdec07364 docs: align contributing guides and agent PR workflow (#1956)
Add a GitHub PR template, sync CONTRIBUTING/Copilot/AGENTS, make
commit and PR skills shell-neutral, and add share/marketplace
route tests.
2026-09-10 19:35:56 +08:00
RandLibin YANG 9ec3f68e6d feat(emoji): add cloud sticker packs and an <Emoji> inline component (#1949)
Co-authored-by: Libin YANG <contact@yanglibin.info>
2026-09-10 10:05:36 +08:00
Libin YANG a9d3da04cc chore(deps): bump wrangler, CodeMirror, AWS SDK, and related packages (#1945) 2026-09-05 08:57:08 +08:00
Libin YANG 1c2c2f4139 chore(deps): bump pnpm, wrangler, vue, and related packages (#1934)
Keep Prettier at 2.8.8 and TypeScript at 6.0.3 because vue-tsc still requires the TS 6 compiler API.
2026-08-28 10:19:17 +08:00
Libin YANG 48c6964bc6 chore(deps): bump js-yaml, AWS SDK, and related packages (#1933)
Upgrade catalog workers-types, marked, and isomorphic-dompurify. Treat empty YAML front matter as an empty mapping for js-yaml 5. Keep prettier 2.8.8 and typescript ~6.0.3.
2026-08-25 20:00:43 +08:00
Libin YANG 03b4b78f0a perf: defer core renderer load and cap cloud sync payloads (#1924)
Lazy-load @md/core on the web app to shrink the initial bundle. Reject oversized sync pushes with plan quotas, client-side batches, and D1-safe row limits.
2026-08-21 16:48:50 +08:00
Libin YANG fd136f79f8 chore(deps): bump wrangler, marked, and related packages (#1919) 2026-08-18 21:52:26 +08:00
Libin YANG 236f2f12a9 chore(deps): bump packages and migrate CI to pnpm/setup (#1911) 2026-08-15 08:52:58 +08:00
Libin YANG 4699016755 chore(deps): upgrade dependencies (#1900)
Bump outdated deps within existing semver ranges and catalog:
@aws-sdk/client-s3 and s3-request-presigner 3.1106.0,
@cloudflare/vite-plugin 1.51.1, @cloudflare/workers-types 5.20260808.1,
@lucide/vue 1.30.0, @types/node 26.2.0, @antfu/eslint-config 9.3.0,
eslint 10.8.1, hono 4.13.1, isomorphic-dompurify 3.22.0, tsx 4.23.11,
vite 8.2.1, wrangler 4.120.0.

Kept: prettier 2.8.8 (pinned), typescript ~6.0.3 (TS 7 major deferred),
@types/vscode 1.120.0 (must not exceed engines.vscode), crypto-js
(deprecated, no successor). Patched deps unchanged; patch files still apply.
2026-08-09 20:08:57 +08:00
Libin YANGandCursor 6ca214b7c3 fix(web): editor search & persistence fixes, keyboard a11y, cleanups (#1896)
* fix(web): fix post search misses and history restore timestamp

- extract search logic to lib/search-posts with a 250ms debounce; count matches via String.match (avoids stale-lastIndex misses of a reused global RegExp across posts) in a single scan for results and totals together
- render search results and history version entries as real buttons; make the history list width responsive on narrow screens
- bump post.updateDatetime on history restore so restored content is picked up by update-time sorting and cloud sync

Co-authored-by: Cursor <cursoragent@cursor.com>

* perf(web): replace deep post watches with signature watchers

- watch per-post signatures (id/title/content length/updateDatetime ms/parent/history length/collapsed) instead of deep-traversing every post on each editor commit; the old deep watch compared identical object identities and never persisted edits
- collect dirty post ids in a set and flush once per debounce window, so rapid edits across different posts are all saved (shared single-argument debounce used to drop earlier posts)
- inject heading anchor ids during render instead of assigning output twice, avoiding a second preview DOM rebuild

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor: dedupe escapeHtml/delay helpers and remove dead code

- share one escapeHtml in apps/api share pages and reuse @md/core's in the formula dialog
- centralize the delay() helper used by preview boot, PNG export and the editor header
- drop unused createTable/checkImage utilities and a stale debug comment

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(web): improve keyboard accessibility across editor UI

- make drag-drop upload areas, syntax help cards, JSON preview expanders and the footer line/col indicator keyboard-operable (real buttons or role/tabindex + Enter/Space)
- reveal hover-only controls (post item menu, table cell delete buttons) on keyboard focus via focus-visible
- add missing aria-labels to icon-only buttons, role=tablist to the CSS editor tabs, role=checkbox to multi-select, and move the collapse toggle out of the post row button to avoid nested interactives

Co-authored-by: Cursor <cursoragent@cursor.com>

* test(core): add render tests for footnote, toc, ruby, markup, slider and alert extensions

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: unify web type-check with build and include @md/shared in tests

- run the package's own vue-tsc --build --force for type-check:web so CI catches the same errors as pnpm web build
- add @md/shared tests to the root test script

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ci): commit generated auto-import/components dts for type-check job

vue-tsc --build --force builds the referenced tsconfig.app.json, which includes auto-imports.d.ts and components.d.ts. Both were gitignored, so the CI type-check job (no prior vite build to regenerate them) failed with TS2304 for every auto-imported global (ref, useDark, useToggle, ...).

The previous vue-tsc --noEmit ran on the solution-style root tsconfig (files: [] + references) and checked zero files, which is why CI was green while real errors slipped through.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(web): guard zero-width search matches and clean up a11y semantics

- ignore zero-width regex matches when counting, highlighting and snippeting so empty-matching patterns (a*, ^, \b) neither match every post nor inflate counts to O(content length); replace skips zero-width positions and inserts the replacement literally
- give the multi-select checkbox an accessible name (new common.selectPost message)
- move the CSS tab more-actions button out of the role=tab element so each tab is a single focus stop

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 14:25:03 +08:00
Libin YANG 0e5ac74a38 build(deps): bump dependencies to latest compatible versions (#1893)
- catalog: @codemirror/view 6.43.8, workers-types 5.20260804.1,
  marked 18.0.9, tsx 4.23.7, wrangler 4.119.0
- shared: @codemirror/lang-html 6.4.12, lang-markdown 6.5.2
- core: mermaid 11.16.1
- web: vue 3.5.41, juice 12.1.2, aws-sdk s3 3.1103.0,
  @cloudflare/vite-plugin 1.51.0, unplugin-auto-import 21.1.0
- api: hono 4.13.0
- migrate pnpm patches for @codemirror/view and juice to the new
  versions (MeasureRequest export, macOS Alt+Shift, parseCSS guard)

Skipped on purpose: prettier 3.x (pinned to 2.8.8), typescript 7.x
(major), @types/vscode (kept aligned with engines.vscode 1.120).
2026-08-06 08:17:27 +08:00
Libin YANG 5664b7f1a2 build(deps): bump dependencies to latest compatible versions (#1885)
- npm: aws-sdk 3.1101.0, @cloudflare/vite-plugin 1.50.0, vite 8.2.0,
  wrangler 4.118.0, hono 4.12.33, wxt 0.21.3, vue-tsc 3.3.9,
  lint-staged 17.3.0, isomorphic-dompurify 3.21.0 (incl. vscode
  runtime pin), plus all in-range direct/transitive updates
- ci: pin pnpm 11.18.0 in workflows (pnpm/action-setup#276 fixed);
  all actions verified on their latest majors
- docker: nginx 1.30.4-alpine, golang 1.26.5-alpine, alpine 3.24
- hold prettier 2.8.8 (pinned) and typescript 6.x (ts-loader/vue-tsc
  not yet compatible with the TS 7 native port)
2026-08-02 07:14:27 +08:00
Libin YANG 483649709f build(deps): upgrade minor and patch dependencies (#1855) 2026-07-24 21:15:26 +08:00
Libin YANG cc97c4e652 build(deps): upgrade minor and patch dependencies (#1848) 2026-07-20 15:44:02 +08:00
Libin YANG d6a63fcffa fix(i18n): store history datetime as epoch ms and format on display (#1841)
Persist post history timestamps in a locale-independent form and render
them with the current UI locale so switching language no longer leaves
mixed date formats in the history list.

Closes #1838
2026-07-17 08:52:23 +08:00
Libin YANG 4d2b6a939d fix: use uuidv4 helper instead of crypto.randomUUID (#1836)
Avoid crashes when served over plain HTTP (e.g. Docker on a LAN IP),
where crypto.randomUUID is unavailable outside secure contexts.
2026-07-16 10:48:19 +08:00
Libin YANG d43f51da68 feat(marketplace): add community theme marketplace and in-app notifications (#1808)
Ship theme publish/review/install with sample markdown preview, admin moderation,
and system notifications (footer bell) for pending/approve/reject without email.
2026-07-13 21:21:55 +08:00
Libin YANG 5ce3418e96 build(deps): bump hono and refresh lockfile (#1805)
Update @md/api hono to 4.12.30 and refresh transitive patch bumps (postcss, @tanstack/vue-virtual).
2026-07-13 09:15:19 +08:00
Libin YANG 58f09a8897 build: centralize shared deps with pnpm catalog and dedupe (#1791)
Move cross-package toolchain versions into a workspace catalog, declare
CodeMirror where it is imported, unify typescript-eslint via overrides,
and run pnpm dedupe to shrink the lockfile.
2026-07-11 13:38:58 +08:00
Libin YANG c254c00c2a build: bump workspace dependencies to latest patch releases (#1790)
Upgrade hono, AWS SDK, Cloudflare workers-types, eslint, and
@codemirror/lang-yaml; refresh the lockfile. Keep prettier 2.8.8
and TypeScript 6 pinned.
2026-07-11 11:24:03 +08:00
Libin YANG 22ca9fea7f chore: unify code comments to English (#1789)
Translate valuable Chinese comments and remove noise that only restates the next line. Document the English-comment convention in AGENTS.md and CONTRIBUTING.md. Leave i18n and user-facing strings unchanged.
2026-07-11 11:01:28 +08:00
Libin YANG 800e109b32 perf(web): skip unchanged renders and split oversized editor UI (#1786)
Add debounce+max-wait preview scheduling and fingerprint skip in renderStore.
Extract scroll-sync/post-tree helpers with tests; cover API origin/sanitize.
Extend type-check to vscode/mcp; split Footer and CustomComponent form panels.
2026-07-11 09:37:29 +08:00
Libin YANG fed5ea69dc build(deps): upgrade workspace dependencies and refresh lockfile (#1774)
Bump @cloudflare/workers-types and tighten security overrides for bn.js, js-yaml, markdown-it, qs, semver, shell-quote, and tmp. Keep prettier@2.8.8 and TypeScript ~6.x for Vue/vue-tsc compatibility.
2026-07-10 11:57:14 +08:00
Libin YANG d5b017be3c build(deps): upgrade workspace dependencies and refresh lockfile (#1769)
Bump marked, vite, AWS SDK, Lucide, Cloudflare Vite plugin, and wrangler. Keep prettier@2.8.8 and TypeScript ~6.x for Vue/vue-tsc compatibility.
2026-07-10 08:22:35 +08:00
Libin YANG 4a39d069ee build(deps): bump @types/node and vue-tsc (#1761) 2026-07-08 19:55:46 +08:00
Libin YANG d4ee5194b4 build(deps): upgrade workspace dependencies and drop mathjax package (#1759)
Bump hono, wrangler, vitest, AWS SDK, Cloudflare workers-types, and refresh the lockfile. Remove mathjax from @md/web; uTools builds now download MathJax es5 assets from CDN at bundle time.
2026-07-08 12:45:35 +08:00
Libin YANG a83dfb837b build(deps): bump workspace dependencies and refresh lockfile (#1750)
* Upgrade @codemirror/view, Cloudflare tooling, AWS SDK, Vite, Wrangler,
webpack, and related packages. Regenerate the CodeMirror patch for 6.43.5.
Keep prettier pinned at 2.8.8 and mathjax at 3.x.
* Downgrade @cloudflare/workers-types from v5 to 4.20260702.1 to satisfy
wrangler@4.107.0 peer requirement (^4.20260701.1) and clear pnpm peer warnings.
2026-07-05 18:47:46 +08:00
Libin YANG f50b5e57b8 build(deps): bump @cloudflare/workers-types and refresh lockfile (#1740) 2026-06-29 13:00:17 +08:00
Libin YANG 79f8ce27f0 build(deps): upgrade project dependencies (#1738)
Bump direct dependencies including @codemirror/view, eslint, es-toolkit, reka-ui, @lucide/vue, @cloudflare/workers-types, vite-plugin-vue-devtools, webpack, and webpack-cli.

Migrate @codemirror/view patch from 6.43.3 to 6.43.4 and refresh transitive dependencies in the lockfile.
2026-06-29 08:29:02 +08:00
Libin YANG 8328fe8c4c feat(web): support account login and cloud sync in browser extension (#1732)
Use identity.launchWebAuthFlow for in-extension GitHub OAuth, allow
extension origins in md-api CORS, and inject API host_permissions at build.
2026-06-26 20:26:29 +08:00
Libin YANG 02f39e9bb6 build(deps): upgrade project dependencies (#1729)
Bump vue, wrangler, mermaid, webpack, codemirror and related
transitive deps. Sync @codemirror/view patch to 6.43.3.
2026-06-26 08:12:48 +08:00
Libin YANG a545cb5976 build(deps): upgrade project dependencies (#1727)
Bump @types/node to 26.0.1 and @cloudflare/workers-types to 4.20260625.1.
Keep prettier pinned at 2.8.8 per project policy.
2026-06-25 10:38:24 +08:00
Libin YANG 9762249dde build(deps): upgrade eslint-config and workers-types (#1725) 2026-06-24 19:33:44 +08:00
Libin YANG 1ee3c52c6a build(deps): upgrade vite 8.1 and migrate to rolldownOptions (#1720)
- Bump vite, wrangler, wxt, @cloudflare/vite-plugin, and CodeMirror packages
- Migrate build.rollupOptions to build.rolldownOptions (Vite 8)
- Retarget @codemirror/view patch to 6.43.2
2026-06-24 08:45:14 +08:00
Libin YANG 5f05f6c14e build(deps): upgrade hono, aws-sdk and workers-types (#1717)
Bump hono, @aws-sdk/client-s3, @aws-sdk/s3-request-presigner, and
@cloudflare/workers-types to latest patch versions. Prettier remains
pinned at 2.8.8 per project policy.
2026-06-23 17:12:17 +08:00
Libin YANG 64baa8c768 feat(share): show sharer name in share page footer (#1716) 2026-06-23 16:22:53 +08:00
Libin YANG 9eb5eb5378 feat(share): let Pro users set share link expiration (#1715) 2026-06-23 15:37:06 +08:00
Libin YANG 326cc02c74 build(deps): upgrade uuid, es-toolkit and cloudflare types (#1708) 2026-06-22 08:58:06 +08:00
Libin YANG fc8350d3b5 build(deps): upgrade project dependencies (#1704) 2026-06-20 17:55:26 +08:00
Libin YANG 5852da6159 build(deps): upgrade dependencies except prettier (#1701)
Bump @aws-sdk, @cloudflare/*, @lucide/vue, isomorphic-dompurify,
wrangler, and @types/node to latest versions.
2026-06-19 21:33:34 +08:00