From 1357c3e3a72b8c2c6be448c259f9648584141e4f Mon Sep 17 00:00:00 2001 From: Jun Shindo <46585162+jay-es@users.noreply.github.com> Date: Thu, 22 May 2025 20:30:11 +0900 Subject: [PATCH] docs: refactor components to TypeScript --- .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 c2c1f8ee..0b500b1e 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 10272c23..a35f9898 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 e570ef80..b79251b4 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 afc7327c..8b050aae 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 @@ -