@rise-x/apps-sdk 0.6.0 → 0.8.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.
Files changed (93) hide show
  1. package/README.md +192 -10
  2. package/build/connectors/agents.js +1 -1
  3. package/build/connectors/assets.d.ts +9 -3
  4. package/build/connectors/assets.js +32 -1
  5. package/build/connectors/index.d.ts +3 -2
  6. package/build/connectors/index.js +4 -1
  7. package/build/connectors/search.d.ts +34 -0
  8. package/build/connectors/search.js +63 -0
  9. package/build/connectors/types.d.ts +51 -0
  10. package/build/connectors/types.js +71 -0
  11. package/build/connectors/work.d.ts +7 -1
  12. package/build/connectors/work.js +13 -0
  13. package/build/index.d.ts +1 -1
  14. package/build/mockShell.d.ts +11 -0
  15. package/build/mockShell.js +159 -2
  16. package/build/query/assets.d.ts +19 -6
  17. package/build/query/assets.js +35 -3
  18. package/build/query/context.d.ts +14 -0
  19. package/build/query/context.js +16 -0
  20. package/build/query/index.d.ts +4 -3
  21. package/build/query/index.js +14 -2
  22. package/build/query/keys.d.ts +4 -0
  23. package/build/query/keys.js +7 -0
  24. package/build/query/layer.d.ts +25 -3
  25. package/build/query/work.d.ts +14 -1
  26. package/build/query/work.js +32 -1
  27. package/build/shellBridge.d.ts +1 -1
  28. package/build/ui/components/accordion.d.ts +7 -0
  29. package/build/ui/components/aspect-ratio.d.ts +4 -0
  30. package/build/ui/components/button-group.d.ts +7 -0
  31. package/build/ui/components/carousel.d.ts +18 -0
  32. package/build/ui/components/chart.d.ts +45 -94
  33. package/build/ui/components/collapsible.d.ts +6 -0
  34. package/build/ui/components/combobox.d.ts +19 -0
  35. package/build/ui/components/command.d.ts +18 -0
  36. package/build/ui/components/context-menu.d.ts +29 -0
  37. package/build/ui/components/data-table.d.ts +13 -2
  38. package/build/ui/components/date-picker.d.ts +16 -0
  39. package/build/ui/components/direction.d.ts +6 -0
  40. package/build/ui/components/field.d.ts +25 -0
  41. package/build/ui/components/hover-card.d.ts +6 -0
  42. package/build/ui/components/input-group.d.ts +13 -0
  43. package/build/ui/components/input-otp.d.ts +34 -0
  44. package/build/ui/components/input.d.ts +1 -3
  45. package/build/ui/components/item.d.ts +23 -0
  46. package/build/ui/components/kbd.d.ts +4 -0
  47. package/build/ui/components/menubar.d.ts +26 -0
  48. package/build/ui/components/message-scroller.d.ts +15 -0
  49. package/build/ui/components/navigation-menu.d.ts +13 -0
  50. package/build/ui/components/page-header.d.ts +7 -1
  51. package/build/ui/components/table.d.ts +7 -1
  52. package/build/ui/index.d.ts +19 -0
  53. package/build/ui/reference/components/accordion.tsx +85 -0
  54. package/build/ui/reference/components/alert-dialog.tsx +7 -2
  55. package/build/ui/reference/components/aspect-ratio.tsx +28 -0
  56. package/build/ui/reference/components/button-group.tsx +77 -0
  57. package/build/ui/reference/components/button.tsx +8 -1
  58. package/build/ui/reference/components/carousel.tsx +248 -0
  59. package/build/ui/reference/components/chart.tsx +441 -1131
  60. package/build/ui/reference/components/collapsible.tsx +43 -0
  61. package/build/ui/reference/components/combobox.tsx +141 -0
  62. package/build/ui/reference/components/command.tsx +181 -0
  63. package/build/ui/reference/components/context-menu.tsx +243 -0
  64. package/build/ui/reference/components/data-table.tsx +199 -29
  65. package/build/ui/reference/components/date-picker.tsx +218 -0
  66. package/build/ui/reference/components/dialog.tsx +2 -2
  67. package/build/ui/reference/components/direction.tsx +22 -0
  68. package/build/ui/reference/components/dropdown-menu.tsx +2 -2
  69. package/build/ui/reference/components/field.tsx +252 -0
  70. package/build/ui/reference/components/hover-card.tsx +64 -0
  71. package/build/ui/reference/components/input-group.tsx +157 -0
  72. package/build/ui/reference/components/input-otp.tsx +106 -0
  73. package/build/ui/reference/components/input.tsx +4 -32
  74. package/build/ui/reference/components/item.tsx +188 -0
  75. package/build/ui/reference/components/kbd.tsx +43 -0
  76. package/build/ui/reference/components/label.tsx +1 -1
  77. package/build/ui/reference/components/menubar.tsx +275 -0
  78. package/build/ui/reference/components/message-scroller.tsx +141 -0
  79. package/build/ui/reference/components/nav.tsx +9 -0
  80. package/build/ui/reference/components/navigation-menu.tsx +191 -0
  81. package/build/ui/reference/components/page-header.tsx +32 -0
  82. package/build/ui/reference/components/popover.tsx +2 -2
  83. package/build/ui/reference/components/select.tsx +11 -8
  84. package/build/ui/reference/components/sheet.tsx +14 -3
  85. package/build/ui/reference/components/table.tsx +15 -2
  86. package/build/ui/reference/components/timeline.tsx +7 -0
  87. package/build/ui/reference/components/toggle.tsx +1 -1
  88. package/build/ui/reference/index.ts +19 -0
  89. package/build/ui/standalone.js +167 -28
  90. package/build/ui/styles.css +1 -1
  91. package/package.json +15 -9
  92. package/template/README.md +6 -0
  93. package/template/src/App.tsx +10 -1
