diff --git a/docs/src/lib/components/DocsMenu.svelte b/docs/src/lib/components/DocsMenu.svelte index 49b3b95cf..b06c8e2d5 100644 --- a/docs/src/lib/components/DocsMenu.svelte +++ b/docs/src/lib/components/DocsMenu.svelte @@ -7,6 +7,7 @@ import { sortFunc } from '@layerstack/utils'; import { cls } from '@layerstack/tailwind'; + import LucideBot from '~icons/lucide/bot'; import LucideCompass from '~icons/lucide/compass'; import LucideGalleryVertical from '~icons/lucide/gallery-vertical'; import LucideGalleryHorizontalEnd from '~icons/lucide/gallery-horizontal-end'; @@ -28,7 +29,8 @@ { name: 'Simplified charts', path: 'simplified-charts' }, { name: 'Scales', path: 'scales' }, { name: 'State', path: 'state' }, - { name: 'Styles', path: 'styles' } + { name: 'Styles', path: 'styles' }, + { name: 'LLMs', path: 'LLMs' } ]; const componentsByCategory = flatGroup(allComponents, (d) => d.category?.toLowerCase()) diff --git a/docs/src/lib/components/OpenLLMs.svelte b/docs/src/lib/components/OpenLLMs.svelte new file mode 100644 index 000000000..64a9a330f --- /dev/null +++ b/docs/src/lib/components/OpenLLMs.svelte @@ -0,0 +1,156 @@ + + + + + + + + + (openSourceModal = false)} + class="max-h-[98dvh] md:max-h-[90dvh] max-w-[98vw] md:max-w-[90vw] grid grid-rows-[auto_1fr_auto]" +> +
+
+
Source
+
{metadata?.sourceUrl}
+
+ + {#if metadata?.sourceUrl} + + {/if} +
+ +
+ +
+ +
+ +
+
diff --git a/docs/src/routes/docs/components/[name]/+layout.svelte b/docs/src/routes/docs/components/[name]/+layout.svelte index 6d4b92132..3371fa84a 100644 --- a/docs/src/routes/docs/components/[name]/+layout.svelte +++ b/docs/src/routes/docs/components/[name]/+layout.svelte @@ -2,6 +2,7 @@ import { getSettings } from 'layerchart'; import { Button, Menu, Switch, Toggle, ToggleGroup, ToggleOption, Tooltip } from 'svelte-ux'; import { toTitleCase } from '@layerstack/utils'; + import OpenLLMsbutton from '$lib/components/OpenLLMs.svelte'; import ViewSourceButton from '$lib/components/ViewSourceButton.svelte'; import { examples } from '$lib/context.js'; @@ -129,14 +130,7 @@
{metadata.description}
- {#if 'source' in metadata} - - {/if} +