From f79751127e9e7b54e2f683fae9c948fdcd5b3a15 Mon Sep 17 00:00:00 2001 From: wChenonly <37658262+wChenonly@users.noreply.github.com> Date: Thu, 22 May 2025 10:06:28 +0800 Subject: [PATCH 1/4] docs: refactor components to TypeScript (#20075) --- .vitepress/theme/components/AsideSponsors.vue | 2 +- .vitepress/theme/components/YouTubeVideo.vue | 2 +- .../landing/1. hero-section/HeroDiagram.vue | 22 ++++++------- .../landing/1. hero-section/HeroSection.vue | 2 +- .../landing/2. feature-section/FeatureCI.vue | 32 +++++++++---------- .../FeatureFlexiblePlugins.vue | 2 +- .../FeatureInstantServerStart.vue | 5 +-- .../FeatureOptimizedBuild.vue | 24 +++++++------- .../FeatureRichFeatures.vue | 5 ++- .../2. feature-section/FeatureSection.vue | 2 +- .../FrameworksSection.vue | 4 +-- .../4. community-section/CommunitySection.vue | 1 - .../5. sponsor-section/SponsorSection.vue | 2 +- .../components/landing/common/SvgNode.vue | 4 +-- .vitepress/theme/composables/sponsor.ts | 2 +- .../theme/composables/useCardAnimation.ts | 2 +- .vitepress/vite-env.d.ts | 1 + 17 files changed, 57 insertions(+), 57 deletions(-) create mode 100644 .vitepress/vite-env.d.ts diff --git a/.vitepress/theme/components/AsideSponsors.vue b/.vitepress/theme/components/AsideSponsors.vue index 36bd1b01..55a52c48 100644 --- a/.vitepress/theme/components/AsideSponsors.vue +++ b/.vitepress/theme/components/AsideSponsors.vue @@ -8,7 +8,7 @@ const { data } = useSponsor() const sponsors = computed(() => { return [ { size: 'small', items: [voidZero] }, - ...(data?.value.map((sponsor) => { + ...(data.value?.map((sponsor) => { return { size: sponsor.size === 'big' ? 'mini' : 'xmini', items: sponsor.items, diff --git a/.vitepress/theme/components/YouTubeVideo.vue b/.vitepress/theme/components/YouTubeVideo.vue index 4aa6c93d..59f05d56 100644 --- a/.vitepress/theme/components/YouTubeVideo.vue +++ b/.vitepress/theme/components/YouTubeVideo.vue @@ -1,4 +1,4 @@ - diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue index 0b02e148..cb2c9e6f 100644 --- a/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue @@ -44,7 +44,7 @@ const { startAnimation, isCardActive } = useCardAnimation( () => { glowVisible.value = true }, - null, + undefined, 0.2, ) // Make the glowing lines hidden shortly after @@ -52,7 +52,7 @@ const { startAnimation, isCardActive } = useCardAnimation( () => { glowVisible.value = false }, - null, + undefined, 1.1, ) @@ -62,7 +62,7 @@ const { startAnimation, isCardActive } = useCardAnimation( () => { checkmark.value = true }, - null, + undefined, 1.3 + index * 0.2, ) }) @@ -228,91 +228,91 @@ const { startAnimation, isCardActive } = useCardAnimation( path="M1.00048 119.402L200.243 68.2732C213.283 65.4129 221.832 58.4923 221.832 50.7968V20.323V1" :position="glowPosition" :visible="glowVisible" - :dot-color="false" + :dot-color="undefined" glow-color="#13B351" /> diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue index e8a3e32a..aee7220d 100644 --- a/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureFlexiblePlugins.vue @@ -12,7 +12,7 @@ useSlideIn('#flexible-plugin-system') */ const { isCardActive, startAnimation } = useCardAnimation( '#flexible-plugin-system', - null, + undefined, { once: true, }, diff --git a/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue b/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue index 6b12c1c4..6146a019 100644 --- a/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue +++ b/.vitepress/theme/components/landing/2. feature-section/FeatureInstantServerStart.vue @@ -1,4 +1,4 @@ -