@xcpcio/board-app 0.52.0 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/404.html +1 -1
  2. package/dist/assets/{Board-f05c0366.css → Board--Fj0eIxn.css} +1 -1
  3. package/dist/assets/Board-DVycq7Hb.js +1 -0
  4. package/dist/assets/ContestStateBadge-SaSIRVZw.js +1 -0
  5. package/dist/assets/ContestStateBadge-yOXRkC0c.css +1 -0
  6. package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-ButnX5NG.js +1 -0
  7. package/dist/assets/Footer.vue_vue_type_script_setup_true_lang-DtriOyxw.js +1 -0
  8. package/dist/assets/NavBar-CTO09sVc.js +1 -0
  9. package/dist/assets/NavBar-K1-1c5jR.css +1 -0
  10. package/dist/assets/RightArrowIcon-93I3m1Dg.js +1 -0
  11. package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-Bstp0Uq6.js +1 -0
  12. package/dist/assets/Tooltip-VVqtpO6L.css +1 -0
  13. package/dist/assets/Tooltip.vue_vue_type_script_setup_true_lang-IVJ6kO8Y.js +27 -0
  14. package/dist/assets/{_...all_-85910c2a.js → _...all_-CajB1u6j.js} +2 -2
  15. package/dist/assets/_...all_-DkFLHLY4.js +1 -0
  16. package/dist/assets/_name_-CKcXFscu.js +1 -0
  17. package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
  18. package/dist/assets/about-Bt1E61e1.js +5 -0
  19. package/dist/assets/board-BuZxK-RS.js +1 -0
  20. package/dist/assets/board-layout-BDGSSQnD.js +1 -0
  21. package/dist/assets/constant-D5AETBoS.js +1 -0
  22. package/dist/assets/default-g2FZdb_E.js +1 -0
  23. package/dist/assets/en-DDlXf_8q.js +1 -0
  24. package/dist/assets/headless-AGI21K3d.js +1 -0
  25. package/dist/assets/home-CIo2SGx9.js +1 -0
  26. package/dist/assets/index-B0AiC33S.js +1 -0
  27. package/dist/assets/index-BJlHNlHk.js +198 -0
  28. package/dist/assets/{index-241beb5a.css → index-BP90wE2A.css} +1 -1
  29. package/dist/assets/index-BVqqkkh8.js +25 -0
  30. package/dist/assets/index-BerApwlM.css +1 -0
  31. package/dist/assets/index-Bqug296L.js +50 -0
  32. package/dist/assets/index-ByBDbX-Q.js +1 -0
  33. package/dist/assets/index-CDb5YJlm.js +1 -0
  34. package/dist/assets/index-Ci3FURub.css +5 -0
  35. package/dist/assets/index-CsD1PvIl.js +5 -0
  36. package/dist/assets/{index-c827bc8f.css → index-DRiWpQTB.css} +1 -1
  37. package/dist/assets/index-De6dfmWB.css +1 -0
  38. package/dist/assets/index-DtIE9gnq.js +1 -0
  39. package/dist/assets/index-eEOWm26O.js +1 -0
  40. package/dist/assets/index-layout-B9ZsHAPN.js +1 -0
  41. package/dist/assets/pagination-SF0231GF.js +3 -0
  42. package/dist/assets/route-block-B_A1xBdJ.js +1 -0
  43. package/dist/assets/test-BmgsMNrG.js +1 -0
  44. package/dist/assets/use-vmodel-DKmkNt1c.js +1 -0
  45. package/dist/assets/useQueryBoardData-MYqwKv9X.js +1 -0
  46. package/dist/assets/user-DVMgLOCG.js +1 -0
  47. package/dist/assets/virtual_pwa-register-G08q8i_v.js +1 -0
  48. package/dist/assets/workbox-window.prod.es5-D5gOYdM7.js +2 -0
  49. package/dist/assets/zh-CN-CNJkghp4.js +1 -0
  50. package/dist/index.html +1 -1
  51. package/dist/sw.js +1 -1
  52. package/package.json +51 -49
  53. package/src/auto-imports.d.ts +4 -2
  54. package/src/components/Balloon.vue +3 -2
  55. package/src/components/BalloonBlock.vue +1 -1
  56. package/src/components/ContestIndexUI.vue +3 -3
  57. package/src/components/Countdown.vue +3 -3
  58. package/src/components/NavBar.vue +1 -1
  59. package/src/components/Resolver.vue +112 -27
  60. package/src/components/SearchInput.vue +1 -1
  61. package/src/components/TheCheckbox.vue +1 -1
  62. package/src/components/TheCounter.vue +1 -1
  63. package/src/components/TheInput.vue +3 -3
  64. package/src/components/battle-of-giants/GiantsOptions.vue +5 -5
  65. package/src/components/battle-of-giants/GiantsScoreBoard.vue +1 -1
  66. package/src/components/board/AnimatedSubmissionBlock.vue +2 -2
  67. package/src/components/board/AnimatedSubmissionsModal.vue +1 -1
  68. package/src/components/board/Badge.vue +2 -2
  69. package/src/components/board/Board.vue +8 -8
  70. package/src/components/board/BoardTab.vue +1 -1
  71. package/src/components/board/BottomStatistics.vue +1 -1
  72. package/src/components/board/ContestStateBadge.vue +3 -3
  73. package/src/components/board/Export.vue +5 -5
  74. package/src/components/board/Modal.vue +4 -4
  75. package/src/components/board/ModalMenu.vue +2 -2
  76. package/src/components/board/OptionsModal.vue +4 -4
  77. package/src/components/board/ProblemBlock.vue +2 -2
  78. package/src/components/board/ProblemInfoModal.vue +3 -3
  79. package/src/components/board/Progress.vue +12 -9
  80. package/src/components/board/SecondLevelMenu.vue +2 -2
  81. package/src/components/board/Standings.vue +5 -5
  82. package/src/components/board/Statistics.vue +3 -3
  83. package/src/components/board/SubmissionsTable.vue +15 -15
  84. package/src/components/board/SubmissionsTableModal.vue +4 -4
  85. package/src/components/board/TeamAwards.vue +3 -3
  86. package/src/components/board/TeamInfoModal.vue +5 -5
  87. package/src/components/board/TeamProblemBlock.vue +5 -5
  88. package/src/components/board/TeamUI.vue +3 -3
  89. package/src/components/flowbite/Tooltip.vue +2 -2
  90. package/src/components/rating/Rating.vue +1 -1
  91. package/src/components/rating/RatingBadge.vue +1 -1
  92. package/src/components/rating/RatingIndexUI.vue +3 -3
  93. package/src/components/rating/RatingInfoModal.vue +4 -4
  94. package/src/components/rating/RatingTable.vue +4 -4
  95. package/src/components/rating/RatingUserUI.vue +2 -2
  96. package/src/components/table/TablePagination.vue +1 -1
  97. package/src/components.d.ts +1 -1
  98. package/src/composables/color.ts +2 -2
  99. package/src/composables/logo/index.ts +1 -1
  100. package/src/composables/pagination.ts +2 -2
  101. package/src/composables/rating.ts +1 -1
  102. package/src/composables/statistics.ts +1 -1
  103. package/src/composables/type.ts +4 -4
  104. package/src/composables/useQueryBoardData.ts +3 -2
  105. package/src/main.ts +9 -8
  106. package/src/modules/README.md +1 -1
  107. package/src/modules/i18n.ts +1 -1
  108. package/src/modules/nprogress.ts +1 -1
  109. package/src/modules/pinia.ts +1 -1
  110. package/src/modules/pwa.ts +1 -1
  111. package/src/modules/toast.ts +2 -2
  112. package/src/pages/index.vue +6 -6
  113. package/src/pages/rating/index.vue +2 -2
  114. package/src/shims.d.ts +10 -8
  115. package/src/styles/markdown.css +8 -11
  116. package/src/typed-router.d.ts +33 -0
  117. package/src/types.ts +1 -1
  118. package/tsconfig.json +18 -19
  119. package/vite.config.ts +32 -30
  120. package/dist/assets/Board-04b0589d.js +0 -1
  121. package/dist/assets/DataSourceInput.vue_vue_type_script_setup_true_lang-11e5a08c.js +0 -1
  122. package/dist/assets/TheInput.vue_vue_type_script_setup_true_lang-f91fd6e0.js +0 -1
  123. package/dist/assets/_...all_-905784b3.js +0 -1
  124. package/dist/assets/_name_-203db09f.js +0 -1
  125. package/dist/assets/about-d9d865e0.js +0 -11
  126. package/dist/assets/board-3f91f491.js +0 -1
  127. package/dist/assets/board-layout-967802f4.js +0 -1
  128. package/dist/assets/en-c9a8dbb5.js +0 -1
  129. package/dist/assets/headless-f3f3253c.js +0 -1
  130. package/dist/assets/home-3d9e3102.js +0 -1
  131. package/dist/assets/index-0095f855.js +0 -1
  132. package/dist/assets/index-1e2a1259.js +0 -236
  133. package/dist/assets/index-43f8e0d3.css +0 -5
  134. package/dist/assets/index-86ef642b.js +0 -1
  135. package/dist/assets/index-accb347c.css +0 -1
  136. package/dist/assets/index-b97b2d45.js +0 -1
  137. package/dist/assets/index-d51c6c02.js +0 -1
  138. package/dist/assets/index-layout-5a67cc99.js +0 -1
  139. package/dist/assets/pagination-6eac914a.js +0 -3
  140. package/dist/assets/query-ff21040c.js +0 -1
  141. package/dist/assets/test-5dd32cac.js +0 -1
  142. package/dist/assets/user-cd9a56f6.js +0 -1
  143. package/dist/assets/virtual_pwa-register-ff5720d1.js +0 -1
  144. package/dist/assets/workbox-window.prod.es5-c46a1faa.js +0 -2
  145. package/dist/assets/zh-CN-8e545f66.js +0 -1
  146. /package/dist/assets/{_...all_-c60acc8c.css → _..-8Wh-Y8sB.css} +0 -0
