@pstdio/ui 0.45.0 → 0.45.1-nightly.20261022104952

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/chat-ui.d.ts CHANGED
@@ -16,6 +16,7 @@ export declare const ChatPrimitives: {
16
16
  id?: string | undefined | undefined;
17
17
  onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
18
18
  resource?: string | undefined | undefined;
19
+ children: ((context: import("use-stick-to-bottom").StickToBottomContext) => import("react").ReactNode) | import("react").ReactNode;
19
20
  slot?: string | undefined | undefined;
20
21
  style?: import("react").CSSProperties | undefined;
21
22
  title?: string | undefined | undefined;
@@ -26,7 +27,6 @@ export declare const ChatPrimitives: {
26
27
  hidden?: boolean | undefined | undefined;
27
28
  "aria-roledescription"?: string | undefined | undefined;
28
29
  role?: import("react").AriaRole | undefined;
29
- children: ((context: import("use-stick-to-bottom").StickToBottomContext) => import("react").ReactNode) | import("react").ReactNode;
30
30
  defaultChecked?: boolean | undefined | undefined;
31
31
  defaultValue?: string | number | readonly string[] | undefined;
32
32
  suppressContentEditableWarning?: boolean | undefined | undefined;
@@ -1,77 +1,4 @@
1
- import { A as CollectionSavedView, F as ViewFilterGroup, I as ViewFilterRule, L as ViewSort, M as CollectionViewsSource, N as EMPTY_VIEW_FILTER, a as CollectionViewStoreState, i as CollectionViewStoreInitialState, j as CollectionViewState, o as useCollectionViewStore, r as withTitleField, s as AttributeDescriptor, x as KanbanRendererRow } from "./collection-view-fields-CBlYAPxD.js";
2
- import { ReactNode, RefObject } from "react";
3
- import { ViewFilterGroup as ViewFilterGroup$1, ViewFilterRule as ViewFilterRule$1 } from "@pstdio/sdk/extensions";
4
- interface RuleValueOption {
5
- value: string;
6
- label: string;
7
- count?: number;
8
- icon?: string | null;
9
- color?: string;
10
- }
11
- interface CollectionFilterProps {
12
- itemLabel?: string;
13
- fields: AttributeDescriptor[];
14
- filter: ViewFilterGroup$1;
15
- optionsFor: (field: AttributeDescriptor) => RuleValueOption[];
16
- onFilterChange: (filter: ViewFilterGroup$1) => void;
17
- }
18
- /** The collection picker and editable criteria, without saved views or search. */
19
- export declare function CollectionFilter(props: CollectionFilterProps): import("react/jsx-runtime").JSX.Element;
20
- interface CollectionViewBarProps<TSettings> {
21
- storageKey: string;
22
- /** Singular resource label used as the subject of boolean predicates. */
23
- itemLabel?: string;
24
- initialState: CollectionViewStoreInitialState<TSettings>;
25
- views: (CollectionSavedView<TSettings> & {
26
- builtIn: boolean;
27
- })[];
28
- viewsSource?: CollectionViewsSource<TSettings>;
29
- /** Every field of the view. Filter offers the filterable ones and Sort the sortable ones. */
30
- fields: AttributeDescriptor[];
31
- optionsFor: (field: AttributeDescriptor) => RuleValueOption[];
32
- /** Search is screen state owned by the renderer. It is never saved. */
33
- search: string;
34
- onSearchChange: (value: string) => void;
35
- searchResultLabel?: string;
36
- leading?: ReactNode;
37
- actions?: ReactNode;
38
- displayControl: ReactNode;
39
- align?: "split" | "end";
40
- }
41
- /** One view bar for data tables and both kanban displays: saved views, then Search, Filter, and Display. */
42
- export declare const CollectionViewBar: <TSettings>(props: CollectionViewBarProps<TSettings>) => import("react/jsx-runtime").JSX.Element;
43
- /** Rules that are incomplete or no longer fit a field are skipped, so they never hide rows. */
44
- export declare const filterRowsByView: <TRow extends KanbanRendererRow>(rows: TRow[], filter: ViewFilterGroup$1, fields: AttributeDescriptor[], today?: Date) => TRow[];
45
- /** Search only looks at the text a view shows, which the caller collects per row. */
46
- export declare const searchRows: <TRow>(rows: TRow[], query: string, textsOf: (row: TRow) => string[]) => TRow[];
47
- interface CollectionViewsInput<TSettings> {
48
- storageKey: string;
49
- fields?: AttributeDescriptor[];
50
- initialState: CollectionViewStoreInitialState<TSettings>;
51
- viewsSource?: CollectionViewsSource<TSettings>;
52
- defaultViews?: CollectionSavedView<TSettings>[];
53
- defaultActiveViewId?: string;
54
- }
55
- /** Picks the views a renderer offers and keeps the store on a view that still exists. */
56
- export declare const useCollectionViews: <TSettings>(input: CollectionViewsInput<TSettings>) => {
57
- views: (CollectionSavedView<TSettings> & {
58
- builtIn: boolean;
59
- })[];
60
- defaultId: string | undefined;
61
- };
62
- interface ViewBarPopoverProps {
63
- open: boolean;
64
- onOpenChange: (open: boolean) => void;
65
- /** The button the menu opens from. Several buttons can open the same menu. */
66
- anchorRef: RefObject<HTMLElement | null>;
67
- width: string;
68
- placement?: "bottom-start" | "bottom-end";
69
- /** The quick picker draws its own panes edge to edge. */
70
- padding?: "0" | "2xs";
71
- testId?: string;
72
- children: ReactNode;
73
- }
74
- /** The menu shell for Search, Filter, and Sort. Menus inside it render in place, so using them never closes it. */
75
- export declare const ViewBarPopover: (props: ViewBarPopoverProps) => import("react/jsx-runtime").JSX.Element;
76
- export { type CollectionFilterProps, type CollectionSavedView, type CollectionViewBarProps, type CollectionViewState, type CollectionViewStoreInitialState, type CollectionViewStoreState, type CollectionViewsInput, type CollectionViewsSource, EMPTY_VIEW_FILTER, type ViewBarPopoverProps, type ViewFilterGroup, type ViewFilterRule, type ViewSort, useCollectionViewStore, withTitleField };
1
+ import { A as CollectionSavedView, F as ViewFilterGroup, I as ViewFilterRule, L as ViewSort, M as CollectionViewsSource, N as EMPTY_VIEW_FILTER, a as CollectionViewStoreState, i as CollectionViewStoreInitialState, j as CollectionViewState, o as useCollectionViewStore, r as withTitleField } from "./collection-view-fields-CBlYAPxD.js";
2
+ import { a as searchRows, c as CollectionViewBarProps, i as useCollectionViews, l as CollectionFilter, n as ViewBarPopoverProps, o as filterRowsByView, r as CollectionViewsInput, s as CollectionViewBar, t as ViewBarPopover, u as CollectionFilterProps } from "./index-Bk6mxsH4.js";
3
+ export { CollectionFilter, type CollectionFilterProps, type CollectionSavedView, CollectionViewBar, type CollectionViewBarProps, type CollectionViewState, type CollectionViewStoreInitialState, type CollectionViewStoreState, type CollectionViewsInput, type CollectionViewsSource, EMPTY_VIEW_FILTER, ViewBarPopover, type ViewBarPopoverProps, type ViewFilterGroup, type ViewFilterRule, type ViewSort, filterRowsByView, searchRows, useCollectionViewStore, useCollectionViews, withTitleField };
77
4
  export {};
@@ -1,4 +1,5 @@
1
1
  import { A as CollectionSavedView, M as CollectionViewsSource, a as CollectionViewStoreState } from "./collection-view-fields-CBlYAPxD.js";
2
+ import "./index-Bk6mxsH4.js";
2
3
  import "./index-DYCXgPCg.js";
3
4
  import { ReactElement, ReactNode } from "react";
4
5
  import { DataTableRendererSettings, ViewFilterGroup, ViewSort } from "@pstdio/sdk/extensions";
@@ -0,0 +1,77 @@
1
+ import { A as CollectionSavedView, M as CollectionViewsSource, i as CollectionViewStoreInitialState, s as AttributeDescriptor, x as KanbanRendererRow } from "./collection-view-fields-CBlYAPxD.js";
2
+ import { ReactNode, RefObject } from "react";
3
+ import { ViewFilterGroup, ViewFilterRule } from "@pstdio/sdk/extensions";
4
+ interface RuleValueOption {
5
+ value: string;
6
+ label: string;
7
+ count?: number;
8
+ icon?: string | null;
9
+ color?: string;
10
+ }
11
+ interface CollectionFilterProps {
12
+ itemLabel?: string;
13
+ fields: AttributeDescriptor[];
14
+ filter: ViewFilterGroup;
15
+ optionsFor: (field: AttributeDescriptor) => RuleValueOption[];
16
+ onFilterChange: (filter: ViewFilterGroup) => void;
17
+ }
18
+ /** The collection picker and editable criteria, without saved views or search. */
19
+ declare function CollectionFilter(props: CollectionFilterProps): import("react/jsx-runtime").JSX.Element;
20
+ interface CollectionViewBarProps<TSettings> {
21
+ storageKey: string;
22
+ /** Singular resource label used as the subject of boolean predicates. */
23
+ itemLabel?: string;
24
+ initialState: CollectionViewStoreInitialState<TSettings>;
25
+ views: (CollectionSavedView<TSettings> & {
26
+ builtIn: boolean;
27
+ })[];
28
+ viewsSource?: CollectionViewsSource<TSettings>;
29
+ /** Every field of the view. Filter offers the filterable ones and Sort the sortable ones. */
30
+ fields: AttributeDescriptor[];
31
+ optionsFor: (field: AttributeDescriptor) => RuleValueOption[];
32
+ /** Search is screen state owned by the renderer. It is never saved. */
33
+ search: string;
34
+ onSearchChange: (value: string) => void;
35
+ searchResultLabel?: string;
36
+ leading?: ReactNode;
37
+ actions?: ReactNode;
38
+ displayControl: ReactNode;
39
+ align?: "split" | "end";
40
+ }
41
+ /** One view bar for data tables and both kanban displays: saved views, then Search, Filter, and Display. */
42
+ declare const CollectionViewBar: <TSettings>(props: CollectionViewBarProps<TSettings>) => import("react/jsx-runtime").JSX.Element;
43
+ /** Rules that are incomplete or no longer fit a field are skipped, so they never hide rows. */
44
+ declare const filterRowsByView: <TRow extends KanbanRendererRow>(rows: TRow[], filter: ViewFilterGroup, fields: AttributeDescriptor[], today?: Date) => TRow[];
45
+ /** Search only looks at the text a view shows, which the caller collects per row. */
46
+ declare const searchRows: <TRow>(rows: TRow[], query: string, textsOf: (row: TRow) => string[]) => TRow[];
47
+ interface CollectionViewsInput<TSettings> {
48
+ storageKey: string;
49
+ fields?: AttributeDescriptor[];
50
+ initialState: CollectionViewStoreInitialState<TSettings>;
51
+ viewsSource?: CollectionViewsSource<TSettings>;
52
+ defaultViews?: CollectionSavedView<TSettings>[];
53
+ defaultActiveViewId?: string;
54
+ }
55
+ /** Picks the views a renderer offers and keeps the store on a view that still exists. */
56
+ declare const useCollectionViews: <TSettings>(input: CollectionViewsInput<TSettings>) => {
57
+ views: (CollectionSavedView<TSettings> & {
58
+ builtIn: boolean;
59
+ })[];
60
+ defaultId: string | undefined;
61
+ };
62
+ interface ViewBarPopoverProps {
63
+ open: boolean;
64
+ onOpenChange: (open: boolean) => void;
65
+ /** The button the menu opens from. Several buttons can open the same menu. */
66
+ anchorRef: RefObject<HTMLElement | null>;
67
+ width: string;
68
+ placement?: "bottom-start" | "bottom-end";
69
+ /** The quick picker draws its own panes edge to edge. */
70
+ padding?: "0" | "2xs";
71
+ testId?: string;
72
+ children: ReactNode;
73
+ }
74
+ /** The menu shell for Search, Filter, and Sort. Menus inside it render in place, so using them never closes it. */
75
+ declare const ViewBarPopover: (props: ViewBarPopoverProps) => import("react/jsx-runtime").JSX.Element;
76
+ export { searchRows as a, CollectionViewBarProps as c, useCollectionViews as i, CollectionFilter as l, ViewBarPopoverProps as n, filterRowsByView as o, CollectionViewsInput as r, CollectionViewBar as s, ViewBarPopover as t, CollectionFilterProps as u };
77
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pstdio/ui",
3
- "version": "0.45.0",
3
+ "version": "0.45.1-nightly.20261022104952",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/pufflyai/prompt-studio"
@@ -100,7 +100,7 @@
100
100
  "@lexical/utils": "^0.40.0",
101
101
  "@lexical/yjs": "^0.40.0",
102
102
  "@monaco-editor/react": "^4.7.0",
103
- "@pstdio/sdk": "0.45.0",
103
+ "@pstdio/sdk": "0.45.1-nightly.20261022104952",
104
104
  "@tanstack/react-table": "^8.21.3",
105
105
  "@tanstack/react-virtual": "^3.13.19",
106
106
  "@types/mdast": "^4.0.4",