Commit Graph
3343 Commits
Author SHA1 Message Date
Alois Klink 46a7a533ab fix: copy mermaid config sanitization check
Copy the XSS prevention check from the `sanitize` function in mermaid
upstream's `config.ts` file.

See: https://github.com/mermaid-js/mermaid/blob/9745f325cb9e1967640f0e85da193a2f820634f1/packages/mermaid/src/config.ts#L178-L183
2026-04-02 19:00:54 +09:00
Alois Klink 67aacdebe4 fix: sanitize config for __ keys
According to upstream, this is supposed to be fore prototype pollution
prevention.

See: https://github.com/mermaid-js/mermaid/blob/9745f325cb9e1967640f0e85da193a2f820634f1/packages/mermaid/src/config.ts#L169-L174
2026-04-02 19:00:54 +09:00
Alois Klink 7e9cdfca73 fix: sanitize all secure keys in config
Check and remove all the secure keys in the site Mermaid Config,
not just `securityLevel`. Unfortunately, the logic of Mermaid's
`sanitize` function in `config.ts` is a bit convoluted. For instance,
the `secure` config restricts keys deeply in the object.

See: https://github.com/mermaid-js/mermaid/blob/9745f325cb9e1967640f0e85da193a2f820634f1/packages/mermaid/src/config.ts#L155-L190
2026-04-02 19:00:54 +09:00
Alois Klink 48b9560e8e fix: sanitize config loaded from gist/config URL
Currently, the `config` in the codeState in the hash is sanitized for
unsafe values, however the `?config` URL parameter or configs loaded
from a GitHub Gist are not.

Reported-by: Chai Cheng Xun @QiaoNPC
2026-04-02 18:59:09 +09:00
Alois Klink ae7ad1b93e refactor: move config sanitization into function
Moves the code that prompts the user to remove unsafe MermaidConfig
settings into it's own function, so that it can be reused.
2026-03-30 17:06:32 +09:00
Sidharth Vinod c675dc02e9 fix: Avoid double popups 2026-03-25 17:03:04 +09:00
Sidharth Vinod ab760f35fa feat: Retain search query in URL to get insights into traffic flow 2026-03-18 22:05:07 +09:00
Sidharth VinodandGitHub 8a436791de Merge pull request #1908 from mermaid-js/renovate/mermaid-packages
fix(deps): update dependency mermaid to ^11.13.0
2026-03-16 07:41:08 -07:00
Sidharth VinodandGitHub d16a1776e6 Merge pull request #1909 from mermaid-js/sidv/correctPrivacyPolicy
feat: Configure Privacy Policy
2026-03-16 07:40:41 -07:00
Sidharth Vinod ab720e0267 fix: local test change 2026-03-16 23:33:20 +09:00
Sidharth Vinod d7db71e38a chore: Add new mermaid home button 2026-03-16 23:29:49 +09:00
Sidharth Vinod b466e8430e feat: Show mermaid.live privacy policy only on mermaid.live
As the OSS project only controls the mermaid.live domain, we're adding an env variable to let anyone who is self hosting live editor to set their own privacy policy, or to hide the button if they want to.
2026-03-16 23:29:13 +09:00
renovate[bot]andGitHub ea404df79b fix(deps): update dependency mermaid to ^11.13.0 2026-03-16 01:36:21 +00:00
Sidharth Vinod 15cdb7b64a chore: Show editor picker once to existing users as well 2026-03-12 13:35:42 +09:00
Sidharth Vinod 340911f271 chore: Remove panZoom event 2026-03-05 23:28:34 +05:30
Sidharth VinodandGitHub 44d15c0f5e Merge pull request #1901 from mermaid-js/claude/hide-editor-picker-mobile-2h7p0
Hide editor picker on mobile
2026-03-03 14:09:58 -08:00
Claude c36e51fb9f Hide editor picker dialog on mobile in shouldShowEditorChooser
Return false when viewport width is below 640px (Tailwind sm breakpoint),
matching the isMobile check used elsewhere in the app.