@@ -1,10 +1,11 @@
1
1
  import { type InfiniteData, type UseInfiniteQueryResult, type UseQueryResult } from "@tanstack/react-query";
2
- import { type ListRelatedWorkArgs, type ListWorkRowsArgs, type StartWorkArgs, type SubmitWorkArgs, type WorkConnector, type WorkDataPatch, type WorkRowPage } from "../connectors/work";
2
+ import { type ListRelatedWorkArgs, type ListWorkRowsArgs, type SearchWorkArgs, type StartWorkArgs, type SubmitWorkArgs, type WorkConnector, type WorkDataPatch, type WorkRowPage, type WorkSearchPage } from "../connectors/work";
3
3
  import type { ConnectorError } from "../connectors/errors";
4
4
  import type { WorkAuditEvent, WorkDetail, WorkRow } from "../connectors/types";
5
5
  import { type QueryEnvId } from "./keys";
6
6
  import { type SdkMutationOptions, type SdkQueryOptions } from "./shared";
7
7
  export type ListWorkRowsQueryArgs = Omit<ListWorkRowsArgs, "skip" | "signal">;
8
+ export type SearchWorkQueryArgs = Omit<SearchWorkArgs, "page" | "signal">;
8
9
  export type ListRelatedWorkQueryArgs = Omit<ListRelatedWorkArgs, "signal">;
9
10
  export declare function dedupeRows<T extends {
10
11
  id: string;
@@ -35,6 +36,17 @@ export declare function createWorkQueries(connector: WorkConnector, getEnvId: ()
35
36
  [x: string]: unknown;
36
37
  }], InfiniteData<WorkRowPage, unknown>>;
37
38
  };
