@pactor-app/ui 1.44.0 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3PQOJRJD.js → chunk-7VDIDB3K.js} +886 -3357
- package/dist/{chunk-SD2XSQIP.js → chunk-B2Y6JC36.js} +285 -84
- package/dist/{chunk-T3TGKYAB.js → chunk-F7GQYNTG.js} +246 -476
- package/dist/{chunk-HU2RFIWH.js → chunk-OBSD66BK.js} +82 -7
- package/dist/{chunk-A6WUHUJL.js → chunk-RLAOCITX.js} +2 -2
- package/dist/{chunk-7OBUSV5S.js → chunk-YHTRCBKF.js} +184 -59
- package/dist/components/index.cjs +1258 -3614
- package/dist/components/index.d.cts +51 -849
- package/dist/components/index.d.ts +51 -849
- package/dist/components/index.js +9 -45
- package/dist/index.cjs +1663 -3944
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -54
- package/dist/interaction/index.cjs +80 -5
- package/dist/interaction/index.d.cts +26 -0
- package/dist/interaction/index.d.ts +26 -0
- package/dist/interaction/index.js +1 -1
- package/dist/layout/index.cjs +437 -154
- package/dist/layout/index.js +3 -3
- package/dist/ui/index.cjs +1138 -560
- package/dist/ui/index.d.cts +219 -16
- package/dist/ui/index.d.ts +219 -16
- package/dist/ui/index.js +730 -53
- package/package.json +10 -8
- package/src/theme-bridge.css +54 -0
- package/styles.css +95 -182
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Accordion, AccordionItemData, AccordionProps, Affix, AffixProps,
|
|
1
|
+
export { Accordion, AccordionItemData, AccordionProps, Affix, AffixProps, Alert, AlertDialog, AlertDialogProps, AlertProps, AlertVariant, Anchor, AnchorItemData, AnchorProps, AspectRatio, AspectRatioProps, Audio, AudioProps, Avatar, AvatarProps, BackTop, BackTopProps, Badge, BadgeProps, BadgeVariant, Breadcrumb, BreadcrumbItemData, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonVariant, CONTROL_SIZE_AREA, CONTROL_SIZE_BOX, CONTROL_SIZE_BOX_GROW, CONTROL_SIZE_SELECT_ATTR, CONTROL_SIZE_TRIGGER_TEXT, Calendar, CalendarProps, Card, CardProps, Carousel, CarouselImage, CarouselItemData, CarouselProps, Cascader, CascaderOption, CascaderProps, ChatInput, ChatInputProps, Checkbox, CheckboxProps, ChipFilter, ChipFilterItem, ChipFilterProps, ChipNode, ChipNodeProps, ClearHoverButton, ClearHoverButtonProps, CodeBlock, CodeBlockProps, Col, ColBreakpoint, ColProps, ColResponsiveValue, Collapsible, CollapsibleProps, ColorPicker, ColorPickerProps, Combobox, ComboboxOption, ComboboxProps, Command, CommandGroupData, CommandItemData, CommandProps, Container, ContainerProps, ContainerSize, Content, ContentProps, ContextMenu, ContextMenuItemData, ContextMenuProps, ControlSize, DataTable, DataTableColumn, DataTablePagination, DataTableProps, DataTableSort, DataTableSortOrder, DatePicker, DatePickerPreset, DatePickerPresetKey, DatePickerProps, DatePickerRangeProps, DatePickerSingleProps, DateRangeValue, Descriptions, DescriptionsItemData, DescriptionsProps, Dialog, DialogProps, DiffViewer, DiffViewerProps, DocumentPageData, DocumentPreview, DocumentPreviewProps, Drawer, DrawerPlacement, DrawerProps, DropdownMenu, DropdownMenuItemData, DropdownMenuProps, Empty, EmptyProps, Field, FieldProps, FieldRule, FilePreview, FilePreviewKind, FilePreviewProps, Flex, FlexProps, Footer, FooterProps, For, ForProps, Form, FormContextValue, FormProps, Gallery, GalleryItemData, GalleryProps, Grid, GridProps, Header, HeaderBrandPosition, HeaderDropdown, HeaderDropdownItem, HeaderLocale, HeaderMenuItem, HeaderProps, HeaderTheme, HeaderUser, HeaderUserItem, HoverCard, HoverCardProps, ICONS, Icon, IconProps, IconSize, Image, ImageLightbox, ImageLightboxProps, ImageProps, ImageViewer, ImageViewerProps, Input, InputGroup, InputGroupProps, InputOTP, InputOTPProps, InputProps, Item, ItemProps, JSONViewer, JSONViewerProps, Kbd, KbdProps, Label, LabelProps, Layout, LayoutProps, Link, LinkProps, List, ListItemData, ListProps, LoadingOverlay, LoadingOverlayProps, MentionOption, Mentions, MentionsProps, Menu, MenuItem, MenuItemAction, MenuItemActionEvent, MenuProps, Menubar, MenubarLeafItem, MenubarMenuData, MenubarProps, Message, MessageProps, NavigationMenu, NavigationMenuChildItem, NavigationMenuItemData, NavigationMenuProps, Notification, NotificationProps, NumberInput, NumberInputProps, Page, PageProps, Pagination, PaginationProps, Popconfirm, PopconfirmProps, Popover, PopoverProps, Progress, ProgressProps, QRCode, QRCodeProps, RadioGroup, RadioGroupOption, RadioGroupProps, RailTooltip, Rate, RateProps, Resizable, ResizablePanelData, ResizableProps, Result, ResultProps, ResultStatus, RichText, RichTextProps, Row, RowAlign, RowJustify, RowProps, ScrollArea, ScrollAreaProps, Segmented, SegmentedOption, SegmentedProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, SheetSide, Sidebar, SidebarBrand, SidebarNavItem, SidebarProps, Sider, SiderProps, Skeleton, SkeletonProps, SkeletonShape, Slider, SliderProps, Sonner, SonnerProps, Space, SpaceProps, Spinner, SpinnerProps, SpinnerSize, Statistic, StatisticProps, Status, StatusProps, StatusType, StepItemData, StepStatus, Steps, StepsProps, Switch, SwitchProps, TabItem, Table, TableColumn, TablePagination, TablePaginationInfo, TableProps, Tabs, TabsProps, Tag, TagColor, TagProps, Text, TextProps, TextType, Textarea, TextareaProps, TimePicker, TimePickerProps, Timeline, TimelineItemData, TimelineProps, Toggle, ToggleGroup, ToggleGroupOption, ToggleGroupProps, ToggleProps, Tooltip, TooltipProps, Tour, TourProps, TourStep, Transfer, TransferOption, TransferProps, Tree, TreeNodeData, TreeProps, TreeSelect, TreeSelectOption, TreeSelectProps, Typography, TypographyProps, TypographyVariant, Upload, UploadFileMeta, UploadProps, Video, VideoProps, Watermark, WatermarkProps, builtinComponents, createComponentRegistry, diffLines, inferKind, normalizeIconName, registerBuiltinComponents, useFormContext, useOptionalRenderer, useSidebarDrawer } from './components/index.cjs';
|
|
2
2
|
export { MarkdownDslComponent as Markdown, MarkdownDslComponentProps as MarkdownProps } from '@pactor-app/markdown';
|
|
3
3
|
export { AdminBrand, AdminLayout, AdminLayoutBreakpoint, AdminLayoutConfig, AdminLayoutMode, AdminLayoutProps, BlankLayout, BlankLayoutProps, ChatLayout, ChatLayoutBrand, ChatLayoutMenuItem, ChatLayoutProps, LandingLayout, LandingLayoutProps, LayoutComponent, LayoutRegistry, LoginBrand, LoginLayout, LoginLayoutProps, collectDefaultOpenKeys, createLayoutRegistry, findMenuChain, registerBuiltinLayouts, resolveLayout } from './layout/index.cjs';
|
|
4
4
|
export { InteractionProvider, InteractionProviderProps, OVERLAY_CANCEL_PAYLOAD, OverlayConfig, OverlayEntry, OverlayHost, OverlayHostProps, OverlayListener, OverlayManager, ResolvePageFn, UiBridge, UiMessage, UiModal, createUiBridge, registerInteractionActions } from './interaction/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Accordion, AccordionItemData, AccordionProps, Affix, AffixProps,
|
|
1
|
+
export { Accordion, AccordionItemData, AccordionProps, Affix, AffixProps, Alert, AlertDialog, AlertDialogProps, AlertProps, AlertVariant, Anchor, AnchorItemData, AnchorProps, AspectRatio, AspectRatioProps, Audio, AudioProps, Avatar, AvatarProps, BackTop, BackTopProps, Badge, BadgeProps, BadgeVariant, Breadcrumb, BreadcrumbItemData, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonVariant, CONTROL_SIZE_AREA, CONTROL_SIZE_BOX, CONTROL_SIZE_BOX_GROW, CONTROL_SIZE_SELECT_ATTR, CONTROL_SIZE_TRIGGER_TEXT, Calendar, CalendarProps, Card, CardProps, Carousel, CarouselImage, CarouselItemData, CarouselProps, Cascader, CascaderOption, CascaderProps, ChatInput, ChatInputProps, Checkbox, CheckboxProps, ChipFilter, ChipFilterItem, ChipFilterProps, ChipNode, ChipNodeProps, ClearHoverButton, ClearHoverButtonProps, CodeBlock, CodeBlockProps, Col, ColBreakpoint, ColProps, ColResponsiveValue, Collapsible, CollapsibleProps, ColorPicker, ColorPickerProps, Combobox, ComboboxOption, ComboboxProps, Command, CommandGroupData, CommandItemData, CommandProps, Container, ContainerProps, ContainerSize, Content, ContentProps, ContextMenu, ContextMenuItemData, ContextMenuProps, ControlSize, DataTable, DataTableColumn, DataTablePagination, DataTableProps, DataTableSort, DataTableSortOrder, DatePicker, DatePickerPreset, DatePickerPresetKey, DatePickerProps, DatePickerRangeProps, DatePickerSingleProps, DateRangeValue, Descriptions, DescriptionsItemData, DescriptionsProps, Dialog, DialogProps, DiffViewer, DiffViewerProps, DocumentPageData, DocumentPreview, DocumentPreviewProps, Drawer, DrawerPlacement, DrawerProps, DropdownMenu, DropdownMenuItemData, DropdownMenuProps, Empty, EmptyProps, Field, FieldProps, FieldRule, FilePreview, FilePreviewKind, FilePreviewProps, Flex, FlexProps, Footer, FooterProps, For, ForProps, Form, FormContextValue, FormProps, Gallery, GalleryItemData, GalleryProps, Grid, GridProps, Header, HeaderBrandPosition, HeaderDropdown, HeaderDropdownItem, HeaderLocale, HeaderMenuItem, HeaderProps, HeaderTheme, HeaderUser, HeaderUserItem, HoverCard, HoverCardProps, ICONS, Icon, IconProps, IconSize, Image, ImageLightbox, ImageLightboxProps, ImageProps, ImageViewer, ImageViewerProps, Input, InputGroup, InputGroupProps, InputOTP, InputOTPProps, InputProps, Item, ItemProps, JSONViewer, JSONViewerProps, Kbd, KbdProps, Label, LabelProps, Layout, LayoutProps, Link, LinkProps, List, ListItemData, ListProps, LoadingOverlay, LoadingOverlayProps, MentionOption, Mentions, MentionsProps, Menu, MenuItem, MenuItemAction, MenuItemActionEvent, MenuProps, Menubar, MenubarLeafItem, MenubarMenuData, MenubarProps, Message, MessageProps, NavigationMenu, NavigationMenuChildItem, NavigationMenuItemData, NavigationMenuProps, Notification, NotificationProps, NumberInput, NumberInputProps, Page, PageProps, Pagination, PaginationProps, Popconfirm, PopconfirmProps, Popover, PopoverProps, Progress, ProgressProps, QRCode, QRCodeProps, RadioGroup, RadioGroupOption, RadioGroupProps, RailTooltip, Rate, RateProps, Resizable, ResizablePanelData, ResizableProps, Result, ResultProps, ResultStatus, RichText, RichTextProps, Row, RowAlign, RowJustify, RowProps, ScrollArea, ScrollAreaProps, Segmented, SegmentedOption, SegmentedProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, SheetSide, Sidebar, SidebarBrand, SidebarNavItem, SidebarProps, Sider, SiderProps, Skeleton, SkeletonProps, SkeletonShape, Slider, SliderProps, Sonner, SonnerProps, Space, SpaceProps, Spinner, SpinnerProps, SpinnerSize, Statistic, StatisticProps, Status, StatusProps, StatusType, StepItemData, StepStatus, Steps, StepsProps, Switch, SwitchProps, TabItem, Table, TableColumn, TablePagination, TablePaginationInfo, TableProps, Tabs, TabsProps, Tag, TagColor, TagProps, Text, TextProps, TextType, Textarea, TextareaProps, TimePicker, TimePickerProps, Timeline, TimelineItemData, TimelineProps, Toggle, ToggleGroup, ToggleGroupOption, ToggleGroupProps, ToggleProps, Tooltip, TooltipProps, Tour, TourProps, TourStep, Transfer, TransferOption, TransferProps, Tree, TreeNodeData, TreeProps, TreeSelect, TreeSelectOption, TreeSelectProps, Typography, TypographyProps, TypographyVariant, Upload, UploadFileMeta, UploadProps, Video, VideoProps, Watermark, WatermarkProps, builtinComponents, createComponentRegistry, diffLines, inferKind, normalizeIconName, registerBuiltinComponents, useFormContext, useOptionalRenderer, useSidebarDrawer } from './components/index.js';
|
|
2
2
|
export { MarkdownDslComponent as Markdown, MarkdownDslComponentProps as MarkdownProps } from '@pactor-app/markdown';
|
|
3
3
|
export { AdminBrand, AdminLayout, AdminLayoutBreakpoint, AdminLayoutConfig, AdminLayoutMode, AdminLayoutProps, BlankLayout, BlankLayoutProps, ChatLayout, ChatLayoutBrand, ChatLayoutMenuItem, ChatLayoutProps, LandingLayout, LandingLayoutProps, LayoutComponent, LayoutRegistry, LoginBrand, LoginLayout, LoginLayoutProps, collectDefaultOpenKeys, createLayoutRegistry, findMenuChain, registerBuiltinLayouts, resolveLayout } from './layout/index.js';
|
|
4
4
|
export { InteractionProvider, InteractionProviderProps, OVERLAY_CANCEL_PAYLOAD, OverlayConfig, OverlayEntry, OverlayHost, OverlayHostProps, OverlayListener, OverlayManager, ResolvePageFn, UiBridge, UiMessage, UiModal, createUiBridge, registerInteractionActions } from './interaction/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Accordion,
|
|
3
3
|
Affix,
|
|
4
|
-
AgentStatus,
|
|
5
4
|
Alert,
|
|
6
5
|
AlertDialog,
|
|
7
6
|
Anchor,
|
|
8
|
-
ArtifactPanel,
|
|
9
7
|
AspectRatio,
|
|
10
|
-
Attachment,
|
|
11
8
|
Audio,
|
|
12
9
|
Avatar,
|
|
13
10
|
BackTop,
|
|
14
11
|
Badge,
|
|
15
12
|
Breadcrumb,
|
|
16
|
-
Bubble,
|
|
17
13
|
Button,
|
|
18
14
|
ButtonGroup,
|
|
19
15
|
CONTROL_SIZE_AREA,
|
|
@@ -26,12 +22,9 @@ import {
|
|
|
26
22
|
Carousel,
|
|
27
23
|
Cascader,
|
|
28
24
|
ChatInput,
|
|
29
|
-
ChatMessage,
|
|
30
|
-
ChatPage,
|
|
31
25
|
Checkbox,
|
|
32
26
|
ChipFilter,
|
|
33
27
|
ChipNode,
|
|
34
|
-
Citation,
|
|
35
28
|
ClearHoverButton,
|
|
36
29
|
CodeBlock,
|
|
37
30
|
Col,
|
|
@@ -39,11 +32,9 @@ import {
|
|
|
39
32
|
ColorPicker,
|
|
40
33
|
Combobox,
|
|
41
34
|
Command,
|
|
42
|
-
Composer,
|
|
43
35
|
Container,
|
|
44
36
|
Content,
|
|
45
37
|
ContextMenu,
|
|
46
|
-
ConversationList,
|
|
47
38
|
DataTable,
|
|
48
39
|
DatePicker,
|
|
49
40
|
Descriptions,
|
|
@@ -51,7 +42,6 @@ import {
|
|
|
51
42
|
DiffViewer,
|
|
52
43
|
DocumentPreview,
|
|
53
44
|
Drawer,
|
|
54
|
-
DropdownMenu,
|
|
55
45
|
Empty,
|
|
56
46
|
Field,
|
|
57
47
|
FilePreview,
|
|
@@ -81,7 +71,6 @@ import {
|
|
|
81
71
|
Mentions,
|
|
82
72
|
Menubar,
|
|
83
73
|
Message,
|
|
84
|
-
MessageList,
|
|
85
74
|
NavigationMenu,
|
|
86
75
|
Notification,
|
|
87
76
|
NumberInput,
|
|
@@ -90,7 +79,6 @@ import {
|
|
|
90
79
|
Popconfirm,
|
|
91
80
|
Popover,
|
|
92
81
|
Progress,
|
|
93
|
-
Prompt,
|
|
94
82
|
QRCode,
|
|
95
83
|
RadioGroup,
|
|
96
84
|
Rate,
|
|
@@ -101,7 +89,6 @@ import {
|
|
|
101
89
|
ScrollArea,
|
|
102
90
|
Segmented,
|
|
103
91
|
Select,
|
|
104
|
-
Sender,
|
|
105
92
|
Separator,
|
|
106
93
|
Sheet,
|
|
107
94
|
Sider,
|
|
@@ -113,22 +100,16 @@ import {
|
|
|
113
100
|
Statistic,
|
|
114
101
|
Status,
|
|
115
102
|
Steps,
|
|
116
|
-
StepsPanel,
|
|
117
|
-
StreamingText,
|
|
118
|
-
Suggestion,
|
|
119
103
|
Switch,
|
|
120
104
|
Table,
|
|
121
105
|
Tabs,
|
|
122
106
|
Tag,
|
|
123
107
|
Text,
|
|
124
108
|
Textarea,
|
|
125
|
-
Thinking,
|
|
126
109
|
TimePicker,
|
|
127
110
|
Timeline,
|
|
128
111
|
Toggle,
|
|
129
112
|
ToggleGroup,
|
|
130
|
-
ToolCall,
|
|
131
|
-
Tooltip,
|
|
132
113
|
Tour,
|
|
133
114
|
Transfer,
|
|
134
115
|
Tree,
|
|
@@ -137,15 +118,22 @@ import {
|
|
|
137
118
|
Upload,
|
|
138
119
|
Video,
|
|
139
120
|
Watermark,
|
|
140
|
-
Welcome,
|
|
141
|
-
buildArtifactTree,
|
|
142
121
|
builtinComponents,
|
|
143
122
|
createComponentRegistry,
|
|
144
123
|
diffLines,
|
|
145
124
|
inferKind,
|
|
146
125
|
registerBuiltinComponents,
|
|
147
|
-
useFormContext
|
|
148
|
-
|
|
126
|
+
useFormContext,
|
|
127
|
+
useOptionalRenderer
|
|
128
|
+
} from "./chunk-7VDIDB3K.js";
|
|
129
|
+
import {
|
|
130
|
+
InteractionProvider,
|
|
131
|
+
OVERLAY_CANCEL_PAYLOAD,
|
|
132
|
+
OverlayHost,
|
|
133
|
+
OverlayManager,
|
|
134
|
+
createUiBridge,
|
|
135
|
+
registerInteractionActions
|
|
136
|
+
} from "./chunk-OBSD66BK.js";
|
|
149
137
|
import {
|
|
150
138
|
AdminLayout,
|
|
151
139
|
BlankLayout,
|
|
@@ -157,46 +145,36 @@ import {
|
|
|
157
145
|
findMenuChain,
|
|
158
146
|
registerBuiltinLayouts,
|
|
159
147
|
resolveLayout
|
|
160
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-RLAOCITX.js";
|
|
161
149
|
import {
|
|
150
|
+
DropdownMenu,
|
|
162
151
|
ICONS,
|
|
163
152
|
Icon,
|
|
164
153
|
Menu,
|
|
165
154
|
RailTooltip,
|
|
166
155
|
Sidebar,
|
|
156
|
+
Tooltip,
|
|
167
157
|
normalizeIconName,
|
|
168
158
|
useSidebarDrawer
|
|
169
|
-
} from "./chunk-
|
|
170
|
-
import
|
|
171
|
-
InteractionProvider,
|
|
172
|
-
OVERLAY_CANCEL_PAYLOAD,
|
|
173
|
-
OverlayHost,
|
|
174
|
-
OverlayManager,
|
|
175
|
-
createUiBridge,
|
|
176
|
-
registerInteractionActions
|
|
177
|
-
} from "./chunk-HU2RFIWH.js";
|
|
178
|
-
import "./chunk-T3TGKYAB.js";
|
|
179
|
-
import "./chunk-7OBUSV5S.js";
|
|
159
|
+
} from "./chunk-B2Y6JC36.js";
|
|
160
|
+
import "./chunk-F7GQYNTG.js";
|
|
180
161
|
import "./chunk-YVHPJHW3.js";
|
|
162
|
+
import "./chunk-YHTRCBKF.js";
|
|
181
163
|
import "./chunk-WKJUCGV4.js";
|
|
182
164
|
export {
|
|
183
165
|
Accordion,
|
|
184
166
|
AdminLayout,
|
|
185
167
|
Affix,
|
|
186
|
-
AgentStatus,
|
|
187
168
|
Alert,
|
|
188
169
|
AlertDialog,
|
|
189
170
|
Anchor,
|
|
190
|
-
ArtifactPanel,
|
|
191
171
|
AspectRatio,
|
|
192
|
-
Attachment,
|
|
193
172
|
Audio,
|
|
194
173
|
Avatar,
|
|
195
174
|
BackTop,
|
|
196
175
|
Badge,
|
|
197
176
|
BlankLayout,
|
|
198
177
|
Breadcrumb,
|
|
199
|
-
Bubble,
|
|
200
178
|
Button,
|
|
201
179
|
ButtonGroup,
|
|
202
180
|
CONTROL_SIZE_AREA,
|
|
@@ -210,12 +188,9 @@ export {
|
|
|
210
188
|
Cascader,
|
|
211
189
|
ChatInput,
|
|
212
190
|
ChatLayout,
|
|
213
|
-
ChatMessage,
|
|
214
|
-
ChatPage,
|
|
215
191
|
Checkbox,
|
|
216
192
|
ChipFilter,
|
|
217
193
|
ChipNode,
|
|
218
|
-
Citation,
|
|
219
194
|
ClearHoverButton,
|
|
220
195
|
CodeBlock,
|
|
221
196
|
Col,
|
|
@@ -223,11 +198,9 @@ export {
|
|
|
223
198
|
ColorPicker,
|
|
224
199
|
Combobox,
|
|
225
200
|
Command,
|
|
226
|
-
Composer,
|
|
227
201
|
Container,
|
|
228
202
|
Content,
|
|
229
203
|
ContextMenu,
|
|
230
|
-
ConversationList,
|
|
231
204
|
DataTable,
|
|
232
205
|
DatePicker,
|
|
233
206
|
Descriptions,
|
|
@@ -271,7 +244,6 @@ export {
|
|
|
271
244
|
Menu,
|
|
272
245
|
Menubar,
|
|
273
246
|
Message,
|
|
274
|
-
MessageList,
|
|
275
247
|
NavigationMenu,
|
|
276
248
|
Notification,
|
|
277
249
|
NumberInput,
|
|
@@ -283,7 +255,6 @@ export {
|
|
|
283
255
|
Popconfirm,
|
|
284
256
|
Popover,
|
|
285
257
|
Progress,
|
|
286
|
-
Prompt,
|
|
287
258
|
QRCode,
|
|
288
259
|
RadioGroup,
|
|
289
260
|
RailTooltip,
|
|
@@ -295,7 +266,6 @@ export {
|
|
|
295
266
|
ScrollArea,
|
|
296
267
|
Segmented,
|
|
297
268
|
Select,
|
|
298
|
-
Sender,
|
|
299
269
|
Separator,
|
|
300
270
|
Sheet,
|
|
301
271
|
Sidebar,
|
|
@@ -308,21 +278,16 @@ export {
|
|
|
308
278
|
Statistic,
|
|
309
279
|
Status,
|
|
310
280
|
Steps,
|
|
311
|
-
StepsPanel,
|
|
312
|
-
StreamingText,
|
|
313
|
-
Suggestion,
|
|
314
281
|
Switch,
|
|
315
282
|
Table,
|
|
316
283
|
Tabs,
|
|
317
284
|
Tag,
|
|
318
285
|
Text,
|
|
319
286
|
Textarea,
|
|
320
|
-
Thinking,
|
|
321
287
|
TimePicker,
|
|
322
288
|
Timeline,
|
|
323
289
|
Toggle,
|
|
324
290
|
ToggleGroup,
|
|
325
|
-
ToolCall,
|
|
326
291
|
Tooltip,
|
|
327
292
|
Tour,
|
|
328
293
|
Transfer,
|
|
@@ -332,8 +297,6 @@ export {
|
|
|
332
297
|
Upload,
|
|
333
298
|
Video,
|
|
334
299
|
Watermark,
|
|
335
|
-
Welcome,
|
|
336
|
-
buildArtifactTree,
|
|
337
300
|
builtinComponents,
|
|
338
301
|
collectDefaultOpenKeys,
|
|
339
302
|
createComponentRegistry,
|
|
@@ -348,5 +311,6 @@ export {
|
|
|
348
311
|
registerInteractionActions,
|
|
349
312
|
resolveLayout,
|
|
350
313
|
useFormContext,
|
|
314
|
+
useOptionalRenderer,
|
|
351
315
|
useSidebarDrawer
|
|
352
316
|
};
|
|
@@ -656,7 +656,18 @@ function OverlayEntryView({
|
|
|
656
656
|
resolvePage
|
|
657
657
|
}) {
|
|
658
658
|
const { t } = (0, import_runtime3.useI18n)();
|
|
659
|
+
const childRuntimeRef = (0, import_react2.useRef)(null);
|
|
659
660
|
const handleCancel = () => manager.close(entry.id);
|
|
661
|
+
const handleConfirm = () => {
|
|
662
|
+
const footer2 = entry.footer ?? {};
|
|
663
|
+
const forms = entry.page ? childRuntimeRef.current?.context.forms : renderer.context.forms;
|
|
664
|
+
const handle = forms?.get(footer2.confirmForm ?? "default");
|
|
665
|
+
if (handle?.submit) {
|
|
666
|
+
handle.submit();
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
manager.close(entry.id, { success: true });
|
|
670
|
+
};
|
|
660
671
|
let body = null;
|
|
661
672
|
if (entry.content) {
|
|
662
673
|
body = renderer.renderChildren([entry.content], {
|
|
@@ -669,12 +680,24 @@ function OverlayEntryView({
|
|
|
669
680
|
{
|
|
670
681
|
entry,
|
|
671
682
|
renderer,
|
|
672
|
-
resolvePage
|
|
683
|
+
resolvePage,
|
|
684
|
+
onRuntime: (runtime) => {
|
|
685
|
+
childRuntimeRef.current = runtime;
|
|
686
|
+
}
|
|
673
687
|
}
|
|
674
688
|
);
|
|
675
689
|
}
|
|
690
|
+
const footer = entry.footer ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
691
|
+
OverlayFooter,
|
|
692
|
+
{
|
|
693
|
+
footer: entry.footer,
|
|
694
|
+
slot: entry.type === "drawer" ? "drawer-footer" : "overlay-modal-footer",
|
|
695
|
+
onCancel: handleCancel,
|
|
696
|
+
onConfirm: handleConfirm
|
|
697
|
+
}
|
|
698
|
+
) : null;
|
|
676
699
|
if (entry.type === "drawer") {
|
|
677
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ShadcnDrawerView, { entry, onCancel: handleCancel, children: body });
|
|
700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ShadcnDrawerView, { entry, onCancel: handleCancel, footer, children: body });
|
|
678
701
|
}
|
|
679
702
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
680
703
|
Dialog,
|
|
@@ -711,16 +734,64 @@ function OverlayEntryView({
|
|
|
711
734
|
}
|
|
712
735
|
)
|
|
713
736
|
] }),
|
|
714
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { "data-slot": "overlay-modal-body", children: body })
|
|
737
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { "data-slot": "overlay-modal-body", children: body }),
|
|
738
|
+
footer
|
|
715
739
|
]
|
|
716
740
|
}
|
|
717
741
|
)
|
|
718
742
|
}
|
|
719
743
|
);
|
|
720
744
|
}
|
|
745
|
+
function OverlayFooter({
|
|
746
|
+
footer,
|
|
747
|
+
slot,
|
|
748
|
+
onCancel,
|
|
749
|
+
onConfirm
|
|
750
|
+
}) {
|
|
751
|
+
const { t } = (0, import_runtime3.useI18n)();
|
|
752
|
+
if (footer.hideCancel && footer.hideConfirm) {
|
|
753
|
+
return null;
|
|
754
|
+
}
|
|
755
|
+
const confirmBusy = footer.confirmLoading === true;
|
|
756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
757
|
+
"div",
|
|
758
|
+
{
|
|
759
|
+
"data-slot": slot,
|
|
760
|
+
className: cn(
|
|
761
|
+
"flex items-center justify-end gap-2",
|
|
762
|
+
slot === "drawer-footer" && "border-t border-border px-6 py-4"
|
|
763
|
+
),
|
|
764
|
+
children: [
|
|
765
|
+
footer.hideCancel ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
766
|
+
Button,
|
|
767
|
+
{
|
|
768
|
+
variant: "outline",
|
|
769
|
+
disabled: confirmBusy,
|
|
770
|
+
onClick: onCancel,
|
|
771
|
+
"data-slot": "overlay-cancel",
|
|
772
|
+
children: footer.cancelText ?? t("pactor.overlay.cancel")
|
|
773
|
+
}
|
|
774
|
+
),
|
|
775
|
+
footer.hideConfirm ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
776
|
+
Button,
|
|
777
|
+
{
|
|
778
|
+
disabled: footer.confirmDisabled === true || confirmBusy,
|
|
779
|
+
onClick: onConfirm,
|
|
780
|
+
"data-slot": "overlay-confirm",
|
|
781
|
+
children: [
|
|
782
|
+
confirmBusy ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.Loader2, { className: "animate-spin" }) : null,
|
|
783
|
+
footer.confirmText ?? t("pactor.overlay.confirm")
|
|
784
|
+
]
|
|
785
|
+
}
|
|
786
|
+
)
|
|
787
|
+
]
|
|
788
|
+
}
|
|
789
|
+
);
|
|
790
|
+
}
|
|
721
791
|
function ShadcnDrawerView({
|
|
722
792
|
entry,
|
|
723
793
|
onCancel,
|
|
794
|
+
footer,
|
|
724
795
|
children
|
|
725
796
|
}) {
|
|
726
797
|
const { t } = (0, import_runtime3.useI18n)();
|
|
@@ -764,7 +835,8 @@ function ShadcnDrawerView({
|
|
|
764
835
|
]
|
|
765
836
|
}
|
|
766
837
|
),
|
|
767
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { "data-slot": "drawer-body", className: "flex-1 overflow-auto p-6", children })
|
|
838
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { "data-slot": "drawer-body", className: "flex-1 overflow-auto p-6", children }),
|
|
839
|
+
footer
|
|
768
840
|
]
|
|
769
841
|
}
|
|
770
842
|
)
|
|
@@ -774,7 +846,8 @@ function ShadcnDrawerView({
|
|
|
774
846
|
function PageOverlayBody({
|
|
775
847
|
entry,
|
|
776
848
|
renderer,
|
|
777
|
-
resolvePage
|
|
849
|
+
resolvePage,
|
|
850
|
+
onRuntime
|
|
778
851
|
}) {
|
|
779
852
|
const [child, setChild] = (0, import_react2.useState)(null);
|
|
780
853
|
const [error, setError] = (0, import_react2.useState)(null);
|
|
@@ -808,6 +881,7 @@ function PageOverlayBody({
|
|
|
808
881
|
route: { params: entry.params ?? {} }
|
|
809
882
|
});
|
|
810
883
|
setChild(created);
|
|
884
|
+
onRuntime?.(created);
|
|
811
885
|
} catch (cause) {
|
|
812
886
|
if (!cancelled) {
|
|
813
887
|
setError(cause instanceof Error ? cause : new Error(String(cause)));
|
|
@@ -816,6 +890,7 @@ function PageOverlayBody({
|
|
|
816
890
|
})();
|
|
817
891
|
return () => {
|
|
818
892
|
cancelled = true;
|
|
893
|
+
onRuntime?.(null);
|
|
819
894
|
void created?.destroy();
|
|
820
895
|
};
|
|
821
896
|
}, [entry.id]);
|
|
@@ -3,6 +3,30 @@ import { ActionRegistry } from '@pactor-app/runtime';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Overlay 底部按钮区配置(modal / drawer 通用)。声明 `footer` 即启用按钮区;
|
|
8
|
+
* 取消 / 确认两个按钮缺省都展示,可分别隐藏。
|
|
9
|
+
*/
|
|
10
|
+
interface OverlayFooterConfig {
|
|
11
|
+
/** 取消按钮文案(缺省 i18n「取消」);点击 = 取消语义关闭({ success: false }) */
|
|
12
|
+
cancelText?: string;
|
|
13
|
+
/** 确认按钮文案(缺省 i18n「确认」) */
|
|
14
|
+
confirmText?: string;
|
|
15
|
+
/** 隐藏取消按钮 */
|
|
16
|
+
hideCancel?: boolean;
|
|
17
|
+
/** 隐藏确认按钮 */
|
|
18
|
+
hideConfirm?: boolean;
|
|
19
|
+
/** 确认按钮禁用 */
|
|
20
|
+
confirmDisabled?: boolean;
|
|
21
|
+
/** 确认按钮 loading(加载中并禁用;求值时机同 title 等配置字段) */
|
|
22
|
+
confirmLoading?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 确认键要提交的表单名(overlay 内容里 Form 的 name,缺省 'default'):
|
|
25
|
+
* 命中 = requestSubmit(校验通过后走表单自身 onSubmit 链,典型以
|
|
26
|
+
* overlay.close 携带表单值收尾);未命中 = 以 `{ success: true }` 关闭
|
|
27
|
+
*/
|
|
28
|
+
confirmForm?: string;
|
|
29
|
+
}
|
|
6
30
|
/**
|
|
7
31
|
* Overlay 打开配置(设计文档第 45 节,决策 D1)。
|
|
8
32
|
*
|
|
@@ -24,6 +48,8 @@ interface OverlayConfig {
|
|
|
24
48
|
};
|
|
25
49
|
/** 传入 overlay 内容作用域的 `params` 键 */
|
|
26
50
|
params?: Record<string, unknown>;
|
|
51
|
+
/** 底部按钮区(缺省不渲染;声明后取消/确认缺省都展示) */
|
|
52
|
+
footer?: OverlayFooterConfig;
|
|
27
53
|
}
|
|
28
54
|
/** 堆栈条目:配置 + 生成的 id */
|
|
29
55
|
interface OverlayEntry extends OverlayConfig {
|
|
@@ -3,6 +3,30 @@ import { ActionRegistry } from '@pactor-app/runtime';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Overlay 底部按钮区配置(modal / drawer 通用)。声明 `footer` 即启用按钮区;
|
|
8
|
+
* 取消 / 确认两个按钮缺省都展示,可分别隐藏。
|
|
9
|
+
*/
|
|
10
|
+
interface OverlayFooterConfig {
|
|
11
|
+
/** 取消按钮文案(缺省 i18n「取消」);点击 = 取消语义关闭({ success: false }) */
|
|
12
|
+
cancelText?: string;
|
|
13
|
+
/** 确认按钮文案(缺省 i18n「确认」) */
|
|
14
|
+
confirmText?: string;
|
|
15
|
+
/** 隐藏取消按钮 */
|
|
16
|
+
hideCancel?: boolean;
|
|
17
|
+
/** 隐藏确认按钮 */
|
|
18
|
+
hideConfirm?: boolean;
|
|
19
|
+
/** 确认按钮禁用 */
|
|
20
|
+
confirmDisabled?: boolean;
|
|
21
|
+
/** 确认按钮 loading(加载中并禁用;求值时机同 title 等配置字段) */
|
|
22
|
+
confirmLoading?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 确认键要提交的表单名(overlay 内容里 Form 的 name,缺省 'default'):
|
|
25
|
+
* 命中 = requestSubmit(校验通过后走表单自身 onSubmit 链,典型以
|
|
26
|
+
* overlay.close 携带表单值收尾);未命中 = 以 `{ success: true }` 关闭
|
|
27
|
+
*/
|
|
28
|
+
confirmForm?: string;
|
|
29
|
+
}
|
|
6
30
|
/**
|
|
7
31
|
* Overlay 打开配置(设计文档第 45 节,决策 D1)。
|
|
8
32
|
*
|
|
@@ -24,6 +48,8 @@ interface OverlayConfig {
|
|
|
24
48
|
};
|
|
25
49
|
/** 传入 overlay 内容作用域的 `params` 键 */
|
|
26
50
|
params?: Record<string, unknown>;
|
|
51
|
+
/** 底部按钮区(缺省不渲染;声明后取消/确认缺省都展示) */
|
|
52
|
+
footer?: OverlayFooterConfig;
|
|
27
53
|
}
|
|
28
54
|
/** 堆栈条目:配置 + 生成的 id */
|
|
29
55
|
interface OverlayEntry extends OverlayConfig {
|