mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-05 15:19:36 +02:00
chore: Fix type
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import type { MermaidConfig } from '../config.type.js';
|
import type { GanttDiagramConfig, MermaidConfig } from '../config.type.js';
|
||||||
import { frontMatterRegex } from './regexes.js';
|
import { frontMatterRegex } from './regexes.js';
|
||||||
// The "* as yaml" part is necessary for tree-shaking
|
// The "* as yaml" part is necessary for tree-shaking
|
||||||
import * as yaml from 'js-yaml';
|
import * as yaml from 'js-yaml';
|
||||||
@@ -6,7 +6,7 @@ import * as yaml from 'js-yaml';
|
|||||||
interface FrontMatterMetadata {
|
interface FrontMatterMetadata {
|
||||||
title?: string;
|
title?: string;
|
||||||
// Allows custom display modes. Currently used for compact mode in gantt charts.
|
// Allows custom display modes. Currently used for compact mode in gantt charts.
|
||||||
displayMode?: string;
|
displayMode?: GanttDiagramConfig['displayMode'];
|
||||||
config?: MermaidConfig;
|
config?: MermaidConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ export function extractFrontMatter(text: string): FrontMatterResult {
|
|||||||
|
|
||||||
// Only add properties that are explicitly supported, if they exist
|
// Only add properties that are explicitly supported, if they exist
|
||||||
if (parsed.displayMode) {
|
if (parsed.displayMode) {
|
||||||
metadata.displayMode = parsed.displayMode.toString();
|
metadata.displayMode = parsed.displayMode.toString() as GanttDiagramConfig['displayMode'];
|
||||||
}
|
}
|
||||||
if (parsed.title) {
|
if (parsed.title) {
|
||||||
metadata.title = parsed.title.toString();
|
metadata.title = parsed.title.toString();
|
||||||
|
89
pnpm-lock.yaml
generated
89
pnpm-lock.yaml
generated
@@ -5498,18 +5498,6 @@ packages:
|
|||||||
- vue
|
- vue
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@vueuse/core@10.3.0(vue@3.3.4):
|
|
||||||
resolution: {integrity: sha512-BEM5yxcFKb5btFjTSAFjTu5jmwoW66fyV9uJIP4wUXXU8aR5Hl44gndaaXp7dC5HSObmgbnR2RN+Un1p68Mf5Q==}
|
|
||||||
dependencies:
|
|
||||||
'@types/web-bluetooth': 0.0.17
|
|
||||||
'@vueuse/metadata': 10.3.0
|
|
||||||
'@vueuse/shared': 10.3.0(vue@3.3.4)
|
|
||||||
vue-demi: 0.14.5(vue@3.3.4)
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- '@vue/composition-api'
|
|
||||||
- vue
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@vueuse/core@10.4.1(vue@3.3.4):
|
/@vueuse/core@10.4.1(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-DkHIfMIoSIBjMgRRvdIvxsyboRZQmImofLyOHADqiVbQVilP8VVHDhBX2ZqoItOgu7dWa8oXiNnScOdPLhdEXg==}
|
resolution: {integrity: sha512-DkHIfMIoSIBjMgRRvdIvxsyboRZQmImofLyOHADqiVbQVilP8VVHDhBX2ZqoItOgu7dWa8oXiNnScOdPLhdEXg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -5522,56 +5510,6 @@ packages:
|
|||||||
- vue
|
- vue
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vueuse/integrations@10.3.0(focus-trap@7.5.2)(vue@3.3.4):
|
|
||||||
resolution: {integrity: sha512-Jgiv7oFyIgC6BxmDtiyG/fxyGysIds00YaY7sefwbhCZ2/tjEx1W/1WcsISSJPNI30in28+HC2J4uuU8184ekg==}
|
|
||||||
peerDependencies:
|
|
||||||
async-validator: '*'
|
|
||||||
axios: '*'
|
|
||||||
change-case: '*'
|
|
||||||
drauu: '*'
|
|
||||||
focus-trap: '*'
|
|
||||||
fuse.js: '*'
|
|
||||||
idb-keyval: '*'
|
|
||||||
jwt-decode: '*'
|
|
||||||
nprogress: '*'
|
|
||||||
qrcode: '*'
|
|
||||||
sortablejs: '*'
|
|
||||||
universal-cookie: '*'
|
|
||||||
peerDependenciesMeta:
|
|
||||||
async-validator:
|
|
||||||
optional: true
|
|
||||||
axios:
|
|
||||||
optional: true
|
|
||||||
change-case:
|
|
||||||
optional: true
|
|
||||||
drauu:
|
|
||||||
optional: true
|
|
||||||
focus-trap:
|
|
||||||
optional: true
|
|
||||||
fuse.js:
|
|
||||||
optional: true
|
|
||||||
idb-keyval:
|
|
||||||
optional: true
|
|
||||||
jwt-decode:
|
|
||||||
optional: true
|
|
||||||
nprogress:
|
|
||||||
optional: true
|
|
||||||
qrcode:
|
|
||||||
optional: true
|
|
||||||
sortablejs:
|
|
||||||
optional: true
|
|
||||||
universal-cookie:
|
|
||||||
optional: true
|
|
||||||
dependencies:
|
|
||||||
'@vueuse/core': 10.3.0(vue@3.3.4)
|
|
||||||
'@vueuse/shared': 10.3.0(vue@3.3.4)
|
|
||||||
focus-trap: 7.5.2
|
|
||||||
vue-demi: 0.14.5(vue@3.3.4)
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- '@vue/composition-api'
|
|
||||||
- vue
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@vueuse/integrations@10.4.1(focus-trap@7.5.2)(vue@3.3.4):
|
/@vueuse/integrations@10.4.1(focus-trap@7.5.2)(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-uRBPyG5Lxoh1A/J+boiioPT3ELEAPEo4t8W6Mr4yTKIQBeW/FcbsotZNPr4k9uz+3QEksMmflWloS9wCnypM7g==}
|
resolution: {integrity: sha512-uRBPyG5Lxoh1A/J+boiioPT3ELEAPEo4t8W6Mr4yTKIQBeW/FcbsotZNPr4k9uz+3QEksMmflWloS9wCnypM7g==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -5626,10 +5564,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-cM28HjDEw5FIrPE9rgSPFZvQ0ZYnOLAOr8hl1XM6tFl80U3WAR5ROdnAqiYybniwP5gt9MKKAJAqd/ab2aHkqg==}
|
resolution: {integrity: sha512-cM28HjDEw5FIrPE9rgSPFZvQ0ZYnOLAOr8hl1XM6tFl80U3WAR5ROdnAqiYybniwP5gt9MKKAJAqd/ab2aHkqg==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@vueuse/metadata@10.3.0:
|
|
||||||
resolution: {integrity: sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@vueuse/metadata@10.4.1:
|
/@vueuse/metadata@10.4.1:
|
||||||
resolution: {integrity: sha512-2Sc8X+iVzeuMGHr6O2j4gv/zxvQGGOYETYXEc41h0iZXIRnRbJZGmY/QP8dvzqUelf8vg0p/yEA5VpCEu+WpZg==}
|
resolution: {integrity: sha512-2Sc8X+iVzeuMGHr6O2j4gv/zxvQGGOYETYXEc41h0iZXIRnRbJZGmY/QP8dvzqUelf8vg0p/yEA5VpCEu+WpZg==}
|
||||||
dev: true
|
dev: true
|
||||||
@@ -5643,15 +5577,6 @@ packages:
|
|||||||
- vue
|
- vue
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@vueuse/shared@10.3.0(vue@3.3.4):
|
|
||||||
resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==}
|
|
||||||
dependencies:
|
|
||||||
vue-demi: 0.14.5(vue@3.3.4)
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- '@vue/composition-api'
|
|
||||||
- vue
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@vueuse/shared@10.4.1(vue@3.3.4):
|
/@vueuse/shared@10.4.1(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-vz5hbAM4qA0lDKmcr2y3pPdU+2EVw/yzfRsBdu+6+USGa4PxqSQRYIUC9/NcT06y+ZgaTsyURw2I9qOFaaXHAg==}
|
resolution: {integrity: sha512-vz5hbAM4qA0lDKmcr2y3pPdU+2EVw/yzfRsBdu+6+USGa4PxqSQRYIUC9/NcT06y+ZgaTsyURw2I9qOFaaXHAg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -15542,7 +15467,7 @@ packages:
|
|||||||
'@rollup/pluginutils': 5.0.3(rollup@2.79.1)
|
'@rollup/pluginutils': 5.0.3(rollup@2.79.1)
|
||||||
chokidar: 3.5.3
|
chokidar: 3.5.3
|
||||||
debug: 4.3.4(supports-color@8.1.1)
|
debug: 4.3.4(supports-color@8.1.1)
|
||||||
fast-glob: 3.2.12
|
fast-glob: 3.3.1
|
||||||
local-pkg: 0.4.3
|
local-pkg: 0.4.3
|
||||||
magic-string: 0.30.2
|
magic-string: 0.30.2
|
||||||
minimatch: 9.0.3
|
minimatch: 9.0.3
|
||||||
@@ -15684,10 +15609,11 @@ packages:
|
|||||||
mlly: 1.4.0
|
mlly: 1.4.0
|
||||||
pathe: 1.1.1
|
pathe: 1.1.1
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
vite: 4.3.9(@types/node@18.16.0)
|
vite: 4.4.9(@types/node@18.16.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
- less
|
- less
|
||||||
|
- lightningcss
|
||||||
- sass
|
- sass
|
||||||
- stylus
|
- stylus
|
||||||
- sugarss
|
- sugarss
|
||||||
@@ -15718,7 +15644,7 @@ packages:
|
|||||||
workbox-window: ^7.0.0
|
workbox-window: ^7.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.3.4(supports-color@8.1.1)
|
debug: 4.3.4(supports-color@8.1.1)
|
||||||
fast-glob: 3.2.12
|
fast-glob: 3.3.1
|
||||||
pretty-bytes: 6.1.1
|
pretty-bytes: 6.1.1
|
||||||
vite: 4.3.9(@types/node@18.16.0)
|
vite: 4.3.9(@types/node@18.16.0)
|
||||||
workbox-build: 7.0.0
|
workbox-build: 7.0.0
|
||||||
@@ -15863,8 +15789,8 @@ packages:
|
|||||||
'@docsearch/js': 3.5.2(@algolia/client-search@4.19.1)(search-insights@2.7.0)
|
'@docsearch/js': 3.5.2(@algolia/client-search@4.19.1)(search-insights@2.7.0)
|
||||||
'@vitejs/plugin-vue': 4.3.1(vite@4.4.9)(vue@3.3.4)
|
'@vitejs/plugin-vue': 4.3.1(vite@4.4.9)(vue@3.3.4)
|
||||||
'@vue/devtools-api': 6.5.0
|
'@vue/devtools-api': 6.5.0
|
||||||
'@vueuse/core': 10.3.0(vue@3.3.4)
|
'@vueuse/core': 10.4.1(vue@3.3.4)
|
||||||
'@vueuse/integrations': 10.3.0(focus-trap@7.5.2)(vue@3.3.4)
|
'@vueuse/integrations': 10.4.1(focus-trap@7.5.2)(vue@3.3.4)
|
||||||
body-scroll-lock: 4.0.0-beta.0
|
body-scroll-lock: 4.0.0-beta.0
|
||||||
focus-trap: 7.5.2
|
focus-trap: 7.5.2
|
||||||
mark.js: 8.11.1
|
mark.js: 8.11.1
|
||||||
@@ -15953,11 +15879,12 @@ packages:
|
|||||||
strip-literal: 1.3.0
|
strip-literal: 1.3.0
|
||||||
tinybench: 2.5.0
|
tinybench: 2.5.0
|
||||||
tinypool: 0.7.0
|
tinypool: 0.7.0
|
||||||
vite: 4.3.9(@types/node@18.16.0)
|
vite: 4.4.9(@types/node@18.16.0)
|
||||||
vite-node: 0.34.0(@types/node@18.16.0)
|
vite-node: 0.34.0(@types/node@18.16.0)
|
||||||
why-is-node-running: 2.2.2
|
why-is-node-running: 2.2.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- less
|
- less
|
||||||
|
- lightningcss
|
||||||
- sass
|
- sass
|
||||||
- stylus
|
- stylus
|
||||||
- sugarss
|
- sugarss
|
||||||
|
Reference in New Issue
Block a user