39
+ search: (args: SearchWorkQueryArgs) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseInfiniteQueryOptions<WorkSearchPage, Error, InfiniteData<WorkSearchPage, unknown>, WorkSearchPage, readonly ["rise-apps-sdk", QueryEnvId, "work", "search", {
40
+ [x: string]: unknown;
41
+ }], number>, "queryFn"> & {
42
+ queryFn?: import("@tanstack/react-query").QueryFunction<WorkSearchPage, readonly ["rise-apps-sdk", QueryEnvId, "work", "search", {
43
+ [x: string]: unknown;
44
+ }], number> | undefined;
45
+ } & {
46
+ queryKey: import("@tanstack/react-query").DataTag<readonly ["rise-apps-sdk", QueryEnvId, "work", "search", {
47
+ [x: string]: unknown;
48
+ }], InfiniteData<WorkSearchPage, unknown>>;
49
+ };
38
50
  related: (args: ListRelatedWorkQueryArgs) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<WorkRow[], Error, WorkRow[], readonly ["rise-apps-sdk", QueryEnvId, "work", "related", {
39
51
  [x: string]: unknown;
40
52
  }]>, "queryFn"> & {
@@ -59,6 +71,7 @@ export declare function useWorkData(workId: string, opts?: {
59
71
  path?: string;
60
72
  }, options?: SdkQueryOptions): UseQueryResult<unknown, ConnectorError>;
61
73
  export declare function useWorkRows(args: ListWorkRowsQueryArgs, options?: SdkQueryOptions): UseInfiniteQueryResult<InfiniteData<WorkRowPage>, ConnectorError>;
74
+ export declare function useWorkSearch(args: SearchWorkQueryArgs, options?: SdkQueryOptions): UseInfiniteQueryResult<InfiniteData<WorkSearchPage>, ConnectorError>;
62
75
  export declare function useRelatedWork(args: ListRelatedWorkQueryArgs, options?: SdkQueryOptions): UseQueryResult<WorkRow[], ConnectorError>;
63
76
  export declare function useWorkAudit(workId: string, options?: SdkQueryOptions): UseQueryResult<WorkAuditEvent[], ConnectorError>;
64
77
  export type StartWorkVariables = Omit<StartWorkArgs, "signal">;
@@ -6,6 +6,7 @@ exports.createWorkQueries = createWorkQueries;
6
6
  exports.useWork = useWork;
7
7
  exports.useWorkData = useWorkData;
8
8
  exports.useWorkRows = useWorkRows;
9
+ exports.useWorkSearch = useWorkSearch;
9
10
  exports.useRelatedWork = useRelatedWork;
10
11
  exports.useWorkAudit = useWorkAudit;
11
12
  exports.useStartWork = useStartWork;
@@ -17,6 +18,7 @@ exports.useDeleteWork = useDeleteWork;
17
18
  // caller's onSuccess — composed, never replaced.
18
19
  const react_query_1 = require("@tanstack/react-query");
19
20
  const work_1 = require("../connectors/work");
21
+ const search_1 = require("../connectors/search");
20
22
  const keys_1 = require("./keys");
21
23
  const shared_1 = require("./shared");
22
24
  // Flatten an infinite rows result, dropping cross-page duplicates: sort-shifted
@@ -67,6 +69,19 @@ function createWorkQueries(connector, getEnvId) {
67
69
  enabled: envId != null && args.flow != null,
68
70
  });
69
71
  },
