fix(feedback): send correct type

This commit is contained in:
taskylizard 2024-08-26 16:06:54 +00:00
parent 3148eabe96
commit 0faac569e8
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
23 changed files with 527 additions and 140 deletions

19
.licenserc.json Normal file
View file

@ -0,0 +1,19 @@
{
"docs/.vitepress/**/*.ts": [
"/**",
" Copyright (c) taskylizard. All rights reserved.",
"",
" Licensed under the Apache License, Version 2.0 (the \"License\");",
" you may not use this file except in compliance with the License.",
" You may obtain a copy of the License at",
"",
" http://www.apache.org/licenses/LICENSE-2.0",
"",
" Unless required by applicable law or agreed to in writing, software",
" distributed under the License is distributed on an \"AS IS\" BASIS,",
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
" See the License for the specific language governing permissions and",
" limitations under the License.",
"*/"
]
}

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import type { DefaultTheme } from 'vitepress' import type { DefaultTheme } from 'vitepress'
import { transform, transformGuide } from './transformer' import { transform, transformGuide } from './transformer'
// @unocss-include // @unocss-include

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/** /**
* Barrel generated using @taskylizard/tasker. * Barrel generated using @taskylizard/tasker.
*/ */

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import type { HeadConfig, TransformContext } from 'vitepress' import type { HeadConfig, TransformContext } from 'vitepress'
export function generateMeta(context: TransformContext, hostname: string) { export function generateMeta(context: TransformContext, hostname: string) {

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { mkdir, readFile, writeFile } from 'node:fs/promises' import { mkdir, readFile, writeFile } from 'node:fs/promises'
import { dirname, resolve } from 'node:path' import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url' import { fileURLToPath } from 'node:url'

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import path from 'node:path' import path from 'node:path'
import { writeFileSync } from 'node:fs' import { writeFileSync } from 'node:fs'
import { Feed } from 'feed' import { Feed } from 'feed'

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { readFile } from 'node:fs/promises' import { readFile } from 'node:fs/promises'
import { dirname, resolve } from 'node:path' import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url' import { fileURLToPath } from 'node:url'

View file

@ -5,67 +5,79 @@
// Generated by unplugin-auto-import // Generated by unplugin-auto-import
export {} export {}
declare global { declare global {
const EffectScope: typeof import('vue')['EffectScope'] const EffectScope: (typeof import('vue'))['EffectScope']
const computed: typeof import('vue')['computed'] const computed: (typeof import('vue'))['computed']
const createApp: typeof import('vue')['createApp'] const createApp: (typeof import('vue'))['createApp']
const customRef: typeof import('vue')['customRef'] const customRef: (typeof import('vue'))['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] const defineAsyncComponent: (typeof import('vue'))['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent'] const defineComponent: (typeof import('vue'))['defineComponent']
const effectScope: typeof import('vue')['effectScope'] const effectScope: (typeof import('vue'))['effectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance'] const getCurrentInstance: (typeof import('vue'))['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope'] const getCurrentScope: (typeof import('vue'))['getCurrentScope']
const h: typeof import('vue')['h'] const h: (typeof import('vue'))['h']
const inject: typeof import('vue')['inject'] const inject: (typeof import('vue'))['inject']
const isProxy: typeof import('vue')['isProxy'] const isProxy: (typeof import('vue'))['isProxy']
const isReactive: typeof import('vue')['isReactive'] const isReactive: (typeof import('vue'))['isReactive']
const isReadonly: typeof import('vue')['isReadonly'] const isReadonly: (typeof import('vue'))['isReadonly']
const isRef: typeof import('vue')['isRef'] const isRef: (typeof import('vue'))['isRef']
const markRaw: typeof import('vue')['markRaw'] const markRaw: (typeof import('vue'))['markRaw']
const nextTick: typeof import('vue')['nextTick'] const nextTick: (typeof import('vue'))['nextTick']
const onActivated: typeof import('vue')['onActivated'] const onActivated: (typeof import('vue'))['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount'] const onBeforeMount: (typeof import('vue'))['onBeforeMount']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] const onBeforeUnmount: (typeof import('vue'))['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] const onBeforeUpdate: (typeof import('vue'))['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated'] const onDeactivated: (typeof import('vue'))['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured'] const onErrorCaptured: (typeof import('vue'))['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted'] const onMounted: (typeof import('vue'))['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked'] const onRenderTracked: (typeof import('vue'))['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered'] const onRenderTriggered: (typeof import('vue'))['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose'] const onScopeDispose: (typeof import('vue'))['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch'] const onServerPrefetch: (typeof import('vue'))['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted'] const onUnmounted: (typeof import('vue'))['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated'] const onUpdated: (typeof import('vue'))['onUpdated']
const provide: typeof import('vue')['provide'] const provide: (typeof import('vue'))['provide']
const reactive: typeof import('vue')['reactive'] const reactive: (typeof import('vue'))['reactive']
const readonly: typeof import('vue')['readonly'] const readonly: (typeof import('vue'))['readonly']
const ref: typeof import('vue')['ref'] const ref: (typeof import('vue'))['ref']
const resolveComponent: typeof import('vue')['resolveComponent'] const resolveComponent: (typeof import('vue'))['resolveComponent']
const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReactive: (typeof import('vue'))['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowReadonly: (typeof import('vue'))['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef'] const shallowRef: (typeof import('vue'))['shallowRef']
const toRaw: typeof import('vue')['toRaw'] const toRaw: (typeof import('vue'))['toRaw']
const toRef: typeof import('vue')['toRef'] const toRef: (typeof import('vue'))['toRef']
const toRefs: typeof import('vue')['toRefs'] const toRefs: (typeof import('vue'))['toRefs']
const toValue: typeof import('vue')['toValue'] const toValue: (typeof import('vue'))['toValue']
const triggerRef: typeof import('vue')['triggerRef'] const triggerRef: (typeof import('vue'))['triggerRef']
const unref: typeof import('vue')['unref'] const unref: (typeof import('vue'))['unref']
const useAttrs: typeof import('vue')['useAttrs'] const useAttrs: (typeof import('vue'))['useAttrs']
const useCssModule: typeof import('vue')['useCssModule'] const useCssModule: (typeof import('vue'))['useCssModule']
const useCssVars: typeof import('vue')['useCssVars'] const useCssVars: (typeof import('vue'))['useCssVars']
const useData: typeof import('vitepress')['useData'] const useData: (typeof import('vitepress'))['useData']
const useRoute: typeof import('vitepress')['useRoute'] const useRoute: (typeof import('vitepress'))['useRoute']
const useRouter: typeof import('vitepress')['useRouter'] const useRouter: (typeof import('vitepress'))['useRouter']
const useSlots: typeof import('vue')['useSlots'] const useSlots: (typeof import('vue'))['useSlots']
const watch: typeof import('vue')['watch'] const watch: (typeof import('vue'))['watch']
const watchEffect: typeof import('vue')['watchEffect'] const watchEffect: (typeof import('vue'))['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchPostEffect: (typeof import('vue'))['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect'] const watchSyncEffect: (typeof import('vue'))['watchSyncEffect']
const withBase: typeof import('vitepress')['withBase'] const withBase: (typeof import('vitepress'))['withBase']
} }
// for type re-export // for type re-export
declare global { declare global {
// @ts-ignore // @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' export type {
Component,
ComponentPublicInstance,
ComputedRef,
ExtractDefaultPropTypes,
ExtractPropTypes,
ExtractPublicPropTypes,
InjectionKey,
PropType,
Ref,
VNode,
WritableComputedRef
} from 'vue'
import('vue') import('vue')
} }
// for vue template auto import // for vue template auto import
@ -73,61 +85,89 @@ import { UnwrapRef } from 'vue'
declare module 'vue' { declare module 'vue' {
interface GlobalComponents {} interface GlobalComponents {}
interface ComponentCustomProperties { interface ComponentCustomProperties {
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> readonly EffectScope: UnwrapRef<(typeof import('vue'))['EffectScope']>
readonly computed: UnwrapRef<typeof import('vue')['computed']> readonly computed: UnwrapRef<(typeof import('vue'))['computed']>
readonly createApp: UnwrapRef<typeof import('vue')['createApp']> readonly createApp: UnwrapRef<(typeof import('vue'))['createApp']>
readonly customRef: UnwrapRef<typeof import('vue')['customRef']> readonly customRef: UnwrapRef<(typeof import('vue'))['customRef']>
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']> readonly defineAsyncComponent: UnwrapRef<
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']> (typeof import('vue'))['defineAsyncComponent']
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']> >
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']> readonly defineComponent: UnwrapRef<
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']> (typeof import('vue'))['defineComponent']
readonly h: UnwrapRef<typeof import('vue')['h']> >
readonly inject: UnwrapRef<typeof import('vue')['inject']> readonly effectScope: UnwrapRef<(typeof import('vue'))['effectScope']>
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']> readonly getCurrentInstance: UnwrapRef<
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']> (typeof import('vue'))['getCurrentInstance']
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']> >
readonly isRef: UnwrapRef<typeof import('vue')['isRef']> readonly getCurrentScope: UnwrapRef<
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']> (typeof import('vue'))['getCurrentScope']
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']> >
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']> readonly h: UnwrapRef<(typeof import('vue'))['h']>
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']> readonly inject: UnwrapRef<(typeof import('vue'))['inject']>
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']> readonly isProxy: UnwrapRef<(typeof import('vue'))['isProxy']>
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']> readonly isReactive: UnwrapRef<(typeof import('vue'))['isReactive']>
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']> readonly isReadonly: UnwrapRef<(typeof import('vue'))['isReadonly']>
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']> readonly isRef: UnwrapRef<(typeof import('vue'))['isRef']>
readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']> readonly markRaw: UnwrapRef<(typeof import('vue'))['markRaw']>
readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']> readonly nextTick: UnwrapRef<(typeof import('vue'))['nextTick']>
readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']> readonly onActivated: UnwrapRef<(typeof import('vue'))['onActivated']>
readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']> readonly onBeforeMount: UnwrapRef<(typeof import('vue'))['onBeforeMount']>
readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']> readonly onBeforeUnmount: UnwrapRef<
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']> (typeof import('vue'))['onBeforeUnmount']
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']> >
readonly provide: UnwrapRef<typeof import('vue')['provide']> readonly onBeforeUpdate: UnwrapRef<(typeof import('vue'))['onBeforeUpdate']>
readonly reactive: UnwrapRef<typeof import('vue')['reactive']> readonly onDeactivated: UnwrapRef<(typeof import('vue'))['onDeactivated']>
readonly readonly: UnwrapRef<typeof import('vue')['readonly']> readonly onErrorCaptured: UnwrapRef<
readonly ref: UnwrapRef<typeof import('vue')['ref']> (typeof import('vue'))['onErrorCaptured']
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']> >
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']> readonly onMounted: UnwrapRef<(typeof import('vue'))['onMounted']>
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']> readonly onRenderTracked: UnwrapRef<
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']> (typeof import('vue'))['onRenderTracked']
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']> >
readonly toRef: UnwrapRef<typeof import('vue')['toRef']> readonly onRenderTriggered: UnwrapRef<
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']> (typeof import('vue'))['onRenderTriggered']
readonly toValue: UnwrapRef<typeof import('vue')['toValue']> >
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']> readonly onScopeDispose: UnwrapRef<(typeof import('vue'))['onScopeDispose']>
readonly unref: UnwrapRef<typeof import('vue')['unref']> readonly onServerPrefetch: UnwrapRef<
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']> (typeof import('vue'))['onServerPrefetch']
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']> >
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']> readonly onUnmounted: UnwrapRef<(typeof import('vue'))['onUnmounted']>
readonly useData: UnwrapRef<typeof import('vitepress')['useData']> readonly onUpdated: UnwrapRef<(typeof import('vue'))['onUpdated']>
readonly useRoute: UnwrapRef<typeof import('vitepress')['useRoute']> readonly provide: UnwrapRef<(typeof import('vue'))['provide']>
readonly useRouter: UnwrapRef<typeof import('vitepress')['useRouter']> readonly reactive: UnwrapRef<(typeof import('vue'))['reactive']>
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']> readonly readonly: UnwrapRef<(typeof import('vue'))['readonly']>
readonly watch: UnwrapRef<typeof import('vue')['watch']> readonly ref: UnwrapRef<(typeof import('vue'))['ref']>
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']> readonly resolveComponent: UnwrapRef<
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']> (typeof import('vue'))['resolveComponent']
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']> >
readonly withBase: UnwrapRef<typeof import('vitepress')['withBase']> readonly shallowReactive: UnwrapRef<
(typeof import('vue'))['shallowReactive']
>
readonly shallowReadonly: UnwrapRef<
(typeof import('vue'))['shallowReadonly']
>
readonly shallowRef: UnwrapRef<(typeof import('vue'))['shallowRef']>
readonly toRaw: UnwrapRef<(typeof import('vue'))['toRaw']>
readonly toRef: UnwrapRef<(typeof import('vue'))['toRef']>
readonly toRefs: UnwrapRef<(typeof import('vue'))['toRefs']>
readonly toValue: UnwrapRef<(typeof import('vue'))['toValue']>
readonly triggerRef: UnwrapRef<(typeof import('vue'))['triggerRef']>
readonly unref: UnwrapRef<(typeof import('vue'))['unref']>
readonly useAttrs: UnwrapRef<(typeof import('vue'))['useAttrs']>
readonly useCssModule: UnwrapRef<(typeof import('vue'))['useCssModule']>
readonly useCssVars: UnwrapRef<(typeof import('vue'))['useCssVars']>
readonly useData: UnwrapRef<(typeof import('vitepress'))['useData']>
readonly useRoute: UnwrapRef<(typeof import('vitepress'))['useRoute']>
readonly useRouter: UnwrapRef<(typeof import('vitepress'))['useRouter']>
readonly useSlots: UnwrapRef<(typeof import('vue'))['useSlots']>
readonly watch: UnwrapRef<(typeof import('vue'))['watch']>
readonly watchEffect: UnwrapRef<(typeof import('vue'))['watchEffect']>
readonly watchPostEffect: UnwrapRef<
(typeof import('vue'))['watchPostEffect']
>
readonly watchSyncEffect: UnwrapRef<
(typeof import('vue'))['watchSyncEffect']
>
readonly withBase: UnwrapRef<(typeof import('vitepress'))['withBase']>
} }
} }

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import type { MarkdownRenderer } from 'vitepress' import type { MarkdownRenderer } from 'vitepress'
// FIXME: tasky: possibly write less horror jank? // FIXME: tasky: possibly write less horror jank?

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { icons as twemoji } from '@iconify-json/twemoji' import { icons as twemoji } from '@iconify-json/twemoji'
import type { MarkdownRenderer } from 'vitepress' import type { MarkdownRenderer } from 'vitepress'

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import type { MarkdownRenderer } from 'vitepress' import type { MarkdownRenderer } from 'vitepress'
import { headers } from '../transformer/constants' import { headers } from '../transformer/constants'

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import type { MarkdownRenderer } from 'vitepress' import type { MarkdownRenderer } from 'vitepress'
const excluded = ['Beginners Guide'] const excluded = ['Beginners Guide']

View file

@ -87,12 +87,15 @@ const feedback = reactive<
const selectedOption = ref(feedbackOptions[0]) const selectedOption = ref(feedbackOptions[0])
async function handleSubmit(type?: FeedbackType['type']) { async function handleSubmit(type?: FeedbackType['type']) {
if (type) feedback.type = type if (type) {
feedback.type = type
selectedOption.value = getFeedbackOption(type)!
}
loading.value = true loading.value = true
const body: FeedbackType = { const body: FeedbackType = {
message: feedback.message, message: feedback.message,
type: selectedOption.value.value, type: feedback.type!,
page: feedback.page, page: feedback.page,
...(props.heading && { heading: props.heading }) ...(props.heading && { heading: props.heading })
} }
@ -136,29 +139,40 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
<template> <template>
<template v-if="props.heading"> <template v-if="props.heading">
<button @click="toggleCard()" <button
class="bg-$vp-c-default-soft hover:bg-$vp-c-default-soft/40 text-primary border-$vp-c-default-soft hover:border-primary ml-3 inline-flex h-7 items-center justify-center whitespace-nowrap rounded-md border-2 border-solid px-1.5 py-1.5 text-sm font-medium transition-all duration-300 sm:h-6"> @click="toggleCard()"
<span :class="isCardShown === false class="bg-$vp-c-default-soft hover:bg-$vp-c-default-soft/40 text-primary border-$vp-c-default-soft hover:border-primary ml-3 inline-flex h-7 items-center justify-center whitespace-nowrap rounded-md border-2 border-solid px-1.5 py-1.5 text-sm font-medium transition-all duration-300 sm:h-6"
>
<span
:class="
isCardShown === false
? `i-lucide:heart-handshake` ? `i-lucide:heart-handshake`
: `i-lucide:circle-x` : `i-lucide:circle-x`
" /> "
/>
</button> </button>
</template> </template>
<template v-else> <template v-else>
<button <button
class="bg-$vp-c-default-soft hover:bg-$vp-c-default-soft/40 text-primary px2 py1 border-$vp-c-default-soft hover:border-primary mt-2 select-none rounded border-2 border-solid font-bold transition-all duration-300" class="bg-$vp-c-default-soft hover:bg-$vp-c-default-soft/40 text-primary px2 py1 border-$vp-c-default-soft hover:border-primary mt-2 select-none rounded border-2 border-solid font-bold transition-all duration-300"
@click="toggleCard()"> @click="toggleCard()"
<span :class="isCardShown === false >
<span
:class="
isCardShown === false
? `i-lucide:heart-handshake mr-2` ? `i-lucide:heart-handshake mr-2`
: `i-lucide:circle-x mr-2` : `i-lucide:circle-x mr-2`
" /> "
/>
<span>Send Feedback</span> <span>Send Feedback</span>
</button> </button>
</template> </template>
<Transition name="fade" mode="out-in"> <Transition name="fade" mode="out-in">
<div v-if="isCardShown" <div
class="border-$vp-c-divider bg-$vp-c-bg-alt b-rd-4 m-[2rem 0] step mt-4 border-2 border-solid p-6"> v-if="isCardShown"
class="border-$vp-c-divider bg-$vp-c-bg-alt b-rd-4 m-[2rem 0] step mt-4 border-2 border-solid p-6"
>
<Transition name="fade" mode="out-in"> <Transition name="fade" mode="out-in">
<div v-if="!feedback.type" class="step"> <div v-if="!feedback.type" class="step">
<div> <div>
@ -170,7 +184,12 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
</div> </div>
</div> </div>
<div class="flex flex-wrap gap-2"> <div class="flex flex-wrap gap-2">
<button v-for="item in feedbackOptions" :key="item.value" class="btn" @click="handleSubmit(item.value)"> <button
v-for="item in feedbackOptions"
:key="item.value"
class="btn"
@click="handleSubmit(item.value)"
>
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
</button> </button>
</div> </div>
@ -182,7 +201,11 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
</p> </p>
<div> <div>
<span>{{ getFeedbackOption(feedback.type)?.label }}</span> <span>{{ getFeedbackOption(feedback.type)?.label }}</span>
<button style="margin-left: 0.5rem" class="btn" @click="feedback.type = undefined"> <button
style="margin-left: 0.5rem"
class="btn"
@click="feedback.type = undefined"
>
<span class="i-lucide:arrow-left-from-line">close</span> <span class="i-lucide:arrow-left-from-line">close</span>
</button> </button>
</div> </div>
@ -199,23 +222,30 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
<strong>🕹 Emulators</strong> <strong>🕹 Emulators</strong>
<p class="desc"> <p class="desc">
They're already on the They're already on the
<a class="text-primary text-underline font-bold" <a
href="https://emulation.gametechwiki.com/index.php/Main_Page"> class="text-primary text-underline font-bold"
href="https://emulation.gametechwiki.com/index.php/Main_Page"
>
Game Tech Wiki. Game Tech Wiki.
</a> </a>
</p> </p>
<strong>🔻 Leeches</strong> <strong>🔻 Leeches</strong>
<p class="desc"> <p class="desc">
They're already on the They're already on the
<a class="text-primary text-underline font-bold" <a
href="https://filehostlist.miraheze.org/wiki/Free_Premium_Leeches"> class="text-primary text-underline font-bold"
href="https://filehostlist.miraheze.org/wiki/Free_Premium_Leeches"
>
File Hosting Wiki. File Hosting Wiki.
</a> </a>
</p> </p>
<strong>🐧 Distros</strong> <strong>🐧 Distros</strong>
<p class="desc"> <p class="desc">
They're already on They're already on
<a class="text-primary text-underline font-bold" href="https://distrowatch.com/"> <a
class="text-primary text-underline font-bold"
href="https://distrowatch.com/"
>
DistroWatch. DistroWatch.
</a> </a>
</p> </p>
@ -230,15 +260,28 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
</p> </p>
</details> </details>
</div> </div>
<textarea v-model="feedback.message" autofocus class="input" placeholder="What a lovely wiki!" /> <textarea
v-model="feedback.message"
autofocus
class="input"
placeholder="What a lovely wiki!"
/>
<p class="desc mb-2"> <p class="desc mb-2">
If you want a reply to your feedback, feel free to mention a contact If you want a reply to your feedback, feel free to mention a contact
in the message or join our in the message or join our
<a class="text-primary text-underline font-semibold" href="https://discord.gg/Stz6y6NgNg"> <a
class="text-primary text-underline font-semibold"
href="https://discord.gg/Stz6y6NgNg"
>
Discord. Discord.
</a> </a>
</p> </p>
<button type="submit" class="btn btn-primary" :disabled="isDisabled" @click="handleSubmit()"> <button
type="submit"
class="btn btn-primary"
:disabled="isDisabled"
@click="handleSubmit()"
>
Send Feedback 📩 Send Feedback 📩
</button> </button>
</div> </div>
@ -251,7 +294,7 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)
</template> </template>
<style scoped lang="css"> <style scoped lang="css">
.step>*+* { .step > * + * {
margin-top: 1rem; margin-top: 1rem;
} }

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import nprogress, { type NProgress } from 'nprogress' import nprogress, { type NProgress } from 'nprogress'
import type { EnhanceAppContext } from 'vitepress' import type { EnhanceAppContext } from 'vitepress'

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import type { Theme } from 'vitepress' import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme' import DefaultTheme from 'vitepress/theme'
import Layout from './Layout.vue' import Layout from './Layout.vue'

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { createContentLoader, type ContentData } from 'vitepress' import { createContentLoader, type ContentData } from 'vitepress'
import { groupBy } from '../utils' import { groupBy } from '../utils'

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { basename } from 'pathe' import { basename } from 'pathe'
import type { Plugin } from 'vitepress' import type { Plugin } from 'vitepress'
import { replaceUnderscore, transformer } from './transformer/core' import { replaceUnderscore, transformer } from './transformer/core'

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
interface Header { interface Header {
[file: string]: { title: string; description: string } [file: string]: { title: string; description: string }
} }

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import consola from 'consola' import consola from 'consola'
type Transform = { type Transform = {

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import z from 'zod' import z from 'zod'
export const FeedbackSchema = z.object({ export const FeedbackSchema = z.object({

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
export function groupBy<T, K extends keyof any>( export function groupBy<T, K extends keyof any>(
arr: T[], arr: T[],
key: (i: T) => K key: (i: T) => K

View file

@ -1,3 +1,18 @@
/**
Copyright (c) taskylizard. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/* eslint-disable ts/consistent-type-imports */ /* eslint-disable ts/consistent-type-imports */
declare module '*.vue' { declare module '*.vue' {
const component: import('vue').Component const component: import('vue').Component