@petrarca/sonnet-ui 0.4.0 → 0.4.2
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/dist/index.d.ts +63 -1
- package/dist/index.js +347 -128
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -654,6 +654,68 @@ interface EntityTableProps<TRow extends RowData> {
|
|
|
654
654
|
}
|
|
655
655
|
declare function EntityTable<TRow extends RowData>(props: EntityTableProps<TRow>): React__default.ReactElement;
|
|
656
656
|
|
|
657
|
+
/**
|
|
658
|
+
* PropertyList — read-only display of a record's properties.
|
|
659
|
+
*
|
|
660
|
+
* Two layout modes:
|
|
661
|
+
* - `"inline"` (default) — horizontal two-column grid, key left / value right.
|
|
662
|
+
* - `"stacked"` — key label above each value.
|
|
663
|
+
*
|
|
664
|
+
* Values rendered by {@link PropertyValue}. Optional per-property schema
|
|
665
|
+
* refines value rendering (schema is NOT required).
|
|
666
|
+
*
|
|
667
|
+
* Shared by the graph view's node/edge cards and the table inspector so all
|
|
668
|
+
* property displays look identical.
|
|
669
|
+
*/
|
|
670
|
+
|
|
671
|
+
/** Layout mode for the property list. */
|
|
672
|
+
type PropertyListLayout = "inline" | "stacked";
|
|
673
|
+
interface PropertyListProps {
|
|
674
|
+
/** Property name -> value. */
|
|
675
|
+
properties: Record<string, unknown>;
|
|
676
|
+
/** Optional property name -> schema, to refine value rendering. */
|
|
677
|
+
propertySchemas?: Record<string, JsonSchemaProperty>;
|
|
678
|
+
/** Layout mode. Default "inline" (horizontal key-value grid). */
|
|
679
|
+
layout?: PropertyListLayout;
|
|
680
|
+
/** Show a "Properties" section header. Default false. */
|
|
681
|
+
showHeader?: boolean;
|
|
682
|
+
/** Click value to copy it to the clipboard. Default true. */
|
|
683
|
+
copyable?: boolean;
|
|
684
|
+
/** Message when there are no properties. Default "No properties". */
|
|
685
|
+
emptyLabel?: string;
|
|
686
|
+
className?: string;
|
|
687
|
+
}
|
|
688
|
+
declare function PropertyList({ properties, propertySchemas, layout, showHeader, copyable, emptyLabel, className, }: PropertyListProps): React__default.ReactElement;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* PropertyValue — read-only, type-aware rendering of a single property value.
|
|
692
|
+
*
|
|
693
|
+
* Reliable model (matches graph-explorer best practice): render by the actual
|
|
694
|
+
* VALUE TYPE, never by guessing string contents.
|
|
695
|
+
* - object / array -> collapsed summary that expands to a JSON tree (bounded box)
|
|
696
|
+
* - long string -> clamped to a few lines with a "Show more" toggle
|
|
697
|
+
* - scalar -> inline text
|
|
698
|
+
* - boolean -> true/false (or schema boolean cell)
|
|
699
|
+
* - array of scalars-> comma list
|
|
700
|
+
*
|
|
701
|
+
* Schema is OPTIONAL and only REFINES rendering when present:
|
|
702
|
+
* - x-ui-cell / inferred type/format (date, datetime, boolean, number)
|
|
703
|
+
* - x-ui-cell: "json" forces a JSON tree even for a string value
|
|
704
|
+
* A plain string is treated as text by default — it is NOT auto-parsed as
|
|
705
|
+
* JSON (avoids fragile, surprising behaviour). Schema is the only signal that
|
|
706
|
+
* turns a JSON-looking string into a tree.
|
|
707
|
+
*/
|
|
708
|
+
|
|
709
|
+
interface PropertyValueProps {
|
|
710
|
+
value: unknown;
|
|
711
|
+
/** Optional schema for this property; refines rendering when present. */
|
|
712
|
+
schema?: JsonSchemaProperty;
|
|
713
|
+
className?: string;
|
|
714
|
+
/** Strings longer than this clamp with a "Show more" toggle. */
|
|
715
|
+
clampChars?: number;
|
|
716
|
+
}
|
|
717
|
+
declare function PropertyValue({ value, schema, className, clampChars, }: PropertyValueProps): React__default.ReactElement;
|
|
718
|
+
|
|
657
719
|
/**
|
|
658
720
|
* EntitySelect -- async searchable single-select for entity references.
|
|
659
721
|
*
|
|
@@ -1025,4 +1087,4 @@ type Props = {
|
|
|
1025
1087
|
*/
|
|
1026
1088
|
declare function ClipboardMenu({ onAddItem }: Props): react_jsx_runtime.JSX.Element;
|
|
1027
1089
|
|
|
1028
|
-
export { Alert, AlertDescription, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, CELL_RENDERERS, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CellRenderer, type CellRendererProps, Checkbox, ClipboardButton, ClipboardItemComponent as ClipboardItem, ClipboardMenu, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EntitySelect, type EntitySelectProps, EntityTable, type EntityTableProps, EntityTree, type EntityTreeHandle, type EntityTreeProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, Popover, PopoverContent, PopoverTrigger, ResizeHandle, type ResizeHandleProps, type ResolvedColumn, type RowAction, ScrollArea, ScrollBar, SearchInput, type SearchMode, Separator, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, SimpleGroup, SimpleStack, SimpleTooltip, Skeleton, Spinner, Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperList, StepperNext, StepperPrev, type StepperProps, StepperSeparator, StepperTitle, StepperTrigger, type TableUiSchema, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeNode, TreeView, type TreeViewHandle, type TreeViewProps, badgeVariants, buttonVariants, createRenderer, useStore as useStepper };
|
|
1090
|
+
export { Alert, AlertDescription, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, CELL_RENDERERS, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CellRenderer, type CellRendererProps, Checkbox, ClipboardButton, ClipboardItemComponent as ClipboardItem, ClipboardMenu, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EntitySelect, type EntitySelectProps, EntityTable, type EntityTableProps, EntityTree, type EntityTreeHandle, type EntityTreeProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, Popover, PopoverContent, PopoverTrigger, PropertyList, type PropertyListLayout, type PropertyListProps, PropertyValue, type PropertyValueProps, ResizeHandle, type ResizeHandleProps, type ResolvedColumn, type RowAction, ScrollArea, ScrollBar, SearchInput, type SearchMode, Separator, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, SimpleGroup, SimpleStack, SimpleTooltip, Skeleton, Spinner, Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperList, StepperNext, StepperPrev, type StepperProps, StepperSeparator, StepperTitle, StepperTrigger, type TableUiSchema, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeNode, TreeView, type TreeViewHandle, type TreeViewProps, badgeVariants, buttonVariants, createRenderer, useStore as useStepper };
|