72
+ // Infinite page-based search. Unlike rows() the server reports hasMore
73
+ // exactly, so the advance rule is just "next page while hasMore".
74
+ // `args.filter` must pin flowOriginId — see SearchWorkArgs.
75
+ search: (args) => {
76
+ const envId = getEnvId();
77
+ return (0, react_query_1.infiniteQueryOptions)({
78
+ queryKey: keys_1.queryKeys.work.search(envId, (0, search_1.searchCacheShape)(args)),
79
+ queryFn: ({ pageParam, signal }) => connector.search({ ...args, page: pageParam, signal }),
80
+ initialPageParam: 1,
81
+ getNextPageParam: (last) => last.hasMore ? last.page + 1 : undefined,
82
+ enabled: envId != null && args.filter != null,
83
+ });
84
+ },
70
85
  related: (args) => {
71
86
  const envId = getEnvId();
72
87
  return (0, react_query_1.queryOptions)({
@@ -99,6 +114,10 @@ function useWorkData(workId, opts, options) {
99
114
  function useWorkRows(args, options) {
100
115
  return (0, shared_1.useSdkInfiniteQuery)(exports.workQueries.rows(args), options);
101
116
  }
117
+ // Infinite page-based search; flatten pages with dedupeRows(data).
118
+ function useWorkSearch(args, options) {
119
+ return (0, shared_1.useSdkInfiniteQuery)(exports.workQueries.search(args), options);
120
+ }
102
121
  function useRelatedWork(args, options) {
103
122
  return (0, shared_1.useSdkQuery)(exports.workQueries.related(args), options);
104
123
  }
@@ -111,6 +130,9 @@ function useStartWork(options) {
111
130
  void client.invalidateQueries({
112
131
  queryKey: keys_1.queryKeys.work.allRows(envId),
113
132
  });
133
+ void client.invalidateQueries({
134
+ queryKey: keys_1.queryKeys.work.searchAll(envId),
135
+ });
114
136
  }, options);
115
137
  }
116
138
  function usePatchWorkData(options) {
@@ -122,10 +144,13 @@ function usePatchWorkData(options) {
122
144
  void client.invalidateQueries({
123
145
  queryKey: keys_1.queryKeys.work.detail(envId, vars.workId),
124
146
  });
125
- // Row listings project data paths, so a data write can stale them.
147
+ // Listings project data paths, so a data write can stale them.
126
148
  void client.invalidateQueries({
127
149
  queryKey: keys_1.queryKeys.work.allRows(envId),
128
150
  });
151
+ void client.invalidateQueries({
152
+ queryKey: keys_1.queryKeys.work.searchAll(envId),
153
+ });
129
154
  }, options);
130
155
  }
131
156
  function useSubmitWork(options) {
@@ -144,6 +169,9 @@ function useSubmitWork(options) {
144
169
  void client.invalidateQueries({
145
170
  queryKey: keys_1.queryKeys.work.allRows(envId),
146
171
  });
172
+ void client.invalidateQueries({
173
+ queryKey: keys_1.queryKeys.work.searchAll(envId),
174
+ });
147
175
  // CROSS-DOMAIN: asset create/edit drafts materialize via work.submit —
148
176
  // the whole assets scope goes stale. Over-broad but correct; only
149
177
  // active asset queries actually refetch.
@@ -165,6 +193,9 @@ function useDeleteWork(options) {
165
193
  void client.invalidateQueries({
166
194
  queryKey: keys_1.queryKeys.work.allRows(envId),
167
195
  });
196
+ void client.invalidateQueries({
197
+ queryKey: keys_1.queryKeys.work.searchAll(envId),
198
+ });
168
199
  void client.invalidateQueries({
169
200
  queryKey: keys_1.queryKeys.work.relatedAll(envId),
170
201
  });
@@ -12,7 +12,7 @@ export interface ShellEnvironment {
12
12
  }
13
13
  export type ShellEventUnsubscribe = () => void;
14
14
  export type ShellNavigate = NavigateFunction;
15
- export type V4ApiKey = "apps" | "work" | "config" | "attachment";
15
+ export type V4ApiKey = "apps" | "work" | "config" | "attachment" | "asset";
16
16
  export interface ShellAiApi {
17
17
  baseUrl: string;
18
18
  getHeaders(): Record<string, string>;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { Accordion as AccordionPrimitive } from 'radix-ui';
3
+ declare function Accordion({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): React.JSX.Element;
4
+ declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element;
5
+ declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element;
6
+ declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element;
7
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import { AspectRatio as AspectRatioPrimitive } from 'radix-ui';
3
+ declare function AspectRatio({ className, ...props }: React.ComponentProps<typeof AspectRatioPrimitive.Root>): React.JSX.Element;
4
+ export { AspectRatio };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<'div'> & {
3
+ orientation?: 'horizontal' | 'vertical';
4
+ }): React.JSX.Element;
5
+ declare function ButtonGroupText({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
6
+ declare function ButtonGroupSeparator({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
7
+ export { ButtonGroup, ButtonGroupText, ButtonGroupSeparator };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
3
+ import { Button } from './button';
4
+ type CarouselApi = UseEmblaCarouselType[1];
5
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
6
+ type CarouselOptions = UseCarouselParameters[0];
7
+ type CarouselPlugin = UseCarouselParameters[1];
8
+ declare const Carousel: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
9
+ opts?: CarouselOptions;
10
+ plugins?: CarouselPlugin;
11
+ orientation?: "horizontal" | "vertical";
12
+ setApi?: (api: CarouselApi) => void;
13
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare function CarouselContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
15
+ declare function CarouselItem({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
16
+ declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
17
+ declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
18
+ export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
@@ -1,4 +1,6 @@
1
1
  import * as React from 'react';
2
+ import * as RechartsPrimitive from 'recharts';
3
+ import type { TooltipValueType } from 'recharts';
2
4
  declare const CHART_SERIES: readonly ["var(--chart-1)", "var(--chart-2)", "var(--chart-3)", "var(--chart-4)", "var(--chart-5)", "var(--chart-6)"];
3
5
  declare const SEMANTIC_SERIES: {
4
6
  readonly success: "var(--success)";
@@ -9,99 +11,52 @@ declare const SEMANTIC_SERIES: {
9
11
  };
10
12
  type SemanticTone = keyof typeof SEMANTIC_SERIES;
11
13
  declare function seriesColor(index: number, tone?: SemanticTone): "var(--chart-1)" | "var(--chart-2)" | "var(--chart-3)" | "var(--chart-4)" | "var(--chart-5)" | "var(--chart-6)" | "var(--success)" | "var(--warning)" | "var(--error)" | "var(--info)" | "var(--neutral)";
14
+ declare const THEMES: {
15
+ readonly light: "";
16
+ readonly dark: ".dark";
17
+ };
18
+ type TooltipNameType = number | string;
19
+ export type ChartConfig = Record<string, {
20
+ label?: React.ReactNode;
21
+ icon?: React.ComponentType;
22
+ } & ({
23
+ color?: string;
24
+ theme?: never;
25
+ } | {
26
+ color?: never;
27
+ theme: Record<keyof typeof THEMES, string>;
28
+ })>;
29
+ declare function ChartContainer({ id, className, children, config, initialDimension, ...props }: React.ComponentProps<'div'> & {
30
+ config: ChartConfig;
31
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
32
+ initialDimension?: {
33
+ width: number;
34
+ height: number;
35
+ };
36
+ }): React.JSX.Element;
37
+ declare const ChartStyle: ({ id, config }: {
38
+ id: string;
39
+ config: ChartConfig;
40
+ }) => React.JSX.Element | null;
41
+ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
42
+ declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<'div'> & {
43
+ hideLabel?: boolean;
44
+ hideIndicator?: boolean;
45
+ indicator?: 'line' | 'dot' | 'dashed';
46
+ nameKey?: string;
47
+ labelKey?: string;
48
+ } & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, 'accessibilityLayer'>): React.JSX.Element | null;
49
+ declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
50
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<'div'> & {
51
+ hideIcon?: boolean;
52
+ nameKey?: string;
53
+ } & RechartsPrimitive.DefaultLegendContentProps): React.JSX.Element | null;
12
54
  declare function ChartCard({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
13
55
  declare function ChartCardHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
14
56
  declare function ChartCardTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
15
57
  declare function ChartCardDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
16
58
  declare function ChartCardActions({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
17
59
  declare function ChartCardFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
18
- export interface ChartSeries {
19
- label: string;
20
- values: number[];
21
- tone?: SemanticTone;
22
- }
23
- interface AxisChartProps extends Omit<React.ComponentProps<'div'>, 'children'> {
24
- series: ChartSeries[];
25
- labels: string[];
26
- height?: number;
27
- gridLines?: number;
28
- formatValue?: (value: number) => string;
29
- }
30
- declare function LineChart({ series, labels, height, gridLines, formatValue, area, curve, dots, stacked, stackOffset, fill, yAxis, hover, className, ...props }: AxisChartProps & {
31
- area?: boolean;
32
- curve?: 'monotone' | 'linear' | 'step';
33
- dots?: boolean;
34
- /** Stack the series so the top line is the total. */
35
- stacked?: boolean;
36
- /** `expand` normalises each x to 100% — shadcn's `stackOffset="expand"`. Only
37
- * meaningful with `stacked`, since it is a share of the stack. */
38
- stackOffset?: 'none' | 'expand';
39
- /** `gradient`, ramping 0.8 → 0.1, is the default: an area chart is about the
40
- * shape under the line, and a flat block of colour flattens exactly that.
41
- * `flat` is shadcn's `fillOpacity={0.4}`, kept for a single-colour export
42
- * where a gradient would band. */
43
- fill?: 'gradient' | 'flat';
44
- /** Y tick LABELS. ON by default: these charts are read for MAGNITUDE, and a
45
- * tooltip only answers for the point under the pointer, so a chart someone
46
- * has to quote a number from needs the scale on the page. Not strict —
47
- * `yAxis={false}` gives shadcn's axis-less look and reclaims the gutter. */
48
- yAxis?: boolean;
49
- /** Hover bands + tooltip. On by default — see the note above HoverCard. */
50
- hover?: boolean;
51
- }): React.JSX.Element;
52
- declare function AreaChart(props: React.ComponentProps<typeof LineChart>): React.JSX.Element;
53
- declare function BarChart({ series, labels, height, gridLines, stacked, horizontal, radius, yAxis, hover, formatValue, className, ...props }: AxisChartProps & {
54
- stacked?: boolean;
55
- horizontal?: boolean;
56
- radius?: number;
57
- /** Y tick labels, on by default — see LineChart's note. Grid is unaffected. */
58
- yAxis?: boolean;
59
- hover?: boolean;
60
- }): React.JSX.Element;
61
- export interface PieSlice {
62
- label: string;
63
- value: number;
64
- tone?: SemanticTone;
65
- }
66
- declare function PieChart({ slices, size,
67
- /** 0 renders a solid pie; any thickness renders a donut. */
68
- thickness, centerLabel, centerValue, hover, formatValue, className, ...props }: Omit<React.ComponentProps<'div'>, 'children'> & {
69
- slices: PieSlice[];
70
- size?: number;
71
- thickness?: number;
72
- centerLabel?: React.ReactNode;
73
- centerValue?: React.ReactNode;
74
- hover?: boolean;
75
- formatValue?: (v: number) => string;
76
- }): React.JSX.Element;
77
- /** Donut is a pie with a hole — same arithmetic, one default changed. */
78
- declare function DonutChart({ thickness, ...props }: React.ComponentProps<typeof PieChart>): React.JSX.Element;
79
- declare function RadialChart({ series, size, thickness, gap, max, hover, centerLabel, centerValue, formatValue, className, ...props }: Omit<React.ComponentProps<'div'>, 'children'> & {
80
- series: {
81
- label: string;
82
- value: number;
83
- tone?: SemanticTone;
84
- }[];
85
- size?: number;
86
- thickness?: number;
87
- gap?: number;
88
- max?: number;
89
- centerLabel?: React.ReactNode;
90
- centerValue?: React.ReactNode;
91
- hover?: boolean;
92
- formatValue?: (value: number) => string;
93
- }): React.JSX.Element;
94
- declare function RadarChart({ axes, series, size, rings, hover, className, ...props }: Omit<React.ComponentProps<'div'>, 'children'> & {
95
- axes: string[];
96
- series: {
97
- label: string;
98
- values: number[];
99
- tone?: SemanticTone;
100
- }[];
101
- size?: number;
102
- rings?: number;
103
- hover?: boolean;
104
- }): React.JSX.Element;
105
60
  declare function Sparkline({ values, width, height, tone, className, ...props }: Omit<React.ComponentProps<'div'>, 'children'> & {
106
61
  values: number[];
107
62
  width?: number;
@@ -115,10 +70,6 @@ declare function ProgressRing({ value, size, thickness, tone, showValue, classNa
115
70
  tone?: SemanticTone;
116
71
  showValue?: boolean;
117
72
  }): React.JSX.Element;
118
- declare function ChartLegend({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
119
- declare function ChartLegendItem({ className, index, tone, children, ...props }: React.ComponentProps<'span'> & {
120
- index?: number;
121
- tone?: SemanticTone;
122
- }): React.JSX.Element;
123
- declare function ChartTooltip({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
124
- export { ChartCard, ChartCardHeader, ChartCardTitle, ChartCardDescription, ChartCardActions, ChartCardFooter, LineChart, AreaChart, BarChart, PieChart, DonutChart, RadialChart, RadarChart, Sparkline, ProgressRing, ChartLegend, ChartLegendItem, ChartTooltip, CHART_SERIES, seriesColor, type SemanticTone, };
73
+ export { Label as ChartLabel } from 'recharts';
74
+ export { Area, AreaChart, Bar, BarChart, Brush, CartesianGrid, Cell, ComposedChart, Customized, ErrorBar, Funnel, FunnelChart, LabelList, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart, RadialBar, RadialBarChart, Rectangle, ReferenceArea, ReferenceDot, ReferenceLine, ResponsiveContainer, Scatter, ScatterChart, Sector, Treemap, XAxis, YAxis, ZAxis, } from 'recharts';
75
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, ChartCard, ChartCardHeader, ChartCardTitle, ChartCardDescription, ChartCardActions, ChartCardFooter, Sparkline, ProgressRing, CHART_SERIES, seriesColor, type SemanticTone, };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { Collapsible as CollapsiblePrimitive } from 'radix-ui';
3
+ declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): React.JSX.Element;
4
+ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Trigger>): React.JSX.Element;
5
+ declare function CollapsibleContent({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Content>): React.JSX.Element;
6
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ export interface ComboboxOption {
3
+ value: string;
4
+ label: string;
5
+ /** Extra searchable text — a code, an alias — that is not shown. */
6
+ keywords?: string;
7
+ disabled?: boolean;
8
+ }
9
+ declare const Combobox: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "onChange" | "value"> & {
10
+ options: ComboboxOption[];
11
+ value?: string;
12
+ onValueChange?: (value: string) => void;
13
+ placeholder?: string;
14
+ searchPlaceholder?: string;
15
+ emptyLabel?: string;
16
+ /** Matches Select's trigger sizes. */
17
+ size?: "sm" | "default";
18
+ }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
+ export { Combobox };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { Command as CommandPrimitive } from 'cmdk';
3
+ import { Dialog } from './dialog';
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
5
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
6
+ title?: string;
7
+ description?: string;
8
+ className?: string;
9
+ showCloseButton?: boolean;
10
+ }): React.JSX.Element;
11
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
12
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
13
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
14
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
15
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
16
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
17
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
18
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';
3
+ declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): React.JSX.Element;
4
+ declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): React.JSX.Element;
5
+ declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): React.JSX.Element;
6
+ declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): React.JSX.Element;
7
+ declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): React.JSX.Element;
8
+ declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): React.JSX.Element;
9
+ declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): React.JSX.Element;
10
+ declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
11
+ inset?: boolean;
12
+ variant?: 'default' | 'destructive';
13
+ }): React.JSX.Element;
14
+ declare function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {
15
+ inset?: boolean;
16
+ }): React.JSX.Element;
17
+ declare function ContextMenuRadioItem({ className, children, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {
18
+ inset?: boolean;
19
+ }): React.JSX.Element;
20
+ declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
21
+ inset?: boolean;
22
+ }): React.JSX.Element;
23
+ declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): React.JSX.Element;
24
+ declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
25
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
26
+ inset?: boolean;
27
+ }): React.JSX.Element;
28
+ declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): React.JSX.Element;
29
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuGroup, ContextMenuPortal, ContextMenuLabel, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent, };
@@ -21,6 +21,11 @@ export interface FacetedFilterProps {
21
21
  selected: Iterable<string>;
22
22
  onSelect: (value: string, checked: boolean) => void;
23
23
  onClear: () => void;
24
+ /** Search box above the list. Defaults to on past SEARCH_THRESHOLD options. */
25
+ searchable?: boolean;
26
+ /** Drop options whose `count` is 0 — inert when counts aren't provided.
27
+ * Applied values stay listed so they can be unticked. */
28
+ hideEmpty?: boolean;
24
29
  className?: string;
25
30
  }
