✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
refactor folder structure
AykutSaracca36a4ba44ed
diff --git a/src/containers/Editor/index.tsx b/src/containers/Editor/index.tsxdeleted file mode 100644index 2694b103..00000000--- a/src/containers/Editor/index.tsx+++ /dev/null@@ -1,49 +0,0 @@-import React from "react";-import dynamic from "next/dynamic";-import styled from "styled-components";-import { Allotment } from "allotment";-import "allotment/dist/style.css";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";-import { FullscreenDropzone } from "./components/FullscreenDropzone";--export const StyledEditor = styled(Allotment)`- position: relative !important;- display: flex;- background: ${({ theme }) => theme.BACKGROUND_SECONDARY};- height: calc(100vh - 67px);-- @media only screen and (max-width: 320px) {- height: 100vh;- }-`;--const TextEditor = dynamic(() => import("src/containers/Editor/components/TextEditor"), {- ssr: false,-});--const LiveEditor = dynamic(() => import("src/containers/Editor/components/LiveEditor"), {- ssr: false,-});--export const Editor = () => {- const fullscreen = useGraph(state => state.fullscreen);-- return (- <>- <StyledEditor proportionalLayout={false}>- <Allotment.Pane- preferredSize={450}- minSize={fullscreen ? 0 : 300}- maxSize={800}- visible={!fullscreen}- >- <TextEditor />- </Allotment.Pane>- <Allotment.Pane minSize={0}>- <LiveEditor />- </Allotment.Pane>- </StyledEditor>- <FullscreenDropzone />- </>- );-};diff --git a/src/containers/Editor/components/BottomBar.tsx b/src/features/editor/BottomBar.tsxsimilarity index 98%rename from src/containers/Editor/components/BottomBar.tsxrename to src/features/editor/BottomBar.tsxindex b5c2237b..7a7ea755 100644--- a/src/containers/Editor/components/BottomBar.tsx+++ b/src/features/editor/BottomBar.tsx@@ -12,7 +12,7 @@ import {VscSync,VscSyncIgnored,} from "react-icons/vsc";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import useConfig from "src/store/useConfig";import useFile from "src/store/useFile";diff --git a/src/layout/ExternalMode.tsx b/src/features/editor/ExternalMode.tsxsimilarity index 100%rename from src/layout/ExternalMode.tsxrename to src/features/editor/ExternalMode.tsxdiff --git a/src/containers/Editor/components/FullscreenDropzone.tsx b/src/features/editor/FullscreenDropzone.tsxsimilarity index 100%rename from src/containers/Editor/components/FullscreenDropzone.tsxrename to src/features/editor/FullscreenDropzone.tsxdiff --git a/src/containers/Editor/components/LiveEditor.tsx b/src/features/editor/LiveEditor.tsxsimilarity index 86%rename from src/containers/Editor/components/LiveEditor.tsxrename to src/features/editor/LiveEditor.tsxindex 183bdd50..2fd80fbb 100644--- a/src/containers/Editor/components/LiveEditor.tsx+++ b/src/features/editor/LiveEditor.tsx@@ -1,8 +1,8 @@import React from "react";import styled from "styled-components";-import { GraphView } from "src/containers/Editor/components/views/GraphView";-import { TreeView } from "src/containers/Editor/components/views/TreeView";import { ViewMode } from "src/enums/viewMode.enum";+import { GraphView } from "src/features/editor/views/GraphView";+import { TreeView } from "src/features/editor/views/TreeView";import useConfig from "src/store/useConfig";const StyledLiveEditor = styled.div`diff --git a/src/layout/ModalController.tsx b/src/features/editor/ModalController.tsxsimilarity index 92%rename from src/layout/ModalController.tsxrename to src/features/editor/ModalController.tsxindex 47aceb79..f06e5ff6 100644--- a/src/layout/ModalController.tsx+++ b/src/features/editor/ModalController.tsx@@ -1,7 +1,7 @@import React from "react";import type { ModalProps } from "@mantine/core";-import * as Modals from "src/containers/Modals";-import type { Modal } from "src/containers/Modals";+import * as Modals from "src/features/modals";+import type { Modal } from "src/features/modals";import useModal from "src/store/useModal";type ModalComponent = { key: Modal; component: React.FC<ModalProps> };diff --git a/src/containers/Editor/components/TextEditor.tsx b/src/features/editor/TextEditor.tsxsimilarity index 100%rename from src/containers/Editor/components/TextEditor.tsxrename to src/features/editor/TextEditor.tsxdiff --git a/src/containers/Toolbar/FileMenu.tsx b/src/features/editor/Toolbar/FileMenu.tsxsimilarity index 100%rename from src/containers/Toolbar/FileMenu.tsxrename to src/features/editor/Toolbar/FileMenu.tsxdiff --git a/src/containers/Toolbar/Logo.tsx b/src/features/editor/Toolbar/Logo.tsxsimilarity index 100%rename from src/containers/Toolbar/Logo.tsxrename to src/features/editor/Toolbar/Logo.tsxdiff --git a/src/containers/Toolbar/OptionsMenu.tsx b/src/features/editor/Toolbar/OptionsMenu.tsxsimilarity index 100%rename from src/containers/Toolbar/OptionsMenu.tsxrename to src/features/editor/Toolbar/OptionsMenu.tsxdiff --git a/src/containers/Toolbar/SearchInput.tsx b/src/features/editor/Toolbar/SearchInput.tsxsimilarity index 100%rename from src/containers/Toolbar/SearchInput.tsxrename to src/features/editor/Toolbar/SearchInput.tsxdiff --git a/src/containers/Toolbar/ToolsMenu.tsx b/src/features/editor/Toolbar/ToolsMenu.tsxsimilarity index 100%rename from src/containers/Toolbar/ToolsMenu.tsxrename to src/features/editor/Toolbar/ToolsMenu.tsxdiff --git a/src/containers/Toolbar/ViewMenu.tsx b/src/features/editor/Toolbar/ViewMenu.tsxsimilarity index 98%rename from src/containers/Toolbar/ViewMenu.tsxrename to src/features/editor/Toolbar/ViewMenu.tsxindex 3e95ddf9..0784f84c 100644--- a/src/containers/Toolbar/ViewMenu.tsx+++ b/src/features/editor/Toolbar/ViewMenu.tsx@@ -7,8 +7,8 @@ import toast from "react-hot-toast";import { CgChevronDown } from "react-icons/cg";import { TiFlowMerge } from "react-icons/ti";import { VscExpandAll, VscCollapseAll, VscTarget } from "react-icons/vsc";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";import { ViewMode } from "src/enums/viewMode.enum";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import useToggleHide from "src/hooks/useToggleHide";import useConfig from "src/store/useConfig";import type { LayoutDirection } from "src/types/graph";diff --git a/src/containers/Toolbar/ZoomMenu.tsx b/src/features/editor/Toolbar/ZoomMenu.tsxsimilarity index 97%rename from src/containers/Toolbar/ZoomMenu.tsxrename to src/features/editor/Toolbar/ZoomMenu.tsxindex e46ca910..d616d8b6 100644--- a/src/containers/Toolbar/ZoomMenu.tsx+++ b/src/features/editor/Toolbar/ZoomMenu.tsx@@ -3,7 +3,7 @@ import { Menu, Flex, Input, Text } from "@mantine/core";import { getHotkeyHandler, useHotkeys } from "@mantine/hooks";import { event as gaEvent } from "nextjs-google-analytics";import { CgChevronDown } from "react-icons/cg";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import { StyledToolElement } from "./styles";export const ZoomMenu = () => {diff --git a/src/containers/Toolbar/index.tsx b/src/features/editor/Toolbar/index.tsxsimilarity index 97%rename from src/containers/Toolbar/index.tsxrename to src/features/editor/Toolbar/index.tsxindex 415da128..7b12870d 100644--- a/src/containers/Toolbar/index.tsx+++ b/src/features/editor/Toolbar/index.tsx@@ -5,8 +5,8 @@ import toast from "react-hot-toast";import { AiOutlineFullscreen } from "react-icons/ai";import { FiDownload } from "react-icons/fi";import { LuCrown } from "react-icons/lu";-import { SearchInput } from "src/containers/Toolbar/SearchInput";import { type FileFormat, formats } from "src/enums/file.enum";+import { SearchInput } from "src/features/editor/Toolbar/SearchInput";import { JSONCrackLogo } from "src/layout/JsonCrackLogo";import useFile from "src/store/useFile";import useModal from "src/store/useModal";diff --git a/src/containers/Toolbar/styles.ts b/src/features/editor/Toolbar/styles.tssimilarity index 100%rename from src/containers/Toolbar/styles.tsrename to src/features/editor/Toolbar/styles.tsdiff --git a/src/containers/Editor/components/views/GraphView/CustomEdge/index.tsx b/src/features/editor/views/GraphView/CustomEdge/index.tsxsimilarity index 100%rename from src/containers/Editor/components/views/GraphView/CustomEdge/index.tsxrename to src/features/editor/views/GraphView/CustomEdge/index.tsxdiff --git a/src/containers/Editor/components/views/GraphView/CustomNode/ObjectNode.tsx b/src/features/editor/views/GraphView/CustomNode/ObjectNode.tsxsimilarity index 92%rename from src/containers/Editor/components/views/GraphView/CustomNode/ObjectNode.tsxrename to src/features/editor/views/GraphView/CustomNode/ObjectNode.tsxindex 64e8c856..4d502722 100644--- a/src/containers/Editor/components/views/GraphView/CustomNode/ObjectNode.tsx+++ b/src/features/editor/views/GraphView/CustomNode/ObjectNode.tsx@@ -1,5 +1,5 @@import React from "react";-import type { CustomNodeProps } from "src/containers/Editor/components/views/GraphView/CustomNode";+import type { CustomNodeProps } from "src/features/editor/views/GraphView/CustomNode";import { TextRenderer } from "./TextRenderer";import * as Styled from "./styles";diff --git a/src/containers/Editor/components/views/GraphView/CustomNode/TextNode.tsx b/src/features/editor/views/GraphView/CustomNode/TextNode.tsxsimilarity index 92%rename from src/containers/Editor/components/views/GraphView/CustomNode/TextNode.tsxrename to src/features/editor/views/GraphView/CustomNode/TextNode.tsxindex 91c48f6f..f223f03b 100644--- a/src/containers/Editor/components/views/GraphView/CustomNode/TextNode.tsx+++ b/src/features/editor/views/GraphView/CustomNode/TextNode.tsx@@ -1,9 +1,9 @@import React from "react";import styled from "styled-components";import { MdLink, MdLinkOff } from "react-icons/md";-import type { CustomNodeProps } from "src/containers/Editor/components/views/GraphView/CustomNode";-import { isContentImage } from "src/containers/Editor/components/views/GraphView/lib/utils/calculateNodeSize";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";+import type { CustomNodeProps } from "src/features/editor/views/GraphView/CustomNode";+import { isContentImage } from "src/features/editor/views/GraphView/lib/utils/calculateNodeSize";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import useToggleHide from "src/hooks/useToggleHide";import useConfig from "src/store/useConfig";import { TextRenderer } from "./TextRenderer";diff --git a/src/containers/Editor/components/views/GraphView/CustomNode/TextRenderer.tsx b/src/features/editor/views/GraphView/CustomNode/TextRenderer.tsxsimilarity index 100%rename from src/containers/Editor/components/views/GraphView/CustomNode/TextRenderer.tsxrename to src/features/editor/views/GraphView/CustomNode/TextRenderer.tsxdiff --git a/src/containers/Editor/components/views/GraphView/CustomNode/index.tsx b/src/features/editor/views/GraphView/CustomNode/index.tsxsimilarity index 94%rename from src/containers/Editor/components/views/GraphView/CustomNode/index.tsxrename to src/features/editor/views/GraphView/CustomNode/index.tsxindex 05196d7e..485d2ced 100644--- a/src/containers/Editor/components/views/GraphView/CustomNode/index.tsx+++ b/src/features/editor/views/GraphView/CustomNode/index.tsx@@ -1,7 +1,7 @@import React from "react";import type { NodeProps } from "reaflow";import { Node } from "reaflow";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import useModal from "src/store/useModal";import type { NodeData } from "src/types/graph";import { ObjectNode } from "./ObjectNode";diff --git a/src/containers/Editor/components/views/GraphView/CustomNode/styles.tsx b/src/features/editor/views/GraphView/CustomNode/styles.tsxsimilarity index 100%rename from src/containers/Editor/components/views/GraphView/CustomNode/styles.tsxrename to src/features/editor/views/GraphView/CustomNode/styles.tsxdiff --git a/src/containers/Editor/components/views/GraphView/NotSupported.tsx b/src/features/editor/views/GraphView/NotSupported.tsxsimilarity index 100%rename from src/containers/Editor/components/views/GraphView/NotSupported.tsxrename to src/features/editor/views/GraphView/NotSupported.tsxdiff --git a/src/containers/Editor/components/views/GraphView/index.tsx b/src/features/editor/views/GraphView/index.tsxsimilarity index 97%rename from src/containers/Editor/components/views/GraphView/index.tsxrename to src/features/editor/views/GraphView/index.tsxindex 78097037..ea5dc8e3 100644--- a/src/containers/Editor/components/views/GraphView/index.tsx+++ b/src/features/editor/views/GraphView/index.tsx@@ -6,8 +6,8 @@ import { Space } from "react-zoomable-ui";import { Canvas } from "reaflow";import type { ElkRoot } from "reaflow/dist/layout/useLayout";import { useLongPress } from "use-long-press";-import { CustomNode } from "src/containers/Editor/components/views/GraphView/CustomNode";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";+import { CustomNode } from "src/features/editor/views/GraphView/CustomNode";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import useToggleHide from "src/hooks/useToggleHide";import useConfig from "src/store/useConfig";import { CustomEdge } from "./CustomEdge";diff --git a/src/containers/Editor/components/views/GraphView/lib/jsonParser.ts b/src/features/editor/views/GraphView/lib/jsonParser.tssimilarity index 100%rename from src/containers/Editor/components/views/GraphView/lib/jsonParser.tsrename to src/features/editor/views/GraphView/lib/jsonParser.tsdiff --git a/src/containers/Editor/components/views/GraphView/lib/utils/addEdgeToGraph.ts b/src/features/editor/views/GraphView/lib/utils/addEdgeToGraph.tssimilarity index 100%rename from src/containers/Editor/components/views/GraphView/lib/utils/addEdgeToGraph.tsrename to src/features/editor/views/GraphView/lib/utils/addEdgeToGraph.tsdiff --git a/src/containers/Editor/components/views/GraphView/lib/utils/addNodeToGraph.ts b/src/features/editor/views/GraphView/lib/utils/addNodeToGraph.tssimilarity index 75%rename from src/containers/Editor/components/views/GraphView/lib/utils/addNodeToGraph.tsrename to src/features/editor/views/GraphView/lib/utils/addNodeToGraph.tsindex 4e291dc8..0375090e 100644--- a/src/containers/Editor/components/views/GraphView/lib/utils/addNodeToGraph.ts+++ b/src/features/editor/views/GraphView/lib/utils/addNodeToGraph.ts@@ -1,6 +1,6 @@import type { NodeType } from "jsonc-parser";-import type { Graph } from "src/containers/Editor/components/views/GraphView/lib/jsonParser";-import { calculateNodeSize } from "src/containers/Editor/components/views/GraphView/lib/utils/calculateNodeSize";+import type { Graph } from "src/features/editor/views/GraphView/lib/jsonParser";+import { calculateNodeSize } from "src/features/editor/views/GraphView/lib/utils/calculateNodeSize";type Props = {graph: Graph;diff --git a/src/containers/Editor/components/views/GraphView/lib/utils/calculateNodeSize.ts b/src/features/editor/views/GraphView/lib/utils/calculateNodeSize.tssimilarity index 100%rename from src/containers/Editor/components/views/GraphView/lib/utils/calculateNodeSize.tsrename to src/features/editor/views/GraphView/lib/utils/calculateNodeSize.tsdiff --git a/src/containers/Editor/components/views/GraphView/lib/utils/getChildrenEdges.ts b/src/features/editor/views/GraphView/lib/utils/getChildrenEdges.tssimilarity index 100%rename from src/containers/Editor/components/views/GraphView/lib/utils/getChildrenEdges.tsrename to src/features/editor/views/GraphView/lib/utils/getChildrenEdges.tsdiff --git a/src/containers/Editor/components/views/GraphView/lib/utils/getNodePath.ts b/src/features/editor/views/GraphView/lib/utils/getNodePath.tssimilarity index 100%rename from src/containers/Editor/components/views/GraphView/lib/utils/getNodePath.tsrename to src/features/editor/views/GraphView/lib/utils/getNodePath.tsdiff --git a/src/containers/Editor/components/views/GraphView/lib/utils/getOutgoers.ts b/src/features/editor/views/GraphView/lib/utils/getOutgoers.tssimilarity index 100%rename from src/containers/Editor/components/views/GraphView/lib/utils/getOutgoers.tsrename to src/features/editor/views/GraphView/lib/utils/getOutgoers.tsdiff --git a/src/containers/Editor/components/views/GraphView/lib/utils/traverse.ts b/src/features/editor/views/GraphView/lib/utils/traverse.tssimilarity index 97%rename from src/containers/Editor/components/views/GraphView/lib/utils/traverse.tsrename to src/features/editor/views/GraphView/lib/utils/traverse.tsindex b66ff453..8ce490d5 100644--- a/src/containers/Editor/components/views/GraphView/lib/utils/traverse.ts+++ b/src/features/editor/views/GraphView/lib/utils/traverse.ts@@ -1,9 +1,6 @@import type { Node, NodeType } from "jsonc-parser";-import type {- Graph,- States,-} from "src/containers/Editor/components/views/GraphView/lib/jsonParser";-import { calculateNodeSize } from "src/containers/Editor/components/views/GraphView/lib/utils/calculateNodeSize";+import type { Graph, States } from "src/features/editor/views/GraphView/lib/jsonParser";+import { calculateNodeSize } from "src/features/editor/views/GraphView/lib/utils/calculateNodeSize";import { addEdgeToGraph } from "./addEdgeToGraph";import { addNodeToGraph } from "./addNodeToGraph";diff --git a/src/containers/Editor/components/views/GraphView/stores/useGraph.ts b/src/features/editor/views/GraphView/stores/useGraph.tssimilarity index 95%rename from src/containers/Editor/components/views/GraphView/stores/useGraph.tsrename to src/features/editor/views/GraphView/stores/useGraph.tsindex 938712e2..8ab1c851 100644--- a/src/containers/Editor/components/views/GraphView/stores/useGraph.ts+++ b/src/features/editor/views/GraphView/stores/useGraph.ts@@ -1,11 +1,11 @@import type { ViewPort } from "react-zoomable-ui/dist/ViewPort";import type { CanvasDirection } from "reaflow/dist/layout/elkLayout";import { create } from "zustand";-import { parser } from "src/containers/Editor/components/views/GraphView/lib/jsonParser";-import { getChildrenEdges } from "src/containers/Editor/components/views/GraphView/lib/utils/getChildrenEdges";-import { getOutgoers } from "src/containers/Editor/components/views/GraphView/lib/utils/getOutgoers";+import { parser } from "src/features/editor/views/GraphView/lib/jsonParser";+import { getChildrenEdges } from "src/features/editor/views/GraphView/lib/utils/getChildrenEdges";+import { getOutgoers } from "src/features/editor/views/GraphView/lib/utils/getOutgoers";+import useJson from "src/store/useJson";import type { NodeData, EdgeData } from "src/types/graph";-import useJson from "../../../../../../store/useJson";export interface Graph {viewPort: ViewPort | null;diff --git a/src/containers/Editor/components/views/TreeView/Label.tsx b/src/features/editor/views/TreeView/Label.tsxsimilarity index 100%rename from src/containers/Editor/components/views/TreeView/Label.tsxrename to src/features/editor/views/TreeView/Label.tsxdiff --git a/src/containers/Editor/components/views/TreeView/Value.tsx b/src/features/editor/views/TreeView/Value.tsxsimilarity index 90%rename from src/containers/Editor/components/views/TreeView/Value.tsxrename to src/features/editor/views/TreeView/Value.tsxindex e877f277..1e3c65f1 100644--- a/src/containers/Editor/components/views/TreeView/Value.tsx+++ b/src/features/editor/views/TreeView/Value.tsx@@ -1,7 +1,7 @@import React from "react";import type { DefaultTheme } from "styled-components";import { useTheme } from "styled-components";-import { TextRenderer } from "src/containers/Editor/components/views/GraphView/CustomNode/TextRenderer";+import { TextRenderer } from "src/features/editor/views/GraphView/CustomNode/TextRenderer";type TextColorFn = {theme: DefaultTheme;diff --git a/src/containers/Editor/components/views/TreeView/index.tsx b/src/features/editor/views/TreeView/index.tsxsimilarity index 100%rename from src/containers/Editor/components/views/TreeView/index.tsxrename to src/features/editor/views/TreeView/index.tsxdiff --git a/src/containers/Modals/DownloadModal/index.tsx b/src/features/modals/DownloadModal/index.tsxsimilarity index 100%rename from src/containers/Modals/DownloadModal/index.tsxrename to src/features/modals/DownloadModal/index.tsxdiff --git a/src/containers/Modals/ImportModal/index.tsx b/src/features/modals/ImportModal/index.tsxsimilarity index 100%rename from src/containers/Modals/ImportModal/index.tsxrename to src/features/modals/ImportModal/index.tsxdiff --git a/src/containers/Modals/JPathModal/index.tsx b/src/features/modals/JPathModal/index.tsxsimilarity index 100%rename from src/containers/Modals/JPathModal/index.tsxrename to src/features/modals/JPathModal/index.tsxdiff --git a/src/containers/Modals/JQModal/index.tsx b/src/features/modals/JQModal/index.tsxsimilarity index 100%rename from src/containers/Modals/JQModal/index.tsxrename to src/features/modals/JQModal/index.tsxdiff --git a/src/containers/Modals/JWTModal/index.tsx b/src/features/modals/JWTModal/index.tsxsimilarity index 100%rename from src/containers/Modals/JWTModal/index.tsxrename to src/features/modals/JWTModal/index.tsxdiff --git a/src/containers/Modals/NodeModal/index.tsx b/src/features/modals/NodeModal/index.tsxsimilarity index 95%rename from src/containers/Modals/NodeModal/index.tsxrename to src/features/modals/NodeModal/index.tsxindex ef3d671f..68b3fa62 100644--- a/src/containers/Modals/NodeModal/index.tsx+++ b/src/features/modals/NodeModal/index.tsx@@ -4,7 +4,7 @@ import { Modal, Stack, Text, ScrollArea, Button } from "@mantine/core";import { CodeHighlight } from "@mantine/code-highlight";import { event as gaEvent } from "nextjs-google-analytics";import { VscLock } from "react-icons/vsc";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import useModal from "src/store/useModal";const dataToString = (data: any) => {diff --git a/src/containers/Modals/SchemaModal/index.tsx b/src/features/modals/SchemaModal/index.tsxsimilarity index 100%rename from src/containers/Modals/SchemaModal/index.tsxrename to src/features/modals/SchemaModal/index.tsxdiff --git a/src/containers/Modals/TypeModal/index.tsx b/src/features/modals/TypeModal/index.tsxsimilarity index 100%rename from src/containers/Modals/TypeModal/index.tsxrename to src/features/modals/TypeModal/index.tsxdiff --git a/src/containers/Modals/UpgradeModal/index.tsx b/src/features/modals/UpgradeModal/index.tsxsimilarity index 100%rename from src/containers/Modals/UpgradeModal/index.tsxrename to src/features/modals/UpgradeModal/index.tsxdiff --git a/src/containers/Modals/index.ts b/src/features/modals/index.tssimilarity index 100%rename from src/containers/Modals/index.tsrename to src/features/modals/index.tsdiff --git a/src/hooks/useFocusNode.ts b/src/hooks/useFocusNode.tsindex fab3234a..28d672c4 100644--- a/src/hooks/useFocusNode.ts+++ b/src/hooks/useFocusNode.ts@@ -1,7 +1,7 @@import React from "react";import { useDebouncedValue } from "@mantine/hooks";import { event as gaEvent } from "nextjs-google-analytics";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import { searchQuery, cleanupHighlight, highlightMatchedNodes } from "src/lib/utils/search";export const useFocusNode = () => {diff --git a/src/hooks/useToggleHide.ts b/src/hooks/useToggleHide.tsindex 05527949..690d75b6 100644--- a/src/hooks/useToggleHide.ts+++ b/src/hooks/useToggleHide.ts@@ -1,5 +1,5 @@import React from "react";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";const useToggleHide = () => {const getCollapsedNodeIds = useGraph(state => state.getCollapsedNodeIds);diff --git a/src/containers/ConverterLayout/PageLinks.tsx b/src/layout/ConverterLayout/PageLinks.tsxsimilarity index 100%rename from src/containers/ConverterLayout/PageLinks.tsxrename to src/layout/ConverterLayout/PageLinks.tsxdiff --git a/src/containers/ConverterLayout/ToolPage.tsx b/src/layout/ConverterLayout/ToolPage.tsxsimilarity index 95%rename from src/containers/ConverterLayout/ToolPage.tsxrename to src/layout/ConverterLayout/ToolPage.tsxindex bce87154..34d35edf 100644--- a/src/containers/ConverterLayout/ToolPage.tsx+++ b/src/layout/ConverterLayout/ToolPage.tsx@@ -4,10 +4,10 @@ import { Editor } from "@monaco-editor/react";import { NextSeo } from "next-seo";import { LuCheck, LuXCircle } from "react-icons/lu";import { SEO } from "src/constants/seo";-import { PageLinks } from "src/containers/ConverterLayout/PageLinks";-import { editorOptions } from "src/containers/ConverterLayout/options";import { type FileFormat, formats } from "src/enums/file.enum";-import Layout from "src/layout/Layout";+import { PageLinks } from "src/layout/ConverterLayout/PageLinks";+import { editorOptions } from "src/layout/ConverterLayout/options";+import Layout from "src/layout/PageLayout";import { contentToJson, jsonToContent } from "src/lib/utils/jsonAdapter";interface ToolPageProps {diff --git a/src/containers/ConverterLayout/options.ts b/src/layout/ConverterLayout/options.tssimilarity index 100%rename from src/containers/ConverterLayout/options.tsrename to src/layout/ConverterLayout/options.tsdiff --git a/src/containers/Landing/FAQ.tsx b/src/layout/Landing/FAQ.tsxsimilarity index 100%rename from src/containers/Landing/FAQ.tsxrename to src/layout/Landing/FAQ.tsxdiff --git a/src/containers/Landing/Features.tsx b/src/layout/Landing/Features.tsxsimilarity index 100%rename from src/containers/Landing/Features.tsxrename to src/layout/Landing/Features.tsxdiff --git a/src/containers/Landing/HeroPreview.tsx b/src/layout/Landing/HeroPreview.tsxsimilarity index 100%rename from src/containers/Landing/HeroPreview.tsxrename to src/layout/Landing/HeroPreview.tsxdiff --git a/src/containers/Landing/HeroSection.tsx b/src/layout/Landing/HeroSection.tsxsimilarity index 100%rename from src/containers/Landing/HeroSection.tsxrename to src/layout/Landing/HeroSection.tsxdiff --git a/src/containers/Landing/LovedBy.tsx b/src/layout/Landing/LovedBy.tsxsimilarity index 100%rename from src/containers/Landing/LovedBy.tsxrename to src/layout/Landing/LovedBy.tsxdiff --git a/src/containers/Landing/Section1.tsx b/src/layout/Landing/Section1.tsxsimilarity index 100%rename from src/containers/Landing/Section1.tsxrename to src/layout/Landing/Section1.tsxdiff --git a/src/containers/Landing/SeePremium.tsx b/src/layout/Landing/SeePremium.tsxsimilarity index 100%rename from src/containers/Landing/SeePremium.tsxrename to src/layout/Landing/SeePremium.tsxdiff --git a/src/layout/Footer.tsx b/src/layout/PageLayout/Footer.tsxsimilarity index 98%rename from src/layout/Footer.tsxrename to src/layout/PageLayout/Footer.tsxindex 6a7bf9cd..c539d0e9 100644--- a/src/layout/Footer.tsx+++ b/src/layout/PageLayout/Footer.tsx@@ -4,7 +4,7 @@ import { Anchor, Container, Divider, Flex, Stack, Text, ThemeIcon } from "@mantiimport dayjs from "dayjs";import { FaDiscord, FaGithub, FaLinkedin } from "react-icons/fa";import { FaXTwitter } from "react-icons/fa6";-import { JSONCrackLogo } from "./JsonCrackLogo";+import { JSONCrackLogo } from "../JsonCrackLogo";export const Footer = () => {return (diff --git a/src/layout/Navbar.tsx b/src/layout/PageLayout/Navbar.tsxsimilarity index 98%rename from src/layout/Navbar.tsxrename to src/layout/PageLayout/Navbar.tsxindex 15482d6c..cf19dbdb 100644--- a/src/layout/Navbar.tsx+++ b/src/layout/PageLayout/Navbar.tsx@@ -3,7 +3,7 @@ import Link from "next/link";import { Button, Menu, type MenuItemProps, Text, Stack } from "@mantine/core";import styled from "styled-components";import { LuChevronDown } from "react-icons/lu";-import { JSONCrackLogo } from "./JsonCrackLogo";+import { JSONCrackLogo } from "../JsonCrackLogo";const StyledNavbarWrapper = styled.div`z-index: 3;diff --git a/src/layout/Layout.tsx b/src/layout/PageLayout/index.tsxsimilarity index 76%rename from src/layout/Layout.tsxrename to src/layout/PageLayout/index.tsxindex 28321116..46599bf4 100644--- a/src/layout/Layout.tsx+++ b/src/layout/PageLayout/index.tsx@@ -11,12 +11,10 @@ const inter = Inter({const StyledLayoutWrapper = styled.div`background: #fff;- /* background-image: radial-gradient(#ededed 2px, #ffffff 2px); */- /* background-size: 40px 40px; */font-family: ${inter.style.fontFamily};`;-const Layout = ({ children }: React.PropsWithChildren) => {+const PageLayout = ({ children }: React.PropsWithChildren) => {return (<ThemeProvider theme={lightTheme}><StyledLayoutWrapper>@@ -28,4 +26,4 @@ const Layout = ({ children }: React.PropsWithChildren) => {);};-export default Layout;+export default PageLayout;diff --git a/src/containers/TypeLayout/PageLinks.tsx b/src/layout/TypeLayout/PageLinks.tsxsimilarity index 100%rename from src/containers/TypeLayout/PageLinks.tsxrename to src/layout/TypeLayout/PageLinks.tsxdiff --git a/src/containers/TypeLayout/TypegenWrapper.tsx b/src/layout/TypeLayout/TypegenWrapper.tsxsimilarity index 96%rename from src/containers/TypeLayout/TypegenWrapper.tsxrename to src/layout/TypeLayout/TypegenWrapper.tsxindex febfc6b4..f6f07e1a 100644--- a/src/containers/TypeLayout/TypegenWrapper.tsx+++ b/src/layout/TypeLayout/TypegenWrapper.tsx@@ -4,9 +4,9 @@ import { Editor } from "@monaco-editor/react";import { NextSeo } from "next-seo";import { LuCheck, LuXCircle } from "react-icons/lu";import { SEO } from "src/constants/seo";-import { editorOptions } from "src/containers/ConverterLayout/options";import { type FileFormat, formats, type TypeLanguage, typeOptions } from "src/enums/file.enum";-import Layout from "src/layout/Layout";+import { editorOptions } from "src/layout/ConverterLayout/options";+import Layout from "src/layout/PageLayout";import { generateType } from "src/lib/utils/generateType";import { PageLinks } from "./PageLinks";diff --git a/src/pages/404.tsx b/src/pages/404.tsxindex 7441a714..19f59107 100644--- a/src/pages/404.tsx+++ b/src/pages/404.tsx@@ -3,7 +3,7 @@ import Link from "next/link";import { Button, Stack, Text, Title } from "@mantine/core";import { NextSeo } from "next-seo";import { SEO } from "src/constants/seo";-import Layout from "src/layout/Layout";+import Layout from "src/layout/PageLayout";const NotFound = () => {return (diff --git a/src/pages/_error.tsx b/src/pages/_error.tsxindex 390ef7d6..8a927a36 100644--- a/src/pages/_error.tsx+++ b/src/pages/_error.tsx@@ -3,7 +3,7 @@ import { useRouter } from "next/router";import { Button, Stack, Text, Title } from "@mantine/core";import { NextSeo } from "next-seo";import { SEO } from "src/constants/seo";-import Layout from "src/layout/Layout";+import Layout from "src/layout/PageLayout";const Custom500 = () => {const router = useRouter();diff --git a/src/pages/converter/csv-to-json.tsx b/src/pages/converter/csv-to-json.tsxindex daf4a360..241515d6 100644--- a/src/pages/converter/csv-to-json.tsx+++ b/src/pages/converter/csv-to-json.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.CSV} to={FileFormat.JSON} />;diff --git a/src/pages/converter/csv-to-xml.tsx b/src/pages/converter/csv-to-xml.tsxindex c214f64f..1d7d3f6c 100644--- a/src/pages/converter/csv-to-xml.tsx+++ b/src/pages/converter/csv-to-xml.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.CSV} to={FileFormat.XML} />;diff --git a/src/pages/converter/csv-to-yaml.tsx b/src/pages/converter/csv-to-yaml.tsxindex 318b8d4f..ede10658 100644--- a/src/pages/converter/csv-to-yaml.tsx+++ b/src/pages/converter/csv-to-yaml.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.CSV} to={FileFormat.YAML} />;diff --git a/src/pages/converter/json-to-csv.tsx b/src/pages/converter/json-to-csv.tsxindex 8f31fb3e..62bd8ec9 100644--- a/src/pages/converter/json-to-csv.tsx+++ b/src/pages/converter/json-to-csv.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.JSON} to={FileFormat.CSV} />;diff --git a/src/pages/converter/json-to-xml.tsx b/src/pages/converter/json-to-xml.tsxindex b58f62b8..a0b776db 100644--- a/src/pages/converter/json-to-xml.tsx+++ b/src/pages/converter/json-to-xml.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.JSON} to={FileFormat.XML} />;diff --git a/src/pages/converter/json-to-yaml.tsx b/src/pages/converter/json-to-yaml.tsxindex 1b2177ec..84d7ddb5 100644--- a/src/pages/converter/json-to-yaml.tsx+++ b/src/pages/converter/json-to-yaml.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.JSON} to={FileFormat.YAML} />;diff --git a/src/pages/converter/xml-to-csv.tsx b/src/pages/converter/xml-to-csv.tsxindex 813ab422..dc847aa2 100644--- a/src/pages/converter/xml-to-csv.tsx+++ b/src/pages/converter/xml-to-csv.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.XML} to={FileFormat.CSV} />;diff --git a/src/pages/converter/xml-to-json.tsx b/src/pages/converter/xml-to-json.tsxindex 71d9223f..932fc529 100644--- a/src/pages/converter/xml-to-json.tsx+++ b/src/pages/converter/xml-to-json.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.XML} to={FileFormat.JSON} />;diff --git a/src/pages/converter/xml-to-yaml.tsx b/src/pages/converter/xml-to-yaml.tsxindex c5718c89..45b06e36 100644--- a/src/pages/converter/xml-to-yaml.tsx+++ b/src/pages/converter/xml-to-yaml.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.XML} to={FileFormat.YAML} />;diff --git a/src/pages/converter/yaml-to-csv.tsx b/src/pages/converter/yaml-to-csv.tsxindex cdf404f2..d5357b76 100644--- a/src/pages/converter/yaml-to-csv.tsx+++ b/src/pages/converter/yaml-to-csv.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.YAML} to={FileFormat.CSV} />;diff --git a/src/pages/converter/yaml-to-json.tsx b/src/pages/converter/yaml-to-json.tsxindex 5b9b4f23..9500c1ad 100644--- a/src/pages/converter/yaml-to-json.tsx+++ b/src/pages/converter/yaml-to-json.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.YAML} to={FileFormat.JSON} />;diff --git a/src/pages/converter/yaml-to-xml.tsx b/src/pages/converter/yaml-to-xml.tsxindex fc7e9972..d029e9c6 100644--- a/src/pages/converter/yaml-to-xml.tsx+++ b/src/pages/converter/yaml-to-xml.tsx@@ -1,6 +1,6 @@import React from "react";-import { ToolPage } from "src/containers/ConverterLayout/ToolPage";import { FileFormat } from "src/enums/file.enum";+import { ToolPage } from "src/layout/ConverterLayout/ToolPage";const Page = () => {return <ToolPage from={FileFormat.YAML} to={FileFormat.XML} />;diff --git a/src/pages/docs.tsx b/src/pages/docs.tsxindex b427a4e6..f9938ffb 100644--- a/src/pages/docs.tsx+++ b/src/pages/docs.tsx@@ -4,7 +4,7 @@ import { CodeHighlight } from "@mantine/code-highlight";import styled from "styled-components";import { NextSeo } from "next-seo";import { SEO } from "src/constants/seo";-import Layout from "src/layout/Layout";+import Layout from "src/layout/PageLayout";const StyledFrame = styled.iframe`border: none;diff --git a/src/pages/editor.tsx b/src/pages/editor.tsxindex a9f7ac3e..532e9f1f 100644--- a/src/pages/editor.tsx+++ b/src/pages/editor.tsx@@ -5,17 +5,20 @@ import { useMantineColorScheme } from "@mantine/core";import "@mantine/dropzone/styles.css";import styled, { ThemeProvider } from "styled-components";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";+import { Allotment } from "allotment";+import "allotment/dist/style.css";import { NextSeo } from "next-seo";import { SEO } from "src/constants/seo";import { darkTheme, lightTheme } from "src/constants/theme";-import { Editor } from "src/containers/Editor";-import { BottomBar } from "src/containers/Editor/components/BottomBar";-import { Toolbar } from "src/containers/Toolbar";+import { BottomBar } from "src/features/editor/BottomBar";+import { FullscreenDropzone } from "src/features/editor/FullscreenDropzone";+import { Toolbar } from "src/features/editor/Toolbar";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import useConfig from "src/store/useConfig";import useFile from "src/store/useFile";-const ModalController = dynamic(() => import("src/layout/ModalController"));-const ExternalMode = dynamic(() => import("src/layout/ExternalMode"));+const ModalController = dynamic(() => import("src/features/editor/ModalController"));+const ExternalMode = dynamic(() => import("src/features/editor/ExternalMode"));const queryClient = new QueryClient({defaultOptions: {@@ -41,11 +44,31 @@ export const StyledEditorWrapper = styled.div`overflow: hidden;`;+export const StyledEditor = styled(Allotment)`+ position: relative !important;+ display: flex;+ background: ${({ theme }) => theme.BACKGROUND_SECONDARY};+ height: calc(100vh - 67px);++ @media only screen and (max-width: 320px) {+ height: 100vh;+ }+`;++const TextEditor = dynamic(() => import("src/features/editor/TextEditor"), {+ ssr: false,+});++const LiveEditor = dynamic(() => import("src/features/editor/LiveEditor"), {+ ssr: false,+});+const EditorPage = () => {const { query, isReady } = useRouter();const { setColorScheme } = useMantineColorScheme();const checkEditorSession = useFile(state => state.checkEditorSession);const darkmodeEnabled = useConfig(state => state.darkmodeEnabled);+ const fullscreen = useGraph(state => state.fullscreen);React.useEffect(() => {if (isReady) checkEditorSession(query?.json);@@ -71,7 +94,20 @@ const EditorPage = () => {<StyledPageWrapper><Toolbar /><StyledEditorWrapper>- <Editor />+ <StyledEditor proportionalLayout={false}>+ <Allotment.Pane+ preferredSize={450}+ minSize={fullscreen ? 0 : 300}+ maxSize={800}+ visible={!fullscreen}+ >+ <TextEditor />+ </Allotment.Pane>+ <Allotment.Pane minSize={0}>+ <LiveEditor />+ </Allotment.Pane>+ </StyledEditor>+ <FullscreenDropzone /></StyledEditorWrapper></StyledPageWrapper><BottomBar />diff --git a/src/pages/index.tsx b/src/pages/index.tsxindex 19de3a3c..59621bc1 100644--- a/src/pages/index.tsx+++ b/src/pages/index.tsx@@ -2,14 +2,14 @@ import React from "react";import type { InferGetStaticPropsType, GetStaticProps } from "next";import { NextSeo } from "next-seo";import { SEO } from "src/constants/seo";-import { FAQ } from "src/containers/Landing/FAQ";-import { Features } from "src/containers/Landing/Features";-import { HeroPreview } from "src/containers/Landing/HeroPreview";-import { HeroSection } from "src/containers/Landing/HeroSection";-import { LovedBy } from "src/containers/Landing/LovedBy";-import { Section1 } from "src/containers/Landing/Section1";-import { SeePremium } from "src/containers/Landing/SeePremium";-import Layout from "src/layout/Layout";+import { FAQ } from "src/layout/Landing/FAQ";+import { Features } from "src/layout/Landing/Features";+import { HeroPreview } from "src/layout/Landing/HeroPreview";+import { HeroSection } from "src/layout/Landing/HeroSection";+import { LovedBy } from "src/layout/Landing/LovedBy";+import { Section1 } from "src/layout/Landing/Section1";+import { SeePremium } from "src/layout/Landing/SeePremium";+import Layout from "src/layout/PageLayout";export const HomePage = (props: InferGetStaticPropsType<typeof getStaticProps>) => {return (diff --git a/src/pages/legal/privacy.tsx b/src/pages/legal/privacy.tsxindex 9e17666e..b7762e10 100644--- a/src/pages/legal/privacy.tsx+++ b/src/pages/legal/privacy.tsx@@ -3,7 +3,7 @@ import { Box, Container, Paper, Stack, Text, Title } from "@mantine/core";import { NextSeo } from "next-seo";import { SEO } from "src/constants/seo";import privacy from "src/data/privacy.json";-import Layout from "src/layout/Layout";+import Layout from "src/layout/PageLayout";const Privacy = () => {return (diff --git a/src/pages/legal/terms.tsx b/src/pages/legal/terms.tsxindex ca8ab017..1a2f4532 100644--- a/src/pages/legal/terms.tsx+++ b/src/pages/legal/terms.tsx@@ -3,7 +3,7 @@ import { Box, Container, Paper, Stack, Text, Title } from "@mantine/core";import { NextSeo } from "next-seo";import { SEO } from "src/constants/seo";import terms from "src/data/terms.json";-import Layout from "src/layout/Layout";+import Layout from "src/layout/PageLayout";const Terms = () => {return (diff --git a/src/pages/tools/json-schema.tsx b/src/pages/tools/json-schema.tsxindex 0072203a..bdacd759 100644--- a/src/pages/tools/json-schema.tsx+++ b/src/pages/tools/json-schema.tsx@@ -3,9 +3,9 @@ import { Box, Button, Container, Flex, Paper, Title, Text } from "@mantine/core"import { Editor, type OnMount } from "@monaco-editor/react";import { JSONSchemaFaker } from "json-schema-faker";import { LuCheck, LuXCircle } from "react-icons/lu";-import { editorOptions } from "src/containers/ConverterLayout/options";import { FileFormat, TypeLanguage } from "src/enums/file.enum";-import Layout from "src/layout/Layout";+import { editorOptions } from "src/layout/ConverterLayout/options";+import Layout from "src/layout/PageLayout";import { generateType } from "src/lib/utils/generateType";import { jsonToContent } from "src/lib/utils/jsonAdapter";diff --git a/src/pages/type/csv-to-go.tsx b/src/pages/type/csv-to-go.tsxindex 9da125d4..ad5797cb 100644--- a/src/pages/type/csv-to-go.tsx+++ b/src/pages/type/csv-to-go.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.CSV} to={TypeLanguage.Go} />;diff --git a/src/pages/type/csv-to-kotlin.tsx b/src/pages/type/csv-to-kotlin.tsxindex 128954f7..fa6ae431 100644--- a/src/pages/type/csv-to-kotlin.tsx+++ b/src/pages/type/csv-to-kotlin.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.CSV} to={TypeLanguage.Kotlin} />;diff --git a/src/pages/type/csv-to-rust.tsx b/src/pages/type/csv-to-rust.tsxindex 6bbf0a2e..9fa67f31 100644--- a/src/pages/type/csv-to-rust.tsx+++ b/src/pages/type/csv-to-rust.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.CSV} to={TypeLanguage.Rust} />;diff --git a/src/pages/type/csv-to-typescript.tsx b/src/pages/type/csv-to-typescript.tsxindex c43b92e3..94cc5df8 100644--- a/src/pages/type/csv-to-typescript.tsx+++ b/src/pages/type/csv-to-typescript.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.CSV} to={TypeLanguage.TypeScript} />;diff --git a/src/pages/type/json-to-go.tsx b/src/pages/type/json-to-go.tsxindex 9e8c9e44..2ff24a63 100644--- a/src/pages/type/json-to-go.tsx+++ b/src/pages/type/json-to-go.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.JSON} to={TypeLanguage.Go} />;diff --git a/src/pages/type/json-to-kotlin.tsx b/src/pages/type/json-to-kotlin.tsxindex a1be4797..368fa915 100644--- a/src/pages/type/json-to-kotlin.tsx+++ b/src/pages/type/json-to-kotlin.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.JSON} to={TypeLanguage.Kotlin} />;diff --git a/src/pages/type/json-to-rust.tsx b/src/pages/type/json-to-rust.tsxindex 9cafb3c6..4934d17f 100644--- a/src/pages/type/json-to-rust.tsx+++ b/src/pages/type/json-to-rust.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.JSON} to={TypeLanguage.Rust} />;diff --git a/src/pages/type/json-to-typescript.tsx b/src/pages/type/json-to-typescript.tsxindex c35f51fd..6407d56a 100644--- a/src/pages/type/json-to-typescript.tsx+++ b/src/pages/type/json-to-typescript.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.JSON} to={TypeLanguage.TypeScript} />;diff --git a/src/pages/type/xml-to-go.tsx b/src/pages/type/xml-to-go.tsxindex 9a3fd19a..ef987aa0 100644--- a/src/pages/type/xml-to-go.tsx+++ b/src/pages/type/xml-to-go.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.XML} to={TypeLanguage.Go} />;diff --git a/src/pages/type/xml-to-kotlin.tsx b/src/pages/type/xml-to-kotlin.tsxindex 540f1b19..42c552de 100644--- a/src/pages/type/xml-to-kotlin.tsx+++ b/src/pages/type/xml-to-kotlin.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.XML} to={TypeLanguage.Kotlin} />;diff --git a/src/pages/type/xml-to-rust.tsx b/src/pages/type/xml-to-rust.tsxindex 03804b2d..d6dc1da8 100644--- a/src/pages/type/xml-to-rust.tsx+++ b/src/pages/type/xml-to-rust.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.XML} to={TypeLanguage.Rust} />;diff --git a/src/pages/type/xml-to-typescript.tsx b/src/pages/type/xml-to-typescript.tsxindex a4a00202..2eef55a7 100644--- a/src/pages/type/xml-to-typescript.tsx+++ b/src/pages/type/xml-to-typescript.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.XML} to={TypeLanguage.TypeScript} />;diff --git a/src/pages/type/yaml-to-go.tsx b/src/pages/type/yaml-to-go.tsxindex ec0956bd..2220ac53 100644--- a/src/pages/type/yaml-to-go.tsx+++ b/src/pages/type/yaml-to-go.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.YAML} to={TypeLanguage.Go} />;diff --git a/src/pages/type/yaml-to-kotlin.tsx b/src/pages/type/yaml-to-kotlin.tsxindex 99c2faeb..d135bc68 100644--- a/src/pages/type/yaml-to-kotlin.tsx+++ b/src/pages/type/yaml-to-kotlin.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.YAML} to={TypeLanguage.Kotlin} />;diff --git a/src/pages/type/yaml-to-rust.tsx b/src/pages/type/yaml-to-rust.tsxindex e54e0fcb..e862b9b6 100644--- a/src/pages/type/yaml-to-rust.tsx+++ b/src/pages/type/yaml-to-rust.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.YAML} to={TypeLanguage.Rust} />;diff --git a/src/pages/type/yaml-to-typescript.tsx b/src/pages/type/yaml-to-typescript.tsxindex 5af7c04a..cee24343 100644--- a/src/pages/type/yaml-to-typescript.tsx+++ b/src/pages/type/yaml-to-typescript.tsx@@ -1,6 +1,6 @@import React from "react";-import { TypegenWrapper } from "src/containers/TypeLayout/TypegenWrapper";import { FileFormat, TypeLanguage } from "src/enums/file.enum";+import { TypegenWrapper } from "src/layout/TypeLayout/TypegenWrapper";const TypePage = () => {return <TypegenWrapper from={FileFormat.YAML} to={TypeLanguage.TypeScript} />;diff --git a/src/pages/widget.tsx b/src/pages/widget.tsxindex 0bfec74f..d8d7b179 100644--- a/src/pages/widget.tsx+++ b/src/pages/widget.tsx@@ -6,8 +6,8 @@ import { ThemeProvider } from "styled-components";import { NextSeo } from "next-seo";import toast from "react-hot-toast";import { darkTheme, lightTheme } from "src/constants/theme";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";-import { Toolbar } from "src/containers/Toolbar";+import { Toolbar } from "src/features/editor/Toolbar";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";import useFile from "src/store/useFile";import type { LayoutDirection } from "src/types/graph";@@ -22,7 +22,7 @@ interface EmbedMessage {}const GraphView = dynamic(- () => import("src/containers/Editor/components/views/GraphView").then(c => c.GraphView),+ () => import("src/features/editor/views/GraphView").then(c => c.GraphView),{ssr: false,}diff --git a/src/store/useConfig.ts b/src/store/useConfig.tsindex 60bc8c0a..d026e37f 100644--- a/src/store/useConfig.ts+++ b/src/store/useConfig.ts@@ -1,7 +1,7 @@import { create } from "zustand";import { persist } from "zustand/middleware";import { ViewMode } from "src/enums/viewMode.enum";-import useGraph from "../containers/Editor/components/views/GraphView/stores/useGraph";+import useGraph from "../features/editor/views/GraphView/stores/useGraph";const initialStates = {darkmodeEnabled: false,diff --git a/src/store/useFile.ts b/src/store/useFile.tsindex 9d4c35ee..e4f99d0f 100644--- a/src/store/useFile.ts+++ b/src/store/useFile.ts@@ -5,7 +5,7 @@ import { create } from "zustand";import { FileFormat } from "src/enums/file.enum";import { isIframe } from "src/lib/utils/helpers";import { contentToJson, jsonToContent } from "src/lib/utils/jsonAdapter";-import useGraph from "../containers/Editor/components/views/GraphView/stores/useGraph";+import useGraph from "../features/editor/views/GraphView/stores/useGraph";import useConfig from "./useConfig";import useJson from "./useJson";diff --git a/src/store/useJson.ts b/src/store/useJson.tsindex ba1e95a8..2a13fadc 100644--- a/src/store/useJson.ts+++ b/src/store/useJson.ts@@ -1,5 +1,5 @@import { create } from "zustand";-import useGraph from "src/containers/Editor/components/views/GraphView/stores/useGraph";+import useGraph from "src/features/editor/views/GraphView/stores/useGraph";interface JsonActions {setJson: (json: string) => void;diff --git a/src/store/useModal.ts b/src/store/useModal.tsindex c40f3967..d58e123c 100644--- a/src/store/useModal.ts+++ b/src/store/useModal.ts@@ -1,5 +1,5 @@import { create } from "zustand";-import type { Modal } from "src/containers/Modals";+import type { Modal } from "src/features/modals";type ModalState = {[key in Modal]: boolean;