@moldable-ai/ui 0.2.20 → 0.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/dist/catalog/catalog-coverage.d.ts +15 -0
  2. package/dist/catalog/catalog-coverage.d.ts.map +1 -0
  3. package/dist/catalog/catalog-coverage.js +44 -0
  4. package/dist/catalog/catalog-manifest.d.ts.map +1 -1
  5. package/dist/catalog/catalog-manifest.js +35 -23
  6. package/dist/catalog/catalog-types.d.ts +17 -0
  7. package/dist/catalog/catalog-types.d.ts.map +1 -1
  8. package/dist/catalog/catalog-types.js +7 -0
  9. package/dist/catalog/component-catalog.d.ts.map +1 -1
  10. package/dist/catalog/component-catalog.js +16 -6
  11. package/dist/catalog/core-catalog-exclusions.d.ts +8 -0
  12. package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -0
  13. package/dist/catalog/core-catalog-exclusions.js +155 -0
  14. package/dist/catalog/core-catalog.d.ts +0 -4
  15. package/dist/catalog/core-catalog.d.ts.map +1 -1
  16. package/dist/catalog/core-catalog.js +12 -98
  17. package/dist/catalog/core-collection-stories.d.ts +3 -0
  18. package/dist/catalog/core-collection-stories.d.ts.map +1 -0
  19. package/dist/catalog/core-collection-stories.js +42 -0
  20. package/dist/catalog/core-control-stories.d.ts +3 -0
  21. package/dist/catalog/core-control-stories.d.ts.map +1 -0
  22. package/dist/catalog/core-control-stories.js +97 -0
  23. package/dist/catalog/core-feedback-stories.d.ts +3 -0
  24. package/dist/catalog/core-feedback-stories.d.ts.map +1 -0
  25. package/dist/catalog/core-feedback-stories.js +50 -0
  26. package/dist/catalog/core-foundation-stories.d.ts +3 -0
  27. package/dist/catalog/core-foundation-stories.d.ts.map +1 -0
  28. package/dist/catalog/core-foundation-stories.js +53 -0
  29. package/dist/catalog/core-navigation-stories.d.ts +3 -0
  30. package/dist/catalog/core-navigation-stories.d.ts.map +1 -0
  31. package/dist/catalog/core-navigation-stories.js +25 -0
  32. package/dist/catalog/core-overlay-stories.d.ts +3 -0
  33. package/dist/catalog/core-overlay-stories.d.ts.map +1 -0
  34. package/dist/catalog/core-overlay-stories.js +20 -0
  35. package/dist/catalog/index.d.ts +3 -1
  36. package/dist/catalog/index.d.ts.map +1 -1
  37. package/dist/catalog/index.js +3 -1
  38. package/dist/components/app-error-boundary.d.ts.map +1 -1
  39. package/dist/components/app-error-boundary.js +3 -2
  40. package/dist/components/chat/chat-panel.d.ts +0 -1
  41. package/dist/components/chat/chat-panel.d.ts.map +1 -1
  42. package/dist/components/chat/chat-panel.js +7 -11
  43. package/dist/components/ui/alert-dialog.d.ts +10 -4
  44. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  45. package/dist/components/ui/alert-dialog.js +14 -6
  46. package/dist/components/ui/alert.d.ts +19 -3
  47. package/dist/components/ui/alert.d.ts.map +1 -1
  48. package/dist/components/ui/alert.js +25 -8
  49. package/dist/components/ui/app-frame.d.ts +9 -3
  50. package/dist/components/ui/app-frame.d.ts.map +1 -1
  51. package/dist/components/ui/app-frame.js +45 -6
  52. package/dist/components/ui/button.d.ts +6 -4
  53. package/dist/components/ui/button.d.ts.map +1 -1
  54. package/dist/components/ui/button.js +40 -8
  55. package/dist/components/ui/collapsible.d.ts +9 -1
  56. package/dist/components/ui/collapsible.d.ts.map +1 -1
  57. package/dist/components/ui/collapsible.js +13 -2
  58. package/dist/components/ui/collection-navigation.d.ts +8 -0
  59. package/dist/components/ui/collection-navigation.d.ts.map +1 -0
  60. package/dist/components/ui/collection-navigation.js +19 -0
  61. package/dist/components/ui/command.d.ts +5 -1
  62. package/dist/components/ui/command.d.ts.map +1 -1
  63. package/dist/components/ui/command.js +13 -1
  64. package/dist/components/ui/confirm-dialog.d.ts +19 -0
  65. package/dist/components/ui/confirm-dialog.d.ts.map +1 -0
  66. package/dist/components/ui/confirm-dialog.js +45 -0
  67. package/dist/components/ui/date-picker.d.ts +24 -0
  68. package/dist/components/ui/date-picker.d.ts.map +1 -0
  69. package/dist/components/ui/date-picker.js +92 -0
  70. package/dist/components/ui/dialog-primary-action.d.ts +4 -0
  71. package/dist/components/ui/dialog-primary-action.d.ts.map +1 -0
  72. package/dist/components/ui/dialog-primary-action.js +37 -0
  73. package/dist/components/ui/dialog.d.ts +8 -2
  74. package/dist/components/ui/dialog.d.ts.map +1 -1
  75. package/dist/components/ui/dialog.js +15 -5
  76. package/dist/components/ui/empty.d.ts +7 -2
  77. package/dist/components/ui/empty.d.ts.map +1 -1
  78. package/dist/components/ui/empty.js +20 -7
  79. package/dist/components/ui/error-boundary-view.d.ts +12 -0
  80. package/dist/components/ui/error-boundary-view.d.ts.map +1 -0
  81. package/dist/components/ui/error-boundary-view.js +8 -0
  82. package/dist/components/ui/grid.d.ts.map +1 -1
  83. package/dist/components/ui/grid.js +70 -46
  84. package/dist/components/ui/icon-button.d.ts.map +1 -1
  85. package/dist/components/ui/icon-button.js +1 -2
  86. package/dist/components/ui/index.d.ts +5 -0
  87. package/dist/components/ui/index.d.ts.map +1 -1
  88. package/dist/components/ui/index.js +5 -0
  89. package/dist/components/ui/input-group.d.ts +1 -1
  90. package/dist/components/ui/list.d.ts +5 -1
  91. package/dist/components/ui/list.d.ts.map +1 -1
  92. package/dist/components/ui/list.js +27 -16
  93. package/dist/components/ui/material.d.ts +34 -0
  94. package/dist/components/ui/material.d.ts.map +1 -0
  95. package/dist/components/ui/material.js +34 -0
  96. package/dist/components/ui/message-scroller-controller.d.ts +162 -0
  97. package/dist/components/ui/message-scroller-controller.d.ts.map +1 -0
  98. package/dist/components/ui/message-scroller-controller.js +888 -0
  99. package/dist/components/ui/message-scroller-policy.d.ts +74 -0
  100. package/dist/components/ui/message-scroller-policy.d.ts.map +1 -0
  101. package/dist/components/ui/message-scroller-policy.js +129 -0
  102. package/dist/components/ui/message-scroller-primitive.d.ts +55 -0
  103. package/dist/components/ui/message-scroller-primitive.d.ts.map +1 -0
  104. package/dist/components/ui/message-scroller-primitive.js +226 -0
  105. package/dist/components/ui/message-scroller.d.ts +2 -2
  106. package/dist/components/ui/message-scroller.d.ts.map +1 -1
  107. package/dist/components/ui/message-scroller.js +3 -15
  108. package/dist/components/ui/navigation-button-group.d.ts +16 -0
  109. package/dist/components/ui/navigation-button-group.d.ts.map +1 -0
  110. package/dist/components/ui/navigation-button-group.js +9 -0
  111. package/dist/components/ui/popover.d.ts +9 -2
  112. package/dist/components/ui/popover.d.ts.map +1 -1
  113. package/dist/components/ui/popover.js +13 -3
  114. package/dist/components/ui/scroll-area.d.ts +8 -2
  115. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  116. package/dist/components/ui/scroll-area.js +6 -3
  117. package/dist/components/ui/search-field.d.ts.map +1 -1
  118. package/dist/components/ui/segmented-control.d.ts.map +1 -1
  119. package/dist/components/ui/segmented-control.js +6 -5
  120. package/dist/components/ui/sheet.d.ts +4 -2
  121. package/dist/components/ui/sheet.d.ts.map +1 -1
  122. package/dist/components/ui/sheet.js +12 -9
  123. package/dist/components/ui/sonner.d.ts +1 -1
  124. package/dist/components/ui/sonner.d.ts.map +1 -1
  125. package/dist/components/ui/spinner.d.ts.map +1 -1
  126. package/dist/components/ui/spinner.js +1 -1
  127. package/dist/components/ui/table.d.ts.map +1 -1
  128. package/dist/components/ui/table.js +7 -2
  129. package/dist/components/ui/toggle.d.ts +12 -4
  130. package/dist/components/ui/toggle.d.ts.map +1 -1
  131. package/dist/components/ui/toggle.js +13 -2
  132. package/dist/components/ui/toolbar.d.ts +9 -2
  133. package/dist/components/ui/toolbar.d.ts.map +1 -1
  134. package/dist/components/ui/toolbar.js +23 -4
  135. package/dist/components/ui/tooltip.d.ts +8 -3
  136. package/dist/components/ui/tooltip.d.ts.map +1 -1
  137. package/dist/components/ui/tooltip.js +11 -6
  138. package/dist/index.d.ts +6 -1
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +7 -1
  141. package/dist/lib/frame-lifecycle.d.ts +23 -0
  142. package/dist/lib/frame-lifecycle.d.ts.map +1 -1
  143. package/dist/lib/frame-lifecycle.js +30 -3
  144. package/dist/lib/host-date-time-picker.d.ts +36 -0
  145. package/dist/lib/host-date-time-picker.d.ts.map +1 -0
  146. package/dist/lib/host-date-time-picker.js +162 -0
  147. package/dist/lib/host-file-dialog.d.ts +66 -0
  148. package/dist/lib/host-file-dialog.d.ts.map +1 -0
  149. package/dist/lib/host-file-dialog.js +221 -0
  150. package/dist/lib/host-native-menu.d.ts +75 -0
  151. package/dist/lib/host-native-menu.d.ts.map +1 -0
  152. package/dist/lib/host-native-menu.js +187 -0
  153. package/dist/lib/host-services.d.ts +13 -0
  154. package/dist/lib/host-services.d.ts.map +1 -0
  155. package/dist/lib/host-services.js +161 -0
  156. package/dist/lib/host-share.d.ts +39 -0
  157. package/dist/lib/host-share.d.ts.map +1 -0
  158. package/dist/lib/host-share.js +161 -0
  159. package/dist/lib/theme.d.ts.map +1 -1
  160. package/dist/lib/theme.js +2 -1
  161. package/docs/README.md +4 -1
  162. package/docs/adaptive-materials.md +79 -0
  163. package/docs/app-anatomy.md +3 -1
  164. package/docs/component-catalog.md +26 -3
  165. package/docs/design-tokens.md +17 -4
  166. package/docs/foundations.md +5 -3
  167. package/docs/standalone-app-windows.md +8 -0
  168. package/docs/visual-regression.md +78 -0
  169. package/package.json +12 -4
  170. package/src/components/ui/alert-dialog.md +58 -0
  171. package/src/components/ui/alert.md +28 -6
  172. package/src/components/ui/app-frame.md +5 -0
  173. package/src/components/ui/button.md +10 -3
  174. package/src/components/ui/collapsible.md +52 -0
  175. package/src/components/ui/combobox.md +0 -1
  176. package/src/components/ui/command.md +54 -0
  177. package/src/components/ui/date-field.md +1 -1
  178. package/src/components/ui/date-picker.md +55 -0
  179. package/src/components/ui/dialog.md +59 -0
  180. package/src/components/ui/empty.md +8 -3
  181. package/src/components/ui/error-boundary-view.md +98 -0
  182. package/src/components/ui/grid.md +8 -4
  183. package/src/components/ui/icon-button.md +2 -2
  184. package/src/components/ui/list.md +35 -2
  185. package/src/components/ui/material.md +51 -0
  186. package/src/components/ui/navigation-button-group.md +46 -0
  187. package/src/components/ui/popover.md +31 -0
  188. package/src/components/ui/scroll-area.md +11 -7
  189. package/src/components/ui/search-field.md +1 -1
  190. package/src/components/ui/segmented-control.md +2 -5
  191. package/src/components/ui/sheet.md +30 -0
  192. package/src/components/ui/table.md +4 -2
  193. package/src/components/ui/toggle-button.md +48 -0
  194. package/src/components/ui/toolbar.md +5 -0
  195. package/src/components/ui/tooltip.md +31 -0
  196. 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, { role: "listitem", 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,3 @@
1
+ import type { CatalogSectionDefinition } from './catalog-types';
2
+ export declare const coreControlsSection: CatalogSectionDefinition;
3
+ //# sourceMappingURL=core-control-stories.d.ts.map
@@ -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,wBAwPjC,CAAA"}
@@ -0,0 +1,97 @@
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
+ liveStates: ['hover', 'focus', 'pressed'],
33
+ render: ({ interaction }) => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Button, { "data-catalog-target": true, "data-state-target": "hover focus pressed", autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', children: "Continue" }), _jsx(Button, { variant: "outline", disabled: interaction === 'disabled', children: "Cancel" })] })),
34
+ },
35
+ {
36
+ id: 'icon-button',
37
+ title: 'Icon button',
38
+ components: ['icon-button'],
39
+ interactions: ['rest', 'focus-visible', 'disabled', 'loading'],
40
+ 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, {}) })),
41
+ },
42
+ {
43
+ id: 'segmented-control',
44
+ title: 'Segmented control',
45
+ components: ['segmented-control'],
46
+ interactions: ['rest', 'focus-visible', 'disabled'],
47
+ liveStates: ['hover', 'focus', 'pressed'],
48
+ render: ({ interaction }) => (_jsxs(SegmentedControl, { "aria-label": "Calendar view", defaultValue: "month", disabled: interaction === 'disabled', children: [_jsx(SegmentedControlItem, { "data-catalog-target": true, "data-state-target": "hover focus pressed", value: "week", autoFocus: interaction === 'focus-visible', children: "Week" }), _jsx(SegmentedControlItem, { value: "month", children: "Month" })] })),
49
+ },
50
+ {
51
+ id: 'text-field',
52
+ title: 'Text field',
53
+ components: ['field', 'input'],
54
+ interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
55
+ render: ({ caseId, interaction }) => {
56
+ const id = controlId(caseId, 'project-name');
57
+ 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." })] })] }));
58
+ },
59
+ },
60
+ {
61
+ id: 'search-and-date-fields',
62
+ title: 'Search and date fields',
63
+ components: ['date-field', 'search-field'],
64
+ interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
65
+ 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 })] })),
66
+ },
67
+ {
68
+ id: 'choice-controls',
69
+ title: 'Choice controls',
70
+ components: ['checkbox', 'radio-group', 'switch'],
71
+ interactions: ['rest', 'selected', 'disabled', 'invalid'],
72
+ render: ({ caseId, interaction }) => {
73
+ const selected = interaction === 'selected';
74
+ const disabled = interaction === 'disabled';
75
+ const invalid = interaction === 'invalid' || undefined;
76
+ const checkboxId = controlId(caseId, 'notifications');
77
+ const switchId = controlId(caseId, 'sync');
78
+ 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"] })] })] }));
79
+ },
80
+ },
81
+ {
82
+ id: 'format-controls',
83
+ title: 'Toggle and grouped controls',
84
+ components: ['button-group', 'kbd', 'toggle', 'toggle-group'],
85
+ interactions: ['rest', 'selected', 'disabled'],
86
+ liveStates: ['hover', 'focus', 'pressed'],
87
+ render: ({ interaction }) => (_jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [_jsx(ToggleButton, { "data-catalog-target": true, "data-state-target": "hover focus pressed", 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" })] })] })),
88
+ },
89
+ {
90
+ id: 'value-fields',
91
+ title: 'Value and long-form fields',
92
+ components: ['color-well', 'number-input', 'textarea'],
93
+ interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
94
+ 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' })] })] })),
95
+ },
96
+ ],
97
+ };
@@ -0,0 +1,3 @@
1
+ import type { CatalogSectionDefinition } from './catalog-types';
2
+ export declare const coreFeedbackSection: CatalogSectionDefinition;
3
+ //# sourceMappingURL=core-feedback-stories.d.ts.map
@@ -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,3 @@
1
+ import type { CatalogSectionDefinition } from './catalog-types';
2
+ export declare const coreFoundationSection: CatalogSectionDefinition;
3
+ //# sourceMappingURL=core-foundation-stories.d.ts.map
@@ -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,3 @@
1
+ import type { CatalogSectionDefinition } from './catalog-types';
2
+ export declare const coreNavigationSection: CatalogSectionDefinition;
3
+ //# sourceMappingURL=core-navigation-stories.d.ts.map
@@ -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,3 @@
1
+ import type { CatalogSectionDefinition } from './catalog-types';
2
+ export declare const coreOverlaysSection: CatalogSectionDefinition;
3
+ //# sourceMappingURL=core-overlay-stories.d.ts.map
@@ -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
+ };
@@ -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 { catalogDensities, catalogInteractions, catalogThemes, catalogViewports, type CatalogCase, type CatalogCaseContext, type CatalogCaseFilter, type CatalogDensity, type CatalogInteraction, type CatalogManifest, type CatalogSectionDefinition, type CatalogStoryDefinition, type CatalogTheme, type CatalogViewport, } from './catalog-types';
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"}
@@ -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 { catalogDensities, catalogInteractions, catalogThemes, catalogViewports, } from './catalog-types';
5
+ export { coreCatalogExclusions } from './core-catalog-exclusions';
6
+ export { catalogAccessibilityModes, catalogDensities, catalogInteractions, catalogThemes, catalogViewports, } from './catalog-types';
@@ -1 +1 @@
1
- {"version":3,"file":"app-error-boundary.d.ts","sourceRoot":"","sources":["../../src/components/app-error-boundary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAA;AAWzE,UAAU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G,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,cAAc,CAAA;CAC/B;AAED,UAAU,qBAAqB;IAC7B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,cAAc,CAAA;IACtB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAaD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAWhE;AA0CD,qBAAa,gBAAiB,SAAQ,SAAS,CAC7C,qBAAqB,EACrB,qBAAqB,CACtB;IACC,KAAK,EAAE,qBAAqB,CAAA;IAE5B,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,KAAK,GACX,OAAO,CAAC,qBAAqB,CAAC;gBAIrB,KAAK,EAAE,qBAAqB;IASxC,iBAAiB,IAAI,IAAI;IAgBzB,oBAAoB,IAAI,IAAI;IAU5B,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI;IAWtD,OAAO,CAAC,iBAAiB,CAMxB;IAED,OAAO,CAAC,wBAAwB,CAa/B;IAED,OAAO,CAAC,MAAM,CAEb;IAED,OAAO,CAAC,WAAW,CAYlB;IAED,MAAM;CAoCP"}
@@ -1,8 +1,9 @@
1
1
  'use client';
2
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { MessageSquareWarning, RefreshCw } from 'lucide-react';
4
4
  import { Component } from 'react';
5
5
  import { Button } from './ui/button';
6
+ import { ErrorBoundaryView } from './ui/error-boundary-view';
6
7
  function toError(value) {
7
8
  if (value instanceof Error)
8
9
  return value;
@@ -117,6 +118,6 @@ export class AppErrorBoundary extends Component {
117
118
  if (!error)
118
119
  return this.props.children;
119
120
  const errorSummary = formatError(error, source, componentStack);
120
- return (_jsx("main", { className: "bg-background text-foreground flex min-h-screen items-center justify-center p-4 sm:p-6", children: _jsxs("section", { className: "border-border bg-card w-full max-w-xl rounded-lg border p-5 shadow-lg sm:p-6", children: [_jsxs("div", { className: "space-y-2", children: [_jsxs("h1", { className: "text-xl font-semibold tracking-tight", children: [this.props.appName, " hit a UI error"] }), _jsx("p", { className: "text-muted-foreground text-sm leading-6", children: "Reload to recover, or send the captured client error to Moldable so it can inspect the crash." })] }), _jsx("pre", { className: "bg-muted text-muted-foreground mt-5 max-h-44 overflow-auto whitespace-pre-wrap rounded-md border p-3 font-mono text-xs", children: errorSummary }), _jsxs("div", { className: "mt-5 flex flex-col gap-2 sm:flex-row", children: [_jsxs(Button, { type: "button", className: "cursor-pointer", onClick: this.reload, children: [_jsx(RefreshCw, {}), "Reload"] }), _jsxs(Button, { type: "button", variant: "secondary", className: "cursor-pointer", onClick: this.askMoldable, children: [_jsx(MessageSquareWarning, {}), "Ask Moldable to fix this"] })] })] }) }));
121
+ return (_jsx(ErrorBoundaryView, { className: "min-h-screen", title: `${this.props.appName} hit a UI error`, message: "Reload to recover, or send the captured client error to Moldable so it can inspect the crash.", details: errorSummary, actions: _jsxs(_Fragment, { children: [_jsxs(Button, { type: "button", className: "cursor-pointer", onClick: this.reload, children: [_jsx(RefreshCw, {}), "Reload"] }), _jsxs(Button, { type: "button", variant: "secondary", className: "cursor-pointer", onClick: this.askMoldable, children: [_jsx(MessageSquareWarning, {}), "Ask Moldable to fix this"] })] }) }));
121
122
  }
122
123
  }
@@ -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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zB,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
- const previousScrollHeight = viewport.scrollHeight;
133
- const previousScrollTop = viewport.scrollTop;
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
- if (outcome === 'reset') {
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(() => {
@@ -5,15 +5,21 @@ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDial
5
5
  declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
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
- declare function AlertDialogContent({ className, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
9
- size?: 'default' | 'sm';
8
+ declare function AlertDialogContent({ className, onKeyDown, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
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'>): import("react/jsx-runtime").JSX.Element;
17
+ declare function AlertDialogAction({ className, children, disabled, loading, pending, pendingLabel, primary, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'> & {
18
+ loading?: boolean;
19
+ pending?: boolean;
20
+ pendingLabel?: React.ReactNode;
21
+ primary?: boolean;
22
+ }): import("react/jsx-runtime").JSX.Element;
17
23
  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, };
24
+ export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
19
25
  //# 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;AAEjC,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,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,CAAC,EACzB,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,GACzD,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,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,8 @@ 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 { handleDialogPrimaryActionKeyDown } from './dialog-primary-action';
7
+ import { Spinner } from './spinner';
6
8
  function AlertDialog({ ...props }) {
7
9
  return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
8
10
  }
@@ -15,14 +17,20 @@ function AlertDialogPortal({ ...props }) {
15
17
  function AlertDialogOverlay({ className, ...props }) {
16
18
  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
19
  }
18
- 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 group/alert-dialog-content fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg', className), ...props })] }));
20
+ function AlertDialogContent({ className, onKeyDown, size = 'default', ...props }) {
21
+ 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), onKeyDown: (event) => {
22
+ onKeyDown?.(event);
23
+ handleDialogPrimaryActionKeyDown(event);
24
+ }, ...props }) })] }));
20
25
  }
