@tradalab/lyra 3.15.0 → 3.17.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.
- package/README.md +2 -2
- package/dist/blocks/index.d.ts +121 -5
- package/dist/blocks/index.js +494 -169
- package/dist/blocks/index.js.map +1 -1
- package/dist/chunk-5XFDQRXV.js +9 -0
- package/dist/chunk-5XFDQRXV.js.map +1 -0
- package/dist/chunk-A3T2BEQH.js +45 -0
- package/dist/chunk-A3T2BEQH.js.map +1 -0
- package/dist/{chunk-4ILJ3M7K.js → chunk-ASSRDIKG.js} +138 -5
- package/dist/chunk-ASSRDIKG.js.map +1 -0
- package/dist/{chunk-U4HIZXI6.js → chunk-KSF233MC.js} +3 -3
- package/dist/chunk-KSF233MC.js.map +1 -0
- package/dist/{chunk-VEWKPOMS.js → chunk-OH3OMK7A.js} +13 -3
- package/dist/{chunk-VEWKPOMS.js.map → chunk-OH3OMK7A.js.map} +1 -1
- package/dist/chunk-UAZAKUTL.js +65 -0
- package/dist/chunk-UAZAKUTL.js.map +1 -0
- package/dist/{chunk-SQELPQZU.js → chunk-UNRT3B6P.js} +6 -16
- package/dist/chunk-UNRT3B6P.js.map +1 -0
- package/dist/connection-color-DxEs04ll.d.ts +54 -0
- package/dist/data-table/index.d.ts +182 -5
- package/dist/data-table/index.js +657 -78
- package/dist/data-table/index.js.map +1 -1
- package/dist/people/index.js +26 -10
- package/dist/people/index.js.map +1 -1
- package/dist/{plate-picker-CXxUGyNz.d.ts → plate-picker-dhKLjz_6.d.ts} +1 -1
- package/dist/shell/index.d.ts +4 -2
- package/dist/shell/index.js +11 -5
- package/dist/shell/index.js.map +1 -1
- package/dist/ui/index.d.ts +18 -2
- package/dist/ui/index.js +4 -4
- package/dist/utils/index.d.ts +27 -1
- package/dist/utils/index.js +3 -1
- package/package.json +3 -1
- package/dist/chunk-4ILJ3M7K.js.map +0 -1
- package/dist/chunk-PL37KFRJ.js +0 -3
- package/dist/chunk-PL37KFRJ.js.map +0 -1
- package/dist/chunk-SQELPQZU.js.map +0 -1
- package/dist/chunk-U4HIZXI6.js.map +0 -1
package/README.md
CHANGED
|
@@ -24,10 +24,10 @@ The stylesheet pulls in Tailwind v4, so your app needs `@tailwindcss/postcss`.
|
|
|
24
24
|
|
|
25
25
|
| Subpath | Exports | Boundary |
|
|
26
26
|
|---|---|---|
|
|
27
|
-
| `@tradalab/lyra/utils` | `cn` | server-safe |
|
|
27
|
+
| `@tradalab/lyra/utils` | `cn`, `foldText`, `formatBytes`/`formatCount`, `addTag`/`matchesKeyword`, `pickDelimiter`/`groupByPrefix`, `CONNECTION_COLORS`/`resolveColor`/`ENV_FRAME` | server-safe |
|
|
28
28
|
| `@tradalab/lyra/hooks` | `useMobile` | client |
|
|
29
29
|
| `@tradalab/lyra/ui` | 61 shadcn primitives + `AccountMenu`, `ActionButton`, `Container`, `EmptyState`, `StatusBadge` | client |
|
|
30
|
-
| `@tradalab/lyra/blocks` | `Form`/`FormField` + RHF glue, `Panel`, `Confirm`/`useConfirm`, `Tree`, `TzPicker`, `OptionPicker`, `MobileSheet`, `ChoiceDrawer`, `McpSettings`, `LlmSettings`, `PlatePicker`, `usePlate`, `useCompact`, `PreferenceScript` | client |
|
|
30
|
+
| `@tradalab/lyra/blocks` | `Form`/`FormField` + RHF glue, `Panel`, `Confirm`/`useConfirm`, `Tree`, `TzPicker`, `OptionPicker`, `MobileSheet`, `ChoiceDrawer`, `McpSettings`, `LlmSettings`, `PlatePicker`, `usePlate`, `useCompact`, `PreferenceScript`, `StatTile`, `BarList`, `ColorSwatches`, `TagInput`, `loadExpanded`/`saveExpanded` | client |
|
|
31
31
|
| `@tradalab/lyra/data-table` | `DataTable` + `usePager`, `TableFilterBar`, `TableFilterChips`, `TableSearch`, `TableReload`, `filterRows`, `pageWindow` | client |
|
|
32
32
|
| `@tradalab/lyra/shell` | `AppShell`, `PageShell`, `PageHeader`, `NavItem`, `NavGroup`, `Breadcrumbs`, `BottomNav`, `useActiveRoute`, `useSearchParam`, `useTabParam`, `usePageParam`, `UrlTabs` | client |
|
|
33
33
|
| `@tradalab/lyra/styles.css` | Tailwind v4 base + `radix-lyra` tokens (light/dark) | CSS |
|
package/dist/blocks/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as react_hook_form from 'react-hook-form';
|
|
2
2
|
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import { ReactNode, DragEvent, HTMLAttributes, ReactElement } from 'react';
|
|
4
|
+
import { ReactNode, DragEvent, HTMLAttributes, ComponentProps, ReactElement } from 'react';
|
|
5
5
|
import { Slot, Label } from 'radix-ui';
|
|
6
6
|
import { LucideIcon } from 'lucide-react';
|
|
7
|
+
import { d as ConnectionColor } from '../connection-color-DxEs04ll.js';
|
|
7
8
|
export { B as BEARING_PLATES, a as BearingPlate, P as PLATES, b as Plate, d as derivePlate, i as isPlate } from '../plate-BJ19iaVV.js';
|
|
8
9
|
export { u as useCompact, a as usePlate } from '../use-compact-BvI4sJf9.js';
|
|
9
|
-
export {
|
|
10
|
+
export { a as PlatePicker, P as PlatePickerProps } from '../plate-picker-dhKLjz_6.js';
|
|
10
11
|
export { P as PreferenceScript } from '../preference-script-Dm-LEoYX.js';
|
|
11
12
|
|
|
12
13
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
|
|
@@ -217,6 +218,55 @@ declare const TreeIcon: ({ icon, hasChildren, className, ...props }: TreeIconPro
|
|
|
217
218
|
type TreeLabelProps = HTMLAttributes<HTMLSpanElement>;
|
|
218
219
|
declare const TreeLabel: ({ className, ...props }: TreeLabelProps) => React$1.JSX.Element;
|
|
219
220
|
|
|
221
|
+
interface StatTileProps {
|
|
222
|
+
label: ReactNode;
|
|
223
|
+
value: ReactNode;
|
|
224
|
+
tone?: "default" | "bad";
|
|
225
|
+
className?: string;
|
|
226
|
+
}
|
|
227
|
+
/** One labelled number in a bordered box; `tone="bad"` paints border and value destructive. */
|
|
228
|
+
declare function StatTile({ label, value, tone, className }: StatTileProps): React$1.JSX.Element;
|
|
229
|
+
interface BarListItem {
|
|
230
|
+
key: string;
|
|
231
|
+
label: string;
|
|
232
|
+
value: ReactNode;
|
|
233
|
+
ratio: number;
|
|
234
|
+
onSelect?: () => void;
|
|
235
|
+
}
|
|
236
|
+
/** Rows with a bar behind each label sized by `ratio` (clamped to 0..1, NaN as 0, as 0/0 gives); a row with `onSelect` is a button. */
|
|
237
|
+
declare function BarList({ items, className }: {
|
|
238
|
+
items: readonly BarListItem[];
|
|
239
|
+
className?: string;
|
|
240
|
+
}): React$1.JSX.Element;
|
|
241
|
+
|
|
242
|
+
/** The group ids saved under `key` in localStorage; empty when storage is blocked or holds something else. */
|
|
243
|
+
declare function loadExpanded(key: string): Set<string>;
|
|
244
|
+
/** Saves `ids` under `key`; a blocked write is ignored. */
|
|
245
|
+
declare function saveExpanded(key: string, ids: ReadonlySet<string>): void;
|
|
246
|
+
|
|
247
|
+
interface ColorSwatchesProps {
|
|
248
|
+
value?: string;
|
|
249
|
+
onChange: (value: ConnectionColor | "") => void;
|
|
250
|
+
emptyLabel: string;
|
|
251
|
+
labels?: Partial<Record<ConnectionColor, string>>;
|
|
252
|
+
className?: string;
|
|
253
|
+
"aria-label"?: string;
|
|
254
|
+
"aria-labelledby"?: string;
|
|
255
|
+
}
|
|
256
|
+
/** A row of the eight connection colours plus a dashed "none" dot, which reports `""`. An unknown `value` shows as none. */
|
|
257
|
+
declare function ColorSwatches({ value, onChange, emptyLabel, labels, className, ...aria }: ColorSwatchesProps): React$1.JSX.Element;
|
|
258
|
+
|
|
259
|
+
interface TagInputProps extends Pick<ComponentProps<"input">, "id" | "aria-describedby" | "aria-invalid" | "aria-label" | "disabled"> {
|
|
260
|
+
value?: readonly string[];
|
|
261
|
+
onChange: (value: string[]) => void;
|
|
262
|
+
suggestions?: readonly string[];
|
|
263
|
+
placeholder?: string;
|
|
264
|
+
removeLabel?: (tag: string) => string;
|
|
265
|
+
className?: string;
|
|
266
|
+
}
|
|
267
|
+
/** Tags as chips plus a text box: Enter, comma or blur adds, Backspace on an empty box removes the last. Repeats ignoring case are dropped, also from `value`. */
|
|
268
|
+
declare function TagInput({ value, onChange, suggestions, placeholder, removeLabel, className, disabled, ...aria }: TagInputProps): React$1.JSX.Element;
|
|
269
|
+
|
|
220
270
|
interface TzPickerLabels {
|
|
221
271
|
/** Shown when the value is empty and `allowInherit`. Default: "Inherit". */
|
|
222
272
|
inherit?: string;
|
|
@@ -298,6 +348,25 @@ interface AvatarTileProps {
|
|
|
298
348
|
*/
|
|
299
349
|
declare function AvatarTile({ src, alt, fallback, className }: AvatarTileProps): React$1.JSX.Element;
|
|
300
350
|
|
|
351
|
+
interface AuthCardProps {
|
|
352
|
+
title: ReactNode;
|
|
353
|
+
description?: ReactNode;
|
|
354
|
+
/** The product mark above the card, as an element: an `<img>`, an icon, or a framework image. */
|
|
355
|
+
logo?: ReactNode;
|
|
356
|
+
/** The product name beside `logo`. The row is left out when both are absent. */
|
|
357
|
+
brand?: ReactNode;
|
|
358
|
+
/** Below the card, e.g. language links, terms, a link back to the app. */
|
|
359
|
+
footer?: ReactNode;
|
|
360
|
+
/** The form. A card with none (a failure, a "check your mail") renders its header alone. */
|
|
361
|
+
children?: ReactNode;
|
|
362
|
+
className?: string;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* The full-page frame of a sign-in, sign-up or recovery screen: brand, one card, a footer.
|
|
366
|
+
* Renders a `<main>`, so use it as the page itself, not inside another layout's main.
|
|
367
|
+
*/
|
|
368
|
+
declare function AuthCard({ title, description, logo, brand, footer, children, className }: AuthCardProps): React$1.JSX.Element;
|
|
369
|
+
|
|
301
370
|
interface MobileSheetProps {
|
|
302
371
|
title: ReactNode;
|
|
303
372
|
description?: ReactNode;
|
|
@@ -479,6 +548,8 @@ interface LlmSlot {
|
|
|
479
548
|
interface LlmState {
|
|
480
549
|
providers: LlmProvider[];
|
|
481
550
|
slots: LlmSlot[];
|
|
551
|
+
/** The settings file was written by a newer app and every write would be refused. */
|
|
552
|
+
read_only?: boolean;
|
|
482
553
|
}
|
|
483
554
|
interface LlmModel {
|
|
484
555
|
id: string;
|
|
@@ -505,6 +576,8 @@ interface LlmPullProgress {
|
|
|
505
576
|
status: string;
|
|
506
577
|
done: number;
|
|
507
578
|
total: number;
|
|
579
|
+
/** The layer this event counts; layers with different digests add up to the model. */
|
|
580
|
+
digest?: string;
|
|
508
581
|
}
|
|
509
582
|
interface LlmSettingsApi {
|
|
510
583
|
state(): Promise<LlmState>;
|
|
@@ -527,6 +600,18 @@ interface LlmSettingsApi {
|
|
|
527
600
|
* copy of this screen.
|
|
528
601
|
*/
|
|
529
602
|
slotNote?(slot: string): React$1.ReactNode;
|
|
603
|
+
/** Deletes a downloaded model; without it the model list offers no delete. */
|
|
604
|
+
deleteModel?(provider: string, model: string): Promise<boolean>;
|
|
605
|
+
/** The api asks the user itself before a delete, as scorix's `mod:llm` does, so the screen does not. */
|
|
606
|
+
confirmsDelete?: boolean;
|
|
607
|
+
/** An error that only means the user declined a confirmation; it is not shown as a failure. */
|
|
608
|
+
isCanceled?(err: unknown): boolean;
|
|
609
|
+
/** The name to show for a provider id; the id is shown when this returns nothing. */
|
|
610
|
+
providerName?(id: string): string | undefined;
|
|
611
|
+
/** App-owned status and actions on a provider's row, e.g. installing an engine the app runs. */
|
|
612
|
+
providerExtra?(provider: LlmProvider): React$1.ReactNode;
|
|
613
|
+
/** Called after a slot was bound, e.g. to offer re-indexing when the embedding model changed. */
|
|
614
|
+
onBound?(slot: string, provider: string, model: string): void;
|
|
530
615
|
}
|
|
531
616
|
interface LlmSettingsLabels {
|
|
532
617
|
slots?: string;
|
|
@@ -560,12 +645,43 @@ interface LlmSettingsLabels {
|
|
|
560
645
|
running?: string;
|
|
561
646
|
addFound?: string;
|
|
562
647
|
retry?: string;
|
|
648
|
+
readOnly?: string;
|
|
649
|
+
driversFailed?: string;
|
|
650
|
+
driverUnknown?: string;
|
|
651
|
+
refresh?: string;
|
|
652
|
+
models?: string;
|
|
653
|
+
modelsEmpty?: string;
|
|
654
|
+
deleteModel?: string;
|
|
655
|
+
pullPlaceholder?: string;
|
|
563
656
|
capabilities?: Partial<Record<string, string>>;
|
|
657
|
+
/** Labels that carry a value, so a translation can put it where its grammar wants it. */
|
|
658
|
+
format?: LlmSettingsFormat;
|
|
564
659
|
}
|
|
565
|
-
|
|
660
|
+
interface LlmSettingsFormat {
|
|
661
|
+
downloadModel?(model: string): string;
|
|
662
|
+
editProvider?(name: string): string;
|
|
663
|
+
removeProvider?(name: string): string;
|
|
664
|
+
addFound?(name: string): string;
|
|
665
|
+
useFor?(slotLabel: string): string;
|
|
666
|
+
slotProvider?(slotLabel: string): string;
|
|
667
|
+
slotModel?(slotLabel: string): string;
|
|
668
|
+
/** Slot and field texts come from the app's Go side; these translate them. */
|
|
669
|
+
slotLabel?(slot: LlmSlot): string;
|
|
670
|
+
slotDescription?(slot: LlmSlot): string | undefined;
|
|
671
|
+
fieldLabel?(driver: string, field: LlmField): string;
|
|
672
|
+
fieldDescription?(driver: string, field: LlmField): string | undefined;
|
|
673
|
+
size?(bytes: number): string;
|
|
674
|
+
pullStatus?(status: string): string;
|
|
675
|
+
}
|
|
676
|
+
interface LlmSettingsProps {
|
|
566
677
|
api: LlmSettingsApi;
|
|
567
678
|
labels?: LlmSettingsLabels;
|
|
568
679
|
className?: string;
|
|
569
|
-
|
|
680
|
+
/** Rendered above the slots, e.g. an onboarding notice. */
|
|
681
|
+
header?: React$1.ReactNode;
|
|
682
|
+
/** Rendered below the providers, e.g. settings the app owns. */
|
|
683
|
+
footer?: React$1.ReactNode;
|
|
684
|
+
}
|
|
685
|
+
declare function LlmSettings({ api, labels, className, header, footer }: LlmSettingsProps): React$1.JSX.Element;
|
|
570
686
|
|
|
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 };
|
|
687
|
+
export { AuthCard, type AuthCardProps, AvatarTile, type AvatarTileProps, BarList, type BarListItem, ChoiceDrawer, type ChoiceDrawerProps, type ChoiceOption, ColorSwatches, type ColorSwatchesProps, 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, StatTile, type StatTileProps, TagInput, type TagInputProps, 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, loadExpanded, moveId, planDrop, sameOrder, saveExpanded, sortTree, useConfirm, useFormField, useTreeDndNode, useTreeDndRoot };
|