✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
feat: remove firaMono
AykutSarac0bf452c9067f
diff --git a/src/constants/fonts.ts b/src/constants/fonts.tsindex 1b8567f1..c1c1996d 100644--- a/src/constants/fonts.ts+++ b/src/constants/fonts.ts@@ -1,4 +1,3 @@-import { Fira_Mono } from "next/font/google";import localFont from "next/font/local";const monaSans = localFont({@@ -8,11 +7,4 @@ const monaSans = localFont({fallback: ["Futura, Helvetica, sans-serif", "Tahoma, Verdana, sans-serif"],});-const firaMono = Fira_Mono({- weight: ["500"],- subsets: ["latin"],- display: "swap",- fallback: ["Menlo, Monaco, monospace", "Consolas, Courier New, monospace"],-});--export { monaSans, firaMono };+export { monaSans };diff --git a/src/containers/Editor/LiveEditor.tsx b/src/containers/Editor/LiveEditor.tsxindex 8ef5ce5a..8b41beb1 100644--- a/src/containers/Editor/LiveEditor.tsx+++ b/src/containers/Editor/LiveEditor.tsx@@ -1,6 +1,5 @@import React from "react";import styled from "styled-components";-import { firaMono } from "src/constants/fonts";import { Graph } from "src/containers/Views/GraphView";import { TreeView } from "src/containers/Views/TreeView";import { ViewMode } from "src/enums/viewMode.enum";@@ -16,7 +15,7 @@ const StyledLiveEditor = styled.div`& > ul {margin-top: 0 !important;padding: 12px !important;- font-family: ${firaMono.style.fontFamily};+ font-family: monospace;font-size: 14px;font-weight: 500;}diff --git a/src/containers/Views/GraphView/CustomNode/styles.tsx b/src/containers/Views/GraphView/CustomNode/styles.tsxindex a63fb8d4..d4fc2c64 100644--- a/src/containers/Views/GraphView/CustomNode/styles.tsx+++ b/src/containers/Views/GraphView/CustomNode/styles.tsx@@ -1,6 +1,5 @@import styled, { DefaultTheme } from "styled-components";import { LinkItUrl } from "react-linkify-it";-import { firaMono } from "src/constants/fonts";type TextColorFn = {theme: DefaultTheme;@@ -34,7 +33,7 @@ export const StyledLinkItUrl = styled(LinkItUrl)`export const StyledForeignObject = styled.foreignObject<{ $isObject?: boolean }>`text-align: ${({ $isObject }) => !$isObject && "center"};color: ${({ theme }) => theme.NODE_COLORS.TEXT};- font-family: ${firaMono.style.fontFamily};+ font-family: monospace;font-size: 12px;font-weight: 500;overflow: hidden;diff --git a/src/lib/utils/graph/calculateNodeSize.ts b/src/lib/utils/graph/calculateNodeSize.tsindex 181ab8df..5a267175 100644--- a/src/lib/utils/graph/calculateNodeSize.ts+++ b/src/lib/utils/graph/calculateNodeSize.ts@@ -1,4 +1,3 @@-import { firaMono } from "src/constants/fonts";import useConfig from "src/store/useConfig";type Text = string | [string, string][];@@ -34,7 +33,7 @@ const calculateWidthAndHeight = (str: string, single = false) => {dummyElement.style.padding = "10px";dummyElement.style.fontWeight = "500";dummyElement.style.overflowWrap = "break-word";- dummyElement.style.fontFamily = firaMono.style.fontFamily;+ dummyElement.style.fontFamily = "monospace";document.body.appendChild(dummyElement);const clientRect = dummyElement.getBoundingClientRect();