@moldable-ai/ui 0.2.20 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog/catalog-coverage.d.ts +15 -0
- package/dist/catalog/catalog-coverage.d.ts.map +1 -0
- package/dist/catalog/catalog-coverage.js +44 -0
- package/dist/catalog/catalog-manifest.d.ts.map +1 -1
- package/dist/catalog/catalog-manifest.js +35 -23
- package/dist/catalog/catalog-types.d.ts +10 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -1
- package/dist/catalog/catalog-types.js +6 -0
- package/dist/catalog/component-catalog.d.ts.map +1 -1
- package/dist/catalog/component-catalog.js +16 -6
- package/dist/catalog/core-catalog-exclusions.d.ts +8 -0
- package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -0
- package/dist/catalog/core-catalog-exclusions.js +151 -0
- package/dist/catalog/core-catalog.d.ts +0 -4
- package/dist/catalog/core-catalog.d.ts.map +1 -1
- package/dist/catalog/core-catalog.js +12 -98
- package/dist/catalog/core-collection-stories.d.ts +3 -0
- package/dist/catalog/core-collection-stories.d.ts.map +1 -0
- package/dist/catalog/core-collection-stories.js +42 -0
- package/dist/catalog/core-control-stories.d.ts +3 -0
- package/dist/catalog/core-control-stories.d.ts.map +1 -0
- package/dist/catalog/core-control-stories.js +94 -0
- package/dist/catalog/core-feedback-stories.d.ts +3 -0
- package/dist/catalog/core-feedback-stories.d.ts.map +1 -0
- package/dist/catalog/core-feedback-stories.js +50 -0
- package/dist/catalog/core-foundation-stories.d.ts +3 -0
- package/dist/catalog/core-foundation-stories.d.ts.map +1 -0
- package/dist/catalog/core-foundation-stories.js +53 -0
- package/dist/catalog/core-navigation-stories.d.ts +3 -0
- package/dist/catalog/core-navigation-stories.d.ts.map +1 -0
- package/dist/catalog/core-navigation-stories.js +25 -0
- package/dist/catalog/core-overlay-stories.d.ts +3 -0
- package/dist/catalog/core-overlay-stories.d.ts.map +1 -0
- package/dist/catalog/core-overlay-stories.js +20 -0
- package/dist/catalog/index.d.ts +3 -1
- package/dist/catalog/index.d.ts.map +1 -1
- package/dist/catalog/index.js +3 -1
- package/dist/components/chat/chat-panel.d.ts +0 -1
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +7 -11
- package/dist/components/ui/alert-dialog.d.ts +7 -3
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +9 -5
- package/dist/components/ui/alert.d.ts +19 -3
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +25 -8
- package/dist/components/ui/app-frame.d.ts +9 -3
- package/dist/components/ui/app-frame.d.ts.map +1 -1
- package/dist/components/ui/app-frame.js +45 -6
- package/dist/components/ui/collapsible.d.ts +9 -1
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +13 -2
- package/dist/components/ui/collection-navigation.d.ts +8 -0
- package/dist/components/ui/collection-navigation.d.ts.map +1 -0
- package/dist/components/ui/collection-navigation.js +19 -0
- package/dist/components/ui/command.d.ts +5 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +13 -1
- package/dist/components/ui/confirm-dialog.d.ts +19 -0
- package/dist/components/ui/confirm-dialog.d.ts.map +1 -0
- package/dist/components/ui/confirm-dialog.js +45 -0
- package/dist/components/ui/date-picker.d.ts +24 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/date-picker.js +92 -0
- package/dist/components/ui/dialog.d.ts +4 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +8 -5
- package/dist/components/ui/empty.d.ts +7 -2
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +20 -7
- package/dist/components/ui/grid.d.ts.map +1 -1
- package/dist/components/ui/grid.js +70 -46
- package/dist/components/ui/index.d.ts +4 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +4 -0
- package/dist/components/ui/list.d.ts +5 -1
- package/dist/components/ui/list.d.ts.map +1 -1
- package/dist/components/ui/list.js +27 -16
- package/dist/components/ui/material.d.ts +34 -0
- package/dist/components/ui/material.d.ts.map +1 -0
- package/dist/components/ui/material.js +34 -0
- package/dist/components/ui/message-scroller-controller.d.ts +162 -0
- package/dist/components/ui/message-scroller-controller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-controller.js +888 -0
- package/dist/components/ui/message-scroller-policy.d.ts +74 -0
- package/dist/components/ui/message-scroller-policy.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-policy.js +129 -0
- package/dist/components/ui/message-scroller-primitive.d.ts +55 -0
- package/dist/components/ui/message-scroller-primitive.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-primitive.js +226 -0
- package/dist/components/ui/message-scroller.d.ts +2 -2
- package/dist/components/ui/message-scroller.d.ts.map +1 -1
- package/dist/components/ui/message-scroller.js +3 -15
- package/dist/components/ui/navigation-button-group.d.ts +16 -0
- package/dist/components/ui/navigation-button-group.d.ts.map +1 -0
- package/dist/components/ui/navigation-button-group.js +9 -0
- package/dist/components/ui/popover.d.ts +9 -2
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +13 -3
- package/dist/components/ui/scroll-area.d.ts +8 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +6 -3
- package/dist/components/ui/search-field.d.ts.map +1 -1
- package/dist/components/ui/segmented-control.d.ts.map +1 -1
- package/dist/components/ui/segmented-control.js +6 -5
- package/dist/components/ui/sheet.d.ts +4 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +12 -9
- package/dist/components/ui/sonner.d.ts +1 -1
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +7 -2
- package/dist/components/ui/toggle.d.ts +12 -4
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +13 -2
- package/dist/components/ui/toolbar.d.ts +9 -2
- package/dist/components/ui/toolbar.d.ts.map +1 -1
- package/dist/components/ui/toolbar.js +23 -4
- package/dist/components/ui/tooltip.d.ts +8 -3
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +11 -6
- package/dist/lib/frame-lifecycle.d.ts +1 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +3 -2
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +2 -1
- package/docs/README.md +3 -1
- package/docs/adaptive-materials.md +79 -0
- package/docs/app-anatomy.md +3 -1
- package/docs/component-catalog.md +26 -3
- package/docs/design-tokens.md +17 -4
- package/docs/foundations.md +5 -3
- package/docs/standalone-app-windows.md +8 -0
- package/package.json +1 -2
- package/src/components/ui/alert-dialog.md +31 -0
- package/src/components/ui/alert.md +28 -6
- package/src/components/ui/app-frame.md +5 -0
- package/src/components/ui/collapsible.md +52 -0
- package/src/components/ui/combobox.md +0 -1
- package/src/components/ui/command.md +54 -0
- package/src/components/ui/date-field.md +1 -1
- package/src/components/ui/date-picker.md +55 -0
- package/src/components/ui/dialog.md +40 -0
- package/src/components/ui/empty.md +8 -3
- package/src/components/ui/grid.md +8 -4
- package/src/components/ui/icon-button.md +2 -2
- package/src/components/ui/list.md +35 -2
- package/src/components/ui/material.md +51 -0
- package/src/components/ui/navigation-button-group.md +46 -0
- package/src/components/ui/popover.md +31 -0
- package/src/components/ui/scroll-area.md +11 -7
- package/src/components/ui/search-field.md +1 -1
- package/src/components/ui/segmented-control.md +2 -5
- package/src/components/ui/sheet.md +30 -0
- package/src/components/ui/table.md +4 -2
- package/src/components/ui/toggle-button.md +48 -0
- package/src/components/ui/toolbar.md +5 -0
- package/src/components/ui/tooltip.md +31 -0
- package/src/styles/index.css +213 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { FileTextIcon, MoreHorizontalIcon } from 'lucide-react';
|
|
3
|
+
import { Grid, GridItem, GridItemContent, GridItemDescription, GridItemTitle, } from '../components/ui/grid';
|
|
4
|
+
import { IconButton } from '../components/ui/icon-button';
|
|
5
|
+
import { Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemTitle, } from '../components/ui/item';
|
|
6
|
+
import { List, ListItem, ListItemContent, ListItemDescription, ListItemTitle, } from '../components/ui/list';
|
|
7
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '../components/ui/table';
|
|
8
|
+
export const coreCollectionsSection = {
|
|
9
|
+
id: 'collections',
|
|
10
|
+
title: 'Collections',
|
|
11
|
+
stories: [
|
|
12
|
+
{
|
|
13
|
+
id: 'selectable-list',
|
|
14
|
+
title: 'Selectable list',
|
|
15
|
+
components: ['list'],
|
|
16
|
+
viewports: ['narrow'],
|
|
17
|
+
interactions: ['rest', 'focus-visible', 'selected', 'disabled'],
|
|
18
|
+
render: ({ interaction }) => (_jsxs(List, { "aria-label": "Documents", selectionMode: "single", defaultSelectedValues: interaction === 'selected' ? ['brief'] : undefined, children: [_jsx(ListItem, { "data-catalog-target": true, value: "brief", autoFocus: interaction === 'focus-visible', children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Project brief" }), _jsx(ListItemDescription, { children: "Edited recently" })] }) }), _jsx(ListItem, { value: "archive", disabled: interaction === 'disabled', children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Archive" }), _jsx(ListItemDescription, { children: "Local documents" })] }) })] })),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'selectable-grid',
|
|
22
|
+
title: 'Selectable grid',
|
|
23
|
+
components: ['grid'],
|
|
24
|
+
interactions: ['rest', 'focus-visible', 'selected', 'disabled'],
|
|
25
|
+
render: ({ interaction, viewport }) => (_jsxs(Grid, { "aria-label": "Projects", columns: viewport === 'narrow' ? 1 : 2, selectionMode: "single", defaultSelectedValues: interaction === 'selected' ? ['personal'] : undefined, children: [_jsx(GridItem, { "data-catalog-target": true, value: "personal", autoFocus: interaction === 'focus-visible', children: _jsxs(GridItemContent, { children: [_jsx(GridItemTitle, { children: "Personal" }), _jsx(GridItemDescription, { children: "8 items" })] }) }), _jsx(GridItem, { value: "work", disabled: interaction === 'disabled', children: _jsxs(GridItemContent, { children: [_jsx(GridItemTitle, { children: "Work" }), _jsx(GridItemDescription, { children: "12 items" })] }) })] })),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'data-table',
|
|
29
|
+
title: 'Dense selectable table',
|
|
30
|
+
components: ['table'],
|
|
31
|
+
interactions: ['rest', 'focus-visible', 'selected', 'disabled', 'empty'],
|
|
32
|
+
render: ({ density, interaction }) => (_jsxs(Table, { density: density === 'compact' ? 'compact' : 'default', children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: "Name" }), _jsx(TableHead, { children: "Status" })] }) }), _jsx(TableBody, { children: interaction === 'empty' ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 2, className: "text-muted-foreground", children: "No projects" }) })) : (_jsxs(_Fragment, { children: [_jsxs(TableRow, { "data-catalog-target": true, selected: interaction === 'selected', disabled: interaction === 'disabled', autoFocus: interaction === 'focus-visible', children: [_jsx(TableCell, { children: "Personal" }), _jsx(TableCell, { children: "Active" })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Archive" }), _jsx(TableCell, { children: "Local" })] })] })) })] })),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'item-anatomy',
|
|
36
|
+
title: 'Item anatomy',
|
|
37
|
+
components: ['item'],
|
|
38
|
+
viewports: ['narrow'],
|
|
39
|
+
render: () => (_jsx(ItemGroup, { children: _jsxs(Item, { size: "sm", variant: "outline", children: [_jsx(ItemMedia, { variant: "icon", children: _jsx(FileTextIcon, {}) }), _jsxs(ItemContent, { children: [_jsx(ItemTitle, { children: "Project brief" }), _jsx(ItemDescription, { children: "Edited five minutes ago" })] }), _jsx(ItemActions, { children: _jsx(IconButton, { label: "More actions", size: "sm", variant: "ghost", children: _jsx(MoreHorizontalIcon, {}) }) })] }) })),
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-control-stories.d.ts","sourceRoot":"","sources":["../../src/catalog/core-control-stories.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAM/D,eAAO,MAAM,mBAAmB,EAAE,wBAkPjC,CAAA"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BoldIcon, ItalicIcon, PlusIcon } from 'lucide-react';
|
|
3
|
+
import { Button } from '../components/ui/button';
|
|
4
|
+
import { ButtonGroup, ButtonGroupText } from '../components/ui/button-group';
|
|
5
|
+
import { Checkbox } from '../components/ui/checkbox';
|
|
6
|
+
import { ColorWell } from '../components/ui/color-well';
|
|
7
|
+
import { DateField } from '../components/ui/date-field';
|
|
8
|
+
import { Field, FieldContent, FieldDescription, FieldLabel, } from '../components/ui/field';
|
|
9
|
+
import { IconButton } from '../components/ui/icon-button';
|
|
10
|
+
import { Input } from '../components/ui/input';
|
|
11
|
+
import { Kbd, KbdGroup } from '../components/ui/kbd';
|
|
12
|
+
import { NumberInput } from '../components/ui/number-input';
|
|
13
|
+
import { RadioGroup, RadioGroupItem } from '../components/ui/radio-group';
|
|
14
|
+
import { SearchField } from '../components/ui/search-field';
|
|
15
|
+
import { SegmentedControl, SegmentedControlItem, } from '../components/ui/segmented-control';
|
|
16
|
+
import { Switch } from '../components/ui/switch';
|
|
17
|
+
import { Textarea } from '../components/ui/textarea';
|
|
18
|
+
import { ToggleButton } from '../components/ui/toggle';
|
|
19
|
+
import { ToggleGroup, ToggleGroupItem } from '../components/ui/toggle-group';
|
|
20
|
+
function controlId(caseId, suffix) {
|
|
21
|
+
return `catalog-${caseId.replaceAll('/', '-')}-${suffix}`;
|
|
22
|
+
}
|
|
23
|
+
export const coreControlsSection = {
|
|
24
|
+
id: 'controls',
|
|
25
|
+
title: 'Controls',
|
|
26
|
+
stories: [
|
|
27
|
+
{
|
|
28
|
+
id: 'button',
|
|
29
|
+
title: 'Button',
|
|
30
|
+
components: ['button'],
|
|
31
|
+
interactions: ['rest', 'focus-visible', 'disabled'],
|
|
32
|
+
render: ({ interaction }) => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Button, { "data-catalog-target": true, autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', children: "Continue" }), _jsx(Button, { variant: "outline", disabled: interaction === 'disabled', children: "Cancel" })] })),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'icon-button',
|
|
36
|
+
title: 'Icon button',
|
|
37
|
+
components: ['icon-button'],
|
|
38
|
+
interactions: ['rest', 'focus-visible', 'disabled', 'loading'],
|
|
39
|
+
render: ({ interaction }) => (_jsx(IconButton, { "data-catalog-target": true, label: "New item", autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', loading: interaction === 'loading', variant: "ghost", children: _jsx(PlusIcon, {}) })),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'segmented-control',
|
|
43
|
+
title: 'Segmented control',
|
|
44
|
+
components: ['segmented-control'],
|
|
45
|
+
interactions: ['rest', 'focus-visible', 'disabled'],
|
|
46
|
+
render: ({ interaction }) => (_jsxs(SegmentedControl, { "aria-label": "Calendar view", defaultValue: "month", disabled: interaction === 'disabled', children: [_jsx(SegmentedControlItem, { "data-catalog-target": true, value: "week", autoFocus: interaction === 'focus-visible', children: "Week" }), _jsx(SegmentedControlItem, { value: "month", children: "Month" })] })),
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'text-field',
|
|
50
|
+
title: 'Text field',
|
|
51
|
+
components: ['field', 'input'],
|
|
52
|
+
interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
|
|
53
|
+
render: ({ caseId, interaction }) => {
|
|
54
|
+
const id = controlId(caseId, 'project-name');
|
|
55
|
+
return (_jsxs(Field, { "data-invalid": interaction === 'invalid' || undefined, children: [_jsx(FieldLabel, { htmlFor: id, children: "Project name" }), _jsxs(FieldContent, { children: [_jsx(Input, { "data-catalog-target": true, id: id, defaultValue: "Personal dashboard", autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined }), _jsx(FieldDescription, { children: "Shown in the titlebar." })] })] }));
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'search-and-date-fields',
|
|
60
|
+
title: 'Search and date fields',
|
|
61
|
+
components: ['date-field', 'search-field'],
|
|
62
|
+
interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
|
|
63
|
+
render: ({ interaction }) => (_jsxs("div", { className: "grid max-w-sm gap-2", children: [_jsx(SearchField, { "data-catalog-target": true, "aria-label": "Search events", placeholder: "Search", defaultValue: interaction === 'rest' ? 'Planning' : '', autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined }), _jsx(DateField, { "aria-label": "Due date", defaultValue: "2026-07-26", disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined })] })),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'choice-controls',
|
|
67
|
+
title: 'Choice controls',
|
|
68
|
+
components: ['checkbox', 'radio-group', 'switch'],
|
|
69
|
+
interactions: ['rest', 'selected', 'disabled', 'invalid'],
|
|
70
|
+
render: ({ caseId, interaction }) => {
|
|
71
|
+
const selected = interaction === 'selected';
|
|
72
|
+
const disabled = interaction === 'disabled';
|
|
73
|
+
const invalid = interaction === 'invalid' || undefined;
|
|
74
|
+
const checkboxId = controlId(caseId, 'notifications');
|
|
75
|
+
const switchId = controlId(caseId, 'sync');
|
|
76
|
+
return (_jsxs("div", { className: "grid gap-3 text-sm", children: [_jsxs("label", { className: "flex items-center gap-2", htmlFor: checkboxId, children: [_jsx(Checkbox, { "data-catalog-target": true, id: checkboxId, defaultChecked: selected, disabled: disabled, "aria-invalid": invalid }), "Notifications"] }), _jsxs("label", { className: "flex items-center gap-2", htmlFor: switchId, children: [_jsx(Switch, { id: switchId, defaultChecked: selected, disabled: disabled, "aria-invalid": invalid }), "Sync automatically"] }), _jsxs(RadioGroup, { "aria-label": "Priority", defaultValue: selected ? 'high' : 'normal', disabled: disabled, children: [_jsxs("label", { className: "flex items-center gap-2", children: [_jsx(RadioGroupItem, { value: "normal", "aria-invalid": invalid }), "Normal priority"] }), _jsxs("label", { className: "flex items-center gap-2", children: [_jsx(RadioGroupItem, { value: "high", "aria-invalid": invalid }), "High priority"] })] })] }));
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'format-controls',
|
|
81
|
+
title: 'Toggle and grouped controls',
|
|
82
|
+
components: ['button-group', 'kbd', 'toggle', 'toggle-group'],
|
|
83
|
+
interactions: ['rest', 'selected', 'disabled'],
|
|
84
|
+
render: ({ interaction }) => (_jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [_jsx(ToggleButton, { "data-catalog-target": true, iconOnly: true, "aria-label": "Bold", defaultPressed: interaction === 'selected', disabled: interaction === 'disabled', children: _jsx(BoldIcon, {}) }), _jsxs(ToggleGroup, { type: "multiple", variant: "outline", defaultValue: interaction === 'selected' ? ['italic'] : [], disabled: interaction === 'disabled', "aria-label": "Formatting", children: [_jsx(ToggleGroupItem, { value: "bold", children: "Bold" }), _jsxs(ToggleGroupItem, { value: "italic", children: [_jsx(ItalicIcon, {}), "Italic"] })] }), _jsxs(ButtonGroup, { children: [_jsx(ButtonGroupText, { children: _jsxs(KbdGroup, { children: [_jsx(Kbd, { children: "\u2318" }), _jsx(Kbd, { children: "K" })] }) }), _jsx(Button, { variant: "outline", disabled: interaction === 'disabled', children: "Commands" })] })] })),
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'value-fields',
|
|
88
|
+
title: 'Value and long-form fields',
|
|
89
|
+
components: ['color-well', 'number-input', 'textarea'],
|
|
90
|
+
interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
|
|
91
|
+
render: ({ interaction }) => (_jsxs("div", { className: "grid max-w-sm gap-3", children: [_jsx(Textarea, { "data-catalog-target": true, "aria-label": "Notes", defaultValue: "Keep the interface quiet and direct.", autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(NumberInput, { "aria-label": "Duration", defaultValue: 25, unit: "min", disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined, className: "w-32" }), _jsx(ColorWell, { "aria-label": "Accent color", value: "#ff6b4a", disabled: interaction === 'disabled' })] })] })),
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-feedback-stories.d.ts","sourceRoot":"","sources":["../../src/catalog/core-feedback-stories.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAE/D,eAAO,MAAM,mBAAmB,EAAE,wBAsFjC,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CircleAlertIcon, InboxIcon } from 'lucide-react';
|
|
3
|
+
import { Alert, AlertDescription, AlertTitle } from '../components/ui/alert';
|
|
4
|
+
import { Avatar, AvatarBadge, AvatarFallback } from '../components/ui/avatar';
|
|
5
|
+
import { Badge } from '../components/ui/badge';
|
|
6
|
+
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, } from '../components/ui/empty';
|
|
7
|
+
import { NotificationDot } from '../components/ui/notification-dot';
|
|
8
|
+
import { Progress } from '../components/ui/progress';
|
|
9
|
+
import { Skeleton } from '../components/ui/skeleton';
|
|
10
|
+
import { Spinner } from '../components/ui/spinner';
|
|
11
|
+
import { Status } from '../components/ui/status';
|
|
12
|
+
export const coreFeedbackSection = {
|
|
13
|
+
id: 'feedback',
|
|
14
|
+
title: 'Feedback',
|
|
15
|
+
stories: [
|
|
16
|
+
{
|
|
17
|
+
id: 'status-and-badges',
|
|
18
|
+
title: 'Status and badges',
|
|
19
|
+
components: ['avatar', 'badge', 'notification-dot', 'status'],
|
|
20
|
+
viewports: ['narrow'],
|
|
21
|
+
render: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsxs(Avatar, { children: [_jsx(AvatarFallback, { children: "RM" }), _jsx(AvatarBadge, {})] }), _jsx(Status, { variant: "running", children: "Running" }), _jsx(Badge, { variant: "secondary", children: "Draft" }), _jsxs(Badge, { variant: "outline", className: "gap-1.5", children: [_jsx(NotificationDot, {}), "New"] })] })),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 'semantic-alert',
|
|
25
|
+
title: 'Semantic alert',
|
|
26
|
+
components: ['alert'],
|
|
27
|
+
interactions: ['rest', 'invalid'],
|
|
28
|
+
render: ({ interaction }) => (_jsxs(Alert, { tone: interaction === 'invalid' ? 'danger' : 'info', children: [_jsx(CircleAlertIcon, {}), _jsx(AlertTitle, { children: interaction === 'invalid' ? 'Could not save' : 'Workspace ready' }), _jsx(AlertDescription, { children: interaction === 'invalid'
|
|
29
|
+
? 'Check the highlighted fields and try again.'
|
|
30
|
+
: 'Changes stay local until you choose to share them.' })] })),
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'empty-state',
|
|
34
|
+
title: 'Empty state',
|
|
35
|
+
components: ['empty'],
|
|
36
|
+
viewports: ['narrow'],
|
|
37
|
+
interactions: ['empty'],
|
|
38
|
+
render: () => (_jsxs(Empty, { variant: "compact", children: [_jsxs(EmptyHeader, { children: [_jsx(EmptyMedia, { variant: "icon", children: _jsx(InboxIcon, {}) }), _jsx(EmptyTitle, { children: "No captured items" }), _jsx(EmptyDescription, { children: "New items will appear here as they arrive." })] }), _jsx(EmptyContent, {})] })),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'loading-feedback',
|
|
42
|
+
title: 'Progress and loading',
|
|
43
|
+
components: ['progress', 'skeleton', 'spinner'],
|
|
44
|
+
viewports: ['narrow'],
|
|
45
|
+
interactions: ['loading'],
|
|
46
|
+
accessibilityModes: ['standard', 'reduced-motion'],
|
|
47
|
+
render: () => (_jsxs("div", { className: "grid gap-3", children: [_jsxs("div", { className: "flex items-center gap-2 text-sm", children: [_jsx(Spinner, {}), "Syncing changes"] }), _jsx(Progress, { "aria-label": "Sync progress", value: 64 }), _jsxs("div", { className: "grid gap-2", children: [_jsx(Skeleton, { className: "h-3 w-3/4" }), _jsx(Skeleton, { className: "h-3 w-1/2" })] })] })),
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-foundation-stories.d.ts","sourceRoot":"","sources":["../../src/catalog/core-foundation-stories.tsx"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAE/D,eAAO,MAAM,qBAAqB,EAAE,wBA6InC,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeftIcon, ChevronRightIcon, LocateFixedIcon, PlusIcon, } from 'lucide-react';
|
|
3
|
+
import { AppFrame, AppFrameContent, AppFrameTitlebar, AppFrameToolbar, } from '../components/ui/app-frame';
|
|
4
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '../components/ui/card';
|
|
5
|
+
import { IconButton } from '../components/ui/icon-button';
|
|
6
|
+
import { Material, MaterialGroup } from '../components/ui/material';
|
|
7
|
+
import { Panel, PanelContent, PanelGroup, PanelHeader, } from '../components/ui/panel';
|
|
8
|
+
import { Text } from '../components/ui/text';
|
|
9
|
+
import { Toolbar, ToolbarActions, ToolbarContent, ToolbarDescription, ToolbarTitle, } from '../components/ui/toolbar';
|
|
10
|
+
export const coreFoundationSection = {
|
|
11
|
+
id: 'window-foundations',
|
|
12
|
+
title: 'Window foundations',
|
|
13
|
+
stories: [
|
|
14
|
+
{
|
|
15
|
+
id: 'app-frame',
|
|
16
|
+
title: 'App frame',
|
|
17
|
+
components: ['app-frame'],
|
|
18
|
+
interactions: ['rest', 'empty'],
|
|
19
|
+
render: ({ interaction }) => (_jsxs(AppFrame, { mode: "window", className: "rounded-container h-56 border", children: [_jsx(AppFrameTitlebar, { children: _jsx(AppFrameToolbar, { children: _jsx("strong", { className: "text-sm", children: "Calendar" }) }) }), _jsx(AppFrameContent, { className: "grid place-items-center p-4", children: _jsx("span", { className: "text-muted-foreground text-sm", children: interaction === 'empty' ? 'No events yet' : 'App-owned canvas' }) })] })),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'adaptive-material',
|
|
23
|
+
title: 'Adaptive material',
|
|
24
|
+
description: 'Regular navigation chrome, a grouped sampler, and a clear media control.',
|
|
25
|
+
components: ['material'],
|
|
26
|
+
densities: ['regular'],
|
|
27
|
+
viewports: ['wide'],
|
|
28
|
+
accessibilityModes: [
|
|
29
|
+
'standard',
|
|
30
|
+
'reduced-transparency',
|
|
31
|
+
'increased-contrast',
|
|
32
|
+
'reduced-motion',
|
|
33
|
+
],
|
|
34
|
+
render: () => (_jsxs("div", { className: "rounded-container relative h-52 overflow-hidden border bg-[radial-gradient(circle_at_18%_24%,var(--chart-2),transparent_32%),radial-gradient(circle_at_76%_68%,var(--chart-1),transparent_38%),linear-gradient(135deg,var(--surface-recessed),var(--surface-canvas))] p-4", children: [_jsxs(Material, { elevation: "overlay", className: "flex items-center gap-3 px-3 py-2", children: [_jsx("strong", { className: "text-sm", children: "Map controls" }), _jsx("span", { className: "text-text-secondary text-xs", children: "Regular material" })] }), _jsxs(MaterialGroup, { className: "absolute bottom-4 left-4", shape: "capsule", elevation: "overlay", spacing: "compact", children: [_jsx(IconButton, { label: "Previous place", variant: "ghost", size: "sm", children: _jsx(ChevronLeftIcon, {}) }), _jsx(IconButton, { label: "Next place", variant: "ghost", size: "sm", children: _jsx(ChevronRightIcon, {}) })] }), _jsx(Material, { asChild: true, variant: "clear", shape: "circle", elevation: "overlay", interactive: true, children: _jsx(IconButton, { label: "Center map", variant: "ghost", className: "absolute bottom-4 right-4", children: _jsx(LocateFixedIcon, {}) }) })] })),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'toolbar-hierarchy',
|
|
38
|
+
title: 'Toolbar hierarchy',
|
|
39
|
+
components: ['text', 'toolbar'],
|
|
40
|
+
viewports: ['narrow'],
|
|
41
|
+
render: () => (_jsxs(Toolbar, { className: "rounded-container border", children: [_jsxs(ToolbarContent, { children: [_jsx(ToolbarTitle, { children: "Daily plan" }), _jsx(ToolbarDescription, { children: "Three tasks remaining" })] }), _jsx(ToolbarActions, { children: _jsx(IconButton, { label: "Add task", variant: "ghost", size: "sm", children: _jsx(PlusIcon, {}) }) })] })),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'work-surfaces',
|
|
45
|
+
title: 'Work surfaces',
|
|
46
|
+
components: ['card', 'panel'],
|
|
47
|
+
interactions: ['rest', 'empty'],
|
|
48
|
+
render: ({ interaction }) => (_jsxs(PanelGroup, { className: "rounded-container h-48 border", children: [_jsxs(Panel, { surface: "sidebar", className: "w-32", children: [_jsx(PanelHeader, { children: _jsx(Text, { variant: "small-strong", children: "Library" }) }), _jsx(PanelContent, { className: "p-3", children: _jsx(Text, { color: "secondary", variant: "small", children: "Projects" }) })] }), _jsx(Panel, { className: "flex-1", children: _jsx(PanelContent, { className: "p-3", children: _jsxs(Card, { className: "shadow-panel gap-3 py-4", children: [_jsxs(CardHeader, { className: "gap-1 px-4", children: [_jsx(CardTitle, { className: "text-sm", children: interaction === 'empty' ? 'No selection' : 'Project brief' }), _jsx(CardDescription, { children: interaction === 'empty'
|
|
49
|
+
? 'Choose an item from the library.'
|
|
50
|
+
: 'A quiet, bounded working surface.' })] }), _jsx(CardContent, { className: "px-4", children: _jsx(Text, { variant: "small", color: "secondary", children: "Updated today" }) })] }) }) })] })),
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-navigation-stories.d.ts","sourceRoot":"","sources":["../../src/catalog/core-navigation-stories.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAE/D,eAAO,MAAM,qBAAqB,EAAE,wBA+DnC,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from '../components/ui/breadcrumb';
|
|
3
|
+
import { NavigationButtonGroup } from '../components/ui/navigation-button-group';
|
|
4
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '../components/ui/tabs';
|
|
5
|
+
export const coreNavigationSection = {
|
|
6
|
+
id: 'navigation',
|
|
7
|
+
title: 'Navigation',
|
|
8
|
+
stories: [
|
|
9
|
+
{
|
|
10
|
+
id: 'history-and-path',
|
|
11
|
+
title: 'Window history and path',
|
|
12
|
+
components: ['breadcrumb', 'navigation-button-group'],
|
|
13
|
+
viewports: ['narrow'],
|
|
14
|
+
interactions: ['rest', 'disabled'],
|
|
15
|
+
render: ({ interaction }) => (_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx(NavigationButtonGroup, { "data-catalog-target": true, canGoBack: true, canGoForward: interaction !== 'disabled', onBack: () => undefined, onForward: () => undefined }), _jsx(Breadcrumb, { className: "min-w-0", children: _jsxs(BreadcrumbList, { className: "flex-nowrap", children: [_jsx(BreadcrumbItem, { children: _jsx(BreadcrumbLink, { href: "#projects", children: "Projects" }) }), _jsx(BreadcrumbSeparator, {}), _jsx(BreadcrumbItem, { className: "min-w-0", children: _jsx(BreadcrumbPage, { className: "truncate", children: "Personal" }) })] }) })] })),
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 'view-tabs',
|
|
19
|
+
title: 'View tabs',
|
|
20
|
+
components: ['tabs'],
|
|
21
|
+
interactions: ['rest', 'focus-visible', 'disabled'],
|
|
22
|
+
render: ({ interaction }) => (_jsxs(Tabs, { defaultValue: "overview", children: [_jsxs(TabsList, { children: [_jsx(TabsTrigger, { "data-catalog-target": true, value: "overview", autoFocus: interaction === 'focus-visible', children: "Overview" }), _jsx(TabsTrigger, { value: "activity", disabled: interaction === 'disabled', children: "Activity" })] }), _jsx(TabsContent, { value: "overview", className: "text-muted-foreground p-2 text-sm", children: "Project summary" }), _jsx(TabsContent, { value: "activity", children: "Recent activity" })] })),
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-overlay-stories.d.ts","sourceRoot":"","sources":["../../src/catalog/core-overlay-stories.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAE/D,eAAO,MAAM,mBAAmB,EAAE,wBAiCjC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '../components/ui/button';
|
|
3
|
+
import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, } from '../components/ui/popover';
|
|
4
|
+
export const coreOverlaysSection = {
|
|
5
|
+
id: 'overlays',
|
|
6
|
+
title: 'Overlays',
|
|
7
|
+
description: 'A minimal stable portal case. Complex modal and menu surfaces remain explicitly deferred.',
|
|
8
|
+
stories: [
|
|
9
|
+
{
|
|
10
|
+
id: 'popover-open',
|
|
11
|
+
title: 'Open popover',
|
|
12
|
+
components: ['popover'],
|
|
13
|
+
themes: ['light'],
|
|
14
|
+
densities: ['regular'],
|
|
15
|
+
viewports: ['wide'],
|
|
16
|
+
accessibilityModes: ['standard', 'reduced-transparency'],
|
|
17
|
+
render: () => (_jsx("div", { className: "flex h-32 items-start justify-center pt-2", children: _jsxs(Popover, { defaultOpen: true, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "View details" }) }), _jsx(PopoverContent, { size: "sm", align: "center", children: _jsxs(PopoverHeader, { children: [_jsx(PopoverTitle, { children: "Local workspace" }), _jsx(PopoverDescription, { children: "Files and app data remain on this Mac." })] }) })] }) })),
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
package/dist/catalog/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { buildCatalogCases, createCatalogManifest, createCatalogSection, createCatalogStory, } from './catalog-manifest';
|
|
2
|
+
export { assertCatalogCoverage, getCatalogCoverage, type CatalogCoverageExclusion, type CatalogCoverageReport, } from './catalog-coverage';
|
|
2
3
|
export { CatalogCaseFrame, ComponentCatalog, type CatalogCaseFrameProps, type ComponentCatalogProps, } from './component-catalog';
|
|
3
4
|
export { coreComponentCatalog } from './core-catalog';
|
|
4
|
-
export {
|
|
5
|
+
export { coreCatalogExclusions } from './core-catalog-exclusions';
|
|
6
|
+
export { catalogAccessibilityModes, catalogDensities, catalogInteractions, catalogThemes, catalogViewports, type CatalogAccessibilityMode, type CatalogCase, type CatalogCaseContext, type CatalogCaseFilter, type CatalogDensity, type CatalogInteraction, type CatalogManifest, type CatalogSectionDefinition, type CatalogStoryDefinition, type CatalogTheme, type CatalogViewport, } from './catalog-types';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/catalog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/catalog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAA"}
|
package/dist/catalog/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { buildCatalogCases, createCatalogManifest, createCatalogSection, createCatalogStory, } from './catalog-manifest';
|
|
2
|
+
export { assertCatalogCoverage, getCatalogCoverage, } from './catalog-coverage';
|
|
2
3
|
export { CatalogCaseFrame, ComponentCatalog, } from './component-catalog';
|
|
3
4
|
export { coreComponentCatalog } from './core-catalog';
|
|
4
|
-
export {
|
|
5
|
+
export { coreCatalogExclusions } from './core-catalog-exclusions';
|
|
6
|
+
export { catalogAccessibilityModes, catalogDensities, catalogInteractions, catalogThemes, catalogViewports, } from './catalog-types';
|
|
@@ -51,7 +51,6 @@ export interface ChatPlanUsage {
|
|
|
51
51
|
windows: ChatPlanUsageWindow[];
|
|
52
52
|
}
|
|
53
53
|
export declare function hasPersistedChatError(messages: ChatMessage[]): boolean;
|
|
54
|
-
export declare function getPrependPreservedScrollTop(previousScrollTop: number, previousScrollHeight: number, nextScrollHeight: number): number;
|
|
55
54
|
export interface ChatPanelProps {
|
|
56
55
|
/** Chat messages */
|
|
57
56
|
messages: ChatMessage[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-panel.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-panel.tsx"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,KAAK,SAAS,EAOf,MAAM,OAAO,CAAA;AAqBd,OAAO,EACL,KAAK,mBAAmB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Aa,EACb,qBAAqB,EACrB,YAAY,EACZ,oBAA4B,EAC5B,0BAAkC,EAClC,uBAAuB,EACvB,uBAAuB,EACvB,oBAAwB,EACxB,gBAAwB,EACxB,sBAA8B,EAC9B,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,WAA+B,EAC/B,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,YAAoB,EACpB,kBAAkB,EAClB,WAAmB,EACnB,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,YAAiB,EACjB,kBAAkB,EAClB,YAAmB,EACnB,kBAAkB,EAClB,oBAA4B,EAC5B,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAqB,EACrB,uBAAuB,EACvB,iBAAyB,EACzB,cAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,YAAoB,EACpB,0BAA0B,EAC1B,YAAY,EACZ,SAAS,GACV,EAAE,cAAc,2CAqzBhB"}
|
|
@@ -77,9 +77,6 @@ export function hasPersistedChatError(messages) {
|
|
|
77
77
|
const lastMessage = messages.at(-1);
|
|
78
78
|
return Boolean(lastMessage?.parts?.some((part) => part.type === 'error'));
|
|
79
79
|
}
|
|
80
|
-
export function getPrependPreservedScrollTop(previousScrollTop, previousScrollHeight, nextScrollHeight) {
|
|
81
|
-
return (previousScrollTop + Math.max(0, nextScrollHeight - previousScrollHeight));
|
|
82
|
-
}
|
|
83
80
|
function MessageScrollerCommandSync({ signal }) {
|
|
84
81
|
const { scrollToEnd } = useMessageScroller();
|
|
85
82
|
const previousSignalRef = useRef(signal);
|
|
@@ -129,19 +126,18 @@ function ChatMessageViewport({ items, renderItem, toolProgress, onApprovalRespon
|
|
|
129
126
|
return;
|
|
130
127
|
}
|
|
131
128
|
loadingOlderRef.current = true;
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
// A prepended page is position-preserved by the message scroller
|
|
130
|
+
// itself, synchronously in the same mutation pass — compensating here
|
|
131
|
+
// after a paint produced a visible two-step jump. Only a reset (the
|
|
132
|
+
// cursor raced a history rewrite) still needs an explicit landing.
|
|
134
133
|
void onLoadOlderMessages()
|
|
135
134
|
.then((outcome) => {
|
|
135
|
+
if (outcome !== 'reset')
|
|
136
|
+
return;
|
|
136
137
|
window.requestAnimationFrame(() => {
|
|
137
138
|
if (viewportRef.current !== viewport)
|
|
138
139
|
return;
|
|
139
|
-
|
|
140
|
-
viewport.scrollTop = viewport.scrollHeight;
|
|
141
|
-
}
|
|
142
|
-
else if (outcome === 'prepended') {
|
|
143
|
-
viewport.scrollTop = getPrependPreservedScrollTop(previousScrollTop, previousScrollHeight, viewport.scrollHeight);
|
|
144
|
-
}
|
|
140
|
+
viewport.scrollTop = viewport.scrollHeight;
|
|
145
141
|
});
|
|
146
142
|
})
|
|
147
143
|
.finally(() => {
|
|
@@ -6,14 +6,18 @@ declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof Al
|
|
|
6
6
|
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
declare function AlertDialogContent({ className, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
9
|
-
size?: 'default' | '
|
|
9
|
+
size?: 'sm' | 'default' | 'lg';
|
|
10
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogBody({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
declare function AlertDialogAction({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>
|
|
17
|
+
declare function AlertDialogAction({ className, children, disabled, pending, pendingLabel, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'> & {
|
|
18
|
+
pending?: boolean;
|
|
19
|
+
pendingLabel?: React.ReactNode;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
21
|
declare function AlertDialogCancel({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
22
|
+
export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
19
23
|
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGjC,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAExD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAI3D;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAI1D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAW3D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,GAAG;IAC7D,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;CAC/B,2CAuBA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CA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AC,EAAE,SAAS,GAAG,MAAM,CAAC,2CAU9D;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,CAAA"}
|
|
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
4
4
|
import { cn } from '../../lib/utils';
|
|
5
5
|
import { Button } from './button';
|
|
6
|
+
import { Spinner } from './spinner';
|
|
6
7
|
function AlertDialog({ ...props }) {
|
|
7
8
|
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
8
9
|
}
|
|
@@ -16,13 +17,16 @@ function AlertDialogOverlay({ className, ...props }) {
|
|
|
16
17
|
return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50', className), ...props }));
|
|
17
18
|
}
|
|
18
19
|
function AlertDialogContent({ className, size = 'default', ...props }) {
|
|
19
|
-
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", "data-size": size, className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
20
|
+
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx("div", { "data-slot": "alert-dialog-positioner", className: "pointer-events-none fixed bottom-[max(var(--window-content-inset-bottom),var(--chat-safe-padding),1rem)] left-[max(var(--window-content-inset-inline-start),1rem)] right-[max(var(--window-content-inset-inline-end),1rem)] top-[max(var(--window-content-inset-top),1rem)] z-50 grid place-items-center", children: _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", "data-size": size, className: cn('bg-background group/alert-dialog-content rounded-overlay border-separator shadow-overlay pointer-events-auto relative grid max-h-full min-h-0 w-full gap-4 overflow-hidden border p-6 outline-none', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95', 'duration-[var(--motion-duration-normal)]', 'data-[size=default]:max-w-lg data-[size=lg]:max-w-2xl data-[size=sm]:max-w-xs', className), ...props }) })] }));
|
|
20
21
|
}
|
|
21
22
|
function AlertDialogHeader({ className, ...props }) {
|
|
22
23
|
return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn('has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr] grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left', className), ...props }));
|
|
23
24
|
}
|
|
24
25
|
function AlertDialogFooter({ className, ...props }) {
|
|
25
|
-
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn('flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end', className), ...props }));
|
|
26
|
+
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn('flex shrink-0 flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:flex-wrap sm:justify-end', className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
function AlertDialogBody({ className, ...props }) {
|
|
29
|
+
return (_jsx("div", { "data-slot": "alert-dialog-body", className: cn('min-h-0 overflow-y-auto overscroll-contain [scrollbar-gutter:stable]', className), ...props }));
|
|
26
30
|
}
|
|
27
31
|
function AlertDialogTitle({ className, ...props }) {
|
|
28
32
|
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn('sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2 text-lg font-semibold', className), ...props }));
|
|
@@ -33,10 +37,10 @@ function AlertDialogDescription({ className, ...props }) {
|
|
|
33
37
|
function AlertDialogMedia({ className, ...props }) {
|
|
34
38
|
return (_jsx("div", { "data-slot": "alert-dialog-media", className: cn("bg-muted *:[svg:not([class*='size-'])]:size-8 mb-2 inline-flex size-16 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2", className), ...props }));
|
|
35
39
|
}
|
|
36
|
-
function AlertDialogAction({ className, variant = 'default', size = 'default', ...props }) {
|
|
37
|
-
return (_jsx(Button, { variant: variant, size: size, asChild: true, children:
|
|
40
|
+
function AlertDialogAction({ className, children, disabled, pending = false, pendingLabel, variant = 'default', size = 'default', ...props }) {
|
|
41
|
+
return (_jsx(Button, { variant: variant, size: size, disabled: disabled || pending, "aria-busy": pending || undefined, asChild: true, children: _jsxs(AlertDialogPrimitive.Action, { "data-slot": "alert-dialog-action", "data-pending": pending || undefined, className: cn(className), ...props, children: [pending ? _jsx(Spinner, { "aria-hidden": "true" }) : null, pending && pendingLabel !== undefined ? pendingLabel : children] }) }));
|
|
38
42
|
}
|
|
39
43
|
function AlertDialogCancel({ className, variant = 'outline', size = 'default', ...props }) {
|
|
40
44
|
return (_jsx(Button, { variant: variant, size: size, asChild: true, children: _jsx(AlertDialogPrimitive.Cancel, { "data-slot": "alert-dialog-cancel", className: cn(className), ...props }) }));
|
|
41
45
|
}
|
|
42
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
46
|
+
export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { type IconButtonProps } from './icon-button';
|
|
2
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
4
|
declare const alertVariants: (props?: ({
|
|
4
|
-
|
|
5
|
+
tone?: "success" | "warning" | "neutral" | "info" | "danger" | null | undefined;
|
|
6
|
+
density?: "compact" | "default" | null | undefined;
|
|
5
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
|
|
8
|
+
type AlertTone = NonNullable<VariantProps<typeof alertVariants>['tone']>;
|
|
9
|
+
type AlertDensity = NonNullable<VariantProps<typeof alertVariants>['density']>;
|
|
10
|
+
interface AlertProps extends Omit<React.ComponentProps<'div'>, 'role'>, VariantProps<typeof alertVariants> {
|
|
11
|
+
/**
|
|
12
|
+
* Compatibility alias. Prefer `tone`; `destructive` maps to `danger`.
|
|
13
|
+
*/
|
|
14
|
+
variant?: 'default' | 'destructive';
|
|
15
|
+
role?: React.AriaRole;
|
|
16
|
+
}
|
|
17
|
+
declare function Alert({ className, density, role, tone, variant, ...props }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
7
18
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
19
|
declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
|
|
20
|
+
declare function AlertActions({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
interface AlertDismissProps extends Omit<IconButtonProps, 'children' | 'label' | 'loading' | 'shape' | 'size'> {
|
|
22
|
+
label: string;
|
|
23
|
+
}
|
|
24
|
+
declare function AlertDismiss({ className, label, ...props }: AlertDismissProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { Alert, AlertActions, AlertDescription, AlertDismiss, AlertTitle, alertVariants, type AlertDensity, type AlertDismissProps, type AlertProps, type AlertTone, };
|
|
10
26
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,aAAa;;;8EAwBlB,CAAA;AAED,KAAK,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AACxE,KAAK,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;AAE9E,UAAU,UACR,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,EAC/C,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAA;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAA;CACtB;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAmB,EACnB,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,GAAG,KA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