mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 11:43:59 -05:00
Update dependency markmap-lib to v0.9.2 (#707)
* Update dependency markmap-lib to v0.9.2 Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
3b50a00021
commit
47f84f1933
6 changed files with 9 additions and 15 deletions
|
@ -78,7 +78,7 @@
|
|||
"markdown-it-sup": "1.0.0",
|
||||
"markdown-it-task-lists": "2.1.1",
|
||||
"markdown-it-toc-done-right": "4.1.0",
|
||||
"markmap-lib": "0.9.1",
|
||||
"markmap-lib": "0.9.2",
|
||||
"mermaid": "8.8.2",
|
||||
"node-sass": "4.14.1",
|
||||
"react": "17.0.1",
|
||||
|
|
|
@ -45,17 +45,20 @@ export const MarkmapFrame: React.FC<MarkmapFrameProps> = ({ code }) => {
|
|||
svg.setAttribute('width', '100%')
|
||||
actualContainer.querySelectorAll('svg').forEach(child => child.remove())
|
||||
actualContainer.appendChild(svg)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
|
||||
const { root, features } = transform.transform(code)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
|
||||
const { styles, scripts } = transform.getUsedAssets(features)
|
||||
if (styles) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
loader.loadCSS(styles)
|
||||
}
|
||||
if (scripts) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-member-access
|
||||
loader.loadJS(scripts, { getMarkmap: () => view.Markmap })
|
||||
.catch(err => console.error(err))
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
||||
view.Markmap.create(svg, {}, root)
|
||||
}).catch(() => { console.error('error while loading markmap') })
|
||||
}, [code])
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
declare module 'markmap-lib/dist/transform' {
|
||||
export { transform, getUsedAssets } from 'markmap-lib/types/transform'
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
declare module 'markmap-lib/dist/util/loader' {
|
||||
export { loadCSS, loadJS } from 'markmap-lib/types/util/loader'
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
declare module 'markmap-lib/dist/view' {
|
||||
export { Markmap } from 'markmap-lib/types/view'
|
||||
}
|
|
@ -9477,10 +9477,10 @@ markdown-it@^11.0.0:
|
|||
mdurl "^1.0.1"
|
||||
uc.micro "^1.0.5"
|
||||
|
||||
markmap-lib@0.9.1:
|
||||
version "0.9.1"
|
||||
resolved "https://registry.yarnpkg.com/markmap-lib/-/markmap-lib-0.9.1.tgz#c239a75c75491e11dbfa4dea80ed55e1960e8782"
|
||||
integrity sha512-R6DnnOQRIWP577vD8Q7zoSu1+GpH0eHn6PZ2VkIVVhiRNFlEPtv1vBIfVwFxvu5SqnukkcQNqnbakYnMaDKcdw==
|
||||
markmap-lib@0.9.2:
|
||||
version "0.9.2"
|
||||
resolved "https://registry.yarnpkg.com/markmap-lib/-/markmap-lib-0.9.2.tgz#cc253312f184419ed40237d6ad6ba199282677e4"
|
||||
integrity sha512-7PKnqBCzZZoNwppafYWqzkCGInHQrFEGEjqY6mFYgcp5v9AssRo2Cm6OYRjanC49Swwdv1p94ibuQO170AOxuw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.9.6"
|
||||
"@types/d3" "^5.7.2"
|
||||
|
|
Loading…
Reference in a new issue