From 0faac569e8fb3b9480392df84f20b376d4af9100 Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:06:54 +0000 Subject: [PATCH] fix(feedback): send correct type --- .licenserc.json | 19 ++ docs/.vitepress/.imports.json | 2 +- docs/.vitepress/constants.ts | 15 + docs/.vitepress/hooks/index.ts | 15 + docs/.vitepress/hooks/meta.ts | 15 + docs/.vitepress/hooks/opengraph.ts | 15 + docs/.vitepress/hooks/rss.ts | 15 + docs/.vitepress/hooks/satoriConfig.ts | 15 + docs/.vitepress/imports.d.ts | 266 ++++++++++-------- docs/.vitepress/markdown/base64.ts | 15 + docs/.vitepress/markdown/emoji.ts | 15 + docs/.vitepress/markdown/headers.ts | 15 + docs/.vitepress/markdown/toggleStarred.ts | 15 + docs/.vitepress/theme/components/Feedback.vue | 95 +++++-- .../.vitepress/theme/composables/nprogress.ts | 15 + docs/.vitepress/theme/index.ts | 15 + docs/.vitepress/theme/posts.data.ts | 15 + docs/.vitepress/transformer.ts | 15 + docs/.vitepress/transformer/constants.ts | 15 + docs/.vitepress/transformer/core.ts | 15 + docs/.vitepress/types/Feedback.ts | 15 + docs/.vitepress/utils.ts | 15 + docs/.vitepress/vue-shim.d.ts | 15 + 23 files changed, 527 insertions(+), 140 deletions(-) create mode 100644 .licenserc.json diff --git a/.licenserc.json b/.licenserc.json new file mode 100644 index 000000000..af860f16d --- /dev/null +++ b/.licenserc.json @@ -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.", + "*/" + ] +} diff --git a/docs/.vitepress/.imports.json b/docs/.vitepress/.imports.json index a46347555..4ce5dfe01 100644 --- a/docs/.vitepress/.imports.json +++ b/docs/.vitepress/.imports.json @@ -70,4 +70,4 @@ "withBase" ] } -} \ No newline at end of file +} diff --git a/docs/.vitepress/constants.ts b/docs/.vitepress/constants.ts index b25dcbe80..824700b9e 100644 --- a/docs/.vitepress/constants.ts +++ b/docs/.vitepress/constants.ts @@ -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 { transform, transformGuide } from './transformer' // @unocss-include diff --git a/docs/.vitepress/hooks/index.ts b/docs/.vitepress/hooks/index.ts index b2bfa321c..dfd73db96 100644 --- a/docs/.vitepress/hooks/index.ts +++ b/docs/.vitepress/hooks/index.ts @@ -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. */ diff --git a/docs/.vitepress/hooks/meta.ts b/docs/.vitepress/hooks/meta.ts index c2f59ecd8..8f702e66f 100644 --- a/docs/.vitepress/hooks/meta.ts +++ b/docs/.vitepress/hooks/meta.ts @@ -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' export function generateMeta(context: TransformContext, hostname: string) { diff --git a/docs/.vitepress/hooks/opengraph.ts b/docs/.vitepress/hooks/opengraph.ts index 79e486a69..a96225101 100644 --- a/docs/.vitepress/hooks/opengraph.ts +++ b/docs/.vitepress/hooks/opengraph.ts @@ -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 { dirname, resolve } from 'node:path' import { fileURLToPath } from 'node:url' diff --git a/docs/.vitepress/hooks/rss.ts b/docs/.vitepress/hooks/rss.ts index 5a1253306..b50898ee1 100644 --- a/docs/.vitepress/hooks/rss.ts +++ b/docs/.vitepress/hooks/rss.ts @@ -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 { writeFileSync } from 'node:fs' import { Feed } from 'feed' diff --git a/docs/.vitepress/hooks/satoriConfig.ts b/docs/.vitepress/hooks/satoriConfig.ts index 30a380180..3e71fefe5 100644 --- a/docs/.vitepress/hooks/satoriConfig.ts +++ b/docs/.vitepress/hooks/satoriConfig.ts @@ -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 { dirname, resolve } from 'node:path' import { fileURLToPath } from 'node:url' diff --git a/docs/.vitepress/imports.d.ts b/docs/.vitepress/imports.d.ts index 3bc9dfa9b..36a7d1f27 100644 --- a/docs/.vitepress/imports.d.ts +++ b/docs/.vitepress/imports.d.ts @@ -5,67 +5,79 @@ // Generated by unplugin-auto-import export {} declare global { - const EffectScope: typeof import('vue')['EffectScope'] - const computed: typeof import('vue')['computed'] - const createApp: typeof import('vue')['createApp'] - const customRef: typeof import('vue')['customRef'] - const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] - const defineComponent: typeof import('vue')['defineComponent'] - const effectScope: typeof import('vue')['effectScope'] - const getCurrentInstance: typeof import('vue')['getCurrentInstance'] - const getCurrentScope: typeof import('vue')['getCurrentScope'] - const h: typeof import('vue')['h'] - const inject: typeof import('vue')['inject'] - const isProxy: typeof import('vue')['isProxy'] - const isReactive: typeof import('vue')['isReactive'] - const isReadonly: typeof import('vue')['isReadonly'] - const isRef: typeof import('vue')['isRef'] - const markRaw: typeof import('vue')['markRaw'] - const nextTick: typeof import('vue')['nextTick'] - const onActivated: typeof import('vue')['onActivated'] - const onBeforeMount: typeof import('vue')['onBeforeMount'] - const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] - const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] - const onDeactivated: typeof import('vue')['onDeactivated'] - const onErrorCaptured: typeof import('vue')['onErrorCaptured'] - const onMounted: typeof import('vue')['onMounted'] - const onRenderTracked: typeof import('vue')['onRenderTracked'] - const onRenderTriggered: typeof import('vue')['onRenderTriggered'] - const onScopeDispose: typeof import('vue')['onScopeDispose'] - const onServerPrefetch: typeof import('vue')['onServerPrefetch'] - const onUnmounted: typeof import('vue')['onUnmounted'] - const onUpdated: typeof import('vue')['onUpdated'] - const provide: typeof import('vue')['provide'] - const reactive: typeof import('vue')['reactive'] - const readonly: typeof import('vue')['readonly'] - const ref: typeof import('vue')['ref'] - const resolveComponent: typeof import('vue')['resolveComponent'] - const shallowReactive: typeof import('vue')['shallowReactive'] - const shallowReadonly: typeof import('vue')['shallowReadonly'] - const shallowRef: typeof import('vue')['shallowRef'] - const toRaw: typeof import('vue')['toRaw'] - const toRef: typeof import('vue')['toRef'] - const toRefs: typeof import('vue')['toRefs'] - const toValue: typeof import('vue')['toValue'] - const triggerRef: typeof import('vue')['triggerRef'] - const unref: typeof import('vue')['unref'] - const useAttrs: typeof import('vue')['useAttrs'] - const useCssModule: typeof import('vue')['useCssModule'] - const useCssVars: typeof import('vue')['useCssVars'] - const useData: typeof import('vitepress')['useData'] - const useRoute: typeof import('vitepress')['useRoute'] - const useRouter: typeof import('vitepress')['useRouter'] - const useSlots: typeof import('vue')['useSlots'] - const watch: typeof import('vue')['watch'] - const watchEffect: typeof import('vue')['watchEffect'] - const watchPostEffect: typeof import('vue')['watchPostEffect'] - const watchSyncEffect: typeof import('vue')['watchSyncEffect'] - const withBase: typeof import('vitepress')['withBase'] + const EffectScope: (typeof import('vue'))['EffectScope'] + const computed: (typeof import('vue'))['computed'] + const createApp: (typeof import('vue'))['createApp'] + const customRef: (typeof import('vue'))['customRef'] + const defineAsyncComponent: (typeof import('vue'))['defineAsyncComponent'] + const defineComponent: (typeof import('vue'))['defineComponent'] + const effectScope: (typeof import('vue'))['effectScope'] + const getCurrentInstance: (typeof import('vue'))['getCurrentInstance'] + const getCurrentScope: (typeof import('vue'))['getCurrentScope'] + const h: (typeof import('vue'))['h'] + const inject: (typeof import('vue'))['inject'] + const isProxy: (typeof import('vue'))['isProxy'] + const isReactive: (typeof import('vue'))['isReactive'] + const isReadonly: (typeof import('vue'))['isReadonly'] + const isRef: (typeof import('vue'))['isRef'] + const markRaw: (typeof import('vue'))['markRaw'] + const nextTick: (typeof import('vue'))['nextTick'] + const onActivated: (typeof import('vue'))['onActivated'] + const onBeforeMount: (typeof import('vue'))['onBeforeMount'] + const onBeforeUnmount: (typeof import('vue'))['onBeforeUnmount'] + const onBeforeUpdate: (typeof import('vue'))['onBeforeUpdate'] + const onDeactivated: (typeof import('vue'))['onDeactivated'] + const onErrorCaptured: (typeof import('vue'))['onErrorCaptured'] + const onMounted: (typeof import('vue'))['onMounted'] + const onRenderTracked: (typeof import('vue'))['onRenderTracked'] + const onRenderTriggered: (typeof import('vue'))['onRenderTriggered'] + const onScopeDispose: (typeof import('vue'))['onScopeDispose'] + const onServerPrefetch: (typeof import('vue'))['onServerPrefetch'] + const onUnmounted: (typeof import('vue'))['onUnmounted'] + const onUpdated: (typeof import('vue'))['onUpdated'] + const provide: (typeof import('vue'))['provide'] + const reactive: (typeof import('vue'))['reactive'] + const readonly: (typeof import('vue'))['readonly'] + const ref: (typeof import('vue'))['ref'] + const resolveComponent: (typeof import('vue'))['resolveComponent'] + const shallowReactive: (typeof import('vue'))['shallowReactive'] + const shallowReadonly: (typeof import('vue'))['shallowReadonly'] + const shallowRef: (typeof import('vue'))['shallowRef'] + const toRaw: (typeof import('vue'))['toRaw'] + const toRef: (typeof import('vue'))['toRef'] + const toRefs: (typeof import('vue'))['toRefs'] + const toValue: (typeof import('vue'))['toValue'] + const triggerRef: (typeof import('vue'))['triggerRef'] + const unref: (typeof import('vue'))['unref'] + const useAttrs: (typeof import('vue'))['useAttrs'] + const useCssModule: (typeof import('vue'))['useCssModule'] + const useCssVars: (typeof import('vue'))['useCssVars'] + const useData: (typeof import('vitepress'))['useData'] + const useRoute: (typeof import('vitepress'))['useRoute'] + const useRouter: (typeof import('vitepress'))['useRouter'] + const useSlots: (typeof import('vue'))['useSlots'] + const watch: (typeof import('vue'))['watch'] + const watchEffect: (typeof import('vue'))['watchEffect'] + const watchPostEffect: (typeof import('vue'))['watchPostEffect'] + const watchSyncEffect: (typeof import('vue'))['watchSyncEffect'] + const withBase: (typeof import('vitepress'))['withBase'] } // for type re-export declare global { // @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') } // for vue template auto import @@ -73,61 +85,89 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface GlobalComponents {} interface ComponentCustomProperties { - readonly EffectScope: UnwrapRef - readonly computed: UnwrapRef - readonly createApp: UnwrapRef - readonly customRef: UnwrapRef - readonly defineAsyncComponent: UnwrapRef - readonly defineComponent: UnwrapRef - readonly effectScope: UnwrapRef - readonly getCurrentInstance: UnwrapRef - readonly getCurrentScope: UnwrapRef - readonly h: UnwrapRef - readonly inject: UnwrapRef - readonly isProxy: UnwrapRef - readonly isReactive: UnwrapRef - readonly isReadonly: UnwrapRef - readonly isRef: UnwrapRef - readonly markRaw: UnwrapRef - readonly nextTick: UnwrapRef - readonly onActivated: UnwrapRef - readonly onBeforeMount: UnwrapRef - readonly onBeforeUnmount: UnwrapRef - readonly onBeforeUpdate: UnwrapRef - readonly onDeactivated: UnwrapRef - readonly onErrorCaptured: UnwrapRef - readonly onMounted: UnwrapRef - readonly onRenderTracked: UnwrapRef - readonly onRenderTriggered: UnwrapRef - readonly onScopeDispose: UnwrapRef - readonly onServerPrefetch: UnwrapRef - readonly onUnmounted: UnwrapRef - readonly onUpdated: UnwrapRef - readonly provide: UnwrapRef - readonly reactive: UnwrapRef - readonly readonly: UnwrapRef - readonly ref: UnwrapRef - readonly resolveComponent: UnwrapRef - readonly shallowReactive: UnwrapRef - readonly shallowReadonly: UnwrapRef - readonly shallowRef: UnwrapRef - readonly toRaw: UnwrapRef - readonly toRef: UnwrapRef - readonly toRefs: UnwrapRef - readonly toValue: UnwrapRef - readonly triggerRef: UnwrapRef - readonly unref: UnwrapRef - readonly useAttrs: UnwrapRef - readonly useCssModule: UnwrapRef - readonly useCssVars: UnwrapRef - readonly useData: UnwrapRef - readonly useRoute: UnwrapRef - readonly useRouter: UnwrapRef - readonly useSlots: UnwrapRef - readonly watch: UnwrapRef - readonly watchEffect: UnwrapRef - readonly watchPostEffect: UnwrapRef - readonly watchSyncEffect: UnwrapRef - readonly withBase: UnwrapRef + readonly EffectScope: UnwrapRef<(typeof import('vue'))['EffectScope']> + readonly computed: UnwrapRef<(typeof import('vue'))['computed']> + readonly createApp: UnwrapRef<(typeof import('vue'))['createApp']> + readonly customRef: UnwrapRef<(typeof import('vue'))['customRef']> + readonly defineAsyncComponent: UnwrapRef< + (typeof import('vue'))['defineAsyncComponent'] + > + readonly defineComponent: UnwrapRef< + (typeof import('vue'))['defineComponent'] + > + readonly effectScope: UnwrapRef<(typeof import('vue'))['effectScope']> + readonly getCurrentInstance: UnwrapRef< + (typeof import('vue'))['getCurrentInstance'] + > + readonly getCurrentScope: UnwrapRef< + (typeof import('vue'))['getCurrentScope'] + > + readonly h: UnwrapRef<(typeof import('vue'))['h']> + readonly inject: UnwrapRef<(typeof import('vue'))['inject']> + readonly isProxy: UnwrapRef<(typeof import('vue'))['isProxy']> + readonly isReactive: UnwrapRef<(typeof import('vue'))['isReactive']> + readonly isReadonly: UnwrapRef<(typeof import('vue'))['isReadonly']> + readonly isRef: UnwrapRef<(typeof import('vue'))['isRef']> + readonly markRaw: UnwrapRef<(typeof import('vue'))['markRaw']> + readonly nextTick: UnwrapRef<(typeof import('vue'))['nextTick']> + readonly onActivated: UnwrapRef<(typeof import('vue'))['onActivated']> + readonly onBeforeMount: UnwrapRef<(typeof import('vue'))['onBeforeMount']> + readonly onBeforeUnmount: UnwrapRef< + (typeof import('vue'))['onBeforeUnmount'] + > + readonly onBeforeUpdate: UnwrapRef<(typeof import('vue'))['onBeforeUpdate']> + readonly onDeactivated: UnwrapRef<(typeof import('vue'))['onDeactivated']> + readonly onErrorCaptured: UnwrapRef< + (typeof import('vue'))['onErrorCaptured'] + > + readonly onMounted: UnwrapRef<(typeof import('vue'))['onMounted']> + readonly onRenderTracked: UnwrapRef< + (typeof import('vue'))['onRenderTracked'] + > + readonly onRenderTriggered: UnwrapRef< + (typeof import('vue'))['onRenderTriggered'] + > + readonly onScopeDispose: UnwrapRef<(typeof import('vue'))['onScopeDispose']> + readonly onServerPrefetch: UnwrapRef< + (typeof import('vue'))['onServerPrefetch'] + > + readonly onUnmounted: UnwrapRef<(typeof import('vue'))['onUnmounted']> + readonly onUpdated: UnwrapRef<(typeof import('vue'))['onUpdated']> + readonly provide: UnwrapRef<(typeof import('vue'))['provide']> + readonly reactive: UnwrapRef<(typeof import('vue'))['reactive']> + readonly readonly: UnwrapRef<(typeof import('vue'))['readonly']> + readonly ref: UnwrapRef<(typeof import('vue'))['ref']> + readonly resolveComponent: UnwrapRef< + (typeof import('vue'))['resolveComponent'] + > + 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']> } } diff --git a/docs/.vitepress/markdown/base64.ts b/docs/.vitepress/markdown/base64.ts index 5fb9b66f8..7b8050c6a 100644 --- a/docs/.vitepress/markdown/base64.ts +++ b/docs/.vitepress/markdown/base64.ts @@ -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' // FIXME: tasky: possibly write less horror jank? diff --git a/docs/.vitepress/markdown/emoji.ts b/docs/.vitepress/markdown/emoji.ts index 86c2cc696..db7a093a1 100644 --- a/docs/.vitepress/markdown/emoji.ts +++ b/docs/.vitepress/markdown/emoji.ts @@ -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 type { MarkdownRenderer } from 'vitepress' diff --git a/docs/.vitepress/markdown/headers.ts b/docs/.vitepress/markdown/headers.ts index 31ffe238b..3ad57cadc 100644 --- a/docs/.vitepress/markdown/headers.ts +++ b/docs/.vitepress/markdown/headers.ts @@ -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 { headers } from '../transformer/constants' diff --git a/docs/.vitepress/markdown/toggleStarred.ts b/docs/.vitepress/markdown/toggleStarred.ts index 7f2945cbb..2554a0279 100644 --- a/docs/.vitepress/markdown/toggleStarred.ts +++ b/docs/.vitepress/markdown/toggleStarred.ts @@ -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' const excluded = ['Beginners Guide'] diff --git a/docs/.vitepress/theme/components/Feedback.vue b/docs/.vitepress/theme/components/Feedback.vue index a8b11b007..318f3682e 100644 --- a/docs/.vitepress/theme/components/Feedback.vue +++ b/docs/.vitepress/theme/components/Feedback.vue @@ -87,12 +87,15 @@ const feedback = reactive< const selectedOption = ref(feedbackOptions[0]) async function handleSubmit(type?: FeedbackType['type']) { - if (type) feedback.type = type + if (type) { + feedback.type = type + selectedOption.value = getFeedbackOption(type)! + } loading.value = true const body: FeedbackType = { message: feedback.message, - type: selectedOption.value.value, + type: feedback.type!, page: feedback.page, ...(props.heading && { heading: props.heading }) } @@ -136,29 +139,40 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value)