docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
listlengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
import { Button } from "@mantine/core";
<mask> import React from "react"; <mask> import { Button } from "src/components/Button"; <mask> import { Footer } from "src/components/Footer"; <mask> import { PricingCards } from "src/containers/PricingCards"; <mask> import styled from "styled-components"; <mask> <mask> const StyledPageWrapper = styled.div` <...
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/pages/pricing.tsx
<Button component="a" href="/">
<mask> const Pricing = () => { <mask> return ( <mask> <> <mask> <StyledPageWrapper> <mask> <Button href="/" link> <mask> &lt; Go Back <mask> </Button> <mask> <StyledHeroSection> <mask> <img src="assets/icon.png" alt="json crack" width="400" /> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/pages/pricing.tsx
import { Button, Center, Container, Stack } from "@mantine/core";
<mask> import React from "react"; <mask> import Head from "next/head"; <mask> import Link from "next/link"; <mask> import { useRouter } from "next/router"; <mask> import { AiOutlineGithub, AiOutlineGoogle } from "react-icons/ai"; <mask> import { altogic } from "src/api/altogic"; <mask> import { Footer } from "sr...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/pages/sign-in.tsx
<mask> import Link from "next/link"; <mask> import { useRouter } from "next/router"; <mask> import { AiOutlineGithub, AiOutlineGoogle } from "react-icons/ai"; <mask> import { altogic } from "src/api/altogic"; <mask> import { Button } from "src/components/Button"; <mask> import { Footer } from "src/components/Foot...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/pages/sign-in.tsx
<mask> flex-direction: column; <mask> align-items: center; <mask> `; <mask> <mask> const StyledLoginButtons = styled.div` <mask> display: flex; <mask> flex-direction: column; <mask> align-items: center; <mask> justify-content: center; <mask> margin-top: 60px; <mask> gap: 24px; <mask> `; <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/pages/sign-in.tsx
<Container> <Center> <Stack my={60} w={250} spacing="xl"> <Button size="md" color="red" onClick={() => handleLoginClick("google")} leftIcon={<AiOutlineGoogle size={24} />} > Sign In ...
<mask> <img src="assets/icon.png" alt="json crack" width="400" /> <mask> </Link> <mask> <h1>Sign In</h1> <mask> </StyledHeroSection> <mask> <StyledLoginButtons> <mask> <Button status="DANGER" onClick={() => handleLoginClick("google")}> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/pages/sign-in.tsx
selectedNode: {} as NodeData,
<mask> edges: [] as EdgeData[], <mask> collapsedNodes: [] as string[], <mask> collapsedEdges: [] as string[], <mask> collapsedParents: [] as string[], <mask> selectedNode: [] as string | object, <mask> path: "", <mask> }; <mask> <mask> export type Graph = typeof initialStates; <mask> </s> feat:...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/store/useGraph.tsx
setSelectedNode: ({ nodeData, path }: { nodeData: NodeData; path: string }) => void;
<mask> toggleFullscreen: (value: boolean) => void; <mask> zoomIn: () => void; <mask> zoomOut: () => void; <mask> centerView: () => void; <mask> setSelectedNode: ({ node, path }: { node: string | string[]; path: string }) => void; <mask> } <mask> <mask> const useGraph = create<Graph & GraphActions>((s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/store/useGraph.tsx
setSelectedNode: ({ nodeData, path }) => set({ selectedNode: nodeData, path }),
<mask> } <mask> <mask> const useGraph = create<Graph & GraphActions>((set, get) => ({ <mask> ...initialStates, <mask> setSelectedNode: ({ node, path }) => set({ selectedNode: node, path }), <mask> setGraph: (data, options) => { <mask> const { nodes, edges } = parser(data ?? useJson.getState().json); ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/store/useGraph.tsx
path?: string;
<mask> interface NodeData<T = any> { <mask> id: string; <mask> disabled?: boolean; <mask> text?: any; <mask> height?: number; <mask> width?: number; <mask> isParent?: string; <mask> ports?: PortData[]; </s> feat: implement prsim & modal ui </s> remove import useStored from "src/store/useStored"; ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/typings/types.d.ts
import { getNodePath } from "../getNodePath";
<mask> import { parseTree } from "jsonc-parser"; <mask> import { addEdgeToGraph } from "./addEdgeToGraph"; <mask> import { addNodeToGraph } from "./addNodeToGraph"; <mask> import { traverse } from "./traverse"; <mask> <mask> export type Graph = { <mask> nodes: NodeData[]; </s> feat: implement prsim & modal u...
[ "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/utils/core/jsonParser.ts
states.graph.nodes = states.graph.nodes.map(node => ({ ...node, path: getNodePath(states.graph.nodes, states.graph.edges, node.id), }));
<mask> else addNodeToGraph({ graph: states.graph, text: "{}" }); <mask> } <mask> <mask> return states.graph; <mask> } catch (error) { <mask> console.error(error); <mask> return { <mask> nodes: [], <mask> edges: [], </s> feat: implement prsim & modal ui </s> remove se...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/7c2f319f239190a89c8e902300bc096fbc0df934
src/utils/core/jsonParser.ts
"html-to-image": "^1.9.0",
<mask> "@sentry/nextjs": "^7.1.1", <mask> "allotment": "^1.14.2", <mask> "compress-json": "^2.0.1", <mask> "next": "^12.1.5", <mask> "next-transpile-modules": "^9.0.0", <mask> "parse-json": "^6.0.2", <mask> "react": "^18.0.0", </s> create download & clipboard image modal </s> remove ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
package.json
"react-color": "^2.19.3",
<mask> "next": "^12.1.5", <mask> "next-transpile-modules": "^9.0.0", <mask> "parse-json": "^6.0.2", <mask> "react": "^18.0.0", <mask> "react-dom": "^18.0.0", <mask> "react-hot-toast": "^2.2.0", <mask> "react-icons": "^4.3.1", <mask> "react-render-if-visible": "^2.1.0", <mask> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
package.json
<mask> "react-render-if-visible": "^2.1.0", <mask> "react-twitter-embed": "^4.0.4", <mask> "react-zoom-pan-pinch": "^2.1.3", <mask> "reaflow": "^5.0.4", <mask> "save-html-as-image": "^1.7.1", <mask> "styled-components": "^5.3.5", <mask> "usehooks-ts": "^2.5.2", <mask> "zustand": ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
package.json
"@types/react-color": "^3.0.6",
<mask> "@types/jest": "^27.4.1", <mask> "@types/node": "^17.0.30", <mask> "@types/parse-json": "^4.0.0", <mask> "@types/react": "18.0.5", <mask> "@types/react-splitter-layout": "^3.0.2", <mask> "@types/styled-components": "^5.1.25", <mask> "babel-jest": "^28", <mask> "enzyme": "^...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
package.json
block?: boolean;
<mask> export interface ButtonProps <mask> extends React.ButtonHTMLAttributes<HTMLButtonElement> { <mask> status?: keyof typeof ButtonType; <mask> } <mask> <mask> function getButtonStatus(status: keyof typeof ButtonType, theme: DefaultTheme) { <mask> return theme[ButtonType[status]]; </s> create download...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/components/Button/index.tsx
const StyledButton = styled.button<{ status: keyof typeof ButtonType; block: boolean; }>`
<mask> function getButtonStatus(status: keyof typeof ButtonType, theme: DefaultTheme) { <mask> return theme[ButtonType[status]]; <mask> } <mask> <mask> const StyledButton = styled.button<{ status: keyof typeof ButtonType }>` <mask> display: block; <mask> background: ${({ status, theme }) => getButtonStatu...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/components/Button/index.tsx
width: ${({ block }) => (block ? "100%" : "fit-content")};
<mask> background: ${({ status, theme }) => getButtonStatus(status, theme)}; <mask> color: #ffffff; <mask> padding: 8px 16px; <mask> min-width: 60px; <mask> width: fit-content; <mask> <mask> :disabled { <mask> cursor: not-allowed; <mask> opacity: 0.5; <mask> } </s> create download & cl...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/components/Button/index.tsx
block = false,
<mask> export const Button: React.FC<ButtonProps> = ({ <mask> children, <mask> status, <mask> ...props <mask> }) => { <mask> return ( <mask> <StyledButton <mask> type="button" <mask> status={status ?? "PRIMARY"} </s> create download & clipboard image modal </s> remove <StyledButton...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/components/Button/index.tsx
<StyledButton type="button" status={status ?? "PRIMARY"} block={block} {...props} >
<mask> status, <mask> ...props <mask> }) => { <mask> return ( <mask> <StyledButton type="button" status={status ?? "PRIMARY"} {...props}> <mask> <StyledButtonContent>{children}</StyledButtonContent> <mask> </StyledButton> <mask> ); <mask> }; </s> create download & clipboard image modal <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/components/Button/index.tsx
import { getEdgeNodes } from "src/containers/Editor/LiveEditor/helpers";
<mask> import React from "react"; <mask> import { Canvas, EdgeData, ElkRoot, NodeData } from "reaflow"; <mask> import { CustomNode } from "src/components/CustomNode"; <mask> import { getEdgeNodes } from "src/containers/LiveEditor/helpers"; <mask> import useConfig from "src/hooks/store/useConfig"; <mask> import sh...
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/components/Graph/index.tsx
import { ImportModal } from "src/containers/Modals/ImportModal"; import { ClearModal } from "src/containers/Modals/ClearModal"; import { ShareModal } from "src/containers/Modals/ShareModal";
<mask> } from "react-icons/ai"; <mask> <mask> import { Tooltip } from "src/components/Tooltip"; <mask> import { useRouter } from "next/router"; <mask> import { ImportModal } from "src/containers/ImportModal"; <mask> import { ClearModal } from "src/containers/ClearModal"; <mask> import { ShareModal } from "src/c...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/components/Sidebar/index.tsx
import { getNextLayout } from "src/containers/Editor/LiveEditor/helpers";
<mask> import { ClearModal } from "src/containers/ClearModal"; <mask> import { ShareModal } from "src/containers/ShareModal"; <mask> import { IoAlertCircleSharp } from "react-icons/io5"; <mask> import useConfig from "src/hooks/store/useConfig"; <mask> import { getNextLayout } from "src/containers/LiveEditor/helper...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/components/Sidebar/index.tsx
import { JsonEditor } from "src/containers/Editor/JsonEditor";
<mask> import { Allotment } from "allotment"; <mask> import React from "react"; <mask> import { JsonEditor } from "src/containers/JsonEditor"; <mask> import { StyledEditor } from "./styles"; <mask> import dynamic from "next/dynamic"; <mask> import useConfig from "src/hooks/store/useConfig"; <mask> <mask> const...
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/containers/Editor/Panes.tsx
const LiveEditor = dynamic(() => import("src/containers/Editor/LiveEditor"), {
<mask> import { StyledEditor } from "./styles"; <mask> import dynamic from "next/dynamic"; <mask> import useConfig from "src/hooks/store/useConfig"; <mask> <mask> const LiveEditor = dynamic(() => import("src/containers/LiveEditor"), { <mask> ssr: false, <mask> }); <mask> <mask> const Panes: React.FC = () =...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/containers/Editor/Panes.tsx
<mask> import React from "react"; <mask> import { saveAsPng } from "save-html-as-image"; <mask> import { <mask> AiOutlineFullscreen, <mask> AiOutlineMinus, <mask> AiOutlinePlus, <mask> } from "react-icons/ai"; </s> create download & clipboard image modal </s> remove import { JsonEditor } from "src/contain...
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/containers/Editor/Tools.tsx
import { SearchInput } from "src/components/SearchInput";
<mask> } from "react-icons/ai"; <mask> import { FiDownload } from "react-icons/fi"; <mask> import { HiOutlineSun, HiOutlineMoon } from "react-icons/hi"; <mask> import { MdCenterFocusWeak } from "react-icons/md"; <mask> import { SearchInput } from "src/containers/SearchInput"; <mask> import styled from "styled-com...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/containers/Editor/Tools.tsx
import { DownloadModal } from "../Modals/DownloadModal";
<mask> import { SearchInput } from "src/components/SearchInput"; <mask> import styled from "styled-components"; <mask> import useConfig from "src/hooks/store/useConfig"; <mask> import shallow from "zustand/shallow"; <mask> <mask> export const StyledTools = styled.div` <mask> display: flex; <mask> align-ite...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/containers/Editor/Tools.tsx
const [isDownloadVisible, setDownloadVisible] = React.useState(false);
<mask> `; <mask> <mask> export const Tools: React.FC = () => { <mask> const [lightmode, performance, hideEditor] = useConfig( <mask> (state) => [ <mask> state.settings.lightmode, <mask> state.settings.performance, <mask> state.settings.hideEditor, <mask> ], </s> create download & ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/containers/Editor/Tools.tsx
<mask> const centerView = useConfig((state) => state.centerView); <mask> const toggleEditor = () => updateSetting("hideEditor", !hideEditor); <mask> const toggleTheme = () => updateSetting("lightmode", !lightmode); <mask> <mask> const exportAsImage = () => { <mask> saveAsPng(document.querySelector("s...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/containers/Editor/Tools.tsx
<StyledToolElement aria-label="save" onClick={() => setDownloadVisible(true)} >
<mask> {lightmode ? <HiOutlineMoon /> : <HiOutlineSun />} <mask> </StyledToolElement> <mask> {!performance && <SearchInput />} <mask> {!performance && ( <mask> <StyledToolElement aria-label="save" onClick={exportAsImage}> <mask> <FiDownload /> <mask> </StyledTo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/containers/Editor/Tools.tsx
<DownloadModal visible={isDownloadVisible} setVisible={setDownloadVisible} />
<mask> </StyledToolElement> <mask> <StyledToolElement aria-label="zoom in" onClick={zoomIn}> <mask> <AiOutlinePlus /> <mask> </StyledToolElement> <mask> </StyledTools> <mask> ); <mask> }; </s> create download & clipboard image modal </s> remove <StyledToolElement aria-lab...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/containers/Editor/Tools.tsx
<mask> import { useRouter } from "next/router"; <mask> import styled from "styled-components"; <mask> <mask> import { Button } from "src/components/Button"; <mask> import { Image } from "src/components/Image"; <mask> <mask> const StyledNotFound = styled.div` <mask> display: flex; <mask> justify-content: ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/pages/404.tsx
<img src="/404.svg" alt="not found" width={300} height={400} />
<mask> <mask> return ( <mask> <StyledNotFound> <mask> <StyledImageWrapper> <mask> <Image src="/404.svg" alt="404" width={300} height={400} /> <mask> </StyledImageWrapper> <mask> <StyledMessage>WIZARDS BEHIND CURTAINS?</StyledMessage> <mask> <StyledSubMessage> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/pages/404.tsx
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;900&family=Roboto+Mono:wght@500&family=Catamaran:wght@400;500;600;700&display=swap"
<mask> href="https://fonts.gstatic.com" <mask> crossOrigin="anonymous" <mask> /> <mask> <link <mask> href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;900&family=Roboto+Mono:wght@500&family=Catamaran:wght@400;500;600&display=swap" <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/pages/_document.tsx
crossOrigin="anonymous"
<mask> <link <mask> href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;900&family=Roboto+Mono:wght@500&family=Catamaran:wght@400;500;600;700&display=swap" <mask> rel="stylesheet" <mask> /> <mask> </Head> <mask> <body> <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/820ad3f651f758e9b1139fc232131aae85a56c3a
src/pages/_document.tsx
import useKeyPress from "src/hooks/useKeyPress";
<mask> import { ConfigActionType } from "src/reducer/reducer"; <mask> import { Modal, ModalProps } from "src/components/Modal"; <mask> import { Button } from "src/components/Button"; <mask> import { AiOutlineUpload } from "react-icons/ai"; <mask> import useKeyPress from "../../hooks/useKeyPress"; <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/84ba94efd0605f22194d7efbc68e024c93b30896
src/containers/ImportModal/index.tsx
if (handleEspacePress) setVisible(false);
<mask> <mask> const handleEspacePress = useKeyPress("Escape"); <mask> const handleEnterKeyPress = useKeyPress("Enter"); <mask> React.useEffect(() => { <mask> if (handleEspacePress) { <mask> setVisible(false); <mask> } <mask> <mask> if (handleEnterKeyPress && (jsonFile || url)) { <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/84ba94efd0605f22194d7efbc68e024c93b30896
src/containers/ImportModal/index.tsx
if (handleEnterKeyPress && (jsonFile || url)) handleImportFile();
<mask> if (handleEspacePress) { <mask> setVisible(false); <mask> } <mask> <mask> if (handleEnterKeyPress && (jsonFile || url)) { <mask> handleImportFile(); <mask> } <mask> }, [handleEspacePress, handleEnterKeyPress]); <mask> <mask> React.useEffect(() => { <mask> return (...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/84ba94efd0605f22194d7efbc68e024c93b30896
src/containers/ImportModal/index.tsx
import React from "react";
<mask> import { useState, useEffect } from "react"; <mask> <mask> const useKeyPress = (targetKey) => { <mask> const [keyPressed, setKeyPressed] = useState<boolean>(false); <mask> function downHandler({ key }) { <mask> if (key === targetKey) { </s> Update ImportModal and useKeyPress from review notes </s...
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/84ba94efd0605f22194d7efbc68e024c93b30896
src/hooks/useKeyPress.tsx
const [keyPressed, setKeyPressed] = React.useState(false);
<mask> import { useState, useEffect } from "react"; <mask> <mask> const useKeyPress = (targetKey) => { <mask> const [keyPressed, setKeyPressed] = useState<boolean>(false); <mask> function downHandler({ key }) { <mask> if (key === targetKey) { <mask> setKeyPressed(true); <mask> } <mask> } ...
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/84ba94efd0605f22194d7efbc68e024c93b30896
src/hooks/useKeyPress.tsx
React.useEffect(() => {
<mask> if (key === targetKey) { <mask> setKeyPressed(false); <mask> } <mask> }; <mask> useEffect(() => { <mask> window.addEventListener("keydown", downHandler); <mask> window.addEventListener("keyup", upHandler); <mask> <mask> return () => { <mask> window.removeEventListen...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/84ba94efd0605f22194d7efbc68e024c93b30896
src/hooks/useKeyPress.tsx
import { MdUnfoldMore, MdUnfoldLess, MdAutoFixHigh, MdOutlineAutoFixOff, } from "react-icons/md";
<mask> import Link from "next/link"; <mask> import styled from "styled-components"; <mask> import { useLocalStorage } from "usehooks-ts"; <mask> import { FaFileImport } from "react-icons/fa"; <mask> import { MdUnfoldMore, MdUnfoldLess } from "react-icons/md"; <mask> import { <mask> AiFillHome, <mask> AiOutl...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/components/Sidebar/index.tsx
const toggle = (setting: "expand" | "controls" | "autoformat") => {
<mask> const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => { <mask> if (e.target.files) setJsonFile(e.target.files?.item(0)); <mask> }; <mask> <mask> const toggle = (setting: "expand" | "controls") => { <mask> setConfig((c) => ({ <mask> ...c, <mask> [setting]: !c[sett...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/components/Sidebar/index.tsx
<Link href="/"> <StyledElement as="a" title="Home"> <AiFillHome /> </StyledElement> </Link> <StyledElement as="a" title="Auto Format" onClick={() => toggle("autoformat")} > {config.autoformat ? <MdAutoFixHi...
<mask> <StyledText secondary>V</StyledText> <mask> </StyledLogo> <mask> </StyledElement> <mask> </Link> <mask> <StyledElement title="Home"> <mask> <Link href="/"> <mask> <a> <mask> <AiFillHome /> <mask> </a> <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/components/Sidebar/index.tsx
autoformat: true,
<mask> layout: "LEFT", <mask> expand: true, <mask> controls: true, <mask> }; </s> add option to disable autoformat </s> remove const toggle = (setting: "expand" | "controls") => { </s> add const toggle = (setting: "expand" | "controls" | "autoformat") => { </s> remove }, [value]); </s> add }, [val...
[ "keep", "keep", "add", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/constants/data.ts
<mask> import dynamic from "next/dynamic"; <mask> import React, { ComponentType } from "react"; <mask> import { IAceEditorProps } from "react-ace"; <mask> import toast from "react-hot-toast"; <mask> <mask> function isJson(value: string) { </s> add option to disable autoformat </s> remove import { MdUnfoldMore, ...
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/containers/JsonEditor/index.tsx
import dynamic from "next/dynamic";
<mask> import React, { ComponentType } from "react"; <mask> import { IAceEditorProps } from "react-ace"; <mask> import toast from "react-hot-toast"; <mask> import { StorageConfig } from "src/typings/global"; <mask> import { useLocalStorage } from "usehooks-ts"; <mask> import { defaultConfig } from "src/constants/...
[ "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/containers/JsonEditor/index.tsx
import { StorageConfig } from "src/typings/global"; import { useLocalStorage } from "usehooks-ts"; import { defaultConfig } from "src/constants/data";
<mask> import { IAceEditorProps } from "react-ace"; <mask> import toast from "react-hot-toast"; <mask> <mask> function isJson(value: string) { <mask> value = typeof value !== "string" ? JSON.stringify(value) : value; <mask> </s> add option to disable autoformat </s> remove import dynamic from "next/dynamic";...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/containers/JsonEditor/index.tsx
const [config] = useLocalStorage<StorageConfig>("config", defaultConfig);
<mask> const JsonEditor: React.FC<{ <mask> json: string; <mask> setJson: React.Dispatch<React.SetStateAction<string>>; <mask> }> = ({ json, setJson }) => { <mask> const [value, setValue] = React.useState( <mask> JSON.stringify(JSON.parse(json), null, 2) <mask> ); <mask> </s> add option to disable ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/containers/JsonEditor/index.tsx
if (config.autoformat) { return setValue(JSON.stringify(JSON.parse(json), null, 2)); } setValue(json);
<mask> JSON.stringify(JSON.parse(json), null, 2) <mask> ); <mask> <mask> React.useEffect(() => { <mask> setValue(JSON.stringify(JSON.parse(json), null, 2)); <mask> }, [json]); <mask> <mask> React.useEffect(() => { <mask> const formatTimer = setTimeout(() => { <mask> if (!isJson(val...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/containers/JsonEditor/index.tsx
if (config.autoformat) { setValue(JSON.stringify(JSON.parse(value), null, 2)); } else { setValue(value); }
<mask> <mask> React.useEffect(() => { <mask> const formatTimer = setTimeout(() => { <mask> if (!isJson(value)) return; <mask> setValue(JSON.stringify(JSON.parse(value), null, 2)); <mask> setJson(value); <mask> }, 2000); <mask> <mask> return () => clearTimeout(formatTimer); <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/containers/JsonEditor/index.tsx
}, [value, config.autoformat]);
<mask> setJson(value); <mask> }, 2000); <mask> <mask> return () => clearTimeout(formatTimer); <mask> }, [value]); <mask> <mask> return ( <mask> <AceEditor <mask> value={value} <mask> onChange={setValue} </s> add option to disable autoformat </s> remove setValue(JSON....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/containers/JsonEditor/index.tsx
autoformat: boolean;
<mask> layout: CanvasDirection; <mask> expand: boolean; <mask> controls: boolean; <mask> } </s> add option to disable autoformat </s> remove import { MdUnfoldMore, MdUnfoldLess } from "react-icons/md"; </s> add import { MdUnfoldMore, MdUnfoldLess, MdAutoFixHigh, MdOutlineAutoFixOff, } fr...
[ "keep", "keep", "add", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/89720cc82802218d31ff38c1ce585eed1856a278
src/typings/global.ts
const StyledWrapper = styled.div<{ isArray?: boolean, isElement?: boolean }>`
<mask> import React from "react"; <mask> import { Handle, Position } from "react-flow-renderer"; <mask> import styled from "styled-components"; <mask> <mask> const StyledWrapper = styled.div<{ isArray?: boolean }>` <mask> background: ${({ theme }) => theme.BLACK_PRIMARY}; <mask> border: 1px solid ${({ theme...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8ea665a41b69c8806da353f12919492a6603517b
src/pages/editor/LiveEditor/Node.tsx
color: ${({ theme, isArray, isElement }) => isArray ? theme.SEAGREEN : isElement && theme.ORANGE};
<mask> background: ${({ theme }) => theme.BLACK_PRIMARY}; <mask> border: 1px solid ${({ theme }) => theme.BLACK}; <mask> border-radius: 5px; <mask> padding: 16px; <mask> color: ${({ theme, isArray }) => isArray && theme.SEAGREEN}; <mask> width: auto; <mask> min-width: 100px; <mask> text-align: $...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8ea665a41b69c8806da353f12919492a6603517b
src/pages/editor/LiveEditor/Node.tsx
// temporary solution for array items if (Object.keys(json).every((val) => !isNaN(+val))) { return ( <StyledWrapper isElement> {Object.values(json).join('')} <Handle type="source" position={Position.Left} /> <Handle type="target" position={Position.Right} /> ...
<mask> <mask> if (typeof json === "object") { <mask> const keyPairs = Object.entries(json); <mask> <mask> return ( <mask> <StyledWrapper> <mask> {keyPairs.map((entries) => { <mask> const isValidValue = <mask> typeof entries[1] === "string" || typeof entries[1] ==...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8ea665a41b69c8806da353f12919492a6603517b
src/pages/editor/LiveEditor/Node.tsx
import pkg from "../../../package.json";
<mask> import { FaDiscord, FaGithub, FaLinkedin, FaTwitter } from "react-icons/fa"; <mask> import styled from "styled-components"; <mask> <mask> export const StyledFooter = styled.footer` <mask> display: flex; <mask> flex-direction: row; </s> Revert "implement pro version updates" This reverts commit 041fa...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/components/Footer/index.tsx
<mask> import { baseURL } from "src/constants/data"; <mask> import { TABS } from "src/constants/previewSection"; <mask> import { PricingCards } from "../PricingCards"; <mask> import * as Styles from "./styles"; <mask> import { Navbar } from "src/components/Navbar"; <mask> <mask> const SyntaxHighlighter = dynami...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/containers/Home/index.tsx
const Navbar = () => ( <Styles.StyledNavbar> <Styles.StyledNavLink href="/editor">Editor</Styles.StyledNavLink> <Styles.StyledNavLink href="#features">Features</Styles.StyledNavLink> <Styles.StyledNavLink href="#sponsor">Sponsor</Styles.StyledNavLink> <Styles.StyledNavLink href="https://github.c...
<mask> ssr: false, <mask> }); <mask> <mask> const HeroSection = () => ( <mask> <Styles.StyledHeroSection id="main"> <mask> <Styles.StyledTitle> <mask> <Styles.StyledGradientText>JSON</Styles.StyledGradientText> CRACK </s> Revert "implement pro version updates" This reverts commit 041fa31a86b876e...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/containers/Home/index.tsx
<mask> import React from "react"; <mask> import type { AppProps } from "next/app"; <mask> import { useRouter } from "next/router"; <mask> import localFont from "@next/font/local"; <mask> import { init } from "@sentry/nextjs"; <mask> import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; <mask>...
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/_app.tsx
<mask> import GlobalStyle from "src/constants/globalStyle"; <mask> import { darkTheme, lightTheme } from "src/constants/theme"; <mask> import { ModalController } from "src/containers/ModalController"; <mask> import useStored from "src/store/useStored"; <mask> import useUser from "src/store/useUser"; <mask> import...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/_app.tsx
const [isReady, setReady] = React.useState(false);
<mask> }, <mask> }); <mask> <mask> function JsonCrack({ Component, pageProps }: AppProps) { <mask> const [isLoaded, setIsLoaded] = React.useState(false); <mask> const { isReady } = useRouter(); <mask> const lightmode = useStored(state => state.lightmode); <mask> const checkSession = useUser(state => ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/_app.tsx
<mask> function JsonCrack({ Component, pageProps }: AppProps) { <mask> const [isLoaded, setIsLoaded] = React.useState(false); <mask> const { isReady } = useRouter(); <mask> const lightmode = useStored(state => state.lightmode); <mask> const checkSession = useUser(state => state.checkSession); <mask> <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/_app.tsx
setReady(true); }, []);
<mask> const lightmode = useStored(state => state.lightmode); <mask> const checkSession = useUser(state => state.checkSession); <mask> <mask> React.useEffect(() => { <mask> if (isReady) { <mask> checkSession(); <mask> } <mask> setIsLoaded(true); <mask> }, [checkSession, isReady]); <...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/_app.tsx
if (isReady)
<mask> } <mask> setIsLoaded(true); <mask> }, [checkSession, isReady]); <mask> <mask> if (isLoaded) <mask> return ( <mask> <QueryClientProvider client={queryClient}> <mask> <GoogleAnalytics /> <mask> <ThemeProvider theme={lightmode ? lightTheme : darkTheme}> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/_app.tsx
import { Button } from "src/components/Button";
<mask> import dynamic from "next/dynamic"; <mask> import Head from "next/head"; <mask> import materialDark from "react-syntax-highlighter/dist/cjs/styles/prism/material-dark"; <mask> import { Footer } from "src/components/Footer"; <mask> import styled from "styled-components"; <mask> <mask> const SyntaxHighligh...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/docs.tsx
<mask> import dynamic from "next/dynamic"; <mask> import Head from "next/head"; <mask> import materialDark from "react-syntax-highlighter/dist/cjs/styles/prism/material-dark"; <mask> import { Footer } from "src/components/Footer"; <mask> import { Navbar } from "src/components/Navbar"; <mask> import styled from "s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/docs.tsx
<mask> <mask> const Docs = () => { <mask> return ( <mask> <> <mask> <Navbar /> <mask> <Head> <mask> <title>Creating JSON Crack Embed | JSON Crack</title> <mask> <meta name="description" content="Embedding JSON Crack tutorial into your websites." /> <mask> </Head> <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/docs.tsx
<Button href="/" link status="SECONDARY"> &lt; Go Back </Button>
<mask> <title>Creating JSON Crack Embed | JSON Crack</title> <mask> <meta name="description" content="Embedding JSON Crack tutorial into your websites." /> <mask> </Head> <mask> <StyledPage> <mask> <h1>Documentation</h1> <mask> <StyledContent> <mask> <h2># Fe...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/docs.tsx
<mask> import React from "react"; <mask> import { Button } from "src/components/Button"; <mask> import { Footer } from "src/components/Footer"; <mask> import { Navbar } from "src/components/Navbar"; <mask> import { PricingCards } from "src/containers/PricingCards"; <mask> import styled from "styled-components"; ...
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/pricing.tsx
<mask> `; <mask> const Pricing = () => { <mask> return ( <mask> <> <mask> <Navbar /> <mask> <StyledPageWrapper> <mask> <Button href="/" link> <mask> &lt; Go Back <mask> </Button> <mask> <StyledHeroSection> </s> Revert "implement pro version updates" This r...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/pages/pricing.tsx
<mask> login: response => { <mask> set({ user: response.user as any, isAuthenticated: true }); <mask> }, <mask> checkSession: async () => { <mask> if (location.pathname === "/") return; <mask> const currentSession = altogic.auth.getSession(); <mask> <mask> if (currentSession) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/store/useUser.tsx
<mask> if (!data.errors?.items.length) { <mask> set({ user: data.user as any, isAuthenticated: true }); <mask> } <mask> } <mask> <mask> if (get().isPremium()) location.replace(location.href.replace("://", "://pro.")); <mask> }, <mask> })); <mask> <mask> export default useUser; ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/8fc4c22562fb28a3e5c20c9777670a63231ed93e
src/store/useUser.tsx
import vscDarkPlus from "react-syntax-highlighter/dist/cjs/styles/prism/vsc-dark-plus";
<mask> HiOutlineSearchCircle, <mask> } from "react-icons/hi"; <mask> import { IoHeart } from "react-icons/io5"; <mask> import { SiVisualstudiocode } from "react-icons/si"; <mask> import vscDarkPlus from "react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus"; <mask> import { CarbonAds } from "src/compone...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/935901f87eed6a7e8f93629dc5ef9ff5ccb84732
src/containers/Home/index.tsx
const SyntaxHighlighter = dynamic(() => import("react-syntax-highlighter/dist/cjs/prism-async"), {
<mask> import { TABS } from "src/constants/previewSection"; <mask> import { PricingCards } from "../PricingCards"; <mask> import * as Styles from "./styles"; <mask> <mask> const SyntaxHighlighter = dynamic(() => import("react-syntax-highlighter/dist/esm/prism-async"), { <mask> ssr: false, <mask> }); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/935901f87eed6a7e8f93629dc5ef9ff5ccb84732
src/containers/Home/index.tsx
import vs from "react-syntax-highlighter/dist/cjs/styles/prism/vs"; import vscDarkPlus from "react-syntax-highlighter/dist/cjs/styles/prism/vsc-dark-plus";
<mask> import React from "react"; <mask> import dynamic from "next/dynamic"; <mask> import toast from "react-hot-toast"; <mask> import { FiCopy } from "react-icons/fi"; <mask> import vs from "react-syntax-highlighter/dist/esm/styles/prism/vs"; <mask> import vscDarkPlus from "react-syntax-highlighter/dist/esm/styl...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/935901f87eed6a7e8f93629dc5ef9ff5ccb84732
src/containers/Modals/NodeModal/index.tsx
const SyntaxHighlighter = dynamic(() => import("react-syntax-highlighter/dist/cjs/prism-async"), {
<mask> import { Button } from "src/components/Button"; <mask> import { Modal } from "src/components/Modal"; <mask> import useStored from "src/store/useStored"; <mask> <mask> const SyntaxHighlighter = dynamic(() => import("react-syntax-highlighter/dist/esm/prism-async"), { <mask> ssr: false, <mask> }); <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/935901f87eed6a7e8f93629dc5ef9ff5ccb84732
src/containers/Modals/NodeModal/index.tsx
import materialDark from "react-syntax-highlighter/dist/cjs/styles/prism/material-dark";
<mask> import React from "react"; <mask> import dynamic from "next/dynamic"; <mask> import Head from "next/head"; <mask> import materialDark from "react-syntax-highlighter/dist/esm/styles/prism/material-dark"; <mask> import { Button } from "src/components/Button"; <mask> import { Footer } from "src/components/Foo...
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/935901f87eed6a7e8f93629dc5ef9ff5ccb84732
src/pages/docs.tsx
const SyntaxHighlighter = dynamic(() => import("react-syntax-highlighter/dist/cjs/prism-async"), {
<mask> import { Button } from "src/components/Button"; <mask> import { Footer } from "src/components/Footer"; <mask> import styled from "styled-components"; <mask> <mask> const SyntaxHighlighter = dynamic(() => import("react-syntax-highlighter/dist/esm/prism-async"), { <mask> ssr: false, <mask> }); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/935901f87eed6a7e8f93629dc5ef9ff5ccb84732
src/pages/docs.tsx
value={val[1]}
<mask> data-x={x} <mask> data-y={y} <mask> key={idx} <mask> width={width} <mask> > <mask> <Styled.StyledKey objectKey>{val[0]}: </Styled.StyledKey> <mask> {val[1]} <mask> <...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/94231aca10640deb7e9f5f7e63a1cc0205770751
src/components/CustomNode/ObjectNode.tsx
import styled, { DefaultTheme } from "styled-components"; function getTypeColor(value: string, theme: DefaultTheme) { if (!Number.isNaN(+value)) return "#FD0079"; if (value === "true") return theme.TEXT_POSITIVE; if (value === "false") return theme.TEXT_DANGER; }
<mask> import styled from "styled-components"; <mask> <mask> export const StyledTextWrapper = styled.div` <mask> display: flex; <mask> justify-content: center; <mask> align-items: center; </s> add colors for different value types </s> remove export const StyledRow = styled.span<{ width: number }>` </s> a...
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/94231aca10640deb7e9f5f7e63a1cc0205770751
src/components/CustomNode/styles.tsx
parent ? theme.NODE_KEY : objectKey ? theme.OBJECT_KEY : theme.TEXT_POSITIVE}; font-size: ${({ parent }) => parent && "14px"};
<mask> parent?: boolean; <mask> }>` <mask> font-weight: 500; <mask> color: ${({ theme, objectKey, parent }) => <mask> parent ? theme.NODE_KEY : objectKey ? "#5c87ff" : theme.TEXT_POSITIVE}; <mask> `; <mask> <mask> export const StyledRow = styled.span<{ width: number }>` <mask> height: 18px; <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/94231aca10640deb7e9f5f7e63a1cc0205770751
src/components/CustomNode/styles.tsx
export const StyledRow = styled.span<{ width: number; value: string }>`
<mask> color: ${({ theme, objectKey, parent }) => <mask> parent ? theme.NODE_KEY : objectKey ? "#5c87ff" : theme.TEXT_POSITIVE}; <mask> `; <mask> <mask> export const StyledRow = styled.span<{ width: number }>` <mask> height: 18px; <mask> overflow: hidden; <mask> text-overflow: ellipsis; <mask> w...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/94231aca10640deb7e9f5f7e63a1cc0205770751
src/components/CustomNode/styles.tsx
OBJECT_KEY: "#59b8ff",
<mask> BLACK_SECONDARY: "#23272A", <mask> SILVER_DARK: "#4D4D4D", <mask> NODE_KEY: "#FAA81A", <mask> <mask> INTERACTIVE_NORMAL: "#b9bbbe", <mask> INTERACTIVE_HOVER: "#dcddde", <mask> INTERACTIVE_ACTIVE: "#fff", </s> add colors for different value types </s> remove BACKGROUND_NODE: "#FFFFFF", </s...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/94231aca10640deb7e9f5f7e63a1cc0205770751
src/constants/theme.ts
OBJECT_KEY: "#0260E8",
<mask> SILVER_DARK: "#CCCCCC", <mask> NODE_KEY: "#DC3790", <mask> <mask> INTERACTIVE_NORMAL: "#4f5660", <mask> INTERACTIVE_HOVER: "#2e3338", <mask> INTERACTIVE_ACTIVE: "#060607", <mask> BACKGROUND_NODE: "#FAFAFA", <mask> BACKGROUND_TERTIARY: "#e3e5e8", </s> add colors for different value types <...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/94231aca10640deb7e9f5f7e63a1cc0205770751
src/constants/theme.ts
BACKGROUND_NODE: "#FAFAFA",
<mask> <mask> INTERACTIVE_NORMAL: "#4f5660", <mask> INTERACTIVE_HOVER: "#2e3338", <mask> INTERACTIVE_ACTIVE: "#060607", <mask> BACKGROUND_NODE: "#FFFFFF", <mask> BACKGROUND_TERTIARY: "#e3e5e8", <mask> BACKGROUND_SECONDARY: "#f2f3f5", <mask> BACKGROUND_PRIMARY: "#FFFFFF", <mask> BACKGROUND_MODI...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/94231aca10640deb7e9f5f7e63a1cc0205770751
src/constants/theme.ts
width: isExpanded ? 35 + longestLine * (el.parent ? 9 : 8) : 180,
<mask> text: toString(el.text), <mask> data: { <mask> isParent: el.parent, <mask> }, <mask> width: isExpanded ? 35 + longestLine * 8 : 180, <mask> height, <mask> }); <mask> } else { <mask> edges.push(el); <mask> } </s> add colors for diffe...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/94231aca10640deb7e9f5f7e63a1cc0205770751
src/containers/Editor/LiveEditor/helpers.ts
OBJECT_KEY: string;
<mask> SILVER_DARK: string; <mask> PRIMARY: string; <mask> NODE_KEY: string; <mask> <mask> INTERACTIVE_NORMAL: string; <mask> INTERACTIVE_HOVER: string; <mask> INTERACTIVE_ACTIVE: string; </s> add colors for different value types </s> remove BACKGROUND_NODE: "#FFFFFF", </s> add BAC...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/94231aca10640deb7e9f5f7e63a1cc0205770751
src/typings/styled.d.ts
"dagre": "^0.8.5",
<mask> "lint": "next lint" <mask> }, <mask> "dependencies": { <mask> "next": "12.0.9", <mask> "react": "17.0.2", <mask> "react-dom": "17.0.2", <mask> "react-flow-renderer": "^9.7.3", <mask> "react-json-editor-ajrm": "^2.5.13", <mask> "styled-components": "^5.3.3", </s> add reac...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/990127b04336fb7d6d20764463fa1e8a5458eeef
package.json
"react-json-editor-ajrm": "^2.5.13", "styled-components": "^5.3.3", "usehooks-ts": "^2.3.0", "uuidv4": "^6.2.12"
<mask> "next": "12.0.9", <mask> "react": "17.0.2", <mask> "react-dom": "17.0.2", <mask> "react-flow-renderer": "^9.7.3", <mask> "styled-components": "^5.3.3" <mask> }, <mask> "devDependencies": { <mask> "@types/node": "17.0.13", <mask> "@types/react": "17.0.38", <mask> "@ty...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/990127b04336fb7d6d20764463fa1e8a5458eeef
package.json
"@types/dagre": "^0.7.47",
<mask> }, <mask> "devDependencies": { <mask> "@types/node": "17.0.13", <mask> "@types/react": "17.0.38", <mask> "@types/react-json-editor-ajrm": "^2.5.2", <mask> "@types/styled-components": "^5.1.21", <mask> "eslint": "8.8.0", <mask> "eslint-config-next": "12.0.9", </s> add react-fl...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/990127b04336fb7d6d20764463fa1e8a5458eeef
package.json
"@types/react-json-editor-ajrm": "^2.5.2",
<mask> "devDependencies": { <mask> "@types/dagre": "^0.7.47", <mask> "@types/node": "17.0.13", <mask> "@types/react": "17.0.38", <mask> "@types/styled-components": "^5.1.21", <mask> "eslint": "8.8.0", <mask> "eslint-config-next": "12.0.9", <mask> "prettier": "^2.5.1", <mask> "...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/990127b04336fb7d6d20764463fa1e8a5458eeef
package.json
toast.loading("Loading...", { id: "toastFetch" });
<mask> const handleImportFile = () => { <mask> if (url) { <mask> setJsonFile(null); <mask> <mask> const toastId = toast.loading("Loading..."); <mask> return fetch(url) <mask> .then((res) => res.json()) <mask> .then((json) => { <mask> dispatch({ <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/9a6bcd3718da9d9d6e50231c2151ca9ea5875aac
src/containers/ImportModal/index.tsx
<mask> type: ConfigActionType.SET_JSON, <mask> payload: JSON.stringify(json), <mask> }); <mask> <mask> toast.dismiss(toastId); <mask> setVisible(false); <mask> }) <mask> .catch(() => toast.error("Failed to fetch JSON!")); <mask> } <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/9a6bcd3718da9d9d6e50231c2151ca9ea5875aac
src/containers/ImportModal/index.tsx
.catch(() => toast.error("Failed to fetch JSON!")) .finally(() => toast.dismiss("toastFetch"));
<mask> <mask> toast.dismiss(toastId); <mask> setVisible(false); <mask> }) <mask> .catch(() => toast.error("Failed to fetch JSON!")); <mask> } <mask> <mask> if (jsonFile) { <mask> const reader = new FileReader(); <mask> </s> fix failed fetch toast loading <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/9a6bcd3718da9d9d6e50231c2151ca9ea5875aac
src/containers/ImportModal/index.tsx
"version": "v2.0.3",
<mask> { <mask> "name": "json-crack", <mask> "private": true, <mask> "version": "v2.0.2", <mask> "author": "https://github.com/AykutSarac", <mask> "homepage": "https://jsoncrack.com", <mask> "scripts": { <mask> "dev": "next dev", <mask> "build": "next build && next export", </s> update nex...
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/a0b769faa7a381e0299b032da276af5a6cbb5c80
package.json
"next": "^12.3.0",
<mask> "@sentry/nextjs": "^7.12.1", <mask> "allotment": "^1.17.0", <mask> "compress-json": "^2.1.1", <mask> "html-to-image": "^1.10.8", <mask> "next": "^12.2.5", <mask> "next-transpile-modules": "^9.0.0", <mask> "parse-json": "^6.0.2", <mask> "react": "^18.2.0", <mask> "reac...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/a0b769faa7a381e0299b032da276af5a6cbb5c80
package.json
const lightmode = useStored(state => (state.lightmode ? "light" : "vs-dark"));
<mask> const expand = useConfig(state => state.expand); <mask> const setJson = useConfig(state => state.setJson); <mask> const setGraphValue = useGraph(state => state.setGraphValue); <mask> const [value, setValue] = React.useState<string | undefined>(""); <mask> <mask> <mask> React.useEffect(() => { ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/a0b769faa7a381e0299b032da276af5a6cbb5c80
src/components/MonacoEditor/index.tsx