meowtail 0.2.0-alpha.1 → 0.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -8
- package/dist/src/chat/assistant-composer.js +58 -98
- package/dist/src/chat/assistant-content.d.ts +1 -3
- package/dist/src/chat/assistant-content.js +36 -44
- package/dist/src/chat/assistant-markdown.js +4 -8
- package/dist/src/chat/assistant-question.js +13 -14
- package/dist/src/chat/assistant.js +27 -26
- package/dist/src/chat/attachments.d.ts +3 -2
- package/dist/src/chat/attachments.js +39 -34
- package/dist/src/chat/composer-panel.d.ts +2 -3
- package/dist/src/chat/composer-panel.js +3 -4
- package/dist/src/chat/composer.d.ts +5 -3
- package/dist/src/chat/composer.js +67 -21
- package/dist/src/chat/task.js +9 -15
- package/dist/src/chat/tool-call.js +1 -8
- package/dist/src/components/accordion.d.ts +24 -0
- package/dist/src/components/accordion.js +50 -0
- package/dist/src/components/avatar.d.ts +22 -0
- package/dist/src/components/avatar.js +44 -0
- package/dist/src/components/checkbox.d.ts +6 -2
- package/dist/src/components/checkbox.js +36 -8
- package/dist/src/components/choice-group.d.ts +1 -0
- package/dist/src/components/choice-group.js +12 -17
- package/dist/src/components/choice-select.d.ts +3 -1
- package/dist/src/components/choice-select.js +56 -54
- package/dist/src/components/code-block.d.ts +3 -3
- package/dist/src/components/code-block.js +27 -23
- package/dist/src/components/context-menu.d.ts +16 -0
- package/dist/src/components/context-menu.js +49 -0
- package/dist/src/components/disclosure.d.ts +2 -2
- package/dist/src/components/disclosure.js +1 -1
- package/dist/src/components/index.d.ts +9 -0
- package/dist/src/components/index.js +9 -0
- package/dist/src/components/link.d.ts +13 -0
- package/dist/src/components/link.js +9 -0
- package/dist/src/components/menu-button.d.ts +13 -0
- package/dist/src/components/menu-button.js +10 -0
- package/dist/src/components/menu.d.ts +4 -0
- package/dist/src/components/menu.js +3 -3
- package/dist/src/components/meta-row.d.ts +5 -4
- package/dist/src/components/meta-row.js +34 -18
- package/dist/src/components/nav-item.js +2 -5
- package/dist/src/components/number-input.d.ts +29 -0
- package/dist/src/components/number-input.js +137 -0
- package/dist/src/components/output-block.js +1 -8
- package/dist/src/components/path-picker.js +5 -10
- package/dist/src/components/pill.js +2 -5
- package/dist/src/components/popover.js +4 -4
- package/dist/src/components/progress.d.ts +15 -0
- package/dist/src/components/progress.js +12 -0
- package/dist/src/components/risk-confirmation.js +2 -5
- package/dist/src/components/segmented-control.js +3 -3
- package/dist/src/components/skeleton-boundary.js +4 -7
- package/dist/src/components/slider.d.ts +22 -0
- package/dist/src/components/slider.js +49 -0
- package/dist/src/components/table.d.ts +41 -0
- package/dist/src/components/table.js +146 -0
- package/dist/src/components/tabs.d.ts +1 -1
- package/dist/src/components/tabs.js +11 -20
- package/dist/src/components/text-shimmer.js +2 -5
- package/dist/src/registry/index.d.ts +62 -3
- package/dist/src/registry/index.js +18 -2
- package/dist/src/theme/chat/composer-panel.styles.js +4 -1
- package/dist/src/theme/chat/composer.styles.js +45 -67
- package/dist/src/theme/chat/task.styles.js +5 -6
- package/dist/src/theme/components/accordion.styles.d.ts +1 -0
- package/dist/src/theme/components/accordion.styles.js +63 -0
- package/dist/src/theme/components/avatar.styles.d.ts +1 -0
- package/dist/src/theme/components/avatar.styles.js +52 -0
- package/dist/src/theme/components/button.styles.js +9 -0
- package/dist/src/theme/components/card.styles.js +2 -0
- package/dist/src/theme/components/context-menu.styles.d.ts +1 -0
- package/dist/src/theme/components/context-menu.styles.js +14 -0
- package/dist/src/theme/components/link.styles.d.ts +1 -0
- package/dist/src/theme/components/link.styles.js +33 -0
- package/dist/src/theme/components/menu.styles.js +9 -3
- package/dist/src/theme/components/number-input.styles.d.ts +1 -0
- package/dist/src/theme/components/number-input.styles.js +106 -0
- package/dist/src/theme/components/progress.styles.d.ts +1 -0
- package/dist/src/theme/components/progress.styles.js +71 -0
- package/dist/src/theme/components/slider.styles.d.ts +1 -0
- package/dist/src/theme/components/slider.styles.js +129 -0
- package/dist/src/theme/components/table.styles.d.ts +1 -0
- package/dist/src/theme/components/table.styles.js +156 -0
- package/dist/src/theme/components/toggle.styles.js +10 -0
- package/dist/src/theme/index.d.ts +1 -1
- package/dist/src/theme/index.js +16 -0
- package/package.json +3 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent, derived, unwrap, } from "meowjsx";
|
|
2
|
+
export const sliderContract = {
|
|
3
|
+
name: "slider",
|
|
4
|
+
parts: ["root", "control", "track", "thumb", "value"],
|
|
5
|
+
};
|
|
6
|
+
function asNumber(value, fallback) {
|
|
7
|
+
const next = Number(value);
|
|
8
|
+
return Number.isFinite(next) ? next : fallback;
|
|
9
|
+
}
|
|
10
|
+
/** Native range control. The visible figure is the same value assistive technology reads. */
|
|
11
|
+
export const Slider = defineComponent(sliderContract, ({ label, value, defaultValue, min = 0, max = 100, step = 1, disabled, name, id, onValueChange, className, onInput, ...props }, context) => {
|
|
12
|
+
const initial = value === undefined ? (defaultValue ?? min) : unwrap(value);
|
|
13
|
+
const local = context.signal(initial);
|
|
14
|
+
const current = value !== undefined ? value : local;
|
|
15
|
+
const readValue = () => unwrap(current);
|
|
16
|
+
const display = derived(() => String(readValue()));
|
|
17
|
+
const fill = derived(() => {
|
|
18
|
+
const next = readValue();
|
|
19
|
+
const range = max - min;
|
|
20
|
+
const pct = range <= 0 ? 0 : Math.min(100, Math.max(0, ((next - min) / range) * 100));
|
|
21
|
+
return `${pct}%`;
|
|
22
|
+
});
|
|
23
|
+
const commit = (event) => {
|
|
24
|
+
const input = event.currentTarget;
|
|
25
|
+
const next = asNumber(input.value, readValue());
|
|
26
|
+
if (value === undefined)
|
|
27
|
+
local.value = next;
|
|
28
|
+
onValueChange?.(next);
|
|
29
|
+
onInput?.(event);
|
|
30
|
+
if (value !== undefined)
|
|
31
|
+
input.value = String(unwrap(value));
|
|
32
|
+
};
|
|
33
|
+
return context.part("root", "div", {
|
|
34
|
+
className,
|
|
35
|
+
style: { "--slider-fill": fill },
|
|
36
|
+
}, context.part("control", "input", {
|
|
37
|
+
...props,
|
|
38
|
+
id,
|
|
39
|
+
name,
|
|
40
|
+
type: "range",
|
|
41
|
+
min,
|
|
42
|
+
max,
|
|
43
|
+
step,
|
|
44
|
+
disabled,
|
|
45
|
+
"aria-label": label,
|
|
46
|
+
value: display,
|
|
47
|
+
onInput: commit,
|
|
48
|
+
}), context.part("track", "span", { "aria-hidden": "true" }, context.part("thumb", "span", { "aria-hidden": "true" })), context.part("value", "output", { htmlFor: id, "aria-hidden": id ? undefined : "true" }, display));
|
|
49
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Child, type MaybeSignal, type Props } from "meowjsx";
|
|
2
|
+
export declare const tableContract: {
|
|
3
|
+
readonly name: "table";
|
|
4
|
+
readonly parts: readonly ["root", "scroller", "table", "header", "heading", "sort", "resize", "body", "row", "cell", "select"];
|
|
5
|
+
};
|
|
6
|
+
export type TableSortDirection = "asc" | "desc";
|
|
7
|
+
export interface TableSort {
|
|
8
|
+
columnId: string;
|
|
9
|
+
direction: TableSortDirection;
|
|
10
|
+
}
|
|
11
|
+
export interface TableColumn {
|
|
12
|
+
id: string;
|
|
13
|
+
header: Child;
|
|
14
|
+
width?: number;
|
|
15
|
+
minWidth?: number;
|
|
16
|
+
sortable?: boolean;
|
|
17
|
+
resizable?: boolean;
|
|
18
|
+
align?: "start" | "end";
|
|
19
|
+
}
|
|
20
|
+
export interface TableRow {
|
|
21
|
+
id: string;
|
|
22
|
+
cells: readonly Child[];
|
|
23
|
+
/** Accessible name for the row checkbox when the table is selectable. */
|
|
24
|
+
label?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface TableProps extends Props {
|
|
28
|
+
label: string;
|
|
29
|
+
columns: readonly TableColumn[];
|
|
30
|
+
rows: MaybeSignal<readonly TableRow[]>;
|
|
31
|
+
sort?: MaybeSignal<TableSort | undefined>;
|
|
32
|
+
defaultSort?: TableSort;
|
|
33
|
+
onSortChange?: (sort: TableSort) => void;
|
|
34
|
+
selected?: MaybeSignal<readonly string[]>;
|
|
35
|
+
defaultSelected?: readonly string[];
|
|
36
|
+
onSelectedChange?: (ids: readonly string[]) => void;
|
|
37
|
+
selectable?: boolean;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
/** Data table. Sorting and selection are reported; row order and records stay with the caller. */
|
|
41
|
+
export declare const Table: import("meowjsx").Component<TableProps, "table", "body" | "cell" | "header" | "heading" | "resize" | "root" | "row" | "scroller" | "select" | "sort" | "table">;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { defineComponent, derived, h, keyed, unwrap, } from "meowjsx";
|
|
2
|
+
import { Checkbox } from "./checkbox.js";
|
|
3
|
+
import { Icon } from "../icons/icon.js";
|
|
4
|
+
export const tableContract = {
|
|
5
|
+
name: "table",
|
|
6
|
+
parts: [
|
|
7
|
+
"root",
|
|
8
|
+
"scroller",
|
|
9
|
+
"table",
|
|
10
|
+
"header",
|
|
11
|
+
"heading",
|
|
12
|
+
"sort",
|
|
13
|
+
"resize",
|
|
14
|
+
"body",
|
|
15
|
+
"row",
|
|
16
|
+
"cell",
|
|
17
|
+
"select",
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
const defaultMinWidth = 80;
|
|
21
|
+
function sortFor(column, current) {
|
|
22
|
+
if (!column.sortable)
|
|
23
|
+
return current;
|
|
24
|
+
if (current?.columnId !== column.id)
|
|
25
|
+
return { columnId: column.id, direction: "asc" };
|
|
26
|
+
return { columnId: column.id, direction: current.direction === "asc" ? "desc" : "asc" };
|
|
27
|
+
}
|
|
28
|
+
function ariaSort(column, current) {
|
|
29
|
+
if (!column.sortable)
|
|
30
|
+
return undefined;
|
|
31
|
+
if (current?.columnId !== column.id)
|
|
32
|
+
return "none";
|
|
33
|
+
return current.direction === "asc" ? "ascending" : "descending";
|
|
34
|
+
}
|
|
35
|
+
/** Data table. Sorting and selection are reported; row order and records stay with the caller. */
|
|
36
|
+
export const Table = defineComponent(tableContract, ({ label, columns, rows, sort, defaultSort, onSortChange, selected, defaultSelected = [], onSelectedChange, selectable = false, className, ...props }, context) => {
|
|
37
|
+
const localSort = context.signal(defaultSort);
|
|
38
|
+
const localSelected = context.signal(defaultSelected);
|
|
39
|
+
const rowsView = derived(() => unwrap(rows));
|
|
40
|
+
const sortState = derived(() => (sort === undefined ? localSort.value : unwrap(sort)));
|
|
41
|
+
const selectedState = derived(() => selected === undefined ? localSelected.value : unwrap(selected));
|
|
42
|
+
const widths = context.signal(Object.fromEntries(columns.flatMap((column) => column.width !== undefined ? [[column.id, column.width]] : [])));
|
|
43
|
+
const requestSort = (column) => {
|
|
44
|
+
const next = sortFor(column, sortState.value);
|
|
45
|
+
if (!next)
|
|
46
|
+
return;
|
|
47
|
+
if (sort === undefined)
|
|
48
|
+
localSort.value = next;
|
|
49
|
+
onSortChange?.(next);
|
|
50
|
+
};
|
|
51
|
+
const requestSelected = (ids) => {
|
|
52
|
+
if (selected === undefined)
|
|
53
|
+
localSelected.value = ids;
|
|
54
|
+
onSelectedChange?.(ids);
|
|
55
|
+
};
|
|
56
|
+
const toggleRow = (id, checked) => {
|
|
57
|
+
const next = new Set(selectedState.value);
|
|
58
|
+
if (checked)
|
|
59
|
+
next.add(id);
|
|
60
|
+
else
|
|
61
|
+
next.delete(id);
|
|
62
|
+
requestSelected([...next]);
|
|
63
|
+
};
|
|
64
|
+
const enabledIds = () => rowsView.value.filter((row) => !row.disabled).map((row) => row.id);
|
|
65
|
+
let resize;
|
|
66
|
+
const onResizeMove = (event) => {
|
|
67
|
+
if (!resize)
|
|
68
|
+
return;
|
|
69
|
+
const delta = event.clientX - resize.startX;
|
|
70
|
+
const next = Math.max(resize.minWidth, resize.startWidth + delta);
|
|
71
|
+
widths.value = { ...widths.value, [resize.id]: next };
|
|
72
|
+
};
|
|
73
|
+
const onResizeUp = (event) => {
|
|
74
|
+
if (!resize)
|
|
75
|
+
return;
|
|
76
|
+
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
77
|
+
resize = undefined;
|
|
78
|
+
};
|
|
79
|
+
const headerCell = (column) => {
|
|
80
|
+
const heading = column.sortable
|
|
81
|
+
? context.part("sort", "button", {
|
|
82
|
+
type: "button",
|
|
83
|
+
onClick: () => requestSort(column),
|
|
84
|
+
}, column.header, h("span", { hidden: derived(() => sortState.value?.columnId !== column.id || sortState.value.direction !== "asc") },
|
|
85
|
+
h(Icon, { name: "arrow-up", size: 12 })), h("span", { hidden: derived(() => sortState.value?.columnId !== column.id || sortState.value.direction !== "desc") },
|
|
86
|
+
h(Icon, { name: "arrow-down", size: 12 })))
|
|
87
|
+
: column.header;
|
|
88
|
+
return context.part("heading", "th", {
|
|
89
|
+
scope: "col",
|
|
90
|
+
"aria-sort": derived(() => ariaSort(column, sortState.value)),
|
|
91
|
+
"data-align": column.align,
|
|
92
|
+
style: derived(() => widths.value[column.id] !== undefined
|
|
93
|
+
? { width: `${widths.value[column.id]}px` }
|
|
94
|
+
: undefined),
|
|
95
|
+
}, heading, column.resizable === false
|
|
96
|
+
? null
|
|
97
|
+
: context.part("resize", "span", {
|
|
98
|
+
role: "separator",
|
|
99
|
+
"aria-orientation": "vertical",
|
|
100
|
+
"aria-label": "Resize column",
|
|
101
|
+
onPointerDown: (event) => {
|
|
102
|
+
if (event.button !== 0)
|
|
103
|
+
return;
|
|
104
|
+
event.preventDefault();
|
|
105
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
106
|
+
const startWidth = widths.value[column.id] ?? column.width ?? defaultMinWidth;
|
|
107
|
+
resize = {
|
|
108
|
+
id: column.id,
|
|
109
|
+
startX: event.clientX,
|
|
110
|
+
startWidth,
|
|
111
|
+
minWidth: column.minWidth ?? defaultMinWidth,
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
onPointerMove: onResizeMove,
|
|
115
|
+
onPointerUp: onResizeUp,
|
|
116
|
+
onPointerCancel: onResizeUp,
|
|
117
|
+
}));
|
|
118
|
+
};
|
|
119
|
+
return context.part("root", "div", { ...props, className }, context.part("scroller", "div", null, context.part("table", "table", { "aria-label": label }, context.part("header", "thead", null, context.part("row", "tr", null, selectable
|
|
120
|
+
? context.part("heading", "th", { scope: "col" }, context.part("select", "div", null, h(Checkbox, { label: "Select all rows", labelHidden: true, checked: derived(() => {
|
|
121
|
+
const enabled = enabledIds();
|
|
122
|
+
const chosen = selectedState.value;
|
|
123
|
+
return enabled.length > 0 && enabled.every((id) => chosen.includes(id));
|
|
124
|
+
}), indeterminate: derived(() => {
|
|
125
|
+
const enabled = enabledIds();
|
|
126
|
+
const count = enabled.filter((id) => selectedState.value.includes(id)).length;
|
|
127
|
+
return count > 0 && count < enabled.length;
|
|
128
|
+
}), onChange: (event) => {
|
|
129
|
+
const box = event.currentTarget;
|
|
130
|
+
requestSelected(box.checked ? enabledIds() : []);
|
|
131
|
+
} })))
|
|
132
|
+
: null, ...columns.map(headerCell))), context.part("body", "tbody", null, keyed(rowsView, (row) => row.id, (row) => context.part("row", "tr", {
|
|
133
|
+
"data-row-id": derived(() => row.value.id),
|
|
134
|
+
"data-selected": derived(() => selectedState.value.includes(row.value.id) ? "true" : undefined),
|
|
135
|
+
}, selectable
|
|
136
|
+
? context.part("cell", "td", { "data-table-select": "" }, context.part("select", "div", null, h(Checkbox, { label: derived(() => {
|
|
137
|
+
const current = row.value;
|
|
138
|
+
if (current.label)
|
|
139
|
+
return current.label;
|
|
140
|
+
const index = rowsView.value.findIndex((item) => item.id === current.id);
|
|
141
|
+
return `Select row ${index + 1}`;
|
|
142
|
+
}), labelHidden: true, disabled: derived(() => Boolean(row.value.disabled)), checked: derived(() => selectedState.value.includes(row.value.id)), onChange: (event) => {
|
|
143
|
+
toggleRow(row.value.id, event.currentTarget.checked);
|
|
144
|
+
} })))
|
|
145
|
+
: null, ...columns.map((column, index) => context.part("cell", "td", { "data-align": column.align }, derived(() => row.value.cells[index])))))))));
|
|
146
|
+
});
|
|
@@ -20,5 +20,5 @@ export interface TabsProps extends Props {
|
|
|
20
20
|
onValueChange?: (value: string) => void;
|
|
21
21
|
className?: string;
|
|
22
22
|
}
|
|
23
|
-
/** Horizontal tabs with automatic keyboard activation.
|
|
23
|
+
/** Horizontal tabs with automatic keyboard activation. Items are fixed for the mount, and panels stay mounted to preserve drafts. */
|
|
24
24
|
export declare const Tabs: import("meowjsx").Component<TabsProps, "tabs", "indicator" | "list" | "panel" | "root" | "tab">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, unwrap, } from "meowjsx";
|
|
1
|
+
import { defineComponent, derived, unwrap, } from "meowjsx";
|
|
2
2
|
import { tokenRef } from "meowcss";
|
|
3
3
|
export const tabsCount = tokenRef("tabs", "count");
|
|
4
4
|
export const tabsIndex = tokenRef("tabs", "index");
|
|
@@ -6,31 +6,22 @@ export const tabsContract = {
|
|
|
6
6
|
name: "tabs",
|
|
7
7
|
parts: ["root", "list", "indicator", "tab", "panel"],
|
|
8
8
|
};
|
|
9
|
-
/** Horizontal tabs with automatic keyboard activation.
|
|
9
|
+
/** Horizontal tabs with automatic keyboard activation. Items are fixed for the mount, and panels stay mounted to preserve drafts. */
|
|
10
10
|
export const Tabs = defineComponent(tabsContract, ({ id, label, items, value, defaultValue, onValueChange, className, ...props }, context) => {
|
|
11
11
|
const enabled = items.flatMap((item, index) => (item.disabled ? [] : [index]));
|
|
12
12
|
const local = context.signal(defaultValue ?? items[enabled[0] ?? -1]?.value ?? "");
|
|
13
13
|
const focus = context.signal(enabled[0] ?? -1);
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
14
|
+
const current = value !== undefined ? value : local;
|
|
15
|
+
const activeIndex = derived(() => items.findIndex((item) => item.value === unwrap(current) && !item.disabled));
|
|
16
|
+
const indicatorIndex = derived(() => Math.max(0, activeIndex.value));
|
|
17
|
+
const indicatorHidden = derived(() => activeIndex.value < 0);
|
|
18
|
+
const selected = items.map((_, index) => derived(() => String(index === activeIndex.value)));
|
|
19
|
+
const hidden = items.map((_, index) => derived(() => index !== activeIndex.value));
|
|
20
|
+
const tabIndex = items.map((_, index) => derived(() => (index === focus.value ? 0 : -1)));
|
|
21
|
+
// Arrow keys set focus themselves. A host-driven value still moves the roving tabindex.
|
|
19
22
|
context.effect(() => {
|
|
20
|
-
const
|
|
21
|
-
const active = items.findIndex((item) => item.value === current && !item.disabled);
|
|
22
|
-
indicatorIndex.value = Math.max(0, active);
|
|
23
|
-
indicatorHidden.value = active < 0;
|
|
23
|
+
const active = activeIndex.value;
|
|
24
24
|
focus.value = active >= 0 ? active : (enabled[0] ?? -1);
|
|
25
|
-
for (const [index] of items.entries()) {
|
|
26
|
-
selected[index].value = String(index === active);
|
|
27
|
-
hidden[index].value = index !== active;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
context.effect(() => {
|
|
31
|
-
const focused = focus.value;
|
|
32
|
-
for (const [index] of items.entries())
|
|
33
|
-
tabIndex[index].value = index === focused ? 0 : -1;
|
|
34
25
|
});
|
|
35
26
|
const choose = (index) => {
|
|
36
27
|
const item = items[index];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createContext, useContext, h, unwrap, } from "meowjsx";
|
|
1
|
+
import { defineComponent, derived, createContext, useContext, h, unwrap, } from "meowjsx";
|
|
2
2
|
const ShimmerContent = createContext(false);
|
|
3
3
|
export const textShimmerContract = {
|
|
4
4
|
name: "text-shimmer",
|
|
@@ -9,9 +9,6 @@ export const TextShimmer = defineComponent(textShimmerContract, ({ text, childre
|
|
|
9
9
|
const content = text ?? children;
|
|
10
10
|
if (useContext(ShimmerContent))
|
|
11
11
|
return context.part("content", "span", { ...props, className }, content);
|
|
12
|
-
const activity =
|
|
13
|
-
context.effect(() => {
|
|
14
|
-
activity.value = String(unwrap(active));
|
|
15
|
-
});
|
|
12
|
+
const activity = derived(() => String(unwrap(active)));
|
|
16
13
|
return context.part("root", "span", { ...props, className, "data-active": activity }, context.part("content", "span", { className: contentClassName }, h(ShimmerContent.Provider, { value: true }, content)), context.part("decoration", "span", { "aria-hidden": "true", inert: true }, context.part("content", "span", { className: contentClassName }, h(ShimmerContent.Provider, { value: true }, content))));
|
|
17
14
|
});
|
|
@@ -5,10 +5,10 @@ import { appBarContract } from "../components/app-bar.js";
|
|
|
5
5
|
import { regionLayoutContract } from "../components/region-layout.js";
|
|
6
6
|
import { imagePreviewContract } from "../components/image-preview.js";
|
|
7
7
|
import { segmentedControlContract, textShimmerContract, riskConfirmationContract, webBlockContract, jsonTreeContract, jsonBlockContract, imageLightboxContract, shortcutKeysContract, pathLabelContract, stateDotContract, hoverCardContract } from "../components/index.js";
|
|
8
|
-
import { menuContract, toastContract } from "../components/index.js";
|
|
8
|
+
import { menuContract, toastContract, contextMenuContract } from "../components/index.js";
|
|
9
9
|
import { outputBlockContract } from "../components/output-block.js";
|
|
10
10
|
import { terminalBlockContract, readBlockContract, diffBlockContract, searchBlockContract } from "../components/index.js";
|
|
11
|
-
import { codeBlockContract, itemContract, fieldGroupContract, tabsContract, breadcrumbContract, alertContract, skeletonBoundaryContract, spinnerContract, descriptionListContract, descriptionItemContract, tooltipContract, buttonContract, dialogHeaderContract, dialogPanelContract, emptyStateContract, fieldContract, iconButtonContract, toolbarContract, actionRailContract, metaRowContract, checkboxContract, switchContract, choiceSelectContract, choiceGroupContract, popoverContract, searchInputContract, pathPickerContract, disclosureContract, navItemContract, statusDotContract, statusContract, tagContract, processGroupContract, processStepContract, workCardContract, iconRailContract, railItemContract, railSectionContract, detailSectionContract, timelineContract, timelineItemContract, resourceLinkContract, pageHeaderContract, windowTitleBarContract, listGroupContract, listRowContract, resourceCardContract, drawerContract } from "../components/index.js";
|
|
11
|
+
import { codeBlockContract, itemContract, fieldGroupContract, tabsContract, breadcrumbContract, alertContract, skeletonBoundaryContract, spinnerContract, descriptionListContract, descriptionItemContract, tooltipContract, buttonContract, dialogHeaderContract, dialogPanelContract, emptyStateContract, fieldContract, iconButtonContract, toolbarContract, actionRailContract, metaRowContract, numberInputContract, checkboxContract, switchContract, sliderContract, progressContract, avatarContract, linkContract, accordionContract, tableContract, choiceSelectContract, choiceGroupContract, popoverContract, searchInputContract, pathPickerContract, disclosureContract, navItemContract, statusDotContract, statusContract, tagContract, processGroupContract, processStepContract, workCardContract, iconRailContract, railItemContract, railSectionContract, detailSectionContract, timelineContract, timelineItemContract, resourceLinkContract, pageHeaderContract, windowTitleBarContract, listGroupContract, listRowContract, resourceCardContract, drawerContract } from "../components/index.js";
|
|
12
12
|
import { assistantViewContract, chatBubbleContract, chatConversationContract, chatAttachmentsContract, chatProcessContract, chatQuestionContract, chatSourcesContract, chatComposerContract, composerPanelContract, chatHeaderContract, chatMessageContract, chatMessageListContract, chatStatusContract, chatToolCallContract } from "../chat/index.js";
|
|
13
13
|
import { assistantStepsContract } from "../chat/assistant-content.js";
|
|
14
14
|
import { assistantMarkdownContract } from "../chat/assistant-markdown.js";
|
|
@@ -32,6 +32,7 @@ export declare const MeowUIComponent: {
|
|
|
32
32
|
readonly StateDot: "state-dot";
|
|
33
33
|
readonly HoverCard: "hover-card";
|
|
34
34
|
readonly Menu: "menu";
|
|
35
|
+
readonly ContextMenu: "context-menu";
|
|
35
36
|
readonly Toast: "toast";
|
|
36
37
|
readonly TerminalBlock: "terminal-block";
|
|
37
38
|
readonly ReadBlock: "read-block";
|
|
@@ -70,8 +71,13 @@ export declare const MeowUIComponent: {
|
|
|
70
71
|
readonly Card: "card";
|
|
71
72
|
readonly Badge: "badge";
|
|
72
73
|
readonly Input: "input";
|
|
74
|
+
readonly NumberInput: "number-input";
|
|
73
75
|
readonly Checkbox: "checkbox";
|
|
74
76
|
readonly Switch: "switch";
|
|
77
|
+
readonly Slider: "slider";
|
|
78
|
+
readonly Progress: "progress";
|
|
79
|
+
readonly Avatar: "avatar";
|
|
80
|
+
readonly Link: "link";
|
|
75
81
|
readonly Select: "select";
|
|
76
82
|
readonly ChoiceSelect: "choice-select";
|
|
77
83
|
readonly ChoiceGroup: "choice-group";
|
|
@@ -79,6 +85,8 @@ export declare const MeowUIComponent: {
|
|
|
79
85
|
readonly SearchInput: "search-input";
|
|
80
86
|
readonly PathPicker: "path-picker";
|
|
81
87
|
readonly Disclosure: "disclosure";
|
|
88
|
+
readonly Accordion: "accordion";
|
|
89
|
+
readonly Table: "table";
|
|
82
90
|
readonly Textarea: "textarea";
|
|
83
91
|
readonly Field: "field";
|
|
84
92
|
readonly Separator: "separator";
|
|
@@ -179,6 +187,9 @@ export declare const meowUIComponents: readonly [{
|
|
|
179
187
|
}, {
|
|
180
188
|
readonly name: "menu";
|
|
181
189
|
readonly parts: readonly ["root", "item", "icon", "label", "shortcut", "group", "heading", "separator", "branch"];
|
|
190
|
+
}, {
|
|
191
|
+
readonly name: "context-menu";
|
|
192
|
+
readonly parts: readonly ["root"];
|
|
182
193
|
}, {
|
|
183
194
|
readonly name: "toast";
|
|
184
195
|
readonly parts: readonly ["root", "icon", "message", "actions"];
|
|
@@ -203,6 +214,30 @@ export declare const meowUIComponents: readonly [{
|
|
|
203
214
|
}, {
|
|
204
215
|
readonly name: "switch";
|
|
205
216
|
readonly parts: readonly ["root", "input", "track", "thumb", "label"];
|
|
217
|
+
}, {
|
|
218
|
+
readonly name: "slider";
|
|
219
|
+
readonly parts: readonly ["root", "control", "track", "thumb", "value"];
|
|
220
|
+
}, {
|
|
221
|
+
readonly name: "progress";
|
|
222
|
+
readonly parts: readonly ["root", "bar"];
|
|
223
|
+
}, {
|
|
224
|
+
readonly name: "avatar";
|
|
225
|
+
readonly parts: readonly ["root", "image", "initials"];
|
|
226
|
+
readonly styleProps: import("meowcss/meowjsx").StylePropsBinding<import("meowcss").Options<{
|
|
227
|
+
readonly size: readonly ["small", "default", "large"];
|
|
228
|
+
}>>;
|
|
229
|
+
}, {
|
|
230
|
+
readonly name: "link";
|
|
231
|
+
readonly parts: readonly ["root"];
|
|
232
|
+
}, {
|
|
233
|
+
readonly name: "accordion";
|
|
234
|
+
readonly parts: readonly ["root", "item"];
|
|
235
|
+
}, {
|
|
236
|
+
readonly name: "table";
|
|
237
|
+
readonly parts: readonly ["root", "scroller", "table", "header", "heading", "sort", "resize", "body", "row", "cell", "select"];
|
|
238
|
+
}, {
|
|
239
|
+
readonly name: "number-input";
|
|
240
|
+
readonly parts: readonly ["root", "decrement", "control", "increment"];
|
|
206
241
|
}, {
|
|
207
242
|
readonly name: "code-block";
|
|
208
243
|
readonly parts: readonly ["root", "header", "language", "actions", "content", "code", "feedback"];
|
|
@@ -457,7 +492,7 @@ export declare const meowUIComponents: readonly [{
|
|
|
457
492
|
readonly parts: readonly ["root"];
|
|
458
493
|
}, {
|
|
459
494
|
readonly name: "chat-composer";
|
|
460
|
-
readonly parts: readonly ["root", "attachments", "field", "input", "hint", "actions", "trailing", "submit"];
|
|
495
|
+
readonly parts: readonly ["root", "surface", "attachments", "field", "input", "hint", "actions", "trailing", "submit"];
|
|
461
496
|
readonly styleProps: import("meowcss/meowjsx").StylePropsBinding<import("meowcss").Options<{
|
|
462
497
|
readonly layout: readonly ["stacked", "inline", "hero"];
|
|
463
498
|
readonly surface: readonly ["default", "none"];
|
|
@@ -589,6 +624,9 @@ declare module "meowjsx" {
|
|
|
589
624
|
menu: {
|
|
590
625
|
parts: (typeof menuContract.parts)[number];
|
|
591
626
|
};
|
|
627
|
+
"context-menu": {
|
|
628
|
+
parts: (typeof contextMenuContract.parts)[number];
|
|
629
|
+
};
|
|
592
630
|
toast: {
|
|
593
631
|
parts: (typeof toastContract.parts)[number];
|
|
594
632
|
};
|
|
@@ -706,12 +744,27 @@ declare module "meowjsx" {
|
|
|
706
744
|
input: {
|
|
707
745
|
parts: "root";
|
|
708
746
|
};
|
|
747
|
+
"number-input": {
|
|
748
|
+
parts: (typeof numberInputContract.parts)[number];
|
|
749
|
+
};
|
|
709
750
|
checkbox: {
|
|
710
751
|
parts: (typeof checkboxContract.parts)[number];
|
|
711
752
|
};
|
|
712
753
|
switch: {
|
|
713
754
|
parts: (typeof switchContract.parts)[number];
|
|
714
755
|
};
|
|
756
|
+
slider: {
|
|
757
|
+
parts: (typeof sliderContract.parts)[number];
|
|
758
|
+
};
|
|
759
|
+
progress: {
|
|
760
|
+
parts: (typeof progressContract.parts)[number];
|
|
761
|
+
};
|
|
762
|
+
avatar: {
|
|
763
|
+
parts: (typeof avatarContract.parts)[number];
|
|
764
|
+
};
|
|
765
|
+
link: {
|
|
766
|
+
parts: (typeof linkContract.parts)[number];
|
|
767
|
+
};
|
|
715
768
|
select: {
|
|
716
769
|
parts: "root";
|
|
717
770
|
};
|
|
@@ -733,6 +786,12 @@ declare module "meowjsx" {
|
|
|
733
786
|
disclosure: {
|
|
734
787
|
parts: (typeof disclosureContract.parts)[number];
|
|
735
788
|
};
|
|
789
|
+
accordion: {
|
|
790
|
+
parts: (typeof accordionContract.parts)[number];
|
|
791
|
+
};
|
|
792
|
+
table: {
|
|
793
|
+
parts: (typeof tableContract.parts)[number];
|
|
794
|
+
};
|
|
736
795
|
textarea: {
|
|
737
796
|
parts: "root";
|
|
738
797
|
};
|
|
@@ -7,10 +7,10 @@ import { regionLayoutContract } from "../components/region-layout.js";
|
|
|
7
7
|
import { imagePreviewContract } from "../components/image-preview.js";
|
|
8
8
|
import { createStylePropsPlugin } from "meowcss/meowjsx";
|
|
9
9
|
import { segmentedControlContract, textShimmerContract, riskConfirmationContract, webBlockContract, jsonTreeContract, jsonBlockContract, imageLightboxContract, shortcutKeysContract, pathLabelContract, stateDotContract, hoverCardContract, } from "../components/index.js";
|
|
10
|
-
import { menuContract, toastContract } from "../components/index.js";
|
|
10
|
+
import { menuContract, toastContract, contextMenuContract } from "../components/index.js";
|
|
11
11
|
import { outputBlockContract } from "../components/output-block.js";
|
|
12
12
|
import { terminalBlockContract, readBlockContract, diffBlockContract, searchBlockContract, } from "../components/index.js";
|
|
13
|
-
import { codeBlockContract, itemContract, fieldGroupContract, tabsContract, breadcrumbContract, alertContract, skeletonContract, skeletonBoundaryContract, spinnerContract, stackContract, layoutItemContract, descriptionListContract, descriptionItemContract, inlineContract, gridContract, containerContract, cardHeaderContract, cardTitleContract, cardDescriptionContract, cardContentContract, cardFooterContract, cardActionContract, aspectRatioContract, tooltipContract, badgeContract, buttonContract, cardContract, dialogActionsContract, dialogContract, dialogHeaderContract, dialogPanelContract, emptyStateContract, fieldContract, iconButtonContract, toolbarContract, actionRailContract, metaRowContract, inputContract, checkboxContract, switchContract, selectContract, choiceSelectContract, choiceGroupContract, popoverContract, searchInputContract, pathPickerContract, disclosureContract, navItemContract, separatorContract, textareaContract, statusDotContract, statusContract, tagContract, processGroupContract, processStepContract, workCardContract, iconRailContract, railItemContract, railSectionContract, detailSectionContract, timelineContract, timelineItemContract, resourceLinkContract, pageHeaderContract, windowTitleBarContract, listGroupContract, listRowContract, resourceCardContract, drawerContract, } from "../components/index.js";
|
|
13
|
+
import { codeBlockContract, itemContract, fieldGroupContract, tabsContract, breadcrumbContract, alertContract, skeletonContract, skeletonBoundaryContract, spinnerContract, stackContract, layoutItemContract, descriptionListContract, descriptionItemContract, inlineContract, gridContract, containerContract, cardHeaderContract, cardTitleContract, cardDescriptionContract, cardContentContract, cardFooterContract, cardActionContract, aspectRatioContract, tooltipContract, badgeContract, buttonContract, cardContract, dialogActionsContract, dialogContract, dialogHeaderContract, dialogPanelContract, emptyStateContract, fieldContract, iconButtonContract, toolbarContract, actionRailContract, metaRowContract, inputContract, numberInputContract, checkboxContract, switchContract, sliderContract, progressContract, avatarContract, linkContract, accordionContract, tableContract, selectContract, choiceSelectContract, choiceGroupContract, popoverContract, searchInputContract, pathPickerContract, disclosureContract, navItemContract, separatorContract, textareaContract, statusDotContract, statusContract, tagContract, processGroupContract, processStepContract, workCardContract, iconRailContract, railItemContract, railSectionContract, detailSectionContract, timelineContract, timelineItemContract, resourceLinkContract, pageHeaderContract, windowTitleBarContract, listGroupContract, listRowContract, resourceCardContract, drawerContract, } from "../components/index.js";
|
|
14
14
|
import { assistantViewContract, chatBubbleContract, chatConversationContract, chatAttachmentsContract, chatProcessContract, chatQuestionContract, chatSourcesContract, chatComposerContract, composerPanelContract, chatFrameContract, chatHeaderContract, chatMessageActionsContract, chatMessageContract, chatMessageListContract, chatStatusContract, chatToolCallContract, } from "../chat/index.js";
|
|
15
15
|
import { assistantStepsContract } from "../chat/assistant-content.js";
|
|
16
16
|
import { assistantMarkdownContract } from "../chat/assistant-markdown.js";
|
|
@@ -34,6 +34,7 @@ export const MeowUIComponent = {
|
|
|
34
34
|
StateDot: stateDotContract.name,
|
|
35
35
|
HoverCard: hoverCardContract.name,
|
|
36
36
|
Menu: menuContract.name,
|
|
37
|
+
ContextMenu: contextMenuContract.name,
|
|
37
38
|
Toast: toastContract.name,
|
|
38
39
|
TerminalBlock: terminalBlockContract.name,
|
|
39
40
|
ReadBlock: readBlockContract.name,
|
|
@@ -72,8 +73,13 @@ export const MeowUIComponent = {
|
|
|
72
73
|
Card: cardContract.name,
|
|
73
74
|
Badge: badgeContract.name,
|
|
74
75
|
Input: inputContract.name,
|
|
76
|
+
NumberInput: numberInputContract.name,
|
|
75
77
|
Checkbox: checkboxContract.name,
|
|
76
78
|
Switch: switchContract.name,
|
|
79
|
+
Slider: sliderContract.name,
|
|
80
|
+
Progress: progressContract.name,
|
|
81
|
+
Avatar: avatarContract.name,
|
|
82
|
+
Link: linkContract.name,
|
|
77
83
|
Select: selectContract.name,
|
|
78
84
|
ChoiceSelect: choiceSelectContract.name,
|
|
79
85
|
ChoiceGroup: choiceGroupContract.name,
|
|
@@ -81,6 +87,8 @@ export const MeowUIComponent = {
|
|
|
81
87
|
SearchInput: searchInputContract.name,
|
|
82
88
|
PathPicker: pathPickerContract.name,
|
|
83
89
|
Disclosure: disclosureContract.name,
|
|
90
|
+
Accordion: accordionContract.name,
|
|
91
|
+
Table: tableContract.name,
|
|
84
92
|
Textarea: textareaContract.name,
|
|
85
93
|
Field: fieldContract.name,
|
|
86
94
|
Separator: separatorContract.name,
|
|
@@ -144,6 +152,7 @@ export const meowUIComponents = [
|
|
|
144
152
|
stateDotContract,
|
|
145
153
|
hoverCardContract,
|
|
146
154
|
menuContract,
|
|
155
|
+
contextMenuContract,
|
|
147
156
|
toastContract,
|
|
148
157
|
outputBlockContract,
|
|
149
158
|
terminalBlockContract,
|
|
@@ -152,6 +161,13 @@ export const meowUIComponents = [
|
|
|
152
161
|
searchBlockContract,
|
|
153
162
|
checkboxContract,
|
|
154
163
|
switchContract,
|
|
164
|
+
sliderContract,
|
|
165
|
+
progressContract,
|
|
166
|
+
avatarContract,
|
|
167
|
+
linkContract,
|
|
168
|
+
accordionContract,
|
|
169
|
+
tableContract,
|
|
170
|
+
numberInputContract,
|
|
155
171
|
codeBlockContract,
|
|
156
172
|
choiceGroupContract,
|
|
157
173
|
chatQuestionContract,
|
|
@@ -13,6 +13,9 @@ export const composerPanelStyles = css `
|
|
|
13
13
|
}
|
|
14
14
|
${partSelector(composerPanelContract, "surface")} {
|
|
15
15
|
min-width: 0;
|
|
16
|
+
}
|
|
17
|
+
${partSelector(composerPanelContract, "surface")}[data-meowui-part] > ${partSelector(chatComposerContract, "root")} > ${partSelector(chatComposerContract, "surface")} {
|
|
18
|
+
min-width: 0;
|
|
16
19
|
padding: 12px 14px 10px;
|
|
17
20
|
border: 1px solid ${uiTokens.borderSoft};
|
|
18
21
|
border-radius: 24px;
|
|
@@ -20,7 +23,7 @@ export const composerPanelStyles = css `
|
|
|
20
23
|
box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
|
|
21
24
|
transition: border-color ${uiTokens.durationResponse} ${uiTokens.ease};
|
|
22
25
|
}
|
|
23
|
-
${partSelector(composerPanelContract, "surface")}:focus-within {
|
|
26
|
+
${partSelector(composerPanelContract, "surface")}[data-meowui-part] > ${partSelector(chatComposerContract, "root")} > ${partSelector(chatComposerContract, "surface")}:focus-within {
|
|
24
27
|
border-color: ${uiTokens.border};
|
|
25
28
|
}
|
|
26
29
|
${partSelector(composerPanelContract, "meta")} {
|