Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscorn committed Feb 4, 2025
1 parent 7a0c6ed commit 25927f1
Show file tree
Hide file tree
Showing 26 changed files with 245 additions and 244 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: corepack enable
- run: npm i -g --force corepack && corepack enable

- uses: actions/setup-node@v4
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: corepack enable
- run: npm i -g --force corepack && corepack enable

- uses: actions/setup-node@v4
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4

- run: corepack enable
- run: npm i -g --force corepack && corepack enable

- uses: actions/setup-node@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"parser": "markdown"
}
}
]
],
"tailwindStylesheet": "./src/app.css"
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"@docsearch/js": "^3.8.3",
"@playwright/test": "^1.50.1",
"@sveltejs/adapter-auto": "^4.0.0",
"@sveltejs/kit": "^2.16.1",
"@sveltejs/package": "^2.3.9",
"@sveltejs/kit": "^2.17.1",
"@sveltejs/package": "^2.3.10",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@tailwindcss/typography": "^0.5.16",
"@tailwindcss/vite": "^4.0.3",
Expand Down Expand Up @@ -112,7 +112,7 @@
"publint": "^0.3.2",
"shiki": "^2.2.0",
"superjson": "^2.2.2",
"svelte": "^5.19.6",
"svelte": "^5.19.7",
"svelte-check": "^4.1.4",
"svelte-docgen": "https://pkg.pr.new/svelte-docgen/svelte-docgen/svelte-docgen@146593b",
"tailwind-merge": "^2.6.0",
Expand All @@ -121,10 +121,10 @@
"tailwindcss-animate": "^1.0.7",
"three": "^0.173.0",
"typescript": "^5.7.3",
"typescript-eslint": "^8.22.0",
"typescript-eslint": "^8.23.0",
"vite": "^6.0.11",
"vite-plugin-svelte-docgen": "https://pkg.pr.new/svelte-docgen/svelte-docgen/vite-plugin-svelte-docgen@146593b",
"vitest": "^3.0.4"
"vitest": "^3.0.5"
},
"packageManager": "[email protected]+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1"
}
382 changes: 191 additions & 191 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
}

