chore: migrate main module to TypeScript

Migrated main module (src/main.js) to TypeScript. Fonts configuration
has been moved from JSON to TypeScript module to make fonts type
annotations easier.
This commit is contained in:
jakob.scheid committed 2026-10-25 02:24:14 +01:00
1 parent a4a857062b
commit 0140e5669e
3 files changed
+66 -33

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ import { createApp } from 'vue';
import App from './App.vue';
import './styles/common.css';
import rawFonts from './styles/fonts.json';
import rawFonts from './styles/fonts';
import './styles/variables/colors.css';
import './styles/variables/dimensions.css';
-32
View File
@@ -1,32 +0,0 @@
[
{
"family": "Inter",
"weight": "100 900",
"style": "normal",
"source": [
{
"url": "fonts/Inter/Inter-Variable.woff2",
"format": "woff2"
},
{
"url": "fonts/Inter/Inter-Variable.ttf",
"format": "truetype"
}
]
},
{
"family": "Inter",
"weight": "100 900",
"style": "italic",
"source": [
{
"url": "fonts/Inter/Inter-Italic-Variable.woff2",
"format": "woff2"
},
{
"url": "fonts/Inter/Inter-Italic-Variable.ttf",
"format": "truetype"
}
]
}
]
+65
View File
@@ -0,0 +1,65 @@
/*
Copyright 2026 Seekra
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
type FontFormat =
'woff2' | 'woff' | 'truetype' | 'opentype' | 'embedded-opentype' | 'svg';
interface FontSource {
url: string;
format: FontFormat;
}
interface RawFont {
family: string;
weight: string;
style: string;
source: FontSource[];
}
const fonts: RawFont[] = [
{
family: 'Inter',
weight: '100 900',
style: 'normal',
source: [
{
url: 'fonts/Inter/Inter-Variable.woff2',
format: 'woff2',
},
{
url: 'fonts/Inter/Inter-Variable.ttf',
format: 'truetype',
},
],
},
{
family: 'Inter',
weight: '100 900',
style: 'italic',
source: [
{
url: 'fonts/Inter/Inter-Italic-Variable.woff2',
format: 'woff2',
},
{
url: 'fonts/Inter/Inter-Italic-Variable.ttf',
format: 'truetype',
},
],
},
];
export default fonts;