|
|
@ -4,6 +4,7 @@ |
|
|
|
import { onMount } from 'svelte'; |
|
|
|
import { onMount } from 'svelte'; |
|
|
|
import Layout from '$/client/Layout.svelte'; |
|
|
|
import Layout from '$/client/Layout.svelte'; |
|
|
|
import Icon from '$/client/components/Icon.svelte'; |
|
|
|
import Icon from '$/client/components/Icon.svelte'; |
|
|
|
|
|
|
|
import Markdown from '$/client/components/Markdown.svelte'; |
|
|
|
import Blockstart from "$/client/components/Blockstart.svelte"; |
|
|
|
import Blockstart from "$/client/components/Blockstart.svelte"; |
|
|
|
import Code from "$/client/components/Code.svelte"; |
|
|
|
import Code from "$/client/components/Code.svelte"; |
|
|
|
import api from "$/client/api.js"; |
|
|
|
import api from "$/client/api.js"; |
|
|
@ -18,6 +19,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
docs_data = status === 200 ? data : {}; |
|
|
|
docs_data = status === 200 ? data : {}; |
|
|
|
url = to_load; |
|
|
|
url = to_load; |
|
|
|
|
|
|
|
console.log(docs_data); |
|
|
|
window.scrollTo(0, 0); |
|
|
|
window.scrollTo(0, 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -51,18 +53,56 @@ |
|
|
|
overflow-y: auto; |
|
|
|
overflow-y: auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#content { |
|
|
|
right { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
flex-direction: column; |
|
|
|
min-height: 100vh; |
|
|
|
min-height: 100vh; |
|
|
|
height: 100vh; |
|
|
|
height: 100vh; |
|
|
|
max-height: 100vh; |
|
|
|
max-height: 100vh; |
|
|
|
overflow-y: auto; |
|
|
|
overflow-y: auto; |
|
|
|
|
|
|
|
padding: 0.5rem; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
width: calc(100vw - 300px); |
|
|
|
|
|
|
|
min-width: calc(100vw - 300px); |
|
|
|
|
|
|
|
max-width: calc(100vw - 300px); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export > heading { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
background-color: var(--color-bg-secondary); |
|
|
|
|
|
|
|
border: 1px solid var(--value3); |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
padding: 0.5rem; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export > heading h4 { |
|
|
|
|
|
|
|
margin: 0px !important; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export > heading meta-data { |
|
|
|
|
|
|
|
display: grid; |
|
|
|
|
|
|
|
gap: 0.5rem; |
|
|
|
|
|
|
|
grid-template-columns: repeat(4, 1fr); |
|
|
|
|
|
|
|
grid-template-rows: auto; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export { |
|
|
|
|
|
|
|
margin-top: 1rem; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export > info { |
|
|
|
|
|
|
|
display: block; |
|
|
|
|
|
|
|
padding: 0.5rem; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export > info commment { |
|
|
|
|
|
|
|
display: block; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Layout footer={ false} header={ false } centered={ true } fullscreen={ true }> |
|
|
|
<Layout footer={ false} header={ false } centered={ true } fullscreen={ true }> |
|
|
|
<Blockstart> |
|
|
|
|
|
|
|
<block class="horizontal"> |
|
|
|
|
|
|
|
<sidebar> |
|
|
|
<sidebar> |
|
|
|
<top><h4><a href="/" use:link><Icon name="chevrons-up" /> Docs</a></h4></top> |
|
|
|
<top><h4><a href="/" use:link><Icon name="chevrons-up" /> Docs</a></h4></top> |
|
|
|
<items> |
|
|
|
<items> |
|
|
@ -72,33 +112,66 @@ |
|
|
|
</items> |
|
|
|
</items> |
|
|
|
</sidebar> |
|
|
|
</sidebar> |
|
|
|
|
|
|
|
|
|
|
|
<right id="content" style="--pad: 0.5rem;"> |
|
|
|
<right> |
|
|
|
|
|
|
|
<h1>{ url }</h1> |
|
|
|
{#if docs_data} |
|
|
|
{#if docs_data} |
|
|
|
{#each docs_data.exports as exp} |
|
|
|
{#each docs_data.exports as exp} |
|
|
|
<h1>{ url }</h1> |
|
|
|
{#if exp.isa === "class"} |
|
|
|
<h2>{exp.name}</h2> |
|
|
|
<h2>Class: { exp.name }</h2> |
|
|
|
|
|
|
|
<comment> |
|
|
|
{#if exp.comment} |
|
|
|
{#if exp.comment} |
|
|
|
<pre> |
|
|
|
{@html exp.comment} |
|
|
|
{ exp.comment.value } |
|
|
|
|
|
|
|
</pre> |
|
|
|
|
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
{#if exp.isa === "class"} |
|
|
|
</comment> |
|
|
|
{#each exp.methods as method} |
|
|
|
<Code content={ exp.code } language="javascript" /> |
|
|
|
<h4>{ method.name }</h4> |
|
|
|
|
|
|
|
|
|
|
|
{#each exp.methods as member} |
|
|
|
|
|
|
|
<export> |
|
|
|
|
|
|
|
<heading> |
|
|
|
|
|
|
|
<h4>{ member.name }</h4> |
|
|
|
|
|
|
|
<meta-data> |
|
|
|
|
|
|
|
{docs_data.source}:{ member.line_start } |
|
|
|
|
|
|
|
<em>{ member.isa }</em> |
|
|
|
|
|
|
|
{#if member.static}<b>static</b>{/if} |
|
|
|
|
|
|
|
{#if member.async}<b>async</b>{/if} |
|
|
|
|
|
|
|
{#if member.generator}<b>generator</b>{/if} |
|
|
|
|
|
|
|
</meta-data> |
|
|
|
|
|
|
|
</heading> |
|
|
|
|
|
|
|
<info> |
|
|
|
{#if exp.comment} |
|
|
|
{#if exp.comment} |
|
|
|
<pre> |
|
|
|
<comment> |
|
|
|
{ exp.comment.value } |
|
|
|
{ @html exp.comment } |
|
|
|
</pre> |
|
|
|
</comment> |
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
<Code content={ method.code } language="javascript" /> |
|
|
|
<h4>Signature</h4> |
|
|
|
|
|
|
|
<Code content={ member.code } language="javascript" /> |
|
|
|
|
|
|
|
</info> |
|
|
|
|
|
|
|
</export> |
|
|
|
{/each} |
|
|
|
{/each} |
|
|
|
{:else} |
|
|
|
{:else} |
|
|
|
|
|
|
|
<export> |
|
|
|
|
|
|
|
<heading> |
|
|
|
|
|
|
|
<h4> {exp.name}</h4> |
|
|
|
|
|
|
|
<meta-data> |
|
|
|
|
|
|
|
{docs_data.source}:{ exp.line_start } |
|
|
|
|
|
|
|
<em>{ exp.isa }</em> |
|
|
|
|
|
|
|
{#if exp.static}<b>static</b>{/if} |
|
|
|
|
|
|
|
{#if exp.async}<b>async</b>{/if} |
|
|
|
|
|
|
|
{#if exp.generator}<b>generator</b>{/if} |
|
|
|
|
|
|
|
</meta-data> |
|
|
|
|
|
|
|
</heading> |
|
|
|
|
|
|
|
<info> |
|
|
|
|
|
|
|
{#if exp.comment} |
|
|
|
|
|
|
|
<comment> |
|
|
|
|
|
|
|
{@html exp.comment} |
|
|
|
|
|
|
|
</comment> |
|
|
|
|
|
|
|
{/if} |
|
|
|
|
|
|
|
<h4>Signature</h4> |
|
|
|
<Code content={ exp.code } language="javascript" /> |
|
|
|
<Code content={ exp.code } language="javascript" /> |
|
|
|
|
|
|
|
</info> |
|
|
|
|
|
|
|
</export> |
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
{/each} |
|
|
|
{/each} |
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
</right> |
|
|
|
</right> |
|
|
|
</block> |
|
|
|
|
|
|
|
</Blockstart> |
|
|
|
|
|
|
|
</Layout> |
|
|
|
</Layout> |
|
|
|
|
|
|
|
|
|
|
|