@agentage/components 0.21.0 → 0.22.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 +15 -11
- package/dist/components/accordion.trigger.js +1 -1
- package/dist/components/approval-bar.d.ts +14 -0
- package/dist/components/approval-bar.d.ts.map +1 -0
- package/dist/components/approval-bar.js +40 -0
- package/dist/components/chat.icons.d.ts +6 -0
- package/dist/components/chat.icons.d.ts.map +1 -0
- package/dist/components/chat.icons.js +23 -0
- package/dist/components/check-list.js +1 -1
- package/dist/components/code-block.body.d.ts +7 -0
- package/dist/components/code-block.body.d.ts.map +1 -0
- package/dist/components/code-block.body.js +24 -0
- package/dist/components/code-block.d.ts +5 -1
- package/dist/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +39 -37
- package/dist/components/context-meter.d.ts +16 -0
- package/dist/components/context-meter.d.ts.map +1 -0
- package/dist/components/context-meter.js +58 -0
- package/dist/components/conversation.d.ts +13 -0
- package/dist/components/conversation.d.ts.map +1 -0
- package/dist/components/conversation.js +61 -0
- package/dist/components/data-table.variants.d.ts.map +1 -1
- package/dist/components/data-table.variants.js +2 -2
- package/dist/components/data-view.board-card.d.ts.map +1 -1
- package/dist/components/data-view.board-card.js +1 -1
- package/dist/components/data-view.d.ts +1 -1
- package/dist/components/data-view.d.ts.map +1 -1
- package/dist/components/data-view.hooks.d.ts +2 -3
- package/dist/components/data-view.hooks.d.ts.map +1 -1
- package/dist/components/data-view.hooks.js +7 -7
- package/dist/components/data-view.types.d.ts +6 -4
- package/dist/components/data-view.types.d.ts.map +1 -1
- package/dist/components/description-list.property.js +1 -1
- package/dist/components/group-header.js +1 -1
- package/dist/components/index.d.ts +19 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +10 -1
- package/dist/components/log-view.row.d.ts.map +1 -1
- package/dist/components/log-view.row.js +26 -27
- package/dist/components/markdown.d.ts +11 -0
- package/dist/components/markdown.d.ts.map +1 -0
- package/dist/components/markdown.js +21 -0
- package/dist/components/markdown.parts.d.ts +4 -0
- package/dist/components/markdown.parts.d.ts.map +1 -0
- package/dist/components/markdown.parts.js +91 -0
- package/dist/components/menu.variants.js +1 -1
- package/dist/components/message.d.ts +10 -0
- package/dist/components/message.d.ts.map +1 -0
- package/dist/components/message.js +22 -0
- package/dist/components/prompt-input.d.ts +22 -0
- package/dist/components/prompt-input.d.ts.map +1 -0
- package/dist/components/prompt-input.js +59 -0
- package/dist/components/reasoning.d.ts +13 -0
- package/dist/components/reasoning.d.ts.map +1 -0
- package/dist/components/reasoning.js +43 -0
- package/dist/components/row.variants.d.ts.map +1 -1
- package/dist/components/row.variants.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tool-call.d.ts +25 -0
- package/dist/components/tool-call.d.ts.map +1 -0
- package/dist/components/tool-call.js +52 -0
- package/dist/components/tool-call.parts.d.ts +29 -0
- package/dist/components/tool-call.parts.d.ts.map +1 -0
- package/dist/components/tool-call.parts.js +96 -0
- package/dist/components/tool-group.d.ts +20 -0
- package/dist/components/tool-group.d.ts.map +1 -0
- package/dist/components/tool-group.js +49 -0
- package/dist/index.js +10 -1
- package/dist/lib/highlight-code.d.ts +9 -0
- package/dist/lib/highlight-code.d.ts.map +1 -0
- package/dist/lib/highlight-code.js +67 -0
- package/dist/lib/utils.d.ts +4 -4
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +1 -1
- package/package.json +40 -4
- package/src/styles/syntax.css +92 -0
- package/src/styles/theme.css +3 -0
- package/src/styles/tokens.css +68 -0
package/README.md
CHANGED
|
@@ -7,6 +7,10 @@ the theme, and you have a coherent dark/light UI kit - buttons through data view
|
|
|
7
7
|
dialogs and command palettes.
|
|
8
8
|
|
|
9
9
|
Browse every component live at **[ds.agentage.io](https://ds.agentage.io)**.
|
|
10
|
+
The catalog of agentage next, built from master, is
|
|
11
|
+
**[components.next.agentage.io](https://components.next.agentage.io)**. All UI of agentage next is
|
|
12
|
+
built from this package: look in the catalog first, compose from its components and patterns, and
|
|
13
|
+
fix a missing or wrong component here with a pull request, not with a local copy.
|
|
10
14
|
|
|
11
15
|
## Moving from `@agentage/design-system`
|
|
12
16
|
|
|
@@ -100,20 +104,20 @@ Full walkthrough: [ds.agentage.io/install](https://ds.agentage.io/install).
|
|
|
100
104
|
|
|
101
105
|
## What's in it
|
|
102
106
|
|
|
103
|
-
|
|
107
|
+
56 documented component pages in seven categories plus 11 patterns, each with props generated from
|
|
104
108
|
the source. The **Core** set (Button, Card, Input, Select, List, DataView, Dialog, Toast and more)
|
|
105
109
|
sits at the top of the docs sidebar.
|
|
106
110
|
|
|
107
|
-
| Category | What's there
|
|
108
|
-
| ----------------------------------------------------------------- |
|
|
109
|
-
| [Foundations](https://ds.agentage.io/components/foundations) (
|
|
110
|
-
| [Forms](https://ds.agentage.io/components/forms) (11) | Input and Textarea, SecretInput, Select, TreeSelect, DatePicker, Checkbox and Switch, RadioGroup, ToggleGroup, FormField and Label, Section, InlineEdit
|
|
111
|
-
| [Navigation](https://ds.agentage.io/components/navigation) (
|
|
112
|
-
| [Lists and data](https://ds.agentage.io/components/lists) (6) | List (with GroupHeader), Table, DataView, ListToolbar, LogView, DataTree
|
|
113
|
-
| [Display](https://ds.agentage.io/components/display) (
|
|
114
|
-
| [Overlays](https://ds.agentage.io/components/overlays) (7) | Dialog, Sheet, Popover, Tooltip, DropdownMenu, Command palette, Resizable panels
|
|
115
|
-
| [Feedback](https://ds.agentage.io/components/feedback) (4) | Alert, Toast, DirtyBar, ActionBar
|
|
116
|
-
| [Patterns](https://ds.agentage.io/components/patterns) (11) | List page, card grid, catalog with views, board, master and detail, detail view, history, settings form, logs explorer, file browser, monitoring
|
|
111
|
+
| Category | What's there |
|
|
112
|
+
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
113
|
+
| [Foundations](https://ds.agentage.io/components/foundations) (10) | Button, IconButton, Badge, Chip, Avatar, Kbd, Skeleton and Spinner, StatusGlyph and PriorityGlyph, Prose, CopyButton |
|
|
114
|
+
| [Forms](https://ds.agentage.io/components/forms) (11) | Input and Textarea, SecretInput, Select, TreeSelect, DatePicker, Checkbox and Switch, RadioGroup, ToggleGroup, FormField and Label, Section, InlineEdit |
|
|
115
|
+
| [Navigation](https://ds.agentage.io/components/navigation) (6) | NavRow and NavTree, Sidebar, Tabs, Breadcrumb, SectionIndex, PageHeader |
|
|
116
|
+
| [Lists and data](https://ds.agentage.io/components/lists) (6) | List (with GroupHeader), Table and Pagination, DataView, ListToolbar, LogView, DataTree |
|
|
117
|
+
| [Display](https://ds.agentage.io/components/display) (12) | Card, StatCard, Sparkline, DescriptionList, Progress, StatusBar, RelativeTime, CodeBlock, ContentBlocks, EmptyState, Accordion and Collapsible, StepList and CheckList |
|
|
118
|
+
| [Overlays](https://ds.agentage.io/components/overlays) (7) | Dialog, Sheet, Popover, Tooltip, DropdownMenu, Command palette, Resizable panels |
|
|
119
|
+
| [Feedback](https://ds.agentage.io/components/feedback) (4) | Alert, Toast, DirtyBar, ActionBar |
|
|
120
|
+
| [Patterns](https://ds.agentage.io/components/patterns) (11) | List page, card grid, catalog with views, board, master and detail, detail view, history, settings form, logs explorer, file browser, monitoring |
|
|
117
121
|
|
|
118
122
|
Beside the pages, composable parts (`CardHeader`, `TableRow`, `CommandItem` and friends) are
|
|
119
123
|
exported too. Only the modules the barrel re-exports have a subpath in the
|
|
@@ -9,7 +9,7 @@ import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
|
9
9
|
var c = [
|
|
10
10
|
"flex w-full items-center gap-2 rounded-md text-ui text-foreground cursor-pointer text-left",
|
|
11
11
|
"transition-colors duration-fast hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50",
|
|
12
|
-
"hover:
|
|
12
|
+
"hover:on-accent",
|
|
13
13
|
"focus-ring"
|
|
14
14
|
], l = {
|
|
15
15
|
default: "min-h-9 px-2 py-1.5 font-medium",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type ApprovalDecision = 'once' | 'session' | 'always' | 'skip';
|
|
3
|
+
export interface ApprovalBarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue'> {
|
|
4
|
+
/** The decision. Once set, the four buttons stay in place, disabled, with the choice marked. */
|
|
5
|
+
value?: ApprovalDecision | null;
|
|
6
|
+
defaultValue?: ApprovalDecision | null;
|
|
7
|
+
onValueChange?: (value: ApprovalDecision) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Asks to run one tool call: Allow once, Allow in this session, Always allow or Skip.
|
|
11
|
+
* `children` is the line above the buttons that says what the call will do.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ApprovalBar: React.ForwardRefExoticComponent<ApprovalBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
//# sourceMappingURL=approval-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval-bar.d.ts","sourceRoot":"","sources":["../../src/components/approval-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAStE,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,cAAc,CACf;IACC,gGAAgG;IAChG,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACnD;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,yFAmDvB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { useControlled as t } from "../lib/use-controlled.js";
|
|
4
|
+
import { Button as n } from "./button.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
// src/components/approval-bar.tsx
|
|
8
|
+
var o = [
|
|
9
|
+
["once", "Allow once"],
|
|
10
|
+
["session", "Allow in this session"],
|
|
11
|
+
["always", "Always allow"],
|
|
12
|
+
["skip", "Skip"]
|
|
13
|
+
], s = r.forwardRef(({ value: r, defaultValue: s = null, onValueChange: c, className: l, children: u, ...d }, f) => {
|
|
14
|
+
let [p, m] = t(r, s, c), h = p !== null, g = p ?? "once";
|
|
15
|
+
return /* @__PURE__ */ a("div", {
|
|
16
|
+
ref: f,
|
|
17
|
+
className: e("@container flex min-w-0 flex-col gap-1.5", l),
|
|
18
|
+
"data-slot": "approval-bar",
|
|
19
|
+
"data-state": h ? "decided" : "open",
|
|
20
|
+
...d,
|
|
21
|
+
children: [u && /* @__PURE__ */ i("div", {
|
|
22
|
+
className: "text-ui leading-normal text-muted-foreground [&_b]:font-semibold [&_b]:text-foreground",
|
|
23
|
+
children: u
|
|
24
|
+
}), /* @__PURE__ */ i("div", {
|
|
25
|
+
role: "group",
|
|
26
|
+
"aria-label": "Approve this call",
|
|
27
|
+
className: "grid grid-cols-2 gap-1.5 @min-[26rem]:flex @min-[26rem]:items-center",
|
|
28
|
+
children: o.map(([t, r]) => /* @__PURE__ */ i(n, {
|
|
29
|
+
variant: t === g ? "default" : "outline",
|
|
30
|
+
disabled: h,
|
|
31
|
+
"aria-pressed": h ? t === p : void 0,
|
|
32
|
+
onClick: () => m(t),
|
|
33
|
+
className: e("border font-medium", t === g ? "border-primary disabled:opacity-100" : "bg-transparent", t === "skip" && "@min-[26rem]:ml-auto"),
|
|
34
|
+
children: r
|
|
35
|
+
}, t))
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
s.displayName = "ApprovalBar";
|
|
40
|
+
export { s as ApprovalBar };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const ArrowUpIcon: () => React.JSX.Element;
|
|
3
|
+
export declare const StopIcon: () => React.JSX.Element;
|
|
4
|
+
export declare const ChevronDownIcon: () => React.JSX.Element;
|
|
5
|
+
export declare const BulbIcon: () => React.JSX.Element;
|
|
6
|
+
//# sourceMappingURL=chat.icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.icons.d.ts","sourceRoot":"","sources":["../../src/components/chat.icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,eAAO,MAAM,WAAW,yBAIvB,CAAC;AAEF,eAAO,MAAM,QAAQ,yBAIpB,CAAC;AAEF,eAAO,MAAM,eAAe,yBAI3B,CAAC;AAEF,eAAO,MAAM,QAAQ,yBAIpB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
// src/components/chat.icons.tsx
|
|
4
|
+
var t = ({ children: t, ...n }) => /* @__PURE__ */ e("svg", {
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
fill: "none",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
strokeWidth: "1.75",
|
|
9
|
+
strokeLinecap: "round",
|
|
10
|
+
strokeLinejoin: "round",
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
focusable: "false",
|
|
13
|
+
className: "size-3.5 shrink-0",
|
|
14
|
+
...n,
|
|
15
|
+
children: t
|
|
16
|
+
}), n = () => /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e("path", { d: "M12 19V5M6 11l6-6 6 6" }) }), r = () => /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e("rect", {
|
|
17
|
+
x: "6",
|
|
18
|
+
y: "6",
|
|
19
|
+
width: "12",
|
|
20
|
+
height: "12",
|
|
21
|
+
rx: "2"
|
|
22
|
+
}) }), i = () => /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e("path", { d: "M7 10l5 5 5-5" }) }), a = () => /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e("path", { d: "M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0 0 12 3z" }) });
|
|
23
|
+
export { n as ArrowUpIcon, a as BulbIcon, i as ChevronDownIcon, r as StopIcon };
|
|
@@ -68,7 +68,7 @@ var m = "flex min-h-9 w-full items-center gap-2.5 px-3 py-1.5 text-left text-ui"
|
|
|
68
68
|
...b,
|
|
69
69
|
children: [T ? /* @__PURE__ */ d("button", {
|
|
70
70
|
type: "button",
|
|
71
|
-
className: e(m, "transition-colors duration-fast hover:bg-accent focus-ring", "hover:
|
|
71
|
+
className: e(m, "transition-colors duration-fast hover:bg-accent focus-ring", "hover:on-accent"),
|
|
72
72
|
"aria-expanded": S,
|
|
73
73
|
"aria-controls": w,
|
|
74
74
|
onClick: () => C(!S),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** The code highlighted at runtime by its language; plain escaped text for an unknown one. */
|
|
3
|
+
export declare const CodeBody: ({ code, language }: {
|
|
4
|
+
code: string;
|
|
5
|
+
language?: string;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=code-block.body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.body.d.ts","sourceRoot":"","sources":["../../src/components/code-block.body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0B/B,8FAA8F;AAC9F,eAAO,MAAM,QAAQ,GAAI,oBAAoB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,sBAgB/E,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { codeLanguage as t, highlightCode as n } from "../lib/highlight-code.js";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/code-block.body.tsx
|
|
6
|
+
var a = "block w-max min-w-full font-mono", o = (e) => e.startsWith("+++") || e.startsWith("---") ? "text-[color:var(--syntax-comment)]" : e.startsWith("+") ? "bg-success/10 text-[color:var(--syntax-number)]" : e.startsWith("-") ? "bg-destructive/10 text-[color:var(--syntax-string)]" : e.startsWith("@@") ? "text-[color:var(--syntax-keyword)]" : "text-[color:var(--syntax-text)]", s = ({ code: t }) => /* @__PURE__ */ i("code", {
|
|
7
|
+
className: a,
|
|
8
|
+
"data-language": "diff",
|
|
9
|
+
children: t.split("\n").map((t, n) => /* @__PURE__ */ i("span", {
|
|
10
|
+
className: e("block min-h-[1lh] px-3", o(t)),
|
|
11
|
+
children: t
|
|
12
|
+
}, n))
|
|
13
|
+
}), c = ({ code: o, language: c }) => {
|
|
14
|
+
let l = t(c), u = r.useMemo(() => l && l !== "diff" ? n(o, l) : null, [o, l]);
|
|
15
|
+
return l === "diff" ? /* @__PURE__ */ i(s, { code: o }) : u === null ? /* @__PURE__ */ i("code", {
|
|
16
|
+
className: e(a, "px-3 text-foreground"),
|
|
17
|
+
children: o
|
|
18
|
+
}) : /* @__PURE__ */ i("code", {
|
|
19
|
+
className: e(a, "hljs px-3"),
|
|
20
|
+
"data-language": l,
|
|
21
|
+
dangerouslySetInnerHTML: { __html: u }
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
export { c as CodeBody };
|
|
@@ -4,9 +4,13 @@ export declare const codeBlockCopyVariants: (props?: ({
|
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
5
|
export interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
code: string;
|
|
7
|
+
/**
|
|
8
|
+
* Language label in the header. A known language (typescript, bash, json, yaml, diff and more)
|
|
9
|
+
* is also highlighted at runtime; an unknown one shows plain text.
|
|
10
|
+
*/
|
|
7
11
|
language?: string;
|
|
8
12
|
showCopy?: boolean;
|
|
9
|
-
/** Pre-tokenized markup
|
|
13
|
+
/** Pre-tokenized markup rendered instead of the raw `code` text; skips runtime highlighting. */
|
|
10
14
|
children?: React.ReactNode;
|
|
11
15
|
}
|
|
12
16
|
export declare const CodeBlock: React.ForwardRefExoticComponent<CodeBlockProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../src/components/code-block.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../src/components/code-block.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,eAAO,MAAM,qBAAqB;;8EAmBjC,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAiCD,eAAO,MAAM,SAAS,uFAiDrB,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AAEhE,eAAO,MAAM,UAAU,qFAStB,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../lib/utils.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { CodeBody as t } from "./code-block.body.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { useState as r } from "react";
|
|
6
|
+
import { cva as i } from "class-variance-authority";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
8
|
// src/components/code-block.tsx
|
|
8
|
-
var
|
|
9
|
+
var s = i([
|
|
9
10
|
"absolute right-2 top-2 grid size-6 place-items-center rounded-lg transition-colors duration-fast [&_svg]:size-3.5",
|
|
10
11
|
"text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
11
12
|
"opacity-0 group-hover:opacity-100 focus:opacity-100",
|
|
@@ -16,7 +17,7 @@ var o = r([
|
|
|
16
17
|
false: ""
|
|
17
18
|
} },
|
|
18
19
|
defaultVariants: { withHeader: !1 }
|
|
19
|
-
}),
|
|
20
|
+
}), c = () => /* @__PURE__ */ o("svg", {
|
|
20
21
|
width: "14",
|
|
21
22
|
height: "14",
|
|
22
23
|
viewBox: "0 0 24 24",
|
|
@@ -25,14 +26,14 @@ var o = r([
|
|
|
25
26
|
strokeWidth: "2",
|
|
26
27
|
strokeLinecap: "round",
|
|
27
28
|
strokeLinejoin: "round",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ a("rect", {
|
|
29
30
|
width: "14",
|
|
30
31
|
height: "14",
|
|
31
32
|
x: "8",
|
|
32
33
|
y: "8",
|
|
33
34
|
rx: "2"
|
|
34
|
-
}), /* @__PURE__ */
|
|
35
|
-
}),
|
|
35
|
+
}), /* @__PURE__ */ a("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })]
|
|
36
|
+
}), l = () => /* @__PURE__ */ a("svg", {
|
|
36
37
|
width: "14",
|
|
37
38
|
height: "14",
|
|
38
39
|
viewBox: "0 0 24 24",
|
|
@@ -41,47 +42,48 @@ var o = r([
|
|
|
41
42
|
strokeWidth: "2",
|
|
42
43
|
strokeLinecap: "round",
|
|
43
44
|
strokeLinejoin: "round",
|
|
44
|
-
children: /* @__PURE__ */
|
|
45
|
-
}),
|
|
46
|
-
let [
|
|
47
|
-
await navigator.clipboard.writeText(
|
|
45
|
+
children: /* @__PURE__ */ a("polyline", { points: "20 6 9 17 4 12" })
|
|
46
|
+
}), u = n.forwardRef(({ code: n, language: i, showCopy: u = !0, className: d, children: f, ...p }, m) => {
|
|
47
|
+
let [h, g] = r(!1), _ = async () => {
|
|
48
|
+
await navigator.clipboard.writeText(n), g(!0), setTimeout(() => g(!1), 2e3);
|
|
48
49
|
};
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
ref:
|
|
51
|
-
className: e("relative group rounded-lg border border-border bg-
|
|
50
|
+
return /* @__PURE__ */ o("div", {
|
|
51
|
+
ref: m,
|
|
52
|
+
className: e("relative group min-w-0 rounded-lg border border-border bg-background", d),
|
|
52
53
|
"data-slot": "code-block",
|
|
53
|
-
...
|
|
54
|
+
...p,
|
|
54
55
|
children: [
|
|
55
|
-
|
|
56
|
-
className: "flex h-8 items-center justify-between border-b border-border px-3",
|
|
57
|
-
children: /* @__PURE__ */
|
|
56
|
+
i && /* @__PURE__ */ a("div", {
|
|
57
|
+
className: "flex h-8 items-center justify-between rounded-t-lg border-b border-border bg-card px-3",
|
|
58
|
+
children: /* @__PURE__ */ a("span", {
|
|
58
59
|
className: "text-xs text-muted-foreground font-mono",
|
|
59
|
-
children:
|
|
60
|
+
children: i
|
|
60
61
|
})
|
|
61
62
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
className: "overflow-x-auto px-3 py-2.5 text-xs leading-relaxed",
|
|
64
|
-
children: d ?? /* @__PURE__ */ i("code", {
|
|
65
|
-
className: "font-mono text-foreground",
|
|
66
|
-
children: t
|
|
67
|
-
})
|
|
68
|
-
}),
|
|
69
|
-
l && /* @__PURE__ */ i("button", {
|
|
63
|
+
u && /* @__PURE__ */ a("button", {
|
|
70
64
|
type: "button",
|
|
71
|
-
onClick: () => void
|
|
72
|
-
className: e(
|
|
73
|
-
"aria-label":
|
|
74
|
-
children:
|
|
65
|
+
onClick: () => void _(),
|
|
66
|
+
className: e(s({ withHeader: !!i }), "z-10"),
|
|
67
|
+
"aria-label": h ? "Copied" : "Copy code",
|
|
68
|
+
children: a(h ? l : c, {})
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ a("pre", {
|
|
71
|
+
tabIndex: 0,
|
|
72
|
+
className: e("m-0 max-h-80 overflow-auto rounded-b-lg py-2.5 text-xs leading-relaxed focus-ring", f !== void 0 && "px-3"),
|
|
73
|
+
children: f ?? /* @__PURE__ */ a(t, {
|
|
74
|
+
code: n,
|
|
75
|
+
language: i
|
|
76
|
+
})
|
|
75
77
|
})
|
|
76
78
|
]
|
|
77
79
|
});
|
|
78
80
|
});
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
+
u.displayName = "CodeBlock";
|
|
82
|
+
var d = n.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ a("code", {
|
|
81
83
|
ref: r,
|
|
82
84
|
className: e("rounded-sm bg-muted px-1 py-px font-mono text-xs text-foreground", t),
|
|
83
85
|
"data-slot": "inline-code",
|
|
84
86
|
...n
|
|
85
87
|
}));
|
|
86
|
-
|
|
87
|
-
export {
|
|
88
|
+
d.displayName = "InlineCode";
|
|
89
|
+
export { u as CodeBlock, d as InlineCode, s as codeBlockCopyVariants };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ContextMeterProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
3
|
+
/** Used amount, out of `max`. */
|
|
4
|
+
value: number;
|
|
5
|
+
/** Default 100, so `value` reads as a percent. */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** `sm` 14 px ring for a status strip (default), `md` 64 px for a panel. */
|
|
8
|
+
size?: 'sm' | 'md';
|
|
9
|
+
/** Accessible name; the percent is added. Default "Context window". */
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
/** The tone of a fill level: neutral, warning from 75 %, danger from 90 %. */
|
|
13
|
+
export declare const meterTone: (percent: number) => string;
|
|
14
|
+
/** A ring that fills with use, for example the model context window. */
|
|
15
|
+
export declare const ContextMeter: React.ForwardRefExoticComponent<ContextMeterProps & React.RefAttributes<HTMLSpanElement>>;
|
|
16
|
+
//# sourceMappingURL=context-meter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-meter.d.ts","sourceRoot":"","sources":["../../src/components/context-meter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IAChG,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID,8EAA8E;AAC9E,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,KAAG,MACmD,CAAC;AAEhG,wEAAwE;AACxE,eAAO,MAAM,YAAY,2FA+CxB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
// src/components/context-meter.tsx
|
|
5
|
+
var i = {
|
|
6
|
+
sm: {
|
|
7
|
+
box: 14,
|
|
8
|
+
stroke: 2.5,
|
|
9
|
+
inset: 2
|
|
10
|
+
},
|
|
11
|
+
md: {
|
|
12
|
+
box: 64,
|
|
13
|
+
stroke: 6,
|
|
14
|
+
inset: 4
|
|
15
|
+
}
|
|
16
|
+
}, a = (e) => e >= 90 ? "text-destructive" : e >= 75 ? "text-warning" : "text-muted-foreground", o = t.forwardRef(({ value: t, max: o = 100, size: s = "sm", label: c = "Context window", className: l, ...u }, d) => {
|
|
17
|
+
let f = Math.round(Math.min(Math.max(Number.isFinite(t) ? t : 0, 0), o) / (o || 1) * 100), { box: p, stroke: m, inset: h } = i[s], g = p / 2, _ = g - h, v = 2 * Math.PI * _;
|
|
18
|
+
return /* @__PURE__ */ n("span", {
|
|
19
|
+
ref: d,
|
|
20
|
+
role: "meter",
|
|
21
|
+
"aria-label": `${c} ${String(f)}%`,
|
|
22
|
+
"aria-valuenow": f,
|
|
23
|
+
"aria-valuemin": 0,
|
|
24
|
+
"aria-valuemax": 100,
|
|
25
|
+
"aria-valuetext": `${String(f)}%`,
|
|
26
|
+
className: e("inline-block flex-none", a(f), l),
|
|
27
|
+
"data-slot": "context-meter",
|
|
28
|
+
"data-size": s,
|
|
29
|
+
...u,
|
|
30
|
+
children: /* @__PURE__ */ r("svg", {
|
|
31
|
+
width: p,
|
|
32
|
+
height: p,
|
|
33
|
+
viewBox: `0 0 ${String(p)} ${String(p)}`,
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
className: "block",
|
|
36
|
+
children: [/* @__PURE__ */ n("circle", {
|
|
37
|
+
cx: g,
|
|
38
|
+
cy: g,
|
|
39
|
+
r: _,
|
|
40
|
+
fill: "none",
|
|
41
|
+
strokeWidth: m,
|
|
42
|
+
className: "stroke-accent"
|
|
43
|
+
}), f > 0 && /* @__PURE__ */ n("circle", {
|
|
44
|
+
cx: g,
|
|
45
|
+
cy: g,
|
|
46
|
+
r: _,
|
|
47
|
+
fill: "none",
|
|
48
|
+
stroke: "currentColor",
|
|
49
|
+
strokeWidth: m,
|
|
50
|
+
strokeLinecap: "round",
|
|
51
|
+
strokeDasharray: `${(f / 100 * v).toFixed(1)} ${v.toFixed(1)}`,
|
|
52
|
+
transform: `rotate(-90 ${String(g)} ${String(g)})`
|
|
53
|
+
})]
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
o.displayName = "ContextMeter";
|
|
58
|
+
export { o as ContextMeter, a as meterTone };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ConversationProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Name of the message log for assistive tech. Default "Conversation". */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Name of the button that jumps to the newest message. Default "Scroll to the latest message". */
|
|
6
|
+
scrollLabel?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The message column. It stays pinned to the newest content while the reader is at the bottom;
|
|
10
|
+
* once they scroll up it holds still and shows a scroll-to-latest button.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Conversation: React.ForwardRefExoticComponent<ConversationProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/components/conversation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mGAAmG;IACnG,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAKD;;;GAGG;AACH,eAAO,MAAM,YAAY,0FAuFxB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { ChevronDownIcon as t } from "./chat.icons.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
// src/components/conversation.tsx
|
|
7
|
+
var a = 24, o = (e) => e.scrollHeight - e.scrollTop - e.clientHeight <= a, s = n.forwardRef(({ label: a = "Conversation", scrollLabel: s = "Scroll to the latest message", className: c, children: l, ...u }, d) => {
|
|
8
|
+
let f = n.useRef(null), p = n.useRef(null), m = n.useRef(!0), [h, g] = n.useState(!1), _ = n.useCallback((e) => {
|
|
9
|
+
let t = f.current;
|
|
10
|
+
t && t.scrollTo({
|
|
11
|
+
top: t.scrollHeight,
|
|
12
|
+
behavior: e ? "smooth" : "auto"
|
|
13
|
+
});
|
|
14
|
+
}, []);
|
|
15
|
+
n.useLayoutEffect(() => {
|
|
16
|
+
let e = p.current;
|
|
17
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
18
|
+
let t = new ResizeObserver(() => {
|
|
19
|
+
m.current ? _(!1) : f.current && g(!o(f.current));
|
|
20
|
+
});
|
|
21
|
+
return t.observe(e), f.current && t.observe(f.current), () => t.disconnect();
|
|
22
|
+
}, [_]);
|
|
23
|
+
let v = () => {
|
|
24
|
+
let e = f.current;
|
|
25
|
+
e && (m.current = o(e), g(!m.current));
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ i("div", {
|
|
28
|
+
ref: d,
|
|
29
|
+
className: e("relative min-h-0 flex-1", c),
|
|
30
|
+
"data-slot": "conversation",
|
|
31
|
+
...u,
|
|
32
|
+
children: [/* @__PURE__ */ r("div", {
|
|
33
|
+
ref: f,
|
|
34
|
+
role: "log",
|
|
35
|
+
"aria-label": a,
|
|
36
|
+
tabIndex: 0,
|
|
37
|
+
onScroll: v,
|
|
38
|
+
className: "absolute inset-0 overflow-auto overscroll-contain [scrollbar-gutter:stable] focus-ring",
|
|
39
|
+
"data-slot": "conversation-scroller",
|
|
40
|
+
children: /* @__PURE__ */ r("div", {
|
|
41
|
+
ref: p,
|
|
42
|
+
className: "mx-auto flex max-w-[760px] flex-col gap-3 px-3.5 pb-6 pt-4",
|
|
43
|
+
"data-slot": "conversation-column",
|
|
44
|
+
children: l
|
|
45
|
+
})
|
|
46
|
+
}), /* @__PURE__ */ r("button", {
|
|
47
|
+
type: "button",
|
|
48
|
+
"aria-label": s,
|
|
49
|
+
"aria-hidden": !h || void 0,
|
|
50
|
+
tabIndex: h ? 0 : -1,
|
|
51
|
+
onClick: () => {
|
|
52
|
+
m.current = !0, g(!1), _(!0);
|
|
53
|
+
},
|
|
54
|
+
className: e("absolute bottom-2.5 right-[18px] grid size-7 place-items-center rounded-full border border-border bg-accent text-foreground shadow-popover transition-opacity duration-fast focus-ring", h ? "opacity-100" : "pointer-events-none opacity-0"),
|
|
55
|
+
"data-slot": "conversation-scroll-button",
|
|
56
|
+
children: /* @__PURE__ */ r(t, {})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
s.displayName = "Conversation";
|
|
61
|
+
export { s as Conversation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.variants.d.ts","sourceRoot":"","sources":["../../src/components/data-table.variants.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,qBAAqB;;;8EAchC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;8EAgBhC,CAAC;AAEH,iGAAiG;AACjG,eAAO,MAAM,0BAA0B;;;;8EAWrC,CAAC;
|
|
1
|
+
{"version":3,"file":"data-table.variants.d.ts","sourceRoot":"","sources":["../../src/components/data-table.variants.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,qBAAqB;;;8EAchC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;8EAgBhC,CAAC;AAEH,iGAAiG;AACjG,eAAO,MAAM,0BAA0B;;;;8EAWrC,CAAC;AAKH,eAAO,MAAM,oBAAoB;;;;;8EAmB/B,CAAC"}
|
|
@@ -58,10 +58,10 @@ var n = {
|
|
|
58
58
|
lines: 1,
|
|
59
59
|
align: "left"
|
|
60
60
|
}
|
|
61
|
-
}), s = t("data-[state=selected]:
|
|
61
|
+
}), s = t("data-[state=selected]:on-accent", {
|
|
62
62
|
variants: {
|
|
63
63
|
dense: {
|
|
64
|
-
true: ["hover:bg-accent", "hover:
|
|
64
|
+
true: ["hover:bg-accent", "hover:on-accent"],
|
|
65
65
|
false: ""
|
|
66
66
|
},
|
|
67
67
|
interactive: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-view.board-card.d.ts","sourceRoot":"","sources":["../../src/components/data-view.board-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,GAAG,EAAE,CAAC,CAAC;IACP,iEAAiE;IACjE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gEAAgE;IAChE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAcD;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAG,2CAA2C,cAAc,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"data-view.board-card.d.ts","sourceRoot":"","sources":["../../src/components/data-view.board-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,GAAG,EAAE,CAAC,CAAC;IACP,iEAAiE;IACjE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gEAAgE;IAChE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAcD;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAG,2CAA2C,cAAc,CAAC,CAAC,CAAC,sBAqEzF,CAAC"}
|
|
@@ -19,7 +19,7 @@ var o = (e, t) => {
|
|
|
19
19
|
...f("end")
|
|
20
20
|
], g = f("chip"), _ = p ? s(p, n) : null;
|
|
21
21
|
return /* @__PURE__ */ a("div", {
|
|
22
|
-
className: e("group/card relative flex min-w-0 flex-col gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-ui text-foreground", l && "cursor-pointer transition-colors duration-fast hover:bg-accent has-[[data-card-activator]:focus-visible]:outline-2 has-[[data-card-activator]:focus-visible]:-outline-offset-2 has-[[data-card-activator]:focus-visible]:outline-ring"),
|
|
22
|
+
className: e("group/card relative flex min-w-0 flex-col gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-ui text-foreground", l && "cursor-pointer transition-colors duration-fast hover:bg-accent hover:on-accent has-[[data-card-activator]:focus-visible]:outline-2 has-[[data-card-activator]:focus-visible]:-outline-offset-2 has-[[data-card-activator]:focus-visible]:outline-ring"),
|
|
23
23
|
"data-slot": "board-card-body",
|
|
24
24
|
children: [
|
|
25
25
|
h.length > 0 && /* @__PURE__ */ a("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataViewProps } from './data-view.types.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
export type { DataViewColumn, DataViewValue } from './data-view.config.js';
|
|
4
|
-
export type { DataViewActions, DataViewKind, DataViewProps, DataViewState, } from './data-view.types.js';
|
|
4
|
+
export type { DataViewActions, DataViewDefault, DataViewKind, DataViewProps, DataViewState, } from './data-view.types.js';
|
|
5
5
|
/**
|
|
6
6
|
* The default list: ListToolbar (search, Filter with counts, chips, toggles, views, Display)
|
|
7
7
|
* over a dense, groupable table, a card grid or a board. Everything comes from the columns.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-view.d.ts","sourceRoot":"","sources":["../../src/components/data-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOrE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxE,YAAY,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,GACd,MAAM,mBAAmB,CAAC;AAa3B;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAG,OAAO,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,GAAG,CAAC,OAwHhE,CAAC"}
|
|
1
|
+
{"version":3,"file":"data-view.d.ts","sourceRoot":"","sources":["../../src/components/data-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOrE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxE,YAAY,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,GACd,MAAM,mBAAmB,CAAC;AAa3B;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAG,OAAO,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,GAAG,CAAC,OAwHhE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ListControls } from '../lib/use-list-controls.js';
|
|
2
|
-
import { DataViewState } from './data-view.types.js';
|
|
2
|
+
import { DataViewDefault, DataViewState } from './data-view.types.js';
|
|
3
3
|
export interface StateSeed {
|
|
4
4
|
views: string[];
|
|
5
5
|
columns: {
|
|
@@ -8,9 +8,8 @@ export interface StateSeed {
|
|
|
8
8
|
sortable?: boolean;
|
|
9
9
|
}[];
|
|
10
10
|
state?: Partial<DataViewState>;
|
|
11
|
-
defaultState?:
|
|
11
|
+
defaultState?: DataViewDefault;
|
|
12
12
|
onStateChange?: (state: DataViewState) => void;
|
|
13
|
-
storageKey?: string;
|
|
14
13
|
}
|
|
15
14
|
export interface DataViewControls {
|
|
16
15
|
c: ListControls;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-view.hooks.d.ts","sourceRoot":"","sources":["../../src/components/data-view.hooks.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"data-view.hooks.d.ts","sourceRoot":"","sources":["../../src/components/data-view.hooks.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAExE,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IACpE,KAAK,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAChD;AAoFD,MAAM,WAAW,gBAAgB;IAC/B,CAAC,EAAE,YAAY,CAAC;IAChB,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACtC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,GAAI,MAAM,SAAS,KAAG,gBAoClD,CAAC"}
|