Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "json-schema-studio",
"version": "0.5.11-beta",
"version": "0.5.12-beta",
"type": "module",
"homepage": "studio.ioflux.org",
"repository": "https://github.com/ioflux-org/studio-json-schema",
Expand Down
1 change: 1 addition & 0 deletions src/components/FullscreenToggleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const FullscreenToggleButton = () => {

return (
<button
aria-label="Toggle fullscreen"
onClick={toggleFullScreen}
className="cursor-pointer"
style={{ color: "var(--navigation-text-color)" }}
Expand Down
5 changes: 5 additions & 0 deletions src/components/GraphView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ const GraphView = ({
{errorMessage}
</div>
<button
aria-label="Close error message"
className="cursor-pointer"
onClick={() => setShowErrorPopup(false)}
>
Expand All @@ -418,13 +419,15 @@ const GraphView = ({
type="text"
maxLength={30}
placeholder="search node"
aria-label="Search node"
className="outline-none text-[var(--text-color)] border-b-2 border-[var(--text-color)] text-center w-[150px] pr-5"
value={searchString}
onChange={handleChange}
/>

{searchString && (
<button
aria-label="Clear search"
onClick={() => {
setSearchString("");
setNodes((nds) => nds.map((n) => ({ ...n, selected: false })));
Expand All @@ -440,6 +443,7 @@ const GraphView = ({
{matchCount > 1 && (
<div className="flex items-center gap-1 bg-[var(--node-bg-color)] px-2 py-1 rounded border border-[var(--text-color)] opacity-80">
<button
aria-label="Previous match"
onClick={() => navigateMatch("prev")}
className="hover:bg-[var(--text-color)] hover:bg-opacity-20 rounded p-1 transition-colors"
title="Previous match"
Expand All @@ -455,6 +459,7 @@ const GraphView = ({
</span>

<button
aria-label="Next match"
onClick={() => navigateMatch("next")}
className="hover:bg-[var(--text-color)] hover:bg-opacity-20 rounded p-1 transition-colors"
title="Next match"
Expand Down
10 changes: 7 additions & 3 deletions src/components/MonacoEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,8 @@ const MonacoEditor = () => {
return (
<div
ref={containerRef}
className={`h-[92vh] flex flex-col ${
isAnimating ? "panel-animating" : ""
}`}
className={`h-[92vh] flex flex-col ${isAnimating ? "panel-animating" : ""
}`}
>
{isFullScreen && (
<div className="w-full px-1 bg-[var(--view-bg-color)] justify-items-end">
Expand All @@ -307,12 +306,17 @@ const MonacoEditor = () => {
value={schemaText}
theme={theme === "light" ? "vs-light" : "vs-dark"}
options={{

minimap: { enabled: false },
occurrencesHighlight: "off",
placeholder: "Paste your JSON Schema here to visualize the graph..."

}}

onChange={(value) => setSchemaText(value ?? "")}
onMount={handleEditorDidMount}
/>

<div className="flex-1 p-2 bg-[var(--validation-bg-color)] text-sm overflow-y-auto">
<div className={VALIDATION_UI[schemaValidation.status].className}>
{schemaValidation.message}
Expand Down
4 changes: 4 additions & 0 deletions src/components/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const NavigationBar = () => {
<ul className="flex gap-5 mr-10">
<li>
<select
aria-label="Schema format"
onChange={(e) => changeSchemaFormat(e.target.value as SchemaFormat)}
className="text-sm border rounded-sm bg-[var(--bg-color)] text-[var(--dropdown-text-color)] border-[var(--navigation-text-color)] cursor-pointer"
value={schemaFormat}
Expand All @@ -41,6 +42,7 @@ const NavigationBar = () => {
</li>
<li>
<button
aria-label={theme === "light" ? "Switch to dark mode" : "Switch to light mode"}
className="text-xl cursor-pointer"
onClick={toggleTheme}
data-tooltip-id="toggle-theme"
Expand All @@ -59,6 +61,7 @@ const NavigationBar = () => {
</li>
<li>
<a
aria-label="Star on Github"
href="https://github.com/jagpreetrahi/visualize-json-schema"
target="_blank"
rel="noopener noreferrer"
Expand All @@ -75,6 +78,7 @@ const NavigationBar = () => {
</li>
<li>
<a
aria-label="Open documentation"
href="https://github.com/jagpreetrahi/visualize-json-schema?tab=readme-ov-file#json-schema-visualizer"
target="_blank"
rel="noopener noreferrer"
Expand Down
2 changes: 2 additions & 0 deletions src/components/NodeDetailsPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const NodeDetailsPopup = ({
onClick={(e) => e.stopPropagation()}
>
<button
aria-label="Close popup"
className="absolute z-50 top-2 right-2 text-[var(--popup-text-color)] hover:text-[var(--popup-close-btn-hover-color)]"
onClick={onClose}
>
Expand All @@ -64,6 +65,7 @@ const NodeDetailsPopup = ({
<div className="font-mono text-xs text-[var(--text-color)] whitespace-nowrap">{extractPath(nodeId)}</div>
</div>
<button
aria-label="Copy path to clipboard"
onClick={copyPathToClipboard}
className="ml-2 p-1.5 text-[var(--navigation-text-color)] hover:text-[var(--text-color)] hover:bg-[var(--validation-bg-color)] rounded transition-colors flex-shrink-0"
title="Copy path to clipboard"
Expand Down