···
const isLocalRef = () => props.refType?.startsWith("#");
const isExternalRef = () => props.refType && !props.refType.startsWith("#");
86
-
const handleClick = async (e: MouseEvent) => {
86
+
const handleClick = async () => {
const defName = props.refType!.slice(1);
window.history.replaceState(null, "", `#schema:${defName}`);
···
290
-
const handleHeaderClick = (e: MouseEvent) => {
291
-
e.preventDefault();
289
+
const handleHeaderClick = () => {
window.history.replaceState(null, "", `#schema:${props.name}`);
const element = document.getElementById(`def-${props.name}`);
···
{/* Properties (for record/object types) */}
337
-
<Show when={props.def.properties || props.def.record?.properties}>
336
+
when={Object.keys(props.def.properties || props.def.record?.properties || {}).length > 0}
<div class="flex flex-col gap-2">
<h4 class="text-sm font-semibold text-neutral-600 uppercase dark:text-neutral-400">
···
{/* Parameters (for query/procedure) */}
357
-
<Show when={props.def.parameters?.properties}>
359
+
props.def.parameters?.properties &&
360
+
Object.keys(props.def.parameters.properties).length > 0
<div class="flex flex-col gap-2">
<h4 class="text-sm font-semibold text-neutral-600 uppercase dark:text-neutral-400">
···
<UnionBadges refs={props.def.input!.schema!.refs!} />
401
-
<Show when={props.def.input!.schema?.properties}>
408
+
props.def.input!.schema?.properties &&
409
+
Object.keys(props.def.input!.schema.properties).length > 0
<div class="divide-y divide-neutral-200 rounded-lg border border-neutral-200 bg-neutral-50/50 px-3 dark:divide-neutral-700 dark:border-neutral-700 dark:bg-neutral-800/30">
<For each={Object.entries(props.def.input!.schema!.properties!)}>
···
<UnionBadges refs={props.def.output!.schema!.refs!} />
443
-
<Show when={props.def.output!.schema?.properties}>
455
+
props.def.output!.schema?.properties &&
456
+
Object.keys(props.def.output!.schema.properties).length > 0
<div class="divide-y divide-neutral-200 rounded-lg border border-neutral-200 bg-neutral-50/50 px-3 dark:divide-neutral-700 dark:border-neutral-700 dark:bg-neutral-800/30">
<For each={Object.entries(props.def.output!.schema!.properties!)}>