@duskmoon-dev/components 0.6.4 → 2.0.0-rc.1
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-rd10x4gc.js → chunk-kpm1rq54.js} +9 -9
- package/dist/{chunk-fwjzvsrx.js → chunk-q5qdwm90.js} +4 -4
- package/dist/{chunk-kg46s2vk.js → chunk-yxp9gq2h.js} +11 -4
- package/dist/classes/alert.d.ts +1 -1
- package/dist/classes/auto-complete.d.ts +1 -1
- package/dist/classes/avatar.d.ts +1 -1
- package/dist/classes/badge.d.ts +1 -1
- package/dist/classes/button.d.ts +1 -1
- package/dist/classes/calendar.d.ts +1 -1
- package/dist/classes/card.d.ts +1 -1
- package/dist/classes/carousel.d.ts +1 -1
- package/dist/classes/cascader.d.ts +1 -1
- package/dist/classes/chat.d.ts +1 -1
- package/dist/classes/checkbox.d.ts +1 -1
- package/dist/classes/collapse.d.ts +1 -1
- package/dist/classes/color-picker.d.ts +1 -1
- package/dist/classes/date-picker.d.ts +1 -1
- package/dist/classes/descriptions.d.ts +1 -1
- package/dist/classes/divider.d.ts +1 -1
- package/dist/classes/dm-query.d.ts +1 -1
- package/dist/classes/dm-splitter.d.ts +1 -1
- package/dist/classes/dm-status.d.ts +1 -1
- package/dist/classes/dm-tabs.d.ts +1 -1
- package/dist/classes/drawer.d.ts +1 -1
- package/dist/classes/dropdown.d.ts +1 -1
- package/dist/classes/float-button.d.ts +1 -1
- package/dist/classes/index.d.ts +99 -99
- package/dist/classes/index.js +182 -182
- package/dist/classes/input-number.d.ts +1 -1
- package/dist/classes/input.d.ts +1 -1
- package/dist/classes/list.d.ts +1 -1
- package/dist/classes/mentions.d.ts +1 -1
- package/dist/classes/menu.d.ts +1 -1
- package/dist/classes/message.d.ts +1 -1
- package/dist/classes/notification.d.ts +1 -1
- package/dist/classes/otp-input.d.ts +1 -1
- package/dist/classes/pagination.d.ts +1 -1
- package/dist/classes/popconfirm.d.ts +1 -1
- package/dist/classes/popover.d.ts +1 -1
- package/dist/classes/progress.d.ts +1 -1
- package/dist/classes/qr-code.d.ts +1 -1
- package/dist/classes/radio.d.ts +1 -1
- package/dist/classes/rate.d.ts +1 -1
- package/dist/classes/result.d.ts +1 -1
- package/dist/classes/row.d.ts +1 -1
- package/dist/classes/segmented.d.ts +1 -1
- package/dist/classes/select.d.ts +1 -1
- package/dist/classes/skeleton.d.ts +1 -1
- package/dist/classes/slider.d.ts +1 -1
- package/dist/classes/space.d.ts +1 -1
- package/dist/classes/spin.d.ts +1 -1
- package/dist/classes/splitter.d.ts +1 -1
- package/dist/classes/steps.d.ts +1 -1
- package/dist/classes/switch.d.ts +1 -1
- package/dist/classes/tabs.d.ts +1 -1
- package/dist/classes/tag.d.ts +1 -1
- package/dist/classes/time-picker.d.ts +1 -1
- package/dist/classes/timeline.d.ts +1 -1
- package/dist/classes/tooltip.d.ts +1 -1
- package/dist/classes/tour.d.ts +1 -1
- package/dist/classes/typography.d.ts +1 -1
- package/dist/classes/upload.d.ts +1 -1
- package/dist/components/affix/Affix.d.ts +1 -1
- package/dist/components/affix/index.d.ts +2 -2
- package/dist/components/affix/index.js +1 -1
- package/dist/components/alert/Alert.d.ts +1 -1
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anchor/Anchor.d.ts +1 -1
- package/dist/components/anchor/index.d.ts +2 -2
- package/dist/components/anchor/index.js +1 -1
- package/dist/components/app/App.d.ts +2 -2
- package/dist/components/app/App.types.d.ts +3 -3
- package/dist/components/app/index.d.ts +2 -2
- package/dist/components/app/index.js +82 -82
- package/dist/components/auto-complete/AutoComplete.d.ts +1 -1
- package/dist/components/auto-complete/index.d.ts +2 -2
- package/dist/components/auto-complete/index.js +1 -1
- package/dist/components/avatar/Avatar.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/back-top/BackTop.d.ts +1 -1
- package/dist/components/back-top/index.d.ts +2 -2
- package/dist/components/back-top/index.js +1 -1
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/index.d.ts +2 -2
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +1 -1
- package/dist/components/calendar/Calendar.d.ts +1 -1
- package/dist/components/calendar/index.d.ts +2 -2
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/Card.d.ts +1 -1
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/index.d.ts +2 -2
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/cascader/Cascader.d.ts +1 -1
- package/dist/components/cascader/index.d.ts +2 -2
- package/dist/components/cascader/index.js +3 -3
- package/dist/components/chat/Chat.d.ts +1 -1
- package/dist/components/chat/Chat.types.d.ts +5 -5
- package/dist/components/chat/ChatAuthoritativeQueue.d.ts +1 -1
- package/dist/components/chat/ChatComposer.d.ts +1 -1
- package/dist/components/chat/ChatPrimitives.d.ts +1 -1
- package/dist/components/chat/ChatSessionComposer.d.ts +2 -2
- package/dist/components/chat/ChatSessionComposer.types.d.ts +6 -6
- package/dist/components/chat/ComposerAttachment.types.d.ts +1 -1
- package/dist/components/chat/ComposerDraft.types.d.ts +1 -1
- package/dist/components/chat/ComposerProvider.types.d.ts +1 -1
- package/dist/components/chat/ComposerQueue.types.d.ts +1 -1
- package/dist/components/chat/ComposerSession.types.d.ts +1 -1
- package/dist/components/chat/ComposerSettings.d.ts +1 -1
- package/dist/components/chat/ComposerSettingsMenus.d.ts +1 -1
- package/dist/components/chat/composer/CompletionList.d.ts +1 -1
- package/dist/components/chat/composer/ComposerShell.d.ts +2 -2
- package/dist/components/chat/composer/DraftLifecycle.d.ts +3 -3
- package/dist/components/chat/composer/EditorAdapter.types.d.ts +2 -2
- package/dist/components/chat/composer/PlainEditor.d.ts +1 -1
- package/dist/components/chat/composer/PlainSemanticEditor.d.ts +2 -2
- package/dist/components/chat/composer/SemanticComposer.d.ts +2 -2
- package/dist/components/chat/composer/attachments.d.ts +1 -1
- package/dist/components/chat/composer/compatibility.types.d.ts +2 -2
- package/dist/components/chat/composer/document.d.ts +1 -1
- package/dist/components/chat/composer/drafts.d.ts +1 -1
- package/dist/components/chat/composer/legacy.d.ts +1 -1
- package/dist/components/chat/composer/providers.d.ts +2 -2
- package/dist/components/chat/composer/session.d.ts +2 -2
- package/dist/components/chat/composer/useComposerAttachments.d.ts +1 -1
- package/dist/components/chat/composer/useComposerDraft.d.ts +1 -1
- package/dist/components/chat/composer/useComposerProviders.d.ts +2 -2
- package/dist/components/chat/composer/useComposerSession.d.ts +1 -1
- package/dist/components/chat/index.d.ts +26 -26
- package/dist/components/chat/index.js +246 -248
- package/dist/components/chat/rich/LexicalEditor.d.ts +1 -1
- package/dist/components/chat/rich/RichChatComposer.d.ts +1 -1
- package/dist/components/chat/rich/index.d.ts +2 -2
- package/dist/components/chat/rich/index.js +17 -47
- package/dist/components/chat/rich/nodes.d.ts +2 -2
- package/dist/components/checkbox/Checkbox.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/col/Col.d.ts +1 -1
- package/dist/components/col/index.d.ts +2 -2
- package/dist/components/col/index.js +1 -1
- package/dist/components/collapse/Collapse.d.ts +1 -1
- package/dist/components/collapse/index.d.ts +2 -2
- package/dist/components/collapse/index.js +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/color-picker/index.js +9 -9
- package/dist/components/config-provider/ConfigProvider.d.ts +1 -1
- package/dist/components/config-provider/index.d.ts +2 -2
- package/dist/components/config-provider/index.js +1 -1
- package/dist/components/console-page/ConsolePage.d.ts +1 -1
- package/dist/components/console-page/ConsolePage.types.d.ts +1 -1
- package/dist/components/console-page/index.d.ts +2 -2
- package/dist/components/console-page/index.js +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +1 -1
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/date-picker/index.js +4 -4
- package/dist/components/descriptions/Descriptions.d.ts +1 -1
- package/dist/components/descriptions/index.d.ts +2 -2
- package/dist/components/descriptions/index.js +1 -1
- package/dist/components/divider/Divider.d.ts +1 -1
- package/dist/components/divider/index.d.ts +2 -2
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dm-auxiliary/DmAuxiliary.d.ts +1 -1
- package/dist/components/dm-auxiliary/index.d.ts +2 -2
- package/dist/components/dm-auxiliary/index.js +1 -1
- package/dist/components/dm-breadcrumb/DmBreadcrumb.d.ts +1 -1
- package/dist/components/dm-breadcrumb/DmBreadcrumb.types.d.ts +1 -1
- package/dist/components/dm-breadcrumb/index.d.ts +2 -2
- package/dist/components/dm-breadcrumb/index.js +19 -19
- package/dist/components/dm-date-picker/DmDatePicker.d.ts +2 -2
- package/dist/components/dm-date-picker/DmDatePicker.types.d.ts +1 -1
- package/dist/components/dm-date-picker/index.d.ts +2 -2
- package/dist/components/dm-date-picker/index.js +101 -101
- package/dist/components/dm-drawer/DmDrawer.d.ts +1 -1
- package/dist/components/dm-drawer/DmDrawer.types.d.ts +2 -2
- package/dist/components/dm-drawer/index.d.ts +2 -2
- package/dist/components/dm-drawer/index.js +20 -20
- package/dist/components/dm-infinite-scroll/DmInfiniteScroll.d.ts +1 -1
- package/dist/components/dm-infinite-scroll/index.d.ts +2 -2
- package/dist/components/dm-infinite-scroll/index.js +1 -1
- package/dist/components/dm-layout/DmLayout.d.ts +1 -1
- package/dist/components/dm-layout/DmLayout.types.d.ts +3 -3
- package/dist/components/dm-layout/index.d.ts +2 -2
- package/dist/components/dm-layout/index.js +646 -646
- package/dist/components/dm-menu/DmMenu.d.ts +2 -2
- package/dist/components/dm-menu/DmMenu.types.d.ts +1 -1
- package/dist/components/dm-menu/index.d.ts +2 -2
- package/dist/components/dm-menu/index.js +439 -439
- package/dist/components/dm-message/DmMessage.d.ts +7 -7
- package/dist/components/dm-message/DmMessage.types.d.ts +1 -1
- package/dist/components/dm-message/index.d.ts +2 -2
- package/dist/components/dm-message/index.js +17 -17
- package/dist/components/dm-page-header/DmPageHeader.d.ts +1 -1
- package/dist/components/dm-page-header/DmPageHeader.types.d.ts +2 -2
- package/dist/components/dm-page-header/index.d.ts +2 -2
- package/dist/components/dm-page-header/index.js +482 -482
- package/dist/components/dm-pagination/DmPagination.d.ts +1 -1
- package/dist/components/dm-pagination/DmPagination.types.d.ts +2 -2
- package/dist/components/dm-pagination/index.d.ts +2 -2
- package/dist/components/dm-pagination/index.js +40 -40
- package/dist/components/dm-pro-table/DmProTable.d.ts +2 -2
- package/dist/components/dm-pro-table/DmProTable.types.d.ts +3 -3
- package/dist/components/dm-pro-table/index.d.ts +2 -2
- package/dist/components/dm-pro-table/index.js +3259 -3259
- package/dist/components/dm-provider/DmProvider.d.ts +1 -1
- package/dist/components/dm-provider/DmProvider.types.d.ts +1 -1
- package/dist/components/dm-provider/index.d.ts +2 -2
- package/dist/components/dm-provider/index.js +95 -95
- package/dist/components/dm-query/DmQuery.d.ts +1 -1
- package/dist/components/dm-query/DmQuery.types.d.ts +1 -1
- package/dist/components/dm-query/index.d.ts +2 -2
- package/dist/components/dm-query/index.js +38 -40
- package/dist/components/dm-search/DmSearch.d.ts +1 -1
- package/dist/components/dm-search/DmSearch.types.d.ts +3 -3
- package/dist/components/dm-search/index.d.ts +2 -2
- package/dist/components/dm-search/index.js +32 -32
- package/dist/components/dm-splitter/DmSplitter.d.ts +1 -1
- package/dist/components/dm-splitter/DmSplitter.types.d.ts +1 -1
- package/dist/components/dm-splitter/index.d.ts +2 -2
- package/dist/components/dm-splitter/index.js +33 -33
- package/dist/components/dm-status/DmStatus.d.ts +1 -1
- package/dist/components/dm-status/DmStatus.types.d.ts +1 -1
- package/dist/components/dm-status/index.d.ts +2 -2
- package/dist/components/dm-status/index.js +26 -26
- package/dist/components/dm-table/DmTable.d.ts +2 -2
- package/dist/components/dm-table/DmTable.types.d.ts +3 -3
- package/dist/components/dm-table/index.d.ts +2 -2
- package/dist/components/dm-table/index.js +1196 -1196
- package/dist/components/dm-tabs/DmTabs.d.ts +1 -1
- package/dist/components/dm-tabs/DmTabs.types.d.ts +1 -1
- package/dist/components/dm-tabs/index.d.ts +2 -2
- package/dist/components/dm-tabs/index.js +35 -35
- package/dist/components/dm-toolbar/DmToolbar.d.ts +1 -1
- package/dist/components/dm-toolbar/DmToolbar.types.d.ts +2 -2
- package/dist/components/dm-toolbar/index.d.ts +2 -2
- package/dist/components/dm-toolbar/index.js +36 -36
- package/dist/components/dm-tree/DmTree.d.ts +1 -1
- package/dist/components/dm-tree/DmTree.types.d.ts +2 -2
- package/dist/components/dm-tree/index.d.ts +2 -2
- package/dist/components/dm-tree/index.js +93 -93
- package/dist/components/dm-truncate/DmTruncate.d.ts +1 -1
- package/dist/components/dm-truncate/DmTruncate.types.d.ts +1 -1
- package/dist/components/dm-truncate/index.d.ts +2 -2
- package/dist/components/dm-truncate/index.js +34 -34
- package/dist/components/drawer/Drawer.d.ts +1 -1
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/index.js +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.types.d.ts +1 -1
- package/dist/components/dropdown/index.d.ts +2 -2
- package/dist/components/dropdown/index.js +94 -94
- package/dist/components/empty/Empty.d.ts +1 -1
- package/dist/components/empty/index.d.ts +2 -2
- package/dist/components/empty/index.js +1 -1
- package/dist/components/fab/Fab.d.ts +1 -1
- package/dist/components/fab/Fab.types.d.ts +1 -1
- package/dist/components/fab/index.d.ts +2 -2
- package/dist/components/fab/index.js +22 -22
- package/dist/components/flex/Flex.d.ts +1 -1
- package/dist/components/flex/index.d.ts +2 -2
- package/dist/components/flex/index.js +1 -1
- package/dist/components/float-button/FloatButton.d.ts +1 -1
- package/dist/components/float-button/index.d.ts +2 -2
- package/dist/components/float-button/index.js +1 -1
- package/dist/components/form/Form.d.ts +1 -1
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form/index.js +1 -1
- package/dist/components/grid/Grid.d.ts +1 -1
- package/dist/components/grid/Grid.types.d.ts +1 -1
- package/dist/components/grid/index.d.ts +2 -2
- package/dist/components/image/Image.d.ts +1 -1
- package/dist/components/image/index.d.ts +2 -2
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/input/index.js +1 -1
- package/dist/components/input-number/InputNumber.d.ts +1 -1
- package/dist/components/input-number/index.d.ts +2 -2
- package/dist/components/input-number/index.js +1 -1
- package/dist/components/json-schema-form/JsonSchemaForm.d.ts +1 -1
- package/dist/components/json-schema-form/JsonSchemaWidget.d.ts +1 -1
- package/dist/components/json-schema-form/index.d.ts +8 -8
- package/dist/components/json-schema-form/index.js +3791 -3791
- package/dist/components/json-schema-form/json-form-widgets.d.ts +1 -1
- package/dist/components/json-schema-form/json-schema-form.d.ts +1 -1
- package/dist/components/layout/Layout.d.ts +1 -1
- package/dist/components/layout/index.d.ts +2 -2
- package/dist/components/layout/index.js +1 -1
- package/dist/components/list/List.d.ts +1 -1
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/index.js +1 -1
- package/dist/components/markdown/Markdown.d.ts +1 -1
- package/dist/components/markdown/index.d.ts +2 -2
- package/dist/components/markdown/index.js +2 -2
- package/dist/components/megamenu/Megamenu.d.ts +1 -1
- package/dist/components/megamenu/index.d.ts +2 -2
- package/dist/components/megamenu/index.js +1 -1
- package/dist/components/mentions/Mentions.d.ts +1 -1
- package/dist/components/mentions/index.d.ts +2 -2
- package/dist/components/mentions/index.js +1 -1
- package/dist/components/menu/Menu.d.ts +1 -1
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message/Message.d.ts +1 -1
- package/dist/components/message/index.d.ts +2 -2
- package/dist/components/message/index.js +4 -4
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/index.d.ts +2 -2
- package/dist/components/modal/index.js +1 -1
- package/dist/components/notification/Notification.d.ts +1 -1
- package/dist/components/notification/index.d.ts +2 -2
- package/dist/components/notification/index.js +1 -1
- package/dist/components/otp-input/OtpInput.d.ts +1 -1
- package/dist/components/otp-input/index.d.ts +2 -2
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/Pagination.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/popconfirm/Popconfirm.d.ts +1 -1
- package/dist/components/popconfirm/Popconfirm.types.d.ts +1 -1
- package/dist/components/popconfirm/index.d.ts +2 -2
- package/dist/components/popconfirm/index.js +48 -48
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/progress/Progress.d.ts +1 -1
- package/dist/components/progress/index.d.ts +2 -2
- package/dist/components/progress/index.js +1 -1
- package/dist/components/qr-code/QRCode.d.ts +1 -1
- package/dist/components/qr-code/index.d.ts +2 -2
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/radio/Radio.d.ts +1 -1
- package/dist/components/radio/index.d.ts +2 -2
- package/dist/components/radio/index.js +1 -1
- package/dist/components/rate/Rate.d.ts +1 -1
- package/dist/components/rate/index.d.ts +2 -2
- package/dist/components/rate/index.js +1 -1
- package/dist/components/result/Result.d.ts +1 -1
- package/dist/components/result/index.d.ts +2 -2
- package/dist/components/result/index.js +1 -1
- package/dist/components/row/Row.d.ts +1 -1
- package/dist/components/row/index.d.ts +2 -2
- package/dist/components/row/index.js +1 -1
- package/dist/components/segmented/Segmented.d.ts +1 -1
- package/dist/components/segmented/index.d.ts +2 -2
- package/dist/components/segmented/index.js +1 -1
- package/dist/components/select/Select.d.ts +1 -1
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/index.js +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +1 -1
- package/dist/components/skeleton/index.d.ts +2 -2
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/slider/Slider.d.ts +1 -1
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/slider/index.js +1 -1
- package/dist/components/space/Space.d.ts +1 -1
- package/dist/components/space/index.d.ts +2 -2
- package/dist/components/space/index.js +1 -1
- package/dist/components/spin/Spin.d.ts +1 -1
- package/dist/components/spin/index.d.ts +2 -2
- package/dist/components/spin/index.js +3 -3
- package/dist/components/splitter/Splitter.d.ts +1 -1
- package/dist/components/splitter/index.d.ts +2 -2
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/statistic/Statistic.d.ts +1 -1
- package/dist/components/statistic/index.d.ts +2 -2
- package/dist/components/statistic/index.js +1 -1
- package/dist/components/steps/Steps.d.ts +1 -1
- package/dist/components/steps/index.d.ts +2 -2
- package/dist/components/steps/index.js +1 -1
- package/dist/components/swap/Swap.d.ts +1 -1
- package/dist/components/swap/index.d.ts +2 -2
- package/dist/components/swap/index.js +1 -1
- package/dist/components/switch/Switch.d.ts +1 -1
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/index.js +1 -1
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/Tag.d.ts +1 -1
- package/dist/components/tag/index.d.ts +2 -2
- package/dist/components/tag/index.js +1 -1
- package/dist/components/time-picker/TimePicker.d.ts +1 -1
- package/dist/components/time-picker/index.d.ts +2 -2
- package/dist/components/time-picker/index.js +3 -3
- package/dist/components/timeline/Timeline.d.ts +1 -1
- package/dist/components/timeline/index.d.ts +2 -2
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/Tour.d.ts +1 -1
- package/dist/components/tour/Tour.types.d.ts +1 -1
- package/dist/components/tour/index.d.ts +2 -2
- package/dist/components/tour/index.js +66 -66
- package/dist/components/transfer/Transfer.d.ts +1 -1
- package/dist/components/transfer/index.d.ts +2 -2
- package/dist/components/transfer/index.js +1 -1
- package/dist/components/tree/Tree.d.ts +1 -1
- package/dist/components/tree/index.d.ts +2 -2
- package/dist/components/tree/index.js +1 -1
- package/dist/components/tree-select/TreeSelect.d.ts +1 -1
- package/dist/components/tree-select/index.d.ts +2 -2
- package/dist/components/tree-select/index.js +1 -1
- package/dist/components/typography/Typography.d.ts +1 -1
- package/dist/components/typography/index.d.ts +2 -2
- package/dist/components/typography/index.js +1 -1
- package/dist/components/upload/Upload.d.ts +1 -1
- package/dist/components/upload/index.d.ts +2 -2
- package/dist/components/upload/index.js +6 -6
- package/dist/components/watermark/Watermark.d.ts +1 -1
- package/dist/components/watermark/index.d.ts +2 -2
- package/dist/components/watermark/index.js +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/index.d.ts +105 -105
- package/dist/index.js +373 -373
- package/dist/infrastructure.d.ts +1 -1
- package/dist/infrastructure.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/theme/index.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +5 -5
- package/package.json +218 -218
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/components/
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
useId,
|
|
7
|
-
useImperativeHandle,
|
|
8
|
-
useLayoutEffect,
|
|
9
|
-
useRef
|
|
10
|
-
} from "react";
|
|
3
|
+
// src/components/button/Button.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { createPortal } from "react-dom";
|
|
11
6
|
|
|
12
|
-
//
|
|
7
|
+
// ../../../node_modules/clsx/dist/clsx.mjs
|
|
13
8
|
function r(e) {
|
|
14
9
|
var t, f, n = "";
|
|
15
10
|
if (typeof e == "string" || typeof e == "number")
|
|
@@ -34,185 +29,6 @@ function clsx() {
|
|
|
34
29
|
function cn(...inputs) {
|
|
35
30
|
return clsx(inputs);
|
|
36
31
|
}
|
|
37
|
-
// src/components/chat/ChatRequest.tsx
|
|
38
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
39
|
-
var stateLabels = {
|
|
40
|
-
pending: "Awaiting approval",
|
|
41
|
-
approved: "Approved",
|
|
42
|
-
"approved-for-session": "Approved for this session",
|
|
43
|
-
declined: "Declined",
|
|
44
|
-
expired: "Expired",
|
|
45
|
-
"answer-elsewhere": "Answer elsewhere"
|
|
46
|
-
};
|
|
47
|
-
var ChatRequest = forwardRef(({
|
|
48
|
-
title,
|
|
49
|
-
state = "pending",
|
|
50
|
-
pending = false,
|
|
51
|
-
statusLabel,
|
|
52
|
-
actions = [],
|
|
53
|
-
explanation,
|
|
54
|
-
children,
|
|
55
|
-
className,
|
|
56
|
-
onFocusCapture,
|
|
57
|
-
onBlurCapture,
|
|
58
|
-
...props
|
|
59
|
-
}, ref) => {
|
|
60
|
-
const id = useId();
|
|
61
|
-
const root = useRef(null);
|
|
62
|
-
const focusedAction = useRef(null);
|
|
63
|
-
useImperativeHandle(ref, () => root.current, []);
|
|
64
|
-
useLayoutEffect(() => {
|
|
65
|
-
const element = root.current;
|
|
66
|
-
const action = focusedAction.current;
|
|
67
|
-
if (element && action && !element.contains(action) && document.activeElement === document.body) {
|
|
68
|
-
element.focus({ preventScroll: true });
|
|
69
|
-
focusedAction.current = null;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
73
|
-
...props,
|
|
74
|
-
ref: root,
|
|
75
|
-
className: cn("chat-approval", className),
|
|
76
|
-
"data-state": state,
|
|
77
|
-
role: props.role ?? "group",
|
|
78
|
-
tabIndex: props.tabIndex ?? -1,
|
|
79
|
-
"aria-labelledby": props["aria-labelledby"] ?? `${id}-title`,
|
|
80
|
-
"aria-busy": pending,
|
|
81
|
-
onFocusCapture: (event) => {
|
|
82
|
-
const target = event.target;
|
|
83
|
-
focusedAction.current = target.closest("[data-chat-request-action]");
|
|
84
|
-
onFocusCapture?.(event);
|
|
85
|
-
},
|
|
86
|
-
onBlurCapture: (event) => {
|
|
87
|
-
if (event.relatedTarget)
|
|
88
|
-
focusedAction.current = null;
|
|
89
|
-
onBlurCapture?.(event);
|
|
90
|
-
},
|
|
91
|
-
children: [
|
|
92
|
-
/* @__PURE__ */ jsxs("div", {
|
|
93
|
-
className: "chat-approval-header",
|
|
94
|
-
children: [
|
|
95
|
-
/* @__PURE__ */ jsx("div", {
|
|
96
|
-
id: `${id}-title`,
|
|
97
|
-
className: "chat-approval-title",
|
|
98
|
-
children: title
|
|
99
|
-
}),
|
|
100
|
-
/* @__PURE__ */ jsx("span", {
|
|
101
|
-
className: "chat-approval-status",
|
|
102
|
-
role: "status",
|
|
103
|
-
"aria-live": "polite",
|
|
104
|
-
"aria-atomic": "true",
|
|
105
|
-
children: statusLabel ?? (state === "pending" && pending ? "Decision pending" : stateLabels[state])
|
|
106
|
-
})
|
|
107
|
-
]
|
|
108
|
-
}),
|
|
109
|
-
children != null || explanation != null ? /* @__PURE__ */ jsxs("div", {
|
|
110
|
-
className: "chat-approval-details",
|
|
111
|
-
children: [
|
|
112
|
-
children,
|
|
113
|
-
explanation
|
|
114
|
-
]
|
|
115
|
-
}) : null,
|
|
116
|
-
state === "pending" && actions.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
117
|
-
className: "chat-approval-actions",
|
|
118
|
-
children: actions.map((action) => /* @__PURE__ */ jsx("button", {
|
|
119
|
-
type: "button",
|
|
120
|
-
"data-chat-request-action": "",
|
|
121
|
-
className: cn("btn btn-sm", action.tone === "primary" && "btn-primary", action.tone === "danger" && "btn-error", action.tone === undefined && "btn-outline"),
|
|
122
|
-
"aria-label": action.ariaLabel,
|
|
123
|
-
disabled: pending || action.disabled,
|
|
124
|
-
onClick: action.onSelect,
|
|
125
|
-
children: action.label
|
|
126
|
-
}, action.id))
|
|
127
|
-
}) : null
|
|
128
|
-
]
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
ChatRequest.displayName = "Chat.Request";
|
|
132
|
-
|
|
133
|
-
// src/components/chat/ChatComposerContext.tsx
|
|
134
|
-
import { forwardRef as forwardRef2 } from "react";
|
|
135
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
136
|
-
var ChatComposerContext = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", {
|
|
137
|
-
role: "group",
|
|
138
|
-
"aria-label": "Composer context",
|
|
139
|
-
...props,
|
|
140
|
-
ref,
|
|
141
|
-
className: cn("chat-composer-context", className)
|
|
142
|
-
}));
|
|
143
|
-
ChatComposerContext.displayName = "Chat.ComposerContext";
|
|
144
|
-
var ChatComposerContextItem = forwardRef2(({ icon, action, children, className, ...props }, ref) => /* @__PURE__ */ jsxs2("span", {
|
|
145
|
-
...props,
|
|
146
|
-
ref,
|
|
147
|
-
className: cn("chat-composer-context-item", className),
|
|
148
|
-
children: [
|
|
149
|
-
icon ? /* @__PURE__ */ jsx2("span", {
|
|
150
|
-
className: "chat-composer-context-icon",
|
|
151
|
-
"aria-hidden": "true",
|
|
152
|
-
children: icon
|
|
153
|
-
}) : null,
|
|
154
|
-
/* @__PURE__ */ jsx2("span", {
|
|
155
|
-
className: "chat-composer-context-label",
|
|
156
|
-
children
|
|
157
|
-
}),
|
|
158
|
-
action ? /* @__PURE__ */ jsx2("button", {
|
|
159
|
-
type: "button",
|
|
160
|
-
className: "btn btn-ghost btn-xs",
|
|
161
|
-
"aria-label": action.label,
|
|
162
|
-
title: action.label,
|
|
163
|
-
disabled: action.disabled,
|
|
164
|
-
onClick: action.onClick,
|
|
165
|
-
children: action.children ?? action.label
|
|
166
|
-
}) : null
|
|
167
|
-
]
|
|
168
|
-
}));
|
|
169
|
-
ChatComposerContextItem.displayName = "Chat.ComposerContextItem";
|
|
170
|
-
var ChatComposerContextEnd = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx2("span", {
|
|
171
|
-
...props,
|
|
172
|
-
ref,
|
|
173
|
-
className: cn("chat-composer-context-end", className)
|
|
174
|
-
}));
|
|
175
|
-
ChatComposerContextEnd.displayName = "Chat.ComposerContextEnd";
|
|
176
|
-
var connectionLabels = {
|
|
177
|
-
connected: "Connected",
|
|
178
|
-
connecting: "Connecting",
|
|
179
|
-
disconnected: "Disconnected"
|
|
180
|
-
};
|
|
181
|
-
var ChatComposerConnection = forwardRef2(({ state, label, className, ...props }, ref) => /* @__PURE__ */ jsx2("span", {
|
|
182
|
-
role: "status",
|
|
183
|
-
...props,
|
|
184
|
-
ref,
|
|
185
|
-
"data-state": state,
|
|
186
|
-
className: cn("chat-composer-connection", className),
|
|
187
|
-
children: label ?? connectionLabels[state]
|
|
188
|
-
}));
|
|
189
|
-
ChatComposerConnection.displayName = "Chat.ComposerConnection";
|
|
190
|
-
|
|
191
|
-
// src/components/chat/Chat.tsx
|
|
192
|
-
import {
|
|
193
|
-
forwardRef as forwardRef7,
|
|
194
|
-
useId as useId4,
|
|
195
|
-
useLayoutEffect as useLayoutEffect5,
|
|
196
|
-
useRef as useRef6,
|
|
197
|
-
useState as useState3
|
|
198
|
-
} from "react";
|
|
199
|
-
|
|
200
|
-
// src/components/chat/ChatComposer.tsx
|
|
201
|
-
import {
|
|
202
|
-
forwardRef as forwardRef5,
|
|
203
|
-
useId as useId2,
|
|
204
|
-
useLayoutEffect as useLayoutEffect4,
|
|
205
|
-
useRef as useRef5,
|
|
206
|
-
useState as useState2
|
|
207
|
-
} from "react";
|
|
208
|
-
|
|
209
|
-
// src/components/chat/composer/ComposerShell.tsx
|
|
210
|
-
import { forwardRef as forwardRef3, useEffect, useRef as useRef3, useState } from "react";
|
|
211
|
-
|
|
212
|
-
// src/components/button/Button.tsx
|
|
213
|
-
import React3 from "react";
|
|
214
|
-
import { createPortal } from "react-dom";
|
|
215
|
-
|
|
216
32
|
// src/classes/button.ts
|
|
217
33
|
var buttonBaseClass = "btn";
|
|
218
34
|
var buttonColorClasses = {
|
|
@@ -260,7 +76,7 @@ function getButtonClasses({
|
|
|
260
76
|
}
|
|
261
77
|
|
|
262
78
|
// src/components/button/Button.tsx
|
|
263
|
-
import { jsx
|
|
79
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
264
80
|
function isPromiseLike(value) {
|
|
265
81
|
return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
|
|
266
82
|
}
|
|
@@ -281,18 +97,18 @@ function Button({
|
|
|
281
97
|
onClick,
|
|
282
98
|
...props
|
|
283
99
|
}) {
|
|
284
|
-
const buttonRef =
|
|
285
|
-
const popoverRef =
|
|
286
|
-
const cancelRef =
|
|
287
|
-
const approvalRef =
|
|
288
|
-
const pendingRef =
|
|
289
|
-
const actionRef =
|
|
290
|
-
const operationRef =
|
|
291
|
-
const mountedRef =
|
|
292
|
-
const [portalTarget, setPortalTarget] =
|
|
293
|
-
const [confirmLoading, setConfirmLoading] =
|
|
294
|
-
const [confirmError, setConfirmError] =
|
|
295
|
-
const generatedId =
|
|
100
|
+
const buttonRef = React.useRef(null);
|
|
101
|
+
const popoverRef = React.useRef(null);
|
|
102
|
+
const cancelRef = React.useRef(null);
|
|
103
|
+
const approvalRef = React.useRef("idle");
|
|
104
|
+
const pendingRef = React.useRef(false);
|
|
105
|
+
const actionRef = React.useRef(0);
|
|
106
|
+
const operationRef = React.useRef(0);
|
|
107
|
+
const mountedRef = React.useRef(false);
|
|
108
|
+
const [portalTarget, setPortalTarget] = React.useState(null);
|
|
109
|
+
const [confirmLoading, setConfirmLoading] = React.useState(false);
|
|
110
|
+
const [confirmError, setConfirmError] = React.useState(false);
|
|
111
|
+
const generatedId = React.useId().replace(/:/g, "");
|
|
296
112
|
const popoverId = `button-confirm-${generatedId}`;
|
|
297
113
|
const titleId = `${popoverId}-title`;
|
|
298
114
|
const descriptionId = `${popoverId}-description`;
|
|
@@ -303,7 +119,7 @@ function Button({
|
|
|
303
119
|
const hasTitle = title !== undefined && title !== null && title !== false && title !== "";
|
|
304
120
|
const content = confirmation?.component ?? confirmation?.message ?? confirmation?.description;
|
|
305
121
|
const hasContent = content !== undefined && content !== null && content !== false && content !== "";
|
|
306
|
-
const mergedRef =
|
|
122
|
+
const mergedRef = React.useCallback((node) => {
|
|
307
123
|
buttonRef.current = node;
|
|
308
124
|
if (!node) {
|
|
309
125
|
if (typeof ref === "function")
|
|
@@ -325,14 +141,14 @@ function Button({
|
|
|
325
141
|
ref.current = null;
|
|
326
142
|
};
|
|
327
143
|
}, [ref]);
|
|
328
|
-
|
|
144
|
+
React.useEffect(() => {
|
|
329
145
|
mountedRef.current = true;
|
|
330
146
|
return () => {
|
|
331
147
|
mountedRef.current = false;
|
|
332
148
|
operationRef.current += 1;
|
|
333
149
|
};
|
|
334
150
|
}, []);
|
|
335
|
-
|
|
151
|
+
React.useEffect(() => {
|
|
336
152
|
operationRef.current += 1;
|
|
337
153
|
approvalRef.current = "idle";
|
|
338
154
|
setConfirmError(false);
|
|
@@ -440,9 +256,9 @@ function Button({
|
|
|
440
256
|
size: "sm",
|
|
441
257
|
isLoading: confirmLoading
|
|
442
258
|
});
|
|
443
|
-
return /* @__PURE__ */
|
|
259
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
444
260
|
children: [
|
|
445
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ jsxs("button", {
|
|
446
262
|
ref: confirm ? mergedRef : ref,
|
|
447
263
|
className: classes,
|
|
448
264
|
disabled: disabled || isLoading,
|
|
@@ -454,24 +270,24 @@ function Button({
|
|
|
454
270
|
"aria-controls": confirm ? popoverId : props["aria-controls"],
|
|
455
271
|
onClick: confirm ? handleClick : onClick,
|
|
456
272
|
children: [
|
|
457
|
-
isLoading && /* @__PURE__ */
|
|
273
|
+
isLoading && /* @__PURE__ */ jsx("span", {
|
|
458
274
|
className: "btn-spinner"
|
|
459
275
|
}),
|
|
460
|
-
!isLoading && leftIcon && /* @__PURE__ */
|
|
276
|
+
!isLoading && leftIcon && /* @__PURE__ */ jsx("span", {
|
|
461
277
|
className: "btn-icon-left",
|
|
462
278
|
children: leftIcon
|
|
463
279
|
}),
|
|
464
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ jsx("span", {
|
|
465
281
|
className: "btn-content",
|
|
466
282
|
children
|
|
467
283
|
}),
|
|
468
|
-
!isLoading && rightIcon && /* @__PURE__ */
|
|
284
|
+
!isLoading && rightIcon && /* @__PURE__ */ jsx("span", {
|
|
469
285
|
className: "btn-icon-right",
|
|
470
286
|
children: rightIcon
|
|
471
287
|
})
|
|
472
288
|
]
|
|
473
289
|
}),
|
|
474
|
-
confirm && portalTarget && createPortal(/* @__PURE__ */
|
|
290
|
+
confirm && portalTarget && createPortal(/* @__PURE__ */ jsxs("form", {
|
|
475
291
|
id: popoverId,
|
|
476
292
|
ref: popoverRef,
|
|
477
293
|
popover: "auto",
|
|
@@ -492,28 +308,28 @@ function Button({
|
|
|
492
308
|
}
|
|
493
309
|
},
|
|
494
310
|
children: [
|
|
495
|
-
hasTitle && /* @__PURE__ */
|
|
311
|
+
hasTitle && /* @__PURE__ */ jsx("div", {
|
|
496
312
|
className: "popover-header",
|
|
497
|
-
children: /* @__PURE__ */
|
|
313
|
+
children: /* @__PURE__ */ jsx("h3", {
|
|
498
314
|
id: titleId,
|
|
499
315
|
className: "popover-title",
|
|
500
316
|
children: title
|
|
501
317
|
})
|
|
502
318
|
}),
|
|
503
|
-
hasContent && /* @__PURE__ */
|
|
319
|
+
hasContent && /* @__PURE__ */ jsx("div", {
|
|
504
320
|
id: descriptionId,
|
|
505
321
|
className: "popover-body",
|
|
506
322
|
children: content
|
|
507
323
|
}),
|
|
508
|
-
confirmError && /* @__PURE__ */
|
|
324
|
+
confirmError && /* @__PURE__ */ jsx("div", {
|
|
509
325
|
role: "alert",
|
|
510
326
|
className: "popover-body",
|
|
511
327
|
children: "The action failed. Please try again."
|
|
512
328
|
}),
|
|
513
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ jsxs("div", {
|
|
514
330
|
className: "popover-footer",
|
|
515
331
|
children: [
|
|
516
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ jsx("button", {
|
|
517
333
|
ref: cancelRef,
|
|
518
334
|
type: "button",
|
|
519
335
|
className: "btn btn-text btn-sm",
|
|
@@ -522,7 +338,7 @@ function Button({
|
|
|
522
338
|
disabled: confirmLoading,
|
|
523
339
|
children: confirmation?.cancelText ?? "Cancel"
|
|
524
340
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ jsx("button", {
|
|
526
342
|
type: "submit",
|
|
527
343
|
className: confirmClasses,
|
|
528
344
|
disabled: disabled || isLoading || confirmLoading,
|
|
@@ -536,6 +352,188 @@ function Button({
|
|
|
536
352
|
]
|
|
537
353
|
});
|
|
538
354
|
}
|
|
355
|
+
// src/components/chat/ChatRequest.tsx
|
|
356
|
+
import {
|
|
357
|
+
forwardRef,
|
|
358
|
+
useId,
|
|
359
|
+
useImperativeHandle,
|
|
360
|
+
useLayoutEffect,
|
|
361
|
+
useRef
|
|
362
|
+
} from "react";
|
|
363
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
364
|
+
var stateLabels = {
|
|
365
|
+
pending: "Awaiting approval",
|
|
366
|
+
approved: "Approved",
|
|
367
|
+
"approved-for-session": "Approved for this session",
|
|
368
|
+
declined: "Declined",
|
|
369
|
+
expired: "Expired",
|
|
370
|
+
"answer-elsewhere": "Answer elsewhere"
|
|
371
|
+
};
|
|
372
|
+
var ChatRequest = forwardRef(({
|
|
373
|
+
title,
|
|
374
|
+
state = "pending",
|
|
375
|
+
pending = false,
|
|
376
|
+
statusLabel,
|
|
377
|
+
actions = [],
|
|
378
|
+
explanation,
|
|
379
|
+
children,
|
|
380
|
+
className,
|
|
381
|
+
onFocusCapture,
|
|
382
|
+
onBlurCapture,
|
|
383
|
+
...props
|
|
384
|
+
}, ref) => {
|
|
385
|
+
const id = useId();
|
|
386
|
+
const root = useRef(null);
|
|
387
|
+
const focusedAction = useRef(null);
|
|
388
|
+
useImperativeHandle(ref, () => root.current, []);
|
|
389
|
+
useLayoutEffect(() => {
|
|
390
|
+
const element = root.current;
|
|
391
|
+
const action = focusedAction.current;
|
|
392
|
+
if (element && action && !element.contains(action) && document.activeElement === document.body) {
|
|
393
|
+
element.focus({ preventScroll: true });
|
|
394
|
+
focusedAction.current = null;
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
398
|
+
...props,
|
|
399
|
+
ref: root,
|
|
400
|
+
className: cn("chat-approval", className),
|
|
401
|
+
"data-state": state,
|
|
402
|
+
role: props.role ?? "group",
|
|
403
|
+
tabIndex: props.tabIndex ?? -1,
|
|
404
|
+
"aria-labelledby": props["aria-labelledby"] ?? `${id}-title`,
|
|
405
|
+
"aria-busy": pending,
|
|
406
|
+
onFocusCapture: (event) => {
|
|
407
|
+
const target = event.target;
|
|
408
|
+
focusedAction.current = target.closest("[data-chat-request-action]");
|
|
409
|
+
onFocusCapture?.(event);
|
|
410
|
+
},
|
|
411
|
+
onBlurCapture: (event) => {
|
|
412
|
+
if (event.relatedTarget)
|
|
413
|
+
focusedAction.current = null;
|
|
414
|
+
onBlurCapture?.(event);
|
|
415
|
+
},
|
|
416
|
+
children: [
|
|
417
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
418
|
+
className: "chat-approval-header",
|
|
419
|
+
children: [
|
|
420
|
+
/* @__PURE__ */ jsx2("div", {
|
|
421
|
+
id: `${id}-title`,
|
|
422
|
+
className: "chat-approval-title",
|
|
423
|
+
children: title
|
|
424
|
+
}),
|
|
425
|
+
/* @__PURE__ */ jsx2("span", {
|
|
426
|
+
className: "chat-approval-status",
|
|
427
|
+
role: "status",
|
|
428
|
+
"aria-live": "polite",
|
|
429
|
+
"aria-atomic": "true",
|
|
430
|
+
children: statusLabel ?? (state === "pending" && pending ? "Decision pending" : stateLabels[state])
|
|
431
|
+
})
|
|
432
|
+
]
|
|
433
|
+
}),
|
|
434
|
+
children != null || explanation != null ? /* @__PURE__ */ jsxs2("div", {
|
|
435
|
+
className: "chat-approval-details",
|
|
436
|
+
children: [
|
|
437
|
+
children,
|
|
438
|
+
explanation
|
|
439
|
+
]
|
|
440
|
+
}) : null,
|
|
441
|
+
state === "pending" && actions.length > 0 ? /* @__PURE__ */ jsx2("div", {
|
|
442
|
+
className: "chat-approval-actions",
|
|
443
|
+
children: actions.map((action) => /* @__PURE__ */ jsx2("button", {
|
|
444
|
+
type: "button",
|
|
445
|
+
"data-chat-request-action": "",
|
|
446
|
+
className: cn("btn btn-sm", action.tone === "primary" && "btn-primary", action.tone === "danger" && "btn-error", action.tone === undefined && "btn-outline"),
|
|
447
|
+
"aria-label": action.ariaLabel,
|
|
448
|
+
disabled: pending || action.disabled,
|
|
449
|
+
onClick: action.onSelect,
|
|
450
|
+
children: action.label
|
|
451
|
+
}, action.id))
|
|
452
|
+
}) : null
|
|
453
|
+
]
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
ChatRequest.displayName = "Chat.Request";
|
|
457
|
+
|
|
458
|
+
// src/components/chat/ChatComposerContext.tsx
|
|
459
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
460
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
461
|
+
var ChatComposerContext = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx3("div", {
|
|
462
|
+
role: "group",
|
|
463
|
+
"aria-label": "Composer context",
|
|
464
|
+
...props,
|
|
465
|
+
ref,
|
|
466
|
+
className: cn("chat-composer-context", className)
|
|
467
|
+
}));
|
|
468
|
+
ChatComposerContext.displayName = "Chat.ComposerContext";
|
|
469
|
+
var ChatComposerContextItem = forwardRef2(({ icon, action, children, className, ...props }, ref) => /* @__PURE__ */ jsxs3("span", {
|
|
470
|
+
...props,
|
|
471
|
+
ref,
|
|
472
|
+
className: cn("chat-composer-context-item", className),
|
|
473
|
+
children: [
|
|
474
|
+
icon ? /* @__PURE__ */ jsx3("span", {
|
|
475
|
+
className: "chat-composer-context-icon",
|
|
476
|
+
"aria-hidden": "true",
|
|
477
|
+
children: icon
|
|
478
|
+
}) : null,
|
|
479
|
+
/* @__PURE__ */ jsx3("span", {
|
|
480
|
+
className: "chat-composer-context-label",
|
|
481
|
+
children
|
|
482
|
+
}),
|
|
483
|
+
action ? /* @__PURE__ */ jsx3("button", {
|
|
484
|
+
type: "button",
|
|
485
|
+
className: "btn btn-ghost btn-xs",
|
|
486
|
+
"aria-label": action.label,
|
|
487
|
+
title: action.label,
|
|
488
|
+
disabled: action.disabled,
|
|
489
|
+
onClick: action.onClick,
|
|
490
|
+
children: action.children ?? action.label
|
|
491
|
+
}) : null
|
|
492
|
+
]
|
|
493
|
+
}));
|
|
494
|
+
ChatComposerContextItem.displayName = "Chat.ComposerContextItem";
|
|
495
|
+
var ChatComposerContextEnd = forwardRef2(({ className, ...props }, ref) => /* @__PURE__ */ jsx3("span", {
|
|
496
|
+
...props,
|
|
497
|
+
ref,
|
|
498
|
+
className: cn("chat-composer-context-end", className)
|
|
499
|
+
}));
|
|
500
|
+
ChatComposerContextEnd.displayName = "Chat.ComposerContextEnd";
|
|
501
|
+
var connectionLabels = {
|
|
502
|
+
connected: "Connected",
|
|
503
|
+
connecting: "Connecting",
|
|
504
|
+
disconnected: "Disconnected"
|
|
505
|
+
};
|
|
506
|
+
var ChatComposerConnection = forwardRef2(({ state, label, className, ...props }, ref) => /* @__PURE__ */ jsx3("span", {
|
|
507
|
+
role: "status",
|
|
508
|
+
...props,
|
|
509
|
+
ref,
|
|
510
|
+
"data-state": state,
|
|
511
|
+
className: cn("chat-composer-connection", className),
|
|
512
|
+
children: label ?? connectionLabels[state]
|
|
513
|
+
}));
|
|
514
|
+
ChatComposerConnection.displayName = "Chat.ComposerConnection";
|
|
515
|
+
|
|
516
|
+
// src/components/chat/Chat.tsx
|
|
517
|
+
import {
|
|
518
|
+
forwardRef as forwardRef7,
|
|
519
|
+
useId as useId4,
|
|
520
|
+
useLayoutEffect as useLayoutEffect5,
|
|
521
|
+
useRef as useRef6,
|
|
522
|
+
useState as useState3
|
|
523
|
+
} from "react";
|
|
524
|
+
|
|
525
|
+
// src/components/chat/ChatComposer.tsx
|
|
526
|
+
import {
|
|
527
|
+
forwardRef as forwardRef5,
|
|
528
|
+
useId as useId2,
|
|
529
|
+
useLayoutEffect as useLayoutEffect4,
|
|
530
|
+
useRef as useRef5,
|
|
531
|
+
useState as useState2
|
|
532
|
+
} from "react";
|
|
533
|
+
|
|
534
|
+
// src/components/chat/composer/ComposerShell.tsx
|
|
535
|
+
import { forwardRef as forwardRef3, useEffect, useRef as useRef3, useState } from "react";
|
|
536
|
+
|
|
539
537
|
// src/components/chat/composer/CompletionList.tsx
|
|
540
538
|
import React4, { useLayoutEffect as useLayoutEffect2, useRef as useRef2 } from "react";
|
|
541
539
|
import { jsx as jsx4, jsxs as jsxs4, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
@@ -1395,11 +1393,11 @@ function copyJson(value, ancestors = new Set) {
|
|
|
1395
1393
|
if (Object.keys(value).length !== value.length || Object.keys(value).some((key, index) => key !== String(index))) {
|
|
1396
1394
|
throw new TypeError("Sparse arrays or array properties are not portable JSON");
|
|
1397
1395
|
}
|
|
1398
|
-
const
|
|
1396
|
+
const result2 = [];
|
|
1399
1397
|
for (let index = 0;index < value.length; index++) {
|
|
1400
|
-
|
|
1398
|
+
result2.push(copyJson(descriptors[String(index)].value, ancestors));
|
|
1401
1399
|
}
|
|
1402
|
-
return Object.freeze(
|
|
1400
|
+
return Object.freeze(result2);
|
|
1403
1401
|
}
|
|
1404
1402
|
const result = {};
|
|
1405
1403
|
for (const [key, descriptor] of Object.entries(descriptors)) {
|
|
@@ -3428,7 +3426,7 @@ function createSubmissionId() {
|
|
|
3428
3426
|
const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
3429
3427
|
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
3430
3428
|
}
|
|
3431
|
-
function createComposerSessionController(initial,
|
|
3429
|
+
function createComposerSessionController(initial, identity2) {
|
|
3432
3430
|
let context = initial;
|
|
3433
3431
|
let disposed = false;
|
|
3434
3432
|
let state = Object.freeze({ submitting: false });
|
|
@@ -3446,7 +3444,7 @@ function createComposerSessionController(initial, identity) {
|
|
|
3446
3444
|
for (const listener of listeners)
|
|
3447
3445
|
listener();
|
|
3448
3446
|
};
|
|
3449
|
-
const current = (attempt) => !disposed && attempt.instanceId ===
|
|
3447
|
+
const current = (attempt) => !disposed && attempt.instanceId === identity2.instanceId && attempt.instanceGeneration === context.instanceGeneration && sameComposerScope(attempt.snapshot.scope, context.scope) && attempt.snapshot.draftKey === context.draftKey && activeId === attempt.snapshot.clientSubmissionId;
|
|
3450
3448
|
function handoffFailure(attempt, cause) {
|
|
3451
3449
|
recoveryFailures.set(attempt.snapshot.clientSubmissionId, attempt);
|
|
3452
3450
|
return error("recovery_handoff_failed", `Recovery handoff failed; draft retained. ${cause instanceof Error ? cause.message : "Host recovery owner failed"}`);
|
|
@@ -3550,7 +3548,7 @@ function createComposerSessionController(initial, identity) {
|
|
|
3550
3548
|
const action = composerActionEligibility(context, intent);
|
|
3551
3549
|
if (disposed || state.submitting || !action.allowed)
|
|
3552
3550
|
return;
|
|
3553
|
-
const clientSubmissionId =
|
|
3551
|
+
const clientSubmissionId = identity2.nextSubmissionId?.() ?? createSubmissionId();
|
|
3554
3552
|
const common = {
|
|
3555
3553
|
protocolVersion: 1,
|
|
3556
3554
|
clientSubmissionId,
|
|
@@ -3580,7 +3578,7 @@ function createComposerSessionController(initial, identity) {
|
|
|
3580
3578
|
});
|
|
3581
3579
|
const attempt = Object.freeze({
|
|
3582
3580
|
snapshot,
|
|
3583
|
-
instanceId:
|
|
3581
|
+
instanceId: identity2.instanceId,
|
|
3584
3582
|
instanceGeneration: context.instanceGeneration,
|
|
3585
3583
|
createdAt: Date.now(),
|
|
3586
3584
|
status: "pending"
|
|
@@ -3671,12 +3669,12 @@ var PlainSemanticEditor = forwardRef8((props, ref) => {
|
|
|
3671
3669
|
const editor = useRef7(null);
|
|
3672
3670
|
const originId = useId6();
|
|
3673
3671
|
const latest = useRef7(props);
|
|
3674
|
-
const
|
|
3672
|
+
const revision2 = useRef7(props.value.revision);
|
|
3675
3673
|
const pendingCaret = useRef7(undefined);
|
|
3676
3674
|
const text = props.value.document.content.map((node) => node.type === "text" ? node.text : "").join("");
|
|
3677
3675
|
useLayoutEffect9(() => {
|
|
3678
3676
|
latest.current = props;
|
|
3679
|
-
|
|
3677
|
+
revision2.current = Math.max(revision2.current, props.value.revision);
|
|
3680
3678
|
const caret = pendingCaret.current;
|
|
3681
3679
|
if (caret && props.value.originId === originId && props.value.revision === caret.revision) {
|
|
3682
3680
|
editor.current?.select(caret.offset, caret.offset);
|
|
@@ -3690,12 +3688,12 @@ var PlainSemanticEditor = forwardRef8((props, ref) => {
|
|
|
3690
3688
|
return () => latest.current.onReady?.(false);
|
|
3691
3689
|
}, []);
|
|
3692
3690
|
const change = useCallback((value, caret) => {
|
|
3693
|
-
|
|
3691
|
+
revision2.current = Math.max(revision2.current, latest.current.value.revision) + 1;
|
|
3694
3692
|
if (caret !== undefined)
|
|
3695
|
-
pendingCaret.current = { revision:
|
|
3693
|
+
pendingCaret.current = { revision: revision2.current, offset: caret };
|
|
3696
3694
|
latest.current.onChange({
|
|
3697
3695
|
document: migrateLegacyComposerDocument(value),
|
|
3698
|
-
revision:
|
|
3696
|
+
revision: revision2.current,
|
|
3699
3697
|
origin: "edit",
|
|
3700
3698
|
originId
|
|
3701
3699
|
});
|
|
@@ -3748,7 +3746,7 @@ var PlainSemanticEditor = forwardRef8((props, ref) => {
|
|
|
3748
3746
|
applyProvider: (effect) => {
|
|
3749
3747
|
const current = latest.current;
|
|
3750
3748
|
const range = selection();
|
|
3751
|
-
if (current.disabled || effect.action.type !== "insert" || effect.action.command || effect.action.content.some((
|
|
3749
|
+
if (current.disabled || effect.action.type !== "insert" || effect.action.command || effect.action.content.some((node2) => node2.type !== "text") || current.value.revision !== effect.request.documentRevision || !range || range.nodeIndex !== effect.request.trigger.nodeIndex || range.start !== range.end || range.end !== effect.request.trigger.caret)
|
|
3752
3750
|
return false;
|
|
3753
3751
|
const node = current.value.document.content[range.nodeIndex];
|
|
3754
3752
|
if (node?.type !== "text" || node.text.slice(effect.request.trigger.start, effect.request.trigger.end) !== effect.request.trigger.text)
|
|
@@ -4056,7 +4054,7 @@ class DraftController {
|
|
|
4056
4054
|
const edit = this.editGeneration;
|
|
4057
4055
|
const context = this.current;
|
|
4058
4056
|
const adapter = context.props.adapter;
|
|
4059
|
-
const
|
|
4057
|
+
const read2 = adapter.load;
|
|
4060
4058
|
const isCurrent = () => this.active && this.ownerGeneration === owner && this.loadGeneration === load && !abort.signal.aborted;
|
|
4061
4059
|
this.safety = "unloaded";
|
|
4062
4060
|
this.status = "loading";
|
|
@@ -4068,7 +4066,7 @@ class DraftController {
|
|
|
4068
4066
|
await waitForSaves(adapter, context.draft, abort.signal);
|
|
4069
4067
|
if (!isCurrent())
|
|
4070
4068
|
return;
|
|
4071
|
-
const input = await
|
|
4069
|
+
const input = await read2.call(adapter, {
|
|
4072
4070
|
scope: context.draft.scope,
|
|
4073
4071
|
draftKey: context.draft.draftKey,
|
|
4074
4072
|
signal: abort.signal
|
|
@@ -4432,7 +4430,7 @@ var SemanticComposer = forwardRef9(({
|
|
|
4432
4430
|
stopLabel = "Stop",
|
|
4433
4431
|
minRows = 1,
|
|
4434
4432
|
maxRows = 6,
|
|
4435
|
-
error,
|
|
4433
|
+
error: error3,
|
|
4436
4434
|
children,
|
|
4437
4435
|
className,
|
|
4438
4436
|
onPaste,
|
|
@@ -4478,9 +4476,9 @@ var SemanticComposer = forwardRef9(({
|
|
|
4478
4476
|
if (alive.current && observed.current.generation === origin)
|
|
4479
4477
|
setLocalFailure(message ? { generation: origin, message } : undefined);
|
|
4480
4478
|
}
|
|
4481
|
-
const
|
|
4482
|
-
const document2 =
|
|
4483
|
-
const compatible =
|
|
4479
|
+
const read2 = readComposerDocument(value.document);
|
|
4480
|
+
const document2 = read2.status === "compatible" ? read2.value : migrateLegacyComposerDocument("");
|
|
4481
|
+
const compatible = read2.status === "compatible" && (structured || isPlainComposerDocument(document2));
|
|
4484
4482
|
const editAvailable = compatible && !editorError;
|
|
4485
4483
|
const attachments = useComposerAttachments({
|
|
4486
4484
|
scope,
|
|
@@ -4559,7 +4557,7 @@ var SemanticComposer = forwardRef9(({
|
|
|
4559
4557
|
});
|
|
4560
4558
|
const active = candidates.find((item) => item.id === completion.snapshot.activeId && !item.disabled);
|
|
4561
4559
|
const showCompletion = popup && candidates.length > 0;
|
|
4562
|
-
const visibleError =
|
|
4560
|
+
const visibleError = error3 ?? localError ?? session.snapshot.error?.message;
|
|
4563
4561
|
const hasError = visibleError !== undefined && visibleError !== null && visibleError !== false;
|
|
4564
4562
|
useImperativeHandle4(forwardedRef, () => ({
|
|
4565
4563
|
focus: () => editor.current?.focus(),
|
|
@@ -4788,7 +4786,7 @@ var SemanticComposer = forwardRef9(({
|
|
|
4788
4786
|
}) : null
|
|
4789
4787
|
]
|
|
4790
4788
|
}),
|
|
4791
|
-
renderFooter: (renderToolbar) => draftAdapter && attachmentsCurrent &&
|
|
4789
|
+
renderFooter: (renderToolbar) => draftAdapter && attachmentsCurrent && read2.status === "compatible" ? /* @__PURE__ */ jsx13(DraftLifecycle, {
|
|
4792
4790
|
compact,
|
|
4793
4791
|
adapter: draftAdapter,
|
|
4794
4792
|
scope,
|
|
@@ -4818,8 +4816,8 @@ var SemanticComposer = forwardRef9(({
|
|
|
4818
4816
|
ref: editor,
|
|
4819
4817
|
value,
|
|
4820
4818
|
instanceGeneration: generation,
|
|
4821
|
-
onReady: (
|
|
4822
|
-
onError: (
|
|
4819
|
+
onReady: (ready2) => setReadiness({ generation, ready: ready2 }),
|
|
4820
|
+
onError: (error4) => setEditorFailure({ generation, error: error4 }),
|
|
4823
4821
|
onSelectionChange: setSelection,
|
|
4824
4822
|
onChange: (update) => {
|
|
4825
4823
|
setLocalError(undefined);
|
|
@@ -4869,7 +4867,7 @@ var SemanticComposer = forwardRef9(({
|
|
|
4869
4867
|
}
|
|
4870
4868
|
}, generation) : /* @__PURE__ */ jsx13(PreservedDraft, {
|
|
4871
4869
|
input: value.document,
|
|
4872
|
-
reason: editorError?.message ?? (
|
|
4870
|
+
reason: editorError?.message ?? (read2.status === "incompatible" ? read2.reason : "This draft requires the optional rich editor.")
|
|
4873
4871
|
}),
|
|
4874
4872
|
children
|
|
4875
4873
|
});
|
|
@@ -5001,14 +4999,14 @@ function QueueSession(props) {
|
|
|
5001
4999
|
return current;
|
|
5002
5000
|
if (result.outcome === "accepted")
|
|
5003
5001
|
return;
|
|
5004
|
-
const
|
|
5005
|
-
return
|
|
5002
|
+
const canonical2 = projection.items.find((item) => item.id === itemId);
|
|
5003
|
+
return canonical2 ? { ...current, item: canonical2, revision: projection.revision } : current;
|
|
5006
5004
|
});
|
|
5007
5005
|
setMessage(result.outcome === "rejected" ? { text: result.error.message, error: true } : { text: "Queue update acknowledged" });
|
|
5008
|
-
} catch (
|
|
5006
|
+
} catch (error3) {
|
|
5009
5007
|
if (!controller.signal.aborted)
|
|
5010
5008
|
setMessage({
|
|
5011
|
-
text:
|
|
5009
|
+
text: error3 instanceof Error ? error3.message : "Queue update failed",
|
|
5012
5010
|
error: true
|
|
5013
5011
|
});
|
|
5014
5012
|
} finally {
|
|
@@ -5976,11 +5974,11 @@ function SettingsSession(props) {
|
|
|
5976
5974
|
...current,
|
|
5977
5975
|
[settingId]: result.outcome === "rejected" ? result.message : "Change acknowledged; displayed value follows host state"
|
|
5978
5976
|
}));
|
|
5979
|
-
} catch (
|
|
5977
|
+
} catch (error3) {
|
|
5980
5978
|
if (!controller.signal.aborted)
|
|
5981
5979
|
setFeedback((current) => ({
|
|
5982
5980
|
...current,
|
|
5983
|
-
[settingId]:
|
|
5981
|
+
[settingId]: error3 instanceof Error ? error3.message : "Setting change failed"
|
|
5984
5982
|
}));
|
|
5985
5983
|
} finally {
|
|
5986
5984
|
if (requests.current.get(settingId) === controller) {
|