@xcpcio/board-app 0.6.3 → 0.13.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 (112) hide show
  1. package/.eslintrc.json +6 -0
  2. package/LICENSE +1 -1
  3. package/README.md +13 -30
  4. package/cypress.config.ts +14 -0
  5. package/dist/_headers +3 -0
  6. package/dist/about.html +11 -0
  7. package/dist/assets/_...all_-27c7ae93.css +1 -0
  8. package/dist/assets/_...all_-d56798b5.js +3 -0
  9. package/dist/assets/_name_-8eab6137.js +1 -0
  10. package/dist/assets/about-a8cb8700.js +11 -0
  11. package/dist/assets/app-37f77a84.js +65 -0
  12. package/dist/assets/board-layout-deaedfc1.js +1 -0
  13. package/dist/assets/en-caedd340.js +1 -0
  14. package/dist/assets/home-49c336e5.js +1 -0
  15. package/dist/assets/index-a270cacd.css +5 -0
  16. package/dist/assets/index-layout-d65c80ea.js +1 -0
  17. package/dist/assets/test-0a3d6f7a.js +1 -0
  18. package/dist/assets/user-108782a1.js +1 -0
  19. package/dist/assets/virtual_pwa-register-1c1b9161.js +1 -0
  20. package/dist/assets/workbox-window.prod.es5-a7b12eab.js +2 -0
  21. package/dist/assets/zh-CN-86269804.js +1 -0
  22. package/dist/favicon-dark.svg +1 -0
  23. package/dist/favicon.svg +1 -0
  24. package/dist/index.html +1 -171
  25. package/dist/manifest.webmanifest +1 -0
  26. package/dist/pwa-192x192.png +0 -0
  27. package/dist/pwa-512x512.png +0 -0
  28. package/dist/robots.txt +4 -0
  29. package/dist/safari-pinned-tab.svg +41 -0
  30. package/dist/sitemap.xml +1 -0
  31. package/dist/ssr-manifest.json +486 -0
  32. package/dist/sw.js +1 -0
  33. package/dist/test.html +1 -0
  34. package/dist/workbox-b8d87ee1.js +1 -0
  35. package/package.json +94 -50
  36. package/public/_headers +3 -0
  37. package/public/favicon-dark.svg +1 -0
  38. package/public/favicon.svg +1 -0
  39. package/public/pwa-192x192.png +0 -0
  40. package/public/pwa-512x512.png +0 -0
  41. package/public/safari-pinned-tab.svg +41 -0
  42. package/src/App.vue +33 -0
  43. package/src/auto-imports.d.ts +909 -0
  44. package/src/components/ContestIndex.vue +227 -0
  45. package/src/components/Footer.vue +94 -0
  46. package/src/components/GoBack.vue +22 -0
  47. package/src/components/NavBar.vue +152 -0
  48. package/src/components/SearchInput.vue +50 -0
  49. package/src/components/TheCounter.vue +19 -0
  50. package/src/components/TheInput.vue +20 -0
  51. package/src/components/board/Balloon.vue +5 -0
  52. package/src/components/board/Board.vue +396 -0
  53. package/src/components/board/BottomStatistics.vue +159 -0
  54. package/src/components/board/ContestStateBadge.vue +41 -0
  55. package/src/components/board/Export.vue +75 -0
  56. package/src/components/board/Modal.vue +107 -0
  57. package/src/components/board/ModalMenu.vue +64 -0
  58. package/src/components/board/OptionsModal.vue +179 -0
  59. package/src/components/board/Progress.less +442 -0
  60. package/src/components/board/Progress.vue +229 -0
  61. package/src/components/board/SecondLevelMenu.vue +190 -0
  62. package/src/components/board/Standings.less +1162 -0
  63. package/src/components/board/Standings.vue +154 -0
  64. package/src/components/board/StandingsAnnotate.vue +38 -0
  65. package/src/components/board/Statistics.vue +77 -0
  66. package/src/components/board/SubmissionsTable.vue +312 -0
  67. package/src/components/board/SubmissionsTableModal.vue +52 -0
  68. package/src/components/board/TeamAwards.vue +93 -0
  69. package/src/components/board/TeamInfoModal.vue +128 -0
  70. package/src/components/board/TeamProblemBlock.vue +100 -0
  71. package/src/components/board/TeamUI.vue +161 -0
  72. package/src/components/board/Utility.vue +28 -0
  73. package/src/components/icon/GirlIcon.vue +80 -0
  74. package/src/components/icon/RightArrowIcon.vue +26 -0
  75. package/src/components/icon/StarIcon.vue +19 -0
  76. package/src/components/table/TablePagination.vue +108 -0
  77. package/src/components.d.ts +44 -0
  78. package/src/composables/dark.ts +4 -0
  79. package/src/composables/pagination.ts +81 -0
  80. package/src/composables/statistics.ts +280 -0
  81. package/src/composables/useLocalStorage.ts +29 -0
  82. package/src/composables/useQueryBoardData.ts +43 -0
  83. package/src/composables/utils.ts +11 -0
  84. package/src/layouts/board-layout.vue +14 -0
  85. package/src/layouts/default.vue +10 -0
  86. package/src/layouts/home.vue +12 -0
  87. package/src/layouts/index-layout.vue +15 -0
  88. package/src/main.ts +36 -0
  89. package/src/modules/README.md +11 -0
  90. package/src/modules/i18n.ts +52 -0
  91. package/src/modules/nprogress.ts +15 -0
  92. package/src/modules/pinia.ts +18 -0
  93. package/src/modules/pwa.ts +15 -0
  94. package/src/modules/toast.ts +10 -0
  95. package/src/pages/[...all].vue +34 -0
  96. package/src/pages/about.md +21 -0
  97. package/src/pages/hi/[name].vue +50 -0
  98. package/src/pages/index.vue +129 -0
  99. package/src/pages/test.vue +57 -0
  100. package/src/shims.d.ts +16 -0
  101. package/src/stores/user.ts +36 -0
  102. package/src/styles/color.css +51 -0
  103. package/src/styles/main.css +30 -0
  104. package/src/styles/markdown.css +28 -0
  105. package/src/styles/submission-status.css +123 -0
  106. package/src/types.ts +3 -0
  107. package/tsconfig.json +39 -0
  108. package/uno.config.ts +65 -0
  109. package/vite.config.ts +176 -0
  110. package/dist/favicon.ico +0 -0
  111. package/dist/umi.00ae29f6.js +0 -1
  112. package/dist/umi.bd64c248.css +0 -1
@@ -0,0 +1,123 @@
1
+ .PENDING {
2
+ color: var(--theme-status-pending)
3
+ }
4
+
5
+ .WAITING {
6
+ color: var(--theme-status-waiting)
7
+ }
8
+
9
+ .PREPARING {
10
+ color: var(--theme-status-preparing)
11
+ }
12
+
13
+ .COMPILING {
14
+ color: var(--theme-status-compiling)
15
+ }
16
+
17
+ .RUNNING {
18
+ color: var(--theme-status-running)
19
+ }
20
+
21
+ .JUDGING {
22
+ color: var(--theme-status-running)
23
+ }
24
+
25
+ .FROZEN {
26
+ color: var(--theme-status-pending)
27
+ }
28
+
29
+
30
+ .ACCEPTED {
31
+ color: var(--theme-status-accepted)
32
+ }
33
+
34
+ .CORRECT {
35
+ color: var(--theme-status-accepted)
36
+ }
37
+
38
+ .PARTIALLY_CORRECT {
39
+ color: var(--theme-status-partially-correct)
40
+ }
41
+
42
+
43
+ .REJECTED {
44
+ color: var(--theme-status-wrong-answer)
45
+ }
46
+
47
+ .WRONG_ANSWER {
48
+ color: var(--theme-status-wrong-answer)
49
+ }
50
+
51
+
52
+ .COMPILATION_ERROR {
53
+ color: var(--theme-status-compilation-error)
54
+ }
55
+
56
+ .PRESENTATION_ERROR {
57
+ color: var(--theme-status-compilation-error)
58
+ }
59
+
60
+
61
+ .RUNTIME_ERROR {
62
+ color: var(--theme-status-runtime-error)
63
+ }
64
+
65
+ .TIME_LIMIT_EXCEEDED {
66
+ color: var(--theme-status-time-limit-exceeded)
67
+ }
68
+
69
+ .MEMORY_LIMIT_EXCEEDED {
70
+ color: var(--theme-status-memory-limit-exceeded)
71
+ }
72
+
73
+ .OUTPUT_LIMIT_EXCEEDED {
74
+ color: var(--theme-status-output-limit-exceeded)
75
+ }
76
+
77
+ .IDLENESS_LIMIT_EXCEEDED {
78
+ color: var(--theme-status-output-limit-exceeded)
79
+ }
80
+
81
+ .HACKED {
82
+ color: var(--theme-status-wrong-answer)
83
+ }
84
+
85
+ .JUDGEMENT_FAILED {
86
+ color: var(--theme-status-judgement-failed)
87
+ }
88
+
89
+ .CONFIGURATION_ERROR {
90
+ color: var(--theme-status-configuration-error)
91
+ }
92
+
93
+ .FILE_ERROR {
94
+ color: var(--theme-status-file-error)
95
+ }
96
+
97
+ .SYSTEM_ERROR {
98
+ color: var(--theme-status-system-error)
99
+ }
100
+
101
+ .CANCELED {
102
+ color: var(--theme-status-canceled)
103
+ }
104
+
105
+ .SKIPPED {
106
+ color: var(--theme-status-skipped)
107
+ }
108
+
109
+ .SECURITY_VIOLATED {
110
+ color: var(--theme-status-judgement-failed)
111
+ }
112
+
113
+ .DENIAL_OF_JUDGEMENT {
114
+ color: var(--theme-status-judgement-failed)
115
+ }
116
+
117
+ .UNKNOWN {
118
+ color: var(--theme-status-unknown)
119
+ }
120
+
121
+ .UNDEFINED {
122
+ color: var(--theme-status-undefined)
123
+ }
package/src/types.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { type ViteSSGContext } from "vite-ssg";
2
+
3
+ export type UserModule = (ctx: ViteSSGContext) => void;
package/tsconfig.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "module": "ESNext",
5
+ "target": "ESNext",
6
+ "lib": ["DOM", "ESNext"],
7
+ "strict": true,
8
+ "esModuleInterop": true,
9
+ "jsx": "preserve",
10
+ "skipLibCheck": true,
11
+ "isolatedModules": true,
12
+ "moduleResolution": "node",
13
+ "resolveJsonModule": true,
14
+ "noUnusedLocals": true,
15
+ "strictNullChecks": true,
16
+ "allowJs": true,
17
+ "forceConsistentCasingInFileNames": true,
18
+ "types": [
19
+ "vitest",
20
+ "vite/client",
21
+ "vue/ref-macros",
22
+ "vite-plugin-pages/client",
23
+ "vite-plugin-vue-component-preview/client",
24
+ "vite-plugin-vue-layouts/client",
25
+ "vite-plugin-pwa/client",
26
+ "unplugin-vue-macros/macros-global"
27
+ ],
28
+ "paths": {
29
+ "~/*": ["src/*"]
30
+ }
31
+ },
32
+ "vueCompilerOptions": {
33
+ "plugins": [
34
+ "@vue-macros/volar/define-models",
35
+ "@vue-macros/volar/define-slots"
36
+ ]
37
+ },
38
+ "exclude": ["dist", "node_modules", "cypress"]
39
+ }
package/uno.config.ts ADDED
@@ -0,0 +1,65 @@
1
+ import {
2
+ defineConfig,
3
+ presetAttributify,
4
+ presetIcons,
5
+ presetTypography,
6
+ presetUno,
7
+ presetWebFonts,
8
+ transformerDirectives,
9
+ transformerVariantGroup,
10
+ } from "unocss";
11
+
12
+ export default defineConfig({
13
+ theme: {
14
+ colors: {
15
+ primary: {
16
+ 50: "#eff6ff",
17
+ 100: "#dbeafe",
18
+ 200: "#bfdbfe",
19
+ 300: "#93c5fd",
20
+ 400: "#60a5fa",
21
+ 500: "#3b82f6",
22
+ 600: "#2563eb",
23
+ 700: "#1d4ed8",
24
+ 800: "#1e40af",
25
+ 900: "#1e3a8a",
26
+ 950: "#172554",
27
+ },
28
+ },
29
+ },
30
+ shortcuts: [
31
+ [
32
+ "btn",
33
+ "px-4 py-1 rounded inline-block bg-teal-700 text-white cursor-pointer !outline-none hover:bg-teal-800 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50",
34
+ ],
35
+ [
36
+ "icon-btn",
37
+ "inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600",
38
+ ],
39
+ ],
40
+ presets: [
41
+ presetUno(),
42
+ presetAttributify(),
43
+ presetIcons({
44
+ extraProperties: {
45
+ "display": "inline-block",
46
+ "height": "1.2em",
47
+ "width": "1.2em",
48
+ "vertical-align": "text-bottom",
49
+ },
50
+ }),
51
+ presetTypography(),
52
+ presetWebFonts({
53
+ fonts: {
54
+ // sans: "DM Sans",
55
+ // serif: "DM Serif Display",
56
+ // mono: "DM Mono",
57
+ },
58
+ }),
59
+ ],
60
+ transformers: [
61
+ transformerDirectives(),
62
+ transformerVariantGroup(),
63
+ ],
64
+ safelist: "prose m-auto text-left".split(" "),
65
+ });
package/vite.config.ts ADDED
@@ -0,0 +1,176 @@
1
+ import path from "node:path";
2
+ import { defineConfig } from "vite";
3
+ import Vue from "@vitejs/plugin-vue";
4
+ import Pages from "vite-plugin-pages";
5
+ import generateSitemap from "vite-ssg-sitemap";
6
+ import Layouts from "vite-plugin-vue-layouts";
7
+ import Components from "unplugin-vue-components/vite";
8
+ import AutoImport from "unplugin-auto-import/vite";
9
+ import Markdown from "vite-plugin-vue-markdown";
10
+ import { VitePWA } from "vite-plugin-pwa";
11
+ import VueI18n from "@intlify/unplugin-vue-i18n/vite";
12
+ import VueDevTools from "vite-plugin-vue-devtools";
13
+ import LinkAttributes from "markdown-it-link-attributes";
14
+ import Unocss from "unocss/vite";
15
+ import Shiki from "markdown-it-shiki";
16
+ import VueMacros from "unplugin-vue-macros/vite";
17
+ import WebfontDownload from "vite-plugin-webfont-dl";
18
+
19
+ export default defineConfig({
20
+ resolve: {
21
+ alias: {
22
+ "~/": `${path.resolve(__dirname, "src")}/`,
23
+ },
24
+ },
25
+
26
+ plugins: [
27
+ VueMacros({
28
+ plugins: {
29
+ vue: Vue({
30
+ include: [/\.vue$/, /\.md$/],
31
+ }),
32
+ },
33
+ }),
34
+
35
+ // https://github.com/hannoeru/vite-plugin-pages
36
+ Pages({
37
+ extensions: ["vue", "md"],
38
+ }),
39
+
40
+ // https://github.com/JohnCampionJr/vite-plugin-vue-layouts
41
+ Layouts(),
42
+
43
+ // https://github.com/antfu/unplugin-auto-import
44
+ AutoImport({
45
+ imports: [
46
+ "vue",
47
+ "vue-router",
48
+ "vue-i18n",
49
+ "@vueuse/head",
50
+ "@vueuse/core",
51
+ ],
52
+ dts: "src/auto-imports.d.ts",
53
+ dirs: [
54
+ "src/composables",
55
+ "src/stores",
56
+ ],
57
+ vueTemplate: true,
58
+ }),
59
+
60
+ // https://github.com/antfu/unplugin-vue-components
61
+ Components({
62
+ // allow auto load markdown components under `./src/components/`
63
+ extensions: ["vue", "md"],
64
+ // allow auto import and register components used in markdown
65
+ include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
66
+ dts: "src/components.d.ts",
67
+ }),
68
+
69
+ // https://github.com/antfu/unocss
70
+ // see uno.config.ts for config
71
+ Unocss(),
72
+
73
+ // https://github.com/antfu/vite-plugin-vue-markdown
74
+ // Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite
75
+ Markdown({
76
+ wrapperClasses: "prose prose-sm m-auto text-left",
77
+ headEnabled: true,
78
+ markdownItSetup(md) {
79
+ // https://prismjs.com/
80
+ md.use(Shiki, {
81
+ theme: {
82
+ light: "vitesse-light",
83
+ dark: "vitesse-dark",
84
+ },
85
+ });
86
+ md.use(LinkAttributes, {
87
+ matcher: (link: string) => /^https?:\/\//.test(link),
88
+ attrs: {
89
+ target: "_blank",
90
+ rel: "noopener",
91
+ },
92
+ });
93
+ },
94
+ }),
95
+
96
+ // https://github.com/antfu/vite-plugin-pwa
97
+ VitePWA({
98
+ registerType: "autoUpdate",
99
+ includeAssets: ["favicon.svg", "safari-pinned-tab.svg"],
100
+ manifest: {
101
+ name: "Vitesse",
102
+ short_name: "Vitesse",
103
+ theme_color: "#ffffff",
104
+ icons: [
105
+ {
106
+ src: "/pwa-192x192.png",
107
+ sizes: "192x192",
108
+ type: "image/png",
109
+ },
110
+ {
111
+ src: "/pwa-512x512.png",
112
+ sizes: "512x512",
113
+ type: "image/png",
114
+ },
115
+ {
116
+ src: "/pwa-512x512.png",
117
+ sizes: "512x512",
118
+ type: "image/png",
119
+ purpose: "any maskable",
120
+ },
121
+ ],
122
+ },
123
+ }),
124
+
125
+ // https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n
126
+ VueI18n({
127
+ runtimeOnly: true,
128
+ compositionOnly: true,
129
+ fullInstall: true,
130
+ include: [path.resolve(__dirname, "locales/**")],
131
+ }),
132
+
133
+ // https://github.com/feat-agency/vite-plugin-webfont-dl
134
+ WebfontDownload(),
135
+
136
+ // https://github.com/webfansplz/vite-plugin-vue-devtools
137
+ VueDevTools(),
138
+ ],
139
+
140
+ // https://github.com/vitest-dev/vitest
141
+ test: {
142
+ include: ["test/**/*.test.ts"],
143
+ environment: "jsdom",
144
+ deps: {
145
+ inline: ["@vue", "@vueuse", "vue-demi"],
146
+ },
147
+ },
148
+
149
+ // https://github.com/antfu/vite-ssg
150
+ ssgOptions: {
151
+ script: "async",
152
+ formatting: "minify",
153
+ crittersOptions: {
154
+ reduceInlineStyles: false,
155
+ },
156
+ onFinished() {
157
+ generateSitemap();
158
+ },
159
+ },
160
+
161
+ ssr: {
162
+ // TODO: workaround until they support native ESM
163
+ noExternal: ["workbox-window", /vue-i18n/],
164
+ },
165
+
166
+ server: {
167
+ host: true,
168
+ proxy: {
169
+ "/data": {
170
+ // target: "https://board.xcpcio.com",
171
+ target: "http://127.0.0.1:8080",
172
+ changeOrigin: true,
173
+ },
174
+ },
175
+ },
176
+ });
package/dist/favicon.ico DELETED
Binary file