@layer base {
Expand Down
2 changes: 1 addition & 1 deletion src/content/examples/clusters/Clusters.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Checkbox id="cluster" bind:checked={cluster} />
<Label
for="cluster"
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">Cluster</Label
class="text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70">Cluster</Label
>
</div>
<div class="flex flex-1 grow flex-col gap-y-4">
Expand Down
2 changes: 1 addition & 1 deletion src/content/examples/globe-atmosphere/Globe.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<!-- Control -->
<div
class="absolute left-3 top-3 z-10 flex min-w-[200px] flex-col items-stretch gap-1 rounded bg-background/60 p-3 text-sm backdrop-blur-sm"
class="absolute top-3 left-3 z-10 flex min-w-[200px] flex-col items-stretch gap-1 rounded bg-background/60 p-3 text-sm backdrop-blur-sm"
>
<div class="mb-4 flex flex-col items-center space-y-2 px-2">
<label for="theta" class="leading-none">Theta ({thetaDeg})</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
minPitch={pitchRange[0]}
maxPitch={pitchRange[1]}
>
<div class="absolute right-3 top-3 z-10 flex flex-col gap-1 rounded bg-background/60 p-3 text-sm backdrop-blur-sm">
<div class="absolute top-3 right-3 z-10 flex flex-col gap-1 rounded bg-background/60 p-3 text-sm backdrop-blur-sm">
<div class="mb-3 flex flex-col items-center space-y-2.5 px-2">
<Label for="zoom" class="leading-none">Zoom Range ({zoomRange})</Label>
<Slider type="multiple" id="zoom" bind:value={zoomRange} min={0} max={22} />
Expand Down
2 changes: 1 addition & 1 deletion src/content/examples/terradraw/TerraDraw.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

<!-- Draw controls -->
<div
class="absolute left-3 top-3 z-10 flex flex-col items-stretch gap-1 rounded bg-background/60 p-3 text-sm backdrop-blur-sm"
class="absolute top-3 left-3 z-10 flex flex-col items-stretch gap-1 rounded bg-background/60 p-3 text-sm backdrop-blur-sm"
>
{#each modeNames as modeName}
<label><input type="radio" bind:group={mode} value={modeName} class="mr-1" /> {modeName}</label>
Expand Down
2 changes: 1 addition & 1 deletion src/content/examples/terradraw/content.svelte.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Terra Draw
description: Use Terra Draw to draw a geometry in various forms such as point, line or polygon on your map.
description: Use Terra Draw to draw a geometry in various forms such as point, line or polygon on your map.
---

<script lang="ts">
Expand Down
2 changes: 1 addition & 1 deletion src/content/examples/terrain/Terrain.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
</RasterDEMTileSource>

<div
class="absolute left-3 top-3 z-10 flex min-w-[200px] flex-col items-stretch gap-1 rounded bg-background/60 p-3 text-sm backdrop-blur-sm"
class="absolute top-3 left-3 z-10 flex min-w-[200px] flex-col items-stretch gap-1 rounded bg-background/60 p-3 text-sm backdrop-blur-sm"
>
<Tabs.Root bind:value={mode} class="flex h-full flex-col">
<Tabs.List class="grid w-full grid-cols-2">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</script>

<nav>
<h2 class="mb-4 text-lg font-bold leading-none">{name}</h2>
<h2 class="mb-4 text-lg leading-none font-bold">{name}</h2>
{#each toc as subtoc}
<h3 class="my-3">{subtoc.title}</h3>
<ul class="flex flex-col text-sm">
Expand Down
12 changes: 7 additions & 5 deletions src/lib/maplibre/controls/GeolocateControl.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@
});
$effect(() => {
if (mapCtx.map?.loaded()) {
control?.trigger();
} else {
mapCtx.map?.once('load', () => {
if (autoTrigger) {
if (mapCtx.map?.loaded()) {
control?.trigger();
});
} else {
mapCtx.map?.once('load', () => {
control?.trigger();
});
}
}
});
Expand Down
11 changes: 6 additions & 5 deletions src/lib/maplibre/ext/contour/MapLibreContourSource.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
demSource?: DemSource;
tileOptions: GlobalContourTileOptions;
attribution?: string;
manager?: LocalDemManager;
getTile?: LocalDemManager['getTile'];
}
let {
Expand All @@ -32,11 +32,12 @@
actor,
tileOptions,
attribution,
manager
/** Custom getTile function for LocalDemManager (experimental) */
getTile
}: Props = $props();
$effect(() => {
if (manager) {
if (getTile) {
worker = false;
}
(async () => {
Expand All @@ -50,8 +51,8 @@
worker, // offload isoline computation to a web worker to reduce jank
actor
});
if (manager) {
demSource.manager = manager;
if (getTile && 'getTile' in demSource.manager) {
demSource.manager.getTile = getTile;
}
demSource.setupMaplibre(maplibregl);
})();
Expand Down
4 changes: 2 additions & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<ModeWatcher />
<ViewTransition />

<header class="sticky top-0 z-40 border-b bg-background bg-opacity-85 backdrop-blur-sm">
<div class="mx-auto px-4 xl:container md:px-8">
<header class="bg-opacity-85 sticky top-0 z-40 border-b bg-background backdrop-blur-sm">
<div class="mx-auto px-4 md:px-8 xl:container">
<Header bind:globalTocOpen />
</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</script>

<div class="container mx-auto w-full px-4 py-10 md:py-12">
<main class="prose dark:prose-invert mx-auto">
<main class="mx-auto prose dark:prose-invert">
<h1 class="mb-0">Svelte MapLibre GL</h1>
<p>
Svelte 5 wrapper for 🗺
Expand Down
4 changes: 2 additions & 2 deletions src/routes/DarkModeSelector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<DropdownMenu.Root>
<DropdownMenu.Trigger class={buttonVariants({ variant: 'ghost', size: 'icon' })}>
<Sun class="size-5! rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0 md:size-6!" />
<Moon class="absolute size-5! rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 md:size-6!" />
<Sun class="size-5! scale-100 rotate-0 transition-all md:size-6! dark:scale-0 dark:-rotate-90" />
<Moon class="absolute size-5! scale-0 rotate-90 transition-all md:size-6! dark:scale-100 dark:rotate-0" />
<span class="sr-only">Toggle theme</span>
</DropdownMenu.Trigger>
<DropdownMenu.Content align="end">
Expand Down
6 changes: 3 additions & 3 deletions src/routes/GlobalToc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
<div
id="global-toc"
class={cn(
`ease duration-400 fixed inset-0 z-50 bg-background/40 transition-all md:hidden`,
open ? 'opacity-100 backdrop-blur-xs' : 'pointer-events-none opacity-0 backdrop-blur-0'
`ease fixed inset-0 z-50 bg-background/40 transition-all duration-400 md:hidden`,
open ? 'opacity-100 backdrop-blur-xs' : 'backdrop-blur-0 pointer-events-none opacity-0'
)}
>
<div class="absolute inset-0" aria-hidden="true" onmousedown={() => (open = false)}></div>
<div
class={cn(
`ease duration-400 absolute inset-0 z-50 w-72 overflow-scroll bg-muted/90 transition-all md:hidden`,
`ease absolute inset-0 z-50 w-72 overflow-scroll bg-muted/90 transition-all duration-400 md:hidden`,
open ? 'translate-x-0 shadow-lg' : '-translate-x-full shadow-none'
)}
>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
>
<GitHub class="size-5! md:size-6!" />
</Button>
<div class="-ml-1 -mr-1 md:ml-1">
<div class="-mr-1 -ml-1 md:ml-1">
<DarkModeSelector />
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/docs/[slug]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
let { children } = $props();
</script>

<div class="mx-auto grid gap-4 px-4 xl:container md:grid-cols-[210px_minmax(0,1fr)] md:px-8">
<aside class="sticky bottom-0 top-[4.5rem] hidden h-[calc(100vh-4rem)] overflow-scroll py-10 md:block">
<div class="mx-auto grid gap-4 px-4 md:grid-cols-[210px_minmax(0,1fr)] md:px-8 xl:container">
<aside class="sticky top-[4.5rem] bottom-0 hidden h-[calc(100vh-4rem)] overflow-scroll py-10 md:block">
<Index name="Docs" {toc} />
</aside>
<main class="grid-cols-[1fr_210px]">
Expand Down
4 changes: 2 additions & 2 deletions src/routes/docs/components/[slug]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
let { children } = $props();
</script>

<div class="mx-auto grid gap-4 px-4 xl:container md:grid-cols-[210px_minmax(0,1fr)] md:px-8">
<aside class="sticky bottom-0 top-[4.5rem] hidden h-[calc(100vh-4rem)] overflow-scroll py-10 md:block">
<div class="mx-auto grid gap-4 px-4 md:grid-cols-[210px_minmax(0,1fr)] md:px-8 xl:container">
<aside class="sticky top-[4.5rem] bottom-0 hidden h-[calc(100vh-4rem)] overflow-scroll py-10 md:block">
<Index name="API Reference" {toc} />
</aside>
<main class="grid-cols-[1fr_210px]">
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/components/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<Table.Root>
<Table.Header>
<Table.Row>
<Table.Head class="min-w-[120px] max-w-[25%]">Property</Table.Head>
<Table.Head class="max-w-[25%] min-w-[120px]">Property</Table.Head>
<Table.Head>Type</Table.Head>
<Table.Head>Description</Table.Head>
</Table.Row>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/components/[slug]/Prop.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<Table.Row>
<Table.Cell class="">
<code class="break-all font-bold">{name}</code>
<code class="font-bold break-all">{name}</code>
<div class="text-xs font-semibold">
{#if prop.isOptional}
<span class="text-muted-foreground">optional</span>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/examples/[slug]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
let { children } = $props();
</script>

<div class="mx-auto grid gap-4 px-4 xl:container md:grid-cols-[210px_minmax(0,1fr)] md:px-8">
<aside class="sticky bottom-0 top-[4.5rem] hidden h-[calc(100vh-4rem)] overflow-scroll py-10 md:block">
<div class="mx-auto grid gap-4 px-4 md:grid-cols-[210px_minmax(0,1fr)] md:px-8 xl:container">
<aside class="sticky top-[4.5rem] bottom-0 hidden h-[calc(100vh-4rem)] overflow-scroll py-10 md:block">
<Index name="Examples" {toc} />
</aside>
<main class="grid-cols-[1fr_210px]">
Expand Down

0 comments on commit 25927f1

Please sign in to comment.