sdocs 0.0.21 → 0.0.23

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.
@@ -1,14 +1,15 @@
1
- import type { DocEntry } from '../types.js';
1
+ import { SvelteComponentTyped } from "svelte";
2
2
  import '../ui/styles/sdocs.css';
3
- interface Props {
4
- docs: DocEntry[];
5
- logo?: string;
6
- cssNames?: string[];
7
- sidebarConfig?: {
8
- order?: Record<string, string[]>;
9
- open?: string[];
3
+ declare const __propDef: {
4
+ props: Record<string, never>;
5
+ events: {
6
+ [evt: string]: CustomEvent<any>;
10
7
  };
8
+ slots: {};
9
+ };
10
+ export type AppProps = typeof __propDef.props;
11
+ export type AppEvents = typeof __propDef.events;
12
+ export type AppSlots = typeof __propDef.slots;
13
+ export default class App extends SvelteComponentTyped<AppProps, AppEvents, AppSlots> {
11
14
  }
12
- declare const App: import("svelte").Component<Props, {}, "">;
13
- type App = ReturnType<typeof App>;
14
- export default App;
15
+ export {};
@@ -1,9 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- interface Props {
3
- title: string;
4
- defaultExpanded?: boolean;
5
- children: Snippet;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type CollapsiblePanelProps = typeof __propDef.props;
10
+ export type CollapsiblePanelEvents = typeof __propDef.events;
11
+ export type CollapsiblePanelSlots = typeof __propDef.slots;
12
+ export default class CollapsiblePanel extends SvelteComponentTyped<CollapsiblePanelProps, CollapsiblePanelEvents, CollapsiblePanelSlots> {
6
13
  }
7
- declare const CollapsiblePanel: import("svelte").Component<Props, {}, "">;
8
- type CollapsiblePanel = ReturnType<typeof CollapsiblePanel>;
9
- export default CollapsiblePanel;
14
+ export {};
@@ -1,10 +1,14 @@
1
- import type { DocEntry } from '../../types.js';
2
- interface Props {
3
- doc: DocEntry;
4
- /** If set, show only this example (full-page view) */
5
- snippetName?: string;
6
- activeStylesheet?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type ComponentViewProps = typeof __propDef.props;
10
+ export type ComponentViewEvents = typeof __propDef.events;
11
+ export type ComponentViewSlots = typeof __propDef.slots;
12
+ export default class ComponentView extends SvelteComponentTyped<ComponentViewProps, ComponentViewEvents, ComponentViewSlots> {
7
13
  }
8
- declare const ComponentView: import("svelte").Component<Props, {}, "">;
9
- type ComponentView = ReturnType<typeof ComponentView>;
10
- export default ComponentView;
14
+ export {};
@@ -1,13 +1,14 @@
1
- import type { ParsedProp, ParsedCssProp } from '../../types.js';
2
- interface Props {
3
- componentProps: ParsedProp[];
4
- cssProps: ParsedCssProp[];
5
- propValues: Record<string, unknown>;
6
- cssValues: Record<string, string>;
7
- onPropChange: (name: string, value: unknown) => void;
8
- onCssChange: (name: string, value: string) => void;
9
- onReset: () => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type ControlsPanelProps = typeof __propDef.props;
10
+ export type ControlsPanelEvents = typeof __propDef.events;
11
+ export type ControlsPanelSlots = typeof __propDef.slots;
12
+ export default class ControlsPanel extends SvelteComponentTyped<ControlsPanelProps, ControlsPanelEvents, ControlsPanelSlots> {
10
13
  }
11
- declare const ControlsPanel: import("svelte").Component<Props, {}, "">;
12
- type ControlsPanel = ReturnType<typeof ControlsPanel>;
13
- export default ControlsPanel;
14
+ export {};
@@ -1,11 +1,14 @@
1
- interface Column {
2
- key: string;
3
- label: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type DataTableProps = typeof __propDef.props;
10
+ export type DataTableEvents = typeof __propDef.events;
11
+ export type DataTableSlots = typeof __propDef.slots;
12
+ export default class DataTable extends SvelteComponentTyped<DataTableProps, DataTableEvents, DataTableSlots> {
4
13
  }
5
- interface Props {
6
- columns: Column[];
7
- rows: Record<string, unknown>[];
8
- }
9
- declare const DataTable: import("svelte").Component<Props, {}, "">;
10
- type DataTable = ReturnType<typeof DataTable>;
11
- export default DataTable;
14
+ export {};
@@ -1,8 +1,14 @@
1
- import type { DocEntry } from '../../types.js';
2
- interface Props {
3
- docs: DocEntry[];
4
- logo: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type HomePageProps = typeof __propDef.props;
10
+ export type HomePageEvents = typeof __propDef.events;
11
+ export type HomePageSlots = typeof __propDef.slots;
12
+ export default class HomePage extends SvelteComponentTyped<HomePageProps, HomePageEvents, HomePageSlots> {
5
13
  }
6
- declare const HomePage: import("svelte").Component<Props, {}, "">;
7
- type HomePage = ReturnType<typeof HomePage>;
8
- export default HomePage;
14
+ export {};
@@ -1,8 +1,14 @@
1
- import type { DocEntry } from '../../types.js';
2
- interface Props {
3
- doc: DocEntry;
4
- activeStylesheet?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type LayoutViewProps = typeof __propDef.props;
10
+ export type LayoutViewEvents = typeof __propDef.events;
11
+ export type LayoutViewSlots = typeof __propDef.slots;
12
+ export default class LayoutView extends SvelteComponentTyped<LayoutViewProps, LayoutViewEvents, LayoutViewSlots> {
5
13
  }
6
- declare const LayoutView: import("svelte").Component<Props, {}, "">;
7
- type LayoutView = ReturnType<typeof LayoutView>;
8
- export default LayoutView;
14
+ export {};
@@ -1,8 +1,14 @@
1
- import type { DocEntry } from '../../types.js';
2
- interface Props {
3
- doc: DocEntry;
4
- activeStylesheet?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type PageViewProps = typeof __propDef.props;
10
+ export type PageViewEvents = typeof __propDef.events;
11
+ export type PageViewSlots = typeof __propDef.slots;
12
+ export default class PageView extends SvelteComponentTyped<PageViewProps, PageViewEvents, PageViewSlots> {
5
13
  }
6
- declare const PageView: import("svelte").Component<Props, {}, "">;
7
- type PageView = ReturnType<typeof PageView>;
8
- export default PageView;
14
+ export {};
@@ -1,10 +1,14 @@
1
- interface Props {
2
- src: string;
3
- props?: Record<string, unknown>;
4
- cssVars?: Record<string, string>;
5
- activeStylesheet?: string;
6
- fullHeight?: boolean;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type PreviewFrameProps = typeof __propDef.props;
10
+ export type PreviewFrameEvents = typeof __propDef.events;
11
+ export type PreviewFrameSlots = typeof __propDef.slots;
12
+ export default class PreviewFrame extends SvelteComponentTyped<PreviewFrameProps, PreviewFrameEvents, PreviewFrameSlots> {
7
13
  }
8
- declare const PreviewFrame: import("svelte").Component<Props, {}, "">;
9
- type PreviewFrame = ReturnType<typeof PreviewFrame>;
10
- export default PreviewFrame;
14
+ export {};
@@ -1,16 +1,14 @@
1
- import type { TreeNode } from '../tree-builder.js';
2
- type ThemeMode = 'light' | 'dark';
3
- interface Props {
4
- tree: TreeNode[];
5
- currentPath: string[];
6
- logo: string;
7
- cssNames?: string[];
8
- activeStylesheet?: string;
9
- theme?: ThemeMode;
10
- onToggleFullscreen?: () => void;
11
- onStylesheetChange?: (name: string) => void;
12
- onThemeChange?: (theme: ThemeMode) => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type SidebarProps = typeof __propDef.props;
10
+ export type SidebarEvents = typeof __propDef.events;
11
+ export type SidebarSlots = typeof __propDef.slots;
12
+ export default class Sidebar extends SvelteComponentTyped<SidebarProps, SidebarEvents, SidebarSlots> {
13
13
  }
14
- declare const Sidebar: import("svelte").Component<Props, {}, "">;
15
- type Sidebar = ReturnType<typeof Sidebar>;
16
- export default Sidebar;
14
+ export {};
@@ -1,7 +1,11 @@
1
1
  import type { SdocsConfig, ResolvedSdocsConfig } from '../types.js';
2
2
  /** Find the config file path in the given directory */
3
3
  export declare function findConfigFile(root: string): string | null;
4
+ /** Load the raw config from file (unresolved) */
5
+ export declare function loadRawConfig(root: string): Promise<SdocsConfig>;
4
6
  /** Load and resolve the sdocs config with defaults */
5
7
  export declare function loadConfig(root: string): Promise<ResolvedSdocsConfig>;
8
+ /** Resolve config and finalize paths */
9
+ export declare function resolveAndFinalize(userConfig: SdocsConfig, root: string): ResolvedSdocsConfig;
6
10
  /** Merge user config with defaults */
7
11
  export declare function resolveConfig(userConfig: SdocsConfig): ResolvedSdocsConfig;
@@ -39,12 +39,20 @@ function resolveCssPaths(css, root) {
39
39
  }
40
40
  return resolved;
41
41
  }
42
- /** Load and resolve the sdocs config with defaults */
43
- export async function loadConfig(root) {
42
+ /** Load the raw config from file (unresolved) */
43
+ export async function loadRawConfig(root) {
44
44
  const configPath = findConfigFile(root);
45
45
  if (!configPath)
46
- return { ...DEFAULTS };
47
- const userConfig = await importConfig(configPath);
46
+ return {};
47
+ return importConfig(configPath);
48
+ }
49
+ /** Load and resolve the sdocs config with defaults */
50
+ export async function loadConfig(root) {
51
+ const rawConfig = await loadRawConfig(root);
52
+ return resolveAndFinalize(rawConfig, root);
53
+ }
54
+ /** Resolve config and finalize paths */
55
+ export function resolveAndFinalize(userConfig, root) {
48
56
  const resolved = resolveConfig(userConfig);
49
57
  resolved.include = resolveIncludePatterns(resolved.include, root);
50
58
  resolved.css = resolveCssPaths(resolved.css, root);
@@ -1,27 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- /**
3
- * @cssvar {shorthand} --p - Padding
4
- * @cssvar {length} --r - Border radius
5
- * @cssvar {length} --h - Height
6
- * @cssvar {length} --gap - Gap between left, label, right
7
- * @cssvar {color} --bg - Background color
8
- * @cssvar {color} --bg-hover - Background on hover
9
- * @cssvar {color} --bg-active - Background when pressed
10
- * @cssvar {color} --border - Border color
11
- * @cssvar {color} --color - Text/icon color
12
- * @cssvar {color} --color-hover - Text/icon color on hover
13
- * @cssvar {string} --font-weight - Font weight
14
- * @cssvar {length} --font-size - Font size
15
- */
16
- interface Props {
17
- onclick?: (e: MouseEvent) => void;
18
- title?: string;
19
- disabled?: boolean;
20
- left?: Snippet;
21
- right?: Snippet;
22
- children?: Snippet;
23
- class?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type ButtonProps = typeof __propDef.props;
10
+ export type ButtonEvents = typeof __propDef.events;
11
+ export type ButtonSlots = typeof __propDef.slots;
12
+ export default class Button extends SvelteComponentTyped<ButtonProps, ButtonEvents, ButtonSlots> {
24
13
  }
25
- declare const Button: import("svelte").Component<Props, {}, "">;
26
- type Button = ReturnType<typeof Button>;
27
- export default Button;
14
+ export {};
@@ -1,8 +1,14 @@
1
- interface Props {
2
- label: string;
3
- value: boolean;
4
- onchange: (value: boolean) => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type CheckboxProps = typeof __propDef.props;
10
+ export type CheckboxEvents = typeof __propDef.events;
11
+ export type CheckboxSlots = typeof __propDef.slots;
12
+ export default class Checkbox extends SvelteComponentTyped<CheckboxProps, CheckboxEvents, CheckboxSlots> {
5
13
  }
6
- declare const Checkbox: import("svelte").Component<Props, {}, "">;
7
- type Checkbox = ReturnType<typeof Checkbox>;
8
- export default Checkbox;
14
+ export {};
@@ -1,8 +1,14 @@
1
- interface Props {
2
- label: string;
3
- value: string;
4
- onchange: (value: string) => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type ColorProps = typeof __propDef.props;
10
+ export type ColorEvents = typeof __propDef.events;
11
+ export type ColorSlots = typeof __propDef.slots;
12
+ export default class Color extends SvelteComponentTyped<ColorProps, ColorEvents, ColorSlots> {
5
13
  }
6
- declare const Color: import("svelte").Component<Props, {}, "">;
7
- type Color = ReturnType<typeof Color>;
8
- export default Color;
14
+ export {};
@@ -1,8 +1,14 @@
1
- interface Props {
2
- label: string;
3
- value: string;
4
- onchange: (value: string) => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type DimensionProps = typeof __propDef.props;
10
+ export type DimensionEvents = typeof __propDef.events;
11
+ export type DimensionSlots = typeof __propDef.slots;
12
+ export default class Dimension extends SvelteComponentTyped<DimensionProps, DimensionEvents, DimensionSlots> {
5
13
  }
6
- declare const Dimension: import("svelte").Component<Props, {}, "">;
7
- type Dimension = ReturnType<typeof Dimension>;
8
- export default Dimension;
14
+ export {};
@@ -1,8 +1,14 @@
1
- interface Props {
2
- label: string;
3
- value: number;
4
- onchange: (value: number) => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type NumberProps = typeof __propDef.props;
10
+ export type NumberEvents = typeof __propDef.events;
11
+ export type NumberSlots = typeof __propDef.slots;
12
+ export default class Number extends SvelteComponentTyped<NumberProps, NumberEvents, NumberSlots> {
5
13
  }
6
- declare const Number: import("svelte").Component<Props, {}, "">;
7
- type Number = ReturnType<typeof Number>;
8
- export default Number;
14
+ export {};
@@ -1,9 +1,14 @@
1
- interface Props {
2
- label: string;
3
- value: string;
4
- options: string[];
5
- onchange: (value: string) => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type SelectProps = typeof __propDef.props;
10
+ export type SelectEvents = typeof __propDef.events;
11
+ export type SelectSlots = typeof __propDef.slots;
12
+ export default class Select extends SvelteComponentTyped<SelectProps, SelectEvents, SelectSlots> {
6
13
  }
7
- declare const Select: import("svelte").Component<Props, {}, "">;
8
- type Select = ReturnType<typeof Select>;
9
- export default Select;
14
+ export {};
@@ -1,8 +1,14 @@
1
- interface Props {
2
- label: string;
3
- value: string;
4
- onchange: (value: string) => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type TextProps = typeof __propDef.props;
10
+ export type TextEvents = typeof __propDef.events;
11
+ export type TextSlots = typeof __propDef.slots;
12
+ export default class Text extends SvelteComponentTyped<TextProps, TextEvents, TextSlots> {
5
13
  }
6
- declare const Text: import("svelte").Component<Props, {}, "">;
7
- type Text = ReturnType<typeof Text>;
8
- export default Text;
14
+ export {};
@@ -1,15 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- /**
3
- * A flexible layout component with slots for top, bottom, left, right, and center content.
4
- */
5
- interface Props {
6
- top?: Snippet;
7
- bottom?: Snippet;
8
- left?: Snippet;
9
- right?: Snippet;
10
- children?: Snippet;
11
- class?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type FrameProps = typeof __propDef.props;
10
+ export type FrameEvents = typeof __propDef.events;
11
+ export type FrameSlots = typeof __propDef.slots;
12
+ export default class Frame extends SvelteComponentTyped<FrameProps, FrameEvents, FrameSlots> {
12
13
  }
13
- declare const Frame: import("svelte").Component<Props, {}, "">;
14
- type Frame = ReturnType<typeof Frame>;
15
- export default Frame;
14
+ export {};
@@ -1,16 +1,16 @@
1
- /**
2
- * @cssvar {length} --w - Icon width (default: 24px)
3
- * @cssvar {length} --h - Icon height (default: 24px)
4
- * @cssvar {color} --fill - Icon color, inherited via currentColor (default: currentColor)
5
- */
6
- interface Props {
7
- /** Icon name matching a filename in the icons folder (e.g. "chevron-right") */
8
- name: string;
9
- /** Additional CSS class names */
10
- class?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ icons?: Record<string, string>;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {};
10
+ };
11
+ export type IconProps = typeof __propDef.props;
12
+ export type IconEvents = typeof __propDef.events;
13
+ export type IconSlots = typeof __propDef.slots;
14
+ export default class Icon extends SvelteComponentTyped<IconProps, IconEvents, IconSlots> {
11
15
  }
12
- declare const Icon: import("svelte").Component<Props, {
13
- icons: Record<string, string>;
14
- }, "">;
15
- type Icon = ReturnType<typeof Icon>;
16
- export default Icon;
16
+ export {};
@@ -1,11 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- interface Props {
3
- label: string;
4
- expanded?: boolean;
5
- children?: Snippet;
6
- class?: string;
7
- onclick?: () => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type GroupProps = typeof __propDef.props;
10
+ export type GroupEvents = typeof __propDef.events;
11
+ export type GroupSlots = typeof __propDef.slots;
12
+ export default class Group extends SvelteComponentTyped<GroupProps, GroupEvents, GroupSlots> {
8
13
  }
9
- declare const Group: import("svelte").Component<Props, {}, "expanded">;
10
- type Group = ReturnType<typeof Group>;
11
- export default Group;
14
+ export {};
@@ -1,33 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- /**
3
- * @cssvar {shorthand} --p - Padding
4
- * @cssvar {shorthand} --m - Margin
5
- * @cssvar {length} --r - Border radius
6
- * @cssvar {shorthand} --b - Border
7
- * @cssvar {color} --bg - Background color
8
- * @cssvar {color} --bg-active - Background when active
9
- * @cssvar {color} --bg-active-hover - Background when active and hovered
10
- * @cssvar {color} --bg-hover - Background on hover
11
- * @cssvar {color} --expander-color - Expander icon color
12
- * @cssvar {color} --expander-color-active - Expander icon color when active
13
- * @cssvar {color} --expander-color-hover - Expander icon color on hover
14
- * @cssvar {length} --expander-size - Expander icon size
15
- * @cssvar {color} --font-color - Text color
16
- * @cssvar {color} --font-color-active - Text color when active
17
- * @cssvar {color} --font-color-hover - Text color on hover
18
- * @cssvar {string} --font-weight - Font weight
19
- */
20
- interface Props {
21
- label: string;
22
- href?: string;
23
- active?: boolean;
24
- left?: Snippet;
25
- right?: Snippet;
26
- expanded?: boolean;
27
- children?: Snippet;
28
- class?: string;
29
- onclick?: () => void;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type ItemProps = typeof __propDef.props;
10
+ export type ItemEvents = typeof __propDef.events;
11
+ export type ItemSlots = typeof __propDef.slots;
12
+ export default class Item extends SvelteComponentTyped<ItemProps, ItemEvents, ItemSlots> {
30
13
  }
31
- declare const Item: import("svelte").Component<Props, {}, "expanded">;
32
- type Item = ReturnType<typeof Item>;
33
- export default Item;
14
+ export {};
@@ -1,8 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- interface Props {
3
- children?: Snippet;
4
- class?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type NavTreeProps = typeof __propDef.props;
10
+ export type NavTreeEvents = typeof __propDef.events;
11
+ export type NavTreeSlots = typeof __propDef.slots;
12
+ export default class NavTree extends SvelteComponentTyped<NavTreeProps, NavTreeEvents, NavTreeSlots> {
5
13
  }
6
- declare const NavTree: import("svelte").Component<Props, {}, "">;
7
- type NavTree = ReturnType<typeof NavTree>;
8
- export default NavTree;
14
+ export {};
@@ -0,0 +1,9 @@
1
+ import Root from './NavTree.svelte';
2
+ import Item from './Item.svelte';
3
+ import Group from './Group.svelte';
4
+ declare const NavTree: typeof Root & {
5
+ Item: typeof Item;
6
+ Group: typeof Group;
7
+ };
8
+ export { NavTree, Item, Group };
9
+ export default NavTree;
@@ -1,19 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- /**
3
- * @cssvar {string} --direction - Flex direction (row | column)
4
- * @cssvar {length} --gap - Gap between items
5
- * @cssvar {string} --align - Align items
6
- * @cssvar {string} --justify - Justify content
7
- * @cssvar {string} --wrap - Flex wrap
8
- * @cssvar {shorthand} --p - Padding
9
- * @cssvar {color} --bg - Background color
10
- * @cssvar {length} --r - Border radius
11
- * @cssvar {shorthand} --b - Border
12
- */
13
- interface Props {
14
- children: Snippet;
15
- class?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type StackProps = typeof __propDef.props;
10
+ export type StackEvents = typeof __propDef.events;
11
+ export type StackSlots = typeof __propDef.slots;
12
+ export default class Stack extends SvelteComponentTyped<StackProps, StackEvents, StackSlots> {
16
13
  }
17
- declare const Stack: import("svelte").Component<Props, {}, "">;
18
- type Stack = ReturnType<typeof Stack>;
19
- export default Stack;
14
+ export {};
package/dist/vite.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { readFile } from 'node:fs/promises';
2
- import { loadConfig, resolveConfig } from './server/config.js';
2
+ import { loadRawConfig, resolveAndFinalize } from './server/config.js';
3
3
  import { discoverDocFiles, getSdocKind } from './server/discovery.js';
4
4
  import { parseDocSource } from './server/meta-parser.js';
5
5
  import { parseComponent } from './server/prop-parser.js';
@@ -22,12 +22,9 @@ export function sdocsPlugin(userConfig) {
22
22
  name: 'sdocs',
23
23
  async configResolved(resolvedConfig) {
24
24
  root = resolvedConfig.root;
25
- if (userConfig) {
26
- config = resolveConfig(userConfig);
27
- }
28
- else {
29
- config = await loadConfig(root);
30
- }
25
+ const fileConfig = await loadRawConfig(root);
26
+ const merged = { ...fileConfig, ...userConfig };
27
+ config = resolveAndFinalize(merged, root);
31
28
  },
32
29
  configureServer(devServer) {
33
30
  server = devServer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdocs",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "A lightweight documentation tool for Svelte 5 components",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -29,9 +29,9 @@
29
29
  "bin"
30
30
  ],
31
31
  "peerDependencies": {
32
- "@sveltejs/vite-plugin-svelte": "^5.0.0 || ^6.0.0 || ^7.0.0",
33
- "svelte": "^5.0.0",
34
- "vite": "^6.0.0 || ^7.0.0"
32
+ "@sveltejs/vite-plugin-svelte": "*",
33
+ "svelte": "*",
34
+ "vite": "*"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@sveltejs/package": "^2.5.7",