26
31
  export interface DataTableFilter {
@@ -28,6 +33,10 @@ export interface DataTableFilter {
28
33
  columnId: string;
29
34
  title: string;
30
35
  options: DataTableFilterOption[];
36
+ /** Search box above the options. Defaults to on past SEARCH_THRESHOLD. */
37
+ searchable?: boolean;
38
+ /** Drop options no visible row carries. */
39
+ hideEmpty?: boolean;
31
40
  }
32
41
  export interface DataTableProps<TData, TValue> {
33
42
  columns: ColumnDef<TData, TValue>[];
@@ -54,13 +63,15 @@ export declare function DataTableColumnHeader<TData, TValue>({ column, title, cl
54
63
  * `selected` in, `onSelect`/`onClear` out. DataTableFacetedFilter is this
55
64
  * component wired to a TanStack column.
56
65
  */
57
- export declare function FacetedFilter({ title, options, selected: selectedValues, onSelect, onClear, className, }: FacetedFilterProps): React.JSX.Element;
66
+ export declare function FacetedFilter({ title, options, selected: selectedValues, onSelect, onClear, searchable, hideEmpty, className, }: FacetedFilterProps): React.JSX.Element;
58
67
  /** FacetedFilter bound to a TanStack column: facet counts and the filter value
59
68
  * come from the table, so the toolbar only names the column. */
60
- export declare function DataTableFacetedFilter<TData>({ column, title, options, }: {
69
+ export declare function DataTableFacetedFilter<TData>({ column, title, options, searchable, hideEmpty, }: {
61
70
  column: Column<TData, unknown>;
62
71
  title: string;
63
72
  options: DataTableFilterOption[];
73
+ searchable?: boolean;
74
+ hideEmpty?: boolean;
64
75
  }): React.JSX.Element;
65
76
  /**
66
77
  * Rise-X data table: search, faceted filters and column visibility are built
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ export interface DatePickerRange {
3
+ from?: Date;
4
+ to?: Date;
5
+ }
6
+ declare const DatePicker: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "onChange" | "value"> & {
7
+ value?: Date;
8
+ onValueChange?: (date: Date) => void;
9
+ /** Renders a range span instead of a single day. Selection stays the caller's. */
10
+ range?: DatePickerRange;
11
+ placeholder?: string;
12
+ /** Formats the trigger label. Keep it on the date's local parts. */
13
+ format?: (date: Date) => string;
14
+ footer?: React.ReactNode;
15
+ }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
16
+ export { DatePicker };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ declare function DirectionProvider({ dir, children }: {
3
+ dir: 'ltr' | 'rtl';
4
+ children?: React.ReactNode;
5
+ }): React.JSX.Element;
6
+ export { DirectionProvider };
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import { Label } from './label';
4
+ declare function FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>): React.JSX.Element;
5
+ declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<'legend'> & {
6
+ variant?: 'legend' | 'label';
7
+ }): React.JSX.Element;
8
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
9
+ declare const fieldVariants: (props?: ({
10
+ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
+ declare function Field({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): React.JSX.Element;
13
+ declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
14
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): React.JSX.Element;
15
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
16
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<'p'>): React.JSX.Element;
17
+ declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<'div'> & {
18
+ children?: React.ReactNode;
19
+ }): React.JSX.Element;
20
+ declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<'div'> & {
21
+ errors?: Array<{
22
+ message?: string;
23
+ } | undefined>;
24
+ }): React.JSX.Element | null;
25
+ export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { HoverCard as HoverCardPrimitive } from 'radix-ui';
3
+ declare function HoverCard({ openDelay, closeDelay, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): React.JSX.Element;
4
+ declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): React.JSX.Element;
5
+ declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): React.JSX.Element;
6
+ export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import { Button } from './button';
4
+ declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
5
+ declare const inputGroupAddonVariants: (props?: ({
6
+ align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ declare function InputGroupAddon({ className, align, onClick, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
9
+ declare function InputGroupButton({ type, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
10
+ declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
11
+ declare function InputGroupInput({ className, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
12
+ declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>): React.JSX.Element;
13
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "containerClassName" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "noScriptCSSFallback"> & {
3
+ value?: string;
4
+ onChange?: (newValue: string) => unknown;
5
+ maxLength: number;
6
+ textAlign?: "left" | "center" | "right";
7
+ onComplete?: (...args: any[]) => unknown;
8
+ pushPasswordManagerStrategy?: "increase-width" | "none";
9
+ pasteTransformer?: (pasted: string) => string;
10
+ containerClassName?: string;
11
+ noScriptCSSFallback?: string | null;
12
+ } & {
13
+ render: (props: import("input-otp").RenderProps) => React.ReactNode;
14
+ children?: never;
15
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "containerClassName" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "noScriptCSSFallback"> & {
16
+ value?: string;
17
+ onChange?: (newValue: string) => unknown;
18
+ maxLength: number;
19
+ textAlign?: "left" | "center" | "right";
20
+ onComplete?: (...args: any[]) => unknown;
21
+ pushPasswordManagerStrategy?: "increase-width" | "none";
22
+ pasteTransformer?: (pasted: string) => string;
23
+ containerClassName?: string;
24
+ noScriptCSSFallback?: string | null;
25
+ } & {
26
+ render?: never;
27
+ children: React.ReactNode;
28
+ } & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
29
+ declare function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
30
+ declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
31
+ index: number;
32
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
33
+ declare function InputOTPSeparator({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
34
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -3,6 +3,4 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProp
3
3
  declare function InputNumeric({ className, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
4
4
  declare function InputField({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
5
5
  declare function InputAction({ className, ...props }: React.ComponentProps<'button'>): React.JSX.Element;
6
- declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
7
- declare function InputAffix({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
8
- export { Input, InputNumeric, InputField, InputAction, InputGroup, InputAffix };
6
+ export { Input, InputNumeric, InputField, InputAction };
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import { Separator } from './separator';
4
+ declare function ItemGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
5
+ declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
6
+ declare const itemVariants: (props?: ({
7
+ variant?: "default" | "outline" | "muted" | null | undefined;
8
+ size?: "default" | "sm" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
11
+ asChild?: boolean;
12
+ }): React.JSX.Element;
13
+ declare const itemMediaVariants: (props?: ({
14
+ variant?: "image" | "default" | "icon" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
17
+ declare function ItemContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
18
+ declare function ItemTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
19
+ declare function ItemDescription({ className, ...props }: React.ComponentProps<'p'>): React.JSX.Element;
20
+ declare function ItemActions({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
21
+ declare function ItemHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
22
+ declare function ItemFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
23
+ export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter, };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ declare function Kbd({ className, ...props }: React.ComponentProps<'kbd'>): React.JSX.Element;
3
+ declare function KbdGroup({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
4
+ export { Kbd, KbdGroup };