Skip to content

Commit

Permalink
chore: fix build-time warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdabbs committed Jun 8, 2024
1 parent 8f196b3 commit fbd9d15
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 22 deletions.
1 change: 0 additions & 1 deletion packages/core/src/Bundle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="vite/client" />
import { z } from 'zod'
import { Id, traitId } from './Id.js'
import { Property, propertySchema } from './Property.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "ISC",
"type": "module",
"scripts": {
"build": "vite build",
"build": "vite build --logLevel warn",
"cy:open": "cypress open",
"cy:run": "cypress run",
"dev": "vite",
Expand Down
8 changes: 8 additions & 0 deletions packages/viewer/public/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
color: #fff;
}

.example {
display: block;
box-sizing: border-box;
color: #212529;
font-family: SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
font-size: 14px;
margin: 0 0 1rem;
}
.example:hover {
cursor: pointer;
text-decoration: underline;
Expand Down
8 changes: 4 additions & 4 deletions packages/viewer/src/components/Search/Examples.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
{#each examples as { label, search } (label)}
<article>
<h5>{label}</h5>
<pre
class="example"
on:click={() => select(search)}
on:keydown={() => select(search)}>{search}</pre>
<!-- TODO: we shouldn't need an on:click here -->
<a href={`?q=${encodeURIComponent(search)}`} on:click={() => select(search)} class="example">
{search}
</a>
</article>
{/each}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@

<ul class="list-group suggestions">
{#each suggestions as property, i (property.id)}
<li
class="list-group-item {i === selected ? 'active' : ''}"
on:mouseover={() => onHover(i)}
on:focus={() => onHover(i)}
on:click={() => onClick(i)}
on:keydown={() => onClick(i)}
>
<Typeset body={property.name} />
<li class="list-group-item {i === selected ? 'active' : ''}">
<div
role="button"
tabindex={i}
on:mouseover={() => onHover(i)}
on:focus={() => onHover(i)}
on:click={() => onClick(i)}
on:keydown={() => onClick(i)}
>
<Typeset body={property.name} />
</div>
</li>
{/each}
</ul>
2 changes: 1 addition & 1 deletion packages/viewer/src/components/Shared/Link/Property.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Typeset } from '@/components/Shared'
import Typeset from '@/components/Shared/Typeset.svelte'
import { Id } from '@/models'
export let property: { id: number; name: string }
Expand Down
2 changes: 1 addition & 1 deletion packages/viewer/src/components/Shared/Link/Space.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import Typeset from '../Typeset.svelte'
import Typeset from '@/components/Shared/Typeset.svelte'
import { Id } from '@/models'
export let space: { id: number; name: string }
Expand Down
6 changes: 0 additions & 6 deletions packages/viewer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@
"public/*"
],
"compilerOptions": {
"baseUrl": ".",
"forceConsistentCasingInFileNames": true,
"paths": {
"@/*": ["./src/*"],
"$lib": ["./src/lib"],
"$lib/*": ["./src/lib/*"],
},
"sourceMap": true,
"strict": true,
"types": [
Expand Down

0 comments on commit fbd9d15

Please sign in to comment.