Skip to content

Commit c1592e8

Browse files
authored
Merge pull request #39 from banua-coder/hotfix/v1.2.5
hotfix: v1.2.5
2 parents 64e70a0 + 632f900 commit c1592e8

File tree

11 files changed

+143
-26
lines changed

11 files changed

+143
-26
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## [v1.2.5] - 2025-09-14
2+
3+
### Added
4+
5+
- Implement comprehensive bundle optimization and code splitting (79fa266)
6+
7+
### Fixed
8+
9+
- Resolve typescript errors in vite config for pnpm es modules (cc42a21)
10+
- Resolve typescript errors in vue components (beebe25)
11+
12+
### Maintenance
13+
14+
- Prepare v1.2.5 hotfix (825a6f7)
15+
16+
117
## [v1.2.3] - 2025-09-14
218

319
### Fixed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pico-api-docs",
3-
"version": "1.2.4",
3+
"version": "1.2.5",
44
"description": "PICO SulTeng API Documentation - COVID-19 Sulawesi Tengah Data API",
55
"main": "index.js",
66
"scripts": {
@@ -17,10 +17,12 @@
1717
"@tailwindcss/postcss": "^4.1.13",
1818
"@tailwindcss/typography": "^0.5.16",
1919
"@types/aos": "^3.0.7",
20+
"@types/node": "^24.4.0",
2021
"@vitejs/plugin-vue": "^6.0.1",
2122
"autoprefixer": "^10.4.21",
2223
"postcss": "^8.5.6",
2324
"tailwindcss": "3.4.15",
25+
"terser": "^5.44.0",
2426
"typescript": "^5.9.2",
2527
"vite": "^7.1.4",
2628
"vue-tsc": "^3.0.6"

src/App.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
<template>
22
<div id="app" class="transition-colors duration-200">
33
<router-view v-slot="{ Component, route }">
4-
<transition
5-
:name="route.meta.transition || 'slide-left'"
4+
<transition
5+
:name="(route.meta?.transition as string) || 'slide-left'"
66
mode="out-in"
77
>
8-
<component :is="Component" :key="route.path" />
8+
<Suspense>
9+
<component :is="Component" :key="route.path" />
10+
<template #fallback>
11+
<LoadingSpinner />
12+
</template>
13+
</Suspense>
914
</transition>
1015
</router-view>
1116
</div>
@@ -14,6 +19,7 @@
1419
<script setup lang="ts">
1520
import { onMounted } from 'vue'
1621
import { useTheme } from '@/composables/useTheme'
22+
import LoadingSpinner from '@/components/LoadingSpinner.vue'
1723
1824
// Initialize theme on app start
1925
const { initTheme } = useTheme()

src/components/BaseCard.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</template>
3535

3636
<script setup lang="ts">
37-
import { computed } from 'vue'
37+
import { computed, useSlots } from 'vue'
3838
3939
interface Props {
4040
variant?: 'default' | 'elevated' | 'outlined' | 'ghost'
@@ -58,6 +58,8 @@ const props = withDefaults(defineProps<Props>(), {
5858
padding: 'md'
5959
})
6060
61+
const slots = useSlots()
62+
6163
// Base classes
6264
const baseClasses = 'relative transition-all duration-300'
6365
@@ -143,7 +145,7 @@ const headerClasses = computed(() => [
143145
const contentClasses = computed(() => [
144146
{
145147
[paddingClasses[props.padding]]: props.padding !== 'none',
146-
'pt-0': (props.$slots.header || props.title) && props.padding !== 'none'
148+
'pt-0': (slots.header || props.title) && props.padding !== 'none'
147149
}
148150
])
149151

src/components/CodeBlock.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ const formatLanguageName = (lang: string): string => {
204204
}
205205
206206
// Get badge variant based on language
207-
const getBadgeVariant = (lang: string) => {
208-
const variantMap: Record<string, string> = {
207+
const getBadgeVariant = (lang: string): 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' => {
208+
const variantMap: Record<string, 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info'> = {
209209
'javascript': 'warning',
210210
'typescript': 'primary',
211211
'python': 'success',
@@ -218,7 +218,7 @@ const getBadgeVariant = (lang: string) => {
218218
'html': 'danger',
219219
'sql': 'success'
220220
}
221-
221+
222222
return variantMap[lang] || 'default'
223223
}
224224

src/components/LoadingSpinner.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<template>
2+
<div class="flex items-center justify-center min-h-screen bg-gray-50 dark:bg-gray-900">
3+
<div class="text-center">
4+
<div class="inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-pico-sky"></div>
5+
<p class="mt-4 text-gray-600 dark:text-gray-400">{{ $t('loading') || 'Loading...' }}</p>
6+
</div>
7+
</div>
8+
</template>
9+
10+
<script setup lang="ts">
11+
// Simple loading component for route transitions
12+
</script>

src/i18n.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
import { createI18n } from 'vue-i18n'
2-
import en from './locales/en.json'
3-
import id from './locales/id.json'
42

5-
const messages = {
6-
en,
7-
id
3+
// Lazy load locale messages
4+
const loadLocaleMessages = async () => {
5+
const modules = import.meta.glob('./locales/*.json')
6+
const messages: Record<string, any> = {}
7+
8+
for (const path in modules) {
9+
const mod = await modules[path]() as { default: any }
10+
const locale = path.replace('./locales/', '').replace('.json', '')
11+
messages[locale] = mod.default
12+
}
13+
14+
return messages
815
}
916

1017
// Get saved language or default to English
1118
const savedLanguage = localStorage.getItem('pico-language') || 'en'
1219

20+
// Create i18n instance with lazy loading
1321
const i18n = createI18n({
1422
legacy: false,
1523
locale: savedLanguage,
1624
fallbackLocale: 'en',
17-
messages
25+
messages: {}
26+
})
27+
28+
// Load messages asynchronously
29+
loadLocaleMessages().then(messages => {
30+
Object.keys(messages).forEach(locale => {
31+
i18n.global.setLocaleMessage(locale, messages[locale])
32+
})
1833
})
1934

2035
export default i18n

src/router/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
import { createRouter, createWebHistory } from 'vue-router'
2-
import Home from '@/views/Home.vue'
3-
import Documentation from '@/views/Documentation.vue'
4-
import ApiReference from '@/views/ApiReference.vue'
52

63
const router = createRouter({
74
history: createWebHistory(import.meta.env.BASE_URL),
85
routes: [
96
{
107
path: '/',
118
name: 'home',
12-
component: Home
9+
component: () => import('@/views/Home.vue')
1310
},
1411
{
1512
path: '/docs',
1613
name: 'documentation',
17-
component: Documentation
14+
component: () => import('@/views/Documentation.vue')
1815
},
1916
{
2017
path: '/api',
2118
name: 'api-reference',
22-
component: ApiReference
19+
component: () => import('@/views/ApiReference.vue')
2320
}
2421
]
2522
})

src/views/Documentation.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ import AuthenticationSection from '@/components/documentation/AuthenticationSect
278278
import ErrorHandlingSection from '@/components/documentation/ErrorHandlingSection.vue'
279279
import GlossarySection from '@/components/documentation/GlossarySection.vue'
280280
281-
const { t, locale } = useI18n()
281+
const { locale } = useI18n()
282282
283283
// Version from package.json
284284
const version = packageJson.version

tsconfig.node.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"module": "ESNext",
66
"moduleResolution": "bundler",
77
"allowSyntheticDefaultImports": true,
8-
"strict": true
8+
"strict": true,
9+
"types": ["node"]
910
},
1011
"include": ["vite.config.ts"]
1112
}

0 commit comments

Comments
 (0)