Skip to content

Commit dd9b279

Browse files
committed
fix(docs): update content and fix scrolling on navigation
1 parent 3e892c9 commit dd9b279

File tree

3 files changed

+4
-82
lines changed

3 files changed

+4
-82
lines changed

sites/docs/src/lib/shared/ui/shadcn/scroll-area/scroll-area.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@
99
orientation = 'vertical',
1010
scrollbarXClasses = '',
1111
scrollbarYClasses = '',
12+
viewportRef = $bindable(null),
1213
children,
1314
...restProps
1415
}: WithoutChild<ScrollAreaPrimitive.RootProps> & {
1516
orientation?: 'vertical' | 'horizontal' | 'both' | undefined;
1617
scrollbarXClasses?: string | undefined;
1718
scrollbarYClasses?: string | undefined;
19+
viewportRef?: HTMLDivElement | null;
1820
} = $props();
1921
</script>
2022

2123
<ScrollAreaPrimitive.Root bind:ref {...restProps} class={cn('relative overflow-hidden', className)}>
22-
<ScrollAreaPrimitive.Viewport class="h-full w-full rounded-[inherit]">
24+
<ScrollAreaPrimitive.Viewport bind:ref={viewportRef} class="h-full w-full rounded-[inherit]">
2325
{@render children?.()}
2426
</ScrollAreaPrimitive.Viewport>
2527
{#if orientation === 'vertical' || orientation === 'both'}

sites/docs/src/routes/docs/api/types/+page.md

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -311,82 +311,4 @@ if (table.pagination) {
311311

312312
// Access the current page of rows
313313
const currentPageRows = table.rows;
314-
```
315-
316-
## Plugin Types
317-
318-
### TablePlugin
319-
320-
Core interface for implementing plugins:
321-
322-
```ts
323-
interface TablePlugin<T, TPluginState, TPluginId extends string = string> {
324-
readonly id: TPluginId;
325-
init(getRows: () => Row<T>[], getColumns: () => Column<T>[]): PluginOutput<T, TPluginState>;
326-
}
327-
```
328-
329-
| Type Parameter | Description |
330-
| -------------- | ------------------------------------ |
331-
| `T` | Type of data items in the table |
332-
| `TPluginState` | Type of state managed by this plugin |
333-
| `TPluginId` | String literal type for plugin ID |
334-
335-
#### Properties
336-
337-
| Name | Type | Description |
338-
| ---- | ----------- | -------------------------------- |
339-
| `id` | `TPluginId` | Unique identifier for the plugin |
340-
341-
#### Methods
342-
343-
| Name | Parameters | Return Type | Description |
344-
| ------ | ------------------------------------------------------------ | ------------------------------- | ---------------------------------------------------------- |
345-
| `init` | `getRows: () => Row<T>[]`<br>`getColumns: () => Column<T>[]` | `PluginOutput<T, TPluginState>` | Initialize plugin and return its state and transformations |
346-
347-
### PluginOutput
348-
349-
Interface defining plugin initialization output:
350-
351-
```ts
352-
interface PluginOutput<T, TPluginState = unknown> {
353-
state: TPluginState;
354-
rows: Row<T>[];
355-
columns: Column<T>[];
356-
}
357-
```
358-
359-
| Property | Type | Description |
360-
| --------- | -------------- | ------------------------------------------------------------ |
361-
| `state` | `TPluginState` | Plugin state that will be accessible via `table.plugins[id]` |
362-
| `rows` | `Row<T>[]` | Transformed rows that will be used for rendering |
363-
| `columns` | `Column<T>[]` | Transformed columns that will be used for rendering |
364-
365-
### ReactiveTableWithPlugins
366-
367-
Type definition for a table instance with plugins:
368-
369-
```ts
370-
type ReactiveTableWithPlugins<
371-
T,
372-
TPluginsMap extends Record<string, unknown> = EmptyPluginsMap
373-
> = ReactiveTable<T> & {
374-
plugins: TPluginsMap;
375-
use<TPluginId extends string, TPluginState>(
376-
plugin: TablePlugin<T, TPluginState, TPluginId>
377-
): ReactiveTableWithPlugins<T, TPluginsMap & Record<TPluginId, TPluginState>>;
378-
};
379-
```
380-
381-
| Property | Type | Description |
382-
| --------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
383-
| `plugins` | `TPluginsMap` | Registry of installed plugins and their state |
384-
| `use` | `<TPluginId, TPluginState>(plugin: TablePlugin<T, TPluginState, TPluginId>) => ReactiveTableWithPlugins` | Install a new plugin and return updated table instance |
385-
386-
### EmptyPluginsMap
387-
388-
Type representing an empty plugin registry:
389-
390-
```ts
391-
type EmptyPluginsMap = Record<string, never>;
392-
```
314+
```

sites/docs/src/routes/docs/column-definition/+page.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ That's it for the basics! Let's dive into the details.
4343

4444
## Your First Column Definition
4545

46-
## Your First Column Definition
47-
4846
Here's how simple it is to set up columns for your data:
4947

5048
```svelte

0 commit comments

Comments
 (0)