21
26
  function AlertDialogHeader({ className, ...props }) {
22
27
  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
28
  }
24
29
  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 }));
30
+ 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 }));
31
+ }
32
+ function AlertDialogBody({ className, ...props }) {
33
+ return (_jsx("div", { "data-slot": "alert-dialog-body", className: cn('min-h-0 overflow-y-auto overscroll-contain [scrollbar-gutter:stable]', className), ...props }));
26
34
  }
27
35
  function AlertDialogTitle({ className, ...props }) {
28
36
  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 +41,10 @@ function AlertDialogDescription({ className, ...props }) {
33
41
  function AlertDialogMedia({ className, ...props }) {
34
42
  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
43
  }
36
- function AlertDialogAction({ className, variant = 'default', size = 'default', ...props }) {
37
- return (_jsx(Button, { variant: variant, size: size, asChild: true, children: _jsx(AlertDialogPrimitive.Action, { "data-slot": "alert-dialog-action", className: cn(className), ...props }) }));
44
+ function AlertDialogAction({ className, children, disabled, loading = false, pending = false, pendingLabel, primary = false, variant = 'default', size = 'default', ...props }) {
45
+ return (_jsx(Button, { variant: variant, size: size, disabled: disabled || pending, loading: loading, "aria-busy": pending || undefined, asChild: true, children: _jsxs(AlertDialogPrimitive.Action, { "data-slot": "alert-dialog-action", "data-dialog-primary-action": primary || undefined, "data-pending": pending || undefined, className: cn(className), ...props, children: [pending ? _jsx(Spinner, { "aria-hidden": "true" }) : null, pending && pendingLabel !== undefined ? pendingLabel : children] }) }));
38
46
  }
39
47
  function AlertDialogCancel({ className, variant = 'outline', size = 'default', ...props }) {
40
48
  return (_jsx(Button, { variant: variant, size: size, asChild: true, children: _jsx(AlertDialogPrimitive.Cancel, { "data-slot": "alert-dialog-cancel", className: cn(className), ...props }) }));
41
49
  }
42
- export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
50
+ export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };