Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review port to mermaid v10 #35

Closed
frehberg opened this issue Mar 9, 2023 · 7 comments
Closed

Review port to mermaid v10 #35

frehberg opened this issue Mar 9, 2023 · 7 comments

Comments

@frehberg
Copy link
Collaborator

frehberg commented Mar 9, 2023

<script type="module">
      import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
      ...
</script>

or accessing the local files location

To test the port, change the dependency in Cargo.toml to

[dependencies]
aquamarine = { git = "https://github.com/frehberg/aquamarine.git", branch = "35_port_mermaid_v10" }
@frehberg
Copy link
Collaborator Author

Please comment the the Pull Request #36

frehberg added a commit to frehberg/aquamarine that referenced this issue Mar 11, 2023
frehberg added a commit to frehberg/aquamarine that referenced this issue Mar 11, 2023
frehberg added a commit to frehberg/aquamarine that referenced this issue Mar 11, 2023
@frehberg
Copy link
Collaborator Author

frehberg commented Mar 11, 2023

Changes of pull request #36

  • Introducing new dependendency to crate "include-dir"
  • Bundling/embed 32MB mermaid sources into binary
  • Extracting embedded sources into target/doc/static.files.mermaid/
  • Migrating to ESM import style of mermaid v10
  • Robust detection of dark-mode
  • Dynamic import depending on rustdoc root-path definition: document.getElementById('rustdoc-vars').attributes['data-root-path'].value
  • By default import from local storage rootPath + 'static.files.mermaid/mermaid.esm.min.mjs'
  • If import from local storage fails, falling back to remote https://unpkg.com/mermaid@10/dist/mermaid.esm.min.mjs
  • If neither one succeeds, replacing Mermaid-Markdowns with following notice-marker

image

@frehberg frehberg changed the title Porting to mermaid v10.0 Review port to mermaid v10.0 Mar 12, 2023
@frehberg frehberg changed the title Review port to mermaid v10.0 WIP: Review port to mermaid v10.0 Mar 14, 2023
frehberg added a commit to frehberg/aquamarine that referenced this issue Mar 14, 2023
frehberg added a commit to frehberg/aquamarine that referenced this issue Mar 15, 2023
frehberg added a commit to frehberg/aquamarine that referenced this issue Apr 6, 2023
@frehberg frehberg reopened this Apr 6, 2023
@frehberg frehberg changed the title WIP: Review port to mermaid v10.0 WIP: Review port to mermaid v10 Apr 6, 2023
@frehberg frehberg changed the title WIP: Review port to mermaid v10 Review port to mermaid v10 Apr 6, 2023
frehberg added a commit to frehberg/aquamarine that referenced this issue Apr 6, 2023
@frehberg
Copy link
Collaborator Author

To test the port, change the dependency in Cargo.toml to

[dependencies]
aquamarine = { git = "https://github.com/frehberg/aquamarine.git", branch = "35_port_mermaid_v10" }

@mersinvald
Copy link
Owner

@frehberg I'm on it. To streamline the process from now, I'm going to add you as a maintainer too, as I don't get much time to work on this project at the moment.

@frehberg
Copy link
Collaborator Author

frehberg commented Apr 17, 2023 via email

@frehberg
Copy link
Collaborator Author

frehberg commented Apr 19, 2023 via email

@mersinvald
Copy link
Owner

@frehberg says you didn't accept invite yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants