refactor: prepare vue components for vapor mode (#38798)

Removes what would block a later switch to Vue's vapor mode:
`vue-chartjs` and the `SvgIcon` render function are virtual DOM
components, and `v-memo` has no vapor equivalent. This does not adopt
vapor mode, which will be stable in upcoming Vue 3.6.

`vue-chartjs` was a thin wrapper over chart.js, so a local
`ChartCanvas.vue` replaces it. Chart data and options move into computed
values to keep their object identity, which is what `v-memo` was
compensating for.

`chartjs-adapter-dayjs-4` is moved first-party, just ~40 lines that are
easy to maintain.
This commit is contained in:
silverwind
2026-08-07 14:38:31 +02:00
committed by GitHub
parent d86cb1a498
commit e81ab0a5ea
22 changed files with 178 additions and 145 deletions
+1 -3
View File
@@ -37,7 +37,6 @@
"@vitejs/plugin-vue": "6.0.8",
"asciinema-player": "3.17.0",
"chart.js": "4.5.1",
"chartjs-adapter-dayjs-4": "1.0.4",
"chartjs-plugin-zoom": "2.2.0",
"clippie": "4.2.1",
"codemirror-lang-elixir": "4.0.1",
@@ -66,8 +65,7 @@
"vanilla-colorful": "0.7.2",
"vite": "8.1.5",
"vite-string-plugin": "2.0.5",
"vue": "3.5.40",
"vue-chartjs": "5.3.4"
"vue": "3.5.40"
},
"devDependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "4.7.2",