mirror of
https://github.com/youwen5/site.git
synced 2024-11-24 17:33:51 -08:00
style: use spaces and no semicolons in JS
This commit is contained in:
parent
56c82574ec
commit
5e1af688ea
121 changed files with 3603 additions and 3603 deletions
|
@ -28,4 +28,4 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
overrides = [{ "files" = "*.svelte", "options" = { "parser" = "svelte" } }]
|
||||
useTabs = true
|
||||
useTabs = false
|
||||
singleQuote = true
|
||||
trailingComma = "none"
|
||||
printWidth = 100
|
||||
proseWrap = "always"
|
||||
plugins = ["prettier-plugin-svelte"]
|
||||
semi = false
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { PlaywrightTestConfig } from '@playwright/test';
|
||||
import type { PlaywrightTestConfig } from '@playwright/test'
|
||||
|
||||
const config: PlaywrightTestConfig = {
|
||||
webServer: {
|
||||
|
@ -7,6 +7,6 @@ const config: PlaywrightTestConfig = {
|
|||
},
|
||||
testDir: 'tests',
|
||||
testMatch: /(.+\.)?(test|spec)\.[jt]s/
|
||||
};
|
||||
}
|
||||
|
||||
export default config;
|
||||
export default config
|
||||
|
|
|
@ -3,4 +3,4 @@ export default {
|
|||
tailwindcss: {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
2
src/app.d.ts
vendored
2
src/app.d.ts
vendored
|
@ -10,4 +10,4 @@ declare global {
|
|||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
export {}
|
||||
|
|
52
src/globals.d.ts
vendored
52
src/globals.d.ts
vendored
|
@ -1,35 +1,35 @@
|
|||
interface BlogDocument {
|
||||
date: Date;
|
||||
title: string;
|
||||
content: string;
|
||||
primaryTags: string[];
|
||||
secondaryTags: string[];
|
||||
blurb: string;
|
||||
image: { src: string; alt: string; caption: string };
|
||||
description: string;
|
||||
slug: string;
|
||||
date: Date
|
||||
title: string
|
||||
content: string
|
||||
primaryTags: string[]
|
||||
secondaryTags: string[]
|
||||
blurb: string
|
||||
image: { src: string; alt: string; caption: string }
|
||||
description: string
|
||||
slug: string
|
||||
}
|
||||
|
||||
declare module 'remark-sectionize';
|
||||
declare module 'remark-sectionize'
|
||||
|
||||
type PostMeta = {
|
||||
title: string;
|
||||
title: string
|
||||
manifest: {
|
||||
authors: string[];
|
||||
date: Date;
|
||||
tags: { primary: string[]; secondary: string[] };
|
||||
blurb: string;
|
||||
description: string;
|
||||
highlight: boolean;
|
||||
};
|
||||
authors: string[]
|
||||
date: Date
|
||||
tags: { primary: string[]; secondary: string[] }
|
||||
blurb: string
|
||||
description: string
|
||||
highlight: boolean
|
||||
}
|
||||
cover: {
|
||||
src: string;
|
||||
alt: string;
|
||||
caption: string;
|
||||
};
|
||||
src: string
|
||||
alt: string
|
||||
caption: string
|
||||
}
|
||||
deps?: {
|
||||
external?: {
|
||||
styles?: string[];
|
||||
};
|
||||
};
|
||||
};
|
||||
styles?: string[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script lang="ts">
|
||||
import { fly } from 'svelte/transition';
|
||||
import { fly } from 'svelte/transition'
|
||||
|
||||
export let height = '192';
|
||||
export let width = 'auto';
|
||||
export let href: string = '/blog';
|
||||
export let transition: 'vertical' | 'horizontal' = 'horizontal';
|
||||
export let height = '192'
|
||||
export let width = 'auto'
|
||||
export let href: string = '/blog'
|
||||
export let transition: 'vertical' | 'horizontal' = 'horizontal'
|
||||
</script>
|
||||
|
||||
<svg
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts">
|
||||
import { fly } from 'svelte/transition';
|
||||
import { fly } from 'svelte/transition'
|
||||
|
||||
export let height = '192';
|
||||
export let width = 'auto';
|
||||
export let href: string;
|
||||
export let height = '192'
|
||||
export let width = 'auto'
|
||||
export let href: string
|
||||
</script>
|
||||
|
||||
<svg
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { fly } from 'svelte/transition';
|
||||
import Button from './ui/button/button.svelte';
|
||||
import { ChevronUp } from 'svelte-radix';
|
||||
import { onMount } from 'svelte'
|
||||
import { fly } from 'svelte/transition'
|
||||
import Button from './ui/button/button.svelte'
|
||||
import { ChevronUp } from 'svelte-radix'
|
||||
|
||||
let showButton = false;
|
||||
let showButton = false
|
||||
|
||||
function handleScroll() {
|
||||
const threshold = 400;
|
||||
const threshold = 400
|
||||
|
||||
showButton = window.scrollY > threshold;
|
||||
showButton = window.scrollY > threshold
|
||||
}
|
||||
|
||||
function scrollToTop() {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts">
|
||||
import ChevronRight from 'svelte-radix/ChevronRight.svelte';
|
||||
import * as Card from '$lib/components/ui/card';
|
||||
import Separator from '$lib/components/ui/separator/separator.svelte';
|
||||
import ChevronRight from 'svelte-radix/ChevronRight.svelte'
|
||||
import * as Card from '$lib/components/ui/card'
|
||||
import Separator from '$lib/components/ui/separator/separator.svelte'
|
||||
|
||||
export let archived: Object | undefined = undefined;
|
||||
export let archived: Object | undefined = undefined
|
||||
</script>
|
||||
|
||||
<!--
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts">
|
||||
import PostMetadata from './PostMetadata.svelte';
|
||||
import Crumbs from './Crumbs.svelte';
|
||||
import PostMetadata from './PostMetadata.svelte'
|
||||
import Crumbs from './Crumbs.svelte'
|
||||
|
||||
export let doc: BlogDocument;
|
||||
export let doc: BlogDocument
|
||||
</script>
|
||||
|
||||
<article>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script lang="ts">
|
||||
import * as Breadcrumb from '../ui/breadcrumb';
|
||||
import * as Breadcrumb from '../ui/breadcrumb'
|
||||
|
||||
export let slug: string;
|
||||
export let title: string;
|
||||
export let slug: string
|
||||
export let title: string
|
||||
|
||||
$: trail = slug.split('/').slice(0, slug.split('/').length - 1);
|
||||
$: trail = slug.split('/').slice(0, slug.split('/').length - 1)
|
||||
</script>
|
||||
|
||||
<Breadcrumb.Root class="mb-4">
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<script lang="ts">
|
||||
import * as Card from '$lib/components/ui/card';
|
||||
import Button from '../ui/button/button.svelte';
|
||||
import PostMetadata from './PostMetadata.svelte';
|
||||
import * as Card from '$lib/components/ui/card'
|
||||
import Button from '../ui/button/button.svelte'
|
||||
import PostMetadata from './PostMetadata.svelte'
|
||||
|
||||
export let doc: {
|
||||
metadata: PostMeta;
|
||||
content: string;
|
||||
slug: string;
|
||||
};
|
||||
metadata: PostMeta
|
||||
content: string
|
||||
slug: string
|
||||
}
|
||||
</script>
|
||||
|
||||
<Card.Root>
|
||||
|
|
|
@ -17,19 +17,19 @@
|
|||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import Badge from '../ui/badge/badge.svelte';
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import Badge from '../ui/badge/badge.svelte'
|
||||
import dayjs from 'dayjs'
|
||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
dayjs.extend(relativeTime)
|
||||
|
||||
export let primaryTags: string[] = [];
|
||||
export let secondaryTags: string[] = [];
|
||||
export let date: Date;
|
||||
export let length: number;
|
||||
export let reverseDateAndRest: boolean = false;
|
||||
export let primaryTags: string[] = []
|
||||
export let secondaryTags: string[] = []
|
||||
export let date: Date
|
||||
export let length: number
|
||||
export let reverseDateAndRest: boolean = false
|
||||
|
||||
let dayjsDate = dayjs(date);
|
||||
let dayjsDate = dayjs(date)
|
||||
</script>
|
||||
|
||||
<div class="grid grid-cols-1">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
import Separator from './ui/separator/separator.svelte';
|
||||
import Socials from './Socials.svelte';
|
||||
import Separator from './ui/separator/separator.svelte'
|
||||
import Socials from './Socials.svelte'
|
||||
</script>
|
||||
|
||||
<footer class="h-24 px-4 mb-12 text-sm md:text-md xl:text-lg">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { fly } from 'svelte/transition';
|
||||
import { fly } from 'svelte/transition'
|
||||
</script>
|
||||
|
||||
<div class="w-full fixed top-0 left-0 z-50" transition:fly={{ duration: 200, y: -6 }}>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import Name from '$lib/assets/Name.svelte';
|
||||
import { HamburgerMenu } from 'svelte-radix';
|
||||
import { Drawer } from 'vaul-svelte';
|
||||
import Separator from '../ui/separator/separator.svelte';
|
||||
import Button from '../ui/button/button.svelte';
|
||||
import { Sun, Moon, Home, Person, File, Backpack } from 'svelte-radix';
|
||||
import ThemePicker from '../ThemePicker.svelte';
|
||||
import Name from '$lib/assets/Name.svelte'
|
||||
import { HamburgerMenu } from 'svelte-radix'
|
||||
import { Drawer } from 'vaul-svelte'
|
||||
import Separator from '../ui/separator/separator.svelte'
|
||||
import Button from '../ui/button/button.svelte'
|
||||
import { Sun, Moon, Home, Person, File, Backpack } from 'svelte-radix'
|
||||
import ThemePicker from '../ThemePicker.svelte'
|
||||
</script>
|
||||
|
||||
<Drawer.Root direction="top">
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
<script lang="ts">
|
||||
import Name from '$lib/assets/Name.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import { navigating } from '$app/stores';
|
||||
import Coredump from '$lib/assets/Coredump.svelte';
|
||||
import Separator from '../ui/separator/separator.svelte';
|
||||
import Drawer from './Drawer.svelte';
|
||||
import ThemePicker from '../ThemePicker.svelte';
|
||||
import Button from '../ui/button/button.svelte';
|
||||
import { Moon, Sun } from 'svelte-radix';
|
||||
import Name from '$lib/assets/Name.svelte'
|
||||
import { onMount } from 'svelte'
|
||||
import { navigating } from '$app/stores'
|
||||
import Coredump from '$lib/assets/Coredump.svelte'
|
||||
import Separator from '../ui/separator/separator.svelte'
|
||||
import Drawer from './Drawer.svelte'
|
||||
import ThemePicker from '../ThemePicker.svelte'
|
||||
import Button from '../ui/button/button.svelte'
|
||||
import { Moon, Sun } from 'svelte-radix'
|
||||
|
||||
let current: 'blog' | 'about' | 'home' | 'portfolio' | string;
|
||||
let current: 'blog' | 'about' | 'home' | 'portfolio' | string
|
||||
|
||||
const updateCurrent = () => {
|
||||
const path = window.location.pathname;
|
||||
const path = window.location.pathname
|
||||
if (path === '/') {
|
||||
current = 'home';
|
||||
current = 'home'
|
||||
} else {
|
||||
const segments = path.split('/');
|
||||
current = segments[1] || 'home';
|
||||
const segments = path.split('/')
|
||||
current = segments[1] || 'home'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
return navigating.subscribe(updateCurrent);
|
||||
});
|
||||
return navigating.subscribe(updateCurrent)
|
||||
})
|
||||
</script>
|
||||
|
||||
<nav
|
||||
|
|
|
@ -7,23 +7,23 @@
|
|||
DiscordLogo,
|
||||
EnvelopeClosed,
|
||||
ClipboardCopy
|
||||
} from 'svelte-radix';
|
||||
import * as Popover from '$lib/components/ui/popover';
|
||||
} from 'svelte-radix'
|
||||
import * as Popover from '$lib/components/ui/popover'
|
||||
|
||||
export let center = false;
|
||||
export let center = false
|
||||
|
||||
import Button from './ui/button/button.svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import Button from './ui/button/button.svelte'
|
||||
import { toast } from 'svelte-sonner'
|
||||
|
||||
const copyDiscord = async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText('couscousdude');
|
||||
toast('Copied Discord username to clipboard');
|
||||
await navigator.clipboard.writeText('couscousdude')
|
||||
toast('Copied Discord username to clipboard')
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
toast('Failed to copy Discord username to clipboard');
|
||||
console.error(e)
|
||||
toast('Failed to copy Discord username to clipboard')
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="flex gap-2 mt-2 flex-wrap" class:justify-center={center}>
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { fly } from 'svelte/transition';
|
||||
import { onMount } from 'svelte'
|
||||
import { fly } from 'svelte/transition'
|
||||
|
||||
export let items: string[];
|
||||
export let interval: number = 2000;
|
||||
export let beforeText: string = '';
|
||||
export let items: string[]
|
||||
export let interval: number = 2000
|
||||
export let beforeText: string = ''
|
||||
|
||||
let currentIndex: number = 0;
|
||||
let timer: number;
|
||||
let temp = true;
|
||||
let currentIndex: number = 0
|
||||
let timer: number
|
||||
let temp = true
|
||||
|
||||
onMount(() => {
|
||||
timer = setInterval(() => {
|
||||
currentIndex = (currentIndex + 1) % items.length;
|
||||
temp = !temp;
|
||||
}, interval);
|
||||
currentIndex = (currentIndex + 1) % items.length
|
||||
temp = !temp
|
||||
}, interval)
|
||||
|
||||
return () => clearInterval(timer);
|
||||
});
|
||||
return () => clearInterval(timer)
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="flex gap-2 text-nowrap flex-wrap">
|
||||
|
|
|
@ -10,21 +10,21 @@
|
|||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';
|
||||
import { setMode } from 'mode-watcher';
|
||||
import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js'
|
||||
import { setMode } from 'mode-watcher'
|
||||
|
||||
export let hideLabel: boolean = false;
|
||||
export let wide: boolean = false;
|
||||
export let hideLabel: boolean = false
|
||||
export let wide: boolean = false
|
||||
|
||||
let modes = [
|
||||
{ value: 'light', label: 'Light' },
|
||||
{ value: 'dark', label: 'Dark' },
|
||||
{ value: 'system', label: 'System' }
|
||||
];
|
||||
]
|
||||
|
||||
const changeMode = (mode: string) => {
|
||||
setMode(mode as 'light' | 'dark' | 'system');
|
||||
};
|
||||
setMode(mode as 'light' | 'dark' | 'system')
|
||||
}
|
||||
</script>
|
||||
|
||||
<DropdownMenu.Root>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts">
|
||||
import { toclink, type TocStore } from '@svelte-put/toc';
|
||||
import * as Accordion from '$lib/components/ui/accordion';
|
||||
import * as Card from '$lib/components/ui/card';
|
||||
import { toclink, type TocStore } from '@svelte-put/toc'
|
||||
import * as Accordion from '$lib/components/ui/accordion'
|
||||
import * as Card from '$lib/components/ui/card'
|
||||
|
||||
export let tocStore: TocStore;
|
||||
export let tocStore: TocStore
|
||||
|
||||
const calcTextClasses = (el: HTMLElement) => {
|
||||
if (el.tagName === 'H1') return 'text-lg font-medium';
|
||||
if (el.tagName === 'H2') return 'text-lg';
|
||||
return 'text-sm text-muted-foreground';
|
||||
};
|
||||
if (el.tagName === 'H1') return 'text-lg font-medium'
|
||||
if (el.tagName === 'H2') return 'text-lg'
|
||||
return 'text-sm text-muted-foreground'
|
||||
}
|
||||
</script>
|
||||
|
||||
<Card.Root class="lg:hidden">
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts">
|
||||
import { toclink, type TocStore } from '@svelte-put/toc';
|
||||
import * as Card from '$lib/components/ui/card';
|
||||
import { toclink, type TocStore } from '@svelte-put/toc'
|
||||
import * as Card from '$lib/components/ui/card'
|
||||
|
||||
export let tocStore: TocStore;
|
||||
export let tocStore: TocStore
|
||||
|
||||
const calcTextClasses = (el: HTMLElement) => {
|
||||
if (el.tagName === 'H1') return 'text-md xl:text-lg font-medium';
|
||||
if (el.tagName === 'H2') return 'text-md xl:text-lg';
|
||||
if (el.id === 'end-marker') return 'text-lg xl:text-xl';
|
||||
return 'text-sm text-muted-foreground';
|
||||
};
|
||||
if (el.tagName === 'H1') return 'text-md xl:text-lg font-medium'
|
||||
if (el.tagName === 'H2') return 'text-md xl:text-lg'
|
||||
if (el.id === 'end-marker') return 'text-lg xl:text-xl'
|
||||
return 'text-sm text-muted-foreground'
|
||||
}
|
||||
</script>
|
||||
|
||||
<Card.Root>
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<script lang="ts">
|
||||
import type { TocStore } from '@svelte-put/toc';
|
||||
import Separator from '../ui/separator/separator.svelte';
|
||||
import { Accordion } from 'bits-ui';
|
||||
import { toclink } from '@svelte-put/toc';
|
||||
import { CaretDown } from 'svelte-radix';
|
||||
import { slide } from 'svelte/transition';
|
||||
import type { TocStore } from '@svelte-put/toc'
|
||||
import Separator from '../ui/separator/separator.svelte'
|
||||
import { Accordion } from 'bits-ui'
|
||||
import { toclink } from '@svelte-put/toc'
|
||||
import { CaretDown } from 'svelte-radix'
|
||||
import { slide } from 'svelte/transition'
|
||||
|
||||
export let tocStore: TocStore;
|
||||
export let placeholder: string;
|
||||
export let tocStore: TocStore
|
||||
export let placeholder: string
|
||||
|
||||
const calcTextClasses = (el: HTMLElement) => {
|
||||
if (el.tagName === 'H2') return 'text-xl';
|
||||
return 'text-md text-muted-foreground';
|
||||
};
|
||||
if (el.tagName === 'H2') return 'text-xl'
|
||||
return 'text-md text-muted-foreground'
|
||||
}
|
||||
|
||||
$: currentDisplayed = $tocStore.activeItem ? $tocStore.activeItem.text : placeholder;
|
||||
$: currentDisplayed = $tocStore.activeItem ? $tocStore.activeItem.text : placeholder
|
||||
|
||||
let value: string;
|
||||
let value: string
|
||||
|
||||
const close = () => {
|
||||
value = '';
|
||||
};
|
||||
value = ''
|
||||
}
|
||||
</script>
|
||||
|
||||
<nav class="fixed top-16 left-0 w-full bg-background bg-opacity-50 backdrop-blur-lg z-30 lg:hidden">
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<script lang="ts">
|
||||
import { Accordion as AccordionPrimitive } from 'bits-ui';
|
||||
import { slide } from 'svelte/transition';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { Accordion as AccordionPrimitive } from 'bits-ui'
|
||||
import { slide } from 'svelte/transition'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AccordionPrimitive.ContentProps;
|
||||
type $$Props = AccordionPrimitive.ContentProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let transition: $$Props['transition'] = slide;
|
||||
let className: $$Props['class'] = undefined
|
||||
export let transition: $$Props['transition'] = slide
|
||||
export let transitionConfig: $$Props['transitionConfig'] = {
|
||||
duration: 200
|
||||
};
|
||||
}
|
||||
|
||||
export { className as class };
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AccordionPrimitive.Content
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script lang="ts">
|
||||
import { Accordion as AccordionPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { Accordion as AccordionPrimitive } from 'bits-ui'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AccordionPrimitive.ItemProps;
|
||||
type $$Props = AccordionPrimitive.ItemProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let value: $$Props['value'];
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
export let value: $$Props['value']
|
||||
</script>
|
||||
|
||||
<AccordionPrimitive.Item {value} class={cn('border-b', className)} {...$$restProps}>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import { Accordion as AccordionPrimitive } from 'bits-ui';
|
||||
import ChevronDown from 'svelte-radix/ChevronDown.svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { Accordion as AccordionPrimitive } from 'bits-ui'
|
||||
import ChevronDown from 'svelte-radix/ChevronDown.svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AccordionPrimitive.TriggerProps;
|
||||
type $$Events = AccordionPrimitive.TriggerEvents;
|
||||
type $$Props = AccordionPrimitive.TriggerProps
|
||||
type $$Events = AccordionPrimitive.TriggerEvents
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let level: AccordionPrimitive.HeaderProps['level'] = 3;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let level: AccordionPrimitive.HeaderProps['level'] = 3
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AccordionPrimitive.Header {level} class="flex">
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Accordion as AccordionPrimitive } from 'bits-ui';
|
||||
import Content from './accordion-content.svelte';
|
||||
import Item from './accordion-item.svelte';
|
||||
import Trigger from './accordion-trigger.svelte';
|
||||
import { Accordion as AccordionPrimitive } from 'bits-ui'
|
||||
import Content from './accordion-content.svelte'
|
||||
import Item from './accordion-item.svelte'
|
||||
import Trigger from './accordion-trigger.svelte'
|
||||
|
||||
const Root = AccordionPrimitive.Root;
|
||||
const Root = AccordionPrimitive.Root
|
||||
export {
|
||||
Root,
|
||||
Content,
|
||||
|
@ -14,4 +14,4 @@ export {
|
|||
Content as AccordionContent,
|
||||
Item as AccordionItem,
|
||||
Trigger as AccordionTrigger
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<script lang="ts">
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
||||
import { buttonVariants } from '$lib/components/ui/button/index.js';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
||||
import { buttonVariants } from '$lib/components/ui/button/index.js'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AlertDialogPrimitive.ActionProps;
|
||||
type $$Events = AlertDialogPrimitive.ActionEvents;
|
||||
type $$Props = AlertDialogPrimitive.ActionProps
|
||||
type $$Events = AlertDialogPrimitive.ActionEvents
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AlertDialogPrimitive.Action
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<script lang="ts">
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
||||
import { buttonVariants } from '$lib/components/ui/button/index.js';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
||||
import { buttonVariants } from '$lib/components/ui/button/index.js'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AlertDialogPrimitive.CancelProps;
|
||||
type $$Events = AlertDialogPrimitive.CancelEvents;
|
||||
type $$Props = AlertDialogPrimitive.CancelProps
|
||||
type $$Events = AlertDialogPrimitive.CancelEvents
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AlertDialogPrimitive.Cancel
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
||||
import * as AlertDialog from './index.js';
|
||||
import { cn, flyAndScale } from '$lib/utils.js';
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
||||
import * as AlertDialog from './index.js'
|
||||
import { cn, flyAndScale } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AlertDialogPrimitive.ContentProps;
|
||||
type $$Props = AlertDialogPrimitive.ContentProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let transition: $$Props['transition'] = flyAndScale;
|
||||
export let transitionConfig: $$Props['transitionConfig'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let transition: $$Props['transition'] = flyAndScale
|
||||
export let transitionConfig: $$Props['transitionConfig'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AlertDialog.Portal>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AlertDialogPrimitive.DescriptionProps;
|
||||
type $$Props = AlertDialogPrimitive.DescriptionProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AlertDialogPrimitive.Description
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>;
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>;
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div class={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...$$restProps}>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<script lang="ts">
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
||||
import { fade } from 'svelte/transition';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
||||
import { fade } from 'svelte/transition'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AlertDialogPrimitive.OverlayProps;
|
||||
type $$Props = AlertDialogPrimitive.OverlayProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let transition: $$Props['transition'] = fade;
|
||||
let className: $$Props['class'] = undefined
|
||||
export let transition: $$Props['transition'] = fade
|
||||
export let transitionConfig: $$Props['transitionConfig'] = {
|
||||
duration: 150
|
||||
};
|
||||
export { className as class };
|
||||
}
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AlertDialogPrimitive.Overlay
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
||||
|
||||
type $$Props = AlertDialogPrimitive.PortalProps;
|
||||
type $$Props = AlertDialogPrimitive.PortalProps
|
||||
</script>
|
||||
|
||||
<AlertDialogPrimitive.Portal {...$$restProps}>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script lang="ts">
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AlertDialogPrimitive.TitleProps;
|
||||
type $$Props = AlertDialogPrimitive.TitleProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let level: $$Props['level'] = 'h3';
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let level: $$Props['level'] = 'h3'
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AlertDialogPrimitive.Title class={cn('text-lg font-semibold', className)} {level} {...$$restProps}>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
||||
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
|
||||
|
||||
import Title from './alert-dialog-title.svelte';
|
||||
import Action from './alert-dialog-action.svelte';
|
||||
import Cancel from './alert-dialog-cancel.svelte';
|
||||
import Portal from './alert-dialog-portal.svelte';
|
||||
import Footer from './alert-dialog-footer.svelte';
|
||||
import Header from './alert-dialog-header.svelte';
|
||||
import Overlay from './alert-dialog-overlay.svelte';
|
||||
import Content from './alert-dialog-content.svelte';
|
||||
import Description from './alert-dialog-description.svelte';
|
||||
import Title from './alert-dialog-title.svelte'
|
||||
import Action from './alert-dialog-action.svelte'
|
||||
import Cancel from './alert-dialog-cancel.svelte'
|
||||
import Portal from './alert-dialog-portal.svelte'
|
||||
import Footer from './alert-dialog-footer.svelte'
|
||||
import Header from './alert-dialog-header.svelte'
|
||||
import Overlay from './alert-dialog-overlay.svelte'
|
||||
import Content from './alert-dialog-content.svelte'
|
||||
import Description from './alert-dialog-description.svelte'
|
||||
|
||||
const Root = AlertDialogPrimitive.Root;
|
||||
const Trigger = AlertDialogPrimitive.Trigger;
|
||||
const Root = AlertDialogPrimitive.Root
|
||||
const Trigger = AlertDialogPrimitive.Trigger
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
@ -37,4 +37,4 @@ export {
|
|||
Overlay as AlertDialogOverlay,
|
||||
Content as AlertDialogContent,
|
||||
Description as AlertDialogDescription
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import { type Variant, badgeVariants } from './index.js';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { type Variant, badgeVariants } from './index.js'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
let className: string | undefined | null = undefined;
|
||||
export let href: string | undefined = undefined;
|
||||
export let variant: Variant = 'default';
|
||||
export { className as class };
|
||||
let className: string | undefined | null = undefined
|
||||
export let href: string | undefined = undefined
|
||||
export let variant: Variant = 'default'
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svelte:element
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { type VariantProps, tv } from 'tailwind-variants';
|
||||
import { type VariantProps, tv } from 'tailwind-variants'
|
||||
|
||||
export { default as Badge } from './badge.svelte';
|
||||
export { default as Badge } from './badge.svelte'
|
||||
export const badgeVariants = tv({
|
||||
base: 'inline-flex select-none items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
||||
variants: {
|
||||
|
@ -15,6 +15,6 @@ export const badgeVariants = tv({
|
|||
defaultVariants: {
|
||||
variant: 'default'
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
export type Variant = VariantProps<typeof badgeVariants>['variant'];
|
||||
export type Variant = VariantProps<typeof badgeVariants>['variant']
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import DotsHorizontal from 'svelte-radix/DotsHorizontal.svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import DotsHorizontal from 'svelte-radix/DotsHorizontal.svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLSpanElement> & {
|
||||
el?: HTMLSpanElement;
|
||||
};
|
||||
el?: HTMLSpanElement
|
||||
}
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<span
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLLiAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLLiAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLLiAttributes & {
|
||||
el?: HTMLLIElement;
|
||||
};
|
||||
el?: HTMLLIElement
|
||||
}
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<li bind:this={el} class={cn('inline-flex items-center gap-1.5', className)}>
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAnchorAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAnchorAttributes & {
|
||||
el?: HTMLAnchorElement;
|
||||
asChild?: boolean;
|
||||
};
|
||||
el?: HTMLAnchorElement
|
||||
asChild?: boolean
|
||||
}
|
||||
|
||||
export let href: $$Props['href'] = undefined;
|
||||
export let el: $$Props['el'] = undefined;
|
||||
export let asChild: $$Props['asChild'] = false;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let href: $$Props['href'] = undefined
|
||||
export let el: $$Props['el'] = undefined
|
||||
export let asChild: $$Props['asChild'] = false
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
|
||||
let attrs: Record<string, unknown>;
|
||||
let attrs: Record<string, unknown>
|
||||
|
||||
$: attrs = {
|
||||
class: cn('transition-colors hover:text-foreground', className),
|
||||
href,
|
||||
...$$restProps
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if asChild}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLOlAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLOlAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLOlAttributes & {
|
||||
el?: HTMLOListElement;
|
||||
};
|
||||
el?: HTMLOListElement
|
||||
}
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<ol
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLSpanElement> & {
|
||||
el?: HTMLSpanElement;
|
||||
};
|
||||
el?: HTMLSpanElement
|
||||
}
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
export let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
export let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<span
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLLiAttributes } from 'svelte/elements';
|
||||
import ChevronRight from 'svelte-radix/ChevronRight.svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLLiAttributes } from 'svelte/elements'
|
||||
import ChevronRight from 'svelte-radix/ChevronRight.svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLLiAttributes & {
|
||||
el?: HTMLLIElement;
|
||||
};
|
||||
el?: HTMLLIElement
|
||||
}
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<li
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLElement> & {
|
||||
el?: HTMLElement;
|
||||
};
|
||||
el?: HTMLElement
|
||||
}
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<nav class={className} bind:this={el} aria-label="breadcrumb" {...$$restProps}>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import Root from './breadcrumb.svelte';
|
||||
import Ellipsis from './breadcrumb-ellipsis.svelte';
|
||||
import Item from './breadcrumb-item.svelte';
|
||||
import Separator from './breadcrumb-separator.svelte';
|
||||
import Link from './breadcrumb-link.svelte';
|
||||
import List from './breadcrumb-list.svelte';
|
||||
import Page from './breadcrumb-page.svelte';
|
||||
import Root from './breadcrumb.svelte'
|
||||
import Ellipsis from './breadcrumb-ellipsis.svelte'
|
||||
import Item from './breadcrumb-item.svelte'
|
||||
import Separator from './breadcrumb-separator.svelte'
|
||||
import Link from './breadcrumb-link.svelte'
|
||||
import List from './breadcrumb-list.svelte'
|
||||
import Page from './breadcrumb-page.svelte'
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
@ -22,4 +22,4 @@ export {
|
|||
Link as BreadcrumbLink,
|
||||
List as BreadcrumbList,
|
||||
Page as BreadcrumbPage
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<script lang="ts">
|
||||
import { Button as ButtonPrimitive } from 'bits-ui';
|
||||
import { type Events, type Props, buttonVariants } from './index.js';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { Button as ButtonPrimitive } from 'bits-ui'
|
||||
import { type Events, type Props, buttonVariants } from './index.js'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = Props;
|
||||
type $$Events = Events;
|
||||
type $$Props = Props
|
||||
type $$Events = Events
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let variant: $$Props['variant'] = 'default';
|
||||
export let size: $$Props['size'] = 'default';
|
||||
export let builders: $$Props['builders'] = [];
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let variant: $$Props['variant'] = 'default'
|
||||
export let size: $$Props['size'] = 'default'
|
||||
export let builders: $$Props['builders'] = []
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<ButtonPrimitive.Root
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { Button as ButtonPrimitive } from 'bits-ui';
|
||||
import { type VariantProps, tv } from 'tailwind-variants';
|
||||
import Root from './button.svelte';
|
||||
import type { Button as ButtonPrimitive } from 'bits-ui'
|
||||
import { type VariantProps, tv } from 'tailwind-variants'
|
||||
import Root from './button.svelte'
|
||||
|
||||
const buttonVariants = tv({
|
||||
base: 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',
|
||||
|
@ -25,17 +25,17 @@ const buttonVariants = tv({
|
|||
variant: 'default',
|
||||
size: 'default'
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
type Variant = VariantProps<typeof buttonVariants>['variant'];
|
||||
type Size = VariantProps<typeof buttonVariants>['size'];
|
||||
type Variant = VariantProps<typeof buttonVariants>['variant']
|
||||
type Size = VariantProps<typeof buttonVariants>['size']
|
||||
|
||||
type Props = ButtonPrimitive.Props & {
|
||||
variant?: Variant;
|
||||
size?: Size;
|
||||
};
|
||||
variant?: Variant
|
||||
size?: Size
|
||||
}
|
||||
|
||||
type Events = ButtonPrimitive.Events;
|
||||
type Events = ButtonPrimitive.Events
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
@ -46,4 +46,4 @@ export {
|
|||
type Props as ButtonProps,
|
||||
type Events as ButtonEvents,
|
||||
buttonVariants
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>;
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div class={cn('p-6 pt-0', className)} {...$$restProps}>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLParagraphElement>;
|
||||
type $$Props = HTMLAttributes<HTMLParagraphElement>
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<p class={cn('text-sm text-muted-foreground', className)} {...$$restProps}>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>;
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div class={cn('flex items-center p-6 pt-0', className)} {...$$restProps}>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>;
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div class={cn('flex flex-col space-y-1.5 p-6', className)} {...$$restProps}>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import type { HeadingLevel } from './index.js';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import type { HeadingLevel } from './index.js'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLHeadingElement> & {
|
||||
tag?: HeadingLevel;
|
||||
};
|
||||
tag?: HeadingLevel
|
||||
}
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let tag: $$Props['tag'] = 'h3';
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let tag: $$Props['tag'] = 'h3'
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svelte:element
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>;
|
||||
type $$Props = HTMLAttributes<HTMLDivElement>
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import Root from './card.svelte';
|
||||
import Content from './card-content.svelte';
|
||||
import Description from './card-description.svelte';
|
||||
import Footer from './card-footer.svelte';
|
||||
import Header from './card-header.svelte';
|
||||
import Title from './card-title.svelte';
|
||||
import Root from './card.svelte'
|
||||
import Content from './card-content.svelte'
|
||||
import Description from './card-description.svelte'
|
||||
import Footer from './card-footer.svelte'
|
||||
import Header from './card-header.svelte'
|
||||
import Title from './card-title.svelte'
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
@ -19,6 +19,6 @@ export {
|
|||
Footer as CardFooter,
|
||||
Header as CardHeader,
|
||||
Title as CardTitle
|
||||
};
|
||||
}
|
||||
|
||||
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
||||
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import DrawerOverlay from './drawer-overlay.svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte'
|
||||
import DrawerOverlay from './drawer-overlay.svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DrawerPrimitive.ContentProps;
|
||||
type $$Props = DrawerPrimitive.ContentProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DrawerPrimitive.Portal>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DrawerPrimitive.DescriptionProps;
|
||||
type $$Props = DrawerPrimitive.DescriptionProps
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DrawerPrimitive.Description
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement> & {
|
||||
el?: HTMLDivElement;
|
||||
};
|
||||
el?: HTMLDivElement
|
||||
}
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div bind:this={el} class={cn('mt-auto flex flex-col gap-2 p-4', className)} {...$$restProps}>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement> & {
|
||||
el?: HTMLDivElement;
|
||||
};
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
el?: HTMLDivElement
|
||||
}
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte'
|
||||
|
||||
type $$Props = DrawerPrimitive.Props;
|
||||
export let shouldScaleBackground: $$Props['shouldScaleBackground'] = true;
|
||||
export let open: $$Props['open'] = false;
|
||||
export let activeSnapPoint: $$Props['activeSnapPoint'] = undefined;
|
||||
type $$Props = DrawerPrimitive.Props
|
||||
export let shouldScaleBackground: $$Props['shouldScaleBackground'] = true
|
||||
export let open: $$Props['open'] = false
|
||||
export let activeSnapPoint: $$Props['activeSnapPoint'] = undefined
|
||||
</script>
|
||||
|
||||
<DrawerPrimitive.NestedRoot {shouldScaleBackground} bind:open bind:activeSnapPoint {...$$restProps}>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DrawerPrimitive.OverlayProps;
|
||||
type $$Props = DrawerPrimitive.OverlayProps
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DrawerPrimitive.Overlay
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DrawerPrimitive.TitleProps;
|
||||
type $$Props = DrawerPrimitive.TitleProps
|
||||
|
||||
export let el: $$Props['el'] = undefined;
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let el: $$Props['el'] = undefined
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DrawerPrimitive.Title
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte'
|
||||
|
||||
type $$Props = DrawerPrimitive.Props;
|
||||
export let shouldScaleBackground: $$Props['shouldScaleBackground'] = true;
|
||||
export let open: $$Props['open'] = false;
|
||||
export let activeSnapPoint: $$Props['activeSnapPoint'] = undefined;
|
||||
type $$Props = DrawerPrimitive.Props
|
||||
export let shouldScaleBackground: $$Props['shouldScaleBackground'] = true
|
||||
export let open: $$Props['open'] = false
|
||||
export let activeSnapPoint: $$Props['activeSnapPoint'] = undefined
|
||||
</script>
|
||||
|
||||
<DrawerPrimitive.Root {shouldScaleBackground} bind:open bind:activeSnapPoint {...$$restProps}>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte'
|
||||
|
||||
import Root from './drawer.svelte';
|
||||
import Content from './drawer-content.svelte';
|
||||
import Description from './drawer-description.svelte';
|
||||
import Overlay from './drawer-overlay.svelte';
|
||||
import Footer from './drawer-footer.svelte';
|
||||
import Header from './drawer-header.svelte';
|
||||
import Title from './drawer-title.svelte';
|
||||
import NestedRoot from './drawer-nested.svelte';
|
||||
import Root from './drawer.svelte'
|
||||
import Content from './drawer-content.svelte'
|
||||
import Description from './drawer-description.svelte'
|
||||
import Overlay from './drawer-overlay.svelte'
|
||||
import Footer from './drawer-footer.svelte'
|
||||
import Header from './drawer-header.svelte'
|
||||
import Title from './drawer-title.svelte'
|
||||
import NestedRoot from './drawer-nested.svelte'
|
||||
|
||||
const Trigger = DrawerPrimitive.Trigger;
|
||||
const Portal = DrawerPrimitive.Portal;
|
||||
const Close = DrawerPrimitive.Close;
|
||||
const Trigger = DrawerPrimitive.Trigger
|
||||
const Portal = DrawerPrimitive.Portal
|
||||
const Close = DrawerPrimitive.Close
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
@ -37,4 +37,4 @@ export {
|
|||
Trigger as DrawerTrigger,
|
||||
Portal as DrawerPortal,
|
||||
Close as DrawerClose
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import Check from 'svelte-radix/Check.svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
import Check from 'svelte-radix/Check.svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DropdownMenuPrimitive.CheckboxItemProps;
|
||||
type $$Events = DropdownMenuPrimitive.CheckboxItemEvents;
|
||||
type $$Props = DropdownMenuPrimitive.CheckboxItemProps
|
||||
type $$Events = DropdownMenuPrimitive.CheckboxItemEvents
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let checked: $$Props['checked'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let checked: $$Props['checked'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DropdownMenuPrimitive.CheckboxItem
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import { cn, flyAndScale } from '$lib/utils.js';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
import { cn, flyAndScale } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DropdownMenuPrimitive.ContentProps;
|
||||
type $$Props = DropdownMenuPrimitive.ContentProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let sideOffset: $$Props['sideOffset'] = 4;
|
||||
export let transition: $$Props['transition'] = flyAndScale;
|
||||
export let transitionConfig: $$Props['transitionConfig'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let sideOffset: $$Props['sideOffset'] = 4
|
||||
export let transition: $$Props['transition'] = flyAndScale
|
||||
export let transitionConfig: $$Props['transitionConfig'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DropdownMenuPrimitive.Content
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts">
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DropdownMenuPrimitive.ItemProps & {
|
||||
inset?: boolean;
|
||||
};
|
||||
type $$Events = DropdownMenuPrimitive.ItemEvents;
|
||||
inset?: boolean
|
||||
}
|
||||
type $$Events = DropdownMenuPrimitive.ItemEvents
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let inset: $$Props['inset'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let inset: $$Props['inset'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DropdownMenuPrimitive.Item
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DropdownMenuPrimitive.LabelProps & {
|
||||
inset?: boolean;
|
||||
};
|
||||
inset?: boolean
|
||||
}
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let inset: $$Props['inset'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let inset: $$Props['inset'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DropdownMenuPrimitive.Label
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts">
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
|
||||
type $$Props = DropdownMenuPrimitive.RadioGroupProps;
|
||||
type $$Props = DropdownMenuPrimitive.RadioGroupProps
|
||||
|
||||
export let value: $$Props['value'] = undefined;
|
||||
export let value: $$Props['value'] = undefined
|
||||
</script>
|
||||
|
||||
<DropdownMenuPrimitive.RadioGroup {...$$restProps} bind:value>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import DotFilled from 'svelte-radix/DotFilled.svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
import DotFilled from 'svelte-radix/DotFilled.svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DropdownMenuPrimitive.RadioItemProps;
|
||||
type $$Events = DropdownMenuPrimitive.RadioItemEvents;
|
||||
type $$Props = DropdownMenuPrimitive.RadioItemProps
|
||||
type $$Events = DropdownMenuPrimitive.RadioItemEvents
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let value: DropdownMenuPrimitive.RadioItemProps['value'];
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let value: DropdownMenuPrimitive.RadioItemProps['value']
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DropdownMenuPrimitive.RadioItem
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DropdownMenuPrimitive.SeparatorProps;
|
||||
type $$Props = DropdownMenuPrimitive.SeparatorProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DropdownMenuPrimitive.Separator
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLSpanElement>;
|
||||
type $$Props = HTMLAttributes<HTMLSpanElement>
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<span class={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...$$restProps}>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<script lang="ts">
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import { cn, flyAndScale } from '$lib/utils.js';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
import { cn, flyAndScale } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DropdownMenuPrimitive.SubContentProps;
|
||||
type $$Props = DropdownMenuPrimitive.SubContentProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let transition: $$Props['transition'] = flyAndScale;
|
||||
let className: $$Props['class'] = undefined
|
||||
export let transition: $$Props['transition'] = flyAndScale
|
||||
export let transitionConfig: $$Props['transitionConfig'] = {
|
||||
x: -10,
|
||||
y: 0
|
||||
};
|
||||
export { className as class };
|
||||
}
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DropdownMenuPrimitive.SubContent
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<script lang="ts">
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import ChevronRight from 'svelte-radix/ChevronRight.svelte';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
import ChevronRight from 'svelte-radix/ChevronRight.svelte'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = DropdownMenuPrimitive.SubTriggerProps & {
|
||||
inset?: boolean;
|
||||
};
|
||||
type $$Events = DropdownMenuPrimitive.SubTriggerEvents;
|
||||
inset?: boolean
|
||||
}
|
||||
type $$Events = DropdownMenuPrimitive.SubTriggerEvents
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let inset: $$Props['inset'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let inset: $$Props['inset'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<DropdownMenuPrimitive.SubTrigger
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
||||
import Item from './dropdown-menu-item.svelte';
|
||||
import Label from './dropdown-menu-label.svelte';
|
||||
import Content from './dropdown-menu-content.svelte';
|
||||
import Shortcut from './dropdown-menu-shortcut.svelte';
|
||||
import RadioItem from './dropdown-menu-radio-item.svelte';
|
||||
import Separator from './dropdown-menu-separator.svelte';
|
||||
import RadioGroup from './dropdown-menu-radio-group.svelte';
|
||||
import SubContent from './dropdown-menu-sub-content.svelte';
|
||||
import SubTrigger from './dropdown-menu-sub-trigger.svelte';
|
||||
import CheckboxItem from './dropdown-menu-checkbox-item.svelte';
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'
|
||||
import Item from './dropdown-menu-item.svelte'
|
||||
import Label from './dropdown-menu-label.svelte'
|
||||
import Content from './dropdown-menu-content.svelte'
|
||||
import Shortcut from './dropdown-menu-shortcut.svelte'
|
||||
import RadioItem from './dropdown-menu-radio-item.svelte'
|
||||
import Separator from './dropdown-menu-separator.svelte'
|
||||
import RadioGroup from './dropdown-menu-radio-group.svelte'
|
||||
import SubContent from './dropdown-menu-sub-content.svelte'
|
||||
import SubTrigger from './dropdown-menu-sub-trigger.svelte'
|
||||
import CheckboxItem from './dropdown-menu-checkbox-item.svelte'
|
||||
|
||||
const Sub = DropdownMenuPrimitive.Sub;
|
||||
const Root = DropdownMenuPrimitive.Root;
|
||||
const Trigger = DropdownMenuPrimitive.Trigger;
|
||||
const Group = DropdownMenuPrimitive.Group;
|
||||
const Sub = DropdownMenuPrimitive.Sub
|
||||
const Root = DropdownMenuPrimitive.Root
|
||||
const Trigger = DropdownMenuPrimitive.Trigger
|
||||
const Group = DropdownMenuPrimitive.Group
|
||||
|
||||
export {
|
||||
Sub,
|
||||
|
@ -45,4 +45,4 @@ export {
|
|||
SubContent as DropdownMenuSubContent,
|
||||
SubTrigger as DropdownMenuSubTrigger,
|
||||
CheckboxItem as DropdownMenuCheckboxItem
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Popover as PopoverPrimitive } from 'bits-ui';
|
||||
import Content from './popover-content.svelte';
|
||||
const Root = PopoverPrimitive.Root;
|
||||
const Trigger = PopoverPrimitive.Trigger;
|
||||
const Close = PopoverPrimitive.Close;
|
||||
import { Popover as PopoverPrimitive } from 'bits-ui'
|
||||
import Content from './popover-content.svelte'
|
||||
const Root = PopoverPrimitive.Root
|
||||
const Trigger = PopoverPrimitive.Trigger
|
||||
const Close = PopoverPrimitive.Close
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
@ -14,4 +14,4 @@ export {
|
|||
Content as PopoverContent,
|
||||
Trigger as PopoverTrigger,
|
||||
Close as PopoverClose
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts">
|
||||
import { Popover as PopoverPrimitive } from 'bits-ui';
|
||||
import { cn, flyAndScale } from '$lib/utils.js';
|
||||
import { Popover as PopoverPrimitive } from 'bits-ui'
|
||||
import { cn, flyAndScale } from '$lib/utils.js'
|
||||
|
||||
type $$Props = PopoverPrimitive.ContentProps;
|
||||
type $$Props = PopoverPrimitive.ContentProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let transition: $$Props['transition'] = flyAndScale;
|
||||
export let transitionConfig: $$Props['transitionConfig'] = undefined;
|
||||
export let align: $$Props['align'] = 'center';
|
||||
export let sideOffset: $$Props['sideOffset'] = 4;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let transition: $$Props['transition'] = flyAndScale
|
||||
export let transitionConfig: $$Props['transitionConfig'] = undefined
|
||||
export let align: $$Props['align'] = 'center'
|
||||
export let sideOffset: $$Props['sideOffset'] = 4
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<PopoverPrimitive.Content
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Scrollbar from './scroll-area-scrollbar.svelte';
|
||||
import Root from './scroll-area.svelte';
|
||||
import Scrollbar from './scroll-area-scrollbar.svelte'
|
||||
import Root from './scroll-area.svelte'
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
@ -7,4 +7,4 @@ export {
|
|||
//,
|
||||
Root as ScrollArea,
|
||||
Scrollbar as ScrollAreaScrollbar
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = ScrollAreaPrimitive.ScrollbarProps & {
|
||||
orientation?: 'vertical' | 'horizontal';
|
||||
};
|
||||
orientation?: 'vertical' | 'horizontal'
|
||||
}
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let orientation: $$Props['orientation'] = 'vertical';
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let orientation: $$Props['orientation'] = 'vertical'
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<ScrollAreaPrimitive.Scrollbar
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<script lang="ts">
|
||||
import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui';
|
||||
import { Scrollbar } from './index.js';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui'
|
||||
import { Scrollbar } from './index.js'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = ScrollAreaPrimitive.Props & {
|
||||
orientation?: 'vertical' | 'horizontal' | 'both';
|
||||
scrollbarXClasses?: string;
|
||||
scrollbarYClasses?: string;
|
||||
};
|
||||
orientation?: 'vertical' | 'horizontal' | 'both'
|
||||
scrollbarXClasses?: string
|
||||
scrollbarYClasses?: string
|
||||
}
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export { className as class };
|
||||
export let orientation = 'vertical';
|
||||
export let scrollbarXClasses: string = '';
|
||||
export let scrollbarYClasses: string = '';
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
export let orientation = 'vertical'
|
||||
export let scrollbarXClasses: string = ''
|
||||
export let scrollbarYClasses: string = ''
|
||||
</script>
|
||||
|
||||
<ScrollAreaPrimitive.Root {...$$restProps} class={cn('relative overflow-hidden', className)}>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Root from './separator.svelte';
|
||||
import Root from './separator.svelte'
|
||||
|
||||
export {
|
||||
Root,
|
||||
//
|
||||
Root as Separator
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<script lang="ts">
|
||||
import { Separator as SeparatorPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/utils.js';
|
||||
import { Separator as SeparatorPrimitive } from 'bits-ui'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = SeparatorPrimitive.Props;
|
||||
type $$Props = SeparatorPrimitive.Props
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let orientation: $$Props['orientation'] = 'horizontal';
|
||||
export let decorative: $$Props['decorative'] = undefined;
|
||||
export { className as class };
|
||||
let className: $$Props['class'] = undefined
|
||||
export let orientation: $$Props['orientation'] = 'horizontal'
|
||||
export let decorative: $$Props['decorative'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<SeparatorPrimitive.Root
|
||||
|
|
|
@ -1 +1 @@
|
|||
export { default as Toaster } from './sonner.svelte';
|
||||
export { default as Toaster } from './sonner.svelte'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts">
|
||||
import { Toaster as Sonner, type ToasterProps as SonnerProps } from 'svelte-sonner';
|
||||
import { mode } from 'mode-watcher';
|
||||
import { Toaster as Sonner, type ToasterProps as SonnerProps } from 'svelte-sonner'
|
||||
import { mode } from 'mode-watcher'
|
||||
|
||||
type $$Props = SonnerProps;
|
||||
type $$Props = SonnerProps
|
||||
</script>
|
||||
|
||||
<Sonner
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Tooltip as TooltipPrimitive } from 'bits-ui';
|
||||
import Content from './tooltip-content.svelte';
|
||||
import { Tooltip as TooltipPrimitive } from 'bits-ui'
|
||||
import Content from './tooltip-content.svelte'
|
||||
|
||||
const Root = TooltipPrimitive.Root;
|
||||
const Trigger = TooltipPrimitive.Trigger;
|
||||
const Root = TooltipPrimitive.Root
|
||||
const Trigger = TooltipPrimitive.Trigger
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
@ -12,4 +12,4 @@ export {
|
|||
Root as Tooltip,
|
||||
Content as TooltipContent,
|
||||
Trigger as TooltipTrigger
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<script lang="ts">
|
||||
import { Tooltip as TooltipPrimitive } from 'bits-ui';
|
||||
import { cn, flyAndScale } from '$lib/utils.js';
|
||||
import { Tooltip as TooltipPrimitive } from 'bits-ui'
|
||||
import { cn, flyAndScale } from '$lib/utils.js'
|
||||
|
||||
type $$Props = TooltipPrimitive.ContentProps;
|
||||
type $$Props = TooltipPrimitive.ContentProps
|
||||
|
||||
let className: $$Props['class'] = undefined;
|
||||
export let sideOffset: $$Props['sideOffset'] = 4;
|
||||
export let transition: $$Props['transition'] = flyAndScale;
|
||||
let className: $$Props['class'] = undefined
|
||||
export let sideOffset: $$Props['sideOffset'] = 4
|
||||
export let transition: $$Props['transition'] = flyAndScale
|
||||
export let transitionConfig: $$Props['transitionConfig'] = {
|
||||
y: 8,
|
||||
duration: 150
|
||||
};
|
||||
export { className as class };
|
||||
}
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<TooltipPrimitive.Content
|
||||
|
|
|
@ -1,56 +1,56 @@
|
|||
import { type ClassValue, clsx } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
import { cubicOut } from 'svelte/easing';
|
||||
import type { TransitionConfig } from 'svelte/transition';
|
||||
import { type ClassValue, clsx } from 'clsx'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { cubicOut } from 'svelte/easing'
|
||||
import type { TransitionConfig } from 'svelte/transition'
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs));
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
|
||||
type FlyAndScaleParams = {
|
||||
y?: number;
|
||||
x?: number;
|
||||
start?: number;
|
||||
duration?: number;
|
||||
};
|
||||
y?: number
|
||||
x?: number
|
||||
start?: number
|
||||
duration?: number
|
||||
}
|
||||
|
||||
export const flyAndScale = (
|
||||
node: Element,
|
||||
params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 }
|
||||
): TransitionConfig => {
|
||||
const style = getComputedStyle(node);
|
||||
const transform = style.transform === 'none' ? '' : style.transform;
|
||||
const style = getComputedStyle(node)
|
||||
const transform = style.transform === 'none' ? '' : style.transform
|
||||
|
||||
const scaleConversion = (valueA: number, scaleA: [number, number], scaleB: [number, number]) => {
|
||||
const [minA, maxA] = scaleA;
|
||||
const [minB, maxB] = scaleB;
|
||||
const [minA, maxA] = scaleA
|
||||
const [minB, maxB] = scaleB
|
||||
|
||||
const percentage = (valueA - minA) / (maxA - minA);
|
||||
const valueB = percentage * (maxB - minB) + minB;
|
||||
const percentage = (valueA - minA) / (maxA - minA)
|
||||
const valueB = percentage * (maxB - minB) + minB
|
||||
|
||||
return valueB;
|
||||
};
|
||||
return valueB
|
||||
}
|
||||
|
||||
const styleToString = (style: Record<string, number | string | undefined>): string => {
|
||||
return Object.keys(style).reduce((str, key) => {
|
||||
if (style[key] === undefined) return str;
|
||||
return str + `${key}:${style[key]};`;
|
||||
}, '');
|
||||
};
|
||||
if (style[key] === undefined) return str
|
||||
return str + `${key}:${style[key]};`
|
||||
}, '')
|
||||
}
|
||||
|
||||
return {
|
||||
duration: params.duration ?? 200,
|
||||
delay: 0,
|
||||
css: (t) => {
|
||||
const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]);
|
||||
const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]);
|
||||
const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]);
|
||||
const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0])
|
||||
const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0])
|
||||
const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1])
|
||||
|
||||
return styleToString({
|
||||
transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`,
|
||||
opacity: t
|
||||
});
|
||||
})
|
||||
},
|
||||
easing: cubicOut
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,52 +1,52 @@
|
|||
import { readdir, readFile } from 'fs/promises';
|
||||
import { join } from 'path';
|
||||
import toml from 'toml';
|
||||
import { readdir, readFile } from 'fs/promises'
|
||||
import { join } from 'path'
|
||||
import toml from 'toml'
|
||||
|
||||
const crawl = async () => {
|
||||
const blogPath = join(process.cwd(), 'blog');
|
||||
const years = await readdir(blogPath);
|
||||
const blogPath = join(process.cwd(), 'blog')
|
||||
const years = await readdir(blogPath)
|
||||
|
||||
const posts: {
|
||||
[key: string]: {
|
||||
metadata: PostMeta;
|
||||
content: string;
|
||||
};
|
||||
} = {};
|
||||
metadata: PostMeta
|
||||
content: string
|
||||
}
|
||||
} = {}
|
||||
|
||||
for (const year of years) {
|
||||
const yearPath = join(blogPath, year);
|
||||
const directories = await readdir(yearPath);
|
||||
const yearPath = join(blogPath, year)
|
||||
const directories = await readdir(yearPath)
|
||||
|
||||
for (const directory of directories) {
|
||||
const postPath = join(yearPath, directory);
|
||||
const postPath = join(yearPath, directory)
|
||||
try {
|
||||
await readFile(join(postPath, '.blogignore'), 'utf-8');
|
||||
continue;
|
||||
await readFile(join(postPath, '.blogignore'), 'utf-8')
|
||||
continue
|
||||
} catch (error) {
|
||||
// If the file doesn't exist, continue with the rest of the code
|
||||
}
|
||||
const postTomlPath = join(postPath, 'post.toml');
|
||||
const contentPath = join(postPath, 'content.md');
|
||||
const postTomlPath = join(postPath, 'post.toml')
|
||||
const contentPath = join(postPath, 'content.md')
|
||||
|
||||
try {
|
||||
const postToml = await readFile(postTomlPath, 'utf-8');
|
||||
const content = await readFile(contentPath, 'utf-8');
|
||||
const postToml = await readFile(postTomlPath, 'utf-8')
|
||||
const content = await readFile(contentPath, 'utf-8')
|
||||
|
||||
const metadata = toml.parse(postToml);
|
||||
const metadata = toml.parse(postToml)
|
||||
|
||||
posts[`${year}/${directory}`] = {
|
||||
metadata,
|
||||
content
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
throw new Error(`Error reading post: ${error}`);
|
||||
throw new Error(`Error reading post: ${error}`)
|
||||
}
|
||||
}
|
||||
return posts;
|
||||
return posts
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const postsResult = await crawl();
|
||||
if (!postsResult) throw new Error('No posts found!');
|
||||
const postsResult = await crawl()
|
||||
if (!postsResult) throw new Error('No posts found!')
|
||||
|
||||
export const posts = postsResult;
|
||||
export const posts = postsResult
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { unified } from 'unified';
|
||||
import rehypeKatex from 'rehype-katex';
|
||||
import rehypeStringify from 'rehype-stringify';
|
||||
import remarkMath from 'remark-math';
|
||||
import remarkParse from 'remark-parse';
|
||||
import remarkRehype from 'remark-rehype';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import remarkGhAlerts from 'remark-gh-alerts';
|
||||
import remarkSectionize from 'remark-sectionize';
|
||||
import rehypeHighlight from 'rehype-highlight';
|
||||
import { unified } from 'unified'
|
||||
import rehypeKatex from 'rehype-katex'
|
||||
import rehypeStringify from 'rehype-stringify'
|
||||
import remarkMath from 'remark-math'
|
||||
import remarkParse from 'remark-parse'
|
||||
import remarkRehype from 'remark-rehype'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import remarkGhAlerts from 'remark-gh-alerts'
|
||||
import remarkSectionize from 'remark-sectionize'
|
||||
import rehypeHighlight from 'rehype-highlight'
|
||||
|
||||
export default async (markdown: string) => {
|
||||
try {
|
||||
|
@ -23,12 +23,12 @@ export default async (markdown: string) => {
|
|||
.use(rehypeHighlight)
|
||||
.use(rehypeStringify)
|
||||
.process(markdown)
|
||||
);
|
||||
)
|
||||
|
||||
if (typeof html === 'undefined') throw new Error('No content');
|
||||
if (typeof html === 'undefined') throw new Error('No content')
|
||||
|
||||
return html;
|
||||
return html
|
||||
} catch (e) {
|
||||
throw new Error(`Failed to parse markdown: ${e}`);
|
||||
throw new Error(`Failed to parse markdown: ${e}`)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script>
|
||||
import { page } from '$app/stores';
|
||||
import Button from '$lib/components/ui/button/button.svelte';
|
||||
import { Home } from 'svelte-radix';
|
||||
import { page } from '$app/stores'
|
||||
import Button from '$lib/components/ui/button/button.svelte'
|
||||
import { Home } from 'svelte-radix'
|
||||
|
||||
const error = $page.error ?? { message: 'unknown' };
|
||||
const error = $page.error ?? { message: 'unknown' }
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
@ -47,4 +47,3 @@
|
|||
</div>
|
||||
|
||||
<Footer />
|
||||
<Footer />
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts">
|
||||
import Socials from '$lib/components/Socials.svelte';
|
||||
import Button from '$lib/components/ui/button/button.svelte';
|
||||
import * as Card from '$lib/components/ui/card';
|
||||
import { ArrowRight, GithubLogo } from 'svelte-radix';
|
||||
import Typewriter from 'svelte-typewriter';
|
||||
import Socials from '$lib/components/Socials.svelte'
|
||||
import Button from '$lib/components/ui/button/button.svelte'
|
||||
import * as Card from '$lib/components/ui/card'
|
||||
import { ArrowRight, GithubLogo } from 'svelte-radix'
|
||||
import Typewriter from 'svelte-typewriter'
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
@ -1 +1 @@
|
|||
export const prerender = true;
|
||||
export const prerender = true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import UnderConstruction from '$lib/components/UnderConstruction.svelte';
|
||||
import UnderConstruction from '$lib/components/UnderConstruction.svelte'
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
@ -1 +1 @@
|
|||
export const prerender = true;
|
||||
export const prerender = true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import BackToTop from '$lib/components/BackToTop.svelte';
|
||||
import BackToTop from '$lib/components/BackToTop.svelte'
|
||||
</script>
|
||||
|
||||
<BackToTop />
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { posts } from '$lib/utils/crawl';
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { posts } from '$lib/utils/crawl'
|
||||
import type { PageServerLoad } from './$types'
|
||||
|
||||
export const load: PageServerLoad = async () => {
|
||||
return {
|
||||
posts
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<script lang="ts">
|
||||
import Archive from '$lib/components/Blog/Archive.svelte';
|
||||
import Archive from '$lib/components/Blog/Archive.svelte'
|
||||
|
||||
import ChevronRight from 'svelte-radix/ChevronRight.svelte';
|
||||
import type { PageData } from './$types.js';
|
||||
import Coredump from '$lib/assets/Coredump.svelte';
|
||||
import { fly } from 'svelte/transition';
|
||||
import { onMount } from 'svelte';
|
||||
import PostCard from '$lib/components/Blog/PostCard.svelte';
|
||||
import ChevronRight from 'svelte-radix/ChevronRight.svelte'
|
||||
import type { PageData } from './$types.js'
|
||||
import Coredump from '$lib/assets/Coredump.svelte'
|
||||
import { fly } from 'svelte/transition'
|
||||
import { onMount } from 'svelte'
|
||||
import PostCard from '$lib/components/Blog/PostCard.svelte'
|
||||
|
||||
export let data: PageData;
|
||||
export let data: PageData
|
||||
|
||||
$: posts = data.posts;
|
||||
$: posts = data.posts
|
||||
|
||||
let loaded = false;
|
||||
let loaded = false
|
||||
|
||||
onMount(() => {
|
||||
loaded = true;
|
||||
});
|
||||
loaded = true
|
||||
})
|
||||
|
||||
$: postArray = Object.entries(posts).map(([key, value]) => {
|
||||
return { slug: key, ...value };
|
||||
});
|
||||
return { slug: key, ...value }
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue