Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

feat: improve project structure

AykutSaracc4566f68d02f
diff --git a/package.json b/package.json
index 8c4d9f39..05e6e841 100644
--- a/package.json
+++ b/package.json
@@ -13,53 +13,55 @@
"deploy": "gh-pages -d out -t true"
},
"dependencies": {
- "@emotion/react": "^11.10.6",
- "@emotion/server": "^11.10.0",
- "@mantine/core": "^6.0.1",
- "@mantine/hooks": "^6.0.1",
- "@mantine/next": "^6.0.1",
- "@mantine/prism": "^6.0.1",
- "@monaco-editor/react": "^4.4.6",
- "@sentry/nextjs": "^7.42.0",
- "@tanstack/react-query": "^4.26.1",
- "allotment": "^1.18.1",
+ "@emotion/react": "^11.11.0",
+ "@emotion/server": "^11.11.0",
+ "@mantine/core": "^6.0.10",
+ "@mantine/hooks": "^6.0.10",
+ "@mantine/next": "^6.0.10",
+ "@mantine/prism": "^6.0.10",
+ "@monaco-editor/react": "^4.5.1",
+ "@sentry/nextjs": "^7.51.2",
+ "@tanstack/react-query": "^4.29.5",
+ "allotment": "^1.19.0",
"altogic": "^2.3.9",
- "axios": "^1.3.4",
+ "axios": "^1.4.0",
"dayjs": "^1.11.7",
"html-to-image": "^1.11.11",
"jsonc-parser": "^3.2.0",
+ "jsonwebtoken": "^9.0.0",
"lodash.debounce": "^4.0.8",
"lz-string": "^1.5.0",
- "next": "^13.2.3",
+ "next": "^13.4.1",
"react": "^18.2.0",
"react-color": "^2.19.3",
"react-dom": "^18.2.0",
- "react-hot-toast": "^2.4.0",
+ "react-hot-toast": "^2.4.1",
"react-icons": "^4.8.0",
"react-linkify-it": "^1.0.7",
"react-syntax-highlighter": "^15.5.0",
- "react-zoom-pan-pinch": "^3.0.2",
+ "react-zoom-pan-pinch": "^3.0.7",
"reaflow": "^5.1.2",
"styled-components": "^5.3.8",
"universal-cookie": "^4.0.4",
- "zustand": "^4.3.6"
+ "zustand": "^4.3.8"
},
"devDependencies": {
- "@next/bundle-analyzer": "^13.2.3",
+ "@next/bundle-analyzer": "^13.4.1",
"@testing-library/react": "^14.0.0",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
+ "@types/jsonwebtoken": "^9.0.2",
"@types/lodash.debounce": "^4.0.7",
- "@types/lz-string": "^1.3.34",
- "@types/node": "^18.15.0",
- "@types/react": "18.0.28",
+ "@types/lz-string": "^1.5.0",
+ "@types/node": "^20.1.2",
+ "@types/react": "18.2.6",
"@types/react-color": "^3.0.6",
"@types/react-syntax-highlighter": "^15.5.6",
"@types/styled-components": "^5.1.26",
- "eslint": "8.35.0",
- "eslint-config-next": "13.2.3",
+ "eslint": "8.40.0",
+ "eslint-config-next": "13.4.1",
"eslint-plugin-unused-imports": "^2.0.0",
- "prettier": "^2.8.4",
+ "prettier": "^2.8.8",
"ts-node": "^10.9.1",
- "typescript": "4.9.5"
+ "typescript": "5.0.4"
}
}
diff --git a/src/components/CustomNode/ObjectNode.tsx b/src/components/CustomNode/ObjectNode.tsx
index c0a6c7a1..91557924 100644
--- a/src/components/CustomNode/ObjectNode.tsx
+++ b/src/components/CustomNode/ObjectNode.tsx
@@ -4,12 +4,10 @@ import * as Styled from "./styles";
const Node: React.FC<CustomNodeProps> = ({ node, x, y }) => {
const { text, width, height, data } = node;
- const ref = React.useRef(null);
-
if (data.isEmpty) return null;
return (
- <Styled.StyledForeignObject width={width} height={height} x={0} y={0} ref={ref} isObject>
+ <Styled.StyledForeignObject width={width} height={height} x={0} y={0} isObject>
{text.map((val, idx) => {
return (
<Styled.StyledRow
diff --git a/src/components/CustomNode/TextNode.tsx b/src/components/CustomNode/TextNode.tsx
index 441eb073..4b605244 100644
--- a/src/components/CustomNode/TextNode.tsx
+++ b/src/components/CustomNode/TextNode.tsx
@@ -4,6 +4,7 @@ import { MdLink, MdLinkOff } from "react-icons/md";
import { CustomNodeProps } from "src/components/CustomNode";
import useGraph from "src/store/useGraph";
import useStored from "src/store/useStored";
+import { isContentImage } from "src/utils/core/calculateNodeSize";
import * as Styled from "./styles";
const StyledExpand = styled.button`
@@ -48,16 +49,13 @@ const Node: React.FC<CustomNodeProps> = ({ node, x, y, hasCollapse = false }) =>
height,
data: { isParent, childrenCount, type },
} = node;
- const ref = React.useRef(null);
const hideCollapse = useStored(state => state.hideCollapse);
const showChildrenCount = useStored(state => state.childrenCount);
const imagePreview = useStored(state => state.imagePreview);
const expandNodes = useGraph(state => state.expandNodes);
const collapseNodes = useGraph(state => state.collapseNodes);
const isExpanded = useGraph(state => state.collapsedParents.includes(id));
- const isImage =
- !Array.isArray(text) && /(https?:\/\/.*\.(?:png|jpg|gif))/i.test(text) && imagePreview;
- // const { inViewport } = useInViewport(ref);
+ const isImage = imagePreview && isContentImage(text);
const handleExpand = (e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
@@ -73,7 +71,6 @@ const Node: React.FC<CustomNodeProps> = ({ node, x, y, hasCollapse = false }) =>
x={0}
y={0}
hasCollapse={isParent && hasCollapse}
- ref={ref}
>
{isImage ? (
<StyledImageWrapper>
@@ -96,7 +93,7 @@ const Node: React.FC<CustomNodeProps> = ({ node, x, y, hasCollapse = false }) =>
)}
{isParent && hasCollapse && hideCollapse && (
- <StyledExpand onClick={handleExpand}>
+ <StyledExpand aria-label="Expand" onClick={handleExpand}>
{isExpanded ? <MdLinkOff size={18} /> : <MdLink size={18} />}
</StyledExpand>
)}
diff --git a/src/components/CustomNode/index.tsx b/src/components/CustomNode/index.tsx
index 019a4660..3e7dfbf7 100644
--- a/src/components/CustomNode/index.tsx
+++ b/src/components/CustomNode/index.tsx
@@ -27,9 +27,7 @@ export const CustomNode = (nodeProps: NodeProps) => {
return <ObjectNode node={node as NodeData} x={x} y={y} />;
}
- return (
- <TextNode node={node as NodeData} hasCollapse={data.childrenCount > 0} x={x} y={y} />
- );
+ return <TextNode node={node as NodeData} hasCollapse={!!data.childrenCount} x={x} y={y} />;
}}
</Node>
);
diff --git a/src/components/CustomNode/styles.tsx b/src/components/CustomNode/styles.tsx
index 0aa97211..5d2c2eed 100644
--- a/src/components/CustomNode/styles.tsx
+++ b/src/components/CustomNode/styles.tsx
@@ -1,12 +1,11 @@
-import { Roboto_Mono } from "next/font/google";
+import { Fira_Mono } from "next/font/google";
import styled, { DefaultTheme } from "styled-components";
import { LinkItUrl } from "react-linkify-it";
-const robotoMono = Roboto_Mono({
- weight: "500",
+const robotoMono = Fira_Mono({
+ weight: ["500"],
subsets: ["latin"],
display: "swap",
- fallback: ["Arial, Helvetica, sans-serif", "Tahoma, Verdana, sans-serif"],
});
function getTypeColor(value: string, theme: DefaultTheme) {
@@ -33,8 +32,10 @@ export const StyledForeignObject = styled.foreignObject<{
pointer-events: none;
padding: ${({ isObject }) => isObject && "10px"};
font-family: ${robotoMono.style.fontFamily};
+ font-weight: 500;
&.searched {
+ background: rgba(27, 255, 0, 0.1);
border: 2px solid ${({ theme }) => theme.TEXT_POSITIVE};
border-radius: 2px;
box-sizing: border-box;
@@ -73,13 +74,13 @@ export const StyledKey = styled.span<{
}>`
display: inline;
flex: 1;
- font-weight: 500;
color: ${({ theme, type = "null", objectKey = false, parent = false }) =>
getKeyColor(theme, parent, type, objectKey)};
font-size: ${({ parent }) => parent && "14px"};
overflow: hidden;
text-overflow: ellipsis;
- padding: ${({ objectKey }) => !objectKey && 10}px;
+ padding: ${({ objectKey }) => !objectKey && "10px"};
+ white-space: nowrap;
`;
export const StyledRow = styled.span.attrs<{
@@ -91,11 +92,9 @@ export const StyledRow = styled.span.attrs<{
},
}))<{ "data-type": string; theme: DefaultTheme }>`
display: block;
- height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- padding: 0 auto;
`;
export const StyledChildrenCount = styled.span`
diff --git a/src/components/ErrorContainer/index.tsx b/src/components/ErrorContainer/index.tsx
deleted file mode 100644
index e221b406..00000000
--- a/src/components/ErrorContainer/index.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-import { MdReportGmailerrorred, MdOutlineCheckCircleOutline } from "react-icons/md";
-import useJson from "src/store/useJson";
-
-const StyledErrorWrapper = styled.div`
- z-index: 1;
-`;
-
-const StyledErrorExpand = styled.div<{ error: boolean }>`
- position: relative;
- display: flex;
- width: 100%;
- padding: 4px 16px;
- height: 36px;
- border-radius: 0;
- justify-content: space-between;
- align-items: center;
- color: ${({ theme, error }) => (error ? theme.TEXT_DANGER : theme.TEXT_POSITIVE)};
- pointer-events: ${({ error }) => !error && "none"};
- background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
-`;
-
-const StyledTitle = styled.span`
- display: flex;
- justify-content: center;
- align-items: center;
- font-weight: 500;
- gap: 10px;
- font-size: 16px;
-`;
-
-const StyledError = styled.pre`
- color: ${({ theme }) => theme.TEXT_DANGER};
- border-bottom: 1px solid ${({ theme }) => theme.SILVER_DARK};
- font-size: 12px;
- padding: 12px;
- margin: 0;
- word-wrap: break-word;
- white-space: pre-line;
-`;
-
-export const ErrorContainer = () => {
- const hasError = useJson(state => state.hasError);
-
- return (
- <StyledErrorWrapper>
- <StyledErrorExpand error={hasError}>
- <StyledTitle>
- {hasError ? (
- <MdReportGmailerrorred size={20} />
- ) : (
- <MdOutlineCheckCircleOutline size={20} />
- )}
- {hasError ? "Invalid JSON" : "JSON Valid"}
- </StyledTitle>
- </StyledErrorExpand>
- </StyledErrorWrapper>
- );
-};
diff --git a/src/components/Graph/index.tsx b/src/components/Graph/index.tsx
index ed562bdf..25941151 100644
--- a/src/components/Graph/index.tsx
+++ b/src/components/Graph/index.tsx
@@ -21,7 +21,7 @@ interface GraphProps {
const StyledEditorWrapper = styled.div<{ widget: boolean }>`
position: absolute;
width: 100%;
- height: calc(100vh - 63px);
+ height: ${({ widget }) => widget ? "calc(100vh - 36px)" : "calc(100vh - 63px)"};
--bg-color: ${({ theme }) => theme.GRID_BG_COLOR};
--line-color-1: ${({ theme }) => theme.GRID_COLOR_PRIMARY};
@@ -55,7 +55,7 @@ const StyledEditorWrapper = styled.div<{ widget: boolean }>`
export const Graph = ({ isWidget = false }: GraphProps) => {
const { validateHiddenNodes } = useToggleHide();
- const isPremium = useUser(state => state.isPremium);
+ const isPremium = useUser(state => state.isPremium());
const setLoading = useGraph(state => state.setLoading);
const setZoomPanPinch = useGraph(state => state.setZoomPanPinch);
const centerView = useGraph(state => state.centerView);
@@ -73,7 +73,7 @@ export const Graph = ({ isWidget = false }: GraphProps) => {
const handleNodeClick = React.useCallback(
(_: React.MouseEvent<SVGElement>, data: NodeData) => {
- if (setSelectedNode) setSelectedNode({ nodeData: data });
+ if (setSelectedNode) setSelectedNode(data);
setVisible("node")(true);
},
[setSelectedNode, setVisible]
diff --git a/src/components/MonacoEditor/index.tsx b/src/components/MonacoEditor/index.tsx
index c507b434..e19156ea 100644
--- a/src/components/MonacoEditor/index.tsx
+++ b/src/components/MonacoEditor/index.tsx
@@ -1,9 +1,8 @@
import React from "react";
import styled from "styled-components";
-import Editor, { loader, Monaco } from "@monaco-editor/react";
-import debounce from "lodash.debounce";
+import Editor, { loader, Monaco, useMonaco } from "@monaco-editor/react";
import { Loading } from "src/layout/Loading";
-import useJson from "src/store/useJson";
+import useFile from "src/store/useFile";
import useStored from "src/store/useStored";
loader.config({
@@ -14,6 +13,7 @@ loader.config({
const editorOptions = {
formatOnPaste: true,
+ formatOnType: true,
minimap: {
enabled: false,
},
@@ -27,57 +27,41 @@ const StyledWrapper = styled.div`
`;
export const MonacoEditor = () => {
- const json = useJson(state => state.json);
- const setJson = useJson(state => state.setJson);
- const setError = useJson(state => state.setError);
- const [loaded, setLoaded] = React.useState(false);
- const [value, setValue] = React.useState<string | undefined>(json);
+ const monaco = useMonaco();
+ const contents = useFile(state => state.contents);
+ const setContents = useFile(state => state.setContents);
+ const setError = useFile(state => state.setError);
+ const jsonSchema = useFile(state => state.jsonSchema);
+ const getHasChanges = useFile(state => state.getHasChanges);
+ const theme = useStored(state => (state.lightmode ? "light" : "vs-dark"));
- const hasError = useJson(state => state.hasError);
- const getHasChanges = useJson(state => state.getHasChanges);
- const lightmode = useStored(state => (state.lightmode ? "light" : "vs-dark"));
-
- const handleEditorWillMount = React.useCallback(
- (monaco: Monaco) => {
+ React.useEffect(() => {
+ if (monaco) {
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
- allowComments: true,
- comments: "ignore",
+ validate: true,
+ ...(jsonSchema && {
+ schemas: [
+ {
+ fileMatch: ["*"],
+ schema: jsonSchema,
+ },
+ ],
+ }),
});
+ }
+ }, [jsonSchema, monaco]);
+ const handleEditorWillMount = React.useCallback(
+ (monaco: Monaco) => {
monaco.editor.onDidChangeMarkers(([uri]) => {
const markers = monaco.editor.getModelMarkers({ resource: uri });
- setError(!!markers.length);
+ if (markers.length) setError(markers[0].message);
+ else setError(null);
});
},
[setError]
);
- const debouncedSetJson = React.useMemo(
- () =>
- debounce(value => {
- if (hasError) return;
- setJson(value || "[]");
- }, 1200),
- [hasError, setJson]
- );
-
- React.useEffect(() => {
- if ((value || !hasError) && loaded) debouncedSetJson(value);
- setLoaded(true);
-
- return () => debouncedSetJson.cancel();
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [debouncedSetJson, hasError, value]);
-
- const handleChange = React.useCallback((value?: string) => {
- try {
- const parsedJson = JSON.stringify(JSON.parse(value!), null, 2);
- setValue(parsedJson);
- } catch (error) {
- setValue(value);
- }
- }, []);
-
React.useEffect(() => {
const beforeunload = (e: BeforeUnloadEvent) => {
if (getHasChanges()) {
@@ -99,13 +83,13 @@ export const MonacoEditor = () => {
return (
<StyledWrapper>
<Editor
- value={json}
- theme={lightmode}
+ value={contents}
+ theme={theme}
options={editorOptions}
- onChange={handleChange}
+ onChange={e => setContents({ contents: e, skipUpdate: true })}
loading={<Loading message="Loading Editor..." />}
beforeMount={handleEditorWillMount}
- defaultLanguage="json"
+ language="json"
height="100%"
/>
</StyledWrapper>
diff --git a/src/containers/Editor/BottomBar.tsx b/src/containers/Editor/BottomBar.tsx
index 775db2f7..38aa5b86 100644
--- a/src/containers/Editor/BottomBar.tsx
+++ b/src/containers/Editor/BottomBar.tsx
@@ -13,8 +13,8 @@ import {
} from "react-icons/ai";
import { MdReportGmailerrorred, MdOutlineCheckCircleOutline } from "react-icons/md";
import { VscAccount, VscWorkspaceTrusted } from "react-icons/vsc";
-import { saveJson, updateJson } from "src/services/db/json";
-import useJson from "src/store/useJson";
+import { saveToCloud, updateJson } from "src/services/json";
+import useFile from "src/store/useFile";
import useModal from "src/store/useModal";
import useStored from "src/store/useStored";
import useUser from "src/store/useUser";
@@ -78,16 +78,16 @@ const StyledImg = styled.img<{ light: boolean }>`
export const BottomBar = () => {
const { replace, query } = useRouter();
- const data = useJson(state => state.data);
- const hasError = useJson(state => state.hasError);
+ const data = useFile(state => state.fileData);
+ const error = useFile(state => state.error);
const user = useUser(state => state.user);
const premium = useUser(state => state.isPremium());
const lightmode = useStored(state => state.lightmode);
- const hasChanges = useJson(state => state.hasChanges);
+ const hasChanges = useFile(state => state.hasChanges);
+ const getContents = useFile(state => state.getContents);
- const getJson = useJson(state => state.getJson);
const setVisible = useModal(state => state.setVisible);
- const setHasChanges = useJson(state => state.setHasChanges);
+ const setHasChanges = useFile(state => state.setHasChanges);
const [isPrivate, setIsPrivate] = React.useState(false);
const [isUpdating, setIsUpdating] = React.useState(false);
@@ -98,28 +98,32 @@ export const BottomBar = () => {
const handleSaveJson = React.useCallback(async () => {
if (!user) return setVisible("login")(true);
- if (hasChanges) {
+ if (
+ hasChanges &&
+ !error &&
+ (typeof query.doc === "string" || typeof query.doc === "undefined")
+ ) {
try {
setIsUpdating(true);
- toast.loading("Saving JSON...", { id: "jsonSave" });
- const res = await saveJson({ id: query.json as string, data: getJson() });
+ toast.loading("Saving document...", { id: "fileSave" });
+ const res = await saveToCloud(query?.doc ?? null, getContents());
if (res.errors && res.errors.items.length > 0) throw res.errors;
- if (res.data._id) replace({ query: { json: res.data._id } });
+ if (res.data._id) replace({ query: { doc: res.data._id } });
- toast.success("JSON saved to cloud", { id: "jsonSave" });
+ toast.success("Document saved to cloud", { id: "fileSave" });
setHasChanges(false);
} catch (error: any) {
if (error?.items?.length > 0) {
- return toast.error(error.items[0].message, { id: "jsonSave", duration: 5000 });
+ return toast.error(error.items[0].message, { id: "fileSave", duration: 5000 });
}
- toast.error("Failed to save JSON!", { id: "jsonSave" });
+ toast.error("Failed to save document!", { id: "fileSave" });
} finally {
setIsUpdating(false);
}
}
- }, [getJson, hasChanges, query.json, replace, setHasChanges, setVisible, user]);
+ }, [error, getContents, hasChanges, query.doc, replace, setHasChanges, setVisible, user]);
const handleLoginClick = () => {
if (user) return setVisible("account")(true);
@@ -162,8 +166,8 @@ export const BottomBar = () => {
Upgrade to Premium
</StyledBottomBarItem>
)}
- <StyledBottomBarItem error={!!hasError}>
- {hasError ? (
+ <StyledBottomBarItem error={!!error}>
+ {error ? (
<Flex align="center" gap={2}>
<MdReportGmailerrorred color="red" size={16} />
<Text fw="bold">Invalid Format</Text>
diff --git a/src/containers/Editor/LiveEditor/GraphCanvas.tsx b/src/containers/Editor/LiveEditor/GraphCanvas.tsx
index 6d9df644..232bca0e 100644
--- a/src/containers/Editor/LiveEditor/GraphCanvas.tsx
+++ b/src/containers/Editor/LiveEditor/GraphCanvas.tsx
@@ -1,6 +1,8 @@
import React from "react";
import { Graph } from "src/components/Graph";
-export const GraphCanvas = ({ isWidget = false }: { isWidget?: boolean }) => {
+export const GraphCanvas: React.FC<{ isWidget?: boolean }> = ({ isWidget = false }) => {
return <Graph isWidget={isWidget} />;
};
+
+export type GraphCanvasType = typeof GraphCanvas;
diff --git a/src/containers/Editor/LiveEditor/Tools.tsx b/src/containers/Editor/LiveEditor/Tools.tsx
index 83285c72..20b80e6f 100644
--- a/src/containers/Editor/LiveEditor/Tools.tsx
+++ b/src/containers/Editor/LiveEditor/Tools.tsx
@@ -7,10 +7,12 @@ import { AiOutlineFullscreen, AiOutlineMinus, AiOutlinePlus } from "react-icons/
import { CgArrowsMergeAltH, CgArrowsShrinkH, CgChevronDown } from "react-icons/cg";
import { FiDownload } from "react-icons/fi";
import { MdCenterFocusWeak } from "react-icons/md";
+import { SiJsonwebtokens } from "react-icons/si";
import { TiFlowMerge } from "react-icons/ti";
import {
VscCollapseAll,
VscExpandAll,
+ VscJson,
VscLayoutSidebarLeft,
VscLayoutSidebarLeftOff,
VscSettingsGear,
@@ -20,7 +22,15 @@ import useGraph from "src/store/useGraph";
import useJson from "src/store/useJson";
import useModal from "src/store/useModal";
import useStored from "src/store/useStored";
-import { getNextDirection } from "src/utils/getNextDirection";
+import { getNextDirection } from "src/utils/graph/getNextDirection";
+
+function inIframe() {
+ try {
+ return window.self !== window.top;
+ } catch (e) {
+ return true;
+ }
+}
export const StyledTools = styled.div`
position: relative;
@@ -40,12 +50,6 @@ export const StyledTools = styled.div`
}
`;
-const Section = styled.div`
- display: flex;
- align-items: center;
- gap: 8px;
-`;
-
const StyledToolElement = styled.button<{ hide?: boolean }>`
display: ${({ hide }) => (hide ? "none" : "grid")};
place-content: center;
@@ -150,10 +154,20 @@ export const Tools: React.FC<{ isWidget?: boolean }> = ({ isWidget = false }) =>
],
]);
+ const logoURL = React.useMemo(() => {
+ if (!inIframe()) return "https://jsoncrack.com";
+ return window.location.href.replace("widget", "editor");
+ }, []);
+
return (
<StyledTools>
{isWidget && (
- <StyledToolElement as="a" title="JSON Crack" href="https://herowand.com">
+ <StyledToolElement
+ as="a"
+ title="JSON Crack"
+ href={logoURL}
+ target={inIframe() ? "_blank" : "_parent"}
+ >
<Flex gap="xs" align="center" justify="center">
<StyledLogo
src="/assets/icon.png"
@@ -240,6 +254,23 @@ export const Tools: React.FC<{ isWidget?: boolean }> = ({ isWidget = false }) =>
</Menu.Item>
</Menu.Dropdown>
</Menu>
+ <Menu shadow="md">
+ <Menu.Target>
+ <StyledToolElement>
+ <Flex align="center" gap={3}>
+ Tools <CgChevronDown />
+ </Flex>
+ </StyledToolElement>
+ </Menu.Target>
+ <Menu.Dropdown>
+ <Menu.Item fz={12} icon={<VscJson />} onClick={() => setVisible("schema")(true)}>
+ JSON Schema
+ </Menu.Item>
+ <Menu.Item fz={12} icon={<SiJsonwebtokens />} onClick={() => setVisible("jwt")(true)}>
+ Decode JWT
+ </Menu.Item>
+ </Menu.Dropdown>
+ </Menu>
<StyledToolElement title="Cloud" onClick={() => setVisible("cloud")(true)}>
Cloud
</StyledToolElement>
diff --git a/src/containers/ModalController/index.tsx b/src/containers/ModalController/index.tsx
deleted file mode 100644
index c3ca5b2a..00000000
--- a/src/containers/ModalController/index.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import React from "react";
-import { shallow } from "zustand/shallow";
-import { AccountModal } from "src/containers/Modals/AccountModal";
-import { ClearModal } from "src/containers/Modals/ClearModal";
-import { CloudModal } from "src/containers/Modals/CloudModal";
-import { DownloadModal } from "src/containers/Modals/DownloadModal";
-import { ImportModal } from "src/containers/Modals/ImportModal";
-import { LoginModal } from "src/containers/Modals/LoginModal";
-import { SettingsModal } from "src/containers/Modals/SettingsModal";
-import { ShareModal } from "src/containers/Modals/ShareModal";
-import useModal from "src/store/useModal";
-import { NodeModal } from "../Modals/NodeModal";
-import { PremiumModal } from "../Modals/PremiumModal";
-
-export const ModalController = () => {
- const setVisible = useModal(state => state.setVisible);
-
- const [
- importModal,
- clearModal,
- downloadModal,
- settingsModal,
- cloudModal,
- accountModal,
- loginModal,
- shareModal,
- premiumModal,
- nodeModal,
- ] = useModal(
- state => [
- state.import,
- state.clear,
- state.download,
- state.settings,
- state.cloud,
- state.account,
- state.login,
- state.share,
- state.premium,
- state.node,
- ],
- shallow
- );
-
- return (
- <>
- <ImportModal opened={importModal} onClose={() => setVisible("import")(false)} />
- <ClearModal opened={clearModal} onClose={() => setVisible("clear")(false)} />
- <DownloadModal opened={downloadModal} onClose={() => setVisible("download")(false)} />
- <SettingsModal opened={settingsModal} onClose={() => setVisible("settings")(false)} />
- <CloudModal opened={cloudModal} onClose={() => setVisible("cloud")(false)} />
- <AccountModal opened={accountModal} onClose={() => setVisible("account")(false)} />
- <PremiumModal opened={premiumModal} onClose={() => setVisible("premium")(false)} />
- <LoginModal opened={loginModal} onClose={() => setVisible("login")(false)} />
- <ShareModal opened={shareModal} onClose={() => setVisible("share")(false)} />
- <NodeModal opened={nodeModal} onClose={() => setVisible("node")(false)} />
- </>
- );
-};
diff --git a/src/containers/Modals/AccountModal/index.tsx b/src/containers/Modals/AccountModal/index.tsx
index 765d675e..565914b8 100644
--- a/src/containers/Modals/AccountModal/index.tsx
+++ b/src/containers/Modals/AccountModal/index.tsx
@@ -97,7 +97,6 @@ export const AccountModal: React.FC<ModalProps> = ({ opened, onClose }) => {
variant="light"
color="red"
onClick={() => window.open("https://patreon.com/herowand", "_blank")}
- leftIcon={<IoRocketSharp />}
>
Cancel Subscription
</Button>
diff --git a/src/containers/Modals/ClearModal/index.tsx b/src/containers/Modals/ClearModal/index.tsx
index a67d5880..c4937d38 100644
--- a/src/containers/Modals/ClearModal/index.tsx
+++ b/src/containers/Modals/ClearModal/index.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { useRouter } from "next/router";
import { Modal, Group, Button, Text, Divider, ModalProps } from "@mantine/core";
-import { deleteJson } from "src/services/db/json";
+import { deleteJson } from "src/services/json";
import useJson from "src/store/useJson";
export const ClearModal: React.FC<ModalProps> = ({ opened, onClose }) => {
diff --git a/src/containers/Modals/CloudModal/index.tsx b/src/containers/Modals/CloudModal/index.tsx
index f25b862d..f3ae687e 100644
--- a/src/containers/Modals/CloudModal/index.tsx
+++ b/src/containers/Modals/CloudModal/index.tsx
@@ -12,6 +12,7 @@ import {
Divider,
ScrollArea,
ModalProps,
+ Paper,
} from "@mantine/core";
import { useQuery } from "@tanstack/react-query";
import dayjs from "dayjs";
@@ -20,10 +21,10 @@ import toast from "react-hot-toast";
import { AiOutlineEdit, AiOutlineLock, AiOutlinePlus, AiOutlineUnlock } from "react-icons/ai";
import { FaTrash } from "react-icons/fa";
import { IoRocketSharp } from "react-icons/io5";
-import { deleteJson, getAllJson, saveJson, updateJson } from "src/services/db/json";
-import useJson from "src/store/useJson";
+import { deleteJson, getAllJson, saveToCloud, updateJson } from "src/services/json";
+import useFile, { File } from "src/store/useFile";
+import useModal from "src/store/useModal";
import useUser from "src/store/useUser";
-import { Json } from "src/typings/altogic";
dayjs.extend(relativeTime);
@@ -31,14 +32,13 @@ const StyledJsonCard = styled.a<{ active?: boolean; create?: boolean }>`
display: ${({ create }) => (create ? "block" : "flex")};
align-items: center;
justify-content: space-between;
- background: ${({ theme }) => theme.BLACK_SECONDARY};
line-height: 20px;
padding: 6px;
- border: 2px solid ${({ theme, active }) => (active ? theme.SEAGREEN : theme.BLACK_SECONDARY)};
- border-radius: 5px;
+ border-radius: 3px;
overflow: hidden;
flex: 1;
- height: 160px;
+ height: 60px;
+ background: ${({ active }) => active && "rgb(48, 98, 197)"};
`;
const StyledInfo = styled.div``;
@@ -72,7 +72,8 @@ const StyledCreateWrapper = styled.div`
align-items: center;
justify-content: center;
opacity: 0.6;
- height: 45px;
+ height: 30px;
+ font-weight: 500;
font-size: 14px;
cursor: pointer;
`;
@@ -86,7 +87,7 @@ const StyledNameInput = styled.input`
font-weight: 600;
`;
-const GraphCard: React.FC<{ data: Json; refetch: () => void; active: boolean }> = ({
+const GraphCard: React.FC<{ data: File; refetch: () => void; active: boolean }> = ({
data,
refetch,
active,
@@ -112,7 +113,7 @@ const GraphCard: React.FC<{ data: Json; refetch: () => void; active: boolean }>
toast
.promise(deleteJson(data._id), {
- loading: "Deleting JSON file...",
+ loading: "Deleting file...",
error: "An error occurred while deleting the file!",
success: `Deleted ${name}!`,
})
@@ -120,76 +121,79 @@ const GraphCard: React.FC<{ data: Json; refetch: () => void; active: boolean }>
};
return (
- <StyledJsonCard
- href={`?json=${data._id}`}
- as={editMode ? "div" : "a"}
- active={active}
- {...props}
- >
- <StyledInfo>
- {editMode ? (
- <form onSubmit={onSubmit}>
- <StyledNameInput
- value={name}
- onChange={e => setName(e.currentTarget.value)}
- onClick={e => e.preventDefault()}
- autoFocus
- />
- <input type="submit" hidden />
- </form>
- ) : (
- <StyledTitle
- onClick={e => {
- e.preventDefault();
- setEditMode(true);
- }}
- >
- <span>{name}</span>
- <AiOutlineEdit />
- </StyledTitle>
- )}
- <StyledDetils>
- {data.private ? <AiOutlineLock /> : <AiOutlineUnlock />}
- Last modified {dayjs(data.updatedAt).fromNow()}
- </StyledDetils>
- </StyledInfo>
- <Button variant="subtle" color="red" onClick={onDeleteClick}>
- <FaTrash />
- </Button>
- </StyledJsonCard>
+ <Paper withBorder w="100%">
+ <StyledJsonCard
+ href={`?json=${data._id}`}
+ as={editMode ? "div" : "a"}
+ active={active}
+ {...props}
+ >
+ <StyledInfo>
+ {editMode ? (
+ <form onSubmit={onSubmit}>
+ <StyledNameInput
+ value={name}
+ onChange={e => setName(e.currentTarget.value)}
+ onClick={e => e.preventDefault()}
+ autoFocus
+ />
+ <input type="submit" hidden />
+ </form>
+ ) : (
+ <StyledTitle
+ onClick={e => {
+ e.preventDefault();
+ setEditMode(true);
+ }}
+ >
+ <span>{name}</span>
+ <AiOutlineEdit />
+ </StyledTitle>
+ )}
+ <StyledDetils>
+ {data.private ? <AiOutlineLock /> : <AiOutlineUnlock />}
+ Last modified {dayjs(data.updatedAt).fromNow()}
+ </StyledDetils>
+ </StyledInfo>
+ <Button variant="subtle" color="red" onClick={onDeleteClick}>
+ <FaTrash />
+ </Button>
+ </StyledJsonCard>
+ </Paper>
);
};
const CreateCard: React.FC<{ reachedLimit: boolean }> = ({ reachedLimit }) => {
const { replace } = useRouter();
const isPremium = useUser(state => state.isPremium());
- const getJson = useJson(state => state.getJson);
- const setHasChanges = useJson(state => state.setHasChanges);
+ const getContents = useFile(state => state.getContents);
+ const setHasChanges = useFile(state => state.setHasChanges);
+ const setVisible = useModal(state => state.setVisible);
const onCreate = async () => {
try {
- toast.loading("Saving JSON...", { id: "jsonSave" });
- const res = await saveJson({ data: getJson() });
+ toast.loading("Saving document...", { id: "fileSave" });
+ const res = await saveToCloud(null, getContents());
if (res.errors && res.errors.items.length > 0) throw res.errors;
- toast.success("JSON saved to cloud", { id: "jsonSave" });
+ toast.success("Document saved to cloud", { id: "fileSave" });
setHasChanges(false);
- replace({ query: { json: res.data._id } });
+ replace({ query: { doc: res.data._id } });
} catch (error: any) {
if (error?.items?.length > 0) {
- return toast.error(error.items[0].message, { id: "jsonSave", duration: 7000 });
+ return toast.error(error.items[0].message, { id: "fileSave", duration: 7000 });
}
- toast.error("Failed to save JSON!", { id: "jsonSave" });
+ toast.error("Failed to save document!", { id: "fileSave" });
}
};
if (!isPremium && reachedLimit)
return (
- <StyledJsonCard href="/pricing" create>
+ <StyledJsonCard onClick={() => setVisible("premium")(true)}>
<StyledCreateWrapper>
<IoRocketSharp size="18" />
- You reached max limit, upgrade to premium for more!
+ <Text fw="bold">You reached max limit, upgrade to premium for more!</Text>
</StyledCreateWrapper>
</StyledJsonCard>
);
@@ -197,8 +201,8 @@ const CreateCard: React.FC<{ reachedLimit: boolean }> = ({ reachedLimit }) => {
return (
<StyledJsonCard onClick={onCreate} create>
<StyledCreateWrapper>
- <AiOutlinePlus size="24" />
- Create New JSON
+ <AiOutlinePlus size="20" />
+ <Text fw="bold">Create New File</Text>
</StyledCreateWrapper>
</StyledJsonCard>
);
@@ -227,7 +231,7 @@ export const CloudModal: React.FC<ModalProps> = ({ opened, onClose }) => {
data={json}
key={json._id}
refetch={refetch}
- active={query.json === json._id}
+ active={query.doc === json._id}
/>
))}
</>
diff --git a/src/containers/Modals/JWTModal/index.tsx b/src/containers/Modals/JWTModal/index.tsx
new file mode 100644
index 00000000..f17e8098
--- /dev/null
+++ b/src/containers/Modals/JWTModal/index.tsx
@@ -0,0 +1,38 @@
+import React from "react";
+import { Stack, Modal, Button, ModalProps, Textarea } from "@mantine/core";
+import { decode } from "jsonwebtoken";
+import useFile from "src/store/useFile";
+
+export const JWTModal: React.FC<ModalProps> = ({ opened, onClose }) => {
+ const setContents = useFile(state => state.setContents);
+ const [token, setToken] = React.useState("");
+
+ const resolve = () => {
+ if (!token) return;
+ const json = decode(token);
+ setContents({ contents: JSON.stringify(json, null, 2) });
+ setToken("");
+ onClose();
+ };
+
+ return (
+ <Modal title="Decode JSON Web Token" opened={opened} onClose={onClose} centered>
+ <Stack py="sm">
+ <Textarea
+ placeholder="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikhlcm93YW5kIiwidXJsIjoiaHR0cHM6Ly9oZXJvd2FuZC5jb20iLCJpYXQiOjE1MTYyMzkwMjJ9.Tmm3Miq6KWCF_QRn3iERhhXThJzv4LQPKYwBhYUld88"
+ value={token}
+ onChange={e => setToken(e.target.value)}
+ fz="sm"
+ fw={700}
+ minRows={8}
+ data-autofocus
+ >
+ Share Link
+ </Textarea>
+ <Button onClick={resolve} fullWidth>
+ Resolve
+ </Button>
+ </Stack>
+ </Modal>
+ );
+};
diff --git a/src/containers/Modals/NodeModal/index.tsx b/src/containers/Modals/NodeModal/index.tsx
index e9d6b1a6..67872221 100644
--- a/src/containers/Modals/NodeModal/index.tsx
+++ b/src/containers/Modals/NodeModal/index.tsx
@@ -4,7 +4,16 @@ import { Prism } from "@mantine/prism";
import { FiExternalLink } from "react-icons/fi";
import { shallow } from "zustand/shallow";
import useGraph from "src/store/useGraph";
-import { dataToString } from "src/utils/dataToString";
+
+const dataToString = (data: any) => {
+ const text = Array.isArray(data) ? Object.fromEntries(data) : data;
+ const replacer = (_: string, v: string) => {
+ if (typeof v === "string") return v.replaceAll('"', "");
+ return v;
+ };
+
+ return JSON.stringify(text, replacer, 2);
+};
const CodeBlock: React.FC<{ children: any }> = ({ children }) => {
return (
diff --git a/src/containers/Modals/SchemaModal/index.tsx b/src/containers/Modals/SchemaModal/index.tsx
new file mode 100644
index 00000000..b81103c4
--- /dev/null
+++ b/src/containers/Modals/SchemaModal/index.tsx
@@ -0,0 +1,58 @@
+import React from "react";
+import { Stack, Modal, Button, ModalProps, Text } from "@mantine/core";
+import Editor from "@monaco-editor/react";
+import { toast } from "react-hot-toast";
+import useFile from "src/store/useFile";
+import useStored from "src/store/useStored";
+
+export const SchemaModal: React.FC<ModalProps> = ({ opened, onClose }) => {
+ const setJsonSchema = useFile(state => state.setJsonSchema);
+ const [schema, setSchema] = React.useState("");
+ const lightmode = useStored(state => (state.lightmode ? "light" : "vs-dark"));
+
+ const onApply = () => {
+ try {
+ const parsedSchema = JSON.parse(schema);
+ setJsonSchema(parsedSchema);
+ toast.success("Applied schema!");
+ onClose();
+ } catch (error) {
+ toast.error("Invalid Schema");
+ }
+ };
+
+ const onClear = () => {
+ setJsonSchema(null);
+ setSchema("");
+ toast("Disabled JSON Schema");
+ onClose();
+ };
+
+ return (
+ <Modal title="JSON Schema" opened={opened} onClose={onClose} centered>
+ <Stack py="sm">
+ <Text fz="sm">Any validation failures are shown at the bottom toolbar of pane.</Text>
+ <Editor
+ value={schema ?? ""}
+ theme={lightmode}
+ onChange={e => setSchema(e!)}
+ height={300}
+ language="json"
+ options={{
+ formatOnPaste: true,
+ formatOnType: true,
+ minimap: {
+ enabled: false,
+ },
+ }}
+ />
+ <Button onClick={onApply} disabled={!schema} fullWidth>
+ Apply
+ </Button>
+ <Button variant="outline" onClick={onClear} disabled={!schema} fullWidth>
+ Clear
+ </Button>
+ </Stack>
+ </Modal>
+ );
+};
diff --git a/src/containers/Modals/index.ts b/src/containers/Modals/index.ts
new file mode 100644
index 00000000..e7637860
--- /dev/null
+++ b/src/containers/Modals/index.ts
@@ -0,0 +1,28 @@
+export { CloudModal } from "./CloudModal";
+export { ClearModal } from "./ClearModal";
+export { DownloadModal } from "./DownloadModal";
+export { ImportModal } from "./ImportModal";
+export { AccountModal } from "./AccountModal";
+export { NodeModal } from "./NodeModal";
+export { SettingsModal } from "./SettingsModal";
+export { ShareModal } from "./ShareModal";
+export { LoginModal } from "./LoginModal";
+export { PremiumModal } from "./PremiumModal";
+export { JWTModal } from "./JWTModal";
+export { SchemaModal } from "./SchemaModal";
+
+type Modal =
+ | "clear"
+ | "cloud"
+ | "download"
+ | "import"
+ | "account"
+ | "node"
+ | "settings"
+ | "share"
+ | "login"
+ | "premium"
+ | "jwt"
+ | "schema";
+
+export type { Modal };
diff --git a/src/hooks/useFocusNode.tsx b/src/hooks/useFocusNode.tsx
index 9bbca0cb..9ca7e0d2 100644
--- a/src/hooks/useFocusNode.tsx
+++ b/src/hooks/useFocusNode.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { useDebouncedValue } from "@mantine/hooks";
import useGraph from "src/store/useGraph";
-import { searchQuery, cleanupHighlight, highlightMatchedNodes } from "src/utils/search";
+import { searchQuery, cleanupHighlight, highlightMatchedNodes } from "src/utils/graph/search";
export const useFocusNode = () => {
const zoomPanPinch = useGraph(state => state.zoomPanPinch);
diff --git a/src/layout/ModalController/index.tsx b/src/layout/ModalController/index.tsx
new file mode 100644
index 00000000..9988501f
--- /dev/null
+++ b/src/layout/ModalController/index.tsx
@@ -0,0 +1,51 @@
+import React from "react";
+import { ModalProps } from "@mantine/core";
+import {
+ AccountModal,
+ ClearModal,
+ DownloadModal,
+ ImportModal,
+ JWTModal,
+ LoginModal,
+ Modal,
+ NodeModal,
+ PremiumModal,
+ SchemaModal,
+ SettingsModal,
+ ShareModal,
+} from "src/containers/Modals";
+import { CloudModal } from "src/containers/Modals/CloudModal";
+import useModal from "src/store/useModal";
+
+type ModalComponent = { key: Modal; component: React.FC<ModalProps> };
+
+const modalComponents: ModalComponent[] = [
+ { key: "import", component: ImportModal },
+ { key: "clear", component: ClearModal },
+ { key: "download", component: DownloadModal },
+ { key: "settings", component: SettingsModal },
+ { key: "cloud", component: CloudModal },
+ { key: "account", component: AccountModal },
+ { key: "premium", component: PremiumModal },
+ { key: "login", component: LoginModal },
+ { key: "share", component: ShareModal },
+ { key: "jwt", component: JWTModal },
+ { key: "node", component: NodeModal },
+ { key: "schema", component: SchemaModal },
+];
+
+export const ModalController = () => {
+ const setVisible = useModal(state => state.setVisible);
+ const modalStates = useModal(state => modalComponents.map(modal => state[modal.key]));
+
+ return (
+ <>
+ {modalComponents.map(({ key, component }, index) => {
+ const ModalComponent = component;
+ const opened = modalStates[index];
+
+ return <ModalComponent key={key} opened={opened} onClose={() => setVisible(key)(false)} />;
+ })}
+ </>
+ );
+};
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index a987c19a..61a42fc9 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -9,7 +9,7 @@ import { Toaster } from "react-hot-toast";
import { GoogleAnalytics } from "src/components/GoogleAnalytics";
import GlobalStyle from "src/constants/globalStyle";
import { darkTheme, lightTheme } from "src/constants/theme";
-import { ModalController } from "src/containers/ModalController";
+import { ModalController } from "src/layout/ModalController";
import useStored from "src/store/useStored";
if (process.env.NODE_ENV !== "development") {
diff --git a/src/pages/editor.tsx b/src/pages/editor.tsx
index 6f02f683..048d648d 100644
--- a/src/pages/editor.tsx
+++ b/src/pages/editor.tsx
@@ -3,11 +3,13 @@ import Head from "next/head";
import { useRouter } from "next/router";
import styled from "styled-components";
import Cookie from "universal-cookie";
+import { defaultJson } from "src/constants/data";
import { BottomBar } from "src/containers/Editor/BottomBar";
import { Tools } from "src/containers/Editor/LiveEditor/Tools";
import Panes from "src/containers/Editor/Panes";
import { HerowandModal } from "src/containers/Modals/HerowandModal";
import { Loading } from "src/layout/Loading";
+import useFile from "src/store/useFile";
import useJson from "src/store/useJson";
import useUser from "src/store/useUser";
@@ -35,21 +37,25 @@ const EditorPage: React.FC = () => {
const { isReady, query } = useRouter();
const [showNews, setShowNews] = React.useState(false);
const checkSession = useUser(state => state.checkSession);
- const fetchJson = useJson(state => state.fetchJson);
const loading = useJson(state => state.loading);
+ const setContents = useFile(state => state.setContents);
+ const fetchFile = useFile(state => state.fetchFile);
+ const fetchUrl = useFile(state => state.fetchUrl);
React.useEffect(() => {
- // Fetch JSON by query
- // Check Session User
if (isReady) {
checkSession();
- fetchJson(query.json);
+ if (typeof query?.url === "string") fetchUrl(query.url);
+ if (typeof query?.json === "string") fetchFile(query.json);
+ if (!query?.url && !query?.json) {
+ setContents({ contents: defaultJson, hasChanges: false });
+ }
}
if (typeof newsCookie === "undefined") {
setShowNews(true);
} else setShowNews(false);
- }, [checkSession, fetchJson, isReady, query.json]);
+ }, [checkSession, fetchFile, fetchUrl, isReady, query.json, query.url, setContents]);
const closeNews = React.useCallback(() => {
setShowNews(false);
diff --git a/src/pages/widget.tsx b/src/pages/widget.tsx
index 17a4fed0..103f166e 100644
--- a/src/pages/widget.tsx
+++ b/src/pages/widget.tsx
@@ -1,46 +1,20 @@
import React from "react";
import dynamic from "next/dynamic";
import { useRouter } from "next/router";
-import styled, { ThemeProvider } from "styled-components";
+import { ThemeProvider } from "styled-components";
import toast from "react-hot-toast";
-import { baseURL } from "src/constants/data";
import { darkTheme, lightTheme } from "src/constants/theme";
+import { GraphCanvasType } from "src/containers/Editor/LiveEditor/GraphCanvas";
import { Tools } from "src/containers/Editor/LiveEditor/Tools";
-import { getPartnerStatus } from "src/services/db/widget";
+import useFile from "src/store/useFile";
import useGraph from "src/store/useGraph";
-import useJson from "src/store/useJson";
const GraphCanvas = dynamic(
() => import("src/containers/Editor/LiveEditor/GraphCanvas").then(c => c.GraphCanvas),
{
ssr: false,
}
-);
-
-const StyledAttribute = styled.a`
- position: fixed;
- bottom: 0;
- right: 0;
- color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
- background: ${({ theme }) => theme.SILVER_DARK};
- padding: 4px 8px;
- font-size: 14px;
- font-weight: 500;
- border-radius: 3px 0 0 0;
- opacity: 0.8;
-
- @media only screen and (max-width: 768px) {
- font-size: 12px;
- }
-`;
-
-function inIframe() {
- try {
- return window.self !== window.top;
- } catch (e) {
- return true;
- }
-}
+) as GraphCanvasType;
interface EmbedMessage {
data: {
@@ -52,22 +26,14 @@ interface EmbedMessage {
const WidgetPage = () => {
const { query, push, isReady } = useRouter();
const [theme, setTheme] = React.useState("dark");
- const [isPremium, setIsPremium] = React.useState(false);
- const fetchJson = useJson(state => state.fetchJson);
+ const fetchFile = useFile(state => state.fetchFile);
const setGraph = useGraph(state => state.setGraph);
React.useEffect(() => {
if (isReady) {
- if (query.partner === "true") {
- getPartnerStatus(window.location.ancestorOrigins[0]).then(
- r => r.data?.premium && setIsPremium(!!r.data.premium)
- );
- }
-
- fetchJson(query.json);
- if (!inIframe()) push("/");
+ if (typeof query?.json === "string") fetchFile(query.json);
}
- }, [fetchJson, isReady, push, query.json, query.partner]);
+ }, [fetchFile, isReady, push, query.json, query.partner]);
React.useEffect(() => {
const handler = (event: EmbedMessage) => {
@@ -92,11 +58,6 @@ const WidgetPage = () => {
<ThemeProvider theme={theme === "dark" ? darkTheme : lightTheme}>
<Tools isWidget />
<GraphCanvas isWidget />
- {!isPremium && (
- <StyledAttribute href={`${baseURL}/editor`} target="_blank" rel="noreferrer">
- jsoncrack.com
- </StyledAttribute>
- )}
</ThemeProvider>
);
};
diff --git a/src/services/db/json.tsx b/src/services/db/json.tsx
deleted file mode 100644
index 5c623e9a..00000000
--- a/src/services/db/json.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { compressToBase64 } from "lz-string";
-import { altogic, AltogicResponse } from "src/api/altogic";
-import { Json } from "src/typings/altogic";
-
-const saveJson = async ({
- id,
- data,
-}: {
- id?: string | null;
- data: string;
-}): Promise<AltogicResponse<{ _id: string }>> => {
- const compressedData = compressToBase64(data);
-
- if (id) {
- return await altogic.endpoint.put(`json/${id}`, {
- json: compressedData,
- });
- }
-
- return await altogic.endpoint.post("json", {
- json: compressedData,
- });
-};
-
-const getAllJson = async (): Promise<AltogicResponse<{ result: Json[] }>> =>
- await altogic.endpoint.get(`json`);
-
-const updateJson = async (id: string, data: object) =>
- await altogic.endpoint.put(`json/${id}`, {
- ...data,
- });
-
-const deleteJson = async (id: string) => await altogic.endpoint.delete(`json/${id}`);
-
-export { saveJson, getAllJson, updateJson, deleteJson };
diff --git a/src/services/json.ts b/src/services/json.ts
new file mode 100644
index 00000000..ee3b1ef4
--- /dev/null
+++ b/src/services/json.ts
@@ -0,0 +1,39 @@
+import dayjs from "dayjs";
+import { decompressFromBase64 } from "lz-string";
+import { altogic, AltogicResponse } from "src/api/altogic";
+import { File } from "src/store/useFile";
+
+const saveToCloud = async (
+ id: string | null,
+ contents: string
+): Promise<AltogicResponse<{ _id: string }>> => {
+ if (id) return await altogic.endpoint.put(`json/${id}`, { json: contents });
+ return await altogic.endpoint.post("json", { json: contents });
+};
+
+const getFromCloud = async (id: string) => {
+ const { data, errors } = await altogic.endpoint.get(`json/${id}`, undefined, {
+ userid: altogic.auth.getUser()?._id,
+ });
+
+ if (errors) throw errors;
+
+ const isCompressed = dayjs("2023-04-20T07:04:25.255Z").isAfter(data?.updatedAt);
+ if (isCompressed) {
+ return { ...data, json: decompressFromBase64(data.json) };
+ }
+
+ return data;
+};
+
+const getAllJson = async (): Promise<AltogicResponse<{ result: File[] }>> =>
+ await altogic.endpoint.get(`json`);
+
+const updateJson = async (id: string, data: object) =>
+ await altogic.endpoint.put(`json/${id}`, {
+ ...data,
+ });
+
+const deleteJson = async (id: string) => await altogic.endpoint.delete(`json/${id}`);
+
+export { saveToCloud, getFromCloud, getAllJson, updateJson, deleteJson };
diff --git a/src/services/db/widget.ts b/src/services/widget.ts
similarity index 100%
rename from src/services/db/widget.ts
rename to src/services/widget.ts
diff --git a/src/store/useFile.ts b/src/store/useFile.ts
new file mode 100644
index 00000000..a59c9405
--- /dev/null
+++ b/src/store/useFile.ts
@@ -0,0 +1,134 @@
+import debounce from "lodash.debounce";
+import { toast } from "react-hot-toast";
+import { create } from "zustand";
+import { defaultJson } from "src/constants/data";
+import { getFromCloud, saveToCloud } from "src/services/json";
+import useGraph from "./useGraph";
+import useJson from "./useJson";
+import useUser from "./useUser";
+
+type SetContents = {
+ contents?: string;
+ hasChanges?: boolean;
+ skipUpdate?: boolean;
+};
+
+interface JsonActions {
+ getContents: () => string;
+ getHasChanges: () => boolean;
+ setError: (error: object | null) => void;
+ setHasChanges: (hasChanges: boolean) => void;
+ setContents: (data: SetContents) => void;
+ saveToCloud: (isNew?: boolean) => void;
+ fetchFile: (fileId: string) => void;
+ fetchUrl: (url: string) => void;
+ clear: () => void;
+ setFile: (fileData: File) => void;
+ setJsonSchema: (jsonSchema: object | null) => void;
+}
+
+export type File = {
+ _id: string;
+ name: string;
+ json: string;
+ private: boolean;
+ createdAt: string;
+ updatedAt: string;
+};
+
+const initialStates = {
+ fileData: null as File | null,
+ contents: defaultJson,
+ error: null as any,
+ hasChanges: false,
+ jsonSchema: null as object | null,
+};
+
+export type FileStates = typeof initialStates;
+
+const debouncedUpdateJson = debounce(
+ (value: unknown) => useJson.getState().setJson(JSON.stringify(value, null, 2)),
+ 800
+);
+
+const useFile = create<FileStates & JsonActions>()((set, get) => ({
+ ...initialStates,
+ clear: () => {
+ set({ contents: "" });
+ useJson.getState().clear();
+ },
+ setJsonSchema: jsonSchema => {
+ if (useUser.getState().isPremium()) set({ jsonSchema });
+ },
+ setFile: fileData => {
+ set({ fileData });
+ get().setContents({ contents: fileData.json, hasChanges: false });
+ },
+ getContents: () => get().contents,
+ getHasChanges: () => get().hasChanges,
+ setContents: async ({ contents, hasChanges = true }) => {
+ try {
+ set({ ...(contents && { contents }), error: null, hasChanges });
+ debouncedUpdateJson(contents);
+ } catch (error: any) {
+ if (error?.mark?.snippet) return set({ error: error.mark.snippet });
+ if (error?.message) set({ error: error.message });
+ }
+ },
+ setError: error => set({ error }),
+ setHasChanges: hasChanges => set({ hasChanges }),
+ saveToCloud: async (isNew = true) => {
+ try {
+ const url = new URL(window.location.href);
+ const params = new URLSearchParams(url.search);
+ const jsonQuery = params.get("doc");
+
+ toast.loading("Saving File...", { id: "fileSave" });
+ const res = await saveToCloud(isNew ? null : jsonQuery, get().contents);
+
+ if (res.errors && res.errors.items.length > 0) throw res.errors;
+
+ toast.success("File saved to cloud", { id: "fileSave" });
+ set({ hasChanges: false });
+ return res.data._id;
+ } catch (error: any) {
+ if (error?.items?.length > 0) {
+ toast.error(error.items[0].message, { id: "fileSave", duration: 5000 });
+ return undefined;
+ }
+
+ toast.error("Failed to save File!", { id: "fileSave" });
+ return undefined;
+ }
+ },
+ fetchUrl: async url => {
+ const isURL = new RegExp(
+ /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/
+ );
+
+ if (isURL.test(url)) {
+ try {
+ const res = await fetch(url);
+ const json = await res.json();
+ const jsonStr = JSON.stringify(json, null, 2);
+
+ useGraph.getState().setGraph(jsonStr);
+ return useJson.setState({ json: jsonStr, loading: false });
+ } catch (error) {
+ get().clear();
+ toast.error("Failed to fetch document from URL!");
+ }
+ }
+ },
+ fetchFile: async id => {
+ try {
+ const file = await getFromCloud(id);
+ get().setFile(file);
+ } catch (error) {
+ useJson.setState({ loading: false });
+ console.error(error);
+ }
+ },
+}));
+
+export default useFile;
diff --git a/src/store/useGraph.tsx b/src/store/useGraph.tsx
index b8d40201..7e12c283 100644
--- a/src/store/useGraph.tsx
+++ b/src/store/useGraph.tsx
@@ -1,13 +1,13 @@
import { ReactZoomPanPinchRef } from "react-zoom-pan-pinch";
import { CanvasDirection } from "reaflow/dist/layout/elkLayout";
import { create } from "zustand";
-import { parser } from "src/utils/core/jsonParser";
-import { getChildrenEdges } from "src/utils/getChildrenEdges";
-import { getOutgoers } from "src/utils/getOutgoers";
+import { getChildrenEdges } from "src/utils/graph/getChildrenEdges";
+import { getOutgoers } from "src/utils/graph/getOutgoers";
+import { parser } from "src/utils/json/jsonParser";
import useJson from "./useJson";
const initialStates = {
- zoomPanPinch: undefined as ReactZoomPanPinchRef | undefined,
+ zoomPanPinch: null as ReactZoomPanPinchRef | null,
direction: "RIGHT" as CanvasDirection,
loading: true,
graphCollapsed: false,
@@ -29,24 +29,25 @@ interface GraphActions {
setLoading: (loading: boolean) => void;
setDirection: (direction: CanvasDirection) => void;
setZoomPanPinch: (ref: ReactZoomPanPinchRef) => void;
+ setSelectedNode: (nodeData: NodeData) => void;
expandNodes: (nodeId: string) => void;
+ expandGraph: () => void;
collapseNodes: (nodeId: string) => void;
collapseGraph: () => void;
- expandGraph: () => void;
toggleFold: (value: boolean) => void;
toggleFullscreen: (value: boolean) => void;
zoomIn: () => void;
zoomOut: () => void;
centerView: () => void;
- setSelectedNode: ({ nodeData }: { nodeData: NodeData }) => void;
+ clearGraph: () => void;
}
const useGraph = create<Graph & GraphActions>((set, get) => ({
...initialStates,
- setSelectedNode: ({ nodeData }) => set({ selectedNode: nodeData }),
+ clearGraph: () => set({ nodes: [], edges: [] }),
+ setSelectedNode: nodeData => set({ selectedNode: nodeData }),
setGraph: (data, options) => {
const { nodes, edges } = parser(data ?? useJson.getState().json);
-
set({
nodes,
edges,
@@ -58,7 +59,10 @@ const useGraph = create<Graph & GraphActions>((set, get) => ({
...options,
});
},
- setDirection: direction => set({ direction }),
+ setDirection: direction => {
+ set({ direction });
+ setTimeout(() => get().centerView(), 200);
+ },
setLoading: loading => set({ loading }),
expandNodes: nodeId => {
const [childrenNodes, matchingNodes] = getOutgoers(
@@ -124,6 +128,10 @@ const useGraph = create<Graph & GraphActions>((set, get) => ({
)
.map(node => node.id);
+ // const closestParentToRoot = Math.min(...collapsedParents.map(n => +n));
+ // const focusNodeId = `g[id*='node-${closestParentToRoot}']`;
+ // const rootNode = document.querySelector(focusNodeId);
+
set({
collapsedParents,
collapsedNodes,
@@ -141,26 +149,21 @@ const useGraph = create<Graph & GraphActions>((set, get) => ({
graphCollapsed: false,
});
},
-
zoomIn: () => {
const zoomPanPinch = get().zoomPanPinch;
- if (zoomPanPinch) {
- zoomPanPinch.setTransform(
- zoomPanPinch?.state.positionX,
- zoomPanPinch?.state.positionY,
- zoomPanPinch?.state.scale + 0.4
- );
- }
+ zoomPanPinch?.setTransform(
+ zoomPanPinch?.state.positionX,
+ zoomPanPinch?.state.positionY,
+ zoomPanPinch?.state.scale + 0.4
+ );
},
zoomOut: () => {
const zoomPanPinch = get().zoomPanPinch;
- if (zoomPanPinch) {
- zoomPanPinch.setTransform(
- zoomPanPinch?.state.positionX,
- zoomPanPinch?.state.positionY,
- zoomPanPinch?.state.scale - 0.4
- );
- }
+ zoomPanPinch?.setTransform(
+ zoomPanPinch?.state.positionX,
+ zoomPanPinch?.state.positionY,
+ zoomPanPinch?.state.scale - 0.4
+ );
},
centerView: () => {
const zoomPanPinch = get().zoomPanPinch;
diff --git a/src/store/useJson.tsx b/src/store/useJson.tsx
index 1d340fc4..2601921d 100644
--- a/src/store/useJson.tsx
+++ b/src/store/useJson.tsx
@@ -1,118 +1,30 @@
-import { decompressFromBase64 } from "lz-string";
-import toast from "react-hot-toast";
import { create } from "zustand";
-import { altogic } from "src/api/altogic";
-import { defaultJson } from "src/constants/data";
-import { saveJson as saveJsonDB } from "src/services/db/json";
import useGraph from "src/store/useGraph";
-import { Json } from "src/typings/altogic";
interface JsonActions {
setJson: (json: string) => void;
getJson: () => string;
- getHasChanges: () => boolean;
- fetchJson: (jsonId: string | string[] | undefined) => void;
- setError: (hasError: boolean) => void;
- setHasChanges: (hasChanges: boolean) => void;
- saveJson: (isNew?: boolean) => Promise<string | undefined>;
+ clear: () => void;
}
const initialStates = {
- data: null as Json | null,
json: "",
loading: true,
- hasChanges: false,
- hasError: false,
};
-function inIframe() {
- try {
- return window.self !== window.top;
- } catch (e) {
- return true;
- }
-}
-
export type JsonStates = typeof initialStates;
const useJson = create<JsonStates & JsonActions>()((set, get) => ({
...initialStates,
getJson: () => get().json,
- getHasChanges: () => get().hasChanges,
- fetchJson: async jsonId => {
- const isURL = new RegExp(
- /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/
- );
-
- if (typeof jsonId === "string" && isURL.test(jsonId)) {
- try {
- const res = await fetch(jsonId);
- const json = await res.json();
- const jsonStr = JSON.stringify(json, null, 2);
-
- useGraph.getState().setGraph(jsonStr);
- return set({ json: jsonStr, loading: false });
- } catch (error) {
- useGraph.getState().setGraph(defaultJson);
- set({ json: defaultJson, loading: false });
- toast.error("Failed to fetch JSON from URL!");
- }
- } else if (jsonId) {
- const { data, errors } = await altogic.endpoint.get(`json/${jsonId}`, undefined, {
- userid: altogic.auth.getUser()?._id,
- });
-
- if (!errors) {
- const decompressedData = decompressFromBase64(data.json);
- if (decompressedData) {
- useGraph.getState().setGraph(decompressedData);
- return set({
- data,
- json: decompressedData ?? undefined,
- loading: false,
- });
- }
- }
- }
-
- if (inIframe()) {
- useGraph.getState().setGraph("[]");
- return set({ json: "[]", loading: false });
- } else {
- useGraph.getState().setGraph(defaultJson);
- set({ json: defaultJson, loading: false });
- }
- },
setJson: json => {
- useGraph.getState().setGraph(json);
- set({ json, hasChanges: true });
+ set({ json, loading: false });
+ useGraph.getState().setGraph(JSON.parse(json));
},
- saveJson: async (isNew = true) => {
- try {
- const url = new URL(window.location.href);
- const params = new URLSearchParams(url.search);
- const jsonQuery = params.get("json");
-
- toast.loading("Saving JSON...", { id: "jsonSave" });
- const res = await saveJsonDB({ id: isNew ? undefined : jsonQuery, data: get().json });
-
- if (res.errors && res.errors.items.length > 0) throw res.errors;
-
- toast.success("JSON saved to cloud", { id: "jsonSave" });
- set({ hasChanges: false });
- return res.data._id;
- } catch (error: any) {
- if (error?.items?.length > 0) {
- toast.error(error.items[0].message, { id: "jsonSave", duration: 5000 });
- return undefined;
- }
-
- toast.error("Failed to save JSON!", { id: "jsonSave" });
- return undefined;
- }
+ clear: () => {
+ set({ json: "", loading: false });
+ useGraph.getState().clearGraph();
},
- setError: hasError => set({ hasError }),
- setHasChanges: (hasChanges: boolean) => set({ hasChanges }),
}));
export default useJson;
diff --git a/src/store/useModal.tsx b/src/store/useModal.tsx
index 9bbe4ba1..7eb234e6 100644
--- a/src/store/useModal.tsx
+++ b/src/store/useModal.tsx
@@ -1,15 +1,19 @@
import { create } from "zustand";
+import { Modal } from "src/containers/Modals";
import useUser from "./useUser";
+type ModalState = {
+ [key in Modal]: boolean;
+};
+
interface ModalActions {
- setVisible: (modal: keyof typeof initialStates) => (visible: boolean) => void;
+ setVisible: (modal: Modal) => (visible: boolean) => void;
}
-const initialStates = {
+const initialStates: ModalState = {
clear: false,
cloud: false,
download: false,
- goals: false,
import: false,
account: false,
node: false,
@@ -17,20 +21,22 @@ const initialStates = {
share: false,
login: false,
premium: false,
- herowand: false,
+ jwt: false,
+ schema: false,
};
-type ModalType = keyof typeof initialStates;
-
-const authModals: ModalType[] = ["cloud", "share", "account"];
+const authModals: Modal[] = ["cloud", "share", "account", "schema"];
+const premiumModals: Modal[] = ["schema"];
-export type ModalStates = typeof initialStates;
-
-const useModal = create<ModalStates & ModalActions>()(set => ({
+const useModal = create<ModalState & ModalActions>()(set => ({
...initialStates,
setVisible: modal => visible => {
- if (authModals.includes(modal) && !useUser.getState().isAuthenticated) {
+ const user = useUser.getState();
+
+ if (authModals.includes(modal) && !user.isAuthenticated) {
return set({ login: true });
+ } else if (premiumModals.includes(modal) && !user.isPremium()) {
+ return set({ premium: true });
}
set({ [modal]: visible });
diff --git a/src/utils/core/addEdgeToGraph.ts b/src/utils/core/addEdgeToGraph.ts
index c1d8d509..edbb9ff6 100644
--- a/src/utils/core/addEdgeToGraph.ts
+++ b/src/utils/core/addEdgeToGraph.ts
@@ -1,4 +1,4 @@
-import { Graph } from "./jsonParser";
+import { Graph } from "../json/jsonParser";
export const addEdgeToGraph = (graph: Graph, from: string, to: string) => {
graph.edges = graph.edges.concat([
diff --git a/src/utils/core/addNodeToGraph.ts b/src/utils/core/addNodeToGraph.ts
index 52bf6fae..f9ab73ff 100644
--- a/src/utils/core/addNodeToGraph.ts
+++ b/src/utils/core/addNodeToGraph.ts
@@ -1,5 +1,5 @@
+import { Graph } from "../json/jsonParser";
import { calculateNodeSize } from "./calculateNodeSize";
-import { Graph } from "./jsonParser";
type Props = {
graph: Graph;
diff --git a/src/utils/core/calculateNodeSize.ts b/src/utils/core/calculateNodeSize.ts
index 3b4d7b06..c7f55fc2 100644
--- a/src/utils/core/calculateNodeSize.ts
+++ b/src/utils/core/calculateNodeSize.ts
@@ -1,51 +1,68 @@
+import { Fira_Mono } from "next/font/google";
import useGraph from "src/store/useGraph";
import useStored from "src/store/useStored";
+const firaMono = Fira_Mono({
+ weight: ["500"],
+ subsets: ["latin"],
+});
+
+export const isContentImage = (value: string | [string, string][]) => {
+ if (typeof value !== "string") return false;
+
+ const isURL = /(https?:\/\/.*\.(?:png|jpg|gif))/i.test(value);
+ const isBase64 = value.startsWith("data:image/") && value.includes("base64");
+ return isURL || isBase64;
+};
+
+const sizeCache = new Map<string | [string, string][], { width: number; height: number }>();
+
+function calculateWidthAndHeight(str: string, single = false) {
+ const dummyElement = document.createElement("div");
+ dummyElement.style.whiteSpace = single ? "nowrap" : "pre-wrap";
+ dummyElement.innerHTML = str;
+ dummyElement.style.fontSize = "12px";
+ dummyElement.style.width = "fit-content";
+ dummyElement.style.height = "fit-content";
+ dummyElement.style.padding = "10px";
+ dummyElement.style.fontWeight = "500";
+ dummyElement.style.overflowWrap = "break-word";
+ dummyElement.style.fontFamily = firaMono.style.fontFamily;
+ document.body.appendChild(dummyElement);
+
+ const width = dummyElement.offsetWidth + 4;
+ const height = dummyElement.offsetHeight;
+ document.body.removeChild(dummyElement);
+
+ return { width, height };
+}
+
export const calculateNodeSize = (text: string | [string, string][], isParent = false) => {
- // Get the current state of the application
+ let lines = "";
const isFolded = useGraph.getState().foldNodes;
const isImagePreview = useStored.getState().imagePreview;
+ const isImage = isContentImage(text) && isImagePreview;
+ const cacheKey = [text, isParent, isFolded].toString();
- // Initialize variables
- let lineCounts = 1;
- let lineLengths: number[] = [];
+ // check cache
+ if (sizeCache.has(cacheKey)) {
+ const size = sizeCache.get(cacheKey);
+ if (size) return size;
+ }
- // Calculate the number of lines and the length of each line
- if (typeof text === "string") {
- lineLengths.push(text.length);
+ if (typeof text !== "string") {
+ lines = text.map(([k, v]) => `${k}: ${JSON.stringify(v).slice(0, 80)}`).join("\n");
} else {
- lineCounts = text.map(([k, v]) => {
- const length = `${k}: ${v}`.length;
- const line = length > 150 ? 150 : length;
- lineLengths.push(line);
- return `${k}: ${v}`;
- }).length;
+ lines = text;
}
- // Get the longest line
- const longestLine = Math.max(...lineLengths);
-
- // Calculate the width of the node
- const getWidth = () => {
- if (text.length === 0) return 35;
- if (Array.isArray(text) && !text.length) return 40;
- if (!isFolded) return 35 + longestLine * 7.8 + (isParent ? 80 : 0);
- if (isParent && isFolded) return 170;
- return 200;
- };
-
- // Calculate the height of the node
- const getHeight = () => {
- if (lineCounts * 17.8 < 30) return 40;
- return (lineCounts + 1) * 18;
- };
-
- // Check if text matches URL pattern
- const isImage =
- !Array.isArray(text) && /(https?:\/\/.*\.(?:png|jpg|gif))/i.test(text) && isImagePreview;
-
- return {
- width: isImage ? 80 : getWidth(),
- height: isImage ? 80 : getHeight(),
- };
+ let sizes = calculateWidthAndHeight(lines, typeof text === "string");
+ if (isImage) sizes = { width: 80, height: 80 };
+ if (isFolded) sizes.width = 300;
+ if (isParent && isFolded) sizes.width = 170;
+ if (isParent) sizes.width += 100;
+ if (sizes.width > 700) sizes.width = 700;
+
+ sizeCache.set(cacheKey, sizes);
+ return sizes;
};
diff --git a/src/utils/core/jsonParser.ts b/src/utils/core/jsonParser.ts
deleted file mode 100644
index f14abd85..00000000
--- a/src/utils/core/jsonParser.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import { parseTree } from "jsonc-parser";
-import { getNodePath } from "../getNodePath";
-import { addEdgeToGraph } from "./addEdgeToGraph";
-import { addNodeToGraph } from "./addNodeToGraph";
-import { traverse } from "./traverse";
-
-export type Graph = {
- nodes: NodeData[];
- edges: EdgeData[];
-};
-
-export type States = {
- parentName: string;
- bracketOpen: { id: string; type: string }[];
- objectsFromArray: number[];
- objectsFromArrayId: number;
- notHaveParent: string[];
- brothersNode: [string, string][];
- brothersParentId: string | undefined;
- brotherKey: string;
- brothersNodeProps: {
- id: string;
- parentId: string | undefined;
- objectsFromArrayId: number | undefined;
- }[];
- graph: {
- nodes: NodeData[];
- edges: EdgeData[];
- };
-};
-
-export const parser = (jsonStr: string) => {
- try {
- let json = parseTree(jsonStr);
- if (!json) throw "Invalid JSON"!;
-
- const states: States = {
- parentName: "",
- bracketOpen: [],
- objectsFromArray: [],
- objectsFromArrayId: 0,
- notHaveParent: [],
- brothersNode: [],
- brothersParentId: undefined,
- brotherKey: "",
- brothersNodeProps: [],
- graph: {
- nodes: [],
- edges: [],
- },
- };
-
- traverse(states, json);
-
- if (states.notHaveParent.length > 1) {
- if (json.type !== "array") {
- const emptyId = addNodeToGraph({ graph: states.graph, text: "", isEmpty: true });
- states.notHaveParent.forEach(children => {
- addEdgeToGraph(states.graph, emptyId, children);
- });
- }
- }
-
- if (states.graph.nodes.length === 0) {
- if (json.type === "array") addNodeToGraph({ graph: states.graph, text: "[]" });
- else addNodeToGraph({ graph: states.graph, text: "{}" });
- }
-
- states.graph.nodes = states.graph.nodes.map(node => ({
- ...node,
- path: getNodePath(states.graph.nodes, states.graph.edges, node.id),
- }));
-
- return states.graph;
- } catch (error) {
- console.error(error);
- return {
- nodes: [],
- edges: [],
- };
- }
-};
diff --git a/src/utils/core/traverse.ts b/src/utils/core/traverse.ts
index 8b4e35be..9ca409b6 100644
--- a/src/utils/core/traverse.ts
+++ b/src/utils/core/traverse.ts
@@ -1,219 +1,251 @@
import { Node, NodeType } from "jsonc-parser";
+import { Graph, States } from "../json/jsonParser";
import { addEdgeToGraph } from "./addEdgeToGraph";
import { addNodeToGraph } from "./addNodeToGraph";
import { calculateNodeSize } from "./calculateNodeSize";
-import { States } from "./jsonParser";
-const isPrimitiveOrNullType = (type?: NodeType) => {
- return type === "boolean" || type === "string" || type === "number" || type === "null";
+type PrimitiveOrNullType = "boolean" | "string" | "number" | "null";
+
+const isPrimitiveOrNullType = (type: unknown): type is PrimitiveOrNullType => {
+ return ["boolean", "string", "number", "null"].includes(type as string);
};
-const alignChildren = (a: Node, b: Node) => {
- if (
- isPrimitiveOrNullType(a?.children?.[1]?.type) &&
- !isPrimitiveOrNullType(b?.children?.[1]?.type)
- ) {
+const alignChildren = (nodeA: Node, nodeB: Node): number => {
+ const aChildType = nodeA?.children?.[1]?.type;
+ const bChildType = nodeB?.children?.[1]?.type;
+
+ if (isPrimitiveOrNullType(aChildType) && !isPrimitiveOrNullType(bChildType)) {
return -1;
}
+
return 0;
};
-export const traverse = (
+function handleNoChildren(
+ value: any,
states: States,
- objectToTraverse: Node,
- parentType?: string,
+ graph: Graph,
myParentId?: string,
+ parentType?: string,
nextType?: string
-) => {
- const graph = states.graph;
- let { type, children, value } = objectToTraverse;
-
- if (!children) {
- if (value !== undefined) {
- if (parentType === "property" && nextType !== "object" && nextType !== "array") {
- states.brothersParentId = myParentId;
- if (nextType === undefined) {
- // add key and value to brothers node
- states.brothersNode = [...states.brothersNode, [states.brotherKey, value]];
- } else {
- states.brotherKey = value;
- }
- } else if (parentType === "array") {
- const nodeFromArrayId = addNodeToGraph({ graph, text: String(value) });
- if (myParentId) {
- addEdgeToGraph(graph, myParentId, nodeFromArrayId);
- }
+) {
+ if (value !== undefined) {
+ if (parentType === "property" && nextType !== "object" && nextType !== "array") {
+ states.brothersParentId = myParentId;
+ if (nextType === undefined) {
+ states.brothersNode = [...states.brothersNode, [states.brotherKey, value]];
+ } else {
+ states.brotherKey = value;
}
- if (nextType && parentType !== "array") {
- if (nextType === "object" || nextType === "array") {
- states.parentName = value;
- }
+ } else if (parentType === "array") {
+ const nodeFromArrayId = addNodeToGraph({ graph, text: String(value) });
+ if (myParentId) {
+ addEdgeToGraph(graph, myParentId, nodeFromArrayId);
}
}
- } else if (children) {
- let parentId: string | undefined;
-
- if (type !== "property" && states.parentName !== "") {
- // add last brothers node and add parent node
-
- if (states.brothersNode.length > 0) {
- // add or concat brothers node of same parent
- let findBrothersNode = states.brothersNodeProps.find(
- e =>
- e.parentId === states.brothersParentId &&
- e.objectsFromArrayId === states.objectsFromArray[states.objectsFromArray.length - 1]
- );
- if (findBrothersNode) {
- let ModifyNodes = [...graph.nodes];
- let findNode = graph.nodes.findIndex(e => e.id === findBrothersNode?.id);
-
- if (ModifyNodes[findNode]) {
- ModifyNodes[findNode].text = ModifyNodes[findNode].text.concat(states.brothersNode);
- const { width, height } = calculateNodeSize(ModifyNodes[findNode].text, false);
- ModifyNodes[findNode].width = width;
- ModifyNodes[findNode].height = height;
- graph.nodes = [...ModifyNodes];
- states.brothersNode = [];
- }
- } else {
- const brothersNodeId = addNodeToGraph({ graph, text: states.brothersNode });
- states.brothersNode = [];
-
- if (states.brothersParentId) {
- addEdgeToGraph(graph, states.brothersParentId, brothersNodeId);
- } else {
- states.notHaveParent = [...states.notHaveParent, brothersNodeId];
- }
-
- states.brothersNodeProps = [
- ...states.brothersNodeProps,
- {
- id: brothersNodeId,
- parentId: states.brothersParentId,
- objectsFromArrayId: states.objectsFromArray[states.objectsFromArray.length - 1],
- },
- ];
- }
+ if (nextType && parentType !== "array") {
+ if (nextType === "object" || nextType === "array") {
+ states.parentName = value;
}
+ }
+ }
+}
- // add parent node
- parentId = addNodeToGraph({ graph, type, text: states.parentName });
- states.bracketOpen = [...states.bracketOpen, { id: parentId, type }];
- states.parentName = "";
+function handleHasChildren(
+ type: NodeType,
+ states: States,
+ graph: Graph,
+ children: Node[],
+ myParentId?: string,
+ parentType?: string
+) {
+ let parentId: string | undefined;
+
+ if (type !== "property" && states.parentName !== "") {
+ // add last brothers node and add parent node
- // add edges from parent node
- let brothersProps = states.brothersNodeProps.filter(
+ if (states.brothersNode.length > 0) {
+ // add or concat brothers node of same parent
+ let findBrothersNode = states.brothersNodeProps.find(
e =>
- e.parentId === myParentId &&
+ e.parentId === states.brothersParentId &&
e.objectsFromArrayId === states.objectsFromArray[states.objectsFromArray.length - 1]
);
- if (
- (brothersProps.length > 0 &&
- states.bracketOpen[states.bracketOpen.length - 2] &&
- states.bracketOpen[states.bracketOpen.length - 2].type !== "object") ||
- (brothersProps.length > 0 && states.bracketOpen.length === 1)
- ) {
- addEdgeToGraph(graph, brothersProps[brothersProps.length - 1].id, parentId);
- } else if (myParentId) {
- addEdgeToGraph(graph, myParentId, parentId);
+ if (findBrothersNode) {
+ let ModifyNodes = [...graph.nodes];
+ let findNode = graph.nodes.findIndex(e => e.id === findBrothersNode?.id);
+
+ if (ModifyNodes[findNode]) {
+ ModifyNodes[findNode].text = ModifyNodes[findNode].text.concat(states.brothersNode);
+ const { width, height } = calculateNodeSize(ModifyNodes[findNode].text, false);
+ ModifyNodes[findNode].width = width;
+ ModifyNodes[findNode].height = height;
+ graph.nodes = [...ModifyNodes];
+ states.brothersNode = [];
+ }
} else {
- states.notHaveParent = [...states.notHaveParent, parentId];
- }
- } else if (parentType === "array") {
- states.objectsFromArray = [...states.objectsFromArray, states.objectsFromArrayId++];
- }
- (type === "object" ? children.sort(alignChildren) : children).forEach(
- (branch, index, array) => {
- if (array[index + 1]) {
- traverse(
- states,
- branch,
- type,
- states.bracketOpen[states.bracketOpen.length - 1]
- ? states.bracketOpen[states.bracketOpen.length - 1].id
- : undefined,
- array[index + 1].type
- );
+ const brothersNodeId = addNodeToGraph({ graph, text: states.brothersNode });
+ states.brothersNode = [];
+
+ if (states.brothersParentId) {
+ addEdgeToGraph(graph, states.brothersParentId, brothersNodeId);
} else {
- traverse(
- states,
- branch,
- type,
- states.bracketOpen[states.bracketOpen.length - 1]
- ? states.bracketOpen[states.bracketOpen.length - 1].id
- : undefined
- );
+ states.notHaveParent = [...states.notHaveParent, brothersNodeId];
}
+
+ states.brothersNodeProps = [
+ ...states.brothersNodeProps,
+ {
+ id: brothersNodeId,
+ parentId: states.brothersParentId,
+ objectsFromArrayId: states.objectsFromArray[states.objectsFromArray.length - 1],
+ },
+ ];
}
+ }
+
+ // add parent node
+ parentId = addNodeToGraph({ graph, type, text: states.parentName });
+ states.bracketOpen = [...states.bracketOpen, { id: parentId, type }];
+ states.parentName = "";
+
+ // add edges from parent node
+ let brothersProps = states.brothersNodeProps.filter(
+ e =>
+ e.parentId === myParentId &&
+ e.objectsFromArrayId === states.objectsFromArray[states.objectsFromArray.length - 1]
);
+ if (
+ (brothersProps.length > 0 &&
+ states.bracketOpen[states.bracketOpen.length - 2] &&
+ states.bracketOpen[states.bracketOpen.length - 2].type !== "object") ||
+ (brothersProps.length > 0 && states.bracketOpen.length === 1)
+ ) {
+ addEdgeToGraph(graph, brothersProps[brothersProps.length - 1].id, parentId);
+ } else if (myParentId) {
+ addEdgeToGraph(graph, myParentId, parentId);
+ } else {
+ states.notHaveParent = [...states.notHaveParent, parentId];
+ }
+ } else if (parentType === "array") {
+ states.objectsFromArray = [...states.objectsFromArray, states.objectsFromArrayId++];
+ }
+ (type === "object" ? children.sort(alignChildren) : children).forEach(
+ (objectToTraverse, index, array) => {
+ if (array[index + 1]) {
+ traverse({
+ states,
+ objectToTraverse,
+ parentType: type,
+ myParentId: states.bracketOpen[states.bracketOpen.length - 1]
+ ? states.bracketOpen[states.bracketOpen.length - 1].id
+ : undefined,
+ nextType: array[index + 1].type,
+ });
+ } else {
+ traverse({
+ states,
+ objectToTraverse,
+ parentType: type,
+ myParentId: states.bracketOpen[states.bracketOpen.length - 1]
+ ? states.bracketOpen[states.bracketOpen.length - 1].id
+ : undefined,
+ nextType: undefined,
+ });
+ }
+ }
+ );
- if (type !== "property") {
- // when children end
- // add or concat brothers node when it is the last parent node
- if (states.brothersNode.length > 0) {
- let findBrothersNode = states.brothersNodeProps.find(
- e =>
- e.parentId === states.brothersParentId &&
- e.objectsFromArrayId === states.objectsFromArray[states.objectsFromArray.length - 1]
- );
- if (findBrothersNode) {
- let ModifyNodes = [...graph.nodes];
- let findNode = graph.nodes.findIndex(e => e.id === findBrothersNode?.id);
-
- if (ModifyNodes[findNode]) {
- ModifyNodes[findNode].text = ModifyNodes[findNode].text.concat(states.brothersNode);
- const { width, height } = calculateNodeSize(ModifyNodes[findNode].text, false);
- ModifyNodes[findNode].width = width;
- ModifyNodes[findNode].height = height;
- graph.nodes = [...ModifyNodes];
- states.brothersNode = [];
- }
- } else {
- const brothersNodeId = addNodeToGraph({ graph, text: states.brothersNode });
+ if (type !== "property") {
+ // when children end
+ // add or concat brothers node when it is the last parent node
+ if (states.brothersNode.length > 0) {
+ let findBrothersNode = states.brothersNodeProps.find(
+ e =>
+ e.parentId === states.brothersParentId &&
+ e.objectsFromArrayId === states.objectsFromArray[states.objectsFromArray.length - 1]
+ );
+ if (findBrothersNode) {
+ let ModifyNodes = [...graph.nodes];
+ let findNode = graph.nodes.findIndex(e => e.id === findBrothersNode?.id);
+
+ if (ModifyNodes[findNode]) {
+ ModifyNodes[findNode].text = ModifyNodes[findNode].text.concat(states.brothersNode);
+ const { width, height } = calculateNodeSize(ModifyNodes[findNode].text, false);
+ ModifyNodes[findNode].width = width;
+ ModifyNodes[findNode].height = height;
+ graph.nodes = [...ModifyNodes];
states.brothersNode = [];
+ }
+ } else {
+ const brothersNodeId = addNodeToGraph({ graph, text: states.brothersNode });
+ states.brothersNode = [];
- if (states.brothersParentId) {
- addEdgeToGraph(graph, states.brothersParentId, brothersNodeId);
- } else {
- states.notHaveParent = [...states.notHaveParent, brothersNodeId];
- }
-
- states.brothersNodeProps = [
- ...states.brothersNodeProps,
- {
- id: brothersNodeId,
- parentId: states.brothersParentId,
- objectsFromArrayId: states.objectsFromArray[states.objectsFromArray.length - 1],
- },
- ];
+ if (states.brothersParentId) {
+ addEdgeToGraph(graph, states.brothersParentId, brothersNodeId);
+ } else {
+ states.notHaveParent = [...states.notHaveParent, brothersNodeId];
}
+
+ states.brothersNodeProps = [
+ ...states.brothersNodeProps,
+ {
+ id: brothersNodeId,
+ parentId: states.brothersParentId,
+ objectsFromArrayId: states.objectsFromArray[states.objectsFromArray.length - 1],
+ },
+ ];
}
+ }
- // close brackets
- if (parentType !== "array") {
- if (states.bracketOpen.length > 0) {
- let newBracketOpen = [...states.bracketOpen];
- newBracketOpen.splice(newBracketOpen.length - 1);
- states.bracketOpen = [...newBracketOpen];
- }
- } else if (parentType === "array") {
- if (states.objectsFromArray.length > 0) {
- let newobjectsFromArray = [...states.objectsFromArray];
- newobjectsFromArray.splice(newobjectsFromArray.length - 1);
- states.objectsFromArray = [...newobjectsFromArray];
- }
+ // close brackets
+ if (parentType === "array") {
+ if (states.objectsFromArray.length > 0) {
+ states.objectsFromArray.pop();
}
+ } else {
+ if (states.bracketOpen.length > 0) {
+ states.bracketOpen.pop();
+ }
+ }
- if (parentId) {
- let myChildrens = graph.edges.filter(e => e.from === parentId);
- let myIndex = graph.nodes.findIndex(e => e.id === parentId);
+ if (parentId) {
+ const myChildren = graph.edges.filter(edge => edge.from === parentId);
+ const myIndex = graph.nodes.findIndex(node => node.id === parentId);
- let ModifyNodes = [...graph.nodes];
- if (ModifyNodes[myIndex]) {
- ModifyNodes[myIndex].data.childrenCount = myChildrens.length;
- graph.nodes = [...ModifyNodes];
+ const modifiedNodes = graph.nodes.map((node, index) => {
+ if (index === myIndex) {
+ return { ...node, data: { ...node.data, childrenCount: myChildren.length } };
}
- }
+ return node;
+ });
+
+ graph.nodes = modifiedNodes;
}
}
+}
+
+type Traverse = {
+ states: States;
+ objectToTraverse: Node;
+ parentType?: string;
+ myParentId?: string;
+ nextType?: string;
+};
+
+export const traverse = ({
+ objectToTraverse,
+ states,
+ myParentId,
+ nextType,
+ parentType,
+}: Traverse) => {
+ const graph = states.graph;
+ let { type, children, value } = objectToTraverse;
+
+ if (!children) {
+ handleNoChildren(value, states, graph, myParentId, parentType, nextType);
+ } else if (children) {
+ handleHasChildren(type, states, graph, children, myParentId, parentType);
+ }
};
diff --git a/src/utils/dataToString.ts b/src/utils/dataToString.ts
deleted file mode 100644
index 91d86e09..00000000
--- a/src/utils/dataToString.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export const dataToString = (data: any) => {
- const text = Array.isArray(data) ? Object.fromEntries(data) : data;
- return JSON.stringify(
- text,
- (_, v) => {
- if (typeof v === "string") return v.replaceAll('"', "");
- return v;
- },
- 2
- );
-};
diff --git a/src/utils/getChildrenEdges.ts b/src/utils/graph/getChildrenEdges.ts
similarity index 100%
rename from src/utils/getChildrenEdges.ts
rename to src/utils/graph/getChildrenEdges.ts
diff --git a/src/utils/getNextDirection.ts b/src/utils/graph/getNextDirection.ts
similarity index 100%
rename from src/utils/getNextDirection.ts
rename to src/utils/graph/getNextDirection.ts
diff --git a/src/utils/getOutgoers.ts b/src/utils/graph/getOutgoers.ts
similarity index 100%
rename from src/utils/getOutgoers.ts
rename to src/utils/graph/getOutgoers.ts
diff --git a/src/utils/search.ts b/src/utils/graph/search.ts
similarity index 100%
rename from src/utils/search.ts
rename to src/utils/graph/search.ts
diff --git a/src/utils/json/getAllPaths.ts b/src/utils/json/getAllPaths.ts
new file mode 100644
index 00000000..b49b6281
--- /dev/null
+++ b/src/utils/json/getAllPaths.ts
@@ -0,0 +1,21 @@
+export function getAllPaths(jsonObj: string) {
+ if (!jsonObj) return [];
+
+ jsonObj = JSON.parse(jsonObj);
+ let paths = [] as string[];
+
+ function traverse(obj: string | object, path: string[]) {
+ if (typeof obj !== "object") {
+ paths.push(path.join("."));
+ return;
+ }
+
+ for (let key in obj) {
+ traverse(obj[key], path.concat(key));
+ }
+ }
+
+ traverse(jsonObj, []);
+
+ return paths;
+}
diff --git a/src/utils/getNodePath.ts b/src/utils/json/getNodePath.ts
similarity index 100%
rename from src/utils/getNodePath.ts
rename to src/utils/json/getNodePath.ts
diff --git a/src/utils/json/getObjectValues.ts b/src/utils/json/getObjectValues.ts
new file mode 100644
index 00000000..eb222437
--- /dev/null
+++ b/src/utils/json/getObjectValues.ts
@@ -0,0 +1,14 @@
+export function getObjectValues(obj: object) {
+ if (!obj) return [];
+ let values = [] as string[];
+
+ for (const key in obj) {
+ if (typeof obj[key] === "object") {
+ values = values.concat(getObjectValues(obj[key]));
+ } else {
+ values.push(obj[key]);
+ }
+ }
+
+ return [...new Set(values)];
+}
diff --git a/src/utils/json/jsonParser.ts b/src/utils/json/jsonParser.ts
new file mode 100644
index 00000000..d526eb01
--- /dev/null
+++ b/src/utils/json/jsonParser.ts
@@ -0,0 +1,82 @@
+import { parseTree } from "jsonc-parser";
+import { addEdgeToGraph } from "../core/addEdgeToGraph";
+import { addNodeToGraph } from "../core/addNodeToGraph";
+import { traverse } from "../core/traverse";
+import { getNodePath } from "./getNodePath";
+
+export type Graph = {
+ nodes: NodeData[];
+ edges: EdgeData[];
+};
+
+export type States = {
+ parentName: string;
+ bracketOpen: { id: string; type: string }[];
+ objectsFromArray: number[];
+ objectsFromArrayId: number;
+ notHaveParent: string[];
+ brothersNode: [string, string][];
+ brothersParentId: string | undefined;
+ brotherKey: string;
+ brothersNodeProps: {
+ id: string;
+ parentId: string | undefined;
+ objectsFromArrayId: number | undefined;
+ }[];
+ graph: Graph;
+};
+
+function initializeStates(): States {
+ return {
+ parentName: "",
+ bracketOpen: [],
+ objectsFromArray: [],
+ objectsFromArrayId: 0,
+ notHaveParent: [],
+ brothersNode: [],
+ brothersParentId: undefined,
+ brotherKey: "",
+ brothersNodeProps: [],
+ graph: {
+ nodes: [],
+ edges: [],
+ },
+ };
+}
+
+export function parser(jsonStr: string): Graph {
+ try {
+ const states = initializeStates();
+ const parsedJsonTree = parseTree(jsonStr);
+ if (!parsedJsonTree) {
+ throw new Error("Invalid document");
+ }
+
+ traverse({ states, objectToTraverse: parsedJsonTree });
+
+ const { notHaveParent, graph } = states;
+ if (notHaveParent.length > 1 && parsedJsonTree.type !== "array") {
+ const emptyNode = { id: null, text: "", isEmpty: true, data: {} };
+ const emptyId = addNodeToGraph({ graph, ...emptyNode });
+ notHaveParent.forEach(childId => addEdgeToGraph(graph, emptyId, childId));
+ }
+
+ if (states.graph.nodes.length === 0) {
+ if (parsedJsonTree.type === "array") {
+ addNodeToGraph({ graph: states.graph, text: "[]" });
+ } else {
+ addNodeToGraph({ graph: states.graph, text: "{}" });
+ }
+ }
+
+ states.graph.nodes = states.graph.nodes.map(node => ({
+ ...node,
+ path: getNodePath(states.graph.nodes, states.graph.edges, node.id),
+ }));
+
+ return states.graph;
+ } catch (error) {
+ console.error(error);
+ return { nodes: [], edges: [] };
+ }
+}
diff --git a/tsconfig.json b/tsconfig.json
index 14aae77a..b6788224 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"baseUrl": ".",
- "target": "es5",
+ "target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
diff --git a/yarn.lock b/yarn.lock
index 077632b5..da584a7b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -165,38 +165,38 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"
-"@emotion/babel-plugin@^11.10.6":
- version "11.10.6"
- resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.10.6.tgz#a68ee4b019d661d6f37dec4b8903255766925ead"
- integrity sha512-p2dAqtVrkhSa7xz1u/m9eHYdLi+en8NowrmXeF/dKtJpU8lCWli8RUAati7NcSl0afsBott48pdnANuD0wh9QQ==
+"@emotion/babel-plugin@^11.11.0":
+ version "11.11.0"
+ resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz#c2d872b6a7767a9d176d007f5b31f7d504bb5d6c"
+ integrity sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==
dependencies:
"@babel/helper-module-imports" "^7.16.7"
"@babel/runtime" "^7.18.3"
- "@emotion/hash" "^0.9.0"
- "@emotion/memoize" "^0.8.0"
- "@emotion/serialize" "^1.1.1"
+ "@emotion/hash" "^0.9.1"
+ "@emotion/memoize" "^0.8.1"
+ "@emotion/serialize" "^1.1.2"
babel-plugin-macros "^3.1.0"
convert-source-map "^1.5.0"
escape-string-regexp "^4.0.0"
find-root "^1.1.0"
source-map "^0.5.7"
- stylis "4.1.3"
+ stylis "4.2.0"
-"@emotion/cache@^11.10.5":
- version "11.10.5"
- resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.10.5.tgz#c142da9351f94e47527ed458f7bbbbe40bb13c12"
- integrity sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA==
+"@emotion/cache@^11.11.0":
+ version "11.11.0"
+ resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.11.0.tgz#809b33ee6b1cb1a625fef7a45bc568ccd9b8f3ff"
+ integrity sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==
dependencies:
- "@emotion/memoize" "^0.8.0"
- "@emotion/sheet" "^1.2.1"
- "@emotion/utils" "^1.2.0"
- "@emotion/weak-memoize" "^0.3.0"
- stylis "4.1.3"
+ "@emotion/memoize" "^0.8.1"
+ "@emotion/sheet" "^1.2.2"
+ "@emotion/utils" "^1.2.1"
+ "@emotion/weak-memoize" "^0.3.1"
+ stylis "4.2.0"
-"@emotion/hash@^0.9.0":
- version "0.9.0"
- resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.0.tgz#c5153d50401ee3c027a57a177bc269b16d889cb7"
- integrity sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ==
+"@emotion/hash@^0.9.1":
+ version "0.9.1"
+ resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.1.tgz#4ffb0055f7ef676ebc3a5a91fb621393294e2f43"
+ integrity sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==
"@emotion/is-prop-valid@^0.8.2":
version "0.8.8"
@@ -222,45 +222,50 @@
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.0.tgz#f580f9beb67176fa57aae70b08ed510e1b18980f"
integrity sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==
-"@emotion/react@^11.10.6":
- version "11.10.6"
- resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.10.6.tgz#dbe5e650ab0f3b1d2e592e6ab1e006e75fd9ac11"
- integrity sha512-6HT8jBmcSkfzO7mc+N1L9uwvOnlcGoix8Zn7srt+9ga0MjREo6lRpuVX0kzo6Jp6oTqDhREOFsygN6Ew4fEQbw==
+"@emotion/memoize@^0.8.1":
+ version "0.8.1"
+ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17"
+ integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==
+
+"@emotion/react@^11.11.0":
+ version "11.11.0"
+ resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.11.0.tgz#408196b7ef8729d8ad08fc061b03b046d1460e02"
+ integrity sha512-ZSK3ZJsNkwfjT3JpDAWJZlrGD81Z3ytNDsxw1LKq1o+xkmO5pnWfr6gmCC8gHEFf3nSSX/09YrG67jybNPxSUw==
dependencies:
"@babel/runtime" "^7.18.3"
- "@emotion/babel-plugin" "^11.10.6"
- "@emotion/cache" "^11.10.5"
- "@emotion/serialize" "^1.1.1"
- "@emotion/use-insertion-effect-with-fallbacks" "^1.0.0"
- "@emotion/utils" "^1.2.0"
- "@emotion/weak-memoize" "^0.3.0"
+ "@emotion/babel-plugin" "^11.11.0"
+ "@emotion/cache" "^11.11.0"
+ "@emotion/serialize" "^1.1.2"
+ "@emotion/use-insertion-effect-with-fallbacks" "^1.0.1"
+ "@emotion/utils" "^1.2.1"
+ "@emotion/weak-memoize" "^0.3.1"
hoist-non-react-statics "^3.3.1"
-"@emotion/serialize@^1.1.1":
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.1.tgz#0595701b1902feded8a96d293b26be3f5c1a5cf0"
- integrity sha512-Zl/0LFggN7+L1liljxXdsVSVlg6E/Z/olVWpfxUTxOAmi8NU7YoeWeLfi1RmnB2TATHoaWwIBRoL+FvAJiTUQA==
+"@emotion/serialize@^1.1.2":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.2.tgz#017a6e4c9b8a803bd576ff3d52a0ea6fa5a62b51"
+ integrity sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==
dependencies:
- "@emotion/hash" "^0.9.0"
- "@emotion/memoize" "^0.8.0"
- "@emotion/unitless" "^0.8.0"
- "@emotion/utils" "^1.2.0"
+ "@emotion/hash" "^0.9.1"
+ "@emotion/memoize" "^0.8.1"
+ "@emotion/unitless" "^0.8.1"
+ "@emotion/utils" "^1.2.1"
csstype "^3.0.2"
-"@emotion/server@^11.10.0":
- version "11.10.0"
- resolved "https://registry.yarnpkg.com/@emotion/server/-/server-11.10.0.tgz#3edc075b672c75426f682d56aadc6404fb1f6648"
- integrity sha512-MTvJ21JPo9aS02GdjFW4nhdwOi2tNNpMmAM/YED0pkxzjDNi5WbiTwXqaCnvLc2Lr8NFtjhT0az1vTJyLIHYcw==
+"@emotion/server@^11.11.0":
+ version "11.11.0"
+ resolved "https://registry.yarnpkg.com/@emotion/server/-/server-11.11.0.tgz#35537176a2a5ed8aed7801f254828e636ec3bd6e"
+ integrity sha512-6q89fj2z8VBTx9w93kJ5n51hsmtYuFPtZgnc1L8VzRx9ti4EU6EyvF6Nn1H1x3vcCQCF7u2dB2lY4AYJwUW4PA==
dependencies:
- "@emotion/utils" "^1.2.0"
+ "@emotion/utils" "^1.2.1"
html-tokenize "^2.0.0"
multipipe "^1.0.2"
through "^2.3.8"
-"@emotion/sheet@^1.2.1":
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.1.tgz#0767e0305230e894897cadb6c8df2c51e61a6c2c"
- integrity sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA==
+"@emotion/sheet@^1.2.2":
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.2.tgz#d58e788ee27267a14342303e1abb3d508b6d0fec"
+ integrity sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==
"@emotion/stylis@^0.8.4":
version "0.8.5"
@@ -272,34 +277,46 @@
resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed"
integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==
-"@emotion/unitless@^0.8.0":
- version "0.8.0"
- resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.8.0.tgz#a4a36e9cbdc6903737cd20d38033241e1b8833db"
- integrity sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==
+"@emotion/unitless@^0.8.1":
+ version "0.8.1"
+ resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.8.1.tgz#182b5a4704ef8ad91bde93f7a860a88fd92c79a3"
+ integrity sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==
-"@emotion/use-insertion-effect-with-fallbacks@^1.0.0":
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz#ffadaec35dbb7885bd54de3fa267ab2f860294df"
- integrity sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==
+"@emotion/use-insertion-effect-with-fallbacks@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz#08de79f54eb3406f9daaf77c76e35313da963963"
+ integrity sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==
-"@emotion/utils@^1.2.0":
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.0.tgz#9716eaccbc6b5ded2ea5a90d65562609aab0f561"
- integrity sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw==
+"@emotion/utils@^1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.1.tgz#bbab58465738d31ae4cb3dbb6fc00a5991f755e4"
+ integrity sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==
-"@emotion/weak-memoize@^0.3.0":
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz#ea89004119dc42db2e1dba0f97d553f7372f6fcb"
- integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==
+"@emotion/weak-memoize@^0.3.1":
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz#d0fce5d07b0620caa282b5131c297bb60f9d87e6"
+ integrity sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==
-"@eslint/eslintrc@^2.0.0":
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.1.tgz#7888fe7ec8f21bc26d646dbd2c11cd776e21192d"
- integrity sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==
+"@eslint-community/eslint-utils@^4.2.0":
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
+ integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
+ dependencies:
+ eslint-visitor-keys "^3.3.0"
+
+"@eslint-community/regexpp@^4.4.0":
+ version "4.5.1"
+ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884"
+ integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==
+
+"@eslint/eslintrc@^2.0.3":
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.3.tgz#4910db5505f4d503f27774bf356e3704818a0331"
+ integrity sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
- espree "^9.5.0"
+ espree "^9.5.2"
globals "^13.19.0"
ignore "^5.2.0"
import-fresh "^3.2.1"
@@ -307,10 +324,10 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@eslint/[email protected]":
- version "8.35.0"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.35.0.tgz#b7569632b0b788a0ca0e438235154e45d42813a7"
- integrity sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==
+"@eslint/[email protected]":
+ version "8.40.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.40.0.tgz#3ba73359e11f5a7bd3e407f70b3528abfae69cec"
+ integrity sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==
"@floating-ui/core@^1.2.2":
version "1.2.2"
@@ -409,74 +426,73 @@
resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60"
integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==
-"@mantine/core@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@mantine/core/-/core-6.0.1.tgz#e9cb1edc895a803c1957071eac9fc2b5457330be"
- integrity sha512-RJ0gnEOMQu9qGV9bZxb4FrHe3UT2GjVokzZ91C/Ht8DTu8Ar1uUch45+VsqI67JG2ceHykOMvsDWgAulCUKBNg==
+"@mantine/core@^6.0.10":
+ version "6.0.10"
+ resolved "https://registry.yarnpkg.com/@mantine/core/-/core-6.0.10.tgz#51657b15fea8d0201033e1a182d636eaf35db3fd"
+ integrity sha512-Q8HdRTBkQDs6LEtklpYm6efz2WaV6T5rvgjUOfXq0z44G/XYM+P1B1BSFnHvUDkeWYLcGkK6aPI5Uxc0GEN04w==
dependencies:
"@floating-ui/react" "^0.19.1"
- "@mantine/styles" "6.0.1"
- "@mantine/utils" "6.0.1"
+ "@mantine/styles" "6.0.10"
+ "@mantine/utils" "6.0.10"
"@radix-ui/react-scroll-area" "1.0.2"
react-remove-scroll "^2.5.5"
react-textarea-autosize "8.3.4"
-"@mantine/hooks@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@mantine/hooks/-/hooks-6.0.1.tgz#0b01f445b8b03854b029fd257e810424da30df2c"
- integrity sha512-D3zWNPMrmjBbns0krXCE5FyWNmrKosYqD+J4/yyBrngvN6XMlmqfUr4C6ofndRrpZHxyshEJgVYLvB5h2bioGQ==
+"@mantine/hooks@^6.0.10":
+ version "6.0.10"
+ resolved "https://registry.yarnpkg.com/@mantine/hooks/-/hooks-6.0.10.tgz#3f4383034f7c8508708abc31dd3d56b93f1e3a6b"
+ integrity sha512-rxH5/CxmUs1mUZAj27Fza4SH07HV1XyrL7L9wwhZdMLg+oDEaAs8BMz8lsOIHOCro9ZDh+Mm7QAbEW8HcvmYJg==
-"@mantine/next@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@mantine/next/-/next-6.0.1.tgz#3b07f7f42d5770d29429c18cc114853a560c83e9"
- integrity sha512-+7Mb79V+ah/XhVmOTQ6tlg0ZHZhweTgryQO9u87wD8KMxuuNhdNLZq27E8390PTXHhxFO93T7k4WbQqIXQOkUg==
+"@mantine/next@^6.0.10":
+ version "6.0.10"
+ resolved "https://registry.yarnpkg.com/@mantine/next/-/next-6.0.10.tgz#4d5f2f30dabbeaff08a00c388b54420b95477aab"
+ integrity sha512-2F10AR1qUr1bePjrKHkZIAKs6Q22J5UQC6ag8Kkb/pOTroQN+rKzPpiX7jcet0iYyh1b0I6vv7LT70vnZ3EF3g==
dependencies:
- "@mantine/ssr" "6.0.1"
- "@mantine/styles" "6.0.1"
+ "@mantine/ssr" "6.0.10"
+ "@mantine/styles" "6.0.10"
-"@mantine/prism@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@mantine/prism/-/prism-6.0.1.tgz#3c7460da04853b8e67f5f9c6c30cddae56f75c98"
- integrity sha512-IVzYAJszYRo5EDPDDmbkMexjkEn0bfjnhkGOcPas7C0AMA94r2Dg/4/MgNdjg3e3afW9DAIN9MYWgVD6EGMFrA==
+"@mantine/prism@^6.0.10":
+ version "6.0.10"
+ resolved "https://registry.yarnpkg.com/@mantine/prism/-/prism-6.0.10.tgz#7b9703b900bc7a971cfee9d6cc54599cfc9febe4"
+ integrity sha512-y4oW1L8H9Jq+Ymm5RphanczVnlbHyNZy+PC9ZIbVy61f+WDWLM4tmCWYPgxXWQ35yXpMCz3U9UkAsSGEaalAOA==
dependencies:
- "@mantine/utils" "6.0.1"
+ "@mantine/utils" "6.0.10"
prism-react-renderer "^1.2.1"
-"@mantine/[email protected]":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@mantine/ssr/-/ssr-6.0.1.tgz#8d09d35ec6624476777b2679eed3fc80fce3c06b"
- integrity sha512-qAQEqkVZ6uirdlZzD4ia3yW7PSxITkLjuqHMgabUbfk383xko3MAcdoUHz9cufpB8w+qJzuqUUR9D7mkJCChzQ==
+"@mantine/[email protected]":
+ version "6.0.10"
+ resolved "https://registry.yarnpkg.com/@mantine/ssr/-/ssr-6.0.10.tgz#58e41adcf38e82f513e8e289110d0efe4eba4a7e"
+ integrity sha512-roWmepeta6mXV4IhrTomOu2YCd9oezgId4SesSof0vgHX9bXzST4RJdDryEdjkcshipdwY3RklFWsDGXECtSyA==
dependencies:
- "@mantine/styles" "6.0.1"
+ "@mantine/styles" "6.0.10"
html-react-parser "1.4.12"
-"@mantine/[email protected]":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@mantine/styles/-/styles-6.0.1.tgz#a827f82cf823d0b6715c86419f225740cf1dcc8d"
- integrity sha512-5hY5Tt0v8GzJ4PSuE9DHlHMmzFi2Vs/l9nVc5feut0vp7GqDvoSMH+gBvsMIIsgGif+nhdztvdpv1aI0YRZgtA==
+"@mantine/[email protected]":
+ version "6.0.10"
+ resolved "https://registry.yarnpkg.com/@mantine/styles/-/styles-6.0.10.tgz#49118fb732320141584f7d09cdca9d69e1b9468a"
+ integrity sha512-TVyo4xNBO7PhP2jubu2OI1YK2DEULrVgdsP0+1wfwj/bhSTnTLYmh2aOb1FyTiFvFn1dfq4If428z/ZuGiLtdQ==
dependencies:
clsx "1.1.1"
csstype "3.0.9"
-"@mantine/[email protected]":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@mantine/utils/-/utils-6.0.1.tgz#cf0e42b617dbc3632a3ef29bdf0b5e29f123d6a5"
- integrity sha512-uEN457ELHpKXS4qNAcL5OR9dFOjeFngWRZJVAPkLafWBJuLd2qmdLvKLgUVyt+cMVFtcjnu6rGVOite1+dtaFw==
+"@mantine/[email protected]":
+ version "6.0.10"
+ resolved "https://registry.yarnpkg.com/@mantine/utils/-/utils-6.0.10.tgz#a7e99d4d7368912696f40fe56e444ef4f5befeae"
+ integrity sha512-Lo4VUn3+/kqhdjSoPzUFbxXEjMxj5vS4pqRjKRGtJsTwHiMFNcm8u4cIESzMBAEsoaBrI1dGE4WttwOJhjUaSw==
-"@monaco-editor/loader@^1.3.2":
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/@monaco-editor/loader/-/loader-1.3.2.tgz#04effbb87052d19cd7d3c9d81c0635490f9bb6d8"
- integrity sha512-BTDbpHl3e47r3AAtpfVFTlAi7WXv4UQ/xZmz8atKl4q7epQV5e7+JbigFDViWF71VBi4IIBdcWP57Hj+OWuc9g==
+"@monaco-editor/loader@^1.3.3":
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/@monaco-editor/loader/-/loader-1.3.3.tgz#7f1742bd3cc21c0362a46a4056317f6e5215cfca"
+ integrity sha512-6KKF4CTzcJiS8BJwtxtfyYt9shBiEv32ateQ9T4UVogwn4HM/uPo9iJd2Dmbkpz8CM6Y0PDUpjnZzCwC+eYo2Q==
dependencies:
state-local "^1.0.6"
-"@monaco-editor/react@^4.4.6":
- version "4.4.6"
- resolved "https://registry.yarnpkg.com/@monaco-editor/react/-/react-4.4.6.tgz#8ae500b0edf85276d860ed702e7056c316548218"
- integrity sha512-Gr3uz3LYf33wlFE3eRnta4RxP5FSNxiIV9ENn2D2/rN8KgGAD8ecvcITRtsbbyuOuNkwbuHYxfeaz2Vr+CtyFA==
+"@monaco-editor/react@^4.5.1":
+ version "4.5.1"
+ resolved "https://registry.yarnpkg.com/@monaco-editor/react/-/react-4.5.1.tgz#fbc76c692aee9a33b9ab24ae0c5f219b8f002fdb"
+ integrity sha512-NNDFdP+2HojtNhCkRfE6/D6ro6pBNihaOzMbGK84lNWzRu+CfBjwzGt4jmnqimLuqp5yE5viHS2vi+QOAnD5FQ==
dependencies:
- "@monaco-editor/loader" "^1.3.2"
- prop-types "^15.7.2"
+ "@monaco-editor/loader" "^1.3.3"
"@motionone/animation@^10.15.1":
version "10.15.1"
@@ -531,89 +547,69 @@
hey-listen "^1.0.8"
tslib "^2.3.1"
-"@next/bundle-analyzer@^13.2.3":
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/bundle-analyzer/-/bundle-analyzer-13.2.4.tgz#ad319bf566528f8afee34df07574fd97170b03f2"
- integrity sha512-bY4Clt7f1roJextpeQOQQWfNiXI0O5UvfOEyfuM5YUGPQMOCAZD2zjLjolakdn9Dm2yyMQUQ6JDE+iJK0dIeLA==
+"@next/bundle-analyzer@^13.4.1":
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/bundle-analyzer/-/bundle-analyzer-13.4.1.tgz#b565f042b9623268e2891f529c144e5c152049d0"
+ integrity sha512-wbSVjc1RM43vLuvMLZL2hSq6+76VgyVWqgpgk4AlJM//KjynVMezo+c6HI8tRzMI0p0txzDtSUA3na32fuY67A==
dependencies:
webpack-bundle-analyzer "4.7.0"
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/env/-/env-13.2.4.tgz#8b763700262b2445140a44a8c8d088cef676dbae"
- integrity sha512-+Mq3TtpkeeKFZanPturjcXt+KHfKYnLlX6jMLyCrmpq6OOs4i1GqBOAauSkii9QeKCMTYzGppar21JU57b/GEA==
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/env/-/env-13.4.1.tgz#57322da2630b6bb6d7204577b0a18f6f9324db0c"
+ integrity sha512-eD6WCBMFjLFooLM19SIhSkWBHtaFrZFfg2Cxnyl3vS3DAdFRfnx5TY2RxlkuKXdIRCC0ySbtK9JXXt8qLCqzZg==
- version "13.2.3"
- resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-13.2.3.tgz#5af8ddeac6dbe028c812a0e59c41952c004d95d5"
- integrity sha512-QmMPItnU7VeojI1KnuwL9SLFWEwmaNHNlnOGpoTwdLoSiP9sc8KYiAHWEc4/44L+cAdCxcZYvn7frcRNP5l84Q==
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-13.4.1.tgz#9c943ccd035f5f4b79da23911e08e18c24941bed"
+ integrity sha512-tVPS/2FKlA3ANCRCYZVT5jdbUKasBU8LG6bYqcNhyORDFTlDYa4cAWQJjZ7msIgLwMQIbL8CAsxrOL8maa/4Lg==
dependencies:
glob "7.1.7"
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.4.tgz#758d0403771e549f9cee71cbabc0cb16a6c947c0"
- integrity sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.2.4.tgz#834d586523045110d5602e0c8aae9028835ac427"
- integrity sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.4.tgz#5006fca179a36ef3a24d293abadec7438dbb48c6"
- integrity sha512-S6vBl+OrInP47TM3LlYx65betocKUUlTZDDKzTiRDbsRESeyIkBtZ6Qi5uT2zQs4imqllJznVjFd1bXLx3Aa6A==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.4.tgz#6549c7c04322766acc3264ccdb3e1b43fcaf7946"
- integrity sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.4.tgz#0bbe28979e3e868debc2cc06e45e186ce195b7f4"
- integrity sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.4.tgz#1d28d2203f5a7427d6e7119d7bcb5fc40959fb3e"
- integrity sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.4.tgz#eb26448190948cdf4c44b8f34110a3ecea32f1d0"
- integrity sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.4.tgz#c4227c0acd94a420bb14924820710e6284d234d3"
- integrity sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.4.tgz#6bcb540944ee9b0209b33bfc23b240c2044dfc3e"
- integrity sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.4.tgz#ce21e43251eaf09a09df39372b2c3e38028c30ff"
- integrity sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.4.tgz#68220063d8e5e082f5465498675640dedb670ff1"
- integrity sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.4.tgz#7c120ab54a081be9566df310bed834f168252990"
- integrity sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw==
-
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.4.tgz#5abda92fe12b9829bf7951c4a221282c56041144"
- integrity sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw==
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.1.tgz#3748040d2dd0d89d3cdcc897f96aeda5130eed8f"
+ integrity sha512-eF8ARHtYfnoYtDa6xFHriUKA/Mfj/cCbmKb3NofeKhMccs65G6/loZ15a6wYCCx4rPAd6x4t1WmVYtri7EdeBg==
+
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.1.tgz#c59fc270005f17e04eb7eab4fd68793d0e3409a4"
+ integrity sha512-7cmDgF9tGWTgn5Gw+vP17miJbH4wcraMHDCOHTYWkO/VeKT73dUWG23TNRLfgtCNSPgH4V5B4uLHoZTanx9bAw==
+
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.1.tgz#1aef371bcef5d832d7f7e3aec3e68cfb98282393"
+ integrity sha512-qwJqmCri2ie8aTtE5gjTSr8S6O8B67KCYgVZhv9gKH44yvc/zXbAY8u23QGULsYOyh1islWE5sWfQNLOj9iryg==
+
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.1.tgz#2522927cb0af6918405a49f5a1d1687d6847f3ec"
+ integrity sha512-qcC54tWNGDv/VVIFkazxhqH1Bnagjfs4enzELVRlUOoJPD2BGJTPI7z08pQPbbgxLtRiu8gl2mXvpB8WlOkMeA==
+
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.1.tgz#5ec9418a35510048a5ceb79ed300463e1a9b312d"
+ integrity sha512-9TeWFlpLsBosZ+tsm/rWBaMwt5It9tPH8m3nawZqFUUrZyGRfGcI67js774vtx0k3rL9qbyY6+3pw9BCVpaYUA==
+
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.1.tgz#3478b9c89b75c1d0e7def9f35a9a77cb15d1a115"
+ integrity sha512-sNDGaWmSqTS4QRUzw61wl4mVPeSqNIr1OOjLlQTRuyInxMxtqImRqdvzDvFTlDfdeUMU/DZhWGYoHrXLlZXe6A==
+
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.1.tgz#efe53d48ff51d2485eabb910ab7caee78425fc01"
+ integrity sha512-+CXZC7u1iXdLRudecoUYbhbsXpglYv8KFYsFxKBPn7kg+bk7eJo738wAA4jXIl8grTF2mPdmO93JOQym+BlYGA==
+
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.1.tgz#952cdf1c53df46a90d5151d99310195d2c384e55"
+ integrity sha512-vIoXVVc7UYO68VwVMDKwJC2+HqAZQtCYiVlApyKEeIPIQpz2gpufzGxk1z3/gwrJt/kJ5CDZjlhYDCzd3hdz+g==
+
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.1.tgz#447b7dcee5f5d4824cdff331a4ec34b13d0b449d"
+ integrity sha512-n8V5ImLQZibKTu10UUdI3nIeTLkliEXe628qxqW9v8My3BAH2a7H0SaCqkV2OgqFnn8sG1wxKYw9/SNJ632kSA==
"@nodelib/[email protected]":
version "2.1.5"
@@ -769,15 +765,26 @@
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz#8be36a1f66f3265389e90b5f9c9962146758f728"
integrity sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==
-"@sentry/[email protected]":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.42.0.tgz#357731e5ab65a226c98370f9e487fe48cadab765"
- integrity sha512-xTwfvrQPmYTkAvGivoJFadPLKLDS2N57D/18NA1gcrnF8NwR+I28x3I9ziVUiMCYX+6nJuqBNlMALAEPbb2G5A==
+"@sentry-internal/[email protected]":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.51.2.tgz#17833047646426ca71445327018ffcb33506a699"
+ integrity sha512-OBNZn7C4CyocmlSMUPfkY9ORgab346vTHu5kX35PgW5XR51VD2nO5iJCFbyFcsmmRWyCJcZzwMNARouc2V4V8A==
+ dependencies:
+ "@sentry/core" "7.51.2"
+ "@sentry/types" "7.51.2"
+ "@sentry/utils" "7.51.2"
+ tslib "^1.9.3"
+
+"@sentry/[email protected]":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.51.2.tgz#c01758a54c613be45df58ab503805737256f51a4"
+ integrity sha512-FQFEaTFbvYHPQE2emFjNoGSy+jXplwzoM/XEUBRjrGo62lf8BhMvWnPeG3H3UWPgrWA1mq0amvHRwXUkwofk0g==
dependencies:
- "@sentry/core" "7.42.0"
- "@sentry/replay" "7.42.0"
- "@sentry/types" "7.42.0"
- "@sentry/utils" "7.42.0"
+ "@sentry-internal/tracing" "7.51.2"
+ "@sentry/core" "7.51.2"
+ "@sentry/replay" "7.51.2"
+ "@sentry/types" "7.51.2"
+ "@sentry/utils" "7.51.2"
tslib "^1.9.3"
"@sentry/cli@^1.74.6":
@@ -792,98 +799,88 @@
proxy-from-env "^1.1.0"
which "^2.0.2"
-"@sentry/[email protected]":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.42.0.tgz#3333a1b868e8e69b6fbc8e5a9e9281be49321ac7"
- integrity sha512-vNcTyoQz5kUXo5vMGDyc5BJMO0UugPvMfYMQVxqt/BuDNR30LVhY+DL2tW1DFZDvRvyn5At+H7kSTj6GFrANXQ==
+"@sentry/[email protected]":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.51.2.tgz#f2c938de334f9bf26f4416079168275832423964"
+ integrity sha512-p8ZiSBxpKe+rkXDMEcgmdoyIHM/1bhpINLZUFPiFH8vzomEr7sgnwRhyrU8y/ADnkPeNg/2YF3QpDpk0OgZJUA==
dependencies:
- "@sentry/types" "7.42.0"
- "@sentry/utils" "7.42.0"
+ "@sentry/types" "7.51.2"
+ "@sentry/utils" "7.51.2"
tslib "^1.9.3"
-"@sentry/[email protected]":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.42.0.tgz#53fc487de35ce01e3845f1de2f876fc01e87a681"
- integrity sha512-5P3LsU+HRmdh458mav3dNh8RCn0TROIxwa/b7jk1TLWcXHrNp5REjo1oI4PTC+fFbNE4b7ydwHNEzI65rz7gyA==
+"@sentry/[email protected]":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.51.2.tgz#fce58b9ced601c7f93344b508c67c69a9c883f3d"
+ integrity sha512-ZnSptbuDQOoQ13mFX9vvLDfXlbMGjenW2fMIssi9+08B7fD6qxmetkYnWmBK+oEipjoGA//0240Fj8FUvZr0Qg==
dependencies:
- "@sentry/types" "7.42.0"
- "@sentry/utils" "7.42.0"
+ "@sentry/types" "7.51.2"
+ "@sentry/utils" "7.51.2"
localforage "^1.8.1"
tslib "^1.9.3"
-"@sentry/nextjs@^7.42.0":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.42.0.tgz#3d7c96ad309aee8c58a0bbb4c6b079613ff98863"
- integrity sha512-UM3yEnnPyoFxYNynARZR9aBROvVG+nIHn6aE1uBtrKONUDren/gHlED/qqum3TDL5yc38Jwx5ZZ+gUYQZENfJA==
+"@sentry/nextjs@^7.51.2":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.51.2.tgz#721718a4748b8ef242c07674097176be2299f273"
+ integrity sha512-qZb7meUwZFD69VK71QafTvnlF1LZn0vobqJ95hK8EyyQP6JiSZoOwGo4PEf6mlrr3vNQPuNHKkixDyno3DlP1g==
dependencies:
"@rollup/plugin-commonjs" "24.0.0"
- "@sentry/core" "7.42.0"
- "@sentry/integrations" "7.42.0"
- "@sentry/node" "7.42.0"
- "@sentry/react" "7.42.0"
- "@sentry/tracing" "7.42.0"
- "@sentry/types" "7.42.0"
- "@sentry/utils" "7.42.0"
+ "@sentry/core" "7.51.2"
+ "@sentry/integrations" "7.51.2"
+ "@sentry/node" "7.51.2"
+ "@sentry/react" "7.51.2"
+ "@sentry/types" "7.51.2"
+ "@sentry/utils" "7.51.2"
"@sentry/webpack-plugin" "1.20.0"
chalk "3.0.0"
rollup "2.78.0"
stacktrace-parser "^0.1.10"
tslib "^1.9.3"
-"@sentry/[email protected]":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.42.0.tgz#62b31f5b5b8ffb8f2f917deb143e27935b357409"
- integrity sha512-mmpVSDeoM5aEbKOMq3Wt54wAvH53bkivhRh3Ip+R7Uj3aOKkcVJST2XlbghHgoYQXTWz+pl475EVyODWgY9QYg==
+"@sentry/[email protected]":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.51.2.tgz#3aa8177699a66265081f711f73652b5e37d0dc53"
+ integrity sha512-qtZ2xNVR0ZW+OZWb0Xw0Cdh2QJXOJkXjK84CGC2P4Y6jWrt+GVvwMANPItLT6mAh+ITszTJ5Gk5HHFRpYme5EA==
dependencies:
- "@sentry/core" "7.42.0"
- "@sentry/types" "7.42.0"
- "@sentry/utils" "7.42.0"
+ "@sentry-internal/tracing" "7.51.2"
+ "@sentry/core" "7.51.2"
+ "@sentry/types" "7.51.2"
+ "@sentry/utils" "7.51.2"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^1.9.3"
-"@sentry/[email protected]":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.42.0.tgz#7662faef398032f253fe5b174860e1ec5f76ddd5"
- integrity sha512-DOGK+vuSZq5lTiqVU6wVay0AUMjtSPZu25gzLIXntfoqw36CLUswP7ew61+Tas6tpXDdf4lR3uxJRwySiQLopw==
+"@sentry/[email protected]":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.51.2.tgz#8d09c8358a920d06225f879b0291867175d4f045"
+ integrity sha512-NiTbpiRaF7/2YnRONLqn8/bxT5UG+JN5MrR606ipxsl3ejF376VMLCHVvju6gJNw8mkrErEMkfxK+gGYqOdLEA==
dependencies:
- "@sentry/browser" "7.42.0"
- "@sentry/types" "7.42.0"
- "@sentry/utils" "7.42.0"
+ "@sentry/browser" "7.51.2"
+ "@sentry/types" "7.51.2"
+ "@sentry/utils" "7.51.2"
hoist-non-react-statics "^3.3.2"
tslib "^1.9.3"
-"@sentry/[email protected]":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.42.0.tgz#03be2bdab35e0f2d4e415a770c23d50dba8d73b5"
- integrity sha512-81HQm20hrW0+0eZ5sZf8KsSekkAlI0/u/M+9ZmOn2bHpGihqAM/O/lrXhTzaRXdpX/9NSwSCGY9k7LIRNMKaEQ==
- dependencies:
- "@sentry/core" "7.42.0"
- "@sentry/types" "7.42.0"
- "@sentry/utils" "7.42.0"
-
-"@sentry/[email protected]":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.42.0.tgz#bcdac21e1cb5f786465e6252625bd4bf0736e631"
- integrity sha512-0veGu3Ntweuj1pwWrJIFHmVdow4yufCreGIhsNDyrclwOjaTY3uI8iA6N62+hhtxOvqv+xueB98K1DvT5liPCQ==
+"@sentry/[email protected]":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.51.2.tgz#1f54e92b472ab87dfdb4e8cd6b8c8252600fe7b0"
+ integrity sha512-W8YnSxkK9LTUXDaYciM7Hn87u57AX9qvH8jGcxZZnvpKqHlDXOpSV8LRtBkARsTwgLgswROImSifY0ic0lyCWg==
dependencies:
- "@sentry/core" "7.42.0"
- "@sentry/types" "7.42.0"
- "@sentry/utils" "7.42.0"
- tslib "^1.9.3"
+ "@sentry/core" "7.51.2"
+ "@sentry/types" "7.51.2"
+ "@sentry/utils" "7.51.2"
-"@sentry/[email protected]":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.42.0.tgz#e5019cd41a8c4a98c296e2ff28d6adab4b2eb14e"
- integrity sha512-Ga0xaBIR/peuXQ88hI9a5TNY3GLNoH8jpsgPaAjAtRHkLsTx0y3AR+PrD7pUysza9QjvG+Qux01DRvLgaNKOHA==
+"@sentry/[email protected]":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.51.2.tgz#cb742f374d9549195f62c462c915adeafed31d65"
+ integrity sha512-/hLnZVrcK7G5BQoD/60u9Qak8c9AvwV8za8TtYPJDUeW59GrqnqOkFji7RVhI7oH1OX4iBxV+9pAKzfYE6A6SA==
-"@sentry/[email protected]":
- version "7.42.0"
- resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.42.0.tgz#fcffd0404836cb56975fbef9e889a42cc55de596"
- integrity sha512-cBiDZVipC+is+IVgsTQLJyZWUZQxlLZ9GarNT+XZOZ5BFh0acFtz88hO6+S7vGmhcx2aCvsdC9yb2Yf+BphK6Q==
+"@sentry/[email protected]":
+ version "7.51.2"
+ resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.51.2.tgz#2a52ac2cfb00ffd128248981279c0a561b39eccb"
+ integrity sha512-EcjBU7qG4IG+DpIPvdgIBcdIofROMawKoRUNKraeKzH/waEYH9DzCaqp/mzc5/rPBhpDB4BShX9xDDSeH+8c0A==
dependencies:
- "@sentry/types" "7.42.0"
+ "@sentry/types" "7.51.2"
tslib "^1.9.3"
"@sentry/[email protected]":
@@ -899,24 +896,24 @@
resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553"
integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==
- version "0.4.14"
- resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74"
- integrity sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.1.tgz#e9031491aa3f26bfcc974a67f48bd456c8a5357a"
+ integrity sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==
dependencies:
tslib "^2.4.0"
-"@tanstack/[email protected]":
- version "4.26.1"
- resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.26.1.tgz#7a441086c4d3d79e1d156c0a355bd3567213626e"
- integrity sha512-Zrx2pVQUP4ndnsu6+K/m8zerXSVY8QM+YSbxA1/jbBY21GeCd5oKfYl92oXPK0hPEUtoNuunIdiq0ZMqLos+Zg==
+"@tanstack/[email protected]":
+ version "4.29.5"
+ resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.29.5.tgz#a0273e88bf2fc102c4c893dc7c034127b67fd5d9"
+ integrity sha512-xXIiyQ/4r9KfaJ3k6kejqcaqFXXBTzN2aOJ5H1J6aTJE9hl/nbgAdfF6oiIu0CD5xowejJEJ6bBg8TO7BN4NuQ==
-"@tanstack/react-query@^4.26.1":
- version "4.26.1"
- resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.26.1.tgz#d254f6b7b297b5ae4204c84e6622506e5ec77d09"
- integrity sha512-i3dnz4TOARGIXrXQ5P7S25Zfi4noii/bxhcwPurh2nrf5EUCcAt/95TB2HSmMweUBx206yIMWUMEQ7ptd6zwDg==
+"@tanstack/react-query@^4.29.5":
+ version "4.29.5"
+ resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.29.5.tgz#3890741291f9f925933243d78bd74dfc59d64208"
+ integrity sha512-F87cibC3s3eG0Q90g2O+hqntpCrudKFnR8P24qkH9uccEhXErnJxBC/AAI4cJRV2bfMO8IeGZQYf3WyYgmSg0w==
dependencies:
- "@tanstack/query-core" "4.26.1"
+ "@tanstack/query-core" "4.29.5"
use-sync-external-store "^1.2.0"
"@testing-library/dom@^9.0.0":
@@ -1009,6 +1006,13 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
+"@types/jsonwebtoken@^9.0.2":
+ version "9.0.2"
+ resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#9eeb56c76dd555039be2a3972218de5bd3b8d83e"
+ integrity sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==
+ dependencies:
+ "@types/node" "*"
+
"@types/lodash.debounce@^4.0.7":
version "4.0.7"
resolved "https://registry.yarnpkg.com/@types/lodash.debounce/-/lodash.debounce-4.0.7.tgz#0285879defb7cdb156ae633cecd62d5680eded9f"
@@ -1021,15 +1025,17 @@
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa"
integrity sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==
-"@types/lz-string@^1.3.34":
- version "1.3.34"
- resolved "https://registry.yarnpkg.com/@types/lz-string/-/lz-string-1.3.34.tgz#69bfadde419314b4a374bf2c8e58659c035ed0a5"
- integrity sha512-j6G1e8DULJx3ONf6NdR5JiR2ZY3K3PaaqiEuKYkLQO0Czfi1AzrtjfnfCROyWGeDd5IVMKCwsgSmMip9OWijow==
+"@types/lz-string@^1.5.0":
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/@types/lz-string/-/lz-string-1.5.0.tgz#2f15d2dd9dbfb344f3d31aee5a82cf350b037e5f"
+ integrity sha512-s84fKOrzqqNCAPljhVyC5TjAo6BH4jKHw9NRNFNiRUY5QSgZCmVm5XILlWbisiKl+0OcS7eWihmKGS5akc2iQw==
+ dependencies:
+ lz-string "*"
-"@types/node@^18.15.0":
- version "18.15.0"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.0.tgz#286a65e3fdffd691e170541e6ecb0410b16a38be"
- integrity sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w==
+"@types/node@*", "@types/node@^20.1.2":
+ version "20.1.2"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.1.2.tgz#8fd63447e3f99aba6c3168fd2ec4580d5b97886f"
+ integrity sha512-CTO/wa8x+rZU626cL2BlbCDzydgnFNgc19h4YvizpTO88MFQxab8wqisxaofQJ/9bLGugRdWIuX/TbIs6VVF6g==
"@types/parse-json@^4.0.0":
version "4.0.0"
@@ -1063,7 +1069,7 @@
dependencies:
"@types/react" "*"
-"@types/react@*", "@types/[email protected]":
+"@types/react@*":
version "18.0.28"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.28.tgz#accaeb8b86f4908057ad629a26635fe641480065"
integrity sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==
@@ -1072,6 +1078,15 @@
"@types/scheduler" "*"
csstype "^3.0.2"
+ version "18.2.6"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.6.tgz#5cd53ee0d30ffc193b159d3516c8c8ad2f19d571"
+ integrity sha512-wRZClXn//zxCFW+ye/D2qY65UsYP1Fpex2YXorHc8awoNamkMZSvBxwxdYVInsHOZZd2Ppq8isnSzJL5Mpf8OA==
+ dependencies:
+ "@types/prop-types" "*"
+ "@types/scheduler" "*"
+ csstype "^3.0.2"
+
"@types/reactcss@*":
version "1.2.6"
resolved "https://registry.yarnpkg.com/@types/reactcss/-/reactcss-1.2.6.tgz#133c1e7e896f2726370d1d5a26bf06a30a038bcc"
@@ -1174,10 +1189,10 @@ ajv@^6.10.0, ajv@^6.12.4:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
-allotment@^1.18.1:
- version "1.18.1"
- resolved "https://registry.yarnpkg.com/allotment/-/allotment-1.18.1.tgz#a31b0cb5b301309334dfa352c7704361437058de"
- integrity sha512-ZhmpHoSvxHyPT5XjzTHeCBjzCMIFn1aGdNAzBCZhj1CcRMp31CaJCi+lfweoOLDbbjJqbFZqUk3xf+p7Mb0x5A==
+allotment@^1.19.0:
+ version "1.19.0"
+ resolved "https://registry.yarnpkg.com/allotment/-/allotment-1.19.0.tgz#8241a2e3db45e6b1e23f6ade29e392eab4297958"
+ integrity sha512-qL/1faHUoCOvMstCFGkaGSK/nVoSAVN6NLFuIW4P6D5fvKdgxV8/KNfMFeuQUXReodILp4I6z+5a9zmuqK5t4g==
dependencies:
classnames "^2.3.0"
eventemitter3 "^5.0.0"
@@ -1309,10 +1324,10 @@ axe-core@^4.6.2:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.6.3.tgz#fc0db6fdb65cc7a80ccf85286d91d64ababa3ece"
integrity sha512-/BQzOX780JhsxDnPpH4ZiyrJAzcd8AfzFPkv+89veFSr1rcMjuq2JDCwypKaPeB6ljHp9KjXhPpjgCvQlWYuqg==
-axios@^1.3.4:
- version "1.3.4"
- resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024"
- integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==
+axios@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f"
+ integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
@@ -1377,11 +1392,23 @@ braces@^3.0.2:
dependencies:
fill-range "^7.0.1"
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
+ integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==
+
buffer-from@~0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.2.tgz#15f4b9bcef012044df31142c14333caf6e0260d0"
integrity sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg==
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
+ integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==
+ dependencies:
+ streamsearch "^1.1.0"
+
calculate-size@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/calculate-size/-/calculate-size-1.1.1.tgz#ae7caa1c7795f82c4f035dc7be270e3581dae3ee"
@@ -1783,6 +1810,13 @@ duplexer@^0.1.2:
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6"
integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==
+ version "1.0.11"
+ resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf"
+ integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==
+ dependencies:
+ safe-buffer "^5.0.1"
+
elkjs@^0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/elkjs/-/elkjs-0.8.2.tgz#c37763c5a3e24e042e318455e0147c912a7c248e"
@@ -1930,12 +1964,12 @@ escape-string-regexp@^4.0.0:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
- version "13.2.3"
- resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-13.2.3.tgz#8a952bfd856f492684a30dd5fcdc8979c97c1cc2"
- integrity sha512-kPulHiQEHGei9hIaaNGygHRc0UzlWM+3euOmYbxNkd2Nbhci5rrCDeMBMPSV8xgUssphDGmwDHWbk4VZz3rlZQ==
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-13.4.1.tgz#5f5e083fab9997752852ea40f5d233632d18f085"
+ integrity sha512-ajuxjCkW1hvirr0EQZb3/B/bFH52Z7CT89uCtTcICFL9l30i5c8hN4p0LXvTjdOXNPV5fEDcxBgGHgXdzTj1/A==
dependencies:
- "@next/eslint-plugin-next" "13.2.3"
+ "@next/eslint-plugin-next" "13.4.1"
"@rushstack/eslint-patch" "^1.1.3"
"@typescript-eslint/parser" "^5.42.0"
eslint-import-resolver-node "^0.3.6"
@@ -2055,38 +2089,33 @@ eslint-rule-composer@^0.3.0:
resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9"
integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==
-eslint-scope@^7.1.1:
- version "7.1.1"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642"
- integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==
+eslint-scope@^7.2.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b"
+ integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==
dependencies:
esrecurse "^4.3.0"
estraverse "^5.2.0"
-eslint-utils@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672"
- integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==
- dependencies:
- eslint-visitor-keys "^2.0.0"
-
-eslint-visitor-keys@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
- integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
-
eslint-visitor-keys@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
- version "8.35.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.35.0.tgz#fffad7c7e326bae606f0e8f436a6158566d42323"
- integrity sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==
+eslint-visitor-keys@^3.4.1:
+ version "3.4.1"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994"
+ integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==
+
+ version "8.40.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.40.0.tgz#a564cd0099f38542c4e9a2f630fa45bf33bc42a4"
+ integrity sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==
dependencies:
- "@eslint/eslintrc" "^2.0.0"
- "@eslint/js" "8.35.0"
+ "@eslint-community/eslint-utils" "^4.2.0"
+ "@eslint-community/regexpp" "^4.4.0"
+ "@eslint/eslintrc" "^2.0.3"
+ "@eslint/js" "8.40.0"
"@humanwhocodes/config-array" "^0.11.8"
"@humanwhocodes/module-importer" "^1.0.1"
"@nodelib/fs.walk" "^1.2.8"
@@ -2096,10 +2125,9 @@ [email protected]:
debug "^4.3.2"
doctrine "^3.0.0"
escape-string-regexp "^4.0.0"
- eslint-scope "^7.1.1"
- eslint-utils "^3.0.0"
- eslint-visitor-keys "^3.3.0"
- espree "^9.4.0"
+ eslint-scope "^7.2.0"
+ eslint-visitor-keys "^3.4.1"
+ espree "^9.5.2"
esquery "^1.4.2"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
@@ -2121,19 +2149,18 @@ [email protected]:
minimatch "^3.1.2"
natural-compare "^1.4.0"
optionator "^0.9.1"
- regexpp "^3.2.0"
strip-ansi "^6.0.1"
strip-json-comments "^3.1.0"
text-table "^0.2.0"
-espree@^9.4.0, espree@^9.5.0:
- version "9.5.0"
- resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.0.tgz#3646d4e3f58907464edba852fa047e6a27bdf113"
- integrity sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==
+espree@^9.5.2:
+ version "9.5.2"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b"
+ integrity sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==
dependencies:
acorn "^8.8.0"
acorn-jsx "^5.3.2"
- eslint-visitor-keys "^3.3.0"
+ eslint-visitor-keys "^3.4.1"
esquery@^1.4.2:
version "1.5.0"
@@ -2958,6 +2985,16 @@ jsonc-parser@^3.2.0:
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
+jsonwebtoken@^9.0.0:
+ version "9.0.0"
+ resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz#d0faf9ba1cc3a56255fe49c0961a67e520c1926d"
+ integrity sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==
+ dependencies:
+ jws "^3.2.2"
+ lodash "^4.17.21"
+ ms "^2.1.1"
+ semver "^7.3.8"
+
"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea"
@@ -2966,6 +3003,23 @@ jsonc-parser@^3.2.0:
array-includes "^3.1.5"
object.assign "^4.1.3"
+jwa@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a"
+ integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==
+ dependencies:
+ buffer-equal-constant-time "1.0.1"
+ ecdsa-sig-formatter "1.0.11"
+ safe-buffer "^5.0.1"
+
+jws@^3.2.2:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304"
+ integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==
+ dependencies:
+ jwa "^1.4.1"
+ safe-buffer "^5.0.1"
+
kld-affine@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/kld-affine/-/kld-affine-2.1.1.tgz#e28296585f305230eaad3b1e346d3ac5ca4c72b3"
@@ -3093,7 +3147,7 @@ lru_map@^0.3.3:
resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd"
integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==
-lz-string@^1.5.0:
+lz-string@*, lz-string@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941"
integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==
@@ -3204,30 +3258,28 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
-next@^13.2.3:
- version "13.2.4"
- resolved "https://registry.yarnpkg.com/next/-/next-13.2.4.tgz#2363330392b0f7da02ab41301f60857ffa7f67d6"
- integrity sha512-g1I30317cThkEpvzfXujf0O4wtaQHtDCLhlivwlTJ885Ld+eOgcz7r3TGQzeU+cSRoNHtD8tsJgzxVdYojFssw==
+next@^13.4.1:
+ version "13.4.1"
+ resolved "https://registry.yarnpkg.com/next/-/next-13.4.1.tgz#8d23f94c81b3f9cc8b34165ad528457e5befd726"
+ integrity sha512-JBw2kAIyhKDpjhEWvNVoFeIzNp9xNxg8wrthDOtMctfn3EpqGCmW0FSviNyGgOSOSn6zDaX48pmvbdf6X2W9xA==
dependencies:
- "@next/env" "13.2.4"
- "@swc/helpers" "0.4.14"
+ "@next/env" "13.4.1"
+ "@swc/helpers" "0.5.1"
+ busboy "1.6.0"
caniuse-lite "^1.0.30001406"
postcss "8.4.14"
styled-jsx "5.1.1"
+ zod "3.21.4"
optionalDependencies:
- "@next/swc-android-arm-eabi" "13.2.4"
- "@next/swc-android-arm64" "13.2.4"
- "@next/swc-darwin-arm64" "13.2.4"
- "@next/swc-darwin-x64" "13.2.4"
- "@next/swc-freebsd-x64" "13.2.4"
- "@next/swc-linux-arm-gnueabihf" "13.2.4"
- "@next/swc-linux-arm64-gnu" "13.2.4"
- "@next/swc-linux-arm64-musl" "13.2.4"
- "@next/swc-linux-x64-gnu" "13.2.4"
- "@next/swc-linux-x64-musl" "13.2.4"
- "@next/swc-win32-arm64-msvc" "13.2.4"
- "@next/swc-win32-ia32-msvc" "13.2.4"
- "@next/swc-win32-x64-msvc" "13.2.4"
+ "@next/swc-darwin-arm64" "13.4.1"
+ "@next/swc-darwin-x64" "13.4.1"
+ "@next/swc-linux-arm64-gnu" "13.4.1"
+ "@next/swc-linux-arm64-musl" "13.4.1"
+ "@next/swc-linux-x64-gnu" "13.4.1"
+ "@next/swc-linux-x64-musl" "13.4.1"
+ "@next/swc-win32-arm64-msvc" "13.4.1"
+ "@next/swc-win32-ia32-msvc" "13.4.1"
+ "@next/swc-win32-x64-msvc" "13.4.1"
version "2.6.7"
@@ -3456,10 +3508,10 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
-prettier@^2.8.4:
- version "2.8.4"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3"
- integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==
+prettier@^2.8.8:
+ version "2.8.8"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
+ integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
pretty-format@^27.0.2:
version "27.5.1"
@@ -3495,7 +3547,7 @@ progress@^2.0.3:
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
-prop-types@^15.5.10, prop-types@^15.7.2, prop-types@^15.8.1:
+prop-types@^15.5.10, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
@@ -3567,10 +3619,10 @@ react-fast-compare@^3.2.0:
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb"
integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==
-react-hot-toast@^2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/react-hot-toast/-/react-hot-toast-2.4.0.tgz#b91e7a4c1b6e3068fc599d3d83b4fb48668ae51d"
- integrity sha512-qnnVbXropKuwUpriVVosgo8QrB+IaPJCpL8oBI6Ov84uvHZ5QQcTp2qg6ku2wNfgJl6rlQXJIQU5q+5lmPOutA==
+react-hot-toast@^2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/react-hot-toast/-/react-hot-toast-2.4.1.tgz#df04295eda8a7b12c4f968e54a61c8d36f4c0994"
+ integrity sha512-j8z+cQbWIM5LY37pR6uZR6D4LfseplqnuAO4co4u8917hBUvXlEqyP1ZzqVLcqoyUesZZv/ImreoCeHVDpE5pQ==
dependencies:
goober "^2.1.10"
@@ -3659,10 +3711,10 @@ react-use-gesture@^8.0.1:
resolved "https://registry.yarnpkg.com/react-use-gesture/-/react-use-gesture-8.0.1.tgz#4360c0f7c9e26baf9fbe58f63fc9de7ef699c17f"
integrity sha512-CXzUNkulUdgouaAlvAsC5ZVo0fi9KGSBSk81WrE4kOIcJccpANe9zZkAYr5YZZhqpicIFxitsrGVS4wmoMun9A==
-react-zoom-pan-pinch@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/react-zoom-pan-pinch/-/react-zoom-pan-pinch-3.0.2.tgz#706c67e875e9a30480cdbef8dd4e3d6fdac9921c"
- integrity sha512-c8BxPl/zK6RiOYrV/xBQ+ebgZpsMvbz6WOoqv2P/1QWxGCk1+q3xWF+5ub4QYasv4W8+J6vSelOR8H0WCEbL4w==
+react-zoom-pan-pinch@^3.0.7:
+ version "3.0.7"
+ resolved "https://registry.yarnpkg.com/react-zoom-pan-pinch/-/react-zoom-pan-pinch-3.0.7.tgz#def52f6886bc11e1b160dedf4250aae95470b94d"
+ integrity sha512-UJkk1Z7BMPIgfY+Qu4jGTlj+UyZQhrpJeCuK1gg31x57i3p8h4ZXfYWu3dFIiR+uRgfoe/koziwgCjA//T1rKA==
react@^18.2.0:
version "18.2.0"
@@ -3752,11 +3804,6 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.4.3:
define-properties "^1.1.3"
functions-have-names "^1.2.2"
-regexpp@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
- integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
-
resolve-from@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
@@ -3813,6 +3860,11 @@ run-parallel@^1.1.9:
dependencies:
queue-microtask "^1.2.2"
+safe-buffer@^5.0.1:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
+ integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
+
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
@@ -3846,6 +3898,13 @@ semver@^7.3.7:
dependencies:
lru-cache "^6.0.0"
+semver@^7.3.8:
+ version "7.5.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0"
+ integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==
+ dependencies:
+ lru-cache "^6.0.0"
+
shallowequal@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
@@ -3943,6 +4002,11 @@ stop-iteration-iterator@^1.0.0:
dependencies:
internal-slot "^1.0.4"
+streamsearch@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764"
+ integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==
+
string.prototype.matchall@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3"
@@ -4050,10 +4114,10 @@ [email protected]:
dependencies:
client-only "0.0.1"
- version "4.1.3"
- resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7"
- integrity sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51"
+ integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==
supports-color@^5.3.0, supports-color@^5.5.0:
version "5.5.0"
@@ -4243,10 +4307,10 @@ typed-array-length@^1.0.4:
for-each "^0.3.3"
is-typed-array "^1.1.9"
- version "4.9.5"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
- integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
+ version "5.0.4"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b"
+ integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==
unbox-primitive@^1.0.2:
version "1.0.2"
@@ -4465,9 +4529,14 @@ yocto-queue@^0.1.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
-zustand@^4.3.6:
- version "4.3.6"
- resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.6.tgz#ce7804eb75361af0461a2d0536b65461ec5de86f"
- integrity sha512-6J5zDxjxLE+yukC2XZWf/IyWVKnXT9b9HUv09VJ/bwGCpKNcaTqp7Ws28Xr8jnbvnZcdRaidztAPsXFBIqufiw==
+ version "3.21.4"
+ resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db"
+ integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==
+
+zustand@^4.3.8:
+ version "4.3.8"
+ resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.8.tgz#37113df8e9e1421b0be1b2dca02b49b76210e7c4"
+ integrity sha512-4h28KCkHg5ii/wcFFJ5Fp+k1J3gJoasaIbppdgZFO4BPJnsNxL0mQXBSFgOgAdCdBj35aDTPvdAJReTMntFPGg==
dependencies:
use-sync-external-store "1.2.0"