repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/ModalController.tsx | src/features/modals/ModalController.tsx | import React from "react";
import * as ModalComponents from ".";
import { useModal } from "../../store/useModal";
import { modals, type ModalName } from "./modalTypes";
const Modal = ({ modalKey }: { modalKey: ModalName }) => {
const opened = useModal(state => state[modalKey]);
const setVisible = useModal(state =>... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/index.ts | src/features/modals/index.ts | export { DownloadModal } from "./DownloadModal";
export { ImportModal } from "./ImportModal";
export { NodeModal } from "./NodeModal";
export { SchemaModal } from "./SchemaModal";
export { JQModal } from "./JQModal";
export { TypeModal } from "./TypeModal";
export { JPathModal } from "./JPathModal";
| typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/modalTypes.ts | src/features/modals/modalTypes.ts | import * as ModalComponents from ".";
// Define the modals array separate from the component logic
export const modals = Object.freeze(Object.keys(ModalComponents)) as Extract<
keyof typeof ModalComponents,
string
>[];
export type ModalName = (typeof modals)[number];
| typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/JPathModal/index.tsx | src/features/modals/JPathModal/index.tsx | import React from "react";
import type { ModalProps } from "@mantine/core";
import { Stack, Modal, Button, Text, Anchor, Group, TextInput } from "@mantine/core";
import { JSONPath } from "jsonpath-plus";
import { event as gaEvent } from "nextjs-google-analytics";
import toast from "react-hot-toast";
import { VscLinkExt... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/DownloadModal/index.tsx | src/features/modals/DownloadModal/index.tsx | import React from "react";
import type { ModalProps } from "@mantine/core";
import {
ColorPicker,
TextInput,
SegmentedControl,
Group,
Modal,
Button,
Divider,
ColorInput,
} from "@mantine/core";
import { toBlob, toJpeg, toPng, toSvg } from "html-to-image";
import { event as gaEvent } from "nextjs-google-... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/JQModal/index.tsx | src/features/modals/JQModal/index.tsx | import React from "react";
import type { ModalProps } from "@mantine/core";
import { Stack, Modal, Button, Text, Anchor, Group, TextInput } from "@mantine/core";
import { VscLinkExternal } from "react-icons/vsc";
import useJsonQuery from "../../../hooks/useJsonQuery";
export const JQModal = ({ opened, onClose }: Modal... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/SchemaModal/index.tsx | src/features/modals/SchemaModal/index.tsx | import React from "react";
import type { ModalProps } from "@mantine/core";
import { Stack, Modal, Button, Text, Anchor, Group, Paper } from "@mantine/core";
import Editor from "@monaco-editor/react";
import { event as gaEvent } from "nextjs-google-analytics";
import { toast } from "react-hot-toast";
import { VscLinkEx... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/ImportModal/index.tsx | src/features/modals/ImportModal/index.tsx | import React from "react";
import type { ModalProps } from "@mantine/core";
import { Modal, Group, Button, TextInput, Stack, Paper, Text } from "@mantine/core";
import { Dropzone } from "@mantine/dropzone";
import { event as gaEvent } from "nextjs-google-analytics";
import toast from "react-hot-toast";
import { AiOutli... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/NodeModal/index.tsx | src/features/modals/NodeModal/index.tsx | import React from "react";
import type { ModalProps } from "@mantine/core";
import { Modal, Stack, Text, ScrollArea, Flex, CloseButton } from "@mantine/core";
import { CodeHighlight } from "@mantine/code-highlight";
import type { NodeData } from "../../../types/graph";
import useGraph from "../../editor/views/GraphView... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/modals/TypeModal/index.tsx | src/features/modals/TypeModal/index.tsx | import React from "react";
import type { ModalProps } from "@mantine/core";
import { Stack, Modal, Select, ScrollArea } from "@mantine/core";
import { CodeHighlight } from "@mantine/code-highlight";
import { event as gaEvent } from "nextjs-google-analytics";
import useJson from "../../../store/useJson";
enum Language ... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/BottomBar.tsx | src/features/editor/BottomBar.tsx | import React from "react";
import { Flex, Menu, Popover, Text } from "@mantine/core";
import styled from "styled-components";
import { event as gaEvent } from "nextjs-google-analytics";
import { BiSolidDockLeft } from "react-icons/bi";
import { IoMdCheckmark } from "react-icons/io";
import { MdArrowUpward } from "react... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/TextEditor.tsx | src/features/editor/TextEditor.tsx | import React, { useCallback } from "react";
import { LoadingOverlay } from "@mantine/core";
import styled from "styled-components";
import Editor, { type EditorProps, loader, type OnMount, useMonaco } from "@monaco-editor/react";
import useConfig from "../../store/useConfig";
import useFile from "../../store/useFile";
... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/FullscreenDropzone.tsx | src/features/editor/FullscreenDropzone.tsx | import React from "react";
import { Group, Text } from "@mantine/core";
import { Dropzone } from "@mantine/dropzone";
import toast from "react-hot-toast";
import { VscCircleSlash, VscFiles } from "react-icons/vsc";
import { FileFormat } from "../../enums/file.enum";
import useFile from "../../store/useFile";
export co... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/LiveEditor.tsx | src/features/editor/LiveEditor.tsx | import React from "react";
import { useSessionStorage } from "@mantine/hooks";
import styled from "styled-components";
import { ViewMode } from "../../enums/viewMode.enum";
import { GraphView } from "./views/GraphView";
import { TreeView } from "./views/TreeView";
const StyledLiveEditor = styled.div`
position: relat... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/ExternalMode.tsx | src/features/editor/ExternalMode.tsx | import React from "react";
import { Accordion, Anchor, Code, Flex, FocusTrap, Group, Modal, Text } from "@mantine/core";
const ExternalMode = () => {
const [isExternal, setExternal] = React.useState(false);
React.useEffect(() => {
if (process.env.NEXT_PUBLIC_DISABLE_EXTERNAL_MODE === "false") {
if (type... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/ZoomControl.tsx | src/features/editor/views/GraphView/ZoomControl.tsx | import React from "react";
import { ActionIcon, Flex, Tooltip, Text } from "@mantine/core";
import { useHotkeys } from "@mantine/hooks";
import { event as gaEvent } from "nextjs-google-analytics";
import { LuFocus, LuMaximize, LuMinus, LuPlus } from "react-icons/lu";
import { SearchInput } from "../../Toolbar/SearchInp... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/SecureInfo.tsx | src/features/editor/views/GraphView/SecureInfo.tsx | import React from "react";
import { ThemeIcon, Tooltip } from "@mantine/core";
import { LuShieldCheck } from "react-icons/lu";
export const SecureInfo = () => {
return (
<Tooltip
label="Your data is processed locally on your device."
fz="xs"
ta="center"
maw="200"
multiline
wit... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/index.tsx | src/features/editor/views/GraphView/index.tsx | import React from "react";
import { Box, LoadingOverlay, useComputedColorScheme } from "@mantine/core";
import { useDebouncedValue } from "@mantine/hooks";
import styled from "styled-components";
import debounce from "lodash.debounce";
import { Space } from "react-zoomable-ui";
import { Canvas } from "reaflow";
import ... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/OptionsMenu.tsx | src/features/editor/views/GraphView/OptionsMenu.tsx | import React from "react";
import { ActionIcon, Button, Flex, Menu, Text } from "@mantine/core";
import { useHotkeys } from "@mantine/hooks";
import styled from "styled-components";
import { event as gaEvent } from "nextjs-google-analytics";
import { BsCheck2 } from "react-icons/bs";
import { LuChevronRight, LuImageDow... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/NotSupported.tsx | src/features/editor/views/GraphView/NotSupported.tsx | import React from "react";
import { Anchor, Button, Image, Overlay, Stack, Text } from "@mantine/core";
import styled, { keyframes } from "styled-components";
import useConfig from "../../../../store/useConfig";
const shineEffect = keyframes`
0% {
transform: translateX(-120%) rotate(25deg);
opacity: 0.5;
}... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/stores/useGraph.ts | src/features/editor/views/GraphView/stores/useGraph.ts | import type { ViewPort } from "react-zoomable-ui/dist/ViewPort";
import type { CanvasDirection } from "reaflow/dist/layout/elkLayout";
import { create } from "zustand";
import { SUPPORTED_LIMIT } from "../../../../../constants/graph";
import useJson from "../../../../../store/useJson";
import type { EdgeData, NodeData ... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/lib/jsonParser.ts | src/features/editor/views/GraphView/lib/jsonParser.ts | /**
* Copyright (c) JSON Crack
* This source code is licensed under the Apache 2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { parseTree, getNodePath, type Node } from "jsonc-parser";
import type { EdgeData, NodeData, NodeRow } from "../../../../../types/graph";
import... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/lib/utils/getOutgoers.ts | src/features/editor/views/GraphView/lib/utils/getOutgoers.ts | import type { NodeData, EdgeData } from "../../../../../../types/graph";
type Outgoers = [NodeData[], string[]];
export const getOutgoers = (
nodeId: string,
nodes: NodeData[],
edges: EdgeData[],
parent: string[] = []
): Outgoers => {
const outgoerNodes: NodeData[] = [];
const matchingNodes: string[] = []... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/lib/utils/calculateNodeSize.ts | src/features/editor/views/GraphView/lib/utils/calculateNodeSize.ts | import { NODE_DIMENSIONS } from "../../../../../../constants/graph";
import useConfig from "../../../../../../store/useConfig";
type Text = number | string | [string, string][];
type Size = { width: number; height: number };
export const isContentImage = (value: Text) => {
if (typeof value !== "string") return fals... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/lib/utils/getChildrenEdges.ts | src/features/editor/views/GraphView/lib/utils/getChildrenEdges.ts | import type { NodeData, EdgeData } from "../../../../../../types/graph";
export const getChildrenEdges = (nodes: NodeData[], edges: EdgeData[]): EdgeData[] => {
const nodeIds = nodes.map(node => node.id);
return edges.filter(
edge => nodeIds.includes(edge.from as string) || nodeIds.includes(edge.to as string)... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/CustomEdge/index.tsx | src/features/editor/views/GraphView/CustomEdge/index.tsx | import React from "react";
import { useComputedColorScheme } from "@mantine/core";
import type { EdgeProps } from "reaflow";
import { Edge } from "reaflow";
import useGraph from "../stores/useGraph";
const CustomEdgeWrapper = (props: EdgeProps) => {
const colorScheme = useComputedColorScheme();
const viewPort = us... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/CustomNode/styles.tsx | src/features/editor/views/GraphView/CustomNode/styles.tsx | import type { DefaultTheme } from "styled-components";
import styled from "styled-components";
import { LinkItUrl } from "react-linkify-it";
import { NODE_DIMENSIONS } from "../../../../../constants/graph";
type TextColorFn = {
theme: DefaultTheme;
$type?: string;
$value?: string | number | null | boolean;
};
f... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/CustomNode/index.tsx | src/features/editor/views/GraphView/CustomNode/index.tsx | import React from "react";
import { useComputedColorScheme } from "@mantine/core";
import type { NodeProps } from "reaflow";
import { Node } from "reaflow";
import { useModal } from "../../../../../store/useModal";
import type { NodeData } from "../../../../../types/graph";
import useGraph from "../stores/useGraph";
im... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/CustomNode/ObjectNode.tsx | src/features/editor/views/GraphView/CustomNode/ObjectNode.tsx | import React from "react";
import type { CustomNodeProps } from ".";
import { NODE_DIMENSIONS } from "../../../../../constants/graph";
import type { NodeData } from "../../../../../types/graph";
import { TextRenderer } from "./TextRenderer";
import * as Styled from "./styles";
type RowProps = {
row: NodeData["text"]... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/CustomNode/TextRenderer.tsx | src/features/editor/views/GraphView/CustomNode/TextRenderer.tsx | import React from "react";
import { ColorSwatch } from "@mantine/core";
import styled from "styled-components";
const StyledRow = styled.span`
display: inline-flex;
align-items: center;
overflow: hidden;
gap: 4px;
vertical-align: middle;
`;
const isURL = (word: string) => {
const urlPattern =
/^(http:... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/GraphView/CustomNode/TextNode.tsx | src/features/editor/views/GraphView/CustomNode/TextNode.tsx | import React from "react";
import styled from "styled-components";
import type { CustomNodeProps } from ".";
import useConfig from "../../../../../store/useConfig";
import { isContentImage } from "../lib/utils/calculateNodeSize";
import { TextRenderer } from "./TextRenderer";
import * as Styled from "./styles";
const ... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/TreeView/Value.tsx | src/features/editor/views/TreeView/Value.tsx | import React from "react";
import type { DefaultTheme } from "styled-components";
import { useTheme } from "styled-components";
import { TextRenderer } from "../GraphView/CustomNode/TextRenderer";
type TextColorFn = {
theme: DefaultTheme;
$value?: string | unknown;
};
function getValueColor({ $value, theme }: Tex... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/TreeView/index.tsx | src/features/editor/views/TreeView/index.tsx | import React from "react";
import { useTheme } from "styled-components";
import { JSONTree } from "react-json-tree";
import useJson from "../../../../store/useJson";
import { Label } from "./Label";
import { Value } from "./Value";
export const TreeView = () => {
const theme = useTheme();
const json = useJson(stat... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/views/TreeView/Label.tsx | src/features/editor/views/TreeView/Label.tsx | import React from "react";
import type { DefaultTheme } from "styled-components";
import { styled } from "styled-components";
import type { KeyPath } from "react-json-tree";
interface LabelProps {
keyPath: KeyPath;
nodeType: string;
}
function getLabelColor({ $type, theme }: { $type?: string; theme: DefaultTheme ... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/Toolbar/SearchInput.tsx | src/features/editor/Toolbar/SearchInput.tsx | import React from "react";
import { Flex, Text, TextInput } from "@mantine/core";
import { getHotkeyHandler } from "@mantine/hooks";
import { useOs } from "@mantine/hooks";
import { AiOutlineSearch } from "react-icons/ai";
import { useFocusNode } from "../../../hooks/useFocusNode";
export const SearchInput = () => {
... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/Toolbar/index.tsx | src/features/editor/Toolbar/index.tsx | import React from "react";
import Link from "next/link";
import { Flex, Group } from "@mantine/core";
import styled from "styled-components";
import toast from "react-hot-toast";
import { AiOutlineFullscreen } from "react-icons/ai";
import { FaGithub } from "react-icons/fa6";
import { JSONCrackLogo } from "../../../lay... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/Toolbar/styles.ts | src/features/editor/Toolbar/styles.ts | import styled from "styled-components";
export const StyledToolElement = styled.button<{ $hide?: boolean; $highlight?: boolean }>`
display: ${({ $hide }) => ($hide ? "none" : "flex")};
align-items: center;
gap: 4px;
place-content: center;
font-size: 12px;
background: ${({ $highlight }) =>
$highlight ? ... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/Toolbar/ToolsMenu.tsx | src/features/editor/Toolbar/ToolsMenu.tsx | import React from "react";
import { Menu, Flex } from "@mantine/core";
import { event as gaEvent } from "nextjs-google-analytics";
import { CgChevronDown } from "react-icons/cg";
import { MdFilterListAlt } from "react-icons/md";
import { VscSearchFuzzy, VscJson, VscGroupByRefType } from "react-icons/vsc";
import { useM... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/Toolbar/FileMenu.tsx | src/features/editor/Toolbar/FileMenu.tsx | import React from "react";
import { Flex, Menu } from "@mantine/core";
import { event as gaEvent } from "nextjs-google-analytics";
import { CgChevronDown } from "react-icons/cg";
import useFile from "../../../store/useFile";
import { useModal } from "../../../store/useModal";
import { StyledToolElement } from "./styles... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/features/editor/Toolbar/ViewMenu.tsx | src/features/editor/Toolbar/ViewMenu.tsx | import React from "react";
import { Menu, Flex, SegmentedControl, Text } from "@mantine/core";
import { useSessionStorage } from "@mantine/hooks";
import { event as gaEvent } from "nextjs-google-analytics";
import { BsCheck2 } from "react-icons/bs";
import { CgChevronDown } from "react-icons/cg";
import { ViewMode } fr... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/types/graph.ts | src/types/graph.ts | import type { JSONPath, Node } from "jsonc-parser";
export interface NodeRow {
key: string | null;
value: string | number | null;
type: Node["type"];
childrenCount?: number;
to?: string[];
}
export interface NodeData {
id: string;
text: Array<NodeRow>;
width: number;
height: number;
path?: JSONPat... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/types/styled.d.ts | src/types/styled.d.ts | import "styled-components";
import type theme from "../constants/theme";
type CustomTheme = typeof theme;
declare module "styled-components" {
export interface DefaultTheme extends CustomTheme {}
}
| typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/JsonCrackLogo.tsx | src/layout/JsonCrackLogo.tsx | import React, { useEffect } from "react";
import localFont from "next/font/local";
import Link from "next/link";
import { Image } from "@mantine/core";
import styled from "styled-components";
const monaSans = localFont({
src: "../assets/fonts/Mona-Sans.woff2",
variable: "--mona-sans",
display: "swap",
fallback... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/ConverterLayout/ToolPage.tsx | src/layout/ConverterLayout/ToolPage.tsx | import React, { useEffect, useRef } from "react";
import { Box, Container, Flex, Paper, Text, Title } from "@mantine/core";
import { Editor } from "@monaco-editor/react";
import { NextSeo } from "next-seo";
import { LuCheck, LuCircleX } from "react-icons/lu";
import { SEO } from "../../constants/seo";
import { type Fil... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/ConverterLayout/options.ts | src/layout/ConverterLayout/options.ts | import type { EditorProps } from "@monaco-editor/react";
export const editorOptions: EditorProps["options"] = {
formatOnPaste: true,
formatOnType: true,
tabSize: 2,
stopRenderingLineAfter: -1,
minimap: { enabled: false },
stickyScroll: { enabled: false },
scrollBeyondLastLine: false,
};
| typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/ConverterLayout/PageLinks.tsx | src/layout/ConverterLayout/PageLinks.tsx | import React from "react";
import Link from "next/link";
import { Anchor, Button, Flex, List, SimpleGrid, Stack } from "@mantine/core";
import { FaArrowRightLong } from "react-icons/fa6";
import { formats } from "../../enums/file.enum";
const languages = formats.map(format => format.label);
function groupCombinations... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/Landing/Section2.tsx | src/layout/Landing/Section2.tsx | import React from "react";
import {
Button,
Container,
Flex,
Image,
JsonInput,
List,
SimpleGrid,
Stack,
Text,
Title,
} from "@mantine/core";
import styled from "styled-components";
import { LuBadgeCheck } from "react-icons/lu";
const StyledDottedContainer = styled.div`
position: relative;
backg... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/Landing/Section3.tsx | src/layout/Landing/Section3.tsx | import React from "react";
import {
Button,
Container,
Flex,
Image,
List,
SimpleGrid,
Stack,
Text,
Title,
} from "@mantine/core";
import styled from "styled-components";
import { LuBadgeCheck } from "react-icons/lu";
const StyledDottedContainer = styled.div`
position: relative;
width: 100%;
min... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/Landing/FAQ.tsx | src/layout/Landing/FAQ.tsx | import React from "react";
import { Container, Title, Accordion } from "@mantine/core";
import Questions from "../../data/faq.json";
export const FAQ = () => {
return (
<Container id="faq" component="section" size="sm" py={80}>
<Title
c="black"
order={2}
fz={{
base: 24,
... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/Landing/HeroSection.tsx | src/layout/Landing/HeroSection.tsx | import React from "react";
import { Oxygen } from "next/font/google";
import Link from "next/link";
import { Stack, Flex, Button } from "@mantine/core";
import styled from "styled-components";
import { FaChevronRight, FaGithub, FaStar } from "react-icons/fa6";
const oxygen = Oxygen({
subsets: ["latin-ext"],
weight... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/Landing/HeroPreview.tsx | src/layout/Landing/HeroPreview.tsx | import React from "react";
import { Container, Image } from "@mantine/core";
export const HeroPreview = () => {
return (
<Container component="section" id="preview" fluid py="20" mx="lg">
<Image
src="./assets/editor.webp"
loading="eager"
maw={1036}
mx="auto"
alt="JSO... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/Landing/Section1.tsx | src/layout/Landing/Section1.tsx | import React from "react";
import { Container, Image, SimpleGrid, Stack, Text, Title } from "@mantine/core";
import styled from "styled-components";
const StyledImageWrapper = styled.div`
position: relative;
&::after {
content: "";
position: absolute;
width: 100%;
height: 100%;
top: 0;
lef... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/Landing/Features.tsx | src/layout/Landing/Features.tsx | import React from "react";
import {
Container,
Flex,
Title,
Text,
Paper,
Center,
Badge,
ThemeIcon,
SimpleGrid,
} from "@mantine/core";
import { FaBolt, FaToolbox } from "react-icons/fa";
import { IoImages, IoShieldCheckmark } from "react-icons/io5";
import { MdOutlineFormatIndentIncrease, MdOutlineGen... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/TypeLayout/PageLinks.tsx | src/layout/TypeLayout/PageLinks.tsx | import React from "react";
import Link from "next/link";
import { Anchor, Button, Flex, List, SimpleGrid, Stack } from "@mantine/core";
import { FaArrowRightLong } from "react-icons/fa6";
import { formats, TypeLanguage, typeOptions } from "../../enums/file.enum";
type MappedCombinations = {
[language: string]: strin... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/TypeLayout/TypegenWrapper.tsx | src/layout/TypeLayout/TypegenWrapper.tsx | import React, { useEffect, useRef } from "react";
import { Box, Container, Flex, Paper, Title, Text } from "@mantine/core";
import { Editor } from "@monaco-editor/react";
import { NextSeo } from "next-seo";
import { LuCheck, LuCircleX } from "react-icons/lu";
import { SEO } from "../../constants/seo";
import { type Fil... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/PageLayout/Navbar.tsx | src/layout/PageLayout/Navbar.tsx | import React from "react";
import Link from "next/link";
import { Button, Menu, type MenuItemProps, Text, Stack } from "@mantine/core";
import styled from "styled-components";
import { LuChevronDown } from "react-icons/lu";
import { JSONCrackLogo } from "../JsonCrackLogo";
const StyledNavbarWrapper = styled.div`
z-i... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/PageLayout/index.tsx | src/layout/PageLayout/index.tsx | import React from "react";
import { Inter } from "next/font/google";
import styled, { ThemeProvider } from "styled-components";
import { lightTheme } from "../../constants/theme";
import { Footer } from "./Footer";
import { Navbar } from "./Navbar";
const inter = Inter({
subsets: ["latin-ext"],
});
const StyledLayo... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/layout/PageLayout/Footer.tsx | src/layout/PageLayout/Footer.tsx | import React from "react";
import Link from "next/link";
import { Anchor, Container, Divider, Flex, Stack, Text, ThemeIcon } from "@mantine/core";
import { FaDiscord, FaGithub, FaLinkedin } from "react-icons/fa";
import { FaXTwitter } from "react-icons/fa6";
import { JSONCrackLogo } from "../JsonCrackLogo";
export con... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/lib/utils/mantineColorScheme.ts | src/lib/utils/mantineColorScheme.ts | import { type MantineColorScheme, type MantineColorSchemeManager } from "@mantine/core";
export interface SmartColorSchemeManagerOptions {
/** Local storage key used to retrieve value with `localStorage.getItem(key)` */
key: string;
/** Function that returns the current pathname */
getPathname: () => string;
... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/lib/utils/generateType.ts | src/lib/utils/generateType.ts | import { type FileFormat, TypeLanguage } from "../../enums/file.enum";
import { contentToJson } from "./jsonAdapter";
export const generateType = async (input: string, format: FileFormat, output: TypeLanguage) => {
try {
const inputToJson = await contentToJson(input, format);
const jsonString = JSON.stringif... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/lib/utils/search.ts | src/lib/utils/search.ts | export const searchQuery = (param: string) => {
return document.querySelectorAll(param);
};
export const cleanupHighlight = () => {
const nodes = document.querySelectorAll("foreignObject.searched, .highlight");
for (let i = 0; i < nodes.length; i++) {
const node = nodes[i];
node.classList.remove("searche... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/lib/utils/helpers.ts | src/lib/utils/helpers.ts | export function isIframe() {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}
| typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/lib/utils/jsonAdapter.ts | src/lib/utils/jsonAdapter.ts | import type { ParseError } from "jsonc-parser";
import { FileFormat } from "../../enums/file.enum";
export const contentToJson = (value: string, format = FileFormat.JSON): Promise<object> => {
return new Promise(async (resolve, reject) => {
try {
if (!value) return resolve({});
if (format === FileFo... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/constants/graph.ts | src/constants/graph.ts | export const NODE_DIMENSIONS = {
ROW_HEIGHT: 30, // Regular row height
PARENT_HEIGHT: 36, // Height for parent nodes
} as const;
export const SUPPORTED_LIMIT = +(process.env.NEXT_PUBLIC_NODE_LIMIT as string);
| typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/constants/globalStyle.ts | src/constants/globalStyle.ts | import { createGlobalStyle } from "styled-components";
const GlobalStyle = createGlobalStyle`
html, body {
background: #ffffff;
overscroll-behavior: none;
-webkit-font-smoothing: subpixel-antialiased !important;
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padd... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/constants/seo.ts | src/constants/seo.ts | import type { NextSeoProps } from "next-seo";
export const SEO: NextSeoProps = {
title: "JSON Crack | Online JSON Viewer - Transform your data into interactive graphs",
description:
"JSON Crack Editor is a tool for visualizing into graphs, analyzing, editing, formatting, querying, transforming and validating J... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/constants/theme.ts | src/constants/theme.ts | const fixedColors = {
CRIMSON: "#DC143C",
BLURPLE: "#5865F2",
PURPLE: "#9036AF",
FULL_WHITE: "#FFFFFF",
BLACK: "#202225",
BLACK_DARK: "#2C2F33",
BLACK_LIGHT: "#2F3136",
BLACK_PRIMARY: "#36393f",
DARK_SALMON: "#E9967A",
DANGER: "hsl(359,calc(var(--saturation-factor, 1)*66.7%),54.1%)",
LIGHTGREEN: "... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/enums/viewMode.enum.ts | src/enums/viewMode.enum.ts | export enum ViewMode {
Graph = "graph",
Tree = "tree",
}
| typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
AykutSarac/jsoncrack.com | https://github.com/AykutSarac/jsoncrack.com/blob/3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f/src/enums/file.enum.ts | src/enums/file.enum.ts | export enum FileFormat {
"JSON" = "json",
"YAML" = "yaml",
"XML" = "xml",
"CSV" = "csv",
}
export const formats = [
{ value: FileFormat.JSON, label: "JSON" },
{ value: FileFormat.YAML, label: "YAML" },
{ value: FileFormat.XML, label: "XML" },
{ value: FileFormat.CSV, label: "CSV" },
];
export enum Typ... | typescript | Apache-2.0 | 3170cb7ef02cadcf8fb776bd8a3000a49fc7fd7f | 2026-01-04T15:49:31.309040Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/sst-env.d.ts | sst-env.d.ts | /* This file is auto-generated by SST. Do not edit. */
/* tslint:disable */
/* eslint-disable */
/* deno-fmt-ignore-file */
declare module "sst" {
export interface Resource {
"ADMIN_SECRET": {
"type": "sst.sst.Secret"
"value": string
}
"AUTH_API_URL": {
"type": "sst.sst.Linkable"
... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/sst.config.ts | sst.config.ts | /// <reference path="./.sst/platform/config.d.ts" />
export default $config({
app(input) {
return {
name: "opencode",
removal: input?.stage === "production" ? "retain" : "remove",
protect: ["production"].includes(input?.stage),
home: "cloudflare",
providers: {
stripe: {
... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/nix/bundle.ts | nix/bundle.ts | #!/usr/bin/env bun
import solidPlugin from "./node_modules/@opentui/solid/scripts/solid-plugin"
import path from "path"
import fs from "fs"
const dir = process.cwd()
const parser = fs.realpathSync(path.join(dir, "node_modules/@opentui/core/parser.worker.js"))
const worker = "./src/cli/cmd/tui/worker.ts"
const version... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/nix/scripts/bun-build.ts | nix/scripts/bun-build.ts | import solidPlugin from "./packages/opencode/node_modules/@opentui/solid/scripts/solid-plugin"
import path from "path"
import fs from "fs"
const version = "@VERSION@"
const pkg = path.join(process.cwd(), "packages/opencode")
const parser = fs.realpathSync(path.join(pkg, "./node_modules/@opentui/core/parser.worker.js")... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/nix/scripts/patch-wasm.ts | nix/scripts/patch-wasm.ts | #!/usr/bin/env bun
import fs from "fs"
import path from "path"
/**
* Rewrite tree-sitter wasm references inside a JS file to absolute paths.
* argv: [node, script, file, mainWasm, ...wasmPaths]
*/
const [, , file, mainWasm, ...wasmPaths] = process.argv
if (!file || !mainWasm) {
console.error("usage: patch-wasm ... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/nix/scripts/canonicalize-node-modules.ts | nix/scripts/canonicalize-node-modules.ts | import { lstat, mkdir, readdir, rm, symlink } from "fs/promises"
import { join, relative } from "path"
type SemverLike = {
valid: (value: string) => string | null
rcompare: (left: string, right: string) => number
}
type Entry = {
dir: string
version: string
label: string
}
const root = process.cwd()
const ... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/nix/scripts/normalize-bun-binaries.ts | nix/scripts/normalize-bun-binaries.ts | import { lstat, mkdir, readdir, rm, symlink } from "fs/promises"
import { join, relative } from "path"
type PackageManifest = {
name?: string
bin?: string | Record<string, string>
}
const root = process.cwd()
const bunRoot = join(root, "node_modules/.bun")
const bunEntries = (await safeReadDir(bunRoot)).sort()
le... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/github/sst-env.d.ts | github/sst-env.d.ts | /* This file is auto-generated by SST. Do not edit. */
/* tslint:disable */
/* eslint-disable */
/* deno-fmt-ignore-file */
/// <reference path="../sst-env.d.ts" />
import "sst"
export {} | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/github/index.ts | github/index.ts | import { $ } from "bun"
import path from "node:path"
import { Octokit } from "@octokit/rest"
import { graphql } from "@octokit/graphql"
import * as core from "@actions/core"
import * as github from "@actions/github"
import type { Context as GitHubContext } from "@actions/github/lib/context"
import type { IssueCommentEv... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/infra/stage.ts | infra/stage.ts | export const domain = (() => {
if ($app.stage === "production") return "opencode.ai"
if ($app.stage === "dev") return "dev.opencode.ai"
return `${$app.stage}.dev.opencode.ai`
})()
export const zoneID = "430ba34c138cfb5360826c4909f99be8"
new cloudflare.RegionalHostname("RegionalHostname", {
hostname: domain,
... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/infra/secret.ts | infra/secret.ts | export const SECRET = {
R2AccessKey: new sst.Secret("R2AccessKey", "unknown"),
R2SecretKey: new sst.Secret("R2SecretKey", "unknown"),
}
| typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/infra/enterprise.ts | infra/enterprise.ts | import { SECRET } from "./secret"
import { domain, shortDomain } from "./stage"
const storage = new sst.cloudflare.Bucket("EnterpriseStorage")
const teams = new sst.cloudflare.x.SolidStart("Teams", {
domain: shortDomain,
path: "packages/enterprise",
buildCommand: "bun run build:cloudflare",
environment: {
... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/infra/app.ts | infra/app.ts | import { domain } from "./stage"
const GITHUB_APP_ID = new sst.Secret("GITHUB_APP_ID")
const GITHUB_APP_PRIVATE_KEY = new sst.Secret("GITHUB_APP_PRIVATE_KEY")
export const EMAILOCTOPUS_API_KEY = new sst.Secret("EMAILOCTOPUS_API_KEY")
const ADMIN_SECRET = new sst.Secret("ADMIN_SECRET")
const bucket = new sst.cloudflare... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/infra/console.ts | infra/console.ts | import { domain } from "./stage"
import { EMAILOCTOPUS_API_KEY } from "./app"
////////////////
// DATABASE
////////////////
const cluster = planetscale.getDatabaseOutput({
name: "opencode",
organization: "anomalyco",
})
const branch =
$app.stage === "production"
? planetscale.getBranchOutput({
name... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/sdks/vscode/sst-env.d.ts | sdks/vscode/sst-env.d.ts | /* This file is auto-generated by SST. Do not edit. */
/* tslint:disable */
/* eslint-disable */
/* deno-fmt-ignore-file */
/// <reference path="../../sst-env.d.ts" />
import "sst"
export {} | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/sdks/vscode/src/extension.ts | sdks/vscode/src/extension.ts | // This method is called when your extension is deactivated
export function deactivate() {}
import * as vscode from "vscode"
const TERMINAL_NAME = "opencode"
export function activate(context: vscode.ExtensionContext) {
let openNewTerminalDisposable = vscode.commands.registerCommand("opencode.openNewTerminal", asyn... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/script/sync-zed.ts | script/sync-zed.ts | #!/usr/bin/env bun
import { $ } from "bun"
import { tmpdir } from "os"
import { join } from "path"
const FORK_REPO = "sst/zed-extensions"
const UPSTREAM_REPO = "zed-industries/extensions"
const EXTENSION_NAME = "opencode"
async function main() {
const version = process.argv[2]
if (!version) throw new Error("Vers... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/script/stats.ts | script/stats.ts | #!/usr/bin/env bun
async function sendToPostHog(event: string, properties: Record<string, any>) {
const key = process.env["POSTHOG_KEY"]
if (!key) {
console.warn("POSTHOG_API_KEY not set, skipping PostHog event")
return
}
const response = await fetch("https://us.i.posthog.com/i/v0/e/", {
method: ... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/script/changelog.ts | script/changelog.ts | #!/usr/bin/env bun
import { $ } from "bun"
import { createOpencode } from "@opencode-ai/sdk"
import { parseArgs } from "util"
export const team = [
"actions-user",
"opencode",
"rekram1-node",
"thdxr",
"kommander",
"jayair",
"fwang",
"adamdotdevin",
"iamdavidhill",
"opencode-agent[bot]",
]
export ... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/script/format.ts | script/format.ts | #!/usr/bin/env bun
import { $ } from "bun"
await $`bun run prettier --ignore-unknown --write .`
| typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/script/generate.ts | script/generate.ts | #!/usr/bin/env bun
import { $ } from "bun"
await $`bun ./packages/sdk/js/script/build.ts`
await $`bun dev generate > ../sdk/openapi.json`.cwd("packages/opencode")
await $`./script/format.ts`
| typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/script/publish-complete.ts | script/publish-complete.ts | #!/usr/bin/env bun
import { Script } from "@opencode-ai/script"
import { $ } from "bun"
if (!Script.preview) {
await $`gh release edit v${Script.version} --draft=false`
}
await $`bun install`
await $`gh release download --pattern "opencode-linux-*64.tar.gz" --pattern "opencode-darwin-*64.zip" -D dist`
await impo... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/script/publish-start.ts | script/publish-start.ts | #!/usr/bin/env bun
import { $ } from "bun"
import { Script } from "@opencode-ai/script"
import { buildNotes, getLatestRelease } from "./changelog"
let notes: string[] = []
console.log("=== publishing ===\n")
if (!Script.preview) {
const previous = await getLatestRelease()
notes = await buildNotes(previous, "HEA... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/.opencode/env.d.ts | .opencode/env.d.ts | declare module "*.txt" {
const content: string
export default content
}
| typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/.opencode/tool/github-triage.ts | .opencode/tool/github-triage.ts | /// <reference path="../env.d.ts" />
// import { Octokit } from "@octokit/rest"
import { tool } from "@opencode-ai/plugin"
import DESCRIPTION from "./github-triage.txt"
function getIssueNumber(): number {
const issue = parseInt(process.env.ISSUE_NUMBER ?? "", 10)
if (!issue) throw new Error("ISSUE_NUMBER env var n... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/.opencode/tool/github-pr-search.ts | .opencode/tool/github-pr-search.ts | /// <reference path="../env.d.ts" />
import { tool } from "@opencode-ai/plugin"
import DESCRIPTION from "./github-pr-search.txt"
async function githubFetch(endpoint: string, options: RequestInit = {}) {
const response = await fetch(`https://api.github.com${endpoint}`, {
...options,
headers: {
Authoriza... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/slack/sst-env.d.ts | packages/slack/sst-env.d.ts | /* This file is auto-generated by SST. Do not edit. */
/* tslint:disable */
/* eslint-disable */
/* deno-fmt-ignore-file */
/// <reference path="../../sst-env.d.ts" />
import "sst"
export {} | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/slack/src/index.ts | packages/slack/src/index.ts | import { App } from "@slack/bolt"
import { createOpencode, type ToolPart } from "@opencode-ai/sdk"
const app = new App({
token: process.env.SLACK_BOT_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET,
socketMode: true,
appToken: process.env.SLACK_APP_TOKEN,
})
console.log("🔧 Bot configuration:")
console... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/util/sst-env.d.ts | packages/util/sst-env.d.ts | /* This file is auto-generated by SST. Do not edit. */
/* tslint:disable */
/* eslint-disable */
/* deno-fmt-ignore-file */
/// <reference path="../../sst-env.d.ts" />
import "sst"
export {} | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/util/src/path.ts | packages/util/src/path.ts | export function getFilename(path: string | undefined) {
if (!path) return ""
const trimmed = path.replace(/[\/]+$/, "")
const parts = trimmed.split("/")
return parts[parts.length - 1] ?? ""
}
export function getDirectory(path: string | undefined) {
if (!path) return ""
const parts = path.split("/")
retur... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
anomalyco/opencode | https://github.com/anomalyco/opencode/blob/0f9130b649f65a8f5d08492e764f47b38f441dca/packages/util/src/fn.ts | packages/util/src/fn.ts | import { z } from "zod"
export function fn<T extends z.ZodType, Result>(schema: T, cb: (input: z.infer<T>) => Result) {
const result = (input: z.infer<T>) => {
const parsed = schema.parse(input)
return cb(parsed)
}
result.force = (input: z.infer<T>) => cb(input)
result.schema = schema
return result
}... | typescript | MIT | 0f9130b649f65a8f5d08492e764f47b38f441dca | 2026-01-04T15:39:55.906013Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.