https://claude.ai/code/session_01KoPM7CZKWdwdZPm4MneGVE
2026-03-03 22:02:10 +00:00
Sidharth Vinod 82f7371fed fix: Do not show editor selector to users coming from docs site, as they have seen one already 2026-03-04 01:50:29 +05:30
Sidharth Vinod e56451e027 chore: Update coupon code 2026-03-04 01:43:34 +05:30
Sidharth VinodandGitHub 1ed126e684 Merge pull request #1898 from mermaid-js/sidv/fixTests
tests: Tweak failing tests
2026-03-03 11:41:35 -08:00
Sidharth Vinod a85bc09092 fix: Track mermaid.ai outflow 2026-03-04 01:10:12 +05:30
Sidharth Vinod 5cc29dfebe tests: Tweak failing tests 2026-03-04 00:32:16 +05:30
Sidharth VinodandGitHub 6079e5e1ba Merge pull request #1896 from mermaid-js/sidv/popup
Editor Chooser popup
2026-03-03 10:33:43 -08:00
Sidharth Vinod dabbf5700a test: Disable popup in tests 2026-03-03 23:45:51 +05:30
Sidharth Vinod 13e5e834a2 fix: Respect MERMAID_IS_ENABLED_MERMAID_CHART_LINKS for popup 2026-03-03 15:56:47 +05:30
Sidharth Vinod bf1a7581e8 chore: Add editor chooser dialog for first time users 2026-03-03 15:54:37 +05:30
Sidharth Vinod d092480cf3 chore: Auto redirect to new domain 2026-03-03 13:22:36 +05:30
Sidharth VinodandGitHub 94f7dafc72 Merge pull request #1886 from chouheiwa/fix/cjk-text-visibility-in-svg-export
fix: ensure CJK text visibility in SVG export
2026-02-16 21:11:50 +05:30
Sidharth VinodandGitHub 8d7db5501a Merge pull request #1883 from saurabhg772244/saurabh/add-mermaid-inline-ai
add mermaid inline AI
2026-02-16 20:44:51 +05:30
saurabhg772244 f6cf766986 added dark mode for icon 2026-02-16 19:36:20 +05:30
Sidharth VinodandGitHub 4bfe42458e Merge pull request #1887 from mermaid-js/sidv/promo
chore: Update promo URL
2026-02-16 16:46:25 +05:30
Sidharth Vinod f6f9668044 fix: Update couponID 2026-02-16 16:13:33 +05:30
Sidharth Vinod 2b13fde292 chore: Update promo URL 2026-02-16 15:55:21 +05:30
chouheiwa 5aed4ea7a0 fix: use viewBox dimensions for PNG export canvas size
In rough mode, SVG width/height are set to 100%, so getBoundingClientRect
returns the container size instead of the actual diagram size. Use viewBox
dimensions when available to get the correct aspect ratio for PNG export.
2026-02-16 16:19:22 +08:00
chouheiwa 5dd1ec6b63 fix: apply foreignObject clipping fix to PNG export path
Move fixForeignObjectClipping into getBase64SVG so it covers both
SVG and PNG export flows. Previously only getSvgElement (SVG export)
applied the fix, while exportImage (PNG export) passed the svg element
directly to getBase64SVG, bypassing the fix entirely.
2026-02-16 11:12:40 +08:00
chouheiwa 49f800bacb fix: apply foreignObject clipping fix to all languages in rough mode SVG export 2026-02-16 09:18:17 +08:00
chouheiwa 83ba64c8c8 fix: ensure CJK text visibility in SVG export 2026-02-15 17:31:32 +08:00
Sidharth VinodandGitHub 49629cfb61 Update Canonicals 2026-02-13 19:30:59 +05:30
saurabhg772244 6160617458 Fix AI inline popup issues and remove quick edit functionality 2026-02-13 13:54:39 +05:30
saurabhg772244 1166479277 remove unused global style 2026-02-12 20:02:48 +05:30
saurabhg772244 958e7aa62c close popup on outside click and escape button 2026-02-12 19:51:54 +05:30
saurabhg772244 aa3479d508 code refactor and fix icon hover issue 2026-02-12 15:52:21 +05:30
saurabhg772244 830df8c44b add mermaid inline AI 2026-02-12 13:13:16 +05:30
Sidharth VinodandGitHub 629d9639d2 Merge pull request #1882 from mermaid-js/sidv/promo
feat: Add new year promo
2026-02-02 15:33:56 +05:30
Sidharth Vinod 1a529f598f feat: Add new year promo 2026-02-02 15:33:02 +05:30
Sidharth Vinod f3d580b8eb fix: Update tiny tree 2026-01-29 14:22:08 +05:30
Sidharth VinodandGitHub 7414ac0926 Merge pull request #1878 from mermaid-js/sidv/updateMcDomain
feat: Hide tooltip based on domain
2026-01-28 12:02:01 +05:30
Sidharth VinodandGitHub c05fa21dcc Merge pull request #1877 from mermaid-js/sidv/updateDocsURL
chore: Make docs URL configurable during build
2026-01-28 12:01:52 +05:30
Sidharth VinodandGitHub 61e194517d Merge pull request #1875 from mermaid-js/sidv/removePlayground
chore: Remove playground toggle
2026-01-28 12:01:29 +05:30
Sidharth Vinod 9946dff29d feat: Hide tooltip based on domain 2026-01-28 11:52:30 +05:30