@@ -1,10 +1,10 @@
1
1
  import type { Problem, Submission, Team } from "@xcpcio/core";
2
2
 
3
3
  export interface AnimatedSubmissionBlockItem {
4
- submission: Submission,
5
- team: Team,
6
- problem: Problem,
7
- displayName: string,
4
+ submission: Submission;
5
+ team: Team;
6
+ problem: Problem;
7
+ displayName: string;
8
8
  }
9
9
 
10
10
  export enum LastBlockDisplayType {
@@ -1,5 +1,5 @@
1
- import { useQuery } from "@tanstack/vue-query";
2
1
  import type { Contest, Submissions, Teams } from "@xcpcio/types";
2
+ import { useQuery } from "@tanstack/vue-query";
3
3
  import { DATA_REGION } from "./constant";
4
4
 
5
5
  const RETRY = 3;
@@ -34,7 +34,8 @@ async function fetcher(target: string, timestamp?: number): Promise<BoardData> {
34
34
  const p = Promise.all([
35
35
  contestResp.json(),
36
36
  teamsResp.json(),
37
- submissionsResp.json()]).then((res) => {
37
+ submissionsResp.json(),
38
+ ]).then((res) => {
38
39
  return {
39
40
  contest: res[0],
40
41
  teams: res[1],
package/src/main.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { ViteSSG } from "vite-ssg";
2
- import { setupLayouts } from "virtual:generated-layouts";
1
+ import type { UserModule } from "./types";
2
+ import { VueQueryPlugin } from "@tanstack/vue-query";
3
3
 
4
4
  import FloatingVue from "floating-vue";
5
- import { VueQueryPlugin } from "@tanstack/vue-query";
6
5
 
6
+ import { setupLayouts } from "virtual:generated-layouts";
7
+ import { ViteSSG } from "vite-ssg";
8
+ import { routes } from "vue-router/auto-routes";
7
9
  // import Previewer from 'virtual:vue-component-preview'
8
10
  import App from "./App.vue";
9
- import type { UserModule } from "./types";
10
- import generatedRoutes from "~pages";
11
11
 
12
12
  import "floating-vue/dist/style.css";
13
13
  import "vue-search-select/dist/VueSearchSelect.css";
@@ -18,12 +18,13 @@ import "uno.css";
18
18
 
19
19
  import "./styles/main.css";
20
20
 
21
- const routes = setupLayouts(generatedRoutes);
22
-
23
21
  // https://github.com/antfu/vite-ssg
24
22
  export const createApp = ViteSSG(
25
23
  App,
26
- { routes, base: import.meta.env.BASE_URL },
24
+ {
25
+ routes: setupLayouts(routes),
26
+ base: import.meta.env.BASE_URL,
27
+ },
27
28
  (ctx) => {
28
29
  // install all modules under `modules/`
29
30
  Object.values(import.meta.glob<{ install: UserModule }>("./modules/*.ts", { eager: true }))
@@ -3,7 +3,7 @@
3
3
  A custom user module system. Place a `.ts` file with the following template, it will be installed automatically.
4
4
 
5
5
  ```ts
6
- import { type UserModule } from "~/types";
6
+ import type { UserModule } from "~/types";
7
7
 
8
8
  export const install: UserModule = ({ app, router, isClient }) => {
9
9
  // do something
@@ -1,6 +1,6 @@
1
1
  import type { Locale } from "vue-i18n";
2
2
  import { createI18n } from "vue-i18n";
3
- import { type UserModule } from "~/types";
3
+ import type { UserModule } from "~/types";
4
4
 
5
5
  // Import i18n resources
6
6
  // https://vitejs.dev/guide/features.html#glob-import
@@ -1,5 +1,5 @@
1
1
  import NProgress from "nprogress";
2
- import { type UserModule } from "~/types";
2
+ import type { UserModule } from "~/types";
3
3
 
4
4
  export const install: UserModule = ({ isClient, router }) => {
5
5
  if (isClient) {
@@ -1,5 +1,5 @@
1
1
  import { createPinia } from "pinia";
2
- import { type UserModule } from "~/types";
2
+ import type { UserModule } from "~/types";
3
3
 
4
4
  // Setup Pinia
5
5
  // https://pinia.vuejs.org/
@@ -1,4 +1,4 @@
1
- import { type UserModule } from "~/types";
1
+ import type { UserModule } from "~/types";
2
2
 
3
3
  // https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available
4
4
  export const install: UserModule = ({ isClient, router }) => {
@@ -1,7 +1,7 @@
1
1
  import ToastPlugin from "vue-toast-notification";
2
- import "vue-toast-notification/dist/theme-sugar.css";
2
+ import type { UserModule } from "~/types";
3
3
 
4
- import { type UserModule } from "~/types";
4
+ import "vue-toast-notification/dist/theme-sugar.css";
5
5
 
6
6
  export const install: UserModule = ({ app }) => {
7
7
  app.use(ToastPlugin, {
@@ -1,13 +1,13 @@
1
1
  <script setup lang="ts">
2
+ import type { ContestIndexList } from "@xcpcio/core";
3
+
2
4
  import { useFetch } from "@vueuse/core";
3
5
  import { useRouteQuery } from "@vueuse/router";
4
-
5
6
  import { createContestIndexList } from "@xcpcio/core";
6
- import type { ContestIndexList } from "@xcpcio/core";
7
7
 
8
- import { TITLE_SUFFIX } from "~/composables/constant";
9
- import SearchInput from "~/components/SearchInput.vue";
10
8
  import ContestIndexUI from "~/components/ContestIndexUI.vue";
9
+ import SearchInput from "~/components/SearchInput.vue";
10
+ import { TITLE_SUFFIX } from "~/composables/constant";
11
11
 
12
12
  const { t } = useI18n();
13
13
  useTitle(TITLE_SUFFIX);
@@ -42,8 +42,8 @@ function onSearch() {
42
42
  s.value = searchText.value;
43
43
 
44
44
  if (c.contest.name.includes(searchText.value)
45
- || c.contest.name.toLowerCase().includes(searchText.value.toLowerCase())
46
- || c.boardLink.toLocaleLowerCase().includes(searchText.value.toLowerCase())) {
45
+ || c.contest.name.toLowerCase().includes(searchText.value.toLowerCase())
46
+ || c.boardLink.toLocaleLowerCase().includes(searchText.value.toLowerCase())) {
47
47
  return true;
48
48
  }
49
49
 
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
- import { useFetch } from "@vueuse/core";
3
-
4
2
  import type { IRatingIndex } from "@xcpcio/types";
5
3
 
4
+ import { useFetch } from "@vueuse/core";
5
+
6
6
  const { t } = useI18n();
7
7
  useTitle(RATING_TITLE_SUFFIX);
8
8
 
package/src/shims.d.ts CHANGED
@@ -6,14 +6,16 @@ declare interface Window {
6
6
  }
7
7
 
8
8
  // with vite-plugin-vue-markdown, markdown files can be treated as Vue components
9
- declare module '*.md' {
10
- import { type DefineComponent } from 'vue'
11
- const component: DefineComponent<{}, {}, any>
12
- export default component
9
+ declare module "*.md" {
10
+ import type { DefineComponent } from "vue";
11
+
12
+ const component: DefineComponent<object, object, any>;
13
+ export default component;
13
14
  }
14
15
 
15
- declare module '*.vue' {
16
- import { type DefineComponent } from 'vue'
17
- const component: DefineComponent<{}, {}, any>
18
- export default component
16
+ declare module "*.vue" {
17
+ import type { DefineComponent } from "vue";
18
+
19
+ const component: DefineComponent<object, object, any>;
20
+ export default component;
19
21
  }
@@ -12,17 +12,14 @@
12
12
  width: 100%;
13
13
  }
14
14
 
15
- .shiki-light {
16
- background: #f8f8f8 !important;
17
- }
18
- .shiki-dark {
19
- background: #0e0e0e !important;
20
- }
21
-
22
- html.dark .shiki-light {
23
- display: none;
15
+ .shiki,
16
+ .shiki span {
17
+ color: var(--shiki-light);
18
+ background: var(--shiki-light-bg);
24
19
  }
25
20
 
26
- html:not(.dark) .shiki-dark {
27
- display: none;
21
+ html.dark .shiki,
22
+ html.dark .shiki span {
23
+ color: var(--shiki-dark);
24
+ background: var(--shiki-dark-bg);
28
25
  }
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ /* prettier-ignore */
3
+ // @ts-nocheck
4
+ // Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
5
+ // It's recommended to commit this file.
6
+ // Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
7
+
8
+ declare module 'vue-router/auto-routes' {
9
+ import type {
10
+ RouteRecordInfo,
11
+ ParamValue,
12
+ ParamValueOneOrMore,
13
+ ParamValueZeroOrMore,
14
+ ParamValueZeroOrOne,
15
+ } from 'vue-router'
16
+
17
+ /**
18
+ * Route name map generated by unplugin-vue-router
19
+ */
20
+ export interface RouteNamedMap {
21
+ '/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
22
+ '/[...all]': RouteRecordInfo<'/[...all]', '/:all(.*)', { all: ParamValue<true> }, { all: ParamValue<false> }>,
23
+ '/about': RouteRecordInfo<'/about', '/about', Record<never, never>, Record<never, never>>,
24
+ '/balloon/': RouteRecordInfo<'/balloon/', '/balloon', Record<never, never>, Record<never, never>>,
25
+ '/board': RouteRecordInfo<'/board', '/board', Record<never, never>, Record<never, never>>,
26
+ '/countdown/': RouteRecordInfo<'/countdown/', '/countdown', Record<never, never>, Record<never, never>>,
27
+ '/hi/[name]': RouteRecordInfo<'/hi/[name]', '/hi/:name', { name: ParamValue<true> }, { name: ParamValue<false> }>,
28
+ '/rating/': RouteRecordInfo<'/rating/', '/rating', Record<never, never>, Record<never, never>>,
29
+ '/rating/[...all]': RouteRecordInfo<'/rating/[...all]', '/rating/:all(.*)', { all: ParamValue<true> }, { all: ParamValue<false> }>,
30
+ '/resolver/': RouteRecordInfo<'/resolver/', '/resolver', Record<never, never>, Record<never, never>>,
31
+ '/test': RouteRecordInfo<'/test', '/test', Record<never, never>, Record<never, never>>,
32
+ }
33
+ }
package/src/types.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { type ViteSSGContext } from "vite-ssg";
1
+ import type { ViteSSGContext } from "vite-ssg";
2
2
 
3
3
  export type UserModule = (ctx: ViteSSGContext) => void;
package/tsconfig.json CHANGED
@@ -1,33 +1,32 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "baseUrl": ".",
4
- "module": "ESNext",
5
3
  "target": "ESNext",
6
- "lib": ["DOM", "ESNext"],
7
- "strict": true,
8
- "esModuleInterop": true,
9
4
  "jsx": "preserve",
10
- "skipLibCheck": true,
11
- "isolatedModules": true,
12
- "moduleResolution": "node",
5
+ "lib": ["DOM", "ESNext"],
6
+ "baseUrl": ".",
7
+ "module": "ESNext",
8
+ "moduleResolution": "Bundler",
9
+ "paths": {
10
+ "~/*": ["src/*"]
11
+ },
13
12
  "resolveJsonModule": true,
14
- "noUnusedLocals": true,
15
- "strictNullChecks": true,
16
- "allowJs": true,
17
- "forceConsistentCasingInFileNames": true,
18
13
  "types": [
19
14
  "vitest",
20
15
  "vite/client",
21
- "vue/ref-macros",
22
- "vite-plugin-pages/client",
23
- "vite-plugin-vue-component-preview/client",
24
16
  "vite-plugin-vue-layouts/client",
25
17
  "vite-plugin-pwa/client",
26
- "unplugin-vue-macros/macros-global"
18
+ "unplugin-vue-macros/macros-global",
19
+ "unplugin-vue-router/client"
27
20
  ],
28
- "paths": {
29
- "~/*": ["src/*"]
30
- }
21
+ "allowJs": true,
22
+ "strict": true,
23
+ "strictNullChecks": true,
24
+ "noUnusedLocals": true,
25
+ "noEmit": true,
26
+ "esModuleInterop": true,
27
+ "forceConsistentCasingInFileNames": true,
28
+ "isolatedModules": true,
29
+ "skipLibCheck": true
31
30
  },
32
31
  "vueCompilerOptions": {
33
32
  "plugins": [
package/vite.config.ts CHANGED
@@ -1,22 +1,22 @@
1
1
  import path from "node:path";
2
-
3
- import { defineConfig } from "vite";
4
- import Vue from "@vitejs/plugin-vue";
5
- import Pages from "vite-plugin-pages";
6
- import generateSitemap from "vite-ssg-sitemap";
7
- import Layouts from "vite-plugin-vue-layouts";
8
- import Components from "unplugin-vue-components/vite";
9
- import AutoImport from "unplugin-auto-import/vite";
10
- import Markdown from "vite-plugin-vue-markdown";
11
- import { VitePWA } from "vite-plugin-pwa";
12
2
  import VueI18n from "@intlify/unplugin-vue-i18n/vite";
13
- import VueDevTools from "vite-plugin-vue-devtools";
3
+ import Shiki from "@shikijs/markdown-it";
4
+ import Vue from "@vitejs/plugin-vue";
14
5
  import LinkAttributes from "markdown-it-link-attributes";
15
6
  import Unocss from "unocss/vite";
16
- import Shiki from "markdown-it-shiki";
7
+ import AutoImport from "unplugin-auto-import/vite";
8
+ import Components from "unplugin-vue-components/vite";
17
9
  import VueMacros from "unplugin-vue-macros/vite";
18
- import WebfontDownload from "vite-plugin-webfont-dl";
10
+ import Markdown from "unplugin-vue-markdown/vite";
11
+ import { VueRouterAutoImports } from "unplugin-vue-router";
12
+ import VueRouter from "unplugin-vue-router/vite";
13
+ import { defineConfig } from "vite";
19
14
  import { createHtmlPlugin } from "vite-plugin-html";
15
+ import { VitePWA } from "vite-plugin-pwa";
16
+ import VueDevTools from "vite-plugin-vue-devtools";
17
+ import Layouts from "vite-plugin-vue-layouts";
18
+ import WebfontDownload from "vite-plugin-webfont-dl";
19
+ import generateSitemap from "vite-ssg-sitemap";
20
20
 
21
21
  import packageJSON from "./package.json";
22
22
 
@@ -42,9 +42,10 @@ export default defineConfig({
42
42
  },
43
43
  }),
44
44
 
45
- // https://github.com/hannoeru/vite-plugin-pages
46
- Pages({
47
- extensions: ["vue", "md"],
45
+ // https://github.com/posva/unplugin-vue-router
46
+ VueRouter({
47
+ extensions: [".vue", ".md"],
48
+ dts: "src/typed-router.d.ts",
48
49
  }),
49
50
 
50
51
  // https://github.com/JohnCampionJr/vite-plugin-vue-layouts
@@ -54,10 +55,14 @@ export default defineConfig({
54
55
  AutoImport({
55
56
  imports: [
56
57
  "vue",
57
- "vue-router",
58
58
  "vue-i18n",
59
59
  "@vueuse/head",
60
60
  "@vueuse/core",
61
+ VueRouterAutoImports,
62
+ {
63
+ // add any other imports you were relying on
64
+ "vue-router/auto": ["useLink"],
65
+ },
61
66
  ],
62
67
  dts: "src/auto-imports.d.ts",
63
68
  dirs: [
@@ -80,19 +85,12 @@ export default defineConfig({
80
85
  // see uno.config.ts for config
81
86
  Unocss(),
82
87
 
83
- // https://github.com/antfu/vite-plugin-vue-markdown
88
+ // https://github.com/unplugin/unplugin-vue-markdown
84
89
  // Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite
85
90
  Markdown({
86
91
  wrapperClasses: "prose prose-sm m-auto text-left",
87
92
  headEnabled: true,
88
- markdownItSetup(md) {
89
- // https://prismjs.com/
90
- md.use(Shiki, {
91
- theme: {
92
- light: "vitesse-light",
93
- dark: "vitesse-dark",
94
- },
95
- });
93
+ async markdownItSetup(md) {
96
94
  md.use(LinkAttributes, {
97
95
  matcher: (link: string) => /^https?:\/\//.test(link),
98
96
  attrs: {
@@ -100,6 +98,13 @@ export default defineConfig({
100
98
  rel: "noopener",
101
99
  },
102
100
  });
101
+ md.use(await Shiki({
102
+ defaultColor: false,
103
+ themes: {
104
+ light: "vitesse-light",
105
+ dark: "vitesse-dark",
106
+ },
107
+ }));
103
108
  },
104
109
  }),
105
110
 
@@ -166,9 +171,6 @@ export default defineConfig({
166
171
  test: {
167
172
  include: ["test/**/*.test.ts"],
168
173
  environment: "jsdom",
169
- deps: {
170
- inline: ["@vue", "@vueuse", "vue-demi"],
171
- },
172
174
  },
173
175
 
174
176
  // https://github.com/antfu/vite-ssg
@@ -199,7 +201,7 @@ export default defineConfig({
199
201
  experimental: {
200
202
  // eslint-disable-next-line unused-imports/no-unused-vars
201
203
  renderBuiltUrl(filename: string, { hostType }: { hostType: "js" | "css" | "html" }) {
202
- // eslint-disable-next-line n/prefer-global/process
204
+ // eslint-disable-next-line node/prefer-global/process
203
205
  if (process.env.BUILD_MODE === "npm_publish") {
204
206
  const tag = packageJSON.version;
205
207
  return `https://cdn.jsdelivr.net/npm/@xcpcio/board-app@${tag}/dist/${filename}`;