@@ -49,6 +49,9 @@ <h1>JSONLab</h1>
4949 < button id ="btn-mode-query " class ="btn btn-secondary " title ="Query JSON ">
5050 < i data-lucide ="search-code " class ="icon "> </ i > Query
5151 </ button >
52+ < button id ="btn-mode-schema " class ="btn btn-secondary " title ="JSON Schema Gen/Val ">
53+ < i data-lucide ="file-json " class ="icon "> </ i > JSON Schema
54+ </ button >
5255 < div class ="toolbar-divider "> </ div >
5356 < button id ="btn-share-global " class ="btn btn-secondary " title ="Share Workspace as URL Snippet ">
5457 < i data-lucide ="share-2 " class ="icon "> </ i > Share
@@ -196,6 +199,40 @@ <h1>JSONLab</h1>
196199 </ div >
197200 </ div >
198201 </ div >
202+
203+ <!-- Schema Panel -->
204+ < div id ="schema-panel " class ="editor-panel schema-panel ">
205+ < div id ="schema-editors-container " class ="editors-container "
206+ style ="display: flex; flex: 1; min-height: 0; flex-direction: row; ">
207+ < div id ="schema-input-container " class ="editor-wrapper "
208+ style ="flex: 1; display: flex; flex-direction: column; min-width: 0; border-right: none; ">
209+ < div class ="panel-header "
210+ style ="background: var(--color-bg-secondary); padding: 8px 16px; border-bottom: 1px solid var(--color-border); font-weight: 600; font-size: 13px; ">
211+ JSON Payload</ div >
212+ </ div >
213+ < div id ="schema-splitter " class ="editor-splitter " style ="display: flex; "> </ div >
214+ < div id ="schema-output-container " class ="editor-wrapper "
215+ style ="flex: 1; display: flex; flex-direction: column; min-width: 0; ">
216+ < div class ="panel-header "
217+ style ="background: var(--color-bg-secondary); padding: 8px 16px; border-bottom: 1px solid var(--color-border); font-weight: 600; font-size: 13px; ">
218+ JSON Schema</ div >
219+ </ div >
220+ </ div >
221+ <!-- Validation Errors Panel -->
222+ < div id ="schema-resize-handle " class ="diff-resize-handle "> </ div >
223+ <!-- Schema Validation Errors -->
224+ < div id ="schema-errors-container " class ="diff-output "
225+ style ="height: 150px; border-top: 1px solid var(--color-border); display: flex; flex-direction: column; padding: 0; ">
226+ < div class ="diff-summary-header "
227+ style ="padding: 8px 12px; border-bottom: 1px solid var(--color-border); font-size: 13px; font-weight: 600; background: var(--color-bg-tertiary); display: flex; align-items: center; gap: 8px; ">
228+ < i data-lucide ="shield-check " style ="width: 16px; height: 16px; "> </ i > Validation Results
229+ </ div >
230+ < div id ="schema-errors-list "
231+ style ="flex: 1; overflow: auto; padding: var(--space-md); color: var(--color-text-muted); ">
232+ Waiting for validation...
233+ </ div >
234+ </ div >
235+ </ div >
199236 </ main >
200237
201238 <!-- footer -->
@@ -347,6 +384,7 @@ <h2>CSV Options</h2>
347384 < script type ="module " src ="js/utils/diffUtils.js "> </ script >
348385 < script type ="module " src ="js/utils/queryUtils.js "> </ script >
349386 < script type ="module " src ="js/utils/shareUtils.js "> </ script >
387+ < script type ="module " src ="js/utils/schemaUtils.js "> </ script >
350388 < script type ="module " src ="js/editor/textEditor.js "> </ script >
351389 < script type ="module " src ="js/editor/treeView.js "> </ script >
352390 < script type ="module " src ="js/editor/tableView.js "> </ script >
0 commit comments