Birch UI v0.1
Pricing

@birchui/svelte

Svelte 5 component and action for the grid and scheduler.

Open .md
npm install @birchui/svelteLicense: MIT

Key exports: BirchGrid, birchGrid

Guides: Svelte

@birchui/svelte#

createSvelteActionfunction#

function createSvelteAction<TOptions, TEvents extends object, TWidget extends Widget<TOptions, TEvents>>(definition: WidgetDefinition<TOptions, TEvents, TWidget>): WidgetAction<TOptions, TEvents, TWidget>
ParameterTypeDescription
definitionWidgetDefinition<TOptions, TEvents, TWidget>—

Defined in packages/svelte/src/create-action.ts:59

toActionParamsfunction#

function toActionParams<TOptions, TEvents extends object, TWidget extends Widget<TOptions, TEvents>>(definition: WidgetDefinition<TOptions, TEvents, TWidget>, props: Record<string, unknown>): WidgetActionParams<TOptions, TEvents, TWidget>
ParameterTypeDescription
definitionWidgetDefinition<TOptions, TEvents, TWidget>—
propsRecord<string, unknown>—

Defined in packages/svelte/src/create-action.ts:85

birchGridconst#

const birchGrid: WidgetAction<GridOptions<any>, GridEvents<any>, GridApi<any>>

Defined in packages/svelte/src/index.ts:19

BirchGridconst#

const BirchGrid: BirchGridComponent

Defined in packages/svelte/src/index.ts:31

BirchGridComponentinterface#

interface BirchGridComponent
<TRow = RowData>(this: void, internals: ComponentInternals, props: BirchGridProps<TRow>): ReturnType<Component<BirchGridProps<TRow>>>
PropertyTypeDescription
elementoptionaltypeof HTMLElement—
z_$$bindingsoptional'api'—

Defined in packages/svelte/src/index.ts:21

WidgetActionReturninterface#

interface WidgetActionReturn<TParams>
PropertyTypeDescription
update()(params: TParams) => void—
destroy()() => void—

Defined in packages/svelte/src/create-action.ts:16

BirchComponentPropstype#

type BirchComponentProps<TOptions, TEvents extends object, TWidget> = TOptions &
  EventHandlerProps<TEvents> & {
    class?: string;
    style?: string;
    api?: TWidget | null;
  };

Defined in packages/svelte/src/create-action.ts:26

BirchGridPropstype#

type BirchGridProps<TRow = RowData> = BirchComponentProps<GridOptions<TRow>, GridEvents<TRow>, GridApi<TRow>>;

Defined in packages/svelte/src/index.ts:17

ComponentPropsOftype#

type ComponentPropsOf<TDefinition> =
  TDefinition extends WidgetDefinition<infer TOptions, infer TEvents, infer TWidget>
    ? BirchComponentProps<TOptions, TEvents, TWidget>
    : never;

Defined in packages/svelte/src/create-action.ts:33

EventHandlerPropstype#

type EventHandlerProps<TEvents extends object> = {
  [K in keyof TEvents & string as `on${Capitalize<K>}`]?: (payload: TEvents[K]) => void;
};

Defined in packages/svelte/src/create-action.ts:7

EventHandlerstype#

type EventHandlers<TEvents extends object> = {
  [K in keyof TEvents]?: (payload: TEvents[K]) => void;
};

Defined in packages/svelte/src/create-action.ts:3

WidgetActiontype#

type WidgetAction<TOptions, TEvents extends object, TWidget> = (
  node: HTMLElement,
  params: WidgetActionParams<TOptions, TEvents, TWidget>,
) => WidgetActionReturn<WidgetActionParams<TOptions, TEvents, TWidget>>;

Defined in packages/svelte/src/create-action.ts:21

WidgetActionParamstype#

type WidgetActionParams<TOptions, TEvents extends object, TWidget> = TOptions & {
  on?: EventHandlers<TEvents>;
  onReady?: (api: TWidget) => void;
};

Defined in packages/svelte/src/create-action.ts:11

@birchui/svelte/document#

birchDocumentEditorconst#

const birchDocumentEditor: WidgetAction<DocumentEditorOptions, DocumentEditorEvents, DocumentEditorApi>

Defined in packages/svelte/src/document.ts:16

BirchDocumentEditorconst#

const BirchDocumentEditor: Component<BirchDocumentEditorProps, object, 'api'>

Defined in packages/svelte/src/document.ts:20

BirchDocumentEditorPropstype#

type BirchDocumentEditorProps = BirchComponentProps<
  DocumentEditorOptions,
  DocumentEditorEvents,
  DocumentEditorApi
>;

Defined in packages/svelte/src/document.ts:10

@birchui/svelte/pdf#

birchPdfViewerconst#

const birchPdfViewer: WidgetAction<PdfViewerOptions, PdfViewerEvents, PdfViewerApi>

Defined in packages/svelte/src/pdf.ts:7

BirchPdfViewerconst#

const BirchPdfViewer: Component<BirchPdfViewerProps, object, 'api'>

Defined in packages/svelte/src/pdf.ts:9

BirchPdfViewerPropstype#

type BirchPdfViewerProps = BirchComponentProps<PdfViewerOptions, PdfViewerEvents, PdfViewerApi>;

Defined in packages/svelte/src/pdf.ts:5

@birchui/svelte/scheduler#

birchSchedulerconst#

const birchScheduler: WidgetAction<SchedulerOptions<SchedulerEvent, SchedulerResource>, SchedulerEvents<SchedulerEvent, SchedulerResource>, SchedulerApi<SchedulerEvent, SchedulerResource>>

Defined in packages/svelte/src/scheduler.ts:7

BirchSchedulerconst#

const BirchScheduler: Component<BirchSchedulerProps, object, 'api'>

Defined in packages/svelte/src/scheduler.ts:9

BirchSchedulerPropstype#

type BirchSchedulerProps = ComponentPropsOf<typeof schedulerDefinition>;

Defined in packages/svelte/src/scheduler.ts:5

↑ ↓ to move, Enter to open, Esc to close