Commit Graph
1676 Commits
Author SHA1 Message Date
Doocs Bot 516efead5c chore: release CLI (#2003) @doocs/md-cli@2.1.4 2026-10-30 15:54:35 +08:00
ziven 9915a8e89b build(release): automate CLI releases with Changesets (#2001) 2026-10-30 14:04:39 +08:00
Doocs Bot 07f4830918 chore: auto update starcharts 2026-10-29 08:18:33 +08:00
Libin YANG 0bbfe56b67 chore(deps): upgrade project dependencies (#1996)
Bump compatible releases, including wrangler 4.151.2, CodeMirror view 6.43.15, and typescript-eslint 8.72.0. Retarget the CodeMirror view patch and raise undici to 8.12.3 now that the HTTP/2 content-encoding regression is fixed.
2026-10-21 22:37:41 +08:00
Michael YangandClaude Opus 5.5 67bba7d68b fix(mermaid): share pending render for concurrent re-renders (#1997)
A preview re-render while a diagram is still rendering (e.g. when MathJax
fires md:mathjax-ready) started a second mermaid.render with the same
element id. The two runs measured each other's temporary elements and the
cached SVG lost its viewBox, class and max-width, so the diagram rendered
blank. Share the in-flight render per cache key instead.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 22:35:45 +08:00
Libin YANG f8d9126823 chore(deps): upgrade project dependencies (#1995)
Bump compatible releases, including pnpm 12.14.0 and wrangler 4.151.1, and retarget the Mermaid flowchart label patch to 12.2.0.
2026-10-17 10:12:56 +08:00
Libin YANG 1bdad48d20 fix(mermaid): stop flowchart labels from clipping (#1991)
Raise flowchart wrappingWidth to 300 so a typical bilingual line fits, and patch Mermaid so wider html labels wrap on fractional device pixel ratios instead of being clipped.

Closes #1989
2026-10-12 11:27:37 +08:00
Libin YANG d9132ab5a1 chore(deps): upgrade project dependencies (#1985) 2026-10-09 09:50:23 +08:00
dependabot[bot] a7c17fc4cd build(deps): bump the minor-and-patch group across 1 directory with 2 updates (#1980)
Bumps the minor-and-patch group with 2 updates in the / directory: [@cloudflare/vite-plugin](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/vite-plugin-cloudflare) and [wrangler](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler).


Updates `@cloudflare/vite-plugin` from 1.55.0 to 1.60.2
- [Release notes](https://github.com/cloudflare/workers-sdk/releases)
- [Changelog](https://github.com/cloudflare/workers-sdk/blob/main/packages/vite-plugin-cloudflare/CHANGELOG.md)
- [Commits](https://github.com/cloudflare/workers-sdk/commits/@cloudflare/vite-plugin@1.60.2/packages/vite-plugin-cloudflare)

Updates `wrangler` from 4.134.0 to 4.141.0
- [Release notes](https://github.com/cloudflare/workers-sdk/releases)
- [Commits](https://github.com/cloudflare/workers-sdk/commits/wrangler@4.141.0/packages/wrangler)

---
updated-dependencies:
- dependency-name: "@cloudflare/vite-plugin"
  dependency-version: 1.60.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: wrangler
  dependency-version: 4.141.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-29 17:50:56 +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
dependabot[bot] d3836ac421 build(deps): bump dawidd6/action-download-artifact from 24 to 25 (#1977)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 24 to 25.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v24...v25)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '25'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-29 08:46:26 +08:00
Doocs Bot 932a6c4242 chore: auto update starcharts 2026-09-27 08:29:21 +08:00
dependabot[bot] f3580392a5 build(deps): bump pnpm/setup from 2 to 3 (#1975)
Bumps [pnpm/setup](https://github.com/pnpm/setup) from 2 to 3.
- [Release notes](https://github.com/pnpm/setup/releases)
- [Commits](https://github.com/pnpm/setup/compare/v2...v3)

---
updated-dependencies:
- dependency-name: pnpm/setup
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-24 11:57:42 +08:00
Libin YANG 5256940474 chore(deps): bump @cloudflare/workers-types (#1973) 2026-09-24 11:55:33 +08:00
Libin YANG 2cd2b354e6 chore(deps): bump pnpm, wrangler, CodeMirror, and related packages (#1972) 2026-09-22 19:54:26 +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 cbcd3756e5 chore(deps): bump wrangler, vue, AWS SDK, and related packages (#1966)
Bump catalog wrangler and workers-types, plus web/vue toolchain
patch/minor updates. Intentionally leave prettier 2.8.8, typescript 6,
mermaid 11, vueuse 14, and pnpm 11 unchanged.
2026-09-18 11:42:30 +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 a988db7bd2 chore(deps): bump pnpm, wrangler, lucide, and related packages (#1961)
Leave prettier, TypeScript, and mermaid on pinned majors.
2026-09-14 20:11:40 +08:00
Libin YANG f0d8c6170e chore(deps): bump vite, wrangler, AWS SDK, and related packages (#1960)
Raise the confbox override to 0.3.1 so pkg-types can import confbox/json. Leave prettier, TypeScript, and mermaid on pinned majors.
2026-09-12 16:39:30 +08:00
Libin YANG 617ef14ee5 docs: correct leftover contributor and agent skill guidance (#1958)
Fix locale/API descriptions, drop Stylelint, clarify Related Issue, and stop telling agents to run interactive git commands.
2026-09-10 19:53:56 +08:00
Libin YANG 078abcb020 docs: sync AGENTS.md and drop unused Related Issue from PR template (#1957)
Keep the i18n module list and API description current, and only add a Related Issue section when a PR actually closes an issue.
2026-09-10 19:44:24 +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
Libin YANG 2404ebcaa8 chore(skills): track Claude Code skills via git symlinks (#1955)
Replace the post-clone junction linker with per-skill git
symlinks so clones no longer need a setup script.
2026-09-10 19:22:37 +08:00
RandLibin YANG 0f95bb6395 fix(editor): gate SidebarAIToolbar by showAIToolbox preference (#1954)
Co-authored-by: Libin YANG <contact@yanglibin.info>
2026-09-10 19:08:32 +08:00
Libin YANG 8fbb65c4de chore(ci): unify GitHub Actions names and pin floating refs (#1953)
Align workflow filenames and verb-phrase titles, use one concurrency group template, require frozen lockfiles, and pin Gitee/starcharts actions to release SHAs.
2026-09-10 12:02:11 +08:00
Libin YANG 75f09a0b44 perf(emoji): speed up search, panel, upload, and renderer scans (#1952)
Add pinyin/alias search, window the emoji grid, parallelize uploads, and bound emoji start() scans so long documents skip URL/time colons.
2026-09-10 11:05:58 +08:00
Libin YANG e14b55645c chore(deps): bump wrangler, vitest, isomorphic-dompurify, and related packages (#1951) 2026-09-10 10:22:35 +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
Doocs Bot ff932394d9 chore: auto update starcharts 2026-09-04 08:24:06 +08:00
Libin YANG 62cd665b16 chore(deps): bump pnpm, CodeMirror, AWS SDK, and related packages (#1943)
Refresh catalog, security overrides, and CI pnpm pins. Rebase the @codemirror/view patch onto 6.43.10.
2026-09-01 11:42:55 +08:00
Libin YANG 6e7632d380 perf(core): bound extension start() scans and memoize render output (#1942)
marked calls every registered extension's `start()` at each block boundary
and passes the whole remaining source, so a `/^.../m` scan per extension
turned long articles into quadratic work. Restrict block-level scans to the
current paragraph and replace the regexes with non-allocating indexOf-based
helpers in a shared `utils/scan` module.

Also memoize code highlighting and formula typesetting, which the preview
otherwise redoes for every untouched block on each keystroke batch. Pending
KaTeX placeholders stay uncached so they still resolve once MathJax loads.

Parse time for a 186k-character article drops from 928ms to 584ms, and the
gain grows with document size (1.34x at 6k chars, 1.68x at 93k). Rendered
HTML is byte-identical to the previous implementation across the bundled
example documents.
2026-08-30 20:01:06 +08:00
Libin YANG 7622b816db chore(deps): bump wrangler, zod, and related packages (#1941)
Refresh catalog entries (@cloudflare/workers-types, wrangler, zod), the
tinyexec override, and direct deps across web, vscode, and md-cli, then
refresh transitive deps via `pnpm update -r` and `pnpm dedupe`.

Keep typescript at ~6.0.3 because @typescript-eslint 8.68.0 declares a
`typescript >=4.8.4 <6.1.0` peer range, so TS 7 would break lint.

Also drop the stale front-matter patch entry from AGENTS.md; that patch
was removed when front-matter was replaced.
2026-08-29 15:42:26 +08:00
Libin YANG 9227e937cf feat(theme): make link color and blockquote background configurable (#1939)
The same link colour (#576b95) was copy-pasted into all three built-in themes, and the blockquote background was only reachable through a shell-injected token, so both had to be overridden with custom CSS.

Link colour becomes an always-emitted --md-link-color, defaulting to the blue every theme already used. The theme-colour preset is stored as a literal var(--md-primary-color) so links keep tracking the primary colour rather than freezing its value at pick time.

Blockquote background cannot use the same shape: only the default theme has a background, while grace and simple are deliberately background-free. Declaring the variable unconditionally would give them a grey box they never had, so it is only declared when the user picks a non-default value and each theme keeps its own value as the var() fallback.

That relies on processCSS resolving a var() whose fallback is another var(), and on it leaving the unresolvable shell token intact. Both behaviours are now covered by tests, along with nested color-mix resolution.
2026-08-29 08:51:42 +08:00
Libin YANG 5adb849ac7 feat(theme): make line height and block spacing configurable (#1938)
Line height sat hard-coded as 1.75 in base.css and every vertical block margin was a literal in the theme CSS, so tightening or loosening an article meant hand-writing custom CSS across a dozen selectors.

Line height becomes --md-line-height. Block spacing becomes --md-block-spacing, a unitless multiplier applied to the margins each theme already defines rather than one flat value: a single length would collapse the theme's rhythm, where an h2 deliberately sits further from the text than a paragraph. Themes keep their proportions while the whole scale moves together.

The calc() indirection is safe for the WeChat paste because processCSS already flattens var() and calc() before juice inlines the styles; its multiplication branch handles a length times a unitless operand. cssVariables.test.ts pins that behaviour, which had no coverage before.

Both fields are optional end to end, so settings persisted before this change keep rendering identically and existing generateCSSVariables callers (VSCode preview, theme export) needed no signature change.
2026-08-29 08:43:55 +08:00
Libin YANG d5a2c4be76 feat(export): add segmented long-image PNG export (#1940)
A single full-height capture hits the browser canvas size limit on long
articles. Split the export into several PNGs on block boundaries so
paragraphs, headings, and code blocks are never cut in half, and package
multiple segments into a ZIP.
2026-08-29 08:34:48 +08:00
Libin YANG 83bf5583f5 feat(core): support GitHub-style emoji shortcodes (#1937)
Adds an inline extension turning 🚀 into an emoji character, so documents written on GitHub, Obsidian or Typora keep rendering the same glyphs instead of leaking raw shortcodes into the article.

The shortcode table is bundled in-repo rather than pulled from a dependency. The established emoji packages either carry several transitive dependencies or have negligible download counts, neither of which suits a widely used editor. The table is curated (515 entries) instead of the full ~1900-entry Unicode set, which would otherwise land in the deferred renderer chunk for a feature most articles use a handful of times.

Only names present in the table are consumed, so incidental colon pairs like 'ratio 3:4:5' and unknown names stay literal rather than disappearing. Emoji are emitted as bare characters with no wrapper element, leaving nothing for WeChat's sanitizer to strip and no theme CSS to keep in sync.
2026-08-29 08:27:51 +08:00
Libin YANG 91256df56a feat(core): add superscript syntax and theme strikethrough (#1936)
Superscript had no syntax at all, so ^2^ leaked through as literal text. Adds a markup_superscript inline extension rendering semantic <sup>, which degrades correctly even where the theme CSS is missing.

Unlike the sibling markup delimiters, superscript is meant to sit directly after a word char (x^2^), so it opts out of the shared word-boundary filtering and instead requires whitespace-free content. That keeps prose like 'a ^ b' and dangling carets like '2^10' literal. Ruby's [text]^(annotation) form is unaffected: its tokenizer is registered later and therefore runs first.

Subscript is deliberately left out because it would need the same single ~ delimiter already taken by the wavy-line extension.

Also gives <del> a theme class so strikethrough colour is themeable instead of relying on the browser default.
2026-08-29 08:14:00 +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
4e68effb82 feat(ai): add model discovery for chat and images (#1932)
Co-authored-by: Libin YANG <contact@yanglibin.info>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 09:46:52 +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 1a8dc8c073 refactor: replace yup and front-matter, upgrade MCP to 2.x (#1927) 2026-08-23 11:08:23 +08:00
Libin YANG e3275dbec0 fix(web): keep editor font stack when copying to WeChat (#1926)
Stop rewriting PingFang SC and other multi-word fonts to generic
families during juice sanitization, which made serif copy fall back
to sans-serif in the official account editor.

Closes #1916
2026-08-22 09:17:19 +08:00
Libin YANG b433d65c0c chore(deps): bump wrangler, eslint, and related packages (#1925)
Keep AWS SDK client and presigner on the same 3.1115.0 patch so @smithy/types stay aligned.
2026-08-22 08:42:16 +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
YangFong 04e43eff9e refactor: replace eslint-disable comments with clean code (#1923)
Remove eslint-disable-next-line annotations by using cleaner patterns: merge static classes, use void operator for intentional unused expressions, and rewrite a conditional assignment loop without no-cond-assign suppression.
2026-08-21 14:54:50 +08:00
dependabot[bot] 55154b0510 build(deps): bump dawidd6/action-download-artifact from 21 to 23 (#1920)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 21 to 23.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v21...v23)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '23'
  dependency-type: direct:production
  update-type: version-update:semver-major
...
2026-08-20 20:41:07 +08:00
Libin YANG 00cf64fcf1 chore(deps): bump workers-types, vite, mermaid, and related packages (#1922)
Bump catalog workers-types, uuid, and vitest; web AWS SDK, lucide,
Cloudflare vite-plugin, and vite; core mermaid and infographic.
Kept prettier 2.8.8, typescript ~6.0.3, and @types/vscode.
2026-08-20 20:30:01 +08:00
YangFong d7e8b9ca80 refactor: remove deprecated baseUrl from tsconfigs (#1921)
baseUrl is deprecated in TypeScript 6.0 and scheduled for removal in 7.0. Since TS 4.1, path aliases resolve relative to the tsconfig directory, so the option is redundant and can be dropped without changing resolution behavior.
2026-08-20 20:03:40 +08:00