svelte-docsmith 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.d.ts +27 -0
- package/dist/config.js +9 -1
- package/dist/generate-llms.d.ts +31 -0
- package/dist/generate-llms.js +63 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -0
- package/dist/llms.d.ts +11 -0
- package/dist/llms.js +4 -0
- package/dist/normalize-path.d.ts +6 -0
- package/dist/normalize-path.js +8 -0
- package/dist/sitemap.d.ts +27 -0
- package/dist/sitemap.js +44 -0
- package/dist/ui/layouts/copy-page-menu.svelte +113 -0
- package/dist/ui/layouts/copy-page-menu.svelte.d.ts +9 -0
- package/dist/ui/layouts/docs-header.svelte +1 -1
- package/dist/ui/layouts/docs-mobile-header.svelte +1 -1
- package/dist/ui/layouts/docs-shell.svelte +83 -9
- package/dist/ui/layouts/docs-shell.svelte.d.ts +6 -0
- package/dist/ui/layouts/docs-sidebar.svelte +3 -2
- package/dist/ui/layouts/prev-next-nav.svelte +9 -2
- package/dist/ui/layouts/prev-next-nav.svelte.d.ts +1 -0
- package/dist/ui/layouts/seo-head.svelte +2 -1
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-checkbox-group.svelte +16 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-checkbox-group.svelte.d.ts +4 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte +44 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +9 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-content.svelte +31 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-content.svelte.d.ts +10 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-group-heading.svelte +22 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +8 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-group.svelte +7 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-group.svelte.d.ts +4 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-item.svelte +27 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-item.svelte.d.ts +8 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-label.svelte +27 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-label.svelte.d.ts +8 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-portal.svelte +7 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-portal.svelte.d.ts +3 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-radio-group.svelte +16 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +4 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-radio-item.svelte +34 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-separator.svelte +17 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-shortcut.svelte +23 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +5 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-sub-content.svelte +20 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +4 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-sub-trigger.svelte +29 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +7 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-sub.svelte +7 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-sub.svelte.d.ts +3 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-trigger.svelte +7 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +4 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu.svelte +7 -0
- package/dist/ui/shadcn/dropdown-menu/dropdown-menu.svelte.d.ts +3 -0
- package/dist/ui/shadcn/dropdown-menu/index.d.ts +18 -0
- package/dist/ui/shadcn/dropdown-menu/index.js +18 -0
- package/dist/vite.d.ts +8 -1
- package/dist/vite.js +60 -3
- package/package.json +6 -3
|
@@ -2,6 +2,7 @@ import type { NavItem } from '../../config.js';
|
|
|
2
2
|
type $$ComponentProps = {
|
|
3
3
|
prev?: NavItem;
|
|
4
4
|
next?: NavItem;
|
|
5
|
+
bordered?: boolean;
|
|
5
6
|
};
|
|
6
7
|
declare const PrevNextNav: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
8
|
type PrevNextNav = ReturnType<typeof PrevNextNav>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { page } from '$app/state';
|
|
3
|
+
import { normalizePath } from '../../normalize-path.js';
|
|
3
4
|
import type { DocsmithConfig } from '../../config.js';
|
|
4
5
|
|
|
5
6
|
const {
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
|
|
24
25
|
const origin = $derived(config.url?.replace(/\/$/, ''));
|
|
25
26
|
// Absolute URLs need a configured origin; otherwise canonical/og:url are omitted.
|
|
26
|
-
const canonical = $derived(origin ? origin + page.url.pathname : undefined);
|
|
27
|
+
const canonical = $derived(origin ? origin + normalizePath(page.url.pathname) : undefined);
|
|
27
28
|
const image = $derived.by(() => {
|
|
28
29
|
const src = config.ogImage;
|
|
29
30
|
if (!src) return undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
ref = $bindable(null),
|
|
6
|
+
value = $bindable([]),
|
|
7
|
+
...restProps
|
|
8
|
+
}: DropdownMenuPrimitive.CheckboxGroupProps = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<DropdownMenuPrimitive.CheckboxGroup
|
|
12
|
+
bind:ref
|
|
13
|
+
bind:value
|
|
14
|
+
data-slot="dropdown-menu-checkbox-group"
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuCheckboxGroup: import("svelte").Component<DropdownMenuPrimitive.CheckboxGroupProps, {}, "value" | "ref">;
|
|
3
|
+
type DropdownMenuCheckboxGroup = ReturnType<typeof DropdownMenuCheckboxGroup>;
|
|
4
|
+
export default DropdownMenuCheckboxGroup;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import MinusIcon from '@lucide/svelte/icons/minus';
|
|
4
|
+
import CheckIcon from '@lucide/svelte/icons/check';
|
|
5
|
+
import { cn, type WithoutChildrenOrChild } from '../../../shadcn.js';
|
|
6
|
+
import type { Snippet } from 'svelte';
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
ref = $bindable(null),
|
|
10
|
+
checked = $bindable(false),
|
|
11
|
+
indeterminate = $bindable(false),
|
|
12
|
+
class: className,
|
|
13
|
+
children: childrenProp,
|
|
14
|
+
...restProps
|
|
15
|
+
}: WithoutChildrenOrChild<DropdownMenuPrimitive.CheckboxItemProps> & {
|
|
16
|
+
children?: Snippet;
|
|
17
|
+
} = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
21
|
+
bind:ref
|
|
22
|
+
bind:checked
|
|
23
|
+
bind:indeterminate
|
|
24
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
25
|
+
class={cn(
|
|
26
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
27
|
+
className
|
|
28
|
+
)}
|
|
29
|
+
{...restProps}
|
|
30
|
+
>
|
|
31
|
+
{#snippet children({ checked, indeterminate })}
|
|
32
|
+
<span
|
|
33
|
+
class="absolute right-2 flex items-center justify-center pointer-events-none"
|
|
34
|
+
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
35
|
+
>
|
|
36
|
+
{#if indeterminate}
|
|
37
|
+
<MinusIcon />
|
|
38
|
+
{:else if checked}
|
|
39
|
+
<CheckIcon />
|
|
40
|
+
{/if}
|
|
41
|
+
</span>
|
|
42
|
+
{@render childrenProp?.()}
|
|
43
|
+
{/snippet}
|
|
44
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
import { type WithoutChildrenOrChild } from '../../../shadcn.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
type $$ComponentProps = WithoutChildrenOrChild<DropdownMenuPrimitive.CheckboxItemProps> & {
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
};
|
|
7
|
+
declare const DropdownMenuCheckboxItem: import("svelte").Component<$$ComponentProps, {}, "ref" | "checked" | "indeterminate">;
|
|
8
|
+
type DropdownMenuCheckboxItem = ReturnType<typeof DropdownMenuCheckboxItem>;
|
|
9
|
+
export default DropdownMenuCheckboxItem;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithoutChildrenOrChild } from '../../../shadcn.js';
|
|
3
|
+
import DropdownMenuPortal from './dropdown-menu-portal.svelte';
|
|
4
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
5
|
+
import type { ComponentProps } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
sideOffset = 4,
|
|
10
|
+
align = 'start',
|
|
11
|
+
portalProps,
|
|
12
|
+
class: className,
|
|
13
|
+
...restProps
|
|
14
|
+
}: DropdownMenuPrimitive.ContentProps & {
|
|
15
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof DropdownMenuPortal>>;
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<DropdownMenuPortal {...portalProps}>
|
|
20
|
+
<DropdownMenuPrimitive.Content
|
|
21
|
+
bind:ref
|
|
22
|
+
data-slot="dropdown-menu-content"
|
|
23
|
+
{sideOffset}
|
|
24
|
+
{align}
|
|
25
|
+
class={cn(
|
|
26
|
+
'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-md p-1 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 w-(--bits-dropdown-menu-anchor-width) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden',
|
|
27
|
+
className
|
|
28
|
+
)}
|
|
29
|
+
{...restProps}
|
|
30
|
+
/>
|
|
31
|
+
</DropdownMenuPortal>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type WithoutChildrenOrChild } from '../../../shadcn.js';
|
|
2
|
+
import DropdownMenuPortal from './dropdown-menu-portal.svelte';
|
|
3
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
4
|
+
import type { ComponentProps } from 'svelte';
|
|
5
|
+
type $$ComponentProps = DropdownMenuPrimitive.ContentProps & {
|
|
6
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof DropdownMenuPortal>>;
|
|
7
|
+
};
|
|
8
|
+
declare const DropdownMenuContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
9
|
+
type DropdownMenuContent = ReturnType<typeof DropdownMenuContent>;
|
|
10
|
+
export default DropdownMenuContent;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../shadcn.js';
|
|
4
|
+
import type { ComponentProps } from 'svelte';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
inset,
|
|
10
|
+
...restProps
|
|
11
|
+
}: ComponentProps<typeof DropdownMenuPrimitive.GroupHeading> & {
|
|
12
|
+
inset?: boolean;
|
|
13
|
+
} = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<DropdownMenuPrimitive.GroupHeading
|
|
17
|
+
bind:ref
|
|
18
|
+
data-slot="dropdown-menu-group-heading"
|
|
19
|
+
data-inset={inset}
|
|
20
|
+
class={cn('px-2 py-1.5 text-sm font-semibold data-[inset]:ps-8', className)}
|
|
21
|
+
{...restProps}
|
|
22
|
+
/>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
import type { ComponentProps } from 'svelte';
|
|
3
|
+
type $$ComponentProps = ComponentProps<typeof DropdownMenuPrimitive.GroupHeading> & {
|
|
4
|
+
inset?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const DropdownMenuGroupHeading: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
|
+
type DropdownMenuGroupHeading = ReturnType<typeof DropdownMenuGroupHeading>;
|
|
8
|
+
export default DropdownMenuGroupHeading;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
|
|
4
|
+
let { ref = $bindable(null), ...restProps }: DropdownMenuPrimitive.GroupProps = $props();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<DropdownMenuPrimitive.Group bind:ref data-slot="dropdown-menu-group" {...restProps} />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../shadcn.js';
|
|
3
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
inset,
|
|
9
|
+
variant = 'default',
|
|
10
|
+
...restProps
|
|
11
|
+
}: DropdownMenuPrimitive.ItemProps & {
|
|
12
|
+
inset?: boolean;
|
|
13
|
+
variant?: 'default' | 'destructive';
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<DropdownMenuPrimitive.Item
|
|
18
|
+
bind:ref
|
|
19
|
+
data-slot="dropdown-menu-item"
|
|
20
|
+
data-inset={inset}
|
|
21
|
+
data-variant={variant}
|
|
22
|
+
class={cn(
|
|
23
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
26
|
+
{...restProps}
|
|
27
|
+
/>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
type $$ComponentProps = DropdownMenuPrimitive.ItemProps & {
|
|
3
|
+
inset?: boolean;
|
|
4
|
+
variant?: 'default' | 'destructive';
|
|
5
|
+
};
|
|
6
|
+
declare const DropdownMenuItem: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
|
+
type DropdownMenuItem = ReturnType<typeof DropdownMenuItem>;
|
|
8
|
+
export default DropdownMenuItem;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../shadcn.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
inset,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
12
|
+
inset?: boolean;
|
|
13
|
+
} = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<div
|
|
17
|
+
bind:this={ref}
|
|
18
|
+
data-slot="dropdown-menu-label"
|
|
19
|
+
data-inset={inset}
|
|
20
|
+
class={cn(
|
|
21
|
+
'text-muted-foreground px-2 py-1.5 text-xs font-medium data-inset:pl-8 data-[inset]:pl-8',
|
|
22
|
+
className
|
|
23
|
+
)}
|
|
24
|
+
{...restProps}
|
|
25
|
+
>
|
|
26
|
+
{@render children?.()}
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../shadcn.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
4
|
+
inset?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const DropdownMenuLabel: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
7
|
+
type DropdownMenuLabel = ReturnType<typeof DropdownMenuLabel>;
|
|
8
|
+
export default DropdownMenuLabel;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
ref = $bindable(null),
|
|
6
|
+
value = $bindable(),
|
|
7
|
+
...restProps
|
|
8
|
+
}: DropdownMenuPrimitive.RadioGroupProps = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<DropdownMenuPrimitive.RadioGroup
|
|
12
|
+
bind:ref
|
|
13
|
+
bind:value
|
|
14
|
+
data-slot="dropdown-menu-radio-group"
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuRadioGroup: import("svelte").Component<DropdownMenuPrimitive.RadioGroupProps, {}, "value" | "ref">;
|
|
3
|
+
type DropdownMenuRadioGroup = ReturnType<typeof DropdownMenuRadioGroup>;
|
|
4
|
+
export default DropdownMenuRadioGroup;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import CheckIcon from '@lucide/svelte/icons/check';
|
|
4
|
+
import { cn, type WithoutChild } from '../../../shadcn.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children: childrenProp,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithoutChild<DropdownMenuPrimitive.RadioItemProps> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<DropdownMenuPrimitive.RadioItem
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="dropdown-menu-radio-item"
|
|
17
|
+
class={cn(
|
|
18
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...restProps}
|
|
22
|
+
>
|
|
23
|
+
{#snippet children({ checked })}
|
|
24
|
+
<span
|
|
25
|
+
class="absolute right-2 flex items-center justify-center pointer-events-none"
|
|
26
|
+
data-slot="dropdown-menu-radio-item-indicator"
|
|
27
|
+
>
|
|
28
|
+
{#if checked}
|
|
29
|
+
<CheckIcon />
|
|
30
|
+
{/if}
|
|
31
|
+
</span>
|
|
32
|
+
{@render childrenProp?.({ checked })}
|
|
33
|
+
{/snippet}
|
|
34
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuRadioItem: import("svelte").Component<Omit<DropdownMenuPrimitive.RadioItemProps, "child">, {}, "ref">;
|
|
3
|
+
type DropdownMenuRadioItem = ReturnType<typeof DropdownMenuRadioItem>;
|
|
4
|
+
export default DropdownMenuRadioItem;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../shadcn.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: DropdownMenuPrimitive.SeparatorProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DropdownMenuPrimitive.Separator
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="dropdown-menu-separator"
|
|
15
|
+
class={cn('bg-border -mx-1 my-1 h-px', className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuSeparator: import("svelte").Component<DropdownMenuPrimitive.SeparatorProps, {}, "ref">;
|
|
3
|
+
type DropdownMenuSeparator = ReturnType<typeof DropdownMenuSeparator>;
|
|
4
|
+
export default DropdownMenuSeparator;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn, type WithElementRef } from '../../../shadcn.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLSpanElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<span
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="dropdown-menu-shortcut"
|
|
16
|
+
class={cn(
|
|
17
|
+
'text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</span>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import { type WithElementRef } from '../../../shadcn.js';
|
|
3
|
+
declare const DropdownMenuShortcut: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLSpanElement>>, {}, "ref">;
|
|
4
|
+
type DropdownMenuShortcut = ReturnType<typeof DropdownMenuShortcut>;
|
|
5
|
+
export default DropdownMenuShortcut;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../shadcn.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: DropdownMenuPrimitive.SubContentProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<DropdownMenuPrimitive.SubContent
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="dropdown-menu-sub-content"
|
|
15
|
+
class={cn(
|
|
16
|
+
'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100 w-auto',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuSubContent: import("svelte").Component<DropdownMenuPrimitive.SubContentProps, {}, "ref">;
|
|
3
|
+
type DropdownMenuSubContent = ReturnType<typeof DropdownMenuSubContent>;
|
|
4
|
+
export default DropdownMenuSubContent;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
import ChevronRightIcon from '@lucide/svelte/icons/chevron-right';
|
|
4
|
+
import { cn } from '../../../shadcn.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
inset,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: DropdownMenuPrimitive.SubTriggerProps & {
|
|
13
|
+
inset?: boolean;
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
18
|
+
bind:ref
|
|
19
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
20
|
+
data-inset={inset}
|
|
21
|
+
class={cn(
|
|
22
|
+
"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...restProps}
|
|
26
|
+
>
|
|
27
|
+
{@render children?.()}
|
|
28
|
+
<ChevronRightIcon class="ml-auto" />
|
|
29
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
type $$ComponentProps = DropdownMenuPrimitive.SubTriggerProps & {
|
|
3
|
+
inset?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const DropdownMenuSubTrigger: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
|
+
type DropdownMenuSubTrigger = ReturnType<typeof DropdownMenuSubTrigger>;
|
|
7
|
+
export default DropdownMenuSubTrigger;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
3
|
+
|
|
4
|
+
let { ref = $bindable(null), ...restProps }: DropdownMenuPrimitive.TriggerProps = $props();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<DropdownMenuPrimitive.Trigger bind:ref data-slot="dropdown-menu-trigger" {...restProps} />
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
2
|
+
declare const DropdownMenuTrigger: import("svelte").Component<DropdownMenuPrimitive.TriggerProps, {}, "ref">;
|
|
3
|
+
type DropdownMenuTrigger = ReturnType<typeof DropdownMenuTrigger>;
|
|
4
|
+
export default DropdownMenuTrigger;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Root from './dropdown-menu.svelte';
|
|
2
|
+
import Sub from './dropdown-menu-sub.svelte';
|
|
3
|
+
import CheckboxGroup from './dropdown-menu-checkbox-group.svelte';
|
|
4
|
+
import CheckboxItem from './dropdown-menu-checkbox-item.svelte';
|
|
5
|
+
import Content from './dropdown-menu-content.svelte';
|
|
6
|
+
import Group from './dropdown-menu-group.svelte';
|
|
7
|
+
import Item from './dropdown-menu-item.svelte';
|
|
8
|
+
import Label from './dropdown-menu-label.svelte';
|
|
9
|
+
import RadioGroup from './dropdown-menu-radio-group.svelte';
|
|
10
|
+
import RadioItem from './dropdown-menu-radio-item.svelte';
|
|
11
|
+
import Separator from './dropdown-menu-separator.svelte';
|
|
12
|
+
import Shortcut from './dropdown-menu-shortcut.svelte';
|
|
13
|
+
import Trigger from './dropdown-menu-trigger.svelte';
|
|
14
|
+
import SubContent from './dropdown-menu-sub-content.svelte';
|
|
15
|
+
import SubTrigger from './dropdown-menu-sub-trigger.svelte';
|
|
16
|
+
import GroupHeading from './dropdown-menu-group-heading.svelte';
|
|
17
|
+
import Portal from './dropdown-menu-portal.svelte';
|
|
18
|
+
export { CheckboxGroup, CheckboxItem, Content, Portal, Root as DropdownMenu, CheckboxGroup as DropdownMenuCheckboxGroup, CheckboxItem as DropdownMenuCheckboxItem, Content as DropdownMenuContent, Portal as DropdownMenuPortal, Group as DropdownMenuGroup, Item as DropdownMenuItem, Label as DropdownMenuLabel, RadioGroup as DropdownMenuRadioGroup, RadioItem as DropdownMenuRadioItem, Separator as DropdownMenuSeparator, Shortcut as DropdownMenuShortcut, Sub as DropdownMenuSub, SubContent as DropdownMenuSubContent, SubTrigger as DropdownMenuSubTrigger, Trigger as DropdownMenuTrigger, GroupHeading as DropdownMenuGroupHeading, Group, GroupHeading, Item, Label, RadioGroup, RadioItem, Root, Separator, Shortcut, Sub, SubContent, SubTrigger, Trigger };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Root from './dropdown-menu.svelte';
|
|
2
|
+
import Sub from './dropdown-menu-sub.svelte';
|
|
3
|
+
import CheckboxGroup from './dropdown-menu-checkbox-group.svelte';
|
|
4
|
+
import CheckboxItem from './dropdown-menu-checkbox-item.svelte';
|
|
5
|
+
import Content from './dropdown-menu-content.svelte';
|
|
6
|
+
import Group from './dropdown-menu-group.svelte';
|
|
7
|
+
import Item from './dropdown-menu-item.svelte';
|
|
8
|
+
import Label from './dropdown-menu-label.svelte';
|
|
9
|
+
import RadioGroup from './dropdown-menu-radio-group.svelte';
|
|
10
|
+
import RadioItem from './dropdown-menu-radio-item.svelte';
|
|
11
|
+
import Separator from './dropdown-menu-separator.svelte';
|
|
12
|
+
import Shortcut from './dropdown-menu-shortcut.svelte';
|
|
13
|
+
import Trigger from './dropdown-menu-trigger.svelte';
|
|
14
|
+
import SubContent from './dropdown-menu-sub-content.svelte';
|
|
15
|
+
import SubTrigger from './dropdown-menu-sub-trigger.svelte';
|
|
16
|
+
import GroupHeading from './dropdown-menu-group-heading.svelte';
|
|
17
|
+
import Portal from './dropdown-menu-portal.svelte';
|
|
18
|
+
export { CheckboxGroup, CheckboxItem, Content, Portal, Root as DropdownMenu, CheckboxGroup as DropdownMenuCheckboxGroup, CheckboxItem as DropdownMenuCheckboxItem, Content as DropdownMenuContent, Portal as DropdownMenuPortal, Group as DropdownMenuGroup, Item as DropdownMenuItem, Label as DropdownMenuLabel, RadioGroup as DropdownMenuRadioGroup, RadioItem as DropdownMenuRadioItem, Separator as DropdownMenuSeparator, Shortcut as DropdownMenuShortcut, Sub as DropdownMenuSub, SubContent as DropdownMenuSubContent, SubTrigger as DropdownMenuSubTrigger, Trigger as DropdownMenuTrigger, GroupHeading as DropdownMenuGroupHeading, Group, GroupHeading, Item, Label, RadioGroup, RadioItem, Root, Separator, Shortcut, Sub, SubContent, SubTrigger, Trigger };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Plugin } from 'vite';
|
|
2
|
-
import type { DocsContentItem, SearchDoc } from './config.js';
|
|
2
|
+
import type { DocsContentItem, LlmsDoc, SearchDoc } from './config.js';
|
|
3
3
|
export interface DocsmithViteOptions {
|
|
4
4
|
/** Directory scanned for doc pages. Default: `'src/routes/docs'`. */
|
|
5
5
|
content?: string;
|
|
@@ -32,3 +32,10 @@ export declare function collectDocs(contentDir: string, routesDir: string): Docs
|
|
|
32
32
|
* already reported by {@link collectDocs}, so this stays quiet.
|
|
33
33
|
*/
|
|
34
34
|
export declare function collectSearchDocs(contentDir: string, routesDir: string): SearchDoc[];
|
|
35
|
+
/**
|
|
36
|
+
* Build the LLM records for every page: title, section, description, and the
|
|
37
|
+
* full markdown content. Served as the `svelte-docsmith/llms` virtual module and
|
|
38
|
+
* consumed server-side by `llms.txt` / `llms-full.txt` routes, so it never ships
|
|
39
|
+
* to the client.
|
|
40
|
+
*/
|
|
41
|
+
export declare function collectLlmsDocs(contentDir: string, routesDir: string): LlmsDoc[];
|