diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml index e333497..dc93faf 100644 --- a/.github/workflows/ci-checks.yml +++ b/.github/workflows/ci-checks.yml @@ -41,7 +41,9 @@ jobs: - name: Build Dev run: npm run build-dev --workspace=packages/browser-extension - name: Build Prod - run: npm run build-prod --workspace=packages/browser-extension + run: | + npm run build-prod --workspace=packages/browser-extension + npm run build --workspace=packages/web-app playwright: runs-on: ubuntu-latest container: diff --git a/package-lock.json b/package-lock.json index 12cfeff..8387ae6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4246,7 +4246,8 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.4.1.tgz", "integrity": "sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==", - "devOptional": true, + "dev": true, + "optional": true, "dependencies": { "detect-libc": "^1.0.3", "is-glob": "^4.0.3", @@ -9194,7 +9195,8 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "devOptional": true, + "dev": true, + "optional": true, "bin": { "detect-libc": "bin/detect-libc.js" }, @@ -11806,7 +11808,8 @@ "version": "4.3.7", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", - "devOptional": true + "dev": true, + "peer": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -14467,7 +14470,8 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "devOptional": true + "dev": true, + "optional": true }, "node_modules/node-dir": { "version": "0.1.17", @@ -16180,14 +16184,13 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.79.5", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.79.5.tgz", - "integrity": "sha512-W1h5kp6bdhqFh2tk3DsI771MoEJjvrSY/2ihJRJS4pjIyfJCw0nTsxqhnrUzaLMOJjFchj8rOvraI/YUVjtx5g==", + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.81.0.tgz", + "integrity": "sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA==", "devOptional": true, "dependencies": { - "@parcel/watcher": "^2.4.1", "chokidar": "^4.0.0", - "immutable": "^4.0.0", + "immutable": "^5.0.2", "source-map-js": ">=0.6.2 <2.0.0" }, "bin": { @@ -16195,6 +16198,9 @@ }, "engines": { "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" } }, "node_modules/sass-embedded": { @@ -16612,6 +16618,12 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/sass/node_modules/immutable": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", + "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", + "devOptional": true + }, "node_modules/sass/node_modules/readdirp": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", diff --git a/packages/graph-view/src/graphView/GraphView.scss b/packages/graph-view/src/graphView/GraphView.scss index eca0574..abf3466 100644 --- a/packages/graph-view/src/graphView/GraphView.scss +++ b/packages/graph-view/src/graphView/GraphView.scss @@ -1,5 +1,5 @@ @use "sass:color"; -@import "../colors"; +@use "../colors" as c; p { margin: 0; @@ -7,14 +7,14 @@ p { .hover-highlight { border-width: 3px; - border-color: $carrot; + border-color: c.$carrot; border-style: solid; transition: border 0.1s ease; } .selected { border-width: 3px; - border-color: $sunflower; + border-color: c.$sunflower; border-style: solid; transition: border 0.1s ease; } @@ -32,8 +32,8 @@ p { cursor: pointer; } -$positive-color: color.scale($nephritis, $lightness: 40%); -$negative-color: color.scale($pomegranate, $lightness: 60%); +$positive-color: color.scale(c.$nephritis, $lightness: 40%); +$negative-color: color.scale(c.$pomegranate, $lightness: 60%); .node-outcome-positive { background-color: $positive-color; @@ -42,7 +42,7 @@ $negative-color: color.scale($pomegranate, $lightness: 60%); background-color: $negative-color; } .node-outcome-neutral { - background-color: color.scale($belizeHole, $lightness: 80%); + background-color: color.scale(c.$belizeHole, $lightness: 80%); } .node-outcome-contradictory { background-image: linear-gradient( diff --git a/packages/web-app/next.config.js b/packages/web-app/next.config.js index ce2fa45..f0ca034 100644 --- a/packages/web-app/next.config.js +++ b/packages/web-app/next.config.js @@ -1,4 +1,5 @@ /** @type {import('next').NextConfig} */ + const nextConfig = { reactStrictMode: true, transpilePackages: [ @@ -25,15 +26,6 @@ const nextConfig = { ...config.resolve.extensions, ]; - // Add rule for font files - config.module.rules.push({ - test: /\.(woff|woff2|eot|ttf|otf)$/i, - type: "asset/resource", - generator: { - filename: "static/fonts/[hash][ext][query]", - }, - }); - return config; }, experimental: { diff --git a/packages/web-app/package.json b/packages/web-app/package.json index 524112d..dfde187 100644 --- a/packages/web-app/package.json +++ b/packages/web-app/package.json @@ -5,7 +5,7 @@ "scripts": { "connect-db-local": "psql -h localhost -p 5432 -U sophistree -d sophistree", "dev": "npm run prisma:generate && NODE_OPTIONS=--inspect next dev", - "build": "next build", + "build": "npm run prisma:generate && next build", "start": "next start", "check-all": "time (npm run type-check && npm run lint && npm run format-check && npm test) || { echo 'Checks failed'; exit 1; }", "format-fix": "prettier --write .", diff --git a/packages/web-app/public/fonts/AntDesign.ttf b/packages/web-app/public/fonts/AntDesign.ttf new file mode 100644 index 0000000..2abf035 Binary files /dev/null and b/packages/web-app/public/fonts/AntDesign.ttf differ diff --git a/packages/web-app/public/fonts/Entypo.ttf b/packages/web-app/public/fonts/Entypo.ttf new file mode 100644 index 0000000..76d91cb Binary files /dev/null and b/packages/web-app/public/fonts/Entypo.ttf differ diff --git a/packages/web-app/public/fonts/EvilIcons.ttf b/packages/web-app/public/fonts/EvilIcons.ttf new file mode 100644 index 0000000..6868f7b Binary files /dev/null and b/packages/web-app/public/fonts/EvilIcons.ttf differ diff --git a/packages/web-app/public/fonts/Feather.ttf b/packages/web-app/public/fonts/Feather.ttf new file mode 100644 index 0000000..49698e7 Binary files /dev/null and b/packages/web-app/public/fonts/Feather.ttf differ diff --git a/packages/web-app/public/fonts/FontAwesome.ttf b/packages/web-app/public/fonts/FontAwesome.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/packages/web-app/public/fonts/FontAwesome.ttf differ diff --git a/packages/web-app/public/fonts/FontAwesome5_Brands.ttf b/packages/web-app/public/fonts/FontAwesome5_Brands.ttf new file mode 100644 index 0000000..fc567cd Binary files /dev/null and b/packages/web-app/public/fonts/FontAwesome5_Brands.ttf differ diff --git a/packages/web-app/public/fonts/FontAwesome5_Regular.ttf b/packages/web-app/public/fonts/FontAwesome5_Regular.ttf new file mode 100644 index 0000000..d1ac9ba Binary files /dev/null and b/packages/web-app/public/fonts/FontAwesome5_Regular.ttf differ diff --git a/packages/web-app/public/fonts/FontAwesome5_Solid.ttf b/packages/web-app/public/fonts/FontAwesome5_Solid.ttf new file mode 100644 index 0000000..f33e816 Binary files /dev/null and b/packages/web-app/public/fonts/FontAwesome5_Solid.ttf differ diff --git a/packages/web-app/public/fonts/FontAwesome6_Brands.ttf b/packages/web-app/public/fonts/FontAwesome6_Brands.ttf new file mode 100644 index 0000000..08362f3 Binary files /dev/null and b/packages/web-app/public/fonts/FontAwesome6_Brands.ttf differ diff --git a/packages/web-app/public/fonts/FontAwesome6_Regular.ttf b/packages/web-app/public/fonts/FontAwesome6_Regular.ttf new file mode 100644 index 0000000..7f9b53c Binary files /dev/null and b/packages/web-app/public/fonts/FontAwesome6_Regular.ttf differ diff --git a/packages/web-app/public/fonts/FontAwesome6_Solid.ttf b/packages/web-app/public/fonts/FontAwesome6_Solid.ttf new file mode 100644 index 0000000..e7e2ecf Binary files /dev/null and b/packages/web-app/public/fonts/FontAwesome6_Solid.ttf differ diff --git a/packages/web-app/public/fonts/Fontisto.ttf b/packages/web-app/public/fonts/Fontisto.ttf new file mode 100755 index 0000000..96e2e81 Binary files /dev/null and b/packages/web-app/public/fonts/Fontisto.ttf differ diff --git a/packages/web-app/public/fonts/Foundation.ttf b/packages/web-app/public/fonts/Foundation.ttf new file mode 100644 index 0000000..6cce217 Binary files /dev/null and b/packages/web-app/public/fonts/Foundation.ttf differ diff --git a/packages/web-app/public/fonts/Ionicons.ttf b/packages/web-app/public/fonts/Ionicons.ttf new file mode 100644 index 0000000..c870085 Binary files /dev/null and b/packages/web-app/public/fonts/Ionicons.ttf differ diff --git a/packages/web-app/public/fonts/MaterialCommunityIcons.ttf b/packages/web-app/public/fonts/MaterialCommunityIcons.ttf new file mode 100644 index 0000000..ba87359 Binary files /dev/null and b/packages/web-app/public/fonts/MaterialCommunityIcons.ttf differ diff --git a/packages/web-app/public/fonts/MaterialIcons.ttf b/packages/web-app/public/fonts/MaterialIcons.ttf new file mode 100644 index 0000000..9d09b0f Binary files /dev/null and b/packages/web-app/public/fonts/MaterialIcons.ttf differ diff --git a/packages/web-app/public/fonts/Octicons.ttf b/packages/web-app/public/fonts/Octicons.ttf new file mode 100644 index 0000000..f8daedc Binary files /dev/null and b/packages/web-app/public/fonts/Octicons.ttf differ diff --git a/packages/web-app/public/fonts/SimpleLineIcons.ttf b/packages/web-app/public/fonts/SimpleLineIcons.ttf new file mode 100644 index 0000000..6ecb686 Binary files /dev/null and b/packages/web-app/public/fonts/SimpleLineIcons.ttf differ diff --git a/packages/web-app/public/fonts/Zocial.ttf b/packages/web-app/public/fonts/Zocial.ttf new file mode 100644 index 0000000..e2b5fbb Binary files /dev/null and b/packages/web-app/public/fonts/Zocial.ttf differ diff --git a/packages/web-app/src/app/layout.tsx b/packages/web-app/src/app/layout.tsx index 00aa4c6..a7b0902 100644 --- a/packages/web-app/src/app/layout.tsx +++ b/packages/web-app/src/app/layout.tsx @@ -1,10 +1,17 @@ +"use client"; + import React from "react"; import { Providers } from "./providers"; +import { Roboto } from "next/font/google"; +import localFont from "next/font/local"; -export const metadata = { - title: "Sophistree", - description: "Argument mapping platform", -}; +const roboto = Roboto({ weight: ["400", "500", "700"], subsets: ["latin"] }); +const materialIcons = localFont({ + src: "../../public/fonts/MaterialIcons.ttf", +}); +const materialCommunityIcons = localFont({ + src: "../../public/fonts/MaterialCommunityIcons.ttf", +}); export default function RootLayout({ children, @@ -13,13 +20,18 @@ export default function RootLayout({ }) { return ( -
- {/* eslint-disable-next-line @next/next/no-page-custom-font */} - - +