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
isObject
<mask> y={0} <mask> ref={ref} <mask> > <mask> {(!performanceMode || inViewport) && <mask> value.map((val, idx) => ( <mask> <Styled.StyledRow <mask> data-key={JSON.stringify(val[1])} </s> reduce nodes element count for performance </s> remove {(!performan...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/ObjectNode.tsx
{(!performanceMode || inViewport) && value.map((val, idx) => ( <Styled.StyledRow data-key={JSON.stringify(val[1])} data-x={x} data-y={y} key={idx} value={JSON.stringify(val[1])} > <Styled.StyledKey objectKey> ...
<mask> x={0} <mask> y={0} <mask> ref={ref} <mask> > <mask> {(!performanceMode || inViewport) && ( <mask> <Styled.StyledTextWrapper> <mask> <Styled.StyledText width={width} height={height}> <mask> {value.map((val, idx) => ( <mask> <Styled.S...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/ObjectNode.tsx
hideCollapse={hideCollapse} hasCollapse={isParent && hasCollapse}
<mask> x={0} <mask> y={0} <mask> data-nodeid={node.id} <mask> ref={ref} <mask> > <mask> {(!performanceMode || inViewport) && ( <mask> <Styled.StyledKey <mask> data-x={x} <mask> data-y={y} <mask> data-key={JSON.stringify(value)} </s> redu...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/TextNode.tsx
<Styled.StyledKey data-x={x} data-y={y} data-key={JSON.stringify(value)} parent={isParent} hasToggle={hasCollapse} > <Styled.StyledLinkItUrl> {JSON.stringify(value).replaceAll('"', "")} </Styled.StyledLinkItUrl> </...
<mask> data-nodeid={node.id} <mask> ref={ref} <mask> > <mask> {(!performanceMode || inViewport) && ( <mask> <Styled.StyledTextWrapper> <mask> <Styled.StyledText <mask> hideCollapse={hideCollapse} <mask> hasCollapse={isParent && hasCollapse} <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", ...
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/TextNode.tsx
export const StyledForeignObject = styled.foreignObject<{
<mask> text-decoration: underline; <mask> pointer-events: all; <mask> `; <mask> <mask> export const StyledTextWrapper = styled.div` <mask> display: flex; <mask> justify-content: center; <mask> align-items: center; <mask> font-size: 12px; <mask> width: 100%; <mask> height: 100%; <mask> ove...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
isObject?: boolean;
<mask> export const StyledForeignObject = styled.foreignObject<{ <mask> hasCollapse?: boolean; <mask> hideCollapse?: boolean; <mask> }>` <mask> display: flex; <mask> text-align: ${({ isObject }) => !isObject && "center"}; <mask> align-items: center; </s> reduce nodes element count for performance </s>...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
text-align: ${({ isObject }) => !isObject && "center"}; align-items: center;
<mask> isObject?: boolean; <mask> }>` <mask> display: flex; <mask> justify-content: center; <mask> font-size: 12px; <mask> flex-direction: column; <mask> overflow: hidden; </s> reduce nodes element count for performance </s> remove export const StyledTextWrapper = styled.div` display: flex; just...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
font-size: 12px;
<mask> display: flex; <mask> text-align: ${({ isObject }) => !isObject && "center"}; <mask> align-items: center; <mask> justify-content: center; <mask> flex-direction: column; <mask> overflow: hidden; <mask> padding: 10px; <mask> color: ${({ theme }) => theme.TEXT_NORMAL}; </s> reduce nodes ele...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
overflow: hidden; padding: 10px;
<mask> }>` <mask> display: flex; <mask> justify-content: center; <mask> flex-direction: column; <mask> width: ${({ width }) => width}; <mask> height: ${({ height }) => height}; <mask> min-height: 50; <mask> color: ${({ theme }) => theme.TEXT_NORMAL}; <mask> padding-right: ${({ hasCollapse, hide...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
cursor: pointer;
<mask> width: ${({ width }) => width}; <mask> height: ${({ height }) => height}; <mask> min-height: 50; <mask> color: ${({ theme }) => theme.TEXT_NORMAL}; <mask> padding-right: ${({ hasCollapse, hideCollapse }) => <mask> hasCollapse && !hideCollapse && "20px"}; <mask> `; <mask> <mask> export con...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
hasToggle?: boolean;
<mask> export const StyledKey = styled.span<{ <mask> objectKey?: boolean; <mask> parent?: boolean; <mask> }>` <mask> font-weight: 500; <mask> color: ${({ theme, objectKey, parent }) => <mask> parent <mask> ? theme.NODE_KEY <mask> : objectKey </s> reduce nodes element count for performa...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
padding-right: ${({ hasToggle }) => hasToggle && "30px"}; overflow: hidden; text-overflow: ellipsis;
<mask> : objectKey <mask> ? theme.OBJECT_KEY <mask> : theme.TEXT_POSITIVE}; <mask> font-size: ${({ parent }) => parent && "14px"}; <mask> `; <mask> <mask> export const StyledRow = styled.span.attrs<{ <mask> value: string; </s> reduce nodes element count for performance </s> remove widt...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
<mask> font-size: ${({ parent }) => parent && "14px"}; <mask> `; <mask> <mask> export const StyledRow = styled.span.attrs<{ <mask> width: string; <mask> value: string; <mask> theme: DefaultTheme; <mask> }>((props) => ({ <mask> style: { <mask> width: props.width, </s> reduce nodes element count...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
<mask> value: string; <mask> theme: DefaultTheme; <mask> }>((props) => ({ <mask> style: { <mask> width: props.width, <mask> color: getTypeColor(props.value, props.theme), <mask> }, <mask> }))<{ width: string; value: string; theme: DefaultTheme }>` <mask> height: 18px; <mask> overflow: hidd...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
}))<{ value: string; theme: DefaultTheme }>`
<mask> style: { <mask> width: props.width, <mask> color: getTypeColor(props.value, props.theme), <mask> }, <mask> }))<{ width: string; value: string; theme: DefaultTheme }>` <mask> height: 18px; <mask> overflow: hidden; <mask> text-overflow: ellipsis; <mask> white-space: nowrap; <mask> p...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/CustomNode/styles.tsx
background-size: 15px 15px;
<mask> height: ${({ isWidget }) => (isWidget ? "100vh" : "calc(100vh - 36px)")}; <mask> background: ${({ theme }) => theme.BACKGROUND_SECONDARY}; <mask> background-image: ${({ theme }) => <mask> `radial-gradient(#505050 0.5px, ${theme.BACKGROUND_SECONDARY} 0.5px)`}; <mask> background-size: 10px 10px; ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/1f477e99d9fa1293ceacf77b05037d248dd0ac71
src/components/Graph/index.tsx
<mask> export const useConfigReducer: React.Reducer<AppConfig, ReducerAction> = ( <mask> state = initialStates, <mask> action <mask> ) => { <mask> if (!state.settings.zoomPanPinch) return state; <mask> <mask> switch (action.type) { <mask> case ConfigActionType.SET_CONFIG: <mask> return { ......
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/20fe0bd6d07d6dd86e8b397fdfb2db2b5629d0e6
src/reducer/reducer.ts
state.settings.zoomPanPinch?.resetTransform();
<mask> }, <mask> }; <mask> <mask> case ConfigActionType.CENTER_VIEW: <mask> state.settings.zoomPanPinch.resetTransform(); <mask> return state; <mask> <mask> case ConfigActionType.ZOOM_IN: <mask> state.settings.zoomPanPinch.setTransform( <mask> state.settings.z...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/20fe0bd6d07d6dd86e8b397fdfb2db2b5629d0e6
src/reducer/reducer.ts
state.settings.zoomPanPinch?.setTransform( state.settings.zoomPanPinch?.state.positionX, state.settings.zoomPanPinch?.state.positionY, state.settings.zoomPanPinch?.state.scale + 0.2
<mask> state.settings.zoomPanPinch.resetTransform(); <mask> return state; <mask> <mask> case ConfigActionType.ZOOM_IN: <mask> state.settings.zoomPanPinch.setTransform( <mask> state.settings.zoomPanPinch.state.positionX, <mask> state.settings.zoomPanPinch.state.positionY, <...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/20fe0bd6d07d6dd86e8b397fdfb2db2b5629d0e6
src/reducer/reducer.ts
state.settings.zoomPanPinch?.setTransform( state.settings.zoomPanPinch?.state.positionX, state.settings.zoomPanPinch?.state.positionY, state.settings.zoomPanPinch?.state.scale - 0.2
<mask> ); <mask> return state; <mask> <mask> case ConfigActionType.ZOOM_OUT: <mask> state.settings.zoomPanPinch.setTransform( <mask> state.settings.zoomPanPinch.state.positionX, <mask> state.settings.zoomPanPinch.state.positionY, <mask> state.settings.zoomPanPinch....
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/20fe0bd6d07d6dd86e8b397fdfb2db2b5629d0e6
src/reducer/reducer.ts
zoomPanPinch: ReactZoomPanPinchRef | null;
<mask> expand: boolean; <mask> autoformat: boolean; <mask> hideEditor: boolean; <mask> searchNode: string; <mask> zoomPanPinch?: ReactZoomPanPinchRef; <mask> } </s> fix reducer ref not working </s> remove state.settings.zoomPanPinch.setTransform( state.settings.zoomPanPinch.state.position...
[ "keep", "keep", "keep", "keep", "replace", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/20fe0bd6d07d6dd86e8b397fdfb2db2b5629d0e6
src/typings/global.ts
const isArray = Array.isArray(v) ? !!v.length : typeof v === "object"; return notNull && isArray; }; const filterValues = ([k, v]) => { if (Array.isArray(v) || v instanceof Object) return false; return true;
<mask> import toast from "react-hot-toast"; <mask> <mask> const filterChild = ([k, v]) => { <mask> const notNull = v !== null; <mask> const isArray = Array.isArray(v); <mask> const condition = isArray ? !!v.length : typeof v === "object"; <mask> return notNull && condition; <mask> }; <mask> <mask> f...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2764f29c382b5343a04987490da0e780f8f7650c
src/utils/json-editor-parser.ts
if (isObject) { const entries = Object.entries(object).filter(filterValues); return Object.fromEntries(entries); } return object.toString();
<mask> <mask> function generateNodeData(object: Object | number) { <mask> const isObject = object instanceof Object; <mask> <mask> return !isObject <mask> ? object.toString() <mask> : Object.fromEntries( <mask> Object.entries(object).filter( <mask> ([k, v]) => !Array.isArray(v) ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2764f29c382b5343a04987490da0e780f8f7650c
src/utils/json-editor-parser.ts
return xs.flatMap(({ id: from, children = [] }) => [ ...children.map(({ id: to }) => ({
<mask> const flatten = (xs: { id: string; children: never[] }[]) => <mask> xs.flatMap(({ children, ...rest }) => [rest, ...flatten(children)]); <mask> <mask> const relationships = (xs: { id: string; children: never[] }[]) => { <mask> return xs.flatMap(({ id: to, children = [] }) => [ <mask> ...children.m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2764f29c382b5343a04987490da0e780f8f7650c
src/utils/json-editor-parser.ts
AiFillControl,
<mask> AiFillHome, <mask> AiOutlineClear, <mask> AiFillGithub, <mask> AiOutlineTwitter, <mask> } from "react-icons/ai"; <mask> import { FaFileImport, FaMap } from "react-icons/fa"; <mask> import { MdAutoGraph } from "react-icons/md"; <mask> import { useLocalStorage } from "usehooks-ts"; <mask> import {...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/components/Sidebar/index.tsx
import { FaFileImport, FaMap } from "react-icons/fa";
<mask> AiOutlineClear, <mask> AiFillGithub, <mask> AiOutlineTwitter, <mask> } from "react-icons/ai"; <mask> import { FaFileImport } from "react-icons/fa"; <mask> import { MdAutoGraph } from "react-icons/md"; <mask> import { useLocalStorage } from "usehooks-ts"; <mask> import { defaultValue } from "src/con...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/components/Sidebar/index.tsx
interface Config { layout: "TB" | "BT" | "LR" | "RL"; minimap: boolean; controls: boolean; }
<mask> import { getNextLayout } from "src/containers/LiveEditor/helpers"; <mask> <mask> const StyledSidebar = styled.div` <mask> display: flex; <mask> justify-content: space-between; <mask> flex-direction: column; <mask> align-items: center; <mask> width: 60px; </s> config setup for live editor </s>...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/components/Sidebar/index.tsx
<mask> display: none; <mask> } <mask> `; <mask> <mask> const fileToJson = (file: File, setJson: (val: string) => void) => { <mask> const reader = new FileReader(); <mask> <mask> reader.readAsText(file, "UTF-8"); <mask> reader.onload = function (data) { <mask> setJson(data.target?.result as s...
[ "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/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/components/Sidebar/index.tsx
const [config, setConfig] = useLocalStorage<Config>("config", { layout: "RL", minimap: true, controls: true, });
<mask> <mask> export const Sidebar = () => { <mask> const [jsonFile, setJsonFile] = React.useState<File | any>(null); <mask> const [_, setJson] = useLocalStorage("json", JSON.stringify(defaultValue)); <mask> const [layout, setLayout] = useLocalStorage<"TB" | "BT" | "RL" | "LR">( <mask> "layout", <mask...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/components/Sidebar/index.tsx
const reader = new FileReader(); reader.readAsText(jsonFile, "UTF-8"); reader.onload = function (data) { setJson(data.target?.result as string); };
<mask> }; <mask> <mask> React.useEffect(() => { <mask> if (jsonFile) { <mask> fileToJson(jsonFile, setJson); <mask> } <mask> <mask> // eslint-disable-next-line react-hooks/exhaustive-deps <mask> }, [jsonFile]); <mask> </s> config setup for live editor </s> remove const [layout, s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/components/Sidebar/index.tsx
<StyledElement as="a" onClick={() => setJson("[]")} title="Clear JSON">
<mask> <AiFillHome /> <mask> </a> <mask> </Link> <mask> </StyledElement> <mask> <StyledElement as="a" onClick={handleClear} title="Clear JSON"> <mask> <AiOutlineClear /> <mask> </StyledElement> <mask> <StyledElement title="Import JSON...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/components/Sidebar/index.tsx
<mask> <FaFileImport /> <mask> </StyledImportFile> <mask> </a> <mask> </StyledElement> <mask> <StyledElement <mask> as="a" <mask> onClick={() => setLayout(getNextLayout(layout))} <mask> title="Change Layout" <mask> > <ma...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/components/Sidebar/index.tsx
MiniMap,
<mask> import ReactFlow, { <mask> ControlButton, <mask> Controls, <mask> Elements, <mask> NodeExtent, <mask> } from "react-flow-renderer"; <mask> import { useLocalStorage } from "usehooks-ts"; <mask> import { defaultValue } from "../JsonEditor"; <mask> import { getLayout, getLayoutPosition } from "./he...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/containers/LiveEditor/FlowWrapper.tsx
const [config] = useLocalStorage("config", { layout: "RL", minimap: true, controls: true, });
<mask> }; <mask> <mask> export const FlowWrapper: React.FC = () => { <mask> const [json] = useLocalStorage("json", JSON.stringify(defaultValue)); <mask> const [layout] = useLocalStorage("layout", "RL"); <mask> <mask> const [elements, setElements] = React.useState<Elements>([]); <mask> const [rfInstanc...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/containers/LiveEditor/FlowWrapper.tsx
const layoutedElements = getLayout(config.layout, json);
<mask> }, [rfInstance]); <mask> <mask> React.useEffect(() => { <mask> try { <mask> const layoutedElements = getLayout(layout, json); <mask> setElements(layoutedElements); <mask> setValid(true); <mask> } catch (error) { <mask> setValid(false); <mask> } </s> config setu...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/containers/LiveEditor/FlowWrapper.tsx
}, [rfInstance, json, config]);
<mask> setValid(true); <mask> } catch (error) { <mask> setValid(false); <mask> } <mask> }, [rfInstance, json, layout]); <mask> <mask> if (!valid) return null; <mask> <mask> return ( <mask> <ReactFlow </s> config setup for live editor </s> remove const layoutedElements = ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/containers/LiveEditor/FlowWrapper.tsx
{config.minimap && <MiniMap />} {config.controls && ( <Controls> <ControlButton onClick={() => setElements(getLayoutPosition(config.layout, elements)) } style={{ gridColumn: "1 / 3", width: "auto" }} > Format ...
<mask> elements={elements} <mask> nodeTypes={nodeTypes} <mask> onLoad={(rf: any) => setRfInstance(rf)} <mask> > <mask> <Controls> <mask> <ControlButton <mask> onClick={() => setElements(getLayoutPosition(layout, elements))} <mask> style={{ gridColumn: "1 /...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/2c08427e9ab4f016f7217a3fa0e9b436fd17301c
src/containers/LiveEditor/FlowWrapper.tsx
import { defaultJson } from "src/constants/data";
<mask> import { Producthunt } from "src/components/Producthunt"; <mask> import { Sponsors } from "src/components/Sponsors"; <mask> import { GoalsModal } from "src/containers/Modals/GoalsModal"; <mask> import pkg from "../../../package.json"; <mask> import * as Styles from "./styles"; <mask> </s> feat: bug fixes...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/containers/Home/index.tsx
<Styles.StyledIframge src="//localhost:3000/widget" onLoad={e => { const frame = e.currentTarget.contentWindow; setTimeout(() => { frame?.postMessage({ json: defaultJson, }); }, 500); }} ></Styles.StyledIframge>
<mask> visitors, blog readers or anybody else! <mask> </Styles.StyledMinorTitle> <mask> </Styles.StyledSectionArea> <mask> <div> <mask> <Styles.StyledIframge src="https://jsoncrack.com/widget"></Styles.StyledIframge> <mask> </div> <mask> </Styles.StyledSection> <mask> ); <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/containers/Home/index.tsx
<mask> import React from "react"; <mask> import dynamic from "next/dynamic"; <mask> import { useRouter } from "next/router"; <mask> import { parse } from "jsonc-parser"; <mask> import toast from "react-hot-toast"; <mask> import { baseURL, defaultJson } from "src/constants/data"; <mask> import { NodeModal } from ...
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/Widget/index.tsx
import { baseURL } from "src/constants/data";
<mask> import dynamic from "next/dynamic"; <mask> import { useRouter } from "next/router"; <mask> import { parse } from "jsonc-parser"; <mask> import toast from "react-hot-toast"; <mask> import { baseURL, defaultJson } from "src/constants/data"; <mask> import { NodeModal } from "src/containers/Modals/NodeModal"; ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/Widget/index.tsx
<mask> import { parse } from "jsonc-parser"; <mask> import toast from "react-hot-toast"; <mask> import { baseURL, defaultJson } from "src/constants/data"; <mask> import { NodeModal } from "src/containers/Modals/NodeModal"; <mask> import useConfig from "src/hooks/store/useConfig"; <mask> import useGraph from "src/...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/Widget/index.tsx
const StyledDeprecated = styled.div` display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 100vh; a { text-decoration: underline; } `;
<mask> }; <mask> } <mask> <mask> const WidgetPage = () => { <mask> const { query, push } = useRouter(); <mask> <mask> const [isModalVisible, setModalVisible] = React.useState(false); <mask> const [selectedNode, setSelectedNode] = React.useState<[string, string][]>([]); <mask> </s> feat: bug fixes &...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/Widget/index.tsx
<mask> const collapsedNodes = useGraph(state => state.collapsedNodes); <mask> const collapsedEdges = useGraph(state => state.collapsedEdges); <mask> const loading = useGraph(state => state.loading); <mask> const setGraphValue = useGraph(state => state.setGraphValue); <mask> const centerView = useConfig(s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/Widget/index.tsx
if (!inIframe()) push("/"); }, [collapsedNodes, collapsedEdges, loading, push]);
<mask> <mask> selectedNodes.forEach(node => node.classList.add("hide")); <mask> selectedEdges.forEach(edge => edge.classList.add("hide")); <mask> } <mask> }, [collapsedNodes, collapsedEdges, loading]); <mask> <mask> React.useEffect(() => { <mask> const handler = (event: EmbedMessage) =...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/Widget/index.tsx
const { nodes, edges } = parser(event.data.json); setGraphValue("nodes", nodes); setGraphValue("edges", edges);
<mask> React.useEffect(() => { <mask> const handler = (event: EmbedMessage) => { <mask> try { <mask> if (!event.data?.json) return; <mask> const parsedJson = JSON.stringify(parse(event.data.json)); <mask> setJson(parsedJson); <mask> } catch (error) { <mask> toas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/Widget/index.tsx
console.error(error);
<mask> setGraphValue("edges", edges); <mask> } catch (error) { <mask> toast.error("Invalid JSON!"); <mask> } <mask> }; <mask> </s> feat: bug fixes & deprecation warning </s> remove const parsedJson = JSON.stringify(parse(event.data.json)); setJson(parsedJson); </...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/Widget/index.tsx
const { query, pathname } = useRouter();
<mask> }); <mask> } <mask> <mask> function JsonCrack({ Component, pageProps }: AppProps) { <mask> const { query } = useRouter(); <mask> const lightmode = useStored(state => state.lightmode); <mask> const setJson = useConfig(state => state.setJson); <mask> const [isRendered, setRendered] = React.useSt...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/_app.tsx
try { if (pathname !== "editor") return; const isJsonValid = typeof query.json === "string" && isValidJson(decodeURIComponent(query.json));
<mask> const setJson = useConfig(state => state.setJson); <mask> const [isRendered, setRendered] = React.useState(false); <mask> <mask> React.useEffect(() => { <mask> const isJsonValid = <mask> typeof query.json === "string" && isValidJson(decodeURIComponent(query.json)); <mask> <mask> if ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/_app.tsx
if (isJsonValid) { const jsonDecoded = decompress(JSON.parse(isJsonValid)); const jsonString = JSON.stringify(jsonDecoded); setJson(jsonString); } } catch (error) { console.error(error);
<mask> React.useEffect(() => { <mask> const isJsonValid = <mask> typeof query.json === "string" && isValidJson(decodeURIComponent(query.json)); <mask> <mask> if (isJsonValid) { <mask> const jsonDecoded = decompress(JSON.parse(isJsonValid)); <mask> const jsonString = JSON.stringify(js...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/_app.tsx
}, [pathname, query.json, setJson]);
<mask> const jsonString = JSON.stringify(jsonDecoded); <mask> <mask> setJson(jsonString); <mask> } <mask> }, [query.json, setJson]); <mask> <mask> React.useEffect(() => { <mask> setRendered(true); <mask> }, []); <mask> </s> feat: bug fixes & deprecation warning </s> remove if...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/_app.tsx
if (isRendered) return ( <> <GoogleAnalytics /> <ThemeProvider theme={lightmode ? lightTheme : darkTheme}> <GlobalStyle /> <Component {...pageProps} /> <Toaster position="bottom-right" toastOptions={{ style: { ...
<mask> React.useEffect(() => { <mask> setRendered(true); <mask> }, []); <mask> <mask> if (!isRendered) return null; <mask> <mask> return ( <mask> <> <mask> <GoogleAnalytics /> <mask> <ThemeProvider theme={lightmode ? lightTheme : darkTheme}> <mask> <GlobalStyle /> <mask...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "ke...
https://github.com/AykutSarac/jsoncrack.com/commit/35aa9923752f50e69ff1e0bdc2e90eb96826a56f
src/pages/_app.tsx
<mask> import { LiveEditor } from "src/containers/LiveEditor"; <mask> import { Loading } from "src/components/Loading"; <mask> import { Incompatible } from "src/containers/Incompatible"; <mask> import * as Styles from "src/containers/Editor/styles"; <mask> import { Tools } from "./Tools"; <mask> import { ConfigAc...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/364cb4550fce181ccd95442e191e4e3be668b300
src/containers/Editor/index.tsx
<mask> import * as Styles from "src/containers/Editor/styles"; <mask> import { Tools } from "./Tools"; <mask> import { ConfigActionType } from "src/reducer/reducer"; <mask> import { useConfig } from "src/hocs/config"; <mask> import { Input } from "src/components/Input"; <mask> <mask> const JsonEditor = dynamic(...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/364cb4550fce181ccd95442e191e4e3be668b300
src/containers/Editor/index.tsx
}, [dispatch]);
<mask> dispatch({ <mask> type: ConfigActionType.SET_CONFIG, <mask> payload: JSON.parse(configStored), <mask> }); <mask> }, []); <mask> <mask> React.useEffect(() => { <mask> localStorage.setItem("config", JSON.stringify(settings)); <mask> }, [settings]); <mask> </s> rem...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/364cb4550fce181ccd95442e191e4e3be668b300
src/containers/Editor/index.tsx
localStorage.setItem( "config", JSON.stringify({ ...settings, zoomPanPinch: undefined, }) );
<mask> }); <mask> }, []); <mask> <mask> React.useEffect(() => { <mask> localStorage.setItem("config", JSON.stringify(settings)); <mask> }, [settings]); <mask> <mask> return ( <mask> <Styles.StyledPageWrapper> <mask> <Sidebar /> </s> remove ref from local config </s> remove }, ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/364cb4550fce181ccd95442e191e4e3be668b300
src/containers/Editor/index.tsx
<mask> return ( <mask> <Styles.StyledPageWrapper> <mask> <Sidebar /> <mask> <Styles.StyledEditorWrapper> <mask> <Tools /> <mask> {settings.showSearch && <Input />} <mask> <Styles.StyledEditor <mask> maxSize={800} <mask> minSize={300} <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/364cb4550fce181ccd95442e191e4e3be668b300
src/containers/Editor/index.tsx
max-width: 400px;
<mask> isArray ? theme.SEAGREEN : isElement && theme.ORANGE}; <mask> width: ${({ circle }) => (circle ? "20px" : "auto")}; <mask> height: ${({ circle }) => (circle ? "20px" : "auto")}; <mask> min-width: ${({ circle }) => !circle && "100px"}; <mask> text-align: ${({ isArray }) => isArray && "center"}; ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3a1e414dcf424fb8e91471031fcc7ecd8484c895
src/containers/LiveEditor/Node.tsx
const StyledLineWrapper = styled.div` overflow: hidden; text-overflow: ellipsis; white-space: nowrap; `;
<mask> `; <mask> <mask> export const CustomNodeComponent: React.FC<{ data: Data; id: string }> = ({ <mask> id, <mask> data, <mask> }) => { <mask> const { label: json } = data; <mask> </s> temp fix: node size getting too wide </s> remove width: dynamic ? el.__rf.width : 200, </s> add wi...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3a1e414dcf424fb8e91471031fcc7ecd8484c895
src/containers/LiveEditor/Node.tsx
<StyledLineWrapper key={entries[0]}>
<mask> const isValidValue = <mask> typeof entries[1] === "string" || typeof entries[1] === "number"; <mask> <mask> return ( <mask> <div key={entries[0]}> <mask> <StyledKey>{entries[0]}: </StyledKey> <mask> {isValidValue && entries[1]} <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3a1e414dcf424fb8e91471031fcc7ecd8484c895
src/containers/LiveEditor/Node.tsx
</StyledLineWrapper>
<mask> return ( <mask> <div key={entries[0]}> <mask> <StyledKey>{entries[0]}: </StyledKey> <mask> {isValidValue && entries[1]} <mask> </div> <mask> ); <mask> })} <mask> <mask> <Handle type="source" id={id} position={Positi...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3a1e414dcf424fb8e91471031fcc7ecd8484c895
src/containers/LiveEditor/Node.tsx
width: dynamic ? el.__rf.width : 400,
<mask> <mask> elements.forEach((el) => { <mask> if (isNode(el)) { <mask> dagreGraph.setNode(el.id, { <mask> width: dynamic ? el.__rf.width : 200, <mask> height: dynamic ? el.__rf.height : 100, <mask> }); <mask> } else { <mask> dagreGraph.setEdge(el.source, el.target...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3a1e414dcf424fb8e91471031fcc7ecd8484c895
src/containers/LiveEditor/helpers.ts
text-transform: uppercase;
<mask> background: none; <mask> color: ${({ theme }) => theme.INTERACTIVE_NORMAL}; <mask> padding: 0 10px; <mask> min-height: unset; <mask> <mask> &:hover { <mask> box-shadow: none; <mask> } <mask> <mask> &.active { </s> Add SVG support to download options </s> remove background: ${...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3cdfe037453c0786c027e4c0324befd486af0769
src/components/FileInput/index.tsx
background: ${({ theme }) => theme.PRIMARY}; color: white; outline: 3px solid ${({ theme }) => theme.BACKGROUND_TERTIARY}; border-radius: 10px;
<mask> box-shadow: none; <mask> } <mask> <mask> &.active { <mask> background: ${({ theme }) => theme.PRIMARY};; <mask> } <mask> `; <mask> <mask> export interface ModalProps { <mask> value:string | number | readonly string[] | undefined, </s> Add SVG support to download options </s> remo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3cdfe037453c0786c027e4c0324befd486af0769
src/components/FileInput/index.tsx
activeExtension:number
<mask> <mask> export interface ModalProps { <mask> value:string | number | readonly string[] | undefined, <mask> extensions:string[] <mask> setExtension: Function, <mask> onChange: React.ChangeEventHandler<HTMLInputElement> | undefined, <mask> } <mask> export const FileInput: React.FC<ModalProp...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3cdfe037453c0786c027e4c0324befd486af0769
src/components/FileInput/index.tsx
const {setExtension, activeExtension, onChange,extensions,value } = props
<mask> onChange: React.ChangeEventHandler<HTMLInputElement> | undefined, <mask> } <mask> export const FileInput: React.FC<ModalProps> = (props) => { <mask> <mask> const {setExtension, onChange,extensions,value } = props <mask> return ( <mask> <StyledInputWrapper> <mask> <StyledForm> <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3cdfe037453c0786c027e4c0324befd486af0769
src/components/FileInput/index.tsx
{extensions.map((ext, key) => ( <StyledButton className={`${activeExtension === key && "active"}`} key={key} aria-label="search" onClick={() => setExtension(key)}>
<mask> onChange={onChange} <mask> value={value} <mask> placeholder="File Name" <mask> /> <mask> {extensions.map((ext,key)=> (<StyledButton key={key} aria-label="search" onClick={()=> setExtension(key)}> <mask> {ext} <mask> </StyledButton>))}...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3cdfe037453c0786c027e4c0324befd486af0769
src/components/FileInput/index.tsx
</StyledButton>) )}
<mask> placeholder="File Name" <mask> /> <mask> {extensions.map((ext,key)=> (<StyledButton key={key} aria-label="search" onClick={()=> setExtension(key)}> <mask> {ext} <mask> </StyledButton>))} <mask> <mask> </StyledForm> <mask> </StyledInputWrapper...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3cdfe037453c0786c027e4c0324befd486af0769
src/components/FileInput/index.tsx
activeExtension={extension}
<mask> <FileInput <mask> value={fileDetails.filename} <mask> onChange={e => updateDetails("filename", e.target.value)} <mask> setExtension={(ext:number)=> setExtension(ext)} <mask> extensions={Object.keys(Extensions).filter((v) => isNaN(Number(v))...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/3cdfe037453c0786c027e4c0324befd486af0769
src/containers/Modals/DownloadModal/index.tsx
"lodash.get": "^4.4.2", "lodash.set": "^4.3.2",
<mask> "jsonc-parser": "^3.2.0", <mask> "jsonwebtoken": "^9.0.0", <mask> "lodash.debounce": "^4.0.8", <mask> "lz-string": "^1.5.0", <mask> "next": "13.2.3", <mask> "react": "^18.2.0", <mask> "react-color": "^2.19.3", <mask> "react-dom": "^18.2.0", <mask> "react-hot-toast": "...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
package.json
"@types/lodash.get": "^4.4.7", "@types/lodash.set": "^4.3.7",
<mask> "@trivago/prettier-plugin-sort-imports": "^4.1.1", <mask> "@types/jsonwebtoken": "^9.0.2", <mask> "@types/lodash.debounce": "^4.0.7", <mask> "@types/lz-string": "^1.5.0", <mask> "@types/node": "^20.2.1", <mask> "@types/react": "18.2.6", <mask> "@types/react-color": "^3.0.6", <...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
package.json
<List.Item>Edit directly on graph</List.Item>
<mask> <List.Item>JSON Schema support</List.Item> <mask> <List.Item>Visualize data at full capability</List.Item> <mask> <List.Item>Save & share up to 200 files</List.Item> <mask> <List.Item>No Ads</List.Item> <mask> <List.Item <mask> icon={ <mask> <T...
[ "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/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/components/Graph/PremiumView.tsx
import { Modal, Stack, Text, ScrollArea, ModalProps, Button } from "@mantine/core";
<mask> import React from "react"; <mask> import { Modal, Stack, Text, ScrollArea, ModalProps } from "@mantine/core"; <mask> import { Prism } from "@mantine/prism"; <mask> import { shallow } from "zustand/shallow"; <mask> import useGraph from "src/store/useGraph"; <mask> <mask> const dataToString = (data: any) =...
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
import Editor from "@monaco-editor/react"; import vsDark from "prism-react-renderer/themes/vsDark"; import vsLight from "prism-react-renderer/themes/vsLight"; import { VscLock } from "react-icons/vsc";
<mask> import React from "react"; <mask> import { Modal, Stack, Text, ScrollArea, ModalProps, Button } from "@mantine/core"; <mask> import { Prism } from "@mantine/prism"; <mask> import { shallow } from "zustand/shallow"; <mask> import useFile from "src/store/useFile"; <mask> import useGraph from "src/store/useGr...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
import useFile from "src/store/useFile";
<mask> import vsLight from "prism-react-renderer/themes/vsLight"; <mask> import { VscLock } from "react-icons/vsc"; <mask> import { shallow } from "zustand/shallow"; <mask> import useGraph from "src/store/useGraph"; <mask> import useModal from "src/store/useModal"; <mask> import useStored from "src/store/useStore...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
import useModal from "src/store/useModal"; import useStored from "src/store/useStored"; import useUser from "src/store/useUser";
<mask> import { VscLock } from "react-icons/vsc"; <mask> import { shallow } from "zustand/shallow"; <mask> import useFile from "src/store/useFile"; <mask> import useGraph from "src/store/useGraph"; <mask> <mask> const dataToString = (data: any) => { <mask> const text = Array.isArray(data) ? Object.fromEntries...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
const CodeBlock: React.FC<{ children: any; [key: string]: any }> = ({ format, children, ...props }) => {
<mask> <mask> return JSON.stringify(text, replacer, 2); <mask> }; <mask> <mask> const CodeBlock: React.FC<{ children: any }> = ({ children }) => { <mask> return ( <mask> <ScrollArea> <mask> <Prism <mask> maw={600} <mask> miw={350} </s> feat: support edit on graph </s> remove ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
<mask> const CodeBlock: React.FC<{ children: any }> = ({ children }) => { <mask> return ( <mask> <ScrollArea> <mask> <Prism <mask> maw={600} <mask> miw={350} <mask> mah={250} <mask> language="json" <mask> copyLabel="Copy to clipboard" <mask> copiedLa...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
getPrismTheme={(_theme, colorScheme) => (colorScheme === "light" ? vsLight : vsDark)} {...props}
<mask> copyLabel="Copy to clipboard" <mask> copiedLabel="Copied to clipboard" <mask> withLineNumbers <mask> > <mask> {children} <mask> </Prism> <mask> </ScrollArea> <mask> ); <mask> }; </s> feat: support edit on graph </s> remove maw={600} </s> add <...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
const isPremium = useUser(state => state.isPremium()); const editContents = useFile(state => state.editContents); const setVisible = useModal(state => state.setVisible); const lightmode = useStored(state => (state.lightmode ? "light" : "vs-dark")); const [nodeData, path, isParent] = useGraph( state => [ ...
<mask> ); <mask> }; <mask> <mask> export const NodeModal: React.FC<ModalProps> = ({ opened, onClose }) => { <mask> const [nodeData, path] = useGraph( <mask> state => [dataToString(state.selectedNode.text), state.selectedNode.path], <mask> shallow <mask> ); <mask> <mask> return ( <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
<Modal title="Node Content" size="auto" opened={opened} onClose={onModalClose} centered>
<mask> shallow <mask> ); <mask> <mask> return ( <mask> <Modal title="Node Content" size="auto" opened={opened} onClose={onClose} centered> <mask> <Stack py="sm" spacing="sm"> <mask> <Stack spacing="xs"> <mask> <Text fz="sm" fw={700}> <mask> Content <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
{editMode ? ( <Editor theme={lightmode} defaultValue={nodeData} onChange={e => setValue(e!)} height={200} language="json" options={{ readOnly: !editMode, minimap: { ...
<mask> <Stack spacing="xs"> <mask> <Text fz="sm" fw={700}> <mask> Content <mask> </Text> <mask> <CodeBlock>{nodeData}</CodeBlock> <mask> </Stack> <mask> <Stack spacing="xs"> <mask> <Text fz="sm" fw={700}> <mask> Node Path ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
{editMode && ( <Text color="dimmed" fz="xs"> Keys cannot be renamed and will be added as a new field.
<mask> Content <mask> </Text> <mask> <CodeBlock>{nodeData}</CodeBlock> <mask> </Stack> <mask> <Stack spacing="xs"> <mask> <Text fz="sm" fw={700}> <mask> Node Path <mask> </Text> <mask> <CodeBlock>{path}</CodeBlock> <mask...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
)} {isEditVisible && ( <Stack spacing="xs"> {editMode ? ( <Button variant={value ? "filled" : "light"} color={value ? "green" : "blue"} onClick={onUpdate} > {value.length ? "Update Document"...
<mask> <Stack spacing="xs"> <mask> <Text fz="sm" fw={700}> <mask> Node Path <mask> </Text> <mask> <CodeBlock>{path}</CodeBlock> <mask> </Stack> <mask> </Stack> <mask> </Modal> <mask> ); <mask> }; </s> feat: support edit on graph </s> remov...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/NodeModal/index.tsx
<List.Item>Edit directly on graph</List.Item>
<mask> <List.Item>JSON Schema support</List.Item> <mask> <List.Item>Visualize data at full capability</List.Item> <mask> <List.Item>Save & share up to 200 files</List.Item> <mask> <List.Item>No Ads</List.Item> <mask> <List.Item <mask> icon=...
[ "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/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/containers/Modals/PremiumModal/index.tsx
import styled, { ThemeProvider } from "styled-components";
<mask> import dynamic from "next/dynamic"; <mask> import Head from "next/head"; <mask> import Link from "next/link"; <mask> import Script from "next/script"; <mask> import { ThemeProvider } from "styled-components"; <mask> import { Button } from "@mantine/core"; <mask> import { AiOutlineRight, AiTwotoneStar } fr...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
<mask> import { Sponsors } from "src/components/Sponsors"; <mask> import { baseURL } from "src/constants/data"; <mask> import { TABS } from "src/constants/previewSection"; <mask> import { darkTheme } from "src/constants/theme"; <mask> import * as Styles from "src/containers/Home/styles"; <mask> import { Footer } ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
<StyledHeroSection id="main"> <StyledTitle> <StyledGradientText>JSON</StyledGradientText> CRACK </StyledTitle> <StyledSubTitle> Seamlessly visualize your JSON data <StyledHighlightedText>instantly</StyledHighlightedText>{" "} into graphs. </StyledSubTitle>
<mask> ssr: false, <mask> }); <mask> <mask> const HeroSection = () => ( <mask> <Styles.StyledHeroSection id="main"> <mask> <Styles.StyledTitle> <mask> <Styles.StyledGradientText>JSON</Styles.StyledGradientText> CRACK <mask> </Styles.StyledTitle> <mask> <Styles.StyledSubTitle> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
<StyledButtonWrapper>
<mask> GO TO EDITOR <mask> <AiOutlineRight strokeWidth="80" /> <mask> </Button> <mask> </Link> <mask> <Styles.StyledButtonWrapper> <mask> <Link href="https://github.com/sponsors/AykutSarac" target="_blank" rel="noreferrer"> <mask> <Button color="red" size="md" variant=...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
</StyledButtonWrapper> </StyledHeroSection>
<mask> <Button color="blue" size="md" variant="outline" rightIcon={<SiVisualstudiocode />}> <mask> GET IT ON VS CODE <mask> </Button> <mask> </Link> <mask> </Styles.StyledButtonWrapper> <mask> </Styles.StyledHeroSection> <mask> ); <mask> <mask> const PreviewSection = () =...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
<StyledPreviewSection> <StyledHighlightWrapper> <StyledTabsWrapper>
<mask> } <mask> }, [currentTab, loaded]); <mask> <mask> return ( <mask> <Styles.StyledPreviewSection> <mask> <Styles.StyledHighlightWrapper> <mask> <Styles.StyledTabsWrapper> <mask> {TABS.map(tab => ( <mask> <Styles.StyledTab <mask> active={tab.id...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
<StyledTab
<mask> <Styles.StyledPreviewSection> <mask> <Styles.StyledHighlightWrapper> <mask> <Styles.StyledTabsWrapper> <mask> {TABS.map(tab => ( <mask> <Styles.StyledTab <mask> active={tab.id === currentTab} <mask> onClick={() => setCurrentTab(tab.id)} ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
</StyledTab>
<mask> onClick={() => setCurrentTab(tab.id)} <mask> key={tab.id} <mask> > <mask> {tab.name} <mask> </Styles.StyledTab> <mask> ))} <mask> </Styles.StyledTabsWrapper> <mask> <SyntaxHighlighter <mask> style={vscD...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
</StyledTabsWrapper>
<mask> > <mask> {tab.name} <mask> </Styles.StyledTab> <mask> ))} <mask> </Styles.StyledTabsWrapper> <mask> <SyntaxHighlighter <mask> style={vscDarkPlus} <mask> customStyle={{ <mask> fontSize: "16px", <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
</StyledHighlightWrapper>
<mask> showLineNumbers <mask> > <mask> {TABS[currentTab].json} <mask> </SyntaxHighlighter> <mask> </Styles.StyledHighlightWrapper> <mask> <mask> <Styles.StyledPreviewFrame <mask> ref={widgetRef} <mask> title="Preview Embed" <mask> id="jc...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
<StyledPreviewFrame
<mask> {TABS[currentTab].json} <mask> </SyntaxHighlighter> <mask> </Styles.StyledHighlightWrapper> <mask> <mask> <Styles.StyledPreviewFrame <mask> ref={widgetRef} <mask> title="Preview Embed" <mask> id="jcPreview" <mask> src={`${baseURL}/widget`} ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
</StyledPreviewSection>
<mask> id="jcPreview" <mask> src={`${baseURL}/widget`} <mask> loading="eager" <mask> /> <mask> </Styles.StyledPreviewSection> <mask> ); <mask> }; <mask> <mask> const FeaturesSection = () => ( <mask> <Styles.StyledFeaturesSection id="features"> </s> feat: support edit on...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
<StyledFeaturesSection id="features"> <StyledSectionCard> <StyledCardIcon>
<mask> ); <mask> }; <mask> <mask> const FeaturesSection = () => ( <mask> <Styles.StyledFeaturesSection id="features"> <mask> <Styles.StyledSectionCard> <mask> <Styles.StyledCardIcon> <mask> <HiCursorClick size={50} color="#3BA55D" /> <mask> </Styles.StyledCardIcon> <mask> <S...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
</StyledCardIcon> <StyledCardTitle>EASY-TO-USE</StyledCardTitle> <StyledCardDescription>
<mask> <Styles.StyledFeaturesSection id="features"> <mask> <Styles.StyledSectionCard> <mask> <Styles.StyledCardIcon> <mask> <HiCursorClick size={50} color="#3BA55D" /> <mask> </Styles.StyledCardIcon> <mask> <Styles.StyledCardTitle>EASY-TO-USE</Styles.StyledCardTitle> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx
</StyledCardDescription> </StyledSectionCard>
<mask> <Styles.StyledCardDescription> <mask> We believe that powerful software doesn&apos;t have to be difficult to use. That&apos;s why <mask> we&apos;ve designed our app to be as intuitive and easy-to-use as possible. You can quickly <mask> and easily load your JSON data and start ex...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AykutSarac/jsoncrack.com/commit/45d4fa3d663eefcb34d2a972b1db0477b0d8d993
src/pages/index.tsx