@tradalab/lyra 3.15.0 → 3.16.0

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.
@@ -298,6 +298,25 @@ interface AvatarTileProps {
298
298
  */
299
299
  declare function AvatarTile({ src, alt, fallback, className }: AvatarTileProps): React$1.JSX.Element;
300
300
 
301
+ interface AuthCardProps {
302
+ title: ReactNode;
303
+ description?: ReactNode;
304
+ /** The product mark above the card, as an element: an `<img>`, an icon, or a framework image. */
305
+ logo?: ReactNode;
306
+ /** The product name beside `logo`. The row is left out when both are absent. */
307
+ brand?: ReactNode;
308
+ /** Below the card, e.g. language links, terms, a link back to the app. */
309
+ footer?: ReactNode;
310
+ /** The form. A card with none (a failure, a "check your mail") renders its header alone. */
311
+ children?: ReactNode;
312
+ className?: string;
313
+ }
314
+ /**
315
+ * The full-page frame of a sign-in, sign-up or recovery screen: brand, one card, a footer.
316
+ * Renders a `<main>`, so use it as the page itself, not inside another layout's main.
317
+ */
318
+ declare function AuthCard({ title, description, logo, brand, footer, children, className }: AuthCardProps): React$1.JSX.Element;
319
+
301
320
  interface MobileSheetProps {
302
321
  title: ReactNode;
303
322
  description?: ReactNode;
@@ -479,6 +498,8 @@ interface LlmSlot {
479
498
  interface LlmState {
480
499
  providers: LlmProvider[];
481
500
  slots: LlmSlot[];
501
+ /** The settings file was written by a newer app and every write would be refused. */
502
+ read_only?: boolean;
482
503
  }
483
504
  interface LlmModel {
484
505
  id: string;
@@ -505,6 +526,8 @@ interface LlmPullProgress {
505
526
  status: string;
506
527
  done: number;
507
528
  total: number;
529
+ /** The layer this event counts; layers with different digests add up to the model. */
530
+ digest?: string;
508
531
  }
509
532
  interface LlmSettingsApi {
510
533
  state(): Promise<LlmState>;
@@ -527,6 +550,18 @@ interface LlmSettingsApi {
527
550
  * copy of this screen.
528
551
  */
529
552
  slotNote?(slot: string): React$1.ReactNode;
553
+ /** Deletes a downloaded model; without it the model list offers no delete. */
554
+ deleteModel?(provider: string, model: string): Promise<boolean>;
555
+ /** The api asks the user itself before a delete, as scorix's `mod:llm` does, so the screen does not. */
556
+ confirmsDelete?: boolean;
557
+ /** An error that only means the user declined a confirmation; it is not shown as a failure. */
558
+ isCanceled?(err: unknown): boolean;
559
+ /** The name to show for a provider id; the id is shown when this returns nothing. */
560
+ providerName?(id: string): string | undefined;
561
+ /** App-owned status and actions on a provider's row, e.g. installing an engine the app runs. */
562
+ providerExtra?(provider: LlmProvider): React$1.ReactNode;
563
+ /** Called after a slot was bound, e.g. to offer re-indexing when the embedding model changed. */
564
+ onBound?(slot: string, provider: string, model: string): void;
530
565
  }
531
566
  interface LlmSettingsLabels {
532
567
  slots?: string;
@@ -560,12 +595,43 @@ interface LlmSettingsLabels {
560
595
  running?: string;
561
596
  addFound?: string;
562
597
  retry?: string;
598
+ readOnly?: string;
599
+ driversFailed?: string;
600
+ driverUnknown?: string;
601
+ refresh?: string;
602
+ models?: string;
603
+ modelsEmpty?: string;
604
+ deleteModel?: string;
605
+ pullPlaceholder?: string;
563
606
  capabilities?: Partial<Record<string, string>>;
607
+ /** Labels that carry a value, so a translation can put it where its grammar wants it. */
608
+ format?: LlmSettingsFormat;
609
+ }
610
+ interface LlmSettingsFormat {
611
+ downloadModel?(model: string): string;
612
+ editProvider?(name: string): string;
613
+ removeProvider?(name: string): string;
614
+ addFound?(name: string): string;
615
+ useFor?(slotLabel: string): string;
616
+ slotProvider?(slotLabel: string): string;
617
+ slotModel?(slotLabel: string): string;
618
+ /** Slot and field texts come from the app's Go side; these translate them. */
619
+ slotLabel?(slot: LlmSlot): string;
620
+ slotDescription?(slot: LlmSlot): string | undefined;
621
+ fieldLabel?(driver: string, field: LlmField): string;
622
+ fieldDescription?(driver: string, field: LlmField): string | undefined;
623
+ size?(bytes: number): string;
624
+ pullStatus?(status: string): string;
564
625
  }
565
- declare function LlmSettings({ api, labels, className, }: {
626
+ interface LlmSettingsProps {
566
627
  api: LlmSettingsApi;
567
628
  labels?: LlmSettingsLabels;
568
629
  className?: string;
569
- }): React$1.JSX.Element;
630
+ /** Rendered above the slots, e.g. an onboarding notice. */
631
+ header?: React$1.ReactNode;
632
+ /** Rendered below the providers, e.g. settings the app owns. */
633
+ footer?: React$1.ReactNode;
634
+ }
635
+ declare function LlmSettings({ api, labels, className, header, footer }: LlmSettingsProps): React$1.JSX.Element;
570
636
 
571
- export { AvatarTile, type AvatarTileProps, ChoiceDrawer, type ChoiceDrawerProps, type ChoiceOption, ConfirmContext, ConfirmDialog, type ConfirmFn, type ConfirmOptions, ConfirmProvider, type DropPlan, type DropPosition, type FlatTreeNode, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type LlmCapability, type LlmDriver, type LlmField, type LlmFound, type LlmModel, type LlmProvider, type LlmProviderInput, type LlmPullProgress, LlmSettings, type LlmSettingsApi, type LlmSettingsLabels, type LlmSlot, type LlmState, type McpCall, type McpClient, McpSettings, type McpSettingsApi, type McpSettingsLabels, type McpStatus, type McpTool, MobileSheet, type MobileSheetProps, OptionPicker, type OptionPickerLabels, Panel, PanelCard, type PanelCardProps, type PanelItemProps, type PickOption, type TreeData, TreeDndProvider, type TreeDndProviderProps, TreeExpander, type TreeExpanderProps, TreeIcon, type TreeIconProps, TreeLabel, type TreeLabelProps, TreeLines, TreeNode, TreeNodeContent, type TreeNodeContentProps, type TreeNodeProps, TreeNodeTrigger, type TreeNodeTriggerProps, TreeProvider, type TreeProviderProps, TreeView, type TreeViewProps, TzPicker, type TzPickerLabels, type TzPickerProps, filterTree, flattenTree, moveId, planDrop, sameOrder, sortTree, useConfirm, useFormField, useTreeDndNode, useTreeDndRoot };
637
+ export { AuthCard, type AuthCardProps, AvatarTile, type AvatarTileProps, ChoiceDrawer, type ChoiceDrawerProps, type ChoiceOption, ConfirmContext, ConfirmDialog, type ConfirmFn, type ConfirmOptions, ConfirmProvider, type DropPlan, type DropPosition, type FlatTreeNode, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type LlmCapability, type LlmDriver, type LlmField, type LlmFound, type LlmModel, type LlmProvider, type LlmProviderInput, type LlmPullProgress, LlmSettings, type LlmSettingsApi, type LlmSettingsFormat, type LlmSettingsLabels, type LlmSettingsProps, type LlmSlot, type LlmState, type McpCall, type McpClient, McpSettings, type McpSettingsApi, type McpSettingsLabels, type McpStatus, type McpTool, MobileSheet, type MobileSheetProps, OptionPicker, type OptionPickerLabels, Panel, PanelCard, type PanelCardProps, type PanelItemProps, type PickOption, type TreeData, TreeDndProvider, type TreeDndProviderProps, TreeExpander, type TreeExpanderProps, TreeIcon, type TreeIconProps, TreeLabel, type TreeLabelProps, TreeLines, TreeNode, TreeNodeContent, type TreeNodeContentProps, type TreeNodeProps, TreeNodeTrigger, type TreeNodeTriggerProps, TreeProvider, type TreeProviderProps, TreeView, type TreeViewProps, TzPicker, type TzPickerLabels, type TzPickerProps, filterTree, flattenTree, moveId, planDrop, sameOrder, sortTree, useConfirm, useFormField, useTreeDndNode, useTreeDndRoot };