slds-json-schema-renderer 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ (function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.JsonSchemaDocs={},h.Vue))})(this,function(h,e){"use strict";const V="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTAwIiB3aWR0aD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBmaWxsPSIjZmZmIj48cGF0aCBkPSJNNzM4IDIwMEgyNjJjLTM0IDAtNjIgMjgtNjIgNjJ2NDc2YzAgMzQgMjggNjIgNjIgNjJoNDc2YzM0IDAgNjItMjggNjItNjJWMjYyYzAtMzQtMjgtNjItNjItNjJ6bS00NTUgNjJoNDM0YzExIDAgMjEgOSAyMSAyMXYzOUgyNjJ2LTM5YzAtMTIgOS0yMSAyMS0yMXptNDM0IDQ3NkgyODNjLTExIDAtMjEtOS0yMS0yMVYzODJoNDc2djMzNWMwIDEyLTkgMjEtMjEgMjF6TTQ2NyA2MzNsLTY2LTY2IDY2LTY2YzQtNCA0LTEwIDAtMTRsLTI4LTI4Yy00LTQtMTAtNC0xNCAwbC03MyA3My0xNSAxNS0xMyAxM2MtMiAyLTMgNS0zIDcgMCAzIDEgNSAzIDdsMTAyIDEwMmM0IDQgMTAgNCAxNCAwbDI4LTI4YzMtNSAzLTExLTEtMTV6bTIxMC03NC0xMy0xMy0xNS0xNS03My03M2MtNC00LTEwLTQtMTQgMGwtMjggMjhjLTQgNC00IDEwIDAgMTRsNjYgNjYtNjYgNjZjLTQgNC00IDEwIDAgMTRsMjggMjhjNCA0IDEwIDQgMTQgMGwxMDItMTAyYzItMiAzLTUgMy03eiIvPjwvc3ZnPg==",Rt="",M={class:"slds-page-header"},B={class:"slds-page-header__row"},D={class:"slds-page-header__col-title"},I={class:"slds-media"},$={class:"slds-media__body"},C={class:"slds-page-header__name"},A={class:"slds-page-header__name-title"},T=["title"],w={__name:"Header",props:{title:{type:String,default:"JSON Schema Documentation"}},setup(t){return(l,s)=>(e.openBlock(),e.createElementBlock("header",M,[e.createElementVNode("div",B,[e.createElementVNode("div",D,[e.createElementVNode("div",I,[s[0]||(s[0]=e.createElementVNode("div",{class:"slds-media__figure"},[e.createElementVNode("span",{class:"slds-icon_container slds-icon-standard-account"},[e.createElementVNode("img",{src:V,class:"slds-icon slds-icon_small",alt:""})])],-1)),e.createElementVNode("div",$,[e.createElementVNode("div",C,[e.createElementVNode("div",A,[e.createElementVNode("h1",{class:"slds-page-header__title slds-truncate",title:t.title},e.toDisplayString(t.title),9,T)])])])])])])]))}},Yt="",j={class:"slds-navigation-list--vertical"},O={class:"slds-navigation-list__item-content"},L={class:"slds-navigation-list__item-title"},z=["onClick"],P={__name:"Sidebar",props:{schemas:{type:Array,required:!0},selectedSchema:{type:Object,default:null}},emits:["select-schema"],setup(t,{emit:l}){var r;const s=t,n=l,o=e.ref(((r=s.selectedSchema)==null?void 0:r.fileName)||null),i=a=>{o.value=a.fileName,n("select-schema",a)},_=a=>{var c;return((c=a.schema)==null?void 0:c.title)||a.fileName||"Untitled Schema"};return(a,c)=>(e.openBlock(),e.createElementBlock("div",j,[c[0]||(c[0]=e.createElementVNode("div",{class:"slds-navigation-list__item"},[e.createElementVNode("div",{class:"slds-navigation-list__item-content"},[e.createElementVNode("div",{class:"slds-navigation-list__item-title"},[e.createElementVNode("span",{class:"slds-text-heading_small"},"Schemas")])])],-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.schemas,m=>(e.openBlock(),e.createElementBlock("div",{class:"slds-navigation-list__item",key:m.fileName},[e.createElementVNode("div",O,[e.createElementVNode("div",L,[e.createElementVNode("button",{class:e.normalizeClass(["slds-button slds-button_neutral slds-button_stretch",{"slds-is-active":o.value===m.fileName}]),onClick:d=>i(m)},e.toDisplayString(_(m)),11,z)])])]))),128))]))}},R={class:"slds-p-around_medium slds-theme_shade slds-text-align_center slds-text-body_small slds-mt-auto"},Y={class:"slds-grid slds-grid_align-spread slds-wrap"},q={class:"slds-col slds-size_1-of-1 slds-medium-size_1-of-3 slds-p-vertical_x-small"},G={key:0,class:"slds-text-color_weak"},Q={class:"slds-col slds-size_1-of-1 slds-medium-size_1-of-3 slds-p-vertical_x-small"},F={class:"slds-text-color_weak"},J={class:"slds-col slds-size_1-of-1 slds-medium-size_1-of-3 slds-p-vertical_x-small"},H={class:"slds-text-color_weak"},Z={__name:"Footer",props:{description:{type:String,default:""},generatedAt:{type:String,default:()=>new Date().toISOString()},schemaCount:{type:Number,default:0}},setup(t){const l=s=>new Date(s).toLocaleString();return(s,n)=>(e.openBlock(),e.createElementBlock("footer",R,[e.createElementVNode("div",Y,[e.createElementVNode("div",q,[t.description?(e.openBlock(),e.createElementBlock("span",G,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Q,[e.createElementVNode("span",F,e.toDisplayString(t.schemaCount)+" schema"+e.toDisplayString(t.schemaCount!==1?"s":"")+" documented ",1)]),e.createElementVNode("div",J,[e.createElementVNode("span",H," Generated at: "+e.toDisplayString(l(t.generatedAt)),1)])])]))}},U="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNTIiIHdpZHRoPSI1MiIgdmlld0JveD0iMCAwIDUyMCA1MjAiIGZpbGw9IiNmZmYiPjxwYXRoIGQ9Ik00NzYgMTc4IDI3MSAzODVjLTYgNi0xNiA2LTIyIDBMNDQgMTc4Yy02LTYtNi0xNiAwLTIybDIyLTIyYzYtNiAxNi02IDIyIDBsMTYxIDE2M2M2IDYgMTYgNiAyMiAwbDE2MS0xNjNjNi02IDE2LTYgMjIgMGwyMiAyMmM1IDcgNSAxNiAwIDIyeiIvPjwvc3ZnPg==",qt="",W={class:"slds-box slds-m-top_small"},X={class:"slds-box slds-theme_shade"},K={class:"slds-dl_horizontal slds-wrap"},v={class:"slds-size_1-of-3 slds-p-around_xx-small"},ee={class:"slds-text-title_caps"},te={class:"slds-size_2-of-3 slds-p-around_xx-small"},se={class:"slds-text-body_regular"},k={__name:"SchemaConstraints",props:{schema:{type:Object,required:!0}},setup(t){const l=t,s=e.computed(()=>{const i={};return["minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","pattern","minItems","maxItems","uniqueItems","minProperties","maxProperties"].forEach(r=>{l.schema[r]!==void 0&&(i[r]=l.schema[r])}),i}),n=i=>i.replace(/([A-Z])/g," $1").replace(/^./,_=>_.toUpperCase()),o=i=>typeof i=="boolean"?i?"Yes":"No":i;return(i,_)=>(e.openBlock(),e.createElementBlock("div",W,[_[0]||(_[0]=e.createElementVNode("div",{class:"slds-text-heading_small slds-m-bottom_small"},"Constraints",-1)),e.createElementVNode("div",X,[e.createElementVNode("dl",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(r,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[e.createElementVNode("dt",v,[e.createElementVNode("div",ee,e.toDisplayString(n(a)),1)]),e.createElementVNode("dd",te,[e.createElementVNode("div",se,e.toDisplayString(o(r)),1)])],64))),128))])])]))}},N={__name:"NestedSchemaContainer",setup(t){return(l,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"default")])]))}},S="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNTIiIHdpZHRoPSI1MiIgdmlld0JveD0iMCAwIDUyMCA1MjAiIGZpbGw9IiNmZmYiPjxwYXRoIGQ9Ik01MTQgNDI1IDI4NSA1NWEyOCAyOCAwIDAgMC01MCAwTDYgNDI1Yy0xNCAyMyAwIDU1IDI1IDU1aDQ1OGMyNSAwIDQwLTMyIDI1LTU1em0tMjU0LTI1Yy0xNyAwLTMwLTEzLTMwLTMwczEzLTMwIDMwLTMwIDMwIDEzIDMwIDMwLTEzIDMwLTMwIDMwem0zMC05MGMwIDYtNCAxMC0xMCAxMGgtNDBjLTYgMC0xMC00LTEwLTEwVjE4MGMwLTYgNC0xMCAxMC0xMGg0MGM2IDAgMTAgNCAxMCAxMHYxMzB6Ii8+PC9zdmc+",Gt="",x=(t,l)=>{const s=t.__vccOpts||t;for(const[n,o]of l)s[n]=o;return s},le={class:"slds-notify slds-notify_alert slds-theme_alert-texture slds-theme_warning",role:"alert"},oe={class:"slds-notify__content"},f=x({__name:"NoPropertiesMessage",props:{title:{type:String,default:"No Properties Defined"},message:{type:String,default:"This object doesn't have any properties defined in the schema."}},setup(t){return(l,s)=>(e.openBlock(),e.createElementBlock("div",le,[s[0]||(s[0]=e.createElementVNode("span",{class:"slds-assistive-text"},"warning",-1)),s[1]||(s[1]=e.createElementVNode("span",{class:"slds-icon_container slds-icon-utility-warning slds-m-right_x-small"},[e.createElementVNode("img",{src:S,class:"slds-icon slds-icon_x-small warning-icon",alt:""})],-1)),e.createElementVNode("h2",null,e.toDisplayString(t.title),1),e.createElementVNode("div",oe,[e.createElementVNode("p",null,e.toDisplayString(t.message),1)])]))}},[["__scopeId","data-v-4fd65729"]]),Ft="",ae={key:1},ne={key:2},ce={class:"slds-box slds-m-top_small"},ie={class:"slds-table_container"},de={class:"slds-table slds-table_cell-buffer slds-table_bordered"},re={class:"slds-hint-parent"},me=["title"],_e={class:"slds-truncate"},pe={class:"slds-badge"},he=["onClick","title"],Ne=["title"],ge={class:"slds-truncate"},ye={key:0,class:"slds-badge slds-badge_success"},Ee={key:1,class:"slds-badge slds-badge_inverse"},fe={key:0},Ve={colspan:"4",class:"slds-p-around_medium"},ke={class:"slds-box slds-theme_shade"},Se={key:4},xe={key:0},be={key:5},ue={__name:"ObjectSchema",props:{schema:{type:Object,required:!0},rootSchema:{type:Object,required:!0}},setup(t){const l=t,s=e.ref({}),n=e.computed(()=>["minProperties","maxProperties"].some(c=>c in l.schema)),o=e.computed(()=>l.schema.properties&&Object.keys(l.schema.properties).length>0),i=a=>l.schema.required&&l.schema.required.includes(a),_=a=>a.type==="object"||a.type==="array"||Array.isArray(a.type)&&(a.type.includes("object")||a.type.includes("array")),r=a=>{s.value[a]=!s.value[a]};return(a,c)=>(e.openBlock(),e.createElementBlock("div",null,[c[7]||(c[7]=e.createElementVNode("div",null,[e.createElementVNode("div",null,"Type: object")],-1)),n.value?(e.openBlock(),e.createBlock(k,{key:0,schema:t.schema},null,8,["schema"])):e.createCommentVNode("",!0),t.schema.required&&t.schema.required.length>0?(e.openBlock(),e.createElementBlock("div",ae,[c[0]||(c[0]=e.createElementVNode("span",null,"Required properties:",-1)),e.createElementVNode("span",null,e.toDisplayString(t.schema.required.join(", ")),1)])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",ce,[c[3]||(c[3]=e.createElementVNode("div",{class:"slds-text-heading_small slds-m-bottom_small"},"Properties",-1)),e.createElementVNode("div",ie,[e.createElementVNode("table",de,[c[2]||(c[2]=e.createElementVNode("thead",null,[e.createElementVNode("tr",{class:"slds-line-height_reset"},[e.createElementVNode("th",{class:"slds-text-title_caps",scope:"col"},[e.createElementVNode("div",{class:"slds-truncate",title:"Property"},"Property")]),e.createElementVNode("th",{class:"slds-text-title_caps",scope:"col"},[e.createElementVNode("div",{class:"slds-truncate",title:"Type"},"Type")]),e.createElementVNode("th",{class:"slds-text-title_caps",scope:"col"},[e.createElementVNode("div",{class:"slds-truncate",title:"Description"},"Description")]),e.createElementVNode("th",{class:"slds-text-title_caps",scope:"col"},[e.createElementVNode("div",{class:"slds-truncate",title:"Required"},"Required")])])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.schema.properties,(m,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[e.createElementVNode("tr",re,[e.createElementVNode("td",null,[e.createElementVNode("div",{class:"slds-truncate",title:d},e.toDisplayString(d),9,me)]),e.createElementVNode("td",null,[e.createElementVNode("div",_e,[e.createElementVNode("span",pe,e.toDisplayString(m.type),1),_(m)?(e.openBlock(),e.createElementBlock("button",{key:0,class:"slds-button slds-button_icon slds-button_icon_small slds-m-left_x-small",onClick:Pt=>r(d),title:s.value[d]?"Collapse":"Expand"},c[1]||(c[1]=[e.createElementVNode("img",{src:U,class:"slds-button__icon",alt:""},null,-1)]),8,he)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",null,[e.createElementVNode("div",{class:"slds-truncate",title:m.description},e.toDisplayString(m.description||"No description"),9,Ne)]),e.createElementVNode("td",null,[e.createElementVNode("div",ge,[i(d)?(e.openBlock(),e.createElementBlock("span",ye,"Required")):(e.openBlock(),e.createElementBlock("span",Ee,"Optional"))])])]),_(m)&&s.value[d]?(e.openBlock(),e.createElementBlock("tr",fe,[e.createElementVNode("td",Ve,[e.createElementVNode("div",ke,[e.createVNode(p,{schema:m,rootSchema:t.rootSchema,isRoot:!1},null,8,["schema","rootSchema"])])])])):e.createCommentVNode("",!0)],64))),128))])])])])])):(e.openBlock(),e.createBlock(f,{key:3})),t.schema.additionalProperties!==void 0?(e.openBlock(),e.createElementBlock("div",Se,[c[4]||(c[4]=e.createElementVNode("div",null,"Additional Properties",-1)),typeof t.schema.additionalProperties=="boolean"?(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("span",{class:e.normalizeClass(t.schema.additionalProperties?"status-allowed":"status-denied")},e.toDisplayString(t.schema.additionalProperties?"Allowed":"Not allowed"),3)])):(e.openBlock(),e.createBlock(N,{key:1},{default:e.withCtx(()=>[e.createVNode(p,{schema:t.schema.additionalProperties,rootSchema:t.rootSchema,isRoot:!1},null,8,["schema","rootSchema"])]),_:1}))])):e.createCommentVNode("",!0),t.schema.patternProperties?(e.openBlock(),e.createElementBlock("div",be,[c[6]||(c[6]=e.createElementVNode("div",null,"Pattern Properties",-1)),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.schema.patternProperties,(m,d)=>(e.openBlock(),e.createElementBlock("div",{key:d},[e.createVNode(N,null,{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",null,[c[5]||(c[5]=e.createElementVNode("span",null,"Pattern:",-1)),e.createElementVNode("code",null,e.toDisplayString(d),1)])]),e.createVNode(p,{schema:m,rootSchema:t.rootSchema,isRoot:!1},null,8,["schema","rootSchema"])]),_:2},1024)]))),128))])])):e.createCommentVNode("",!0)]))}},Jt="",Me={key:1},Be={key:3},De={key:4},Ie={key:0},$e={key:5,class:"slds-box slds-m-top_small"},Ce={class:"slds-box slds-theme_shade"},Ae={class:"slds-text-body_regular"},Te={class:"slds-grid slds-gutters"},we={class:"slds-col"},je={class:"slds-badge"},Oe={class:"slds-col"},Le={__name:"ArraySchema",props:{schema:{type:Object,required:!0},rootSchema:{type:Object,required:!0}},setup(t){const l=t,s=e.computed(()=>["minItems","maxItems","uniqueItems"].some(o=>o in l.schema));return(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[o[6]||(o[6]=e.createElementVNode("div",null,[e.createElementVNode("span",null,"Type: array")],-1)),s.value?(e.openBlock(),e.createBlock(k,{key:0,schema:t.schema},null,8,["schema"])):e.createCommentVNode("",!0),t.schema.items?(e.openBlock(),e.createElementBlock("div",Me,[o[0]||(o[0]=e.createElementVNode("div",null,"Items:",-1)),e.createVNode(N,null,{default:e.withCtx(()=>[Array.isArray(t.schema.items)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.schema.items,(i,_)=>(e.openBlock(),e.createElementBlock("div",{key:_},[e.createElementVNode("div",null," Index "+e.toDisplayString(_)+": ",1),e.createVNode(p,{schema:i,rootSchema:t.rootSchema,isRoot:!1},null,8,["schema","rootSchema"])]))),128)):(e.openBlock(),e.createBlock(p,{key:1,schema:t.schema.items,rootSchema:t.rootSchema,isRoot:!1},null,8,["schema","rootSchema"]))]),_:1})])):(e.openBlock(),e.createBlock(f,{key:2,title:"No Items Defined",message:"This array doesn't have any items defined in the schema."})),t.schema.contains?(e.openBlock(),e.createElementBlock("div",Be,[o[1]||(o[1]=e.createElementVNode("div",null,"Contains:",-1)),e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(p,{schema:t.schema.contains,rootSchema:t.rootSchema,isRoot:!1},null,8,["schema","rootSchema"])]),_:1})])):e.createCommentVNode("",!0),t.schema.additionalItems!==void 0&&Array.isArray(t.schema.items)?(e.openBlock(),e.createElementBlock("div",De,[o[2]||(o[2]=e.createElementVNode("div",null,"Additional Items:",-1)),typeof t.schema.additionalItems=="boolean"?(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("span",{class:e.normalizeClass(t.schema.additionalItems?"status-allowed":"status-denied")},e.toDisplayString(t.schema.additionalItems?"Allowed":"Not allowed"),3)])):(e.openBlock(),e.createBlock(N,{key:1},{default:e.withCtx(()=>[e.createVNode(p,{schema:t.schema.additionalItems,rootSchema:t.rootSchema,isRoot:!1},null,8,["schema","rootSchema"])]),_:1}))])):e.createCommentVNode("",!0),t.schema.items?(e.openBlock(),e.createElementBlock("div",$e,[o[5]||(o[5]=e.createElementVNode("div",{class:"slds-text-heading_small slds-m-bottom_small"},"Array Items",-1)),e.createElementVNode("div",Ce,[e.createElementVNode("div",Ae,[e.createElementVNode("div",Te,[e.createElementVNode("div",we,[o[3]||(o[3]=e.createElementVNode("div",{class:"slds-text-title_caps slds-m-bottom_xx-small"},"Type",-1)),e.createElementVNode("div",je,e.toDisplayString(t.schema.items.type),1)]),e.createElementVNode("div",Oe,[o[4]||(o[4]=e.createElementVNode("div",{class:"slds-text-title_caps slds-m-bottom_xx-small"},"Description",-1)),e.createElementVNode("div",null,e.toDisplayString(t.schema.items.description||"No description"),1)])])])])])):e.createCommentVNode("",!0)]))}},Ht="",ze={class:"slds-box slds-m-top_small"},Pe={class:"slds-box slds-theme_shade"},Re={class:"slds-text-body_regular"},Ye={class:"slds-grid slds-gutters"},qe={class:"slds-col"},Ge={class:"slds-badge"},Qe={class:"slds-col"},g={__name:"PrimitiveSchema",props:{schema:{type:Object,required:!0}},setup(t){const l=t;return e.computed(()=>({string:["minLength","maxLength","pattern"],number:["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf"],integer:["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf"]}[l.schema.type]||[]).some(o=>o in l.schema)),e.computed(()=>({string:"type-string",number:"type-number",integer:"type-integer",boolean:"type-boolean",null:"type-null"})[l.schema.type]||""),(s,n)=>(e.openBlock(),e.createElementBlock("div",ze,[n[2]||(n[2]=e.createElementVNode("div",{class:"slds-text-heading_small slds-m-bottom_small"},"Type Information",-1)),e.createElementVNode("div",Pe,[e.createElementVNode("div",Re,[e.createElementVNode("div",Ye,[e.createElementVNode("div",qe,[n[0]||(n[0]=e.createElementVNode("div",{class:"slds-text-title_caps slds-m-bottom_xx-small"},"Type",-1)),e.createElementVNode("div",Ge,e.toDisplayString(t.schema.type),1)]),e.createElementVNode("div",Qe,[n[1]||(n[1]=e.createElementVNode("div",{class:"slds-text-title_caps slds-m-bottom_xx-small"},"Description",-1)),e.createElementVNode("div",null,e.toDisplayString(t.schema.description||"No description"),1)])])])])]))}},Zt="",Fe={class:"slds-box slds-theme_shade"},Je={class:"slds-text-heading_small slds-m-bottom_small"},He={class:"slds-tabs_default"},Ze={class:"slds-tabs_default__nav",role:"tablist"},Ue=["aria-selected","aria-controls","onClick"],We={class:"slds-tabs_default__title"},Xe=["id"],Ke={class:"slds-p-around_medium"},ve={class:"slds-text-title_caps slds-m-bottom_small"},et={__name:"CompositionSchema",props:{schema:{type:Object,required:!0},compositionType:{type:String,required:!0,validator:t=>["anyOf","oneOf","allOf"].includes(t)},rootSchema:{type:Object,required:!0}},setup(t){const l=t,s=e.ref(0),n=e.computed(()=>l.schema[l.compositionType]||[]),o=e.computed(()=>{switch(l.compositionType){case"oneOf":return"One Of (Choose One)";case"anyOf":return"Any Of (Choose Any)";case"allOf":return"All Of (Must Match All)";default:return l.compositionType}}),i=e.computed(()=>{switch(l.compositionType){case"oneOf":return"slds-badge_success";case"anyOf":return"slds-badge_warning";case"allOf":return"slds-badge_inverse";default:return""}}),_=a=>Array.isArray(a.type)?a.type.join(" | "):a.type||"object",r=(a,c)=>a.title?a.title:`Option ${c+1}`;return(a,c)=>(e.openBlock(),e.createElementBlock("div",Fe,[e.createElementVNode("div",Je,[e.createElementVNode("span",{class:e.normalizeClass(["slds-badge",i.value])},e.toDisplayString(o.value),3)]),e.createElementVNode("div",He,[e.createElementVNode("ul",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(m,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["slds-tabs_default__item",{"slds-is-active":s.value===d}]),role:"presentation"},[e.createElementVNode("a",{class:"slds-tabs_default__link",role:"tab",tabindex:"0","aria-selected":s.value===d,"aria-controls":`tab-${d}`,onClick:Pt=>s.value=d},[e.createElementVNode("span",We,e.toDisplayString(r(m,d)),1)],8,Ue)],2))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(m,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,id:`tab-${d}`,class:e.normalizeClass(["slds-tabs_default__content",{"slds-show":s.value===d,"slds-hide":s.value!==d}]),role:"tabpanel"},[e.createElementVNode("div",Ke,[e.createElementVNode("div",ve,"Schema Type: "+e.toDisplayString(_(m)),1),e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(p,{schema:m,rootSchema:t.rootSchema,isRoot:!1},null,8,["schema","rootSchema"])]),_:2},1024)])],10,Xe))),128))])]))}},Ut="",tt=["title"],st={key:0},lt={key:1},ot=x({__name:"ReferenceResolver",props:{schema:{type:Object,required:!0},rootSchema:{type:Object,required:!0}},emits:["navigate-to-definition"],setup(t,{emit:l}){const s=t,n=l,o=r=>{const a=r.split("/");return a[a.length-1]},i=e.computed(()=>{if(!s.schema.$ref)return null;const r=s.schema.$ref.split("/");let a=s.rootSchema;for(let c=1;c<r.length;c++){if(!a)return null;a=a[r[c]]}return a}),_=()=>{n("navigate-to-definition",{definitionName:o(s.schema.$ref)})};return(r,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",null,[a[0]||(a[0]=e.createElementVNode("span",null,"Reference",-1)),e.createElementVNode("button",{onClick:_,title:t.schema.$ref},e.toDisplayString(o(t.schema.$ref)),9,tt)]),i.value?(e.openBlock(),e.createElementBlock("div",st,[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(p,{schema:i.value,rootSchema:t.rootSchema,isRoot:!1},null,8,["schema","rootSchema"])]),_:1})])):(e.openBlock(),e.createElementBlock("div",lt,[e.createElementVNode("div",null,[a[2]||(a[2]=e.createElementVNode("div",null,[e.createElementVNode("span",null,[e.createElementVNode("img",{src:S,class:"warning-icon",alt:""})])],-1)),e.createElementVNode("div",null,[a[1]||(a[1]=e.createElementVNode("h3",null,"Reference Not Found",-1)),e.createElementVNode("p",null,"Could not resolve reference: "+e.toDisplayString(t.schema.$ref),1)])])]))]))}},[["__scopeId","data-v-c4f26fb8"]]);function E(t,l){if(!t)return t;if(t.$ref){const s=t.$ref.split("/");let n=l;for(let o=1;o<s.length;o++){if(!n)return t;n=n[s[o]]}return E(n,l)}if(Array.isArray(t))return t.map(s=>E(s,l));if(typeof t=="object"){const s={};for(const[n,o]of Object.entries(t))n!=="$ref"&&(s[n]=E(o,l));return s}return t}const at={object:ue,array:Le,string:g,number:g,integer:g,boolean:g,null:g},y={hasReference:t=>!!t.$ref,hasComposition:t=>!!(t.anyOf||t.oneOf||t.allOf),getCompositionType:t=>t.anyOf?"anyOf":t.oneOf?"oneOf":t.allOf?"allOf":null,isPrimitiveType:t=>["string","number","integer","boolean","null"].includes(t.type),getComponentForSchema:t=>y.hasReference(t)?ot:y.hasComposition(t)?et:at[t.type]||null,resolveReferences:E},Xt="",nt={class:"slds-grid slds-grid_vertical"},ct={class:"slds-col slds-size_1-of-1"},it={class:"slds-card"},dt={class:"slds-card__body slds-card__body_inner"},rt={__name:"SchemaLayout",setup(t){return(l,s)=>(e.openBlock(),e.createElementBlock("div",nt,[e.createElementVNode("div",ct,[e.createElementVNode("div",it,[e.createElementVNode("div",dt,[e.renderSlot(l.$slots,"default")])])])]))}},Kt="",mt={class:"slds-tabs_default__nav",role:"tablist"},_t={__name:"SchemaTabs",props:{modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t){return(l,s)=>(e.openBlock(),e.createElementBlock("ul",mt,[e.createElementVNode("li",{class:e.normalizeClass(["slds-tabs_default__item",{"slds-is-active":t.modelValue==="visual"}]),role:"presentation"},[e.createElementVNode("a",{class:"slds-tabs_default__link",role:"tab",tabindex:"0","aria-selected":"true","aria-controls":"visual-tab",onClick:s[0]||(s[0]=n=>l.$emit("update:modelValue","visual"))},s[2]||(s[2]=[e.createElementVNode("span",{class:"slds-tabs_default__title"},"Visual",-1)]))],2),e.createElementVNode("li",{class:e.normalizeClass(["slds-tabs_default__item",{"slds-is-active":t.modelValue==="plain"}]),role:"presentation"},[e.createElementVNode("a",{class:"slds-tabs_default__link",role:"tab",tabindex:"0","aria-selected":"true","aria-controls":"plain-tab",onClick:s[1]||(s[1]=n=>l.$emit("update:modelValue","plain"))},s[3]||(s[3]=[e.createElementVNode("span",{class:"slds-tabs_default__title"},"Plain JSON",-1)]))],2)]))}},vt="",pt={class:"slds-page-header"},ht={class:"slds-page-header__row"},Nt={class:"slds-page-header__col-title"},gt={class:"slds-media"},yt={class:"slds-media__body"},Et={class:"slds-page-header__name"},ft={class:"slds-page-header__name-title"},Vt={class:"slds-page-header__title slds-truncate",title:"{{ schema.title || 'Schema' }}"},kt={class:"slds-page-header__meta-text"},St={__name:"SchemaHeader",props:{schema:{type:Object,required:!0}},setup(t){const l=t;return e.computed(()=>!!(l.schema.title||l.schema.description)),(s,n)=>(e.openBlock(),e.createElementBlock("div",pt,[e.createElementVNode("div",ht,[e.createElementVNode("div",Nt,[e.createElementVNode("div",gt,[n[0]||(n[0]=e.createElementVNode("div",{class:"slds-media__figure"},[e.createElementVNode("span",{class:"slds-icon_container slds-icon-standard-account"},[e.createElementVNode("img",{src:V,class:"slds-icon slds-icon_small",alt:""})])],-1)),e.createElementVNode("div",yt,[e.createElementVNode("div",Et,[e.createElementVNode("div",ft,[e.createElementVNode("h1",Vt,e.toDisplayString(t.schema.title||"Schema"),1)])]),e.createElementVNode("div",kt,e.toDisplayString(t.schema.description||"No description provided"),1)])])])])]))}},es="",xt={class:"slds-box"},bt={class:"slds-box slds-theme_shade"},ut={__name:"PlainSchemaView",props:{schema:{type:Object,required:!0}},setup(t){const l=t,s=e.computed(()=>JSON.stringify(l.schema,null,2));return(n,o)=>(e.openBlock(),e.createElementBlock("div",xt,[o[0]||(o[0]=e.createElementVNode("div",{class:"slds-text-heading_small slds-m-bottom_small"},"Raw JSON Schema",-1)),e.createElementVNode("pre",bt,[e.createElementVNode("code",null,e.toDisplayString(s.value),1)])]))}},Mt={class:"slds-box slds-theme_shade"},Bt={class:"slds-grid slds-wrap slds-gutters"},Dt={class:"slds-badge slds-badge_inverse"},It={__name:"SchemaEnum",props:{values:{type:Array,required:!0}},setup(t){return(l,s)=>(e.openBlock(),e.createElementBlock("div",Mt,[s[0]||(s[0]=e.createElementVNode("div",{class:"slds-text-heading_small slds-m-bottom_small"},"Enum Values",-1)),e.createElementVNode("div",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"slds-col slds-size_1-of-3 slds-p-around_xx-small"},[e.createElementVNode("div",Dt,e.toDisplayString(n),1)]))),128))])]))}},ts="",$t={class:"slds-tabs_default"},Ct={class:"slds-p-around_medium"},At={class:"slds-m-top_medium"},Tt={class:"slds-p-around_medium"},p={__name:"SchemaViewer",props:{schema:{type:Object,required:!0},rootSchema:{type:Object,default:null},isRoot:{type:Boolean,default:!0}},setup(t){const l=t,s=e.ref("visual"),n=e.computed(()=>l.isRoot?l.schema:l.rootSchema),o=e.computed(()=>y.resolveReferences(l.schema,n.value));e.provide("rootSchema",n);const i=e.computed(()=>y.getComponentForSchema(o.value)),_=e.computed(()=>y.getCompositionType(o.value)),r=a=>{const c=document.getElementById(`definition-${a.definitionName}`);c&&(c.scrollIntoView({behavior:"smooth"}),c.classList.add("highlight"),setTimeout(()=>{c.classList.remove("highlight")},2e3))};return(a,c)=>(e.openBlock(),e.createBlock(rt,null,{default:e.withCtx(()=>[e.createElementVNode("div",$t,[e.createVNode(_t,{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=m=>s.value=m)},null,8,["modelValue"]),e.createElementVNode("div",{class:e.normalizeClass({"slds-show":s.value==="visual","slds-hide":s.value!=="visual"})},[e.createElementVNode("div",Ct,[e.createVNode(St,{schema:o.value},null,8,["schema"]),e.createElementVNode("div",At,[i.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{key:0,schema:o.value,rootSchema:n.value,compositionType:_.value,onNavigateToDefinition:r},null,40,["schema","rootSchema","compositionType"])):(e.openBlock(),e.createBlock(f,{key:1})),o.value.enum?(e.openBlock(),e.createBlock(It,{key:2,values:o.value.enum,class:"slds-m-top_medium"},null,8,["values"])):e.createCommentVNode("",!0)])])],2),e.createElementVNode("div",{class:e.normalizeClass({"slds-show":s.value==="plain","slds-hide":s.value!=="plain"})},[e.createElementVNode("div",Tt,[e.createVNode(ut,{schema:o.value},null,8,["schema"])])],2)])]),_:1}))}},wt={class:"slds-grid slds-grid_vertical"},jt={class:"slds-grid slds-gutters slds-grid_vertical-fill"},Ot={class:"slds-col slds-size_2-of-12"},Lt={class:"slds-col slds-size_10-of-12"},zt={key:1,class:"slds-p-around_medium"},b={__name:"App",props:{title:{type:String,default:"JSON Schema Documentation"},description:{type:String,default:""},schemas:{type:Array,default:()=>[]},generatedAt:{type:String,default:()=>new Date().toISOString()}},setup(t){const l=t,s=e.ref(l.schemas.length>0?l.schemas[0]:null),n=o=>{s.value=o};return(o,i)=>(e.openBlock(),e.createElementBlock("div",wt,[e.createVNode(w,{title:t.title},null,8,["title"]),e.createElementVNode("div",jt,[e.createElementVNode("div",Ot,[e.createVNode(P,{schemas:t.schemas,selectedSchema:s.value,onSelectSchema:n},null,8,["schemas","selectedSchema"])]),e.createElementVNode("div",Lt,[s.value?(e.openBlock(),e.createBlock(p,{key:0,schema:s.value.schema,"is-root":!0},null,8,["schema"])):(e.openBlock(),e.createElementBlock("div",zt,i[0]||(i[0]=[e.createStaticVNode('<div class="slds-text-align_center"><svg viewBox="0 0 454 272" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><circle vector-effect="non-scaling-stroke" cx="150" cy="150" r="40" fill="#F9F9F9"></circle><circle vector-effect="non-scaling-stroke" cx="150" cy="150" r="30" fill="#ECEBEA"></circle><circle vector-effect="non-scaling-stroke" cx="150" cy="150" r="20" fill="#D9D7D5"></circle></g></svg></div><div class="slds-text-align_center slds-m-top_medium"><h3 class="slds-text-heading_medium">No Schema Selected</h3><p class="slds-text-body_regular slds-m-top_small"> Select a schema from the sidebar to view its documentation. </p></div>',2)])))])]),e.createVNode(Z,{description:t.description,generatedAt:t.generatedAt,schemaCount:t.schemas.length},null,8,["description","generatedAt","schemaCount"])]))}},ss="";async function u(){const t=window.__JSON_SCHEMA_DOCS_DATA__||{title:"JSON Schema Documentation",description:"",schemas:[],generatedAt:new Date().toISOString()};document.getElementById("app")&&e.createApp(b,t).mount("#app")}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",u):u(),Object.defineProperty(h,"createApp",{enumerable:!0,get:()=>e.createApp}),h.App=b,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});