@valaxyjs/devtools 0.22.3 → 0.22.5-beta.4
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 +13 -0
- package/dist/client/assets/{about-DG1GsLHQ.js → about-YZW2X-7U.js} +1 -2
- package/dist/client/assets/{categories-Bm7oRFJy.js → categories-DjKct1de.js} +1 -2
- package/dist/client/assets/en-DQc-k8eq.js +13 -0
- package/dist/client/assets/index-60_bCGDF.css +428 -0
- package/dist/client/assets/index-B_Bc_zX6.js +8909 -0
- package/dist/client/assets/index-Clg7HLhF.js +22396 -0
- package/dist/client/assets/index-DKnSvpEK.css +7 -0
- package/dist/client/assets/{migration-CLNK0vJL.js → migration-BXXS7zuk.js} +2 -2
- package/dist/client/assets/{splitpanes.es-C0nkbxNz.js → splitpanes.es-B_iwNZlc.js} +1 -1
- package/dist/client/assets/{tags-hRXnGE0o.js → tags-DyKgUFNV.js} +1 -2
- package/dist/client/assets/zh-CN-DrQHTX9V.js +32 -0
- package/dist/client/index.html +2 -2
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +100 -37
- package/package.json +21 -5
- package/rpc.d.ts +21 -0
- package/build.config.ts +0 -20
- package/dist/client/assets/_plugin-vue_export-helper-DgDhiqFL.js +0 -11
- package/dist/client/assets/index-BsE069b2.css +0 -61
- package/dist/client/assets/index-CGiiZwdq.css +0 -396
- package/dist/client/assets/index-DERgnaDy.js +0 -8572
- package/dist/client/assets/index-DjRUnZlz.js +0 -830
- package/src/client/App.vue +0 -20
- package/src/client/components/PageFrontmatter.vue +0 -67
- package/src/client/components/PostPanel.vue +0 -22
- package/src/client/components/VDHeader.vue +0 -57
- package/src/client/components/VDPostCategories.vue +0 -26
- package/src/client/components/VDPostList.vue +0 -31
- package/src/client/components/VDTag.vue +0 -9
- package/src/client/components.d.ts +0 -66
- package/src/client/composables/app.ts +0 -10
- package/src/client/index.html +0 -32
- package/src/client/main.ts +0 -37
- package/src/client/pages/about.vue +0 -5
- package/src/client/pages/categories.vue +0 -5
- package/src/client/pages/index.vue +0 -21
- package/src/client/pages/migration.vue +0 -73
- package/src/client/pages/tags.vue +0 -5
- package/src/client/shims.d.ts +0 -12
- package/src/client/styles/index.css +0 -8
- package/src/client/typed-routes.d.ts +0 -27
- package/src/client/types/index.ts +0 -3
- package/src/client/utils/api.ts +0 -18
- package/src/client/utils/get.ts +0 -25
- package/src/client/utils/index.ts +0 -5
- package/src/client/utils/init.ts +0 -27
- package/src/client/vite.config.ts +0 -87
- package/src/dir.ts +0 -10
- package/src/index.ts +0 -2
- package/src/node/README.md +0 -3
- package/src/node/api/index.ts +0 -82
- package/src/node/index.ts +0 -74
- package/src/node/types.ts +0 -4
- package/tsconfig.json +0 -26
package/src/client/App.vue
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { onMounted } from 'vue'
|
|
3
|
-
import VDHeader from './components/VDHeader.vue'
|
|
4
|
-
import { initDevtoolsClient } from './utils'
|
|
5
|
-
|
|
6
|
-
onMounted(() => {
|
|
7
|
-
initDevtoolsClient()
|
|
8
|
-
})
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<main class="h-full" flex="~ col" text="gray-700 dark:gray-200">
|
|
13
|
-
<VDHeader />
|
|
14
|
-
<!-- <RouterLink to="/about">About</RouterLink> -->
|
|
15
|
-
|
|
16
|
-
<div style="height: calc(100% - 32px)" overflow="auto">
|
|
17
|
-
<RouterView />
|
|
18
|
-
</div>
|
|
19
|
-
</main>
|
|
20
|
-
</template>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { PostFrontMatter } from 'valaxy'
|
|
3
|
-
import axios from 'axios'
|
|
4
|
-
|
|
5
|
-
import consola from 'consola'
|
|
6
|
-
import { ref, toRaw } from 'vue'
|
|
7
|
-
import { activePath, pageData } from '../composables/app'
|
|
8
|
-
|
|
9
|
-
const props = defineProps<{
|
|
10
|
-
frontmatter: PostFrontMatter
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
const newFm = ref<PostFrontMatter>(props.frontmatter)
|
|
14
|
-
async function saveNewFm() {
|
|
15
|
-
// const data = await fetch('/valaxy-devtools-api/frontmatter', {
|
|
16
|
-
// method: 'POST',
|
|
17
|
-
// // body: JSON.stringify(toRaw(newFm.value)),
|
|
18
|
-
// })
|
|
19
|
-
|
|
20
|
-
const res = await axios.post('/valaxy-devtools-api/frontmatter', {
|
|
21
|
-
path: activePath.value,
|
|
22
|
-
pageData: pageData.value,
|
|
23
|
-
frontmatter: toRaw(newFm.value),
|
|
24
|
-
})
|
|
25
|
-
if (res)
|
|
26
|
-
consola.success('Frontmatter saved')
|
|
27
|
-
|
|
28
|
-
// console.log(res)
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<template>
|
|
33
|
-
<div>
|
|
34
|
-
<ul v-if="frontmatter">
|
|
35
|
-
<li v-for="(value, key) in frontmatter" :key="key">
|
|
36
|
-
<strong>{{ key }}</strong>
|
|
37
|
-
<span mr-1>:</span>
|
|
38
|
-
|
|
39
|
-
<template v-if="key === 'tags'">
|
|
40
|
-
<VDTag v-for="tag in value" :key="tag">
|
|
41
|
-
{{ tag }}
|
|
42
|
-
</VDTag>
|
|
43
|
-
</template>
|
|
44
|
-
<template v-else-if="key === 'categories'">
|
|
45
|
-
<VDPostCategories :categories="value" />
|
|
46
|
-
</template>
|
|
47
|
-
<template v-else-if="key === 'encryptedContent'">
|
|
48
|
-
[Encrypted]
|
|
49
|
-
</template>
|
|
50
|
-
<template v-else-if="key === 'partiallyEncryptedContents'">
|
|
51
|
-
[Partially Encrypted]
|
|
52
|
-
</template>
|
|
53
|
-
<template v-else-if="key === 'title'">
|
|
54
|
-
<!-- eslint-disable-next-line vue/no-mutating-props -->
|
|
55
|
-
<AGUIInput v-model="newFm.title" />
|
|
56
|
-
</template>
|
|
57
|
-
<template v-else>
|
|
58
|
-
{{ value }}
|
|
59
|
-
</template>
|
|
60
|
-
</li>
|
|
61
|
-
</ul>
|
|
62
|
-
|
|
63
|
-
<AGUIButton @click="saveNewFm">
|
|
64
|
-
Save Frontmatter
|
|
65
|
-
</AGUIButton>
|
|
66
|
-
</div>
|
|
67
|
-
</template>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { frontmatter } from '../composables/app'
|
|
3
|
-
import { getWindowProperty, openInEditor } from '../utils'
|
|
4
|
-
|
|
5
|
-
function launchEditor() {
|
|
6
|
-
openInEditor({
|
|
7
|
-
file: getWindowProperty('$pageData').path,
|
|
8
|
-
})
|
|
9
|
-
}
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<div p="2">
|
|
14
|
-
<div class="flex" gap="2" py-2>
|
|
15
|
-
<button class="text-xs shadow transition hover:shadow-lg p-2" @click="launchEditor()">
|
|
16
|
-
<div i-vscode-icons:file-type-vscode />
|
|
17
|
-
</button>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<PageFrontmatter v-if="frontmatter" :frontmatter="frontmatter" />
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useRoute } from 'vue-router'
|
|
3
|
-
|
|
4
|
-
const route = useRoute()
|
|
5
|
-
const routeMenus = [
|
|
6
|
-
{
|
|
7
|
-
to: '/',
|
|
8
|
-
opened: 'i-vscode-icons:folder-type-route-opened',
|
|
9
|
-
closed: 'i-vscode-icons:folder-type-route',
|
|
10
|
-
},
|
|
11
|
-
// {
|
|
12
|
-
// to: '/categories',
|
|
13
|
-
// opened: 'i-vscode-icons:folder-type-route-opened',
|
|
14
|
-
// closed: 'i-vscode-icons:folder-type-route',
|
|
15
|
-
// },
|
|
16
|
-
// {
|
|
17
|
-
// to: '/tags',
|
|
18
|
-
// opened: 'i-vscode-icons:folder-type-route-opened',
|
|
19
|
-
// closed: 'i-vscode-icons:folder-type-route',
|
|
20
|
-
// },
|
|
21
|
-
{
|
|
22
|
-
to: '/migration',
|
|
23
|
-
opened: 'i-vscode-icons:folder-type-tools-opened',
|
|
24
|
-
closed: 'i-vscode-icons:folder-type-tools',
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<template>
|
|
30
|
-
<div
|
|
31
|
-
class="w-full border-b shadow flex justify-end" dark="border-b-black"
|
|
32
|
-
flex="~"
|
|
33
|
-
>
|
|
34
|
-
<RouterLink
|
|
35
|
-
v-for="menu in routeMenus"
|
|
36
|
-
:key="menu.to"
|
|
37
|
-
class=" dark:bg-gray-900 inline-flex justify-center items-center w-8 h-8 hover:bg-gray-100 dark:hover:bg-gray-800"
|
|
38
|
-
:class="{
|
|
39
|
-
'bg-gray-200 dark:bg-gray-800': route.path === menu.to,
|
|
40
|
-
'bg-white': route.path !== menu.to,
|
|
41
|
-
}"
|
|
42
|
-
:to="menu.to"
|
|
43
|
-
>
|
|
44
|
-
<div v-if="route.path === menu.to" :class="menu.opened" />
|
|
45
|
-
<div v-else :class="menu.closed" />
|
|
46
|
-
</RouterLink>
|
|
47
|
-
|
|
48
|
-
<div flex="1" />
|
|
49
|
-
|
|
50
|
-
<a
|
|
51
|
-
href="https://valaxy.site" target="_blank"
|
|
52
|
-
class="bg-white dark:bg-gray-900 inline-flex justify-center items-center w-8 h-8 hover:bg-gray-200"
|
|
53
|
-
>
|
|
54
|
-
<div i-ri-book-line />
|
|
55
|
-
</a>
|
|
56
|
-
</div>
|
|
57
|
-
</template>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { Post } from 'valaxy'
|
|
3
|
-
|
|
4
|
-
defineProps<{
|
|
5
|
-
categories: Post['categories']
|
|
6
|
-
}>()
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<RouterLink
|
|
11
|
-
:to="{
|
|
12
|
-
path: '/categories',
|
|
13
|
-
query: { category: Array.isArray(categories) ? categories.join('/') : categories },
|
|
14
|
-
}"
|
|
15
|
-
class="post-category transition text-xs hover:(text-blue-500 border-blue-500)"
|
|
16
|
-
px-2 py-1
|
|
17
|
-
border rounded-full
|
|
18
|
-
inline-flex justify-center items-center
|
|
19
|
-
bg="hover:(blue-500 opacity-10)"
|
|
20
|
-
>
|
|
21
|
-
<div m="x-1" inline-flex i-ri-folder-2-line />
|
|
22
|
-
<span>
|
|
23
|
-
{{ Array.isArray(categories) ? categories.join(' > ') : categories }}
|
|
24
|
-
</span>
|
|
25
|
-
</RouterLink>
|
|
26
|
-
</template>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { onMounted, ref } from 'vue'
|
|
3
|
-
import { activePath, devtoolsRouter } from '../composables/app'
|
|
4
|
-
import { getGlobalValaxyProperty } from '../utils'
|
|
5
|
-
|
|
6
|
-
const postList = ref()
|
|
7
|
-
|
|
8
|
-
onMounted(() => {
|
|
9
|
-
postList.value = getGlobalValaxyProperty('postList').value
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
function onClickPost(post: any) {
|
|
13
|
-
devtoolsRouter.value?.push(post.path)
|
|
14
|
-
}
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<ul class="h-full" overflow="auto" pl="12" pr="4" py="4">
|
|
19
|
-
<li v-for="post in postList" :key="post.path" class="list-decimal">
|
|
20
|
-
<div flex>
|
|
21
|
-
<span
|
|
22
|
-
class="inline-flex flex-grow cursor-pointer hover:text-blue-500 text-xs"
|
|
23
|
-
:class="{ 'text-blue-500': activePath === post.path }"
|
|
24
|
-
@click="onClickPost(post)"
|
|
25
|
-
>
|
|
26
|
-
{{ post.title }}
|
|
27
|
-
</span>
|
|
28
|
-
</div>
|
|
29
|
-
</li>
|
|
30
|
-
</ul>
|
|
31
|
-
</template>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
// Generated by unplugin-vue-components
|
|
4
|
-
// Read more: https://github.com/vuejs/core/pull/3399
|
|
5
|
-
export {}
|
|
6
|
-
|
|
7
|
-
/* prettier-ignore */
|
|
8
|
-
declare module 'vue' {
|
|
9
|
-
export interface GlobalComponents {
|
|
10
|
-
AGUIAccordion: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/accordion/AGUIAccordion.vue')['default']
|
|
11
|
-
AGUIAccordionItem: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/accordion/AGUIAccordionItem.vue')['default']
|
|
12
|
-
AGUIApp: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUIApp.vue')['default']
|
|
13
|
-
AGUIAssetsExplorer: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/explorer/AGUIAssetsExplorer.vue')['default']
|
|
14
|
-
AGUIBreadcrumb: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/breadcrumb/AGUIBreadcrumb.vue')['default']
|
|
15
|
-
AGUIButton: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/button/AGUIButton.vue')['default']
|
|
16
|
-
AGUICheckbox: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUICheckbox.vue')['default']
|
|
17
|
-
AGUIColorPicker: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUIColorPicker.vue')['default']
|
|
18
|
-
AGUIContextMenu: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/context-menu/AGUIContextMenu.vue')['default']
|
|
19
|
-
AGUIContextMenuItem: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/context-menu/AGUIContextMenuItem.vue')['default']
|
|
20
|
-
AGUIDetails: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUIDetails.vue')['default']
|
|
21
|
-
AGUIExplorerControls: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/explorer/AGUIExplorerControls.vue')['default']
|
|
22
|
-
AGUIFileHandler: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/file/AGUIFileHandler.vue')['default']
|
|
23
|
-
AGUIFileItem: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/explorer/AGUIFileItem.vue')['default']
|
|
24
|
-
AGUIFileList: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/explorer/AGUIFileList.vue')['default']
|
|
25
|
-
AGUIForm: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/form/AGUIForm.vue')['default']
|
|
26
|
-
AGUIFormItem: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/form/AGUIFormItem.vue')['default']
|
|
27
|
-
AGUIHr: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/common/AGUIHr.vue')['default']
|
|
28
|
-
AGUIIcon: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/icon/AGUIIcon.vue')['default']
|
|
29
|
-
AGUIIconButton: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/button/AGUIIconButton.vue')['default']
|
|
30
|
-
AGUIInnerInput: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/input/AGUIInnerInput.vue')['default']
|
|
31
|
-
AGUIInput: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/input/AGUIInput.vue')['default']
|
|
32
|
-
AGUIInputNumber: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/input/AGUIInputNumber.vue')['default']
|
|
33
|
-
AGUIInputVector: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/input/AGUIInputVector.vue')['default']
|
|
34
|
-
AGUILayout: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/layout/AGUILayout.vue')['default']
|
|
35
|
-
AGUIMenubar: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/menu/AGUIMenubar.vue')['default']
|
|
36
|
-
AGUIMenubarMenu: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/menu/AGUIMenubarMenu.vue')['default']
|
|
37
|
-
AGUINumberField: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUINumberField.vue')['default']
|
|
38
|
-
AGUINumberSlider: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUINumberSlider.vue')['default']
|
|
39
|
-
AGUIOpenDirectory: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/explorer/AGUIOpenDirectory.vue')['default']
|
|
40
|
-
AGUIOverlay: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUIOverlay.vue')['default']
|
|
41
|
-
AGUIPanel: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUIPanel.vue')['default']
|
|
42
|
-
AGUIPropertiesForm: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/panel/AGUIPropertiesForm.vue')['default']
|
|
43
|
-
AGUIPropertiesPanel: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/panel/AGUIPropertiesPanel.vue')['default']
|
|
44
|
-
AGUIProperty: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUIProperty.vue')['default']
|
|
45
|
-
AGUISelect: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/select/AGUISelect.vue')['default']
|
|
46
|
-
AGUISlider: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/AGUISlider.vue')['default']
|
|
47
|
-
AGUITabPanel: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/tabs/AGUITabPanel.vue')['default']
|
|
48
|
-
AGUITabs: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/tabs/AGUITabs.vue')['default']
|
|
49
|
-
AGUITextarea: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/textarea/AGUITextarea.vue')['default']
|
|
50
|
-
AGUIToast: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/toast/AGUIToast.vue')['default']
|
|
51
|
-
AGUIToggleIcon: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/button/AGUIToggleIcon.vue')['default']
|
|
52
|
-
AGUIToolbar: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/toolbar/AGUIToolbar.vue')['default']
|
|
53
|
-
AGUITree: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/tree/AGUITree.vue')['default']
|
|
54
|
-
AGUITreeNode: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/tree/AGUITreeNode.vue')['default']
|
|
55
|
-
BIconChevronLeft: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/icons/BIconChevronLeft.vue')['default']
|
|
56
|
-
BIconChevronRight: typeof import('./../../../../node_modules/.pnpm/@advjs+gui@0.0.7-beta.1_vue@3.5.13_typescript@5.6.3_/node_modules/@advjs/gui/client/components/icons/BIconChevronRight.vue')['default']
|
|
57
|
-
PageFrontmatter: typeof import('./components/PageFrontmatter.vue')['default']
|
|
58
|
-
PostPanel: typeof import('./components/PostPanel.vue')['default']
|
|
59
|
-
RouterLink: typeof import('vue-router')['RouterLink']
|
|
60
|
-
RouterView: typeof import('vue-router')['RouterView']
|
|
61
|
-
VDHeader: typeof import('./components/VDHeader.vue')['default']
|
|
62
|
-
VDPostCategories: typeof import('./components/VDPostCategories.vue')['default']
|
|
63
|
-
VDPostList: typeof import('./components/VDPostList.vue')['default']
|
|
64
|
-
VDTag: typeof import('./components/VDTag.vue')['default']
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PageData, PostFrontMatter } from 'valaxy'
|
|
2
|
-
import type { Router } from 'vue-router'
|
|
3
|
-
|
|
4
|
-
import { ref } from 'vue'
|
|
5
|
-
|
|
6
|
-
export const devtoolsRouter = ref<Router>()
|
|
7
|
-
export const activePath = ref('')
|
|
8
|
-
|
|
9
|
-
export const frontmatter = ref<PostFrontMatter>()
|
|
10
|
-
export const pageData = ref<PageData>()
|
package/src/client/index.html
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
|
8
|
-
<title>Valaxy Devtools</title>
|
|
9
|
-
<script>
|
|
10
|
-
;(function () {
|
|
11
|
-
const prefersDark =
|
|
12
|
-
window.matchMedia &&
|
|
13
|
-
window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
14
|
-
const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
|
|
15
|
-
if (setting === 'dark' || (prefersDark && setting !== 'light'))
|
|
16
|
-
document.documentElement.classList.toggle('dark', true)
|
|
17
|
-
})()
|
|
18
|
-
</script>
|
|
19
|
-
</head>
|
|
20
|
-
|
|
21
|
-
<body data-vite-inspect-mode="DEV">
|
|
22
|
-
<div id="app" class="h-full"></div>
|
|
23
|
-
<script>
|
|
24
|
-
;(function () {
|
|
25
|
-
if (!location.pathname.endsWith('/'))
|
|
26
|
-
location.pathname += '/'
|
|
27
|
-
})()
|
|
28
|
-
</script>
|
|
29
|
-
<script type="module" src="/main.ts"></script>
|
|
30
|
-
</body>
|
|
31
|
-
|
|
32
|
-
</html>
|
package/src/client/main.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// register vue composition api globally
|
|
2
|
-
import { createApp, ref } from 'vue'
|
|
3
|
-
|
|
4
|
-
import { createRouter, createWebHashHistory } from 'vue-router'
|
|
5
|
-
import { handleHotUpdate, routes } from 'vue-router/auto-routes'
|
|
6
|
-
import App from './App.vue'
|
|
7
|
-
|
|
8
|
-
import '@unocss/reset/tailwind.css'
|
|
9
|
-
import 'uno.css'
|
|
10
|
-
|
|
11
|
-
import './styles/index.css'
|
|
12
|
-
import 'splitpanes/dist/splitpanes.css'
|
|
13
|
-
|
|
14
|
-
const app = createApp(App)
|
|
15
|
-
|
|
16
|
-
const router = createRouter({
|
|
17
|
-
history: createWebHashHistory(),
|
|
18
|
-
routes,
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
if (import.meta.env.DEV) {
|
|
22
|
-
window.__VUE_DEVTOOLS_ROUTER__ = router
|
|
23
|
-
|
|
24
|
-
window.$frontmatter = {}
|
|
25
|
-
window.$pageData = {}
|
|
26
|
-
window.$valaxy = {
|
|
27
|
-
postList: ref([]),
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// This will update routes at runtime without reloading the page
|
|
32
|
-
if (import.meta.hot) {
|
|
33
|
-
handleHotUpdate(router)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
app.use(router)
|
|
37
|
-
app.mount('#app')
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { Pane, Splitpanes } from 'splitpanes'
|
|
3
|
-
import { onMounted } from 'vue'
|
|
4
|
-
import { isStaticMode } from '../utils'
|
|
5
|
-
|
|
6
|
-
onMounted(() => {
|
|
7
|
-
if (isStaticMode)
|
|
8
|
-
document.title = 'Valaxy DevTools (Production)'
|
|
9
|
-
})
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<Splitpanes class="h-full">
|
|
14
|
-
<Pane>
|
|
15
|
-
<VDPostList />
|
|
16
|
-
</Pane>
|
|
17
|
-
<Pane>
|
|
18
|
-
<PostPanel />
|
|
19
|
-
</Pane>
|
|
20
|
-
</Splitpanes>
|
|
21
|
-
</template>
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import axios from 'axios'
|
|
3
|
-
import { Pane, Splitpanes } from 'splitpanes'
|
|
4
|
-
import { onMounted, ref } from 'vue'
|
|
5
|
-
import { getGlobalValaxyProperty } from '../utils'
|
|
6
|
-
|
|
7
|
-
interface frontmatter {
|
|
8
|
-
[key: string]: string
|
|
9
|
-
}
|
|
10
|
-
const postList = ref<frontmatter[]>([])
|
|
11
|
-
const mapper = ref<frontmatter>({})
|
|
12
|
-
|
|
13
|
-
onMounted(() => {
|
|
14
|
-
postList.value = getGlobalValaxyProperty('postList').value
|
|
15
|
-
postList.value.forEach((element) => {
|
|
16
|
-
const keys = Object.keys(element)
|
|
17
|
-
for (const key of keys)
|
|
18
|
-
mapper.value[key] = ''
|
|
19
|
-
})
|
|
20
|
-
})
|
|
21
|
-
const checkedPosts = ref<string[]>([])
|
|
22
|
-
function clearPosts(select: boolean) {
|
|
23
|
-
checkedPosts.value.length = 0
|
|
24
|
-
if (select)
|
|
25
|
-
checkedPosts.value = checkedPosts.value.concat(postList.value.map(i => i.path))
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async function migration() {
|
|
29
|
-
const update: frontmatter = {}
|
|
30
|
-
for (const key in mapper.value) {
|
|
31
|
-
if (mapper.value[key] !== '')
|
|
32
|
-
update[key] = mapper.value[key]
|
|
33
|
-
}
|
|
34
|
-
const res = await axios.post('/valaxy-devtools-api/migration', {
|
|
35
|
-
pageData: checkedPosts.value,
|
|
36
|
-
frontmatter: update,
|
|
37
|
-
})
|
|
38
|
-
if (res.data === 'ok') {
|
|
39
|
-
// console.log('migration success')
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<template>
|
|
45
|
-
<Splitpanes class="h-full">
|
|
46
|
-
<Pane>
|
|
47
|
-
<button @click="clearPosts(true)">
|
|
48
|
-
全选
|
|
49
|
-
</button>
|
|
50
|
-
<button @click="clearPosts(false)">
|
|
51
|
-
清空
|
|
52
|
-
</button>
|
|
53
|
-
<ul class="h-full" overflow="auto" pl="12" pr="4" py="4">
|
|
54
|
-
<li v-for="post in postList" :key="post.path" class="list-decimal">
|
|
55
|
-
<input v-model="checkedPosts" type="checkbox" :name="post.path" :value="post.path">
|
|
56
|
-
<label :for="post.path">{{ post.title }}</label>
|
|
57
|
-
</li>
|
|
58
|
-
</ul>
|
|
59
|
-
</Pane>
|
|
60
|
-
<Pane>
|
|
61
|
-
<h2>原frontmatter字段->新字段</h2>
|
|
62
|
-
<button @click="migration">
|
|
63
|
-
提交
|
|
64
|
-
</button>
|
|
65
|
-
<ul class="h-full" overflow="auto" pl="12" pr="4" py="4">
|
|
66
|
-
<li v-for="(_, key) in mapper" :key="key">
|
|
67
|
-
<label :for="key as string" style="margin-right: 20px;">{{ key }} -></label>
|
|
68
|
-
<input v-model="mapper[key]" :name="key as string">
|
|
69
|
-
</li>
|
|
70
|
-
</ul>
|
|
71
|
-
</Pane>
|
|
72
|
-
</Splitpanes>
|
|
73
|
-
</template>
|
package/src/client/shims.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
|
|
5
|
-
// It's recommended to commit this file.
|
|
6
|
-
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
|
7
|
-
|
|
8
|
-
declare module 'vue-router/auto-routes' {
|
|
9
|
-
import type {
|
|
10
|
-
RouteRecordInfo,
|
|
11
|
-
ParamValue,
|
|
12
|
-
ParamValueOneOrMore,
|
|
13
|
-
ParamValueZeroOrMore,
|
|
14
|
-
ParamValueZeroOrOne,
|
|
15
|
-
} from 'vue-router'
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Route name map generated by unplugin-vue-router
|
|
19
|
-
*/
|
|
20
|
-
export interface RouteNamedMap {
|
|
21
|
-
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
|
|
22
|
-
'/about': RouteRecordInfo<'/about', '/about', Record<never, never>, Record<never, never>>,
|
|
23
|
-
'/categories': RouteRecordInfo<'/categories', '/categories', Record<never, never>, Record<never, never>>,
|
|
24
|
-
'/migration': RouteRecordInfo<'/migration', '/migration', Record<never, never>, Record<never, never>>,
|
|
25
|
-
'/tags': RouteRecordInfo<'/tags', '/tags', Record<never, never>, Record<never, never>>,
|
|
26
|
-
}
|
|
27
|
-
}
|
package/src/client/utils/api.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// import from @vue/devtools-api not work
|
|
2
|
-
import { getAppWindow } from './get'
|
|
3
|
-
|
|
4
|
-
const target = getAppWindow()
|
|
5
|
-
|
|
6
|
-
export interface OpenInEditorOptions {
|
|
7
|
-
file?: string
|
|
8
|
-
line?: number
|
|
9
|
-
column?: number
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function openInEditor(options: OpenInEditorOptions = {}) {
|
|
13
|
-
const { file, line = 0, column = 0 } = options
|
|
14
|
-
if (file) {
|
|
15
|
-
const baseUrl = window.location.origin
|
|
16
|
-
target?.__VUE_INSPECTOR__.openInEditor(baseUrl, file, line, column)
|
|
17
|
-
}
|
|
18
|
-
}
|
package/src/client/utils/get.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export function getAppWindow() {
|
|
2
|
-
return window.parent.parent as unknown as {
|
|
3
|
-
__VUE_INSPECTOR__: {
|
|
4
|
-
openInEditor: (baseUrl: string, file: string, line: number, column: number) => void
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* window.parent.parent is the window object of the main app
|
|
11
|
-
*/
|
|
12
|
-
export function getWindowProperty(property: string) {
|
|
13
|
-
if (import.meta.env.DEV)
|
|
14
|
-
return (window as any)[property]
|
|
15
|
-
|
|
16
|
-
return (window.parent.parent as any)[property]
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function getGlobalValaxyProperty(property: string) {
|
|
20
|
-
if (import.meta.env.DEV)
|
|
21
|
-
return (window as any).$valaxy[property]
|
|
22
|
-
|
|
23
|
-
const $valaxy = (window.parent.parent as any).$valaxy
|
|
24
|
-
return $valaxy[property]
|
|
25
|
-
}
|
package/src/client/utils/init.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Router } from 'vue-router'
|
|
2
|
-
import { nextTick, onMounted } from 'vue'
|
|
3
|
-
import { activePath, devtoolsRouter, frontmatter, pageData } from '../composables/app'
|
|
4
|
-
import { getWindowProperty } from './get'
|
|
5
|
-
|
|
6
|
-
export function initDevtoolsClient() {
|
|
7
|
-
const __VUE_DEVTOOLS_ROUTER__ = getWindowProperty('__VUE_DEVTOOLS_ROUTER__') as Router
|
|
8
|
-
devtoolsRouter.value = __VUE_DEVTOOLS_ROUTER__
|
|
9
|
-
|
|
10
|
-
devtoolsRouter.value.beforeEach((to, _from, next) => {
|
|
11
|
-
activePath.value = to.path
|
|
12
|
-
next()
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
// init $frontmatter and $pageData
|
|
16
|
-
onMounted(() => {
|
|
17
|
-
frontmatter.value = getWindowProperty('$frontmatter')
|
|
18
|
-
pageData.value = getWindowProperty('$pageData')
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
devtoolsRouter.value.afterEach(async () => {
|
|
22
|
-
await nextTick()
|
|
23
|
-
// get target post $frontmatter
|
|
24
|
-
frontmatter.value = getWindowProperty('$frontmatter')
|
|
25
|
-
pageData.value = getWindowProperty('$pageData')
|
|
26
|
-
})
|
|
27
|
-
}
|