@md-plugins/quasar-app-extension-q-press 0.1.0-beta.5 → 0.1.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/index.js +18 -1
- package/dist/install.js +1 -1
- package/dist/q-press-globals.d.ts +49 -0
- package/dist/templates/init/src/_q-press/layouts/MarkdownPage.vue +1 -2
- package/dist/templates/init/src/_q-press/stores/markdown.ts +1 -2
- package/dist/templates/init/src/markdown/getting-started/introduction.md +2 -2
- package/dist/templates/init/src/markdown/guides/upgrade-guide.md +5 -11
- package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +2 -4
- package/dist/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +1 -1
- package/dist/templates/update/src/_q-press/layouts/MarkdownPage.vue +1 -2
- package/dist/templates/update/src/_q-press/stores/markdown.ts +1 -2
- package/package.json +18 -17
- package/src/index.ts +34 -1
- package/src/install.ts +1 -1
- package/src/q-press-globals.d.ts +49 -0
- package/src/templates/init/src/_q-press/css/app.scss +24 -27
- package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +1 -2
- package/src/templates/init/src/_q-press/stores/markdown.ts +1 -2
- package/src/templates/init/src/markdown/getting-started/introduction.md +2 -2
- package/src/templates/init/src/markdown/guides/upgrade-guide.md +5 -11
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +2 -4
- package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +1 -1
- package/src/templates/update/src/_q-press/css/app.scss +24 -27
- package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +1 -2
- package/src/templates/update/src/_q-press/stores/markdown.ts +1 -2
- package/dist/templates/init/src/q-press.globals.d.ts +0 -36
- package/dist/templates/update/src/q-press.globals.d.ts +0 -36
- package/src/templates/init/src/q-press.globals.d.ts +0 -36
- package/src/templates/update/src/q-press.globals.d.ts +0 -36
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@ The Ultimate Markdown Solution for the Quasar Framework.
|
|
|
4
4
|
|
|
5
5
|
See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpress/overview) for more information.
|
|
6
6
|
|
|
7
|
-
> Current beta release: `0.1.0-beta.
|
|
7
|
+
> Current beta release: `0.1.0-beta.7`.
|
|
8
8
|
>
|
|
9
|
-
> Q-Press currently targets Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.
|
|
9
|
+
> Q-Press currently targets Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.26`. TypeScript processing is required.
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
@@ -26,14 +26,12 @@ See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpr
|
|
|
26
26
|
- `quasar ext add @md-plugins/q-press`
|
|
27
27
|
- Here is what gets installed on a **new** install:
|
|
28
28
|
- `src/.q-press`
|
|
29
|
-
- `src/q-press.globals.d.ts`
|
|
30
29
|
- `src/components`
|
|
31
30
|
- `src/markdown`
|
|
32
31
|
- `src/examples`
|
|
33
32
|
- `src/siteConfig`
|
|
34
33
|
- Here is what gets installed on an **update** install:
|
|
35
34
|
- `src/.q-press`
|
|
36
|
-
- `src/q-press.globals.d.ts`
|
|
37
35
|
|
|
38
36
|
2. Install `markdown-it` and `@types/markdown-it` in your project devDependencies
|
|
39
37
|
|
|
@@ -220,7 +218,7 @@ If you don't have a `.prettierignore` file, create one and add the following:
|
|
|
220
218
|
|
|
221
219
|
## Updating
|
|
222
220
|
|
|
223
|
-
When you update, only the `src/.q-press` folder will be updated
|
|
221
|
+
When you update, only the `src/.q-press` folder will be updated. If you want to re-install everything, just remove the `src/siteConfig` folder.
|
|
224
222
|
|
|
225
223
|
To make it easier to update, you can use the following command:
|
|
226
224
|
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* Docs: https://quasar.dev/app-extensions/development-guide/index-api
|
|
6
6
|
*/
|
|
7
7
|
import { defineIndexScript } from '@quasar/app-vite';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
const qPressGlobalsTsConfigPath = fileURLToPath(new URL('./q-press-globals.d.ts', import.meta.url)).replace(/\\/g, '/');
|
|
8
10
|
function normalizeAlias(alias) {
|
|
9
11
|
if (Array.isArray(alias)) {
|
|
10
12
|
return [...alias];
|
|
@@ -25,18 +27,33 @@ function addQuasarSourceAlias(viteConf, appDir) {
|
|
|
25
27
|
},
|
|
26
28
|
];
|
|
27
29
|
}
|
|
30
|
+
function addQPressGlobalsToTsConfig(tsConfig) {
|
|
31
|
+
tsConfig.files ??= [];
|
|
32
|
+
if (!tsConfig.files.includes(qPressGlobalsTsConfigPath)) {
|
|
33
|
+
tsConfig.files.push(qPressGlobalsTsConfigPath);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function extendTypeScriptConfig(typescriptConfig) {
|
|
37
|
+
const userExtendTsConfig = typescriptConfig.extendTsConfig;
|
|
38
|
+
typescriptConfig.extendTsConfig = (tsConfig) => {
|
|
39
|
+
userExtendTsConfig?.(tsConfig);
|
|
40
|
+
addQPressGlobalsToTsConfig(tsConfig);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
28
43
|
export default defineIndexScript((api) => {
|
|
29
44
|
// verify this is a Vite project
|
|
30
45
|
if (!api.hasVite) {
|
|
31
46
|
throw new Error('This extension requires Vite');
|
|
32
47
|
}
|
|
33
48
|
api.compatibleWith('quasar', '^2.0.0');
|
|
34
|
-
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.
|
|
49
|
+
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.26');
|
|
35
50
|
// here we extend /quasar.config, so we can add some Vite/Vue stuff
|
|
36
51
|
api.extendQuasarConf(async (config) => {
|
|
37
52
|
config.build ??= {};
|
|
53
|
+
config.build.typescript ??= {};
|
|
38
54
|
config.build.viteVuePluginOptions ??= {};
|
|
39
55
|
config.framework ??= {};
|
|
56
|
+
extendTypeScriptConfig(config.build.typescript);
|
|
40
57
|
// make sure 'vueRouterMode' has 'history' mode
|
|
41
58
|
if (config.build.vueRouterMode !== 'history') {
|
|
42
59
|
console.warn('Changing vueRouterMode to "history" - required for hash links to work correctly');
|
package/dist/install.js
CHANGED
|
@@ -11,7 +11,7 @@ export default defineInstallScript(async (api) => {
|
|
|
11
11
|
throw new Error('This extension requires Vite');
|
|
12
12
|
}
|
|
13
13
|
api.compatibleWith('quasar', '^2.0.0');
|
|
14
|
-
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.
|
|
14
|
+
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.26');
|
|
15
15
|
// project must have pinia installed
|
|
16
16
|
if ((await api.getStorePackageName()) !== 'pinia') {
|
|
17
17
|
console.error('-----------------------------');
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/// <reference types="@quasar/app-vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.md'
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
interface ImportMetaHot {
|
|
7
|
+
accept(callback?: (..._args: unknown[]) => unknown): void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface ImportMeta {
|
|
11
|
+
readonly env: ImportMetaEnv
|
|
12
|
+
glob: <T = unknown>(pattern: string) => Record<string, () => Promise<T>>
|
|
13
|
+
hot?: ImportMetaHot
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface TocMenuItem {
|
|
17
|
+
id: string
|
|
18
|
+
level: number
|
|
19
|
+
title: string
|
|
20
|
+
link?: string
|
|
21
|
+
deep?: boolean
|
|
22
|
+
sub?: boolean
|
|
23
|
+
onClick?: () => void
|
|
24
|
+
children?: TocMenuItem[]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface MarkdownModule {
|
|
28
|
+
title?: string
|
|
29
|
+
headers?: TocMenuItem[]
|
|
30
|
+
frontmatter?: Record<string, unknown>
|
|
31
|
+
filename?: string
|
|
32
|
+
render: (..._args: unknown[]) => unknown
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface MenuItem {
|
|
36
|
+
name: string
|
|
37
|
+
path?: string
|
|
38
|
+
icon?: string
|
|
39
|
+
iconColor?: string
|
|
40
|
+
rightIcon?: string
|
|
41
|
+
rightIconColor?: string
|
|
42
|
+
badge?: string
|
|
43
|
+
children?: MenuItem[] | undefined
|
|
44
|
+
external?: boolean
|
|
45
|
+
expanded?: boolean
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export {}
|
|
@@ -94,7 +94,6 @@ import { useRoute } from 'vue-router'
|
|
|
94
94
|
import { mdiPencil, mdiFlash, mdiLaunch } from '@quasar/extras/mdi-v7'
|
|
95
95
|
|
|
96
96
|
import type { NavItem, RelatedItem } from '@md-plugins/vite-md-plugin'
|
|
97
|
-
import type { TocItem } from '@md-plugins/md-plugin-headers'
|
|
98
97
|
import MarkdownLink from '../components/MarkdownLink.vue'
|
|
99
98
|
import MarkdownPageToc from './MarkdownPageToc.vue'
|
|
100
99
|
|
|
@@ -129,7 +128,7 @@ const props = defineProps({
|
|
|
129
128
|
},
|
|
130
129
|
|
|
131
130
|
toc: {
|
|
132
|
-
type: Array<
|
|
131
|
+
type: Array<TocMenuItem>,
|
|
133
132
|
default: () => [],
|
|
134
133
|
},
|
|
135
134
|
related: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineStore, acceptHMRUpdate } from 'pinia'
|
|
2
2
|
import { useRoute } from 'vue-router'
|
|
3
3
|
import { useScroll } from '../composables/scroll'
|
|
4
|
-
import type { TocItem } from '@md-plugins/md-plugin-headers'
|
|
5
4
|
|
|
6
5
|
export const useMarkdownStore = defineStore('markdown-store', {
|
|
7
6
|
state: () => ({
|
|
@@ -60,7 +59,7 @@ export const useMarkdownStore = defineStore('markdown-store', {
|
|
|
60
59
|
}
|
|
61
60
|
},
|
|
62
61
|
|
|
63
|
-
setToc(toc:
|
|
62
|
+
setToc(toc: TocMenuItem[]) {
|
|
64
63
|
const { scrollTo } = useScroll()
|
|
65
64
|
this.toc =
|
|
66
65
|
toc !== void 0
|
|
@@ -21,7 +21,7 @@ Markdown Plugins are a set of tools and extensions designed to enhance the funct
|
|
|
21
21
|
- **Title Extraction**: Extract the first header in Markdown as the page title.
|
|
22
22
|
- **Script Imports**: Extract and process **<script import>** blocks from Markdown.
|
|
23
23
|
- **Code Block Enhancements**: Enhance code block rendering with syntax highlighting, tabs, and more.
|
|
24
|
-
- **Custom Styling**: Apply custom styles to your Markdown content for a more
|
|
24
|
+
- **Custom Styling**: Apply custom styles to your Markdown content for a more refined look.
|
|
25
25
|
- **Integration**: Easily integrate with other tools and platforms to streamline your workflow.
|
|
26
26
|
|
|
27
27
|
## Why Use Markdown Plugins?
|
|
@@ -48,7 +48,7 @@ Here are some examples of what you can achieve with Markdown Plugins:
|
|
|
48
48
|
|
|
49
49
|
- **Custom Syntax**: Add custom syntax for specific use cases.
|
|
50
50
|
- **Enhanced Components**: Embed interactive and enhanced components.
|
|
51
|
-
- **Custom Styling**: Apply custom styles to your content for a
|
|
51
|
+
- **Custom Styling**: Apply custom styles to your content for a refined look.
|
|
52
52
|
- **Frontmatter Support**: Extract and process frontmatter content from your Markdown files.
|
|
53
53
|
- **Header Management**: Extract and process headers for generating ToCs or managing headers.
|
|
54
54
|
- **Inline Code Styling**: Add custom classes to inline code blocks for styling.
|
|
@@ -7,16 +7,16 @@ related:
|
|
|
7
7
|
- vite-plugins/vite-md-plugin/overview
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
The `0.1.0` beta line moves MD-Plugins and Q-Press to the Quasar CLI Vite 3 beta toolchain. It is the right version to use when your Quasar application is being upgraded to `@quasar/app-vite` `>=3.0.0-beta.
|
|
10
|
+
The `0.1.0` beta line moves MD-Plugins and Q-Press to the Quasar CLI Vite 3 beta toolchain. It is the right version to use when your Quasar application is being upgraded to `@quasar/app-vite` `>=3.0.0-beta.26`.
|
|
11
11
|
|
|
12
12
|
::: warning
|
|
13
|
-
Q-Press and the Quasar app extensions now target Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.
|
|
13
|
+
Q-Press and the Quasar app extensions now target Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.26`. They are not intended for Webpack projects or JavaScript-only Quasar projects.
|
|
14
14
|
:::
|
|
15
15
|
|
|
16
16
|
## Before You Upgrade
|
|
17
17
|
|
|
18
18
|
- Make sure your app is already on a Quasar Vite setup.
|
|
19
|
-
- Upgrade the app to `@quasar/app-vite` `>=3.0.0-beta.
|
|
19
|
+
- Upgrade the app to `@quasar/app-vite` `>=3.0.0-beta.26`.
|
|
20
20
|
- Use TypeScript in the consuming Quasar project.
|
|
21
21
|
- Import `defineConfig` in `quasar.config.ts` directly from `@quasar/app-vite`.
|
|
22
22
|
- Use `/// <reference types="@quasar/app-vite/client" />` in `src/env.d.ts`.
|
|
@@ -39,15 +39,9 @@ For direct Vite plugin usage, update the packages you consume:
|
|
|
39
39
|
pnpm up @md-plugins/vite-md-plugin@beta @md-plugins/vite-examples-plugin@beta
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## Q-Press Type Globals
|
|
43
43
|
|
|
44
|
-
Q-Press
|
|
45
|
-
|
|
46
|
-
```text
|
|
47
|
-
src/q-press.globals.d.ts
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
If your project still references `src/q-press.global.d.ts`, rename the reference to the plural `globals` filename.
|
|
44
|
+
Q-Press now provides its shared Markdown, menu and `ImportMeta` globals directly from the app extension package. After upgrading to this release line and running `quasar prepare`, projects no longer need to keep a local `src/q-press.globals.d.ts` file.
|
|
51
45
|
|
|
52
46
|
## Environment Variable Changes
|
|
53
47
|
|
|
@@ -6,7 +6,7 @@ desc: Q-Press App-Extension for Quasar.
|
|
|
6
6
|
The Q-Press App Extension is a powerful tool for Quasar developers that simplifies the integration of Markdown content into Quasar applications. It leverages the capabilities of Vite and various Markdown plugins to transform Markdown files into Vue components, enabling a seamless and efficient workflow for content management.
|
|
7
7
|
|
|
8
8
|
::: warning
|
|
9
|
-
Q-Press is for Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.
|
|
9
|
+
Q-Press is for Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.26` at this time. TypeScript processing is also required. Do not use if you are using Webpack or have a JavaScript-only project.
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
::: tip
|
|
@@ -33,14 +33,12 @@ quasar ext add @md-plugins/q-press
|
|
|
33
33
|
|
|
34
34
|
- **New Install:**
|
|
35
35
|
- `src/.q-press`
|
|
36
|
-
- `src/q-press.globals.d.ts`
|
|
37
36
|
- `src/components`
|
|
38
37
|
- `src/markdown`
|
|
39
38
|
- `src/examples`
|
|
40
39
|
- `src/siteConfig`
|
|
41
40
|
- **Update Install:**
|
|
42
41
|
- `src/.q-press`
|
|
43
|
-
- `src/q-press.globals.d.ts`
|
|
44
42
|
|
|
45
43
|
### Additional Dependencies
|
|
46
44
|
|
|
@@ -311,7 +309,7 @@ If you don't have a `.prettierignore` file, create one in the root of your proje
|
|
|
311
309
|
|
|
312
310
|
## Updating
|
|
313
311
|
|
|
314
|
-
When you update, only the `src/.q-press` folder will be updated
|
|
312
|
+
When you update, only the `src/.q-press` folder will be updated. If you want to re-install everything, just remove the `src/siteConfig` folder.
|
|
315
313
|
|
|
316
314
|
To make it easier to update, you can use the following command:
|
|
317
315
|
|
package/dist/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md
CHANGED
|
@@ -9,7 +9,7 @@ related:
|
|
|
9
9
|
The `viteMdPluginAppExt` is a [Quasar App Extension](https://quasar.dev/app-extensions/introduction) that integrates the `viteMdPlugin` into your Quasar project. This extension allows you to use Markdown files as Vue components, enabling a seamless integration of Markdown content into your Quasar application.
|
|
10
10
|
|
|
11
11
|
::: warning
|
|
12
|
-
This app extension targets Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.
|
|
12
|
+
This app extension targets Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.26`.
|
|
13
13
|
:::
|
|
14
14
|
|
|
15
15
|
## Key Features
|
|
@@ -94,7 +94,6 @@ import { useRoute } from 'vue-router'
|
|
|
94
94
|
import { mdiPencil, mdiFlash, mdiLaunch } from '@quasar/extras/mdi-v7'
|
|
95
95
|
|
|
96
96
|
import type { NavItem, RelatedItem } from '@md-plugins/vite-md-plugin'
|
|
97
|
-
import type { TocItem } from '@md-plugins/md-plugin-headers'
|
|
98
97
|
import MarkdownLink from '../components/MarkdownLink.vue'
|
|
99
98
|
import MarkdownPageToc from './MarkdownPageToc.vue'
|
|
100
99
|
|
|
@@ -129,7 +128,7 @@ const props = defineProps({
|
|
|
129
128
|
},
|
|
130
129
|
|
|
131
130
|
toc: {
|
|
132
|
-
type: Array<
|
|
131
|
+
type: Array<TocMenuItem>,
|
|
133
132
|
default: () => [],
|
|
134
133
|
},
|
|
135
134
|
related: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineStore, acceptHMRUpdate } from 'pinia'
|
|
2
2
|
import { useRoute } from 'vue-router'
|
|
3
3
|
import { useScroll } from '../composables/scroll'
|
|
4
|
-
import type { TocItem } from '@md-plugins/md-plugin-headers'
|
|
5
4
|
|
|
6
5
|
export const useMarkdownStore = defineStore('markdown-store', {
|
|
7
6
|
state: () => ({
|
|
@@ -60,7 +59,7 @@ export const useMarkdownStore = defineStore('markdown-store', {
|
|
|
60
59
|
}
|
|
61
60
|
},
|
|
62
61
|
|
|
63
|
-
setToc(toc:
|
|
62
|
+
setToc(toc: TocMenuItem[]) {
|
|
64
63
|
const { scrollTo } = useScroll()
|
|
65
64
|
this.toc =
|
|
66
65
|
toc !== void 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@md-plugins/quasar-app-extension-q-press",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.7",
|
|
4
4
|
"description": "QPress - The Ultimate Markdown Solution for Quasar Framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"main": "dist/index.js",
|
|
25
|
+
"types": "dist/q-press-globals.d.ts",
|
|
25
26
|
"publishConfig": {
|
|
26
27
|
"access": "public"
|
|
27
28
|
},
|
|
@@ -29,32 +30,32 @@
|
|
|
29
30
|
"@types/markdown-it": "^14.1.2",
|
|
30
31
|
"fs-extra": "^11.3.5",
|
|
31
32
|
"markdown-it": "^14.1.1",
|
|
32
|
-
"@md-plugins/md-plugin-
|
|
33
|
-
"@md-plugins/md-plugin-
|
|
34
|
-
"@md-plugins/md-plugin-
|
|
35
|
-
"@md-plugins/md-plugin-
|
|
36
|
-
"@md-plugins/md-plugin-
|
|
37
|
-
"@md-plugins/md-plugin-
|
|
38
|
-
"@md-plugins/md-plugin-imports": "0.1.0-beta.
|
|
39
|
-
"@md-plugins/md-plugin-inlinecode": "0.1.0-beta.
|
|
40
|
-
"@md-plugins/md-plugin-
|
|
41
|
-
"@md-plugins/md-plugin-
|
|
42
|
-
"@md-plugins/md-plugin-title": "0.1.0-beta.
|
|
43
|
-
"@md-plugins/shared": "0.1.0-beta.
|
|
44
|
-
"@md-plugins/vite-md-plugin": "0.1.0-beta.
|
|
33
|
+
"@md-plugins/md-plugin-codeblocks": "0.1.0-beta.7",
|
|
34
|
+
"@md-plugins/md-plugin-containers": "0.1.0-beta.7",
|
|
35
|
+
"@md-plugins/md-plugin-blockquote": "0.1.0-beta.7",
|
|
36
|
+
"@md-plugins/md-plugin-image": "0.1.0-beta.7",
|
|
37
|
+
"@md-plugins/md-plugin-frontmatter": "0.1.0-beta.7",
|
|
38
|
+
"@md-plugins/md-plugin-headers": "0.1.0-beta.7",
|
|
39
|
+
"@md-plugins/md-plugin-imports": "0.1.0-beta.7",
|
|
40
|
+
"@md-plugins/md-plugin-inlinecode": "0.1.0-beta.7",
|
|
41
|
+
"@md-plugins/md-plugin-table": "0.1.0-beta.7",
|
|
42
|
+
"@md-plugins/md-plugin-link": "0.1.0-beta.7",
|
|
43
|
+
"@md-plugins/md-plugin-title": "0.1.0-beta.7",
|
|
44
|
+
"@md-plugins/shared": "0.1.0-beta.7",
|
|
45
|
+
"@md-plugins/vite-md-plugin": "0.1.0-beta.7"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@quasar/app-vite": "3.0.0-beta.
|
|
48
|
+
"@quasar/app-vite": "3.0.0-beta.26",
|
|
48
49
|
"@types/markdown-it": "^14.1.2",
|
|
49
50
|
"vite": "^8.0.14"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
|
-
"@quasar/app-vite": ">=3.0.0-beta.
|
|
53
|
+
"@quasar/app-vite": ">=3.0.0-beta.26",
|
|
53
54
|
"markdown-it": "^14.1.0"
|
|
54
55
|
},
|
|
55
56
|
"engines": {
|
|
56
57
|
"node": ">=22.13",
|
|
57
|
-
"pnpm": ">=11.
|
|
58
|
+
"pnpm": ">=11.3.0"
|
|
58
59
|
},
|
|
59
60
|
"scripts": {
|
|
60
61
|
"build": "pnpm exec tsc -p ./tsconfig.build.json && node ./scripts/build.js",
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { defineIndexScript } from '@quasar/app-vite'
|
|
9
|
+
import { fileURLToPath } from 'node:url'
|
|
9
10
|
|
|
10
11
|
// import fse from 'fs-extra'
|
|
11
12
|
// import { viteMdPlugin } from '@md-plugins/vite-md-plugin'
|
|
@@ -23,6 +24,18 @@ type ViteConfigWithAlias = {
|
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
type QuasarTsConfig = {
|
|
28
|
+
files?: string[]
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type QuasarTypescriptConfig = {
|
|
32
|
+
extendTsConfig?: (tsConfig: QuasarTsConfig) => void
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const qPressGlobalsTsConfigPath = fileURLToPath(
|
|
36
|
+
new URL('./q-press-globals.d.ts', import.meta.url),
|
|
37
|
+
).replace(/\\/g, '/')
|
|
38
|
+
|
|
26
39
|
function normalizeAlias(alias: ViteAlias | undefined): ViteAliasEntry[] {
|
|
27
40
|
if (Array.isArray(alias)) {
|
|
28
41
|
return [...alias]
|
|
@@ -47,6 +60,23 @@ function addQuasarSourceAlias(viteConf: ViteConfigWithAlias, appDir: string): vo
|
|
|
47
60
|
]
|
|
48
61
|
}
|
|
49
62
|
|
|
63
|
+
function addQPressGlobalsToTsConfig(tsConfig: QuasarTsConfig): void {
|
|
64
|
+
tsConfig.files ??= []
|
|
65
|
+
|
|
66
|
+
if (!tsConfig.files.includes(qPressGlobalsTsConfigPath)) {
|
|
67
|
+
tsConfig.files.push(qPressGlobalsTsConfigPath)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function extendTypeScriptConfig(typescriptConfig: QuasarTypescriptConfig): void {
|
|
72
|
+
const userExtendTsConfig = typescriptConfig.extendTsConfig
|
|
73
|
+
|
|
74
|
+
typescriptConfig.extendTsConfig = (tsConfig) => {
|
|
75
|
+
userExtendTsConfig?.(tsConfig)
|
|
76
|
+
addQPressGlobalsToTsConfig(tsConfig)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
50
80
|
export default defineIndexScript((api) => {
|
|
51
81
|
// verify this is a Vite project
|
|
52
82
|
if (!api.hasVite) {
|
|
@@ -54,14 +84,17 @@ export default defineIndexScript((api) => {
|
|
|
54
84
|
}
|
|
55
85
|
|
|
56
86
|
api.compatibleWith('quasar', '^2.0.0')
|
|
57
|
-
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.
|
|
87
|
+
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.26')
|
|
58
88
|
|
|
59
89
|
// here we extend /quasar.config, so we can add some Vite/Vue stuff
|
|
60
90
|
api.extendQuasarConf(async (config) => {
|
|
61
91
|
config.build ??= {}
|
|
92
|
+
config.build.typescript ??= {}
|
|
62
93
|
config.build.viteVuePluginOptions ??= {}
|
|
63
94
|
config.framework ??= {}
|
|
64
95
|
|
|
96
|
+
extendTypeScriptConfig(config.build.typescript)
|
|
97
|
+
|
|
65
98
|
// make sure 'vueRouterMode' has 'history' mode
|
|
66
99
|
if (config.build.vueRouterMode !== 'history') {
|
|
67
100
|
console.warn(
|
package/src/install.ts
CHANGED
|
@@ -14,7 +14,7 @@ export default defineInstallScript(async (api) => {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
api.compatibleWith('quasar', '^2.0.0')
|
|
17
|
-
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.
|
|
17
|
+
api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.26')
|
|
18
18
|
|
|
19
19
|
// project must have pinia installed
|
|
20
20
|
if ((await api.getStorePackageName()) !== 'pinia') {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/// <reference types="@quasar/app-vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.md'
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
interface ImportMetaHot {
|
|
7
|
+
accept(callback?: (..._args: unknown[]) => unknown): void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface ImportMeta {
|
|
11
|
+
readonly env: ImportMetaEnv
|
|
12
|
+
glob: <T = unknown>(pattern: string) => Record<string, () => Promise<T>>
|
|
13
|
+
hot?: ImportMetaHot
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface TocMenuItem {
|
|
17
|
+
id: string
|
|
18
|
+
level: number
|
|
19
|
+
title: string
|
|
20
|
+
link?: string
|
|
21
|
+
deep?: boolean
|
|
22
|
+
sub?: boolean
|
|
23
|
+
onClick?: () => void
|
|
24
|
+
children?: TocMenuItem[]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface MarkdownModule {
|
|
28
|
+
title?: string
|
|
29
|
+
headers?: TocMenuItem[]
|
|
30
|
+
frontmatter?: Record<string, unknown>
|
|
31
|
+
filename?: string
|
|
32
|
+
render: (..._args: unknown[]) => unknown
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface MenuItem {
|
|
36
|
+
name: string
|
|
37
|
+
path?: string
|
|
38
|
+
icon?: string
|
|
39
|
+
iconColor?: string
|
|
40
|
+
rightIcon?: string
|
|
41
|
+
rightIconColor?: string
|
|
42
|
+
badge?: string
|
|
43
|
+
children?: MenuItem[] | undefined
|
|
44
|
+
external?: boolean
|
|
45
|
+
expanded?: boolean
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export {}
|
|
@@ -328,33 +328,30 @@ body.q-scroll--lock .q-page > .q-scroll--anchor {
|
|
|
328
328
|
overflow-anchor: auto;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
//
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
356
|
-
background: $brand-primary;
|
|
357
|
-
}
|
|
331
|
+
// makes the scroll bar look better for the drop-down menus in the header
|
|
332
|
+
::-webkit-scrollbar {
|
|
333
|
+
height: 12px;
|
|
334
|
+
width: 14px;
|
|
335
|
+
background: transparent;
|
|
336
|
+
z-index: 12;
|
|
337
|
+
overflow: visible;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
::-webkit-scrollbar-thumb {
|
|
341
|
+
width: 10px;
|
|
342
|
+
background-color: $brand-primary;
|
|
343
|
+
border-radius: 10px;
|
|
344
|
+
z-index: 12;
|
|
345
|
+
border: 4px solid rgba(0, 0, 0, 0);
|
|
346
|
+
background-clip: padding-box;
|
|
347
|
+
transition: background-color $header-quick-transition;
|
|
348
|
+
margin: 4px;
|
|
349
|
+
min-height: 32px;
|
|
350
|
+
min-width: 32px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
::-webkit-scrollbar-thumb:hover {
|
|
354
|
+
background: $brand-primary;
|
|
358
355
|
}
|
|
359
356
|
|
|
360
357
|
.shadow-bottom {
|
|
@@ -94,7 +94,6 @@ import { useRoute } from 'vue-router'
|
|
|
94
94
|
import { mdiPencil, mdiFlash, mdiLaunch } from '@quasar/extras/mdi-v7'
|
|
95
95
|
|
|
96
96
|
import type { NavItem, RelatedItem } from '@md-plugins/vite-md-plugin'
|
|
97
|
-
import type { TocItem } from '@md-plugins/md-plugin-headers'
|
|
98
97
|
import MarkdownLink from '../components/MarkdownLink.vue'
|
|
99
98
|
import MarkdownPageToc from './MarkdownPageToc.vue'
|
|
100
99
|
|
|
@@ -129,7 +128,7 @@ const props = defineProps({
|
|
|
129
128
|
},
|
|
130
129
|
|
|
131
130
|
toc: {
|
|
132
|
-
type: Array<
|
|
131
|
+
type: Array<TocMenuItem>,
|
|
133
132
|
default: () => [],
|
|
134
133
|
},
|
|
135
134
|
related: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineStore, acceptHMRUpdate } from 'pinia'
|
|
2
2
|
import { useRoute } from 'vue-router'
|
|
3
3
|
import { useScroll } from '../composables/scroll'
|
|
4
|
-
import type { TocItem } from '@md-plugins/md-plugin-headers'
|
|
5
4
|
|
|
6
5
|
export const useMarkdownStore = defineStore('markdown-store', {
|
|
7
6
|
state: () => ({
|
|
@@ -60,7 +59,7 @@ export const useMarkdownStore = defineStore('markdown-store', {
|
|
|
60
59
|
}
|
|
61
60
|
},
|
|
62
61
|
|
|
63
|
-
setToc(toc:
|
|
62
|
+
setToc(toc: TocMenuItem[]) {
|
|
64
63
|
const { scrollTo } = useScroll()
|
|
65
64
|
this.toc =
|
|
66
65
|
toc !== void 0
|
|
@@ -21,7 +21,7 @@ Markdown Plugins are a set of tools and extensions designed to enhance the funct
|
|
|
21
21
|
- **Title Extraction**: Extract the first header in Markdown as the page title.
|
|
22
22
|
- **Script Imports**: Extract and process **<script import>** blocks from Markdown.
|
|
23
23
|
- **Code Block Enhancements**: Enhance code block rendering with syntax highlighting, tabs, and more.
|
|
24
|
-
- **Custom Styling**: Apply custom styles to your Markdown content for a more
|
|
24
|
+
- **Custom Styling**: Apply custom styles to your Markdown content for a more refined look.
|
|
25
25
|
- **Integration**: Easily integrate with other tools and platforms to streamline your workflow.
|
|
26
26
|
|
|
27
27
|
## Why Use Markdown Plugins?
|
|
@@ -48,7 +48,7 @@ Here are some examples of what you can achieve with Markdown Plugins:
|
|
|
48
48
|
|
|
49
49
|
- **Custom Syntax**: Add custom syntax for specific use cases.
|
|
50
50
|
- **Enhanced Components**: Embed interactive and enhanced components.
|
|
51
|
-
- **Custom Styling**: Apply custom styles to your content for a
|
|
51
|
+
- **Custom Styling**: Apply custom styles to your content for a refined look.
|
|
52
52
|
- **Frontmatter Support**: Extract and process frontmatter content from your Markdown files.
|
|
53
53
|
- **Header Management**: Extract and process headers for generating ToCs or managing headers.
|
|
54
54
|
- **Inline Code Styling**: Add custom classes to inline code blocks for styling.
|
|
@@ -7,16 +7,16 @@ related:
|
|
|
7
7
|
- vite-plugins/vite-md-plugin/overview
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
The `0.1.0` beta line moves MD-Plugins and Q-Press to the Quasar CLI Vite 3 beta toolchain. It is the right version to use when your Quasar application is being upgraded to `@quasar/app-vite` `>=3.0.0-beta.
|
|
10
|
+
The `0.1.0` beta line moves MD-Plugins and Q-Press to the Quasar CLI Vite 3 beta toolchain. It is the right version to use when your Quasar application is being upgraded to `@quasar/app-vite` `>=3.0.0-beta.26`.
|
|
11
11
|
|
|
12
12
|
::: warning
|
|
13
|
-
Q-Press and the Quasar app extensions now target Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.
|
|
13
|
+
Q-Press and the Quasar app extensions now target Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.26`. They are not intended for Webpack projects or JavaScript-only Quasar projects.
|
|
14
14
|
:::
|
|
15
15
|
|
|
16
16
|
## Before You Upgrade
|
|
17
17
|
|
|
18
18
|
- Make sure your app is already on a Quasar Vite setup.
|
|
19
|
-
- Upgrade the app to `@quasar/app-vite` `>=3.0.0-beta.
|
|
19
|
+
- Upgrade the app to `@quasar/app-vite` `>=3.0.0-beta.26`.
|
|
20
20
|
- Use TypeScript in the consuming Quasar project.
|
|
21
21
|
- Import `defineConfig` in `quasar.config.ts` directly from `@quasar/app-vite`.
|
|
22
22
|
- Use `/// <reference types="@quasar/app-vite/client" />` in `src/env.d.ts`.
|
|
@@ -39,15 +39,9 @@ For direct Vite plugin usage, update the packages you consume:
|
|
|
39
39
|
pnpm up @md-plugins/vite-md-plugin@beta @md-plugins/vite-examples-plugin@beta
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## Q-Press Type Globals
|
|
43
43
|
|
|
44
|
-
Q-Press
|
|
45
|
-
|
|
46
|
-
```text
|
|
47
|
-
src/q-press.globals.d.ts
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
If your project still references `src/q-press.global.d.ts`, rename the reference to the plural `globals` filename.
|
|
44
|
+
Q-Press now provides its shared Markdown, menu and `ImportMeta` globals directly from the app extension package. After upgrading to this release line and running `quasar prepare`, projects no longer need to keep a local `src/q-press.globals.d.ts` file.
|
|
51
45
|
|
|
52
46
|
## Environment Variable Changes
|
|
53
47
|
|
|
@@ -6,7 +6,7 @@ desc: Q-Press App-Extension for Quasar.
|
|
|
6
6
|
The Q-Press App Extension is a powerful tool for Quasar developers that simplifies the integration of Markdown content into Quasar applications. It leverages the capabilities of Vite and various Markdown plugins to transform Markdown files into Vue components, enabling a seamless and efficient workflow for content management.
|
|
7
7
|
|
|
8
8
|
::: warning
|
|
9
|
-
Q-Press is for Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.
|
|
9
|
+
Q-Press is for Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.26` at this time. TypeScript processing is also required. Do not use if you are using Webpack or have a JavaScript-only project.
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
::: tip
|
|
@@ -33,14 +33,12 @@ quasar ext add @md-plugins/q-press
|
|
|
33
33
|
|
|
34
34
|
- **New Install:**
|
|
35
35
|
- `src/.q-press`
|
|
36
|
-
- `src/q-press.globals.d.ts`
|
|
37
36
|
- `src/components`
|
|
38
37
|
- `src/markdown`
|
|
39
38
|
- `src/examples`
|
|
40
39
|
- `src/siteConfig`
|
|
41
40
|
- **Update Install:**
|
|
42
41
|
- `src/.q-press`
|
|
43
|
-
- `src/q-press.globals.d.ts`
|
|
44
42
|
|
|
45
43
|
### Additional Dependencies
|
|
46
44
|
|
|
@@ -311,7 +309,7 @@ If you don't have a `.prettierignore` file, create one in the root of your proje
|
|
|
311
309
|
|
|
312
310
|
## Updating
|
|
313
311
|
|
|
314
|
-
When you update, only the `src/.q-press` folder will be updated
|
|
312
|
+
When you update, only the `src/.q-press` folder will be updated. If you want to re-install everything, just remove the `src/siteConfig` folder.
|
|
315
313
|
|
|
316
314
|
To make it easier to update, you can use the following command:
|
|
317
315
|
|
package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md
CHANGED
|
@@ -9,7 +9,7 @@ related:
|
|
|
9
9
|
The `viteMdPluginAppExt` is a [Quasar App Extension](https://quasar.dev/app-extensions/introduction) that integrates the `viteMdPlugin` into your Quasar project. This extension allows you to use Markdown files as Vue components, enabling a seamless integration of Markdown content into your Quasar application.
|
|
10
10
|
|
|
11
11
|
::: warning
|
|
12
|
-
This app extension targets Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.
|
|
12
|
+
This app extension targets Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.26`.
|
|
13
13
|
:::
|
|
14
14
|
|
|
15
15
|
## Key Features
|
|
@@ -328,33 +328,30 @@ body.q-scroll--lock .q-page > .q-scroll--anchor {
|
|
|
328
328
|
overflow-anchor: auto;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
//
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
356
|
-
background: $brand-primary;
|
|
357
|
-
}
|
|
331
|
+
// makes the scroll bar look better for the drop-down menus in the header
|
|
332
|
+
::-webkit-scrollbar {
|
|
333
|
+
height: 12px;
|
|
334
|
+
width: 14px;
|
|
335
|
+
background: transparent;
|
|
336
|
+
z-index: 12;
|
|
337
|
+
overflow: visible;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
::-webkit-scrollbar-thumb {
|
|
341
|
+
width: 10px;
|
|
342
|
+
background-color: $brand-primary;
|
|
343
|
+
border-radius: 10px;
|
|
344
|
+
z-index: 12;
|
|
345
|
+
border: 4px solid rgba(0, 0, 0, 0);
|
|
346
|
+
background-clip: padding-box;
|
|
347
|
+
transition: background-color $header-quick-transition;
|
|
348
|
+
margin: 4px;
|
|
349
|
+
min-height: 32px;
|
|
350
|
+
min-width: 32px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
::-webkit-scrollbar-thumb:hover {
|
|
354
|
+
background: $brand-primary;
|
|
358
355
|
}
|
|
359
356
|
|
|
360
357
|
.shadow-bottom {
|
|
@@ -94,7 +94,6 @@ import { useRoute } from 'vue-router'
|
|
|
94
94
|
import { mdiPencil, mdiFlash, mdiLaunch } from '@quasar/extras/mdi-v7'
|
|
95
95
|
|
|
96
96
|
import type { NavItem, RelatedItem } from '@md-plugins/vite-md-plugin'
|
|
97
|
-
import type { TocItem } from '@md-plugins/md-plugin-headers'
|
|
98
97
|
import MarkdownLink from '../components/MarkdownLink.vue'
|
|
99
98
|
import MarkdownPageToc from './MarkdownPageToc.vue'
|
|
100
99
|
|
|
@@ -129,7 +128,7 @@ const props = defineProps({
|
|
|
129
128
|
},
|
|
130
129
|
|
|
131
130
|
toc: {
|
|
132
|
-
type: Array<
|
|
131
|
+
type: Array<TocMenuItem>,
|
|
133
132
|
default: () => [],
|
|
134
133
|
},
|
|
135
134
|
related: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineStore, acceptHMRUpdate } from 'pinia'
|
|
2
2
|
import { useRoute } from 'vue-router'
|
|
3
3
|
import { useScroll } from '../composables/scroll'
|
|
4
|
-
import type { TocItem } from '@md-plugins/md-plugin-headers'
|
|
5
4
|
|
|
6
5
|
export const useMarkdownStore = defineStore('markdown-store', {
|
|
7
6
|
state: () => ({
|
|
@@ -60,7 +59,7 @@ export const useMarkdownStore = defineStore('markdown-store', {
|
|
|
60
59
|
}
|
|
61
60
|
},
|
|
62
61
|
|
|
63
|
-
setToc(toc:
|
|
62
|
+
setToc(toc: TocMenuItem[]) {
|
|
64
63
|
const { scrollTo } = useScroll()
|
|
65
64
|
this.toc =
|
|
66
65
|
toc !== void 0
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
declare module '*.md'
|
|
2
|
-
|
|
3
|
-
// Define types for headers
|
|
4
|
-
interface TocMenuItem {
|
|
5
|
-
id: string
|
|
6
|
-
level: number
|
|
7
|
-
title: string
|
|
8
|
-
link?: string
|
|
9
|
-
deep?: boolean
|
|
10
|
-
sub?: boolean
|
|
11
|
-
onClick?: () => void
|
|
12
|
-
children?: TocMenuItem[]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Define types for Markdown modules
|
|
16
|
-
interface MarkdownModule {
|
|
17
|
-
title?: string
|
|
18
|
-
headers?: TocMenuItem[]
|
|
19
|
-
frontmatter?: Record<string, unknown>
|
|
20
|
-
filename?: string
|
|
21
|
-
render: (..._args: unknown[]) => unknown
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Define types for menu items
|
|
25
|
-
interface MenuItem {
|
|
26
|
-
name: string
|
|
27
|
-
path?: string
|
|
28
|
-
icon?: string
|
|
29
|
-
iconColor?: string
|
|
30
|
-
rightIcon?: string
|
|
31
|
-
rightIconColor?: string
|
|
32
|
-
badge?: string
|
|
33
|
-
children?: MenuItem[] | undefined
|
|
34
|
-
external?: boolean
|
|
35
|
-
expanded?: boolean
|
|
36
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
declare module '*.md'
|
|
2
|
-
|
|
3
|
-
// Define types for headers
|
|
4
|
-
interface TocMenuItem {
|
|
5
|
-
id: string
|
|
6
|
-
level: number
|
|
7
|
-
title: string
|
|
8
|
-
link?: string
|
|
9
|
-
deep?: boolean
|
|
10
|
-
sub?: boolean
|
|
11
|
-
onClick?: () => void
|
|
12
|
-
children?: TocMenuItem[]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Define types for Markdown modules
|
|
16
|
-
interface MarkdownModule {
|
|
17
|
-
title?: string
|
|
18
|
-
headers?: TocMenuItem[]
|
|
19
|
-
frontmatter?: Record<string, unknown>
|
|
20
|
-
filename?: string
|
|
21
|
-
render: (..._args: unknown[]) => unknown
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Define types for menu items
|
|
25
|
-
interface MenuItem {
|
|
26
|
-
name: string
|
|
27
|
-
path?: string
|
|
28
|
-
icon?: string
|
|
29
|
-
iconColor?: string
|
|
30
|
-
rightIcon?: string
|
|
31
|
-
rightIconColor?: string
|
|
32
|
-
badge?: string
|
|
33
|
-
children?: MenuItem[] | undefined
|
|
34
|
-
external?: boolean
|
|
35
|
-
expanded?: boolean
|
|
36
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
declare module '*.md'
|
|
2
|
-
|
|
3
|
-
// Define types for headers
|
|
4
|
-
interface TocMenuItem {
|
|
5
|
-
id: string
|
|
6
|
-
level: number
|
|
7
|
-
title: string
|
|
8
|
-
link?: string
|
|
9
|
-
deep?: boolean
|
|
10
|
-
sub?: boolean
|
|
11
|
-
onClick?: () => void
|
|
12
|
-
children?: TocMenuItem[]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Define types for Markdown modules
|
|
16
|
-
interface MarkdownModule {
|
|
17
|
-
title?: string
|
|
18
|
-
headers?: TocMenuItem[]
|
|
19
|
-
frontmatter?: Record<string, unknown>
|
|
20
|
-
filename?: string
|
|
21
|
-
render: (..._args: unknown[]) => unknown
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Define types for menu items
|
|
25
|
-
interface MenuItem {
|
|
26
|
-
name: string
|
|
27
|
-
path?: string
|
|
28
|
-
icon?: string
|
|
29
|
-
iconColor?: string
|
|
30
|
-
rightIcon?: string
|
|
31
|
-
rightIconColor?: string
|
|
32
|
-
badge?: string
|
|
33
|
-
children?: MenuItem[] | undefined
|
|
34
|
-
external?: boolean
|
|
35
|
-
expanded?: boolean
|
|
36
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
declare module '*.md'
|
|
2
|
-
|
|
3
|
-
// Define types for headers
|
|
4
|
-
interface TocMenuItem {
|
|
5
|
-
id: string
|
|
6
|
-
level: number
|
|
7
|
-
title: string
|
|
8
|
-
link?: string
|
|
9
|
-
deep?: boolean
|
|
10
|
-
sub?: boolean
|
|
11
|
-
onClick?: () => void
|
|
12
|
-
children?: TocMenuItem[]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Define types for Markdown modules
|
|
16
|
-
interface MarkdownModule {
|
|
17
|
-
title?: string
|
|
18
|
-
headers?: TocMenuItem[]
|
|
19
|
-
frontmatter?: Record<string, unknown>
|
|
20
|
-
filename?: string
|
|
21
|
-
render: (..._args: unknown[]) => unknown
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Define types for menu items
|
|
25
|
-
interface MenuItem {
|
|
26
|
-
name: string
|
|
27
|
-
path?: string
|
|
28
|
-
icon?: string
|
|
29
|
-
iconColor?: string
|
|
30
|
-
rightIcon?: string
|
|
31
|
-
rightIconColor?: string
|
|
32
|
-
badge?: string
|
|
33
|
-
children?: MenuItem[] | undefined
|
|
34
|
-
external?: boolean
|
|
35
|
-
expanded?: boolean
|
|
36
|
-
}
|