wimui 0.51.2 → 0.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/_internal/FeedbackCloseButton.cjs +1 -1
- package/dist/components/_internal/FeedbackCloseButton.js +14 -13
- package/dist/components/_internal/FieldLabelContent.cjs +1 -1
- package/dist/components/_internal/FieldLabelContent.js +18 -17
- package/dist/components/ai/AIResponseFeedback/AIResponseFeedback.cjs +1 -1
- package/dist/components/ai/AIResponseFeedback/AIResponseFeedback.js +46 -45
- package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.cjs +1 -1
- package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.js +1 -1
- package/dist/components/ai/AgentStatus/AgentStatus.cjs +1 -1
- package/dist/components/ai/AgentStatus/AgentStatus.js +24 -23
- package/dist/components/ai/ArtifactsOverlay/ArtifactsOverlay.cjs +1 -1
- package/dist/components/ai/ArtifactsOverlay/ArtifactsOverlay.js +47 -45
- package/dist/components/ai/ChatUI/ChatUI.cjs +1 -1
- package/dist/components/ai/ChatUI/ChatUI.js +82 -81
- package/dist/components/ai/CodeBlock/CodeBlock.cjs +3 -3
- package/dist/components/ai/CodeBlock/CodeBlock.js +53 -52
- package/dist/components/ai/CodeBlock/code-block.module.cjs +1 -1
- package/dist/components/ai/CodeBlock/code-block.module.js +1 -1
- package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.cjs +2 -2
- package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.js +105 -104
- package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.cjs +1 -1
- package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.js +2 -2
- package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.cjs +1 -1
- package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.js +60 -59
- package/dist/components/ai/ModelSelector/ModelSelector.cjs +1 -1
- package/dist/components/ai/ModelSelector/ModelSelector.js +83 -82
- package/dist/components/ai/ModelSelector/model-selector.module.cjs +1 -1
- package/dist/components/ai/ModelSelector/model-selector.module.js +1 -1
- package/dist/components/ai/PromptInput/PromptInput.cjs +1 -1
- package/dist/components/ai/PromptInput/PromptInput.js +76 -75
- package/dist/components/ai/SourceCitation/SourceCitation.cjs +1 -1
- package/dist/components/ai/SourceCitation/SourceCitation.js +39 -38
- package/dist/components/ai/Terminal/Terminal.cjs +2 -2
- package/dist/components/ai/Terminal/Terminal.js +65 -64
- package/dist/components/ai/Terminal/terminal.module.cjs +1 -1
- package/dist/components/ai/Terminal/terminal.module.js +1 -1
- package/dist/components/ai/ThoughtProcess/thought-process.module.cjs +1 -1
- package/dist/components/ai/ThoughtProcess/thought-process.module.js +4 -4
- package/dist/components/ai/ThreadList/ThreadList.cjs +1 -1
- package/dist/components/ai/ThreadList/ThreadList.js +58 -57
- package/dist/components/ai/ThreadList/thread-list.module.cjs +1 -1
- package/dist/components/ai/ThreadList/thread-list.module.js +1 -1
- package/dist/components/data-display/Accordion/accordion.module.cjs +1 -1
- package/dist/components/data-display/Accordion/accordion.module.js +1 -1
- package/dist/components/data-display/Barcode/Barcode.cjs +1 -1
- package/dist/components/data-display/Barcode/Barcode.js +76 -75
- package/dist/components/data-display/Calendar/Calendar.cjs +1 -1
- package/dist/components/data-display/Calendar/Calendar.js +75 -74
- package/dist/components/data-display/Calendar/calendar.module.cjs +1 -1
- package/dist/components/data-display/Calendar/calendar.module.js +1 -1
- package/dist/components/data-display/CalendarHeatmap/CalendarHeatmap.cjs +1 -1
- package/dist/components/data-display/CalendarHeatmap/CalendarHeatmap.js +54 -52
- package/dist/components/data-display/Carousel/Carousel.cjs +1 -1
- package/dist/components/data-display/Carousel/Carousel.js +62 -61
- package/dist/components/data-display/Carousel/carousel.module.cjs +1 -1
- package/dist/components/data-display/Carousel/carousel.module.js +1 -1
- package/dist/components/data-display/Chip/Chip.cjs +1 -1
- package/dist/components/data-display/Chip/Chip.js +36 -35
- package/dist/components/data-display/Comment/Comment.cjs +1 -1
- package/dist/components/data-display/Comment/Comment.js +58 -57
- package/dist/components/data-display/Comment/comment.module.cjs +1 -1
- package/dist/components/data-display/Comment/comment.module.js +1 -1
- package/dist/components/data-display/Countdown/Countdown.cjs +1 -1
- package/dist/components/data-display/Countdown/Countdown.js +56 -55
- package/dist/components/data-display/DataGrid/DataGrid.cjs +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.js +128 -127
- package/dist/components/data-display/JsonViewer/JsonViewer.cjs +1 -1
- package/dist/components/data-display/JsonViewer/JsonViewer.js +153 -152
- package/dist/components/data-display/JsonViewer/json-viewer.module.cjs +1 -1
- package/dist/components/data-display/JsonViewer/json-viewer.module.js +3 -3
- package/dist/components/data-display/Kanban/Kanban.cjs +1 -1
- package/dist/components/data-display/Kanban/Kanban.js +95 -94
- package/dist/components/data-display/NodeGraph/NodeGraph.cjs +1 -1
- package/dist/components/data-display/NodeGraph/NodeGraph.js +62 -61
- package/dist/components/data-display/NodeGraph/node-graph.module.cjs +1 -1
- package/dist/components/data-display/NodeGraph/node-graph.module.js +1 -1
- package/dist/components/data-display/PivotTable/PivotTable.cjs +1 -1
- package/dist/components/data-display/PivotTable/PivotTable.js +153 -152
- package/dist/components/data-display/PivotTable/pivot-table.module.cjs +1 -1
- package/dist/components/data-display/PivotTable/pivot-table.module.js +1 -1
- package/dist/components/data-display/Presence/Presence.cjs +1 -1
- package/dist/components/data-display/Presence/Presence.js +28 -27
- package/dist/components/data-display/PullToRefresh/PullToRefresh.cjs +1 -1
- package/dist/components/data-display/PullToRefresh/PullToRefresh.js +73 -72
- package/dist/components/data-display/Reaction/Reaction.cjs +1 -1
- package/dist/components/data-display/Reaction/Reaction.js +31 -30
- package/dist/components/data-display/ScheduleView/ScheduleView.cjs +1 -1
- package/dist/components/data-display/ScheduleView/ScheduleView.js +49 -48
- package/dist/components/data-display/SortableList/SortableList.cjs +1 -1
- package/dist/components/data-display/SortableList/SortableList.js +44 -43
- package/dist/components/data-display/Tag/Tag.cjs +1 -1
- package/dist/components/data-display/Tag/Tag.js +29 -28
- package/dist/components/data-display/Tag/tag.module.cjs +1 -1
- package/dist/components/data-display/Tag/tag.module.js +1 -1
- package/dist/components/data-display/TreeDiagram/TreeDiagram.cjs +1 -1
- package/dist/components/data-display/TreeDiagram/TreeDiagram.js +85 -84
- package/dist/components/data-display/TreeDiagram/tree-diagram.module.cjs +1 -1
- package/dist/components/data-display/TreeDiagram/tree-diagram.module.js +1 -1
- package/dist/components/data-display/TreeView/TreeView.cjs +1 -1
- package/dist/components/data-display/TreeView/TreeView.js +123 -122
- package/dist/components/feedback/Autosave/Autosave.cjs +1 -1
- package/dist/components/feedback/Autosave/Autosave.js +32 -31
- package/dist/components/feedback/Banner/banner.module.cjs +1 -1
- package/dist/components/feedback/Banner/banner.module.js +2 -2
- package/dist/components/feedback/ErrorBoundary/ErrorBoundary.cjs +1 -1
- package/dist/components/feedback/ErrorBoundary/ErrorBoundary.js +35 -34
- package/dist/components/feedback/Notification/notification.module.cjs +1 -1
- package/dist/components/feedback/Notification/notification.module.js +2 -2
- package/dist/components/feedback/ScrollProgress/ScrollProgress.cjs +1 -1
- package/dist/components/feedback/ScrollProgress/ScrollProgress.js +21 -20
- package/dist/components/feedback/Tour/Tour.cjs +1 -1
- package/dist/components/feedback/Tour/Tour.js +98 -97
- package/dist/components/form/Button/Button.cjs +1 -1
- package/dist/components/form/Button/Button.js +55 -54
- package/dist/components/form/ColorInput/ColorInput.cjs +1 -1
- package/dist/components/form/ColorInput/ColorInput.js +30 -29
- package/dist/components/form/ColorPicker/color-picker.module.cjs +1 -1
- package/dist/components/form/ColorPicker/color-picker.module.js +1 -1
- package/dist/components/form/Combobox/combobox.module.cjs +1 -1
- package/dist/components/form/Combobox/combobox.module.js +1 -1
- package/dist/components/form/CopyButton/CopyButton.cjs +1 -1
- package/dist/components/form/CopyButton/CopyButton.js +27 -26
- package/dist/components/form/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/form/DatePicker/DatePicker.js +47 -46
- package/dist/components/form/DatePicker/date-picker.module.cjs +1 -1
- package/dist/components/form/DatePicker/date-picker.module.js +1 -1
- package/dist/components/form/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/form/DateRangePicker/DateRangePicker.js +36 -35
- package/dist/components/form/Dropzone/Dropzone.cjs +1 -1
- package/dist/components/form/Dropzone/Dropzone.js +56 -55
- package/dist/components/form/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/form/FileUpload/FileUpload.js +47 -46
- package/dist/components/form/FloatButton/FloatButton.cjs +1 -1
- package/dist/components/form/FloatButton/FloatButton.d.ts +4 -1
- package/dist/components/form/FloatButton/FloatButton.js +6 -6
- package/dist/components/form/ImageCropper/ImageCropper.cjs +1 -1
- package/dist/components/form/ImageCropper/ImageCropper.js +101 -99
- package/dist/components/form/InlineEdit/InlineEdit.cjs +1 -1
- package/dist/components/form/InlineEdit/InlineEdit.js +66 -65
- package/dist/components/form/InlineEdit/inline-edit.module.cjs +1 -1
- package/dist/components/form/InlineEdit/inline-edit.module.js +1 -1
- package/dist/components/form/Input/Input.cjs +1 -1
- package/dist/components/form/Input/Input.js +45 -44
- package/dist/components/form/InputBase/InputBase.cjs +1 -1
- package/dist/components/form/InputBase/InputBase.js +51 -50
- package/dist/components/form/InputBase/input-base.module.cjs +1 -1
- package/dist/components/form/InputBase/input-base.module.js +1 -1
- package/dist/components/form/Mentions/mentions.module.cjs +1 -1
- package/dist/components/form/Mentions/mentions.module.js +1 -1
- package/dist/components/form/MultiSelect/multiselect.module.cjs +1 -1
- package/dist/components/form/MultiSelect/multiselect.module.js +1 -1
- package/dist/components/form/PasswordStrength/PasswordStrength.cjs +1 -1
- package/dist/components/form/PasswordStrength/PasswordStrength.js +27 -26
- package/dist/components/form/PhoneInput/PhoneInput.cjs +1 -1
- package/dist/components/form/PhoneInput/PhoneInput.js +10 -10
- package/dist/components/form/PhoneInput/phone-input.module.cjs +1 -1
- package/dist/components/form/PhoneInput/phone-input.module.js +1 -1
- package/dist/components/form/QueryBuilder/QueryBuilder.cjs +1 -1
- package/dist/components/form/QueryBuilder/QueryBuilder.js +90 -89
- package/dist/components/form/RangeSlider/RangeSlider.cjs +1 -1
- package/dist/components/form/RangeSlider/RangeSlider.js +30 -29
- package/dist/components/form/Rating/rating.module.cjs +1 -1
- package/dist/components/form/Rating/rating.module.js +1 -1
- package/dist/components/form/RichTextEditor/RichTextEditor.cjs +1 -1
- package/dist/components/form/RichTextEditor/RichTextEditor.js +223 -222
- package/dist/components/form/RichTextEditor/rich-text-editor.module.cjs +1 -1
- package/dist/components/form/RichTextEditor/rich-text-editor.module.js +1 -1
- package/dist/components/form/SegmentedControl/SegmentedControl.cjs +1 -1
- package/dist/components/form/SegmentedControl/SegmentedControl.js +7 -7
- package/dist/components/form/SegmentedControl/segmented-control.module.cjs +1 -1
- package/dist/components/form/SegmentedControl/segmented-control.module.js +1 -1
- package/dist/components/form/Select/Select.cjs +1 -1
- package/dist/components/form/Select/Select.js +112 -111
- package/dist/components/form/Select/select.module.cjs +1 -1
- package/dist/components/form/Select/select.module.js +1 -1
- package/dist/components/form/SignaturePad/SignaturePad.cjs +1 -1
- package/dist/components/form/SignaturePad/SignaturePad.js +86 -79
- package/dist/components/form/SmartSearchInput/SmartSearchInput.cjs +1 -1
- package/dist/components/form/SmartSearchInput/SmartSearchInput.js +63 -62
- package/dist/components/form/TagInput/TagInput.cjs +1 -1
- package/dist/components/form/TagInput/TagInput.js +68 -67
- package/dist/components/form/ThemeToggle/ThemeToggle.cjs +1 -1
- package/dist/components/form/ThemeToggle/ThemeToggle.js +68 -67
- package/dist/components/form/ThemeToggle/theme-toggle.module.cjs +1 -1
- package/dist/components/form/ThemeToggle/theme-toggle.module.js +1 -1
- package/dist/components/form/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/form/ToggleGroup/ToggleGroup.js +6 -6
- package/dist/components/form/ToggleGroup/toggle-group.module.cjs +1 -1
- package/dist/components/form/ToggleGroup/toggle-group.module.js +1 -1
- package/dist/components/form/Transfer/Transfer.cjs +1 -1
- package/dist/components/form/Transfer/Transfer.js +127 -126
- package/dist/components/form/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/form/TreeSelect/TreeSelect.js +6 -6
- package/dist/components/layout/Dashboard/Dashboard.cjs +1 -1
- package/dist/components/layout/Dashboard/Dashboard.js +90 -89
- package/dist/components/layout/Navbar/Navbar.cjs +1 -1
- package/dist/components/layout/Navbar/Navbar.d.ts +1 -1
- package/dist/components/layout/Navbar/Navbar.js +1 -1
- package/dist/components/layout/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/layout/Splitter/Splitter.cjs +1 -1
- package/dist/components/layout/Splitter/Splitter.js +40 -39
- package/dist/components/layout/Toolbar/Toolbar.cjs +1 -1
- package/dist/components/layout/Toolbar/Toolbar.js +66 -39
- package/dist/components/media/Audio/Audio.cjs +1 -1
- package/dist/components/media/Audio/Audio.js +90 -89
- package/dist/components/media/Audio/components/AudioCustomControls.cjs +1 -1
- package/dist/components/media/Audio/components/AudioCustomControls.js +115 -114
- package/dist/components/media/Gallery/Gallery.cjs +1 -1
- package/dist/components/media/Gallery/Gallery.js +132 -131
- package/dist/components/media/ImageCompare/ImageCompare.cjs +1 -1
- package/dist/components/media/ImageCompare/ImageCompare.js +72 -71
- package/dist/components/media/Lightbox/Lightbox.cjs +1 -1
- package/dist/components/media/Lightbox/Lightbox.js +128 -127
- package/dist/components/media/Video/Video.cjs +1 -1
- package/dist/components/media/Video/Video.js +56 -55
- package/dist/components/media/Video/components/VideoAdvancedMenu.cjs +1 -1
- package/dist/components/media/Video/components/VideoAdvancedMenu.js +136 -135
- package/dist/components/media/Video/components/VideoControls.cjs +1 -1
- package/dist/components/media/Video/components/VideoControls.js +103 -102
- package/dist/components/navigation/BackTop/BackTop.cjs +1 -1
- package/dist/components/navigation/BackTop/BackTop.js +37 -36
- package/dist/components/navigation/Breadcrumb/Breadcrumb.cjs +1 -1
- package/dist/components/navigation/Breadcrumb/Breadcrumb.js +41 -40
- package/dist/components/navigation/CommandPalette/CommandPalette.cjs +1 -1
- package/dist/components/navigation/CommandPalette/CommandPalette.js +100 -99
- package/dist/components/navigation/CommandPalette/command-palette.module.cjs +1 -1
- package/dist/components/navigation/CommandPalette/command-palette.module.js +1 -1
- package/dist/components/navigation/HamburgerMenu/HamburgerMenu.cjs +1 -1
- package/dist/components/navigation/HamburgerMenu/HamburgerMenu.d.ts +6 -0
- package/dist/components/navigation/HamburgerMenu/HamburgerMenu.js +32 -22
- package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.cjs +1 -1
- package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.js +1 -1
- package/dist/components/navigation/Menubar/menubar.module.cjs +1 -1
- package/dist/components/navigation/Menubar/menubar.module.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.cjs +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +39 -38
- package/dist/components/navigation/SpeedDial/SpeedDial.cjs +1 -1
- package/dist/components/navigation/SpeedDial/SpeedDial.js +50 -47
- package/dist/components/navigation/TabBar/tab-bar.module.cjs +1 -1
- package/dist/components/navigation/TabBar/tab-bar.module.js +1 -1
- package/dist/components/navigation/TabNavigation/tab-navigation.module.cjs +1 -1
- package/dist/components/navigation/TabNavigation/tab-navigation.module.js +1 -1
- package/dist/components/navigation/Tabs/tabs.module.cjs +1 -1
- package/dist/components/navigation/Tabs/tabs.module.js +1 -1
- package/dist/components/overlay/ContextMenu/ContextMenu.cjs +1 -1
- package/dist/components/overlay/ContextMenu/ContextMenu.js +4 -4
- package/dist/components/overlay/Popover/Popover.cjs +1 -1
- package/dist/components/overlay/Popover/Popover.js +63 -62
- package/dist/components/typography/Spoiler/Spoiler.cjs +1 -1
- package/dist/components/typography/Spoiler/Spoiler.js +38 -37
- package/dist/components/typography/Spoiler/spoiler.module.cjs +1 -1
- package/dist/components/typography/Spoiler/spoiler.module.js +1 -1
- package/dist/i18n/generated/common.cjs +2 -0
- package/dist/i18n/generated/common.d.ts +3 -0
- package/dist/i18n/generated/common.js +570 -0
- package/dist/i18n/generated/components.cjs +2 -0
- package/dist/i18n/generated/components.d.ts +3 -0
- package/dist/i18n/generated/components.js +399 -0
- package/dist/i18n/generated/data-display.cjs +2 -0
- package/dist/i18n/generated/data-display.d.ts +3 -0
- package/dist/i18n/generated/data-display.js +12 -0
- package/dist/i18n/generated/form.cjs +2 -0
- package/dist/i18n/generated/form.d.ts +3 -0
- package/dist/i18n/generated/form.js +321 -0
- package/dist/i18n/generated/keys.d.ts +5 -1
- package/dist/i18n/generated/locales.cjs +2 -0
- package/dist/i18n/generated/locales.d.ts +1 -0
- package/dist/i18n/generated/locales.js +9 -0
- package/dist/i18n/instance.cjs +1 -1
- package/dist/i18n/instance.d.ts +18 -3
- package/dist/i18n/instance.js +24 -26
- package/dist/i18n/useWimTranslation.cjs +1 -1
- package/dist/i18n/useWimTranslation.d.ts +7 -8
- package/dist/i18n/useWimTranslation.js +6 -5
- package/dist/llms-full.txt +7 -3
- package/dist/llms.txt +1 -1
- package/dist/locales/en/common.json +1 -1
- package/dist/locales/ja/common.json +1 -1
- package/dist/locales/pt/common.json +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +10 -10
- package/dist/i18n/generated/resources.cjs +0 -2
- package/dist/i18n/generated/resources.d.ts +0 -4
- package/dist/i18n/generated/resources.js +0 -1283
|
@@ -2,71 +2,72 @@
|
|
|
2
2
|
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
3
|
import t from "../../../icon/external-link.js";
|
|
4
4
|
import { Icon as n } from "../../media/Icon/Icon.js";
|
|
5
|
-
import r from "
|
|
6
|
-
import i from "
|
|
7
|
-
import a from "
|
|
8
|
-
import
|
|
5
|
+
import { formNs as r } from "../../../i18n/generated/form.js";
|
|
6
|
+
import i from "./source-citation.module.js";
|
|
7
|
+
import a from "react";
|
|
8
|
+
import o from "classnames";
|
|
9
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
10
|
//#region src/components/ai/SourceCitation/SourceCitation.tsx
|
|
10
|
-
function
|
|
11
|
+
function u(e) {
|
|
11
12
|
try {
|
|
12
13
|
return new URL(e).hostname.replace(/^www\./, "");
|
|
13
14
|
} catch {
|
|
14
15
|
return e;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
|
-
var
|
|
18
|
-
let { t:
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
className:
|
|
18
|
+
var d = ({ title: a, url: d, description: f, index: p, domain: m, className: h }) => {
|
|
19
|
+
let { t: g } = e(r), _ = m ?? (d ? u(d) : void 0), v = p == null ? a : g("source_citation.source_label", { index: p }), y = /* @__PURE__ */ l(s, { children: [
|
|
20
|
+
/* @__PURE__ */ l("div", {
|
|
21
|
+
className: i.header,
|
|
21
22
|
children: [
|
|
22
|
-
|
|
23
|
-
className:
|
|
23
|
+
p != null && /* @__PURE__ */ c("span", {
|
|
24
|
+
className: i.index,
|
|
24
25
|
"aria-hidden": "true",
|
|
25
|
-
children:
|
|
26
|
+
children: p
|
|
26
27
|
}),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
className:
|
|
29
|
-
children:
|
|
28
|
+
/* @__PURE__ */ c("span", {
|
|
29
|
+
className: i.title,
|
|
30
|
+
children: a
|
|
30
31
|
}),
|
|
31
|
-
|
|
32
|
+
d && /* @__PURE__ */ c(n, {
|
|
32
33
|
component: t,
|
|
33
34
|
size: "xs",
|
|
34
|
-
className:
|
|
35
|
+
className: i.externalIcon,
|
|
35
36
|
"aria-hidden": "true"
|
|
36
37
|
})
|
|
37
38
|
]
|
|
38
39
|
}),
|
|
39
|
-
|
|
40
|
-
className:
|
|
41
|
-
children:
|
|
40
|
+
_ && /* @__PURE__ */ c("div", {
|
|
41
|
+
className: i.domain,
|
|
42
|
+
children: _
|
|
42
43
|
}),
|
|
43
|
-
|
|
44
|
-
className:
|
|
45
|
-
children:
|
|
44
|
+
f && /* @__PURE__ */ c("p", {
|
|
45
|
+
className: i.description,
|
|
46
|
+
children: f
|
|
46
47
|
})
|
|
47
48
|
] });
|
|
48
|
-
return
|
|
49
|
-
href:
|
|
49
|
+
return d ? /* @__PURE__ */ c("a", {
|
|
50
|
+
href: d,
|
|
50
51
|
target: "_blank",
|
|
51
52
|
rel: "noopener noreferrer",
|
|
52
|
-
className:
|
|
53
|
-
"aria-label":
|
|
54
|
-
children:
|
|
55
|
-
}) : /* @__PURE__ */
|
|
56
|
-
className:
|
|
53
|
+
className: o("wim-source-citation", i.root, i.link, h),
|
|
54
|
+
"aria-label": v,
|
|
55
|
+
children: y
|
|
56
|
+
}) : /* @__PURE__ */ c("div", {
|
|
57
|
+
className: o("wim-source-citation", i.root, h),
|
|
57
58
|
role: "group",
|
|
58
|
-
"aria-label":
|
|
59
|
-
children:
|
|
59
|
+
"aria-label": v,
|
|
60
|
+
children: y
|
|
60
61
|
});
|
|
61
|
-
},
|
|
62
|
-
ref:
|
|
63
|
-
className:
|
|
62
|
+
}, f = a.forwardRef(({ sources: e, className: t, ...n }, r) => /* @__PURE__ */ c("div", {
|
|
63
|
+
ref: r,
|
|
64
|
+
className: o(i.list, t),
|
|
64
65
|
...n,
|
|
65
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
66
|
+
children: e.map((e, t) => /* @__PURE__ */ c(d, {
|
|
66
67
|
index: t + 1,
|
|
67
68
|
...e
|
|
68
69
|
}, e.url ?? e.title))
|
|
69
70
|
}));
|
|
70
|
-
|
|
71
|
+
f.displayName = "SourceCitationList";
|
|
71
72
|
//#endregion
|
|
72
|
-
export {
|
|
73
|
+
export { d as SourceCitation, f as SourceCitationList };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/check.cjs"),r=require("../../../icon/close.cjs"),i=require("../../../icon/copy.cjs"),a=require("../../media/Icon/Icon.cjs"),o=require("./terminal.module.cjs");let
|
|
3
|
-
`);try{await navigator.clipboard.writeText(t),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/check.cjs"),r=require("../../../icon/close.cjs"),i=require("../../../icon/copy.cjs"),a=require("../../media/Icon/Icon.cjs"),o=require("../../../i18n/generated/form.cjs"),s=require("./terminal.module.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("classnames");l=e.__toESM(l,1);let u=require("react/jsx-runtime");var d={30:`#2d2d2d`,31:`#e06c75`,32:`#98c379`,33:`#e5c07b`,34:`#61afef`,35:`#c678dd`,36:`#56b6c2`,37:`#abb2bf`,90:`#9aa1ab`,91:`#e06c75`,92:`#98c379`,93:`#e5c07b`,94:`#61afef`,95:`#c678dd`,96:`#56b6c2`,97:`#ffffff`};function f(e){let t=RegExp(`\x1B\\[([0-9;]*)m`,`g`),n=[],r=0,i={},a=0;for(let o of e.matchAll(t)){o.index>r&&n.push((0,u.jsx)(`span`,{style:{color:i.color,fontWeight:i.bold?`bold`:void 0},children:e.slice(r,o.index)},a++));let t=o[1]?o[1].split(`;`).map(Number):[0],s={...i};for(let e of t)e===0?Object.assign(s,{color:void 0,bold:void 0}):e===1?s.bold=!0:d[e]&&(s.color=d[e]);i=s,r=o.index+o[0].length}return r<e.length&&n.push((0,u.jsx)(`span`,{style:{color:i.color,fontWeight:i.bold?`bold`:void 0},children:e.slice(r)},a++)),n.length===1?n[0]:(0,u.jsx)(u.Fragment,{children:n})}var p=c.default.forwardRef(({lines:e=[],title:d,height:p,autoScroll:m=!0,prompt:h=`$`,showCopy:g=!0,showWindowControls:_=!1,onClear:v,className:y,style:b,...x},S)=>{let{t:C}=t.useWimTranslation(o.formNs),[w,T]=c.default.useState(!1),E=(0,c.useRef)(null);(0,c.useEffect)(()=>{m&&E.current&&(E.current.scrollTop=E.current.scrollHeight)},[e,m]);let D=(0,c.useCallback)(async()=>{let t=e.map(e=>e.type===`input`?`${h} ${e.content}`:e.content).join(`
|
|
3
|
+
`);try{await navigator.clipboard.writeText(t),T(!0),setTimeout(()=>T(!1),2e3)}catch{}},[e,h]);return(0,u.jsxs)(`div`,{ref:S,"data-theme":`dark`,className:(0,l.default)(`wim-terminal`,s.default.root,y),style:{...p==null?{}:{height:p},...b},...x,children:[(0,u.jsxs)(`div`,{className:s.default.titleBar,children:[_&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{className:s.default.dot,"data-color":`red`,"aria-hidden":`true`}),(0,u.jsx)(`span`,{className:s.default.dot,"data-color":`yellow`,"aria-hidden":`true`}),(0,u.jsx)(`span`,{className:s.default.dot,"data-color":`green`,"aria-hidden":`true`})]}),d&&(0,u.jsx)(`span`,{className:s.default.titleText,children:d}),(0,u.jsxs)(`div`,{className:s.default.titleActions,children:[g&&(0,u.jsx)(`button`,{type:`button`,className:(0,l.default)(s.default.titleBtn,w&&s.default.copied),onClick:D,"aria-label":C(w?`terminal.copied_label`:`terminal.copy_label`),children:(0,u.jsx)(a.Icon,{component:w?n.default:i.default,size:`sm`})}),v&&(0,u.jsx)(`button`,{type:`button`,className:s.default.titleBtn,onClick:v,"aria-label":C(`terminal.clear_label`),children:(0,u.jsx)(a.Icon,{component:r.default,size:`sm`})})]})]}),(0,u.jsx)(`div`,{ref:E,className:s.default.body,role:`log`,"aria-live":`polite`,"aria-label":d,tabIndex:0,children:e.map((e,t)=>(0,u.jsxs)(`div`,{className:(0,l.default)(s.default.line,e.type&&s.default[e.type]),children:[e.type===`input`&&(0,u.jsx)(`span`,{className:s.default.prompt,"aria-hidden":`true`,children:h}),(0,u.jsx)(`span`,{className:s.default.content,children:f(e.content)})]},e.id??t))})]})});p.displayName=`Terminal`,exports.Terminal=p;
|
|
@@ -4,12 +4,13 @@ import t from "../../../icon/check.js";
|
|
|
4
4
|
import n from "../../../icon/close.js";
|
|
5
5
|
import r from "../../../icon/copy.js";
|
|
6
6
|
import { Icon as i } from "../../media/Icon/Icon.js";
|
|
7
|
-
import a from "
|
|
8
|
-
import o
|
|
9
|
-
import u from "
|
|
10
|
-
import
|
|
7
|
+
import { formNs as a } from "../../../i18n/generated/form.js";
|
|
8
|
+
import o from "./terminal.module.js";
|
|
9
|
+
import s, { useCallback as c, useEffect as l, useRef as u } from "react";
|
|
10
|
+
import d from "classnames";
|
|
11
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
12
|
//#region src/components/ai/Terminal/Terminal.tsx
|
|
12
|
-
var
|
|
13
|
+
var h = {
|
|
13
14
|
30: "#2d2d2d",
|
|
14
15
|
31: "#e06c75",
|
|
15
16
|
32: "#98c379",
|
|
@@ -27,10 +28,10 @@ var m = {
|
|
|
27
28
|
96: "#56b6c2",
|
|
28
29
|
97: "#ffffff"
|
|
29
30
|
};
|
|
30
|
-
function
|
|
31
|
+
function g(e) {
|
|
31
32
|
let t = /* @__PURE__ */ RegExp("\x1B\\[([0-9;]*)m", "g"), n = [], r = 0, i = {}, a = 0;
|
|
32
33
|
for (let o of e.matchAll(t)) {
|
|
33
|
-
o.index > r && n.push(/* @__PURE__ */
|
|
34
|
+
o.index > r && n.push(/* @__PURE__ */ p("span", {
|
|
34
35
|
style: {
|
|
35
36
|
color: i.color,
|
|
36
37
|
fontWeight: i.bold ? "bold" : void 0
|
|
@@ -41,105 +42,105 @@ function h(e) {
|
|
|
41
42
|
for (let e of t) e === 0 ? Object.assign(s, {
|
|
42
43
|
color: void 0,
|
|
43
44
|
bold: void 0
|
|
44
|
-
}) : e === 1 ? s.bold = !0 :
|
|
45
|
+
}) : e === 1 ? s.bold = !0 : h[e] && (s.color = h[e]);
|
|
45
46
|
i = s, r = o.index + o[0].length;
|
|
46
47
|
}
|
|
47
|
-
return r < e.length && n.push(/* @__PURE__ */
|
|
48
|
+
return r < e.length && n.push(/* @__PURE__ */ p("span", {
|
|
48
49
|
style: {
|
|
49
50
|
color: i.color,
|
|
50
51
|
fontWeight: i.bold ? "bold" : void 0
|
|
51
52
|
},
|
|
52
53
|
children: e.slice(r)
|
|
53
|
-
}, a++)), n.length === 1 ? n[0] : /* @__PURE__ */ f
|
|
54
|
+
}, a++)), n.length === 1 ? n[0] : /* @__PURE__ */ p(f, { children: n });
|
|
54
55
|
}
|
|
55
|
-
var
|
|
56
|
-
let { t:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, [
|
|
60
|
-
let
|
|
61
|
-
let e =
|
|
56
|
+
var _ = s.forwardRef(({ lines: h = [], title: _, height: v, autoScroll: y = !0, prompt: b = "$", showCopy: x = !0, showWindowControls: S = !1, onClear: C, className: w, style: T, ...E }, D) => {
|
|
57
|
+
let { t: O } = e(a), [k, A] = s.useState(!1), j = u(null);
|
|
58
|
+
l(() => {
|
|
59
|
+
y && j.current && (j.current.scrollTop = j.current.scrollHeight);
|
|
60
|
+
}, [h, y]);
|
|
61
|
+
let M = c(async () => {
|
|
62
|
+
let e = h.map((e) => e.type === "input" ? `${b} ${e.content}` : e.content).join("\n");
|
|
62
63
|
try {
|
|
63
|
-
await navigator.clipboard.writeText(e),
|
|
64
|
+
await navigator.clipboard.writeText(e), A(!0), setTimeout(() => A(!1), 2e3);
|
|
64
65
|
} catch {}
|
|
65
|
-
}, [
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
ref:
|
|
66
|
+
}, [h, b]);
|
|
67
|
+
return /* @__PURE__ */ m("div", {
|
|
68
|
+
ref: D,
|
|
68
69
|
"data-theme": "dark",
|
|
69
|
-
className:
|
|
70
|
+
className: d("wim-terminal", o.root, w),
|
|
70
71
|
style: {
|
|
71
|
-
...
|
|
72
|
-
...
|
|
72
|
+
...v == null ? {} : { height: v },
|
|
73
|
+
...T
|
|
73
74
|
},
|
|
74
|
-
...
|
|
75
|
-
children: [/* @__PURE__ */
|
|
76
|
-
className:
|
|
75
|
+
...E,
|
|
76
|
+
children: [/* @__PURE__ */ m("div", {
|
|
77
|
+
className: o.titleBar,
|
|
77
78
|
children: [
|
|
78
|
-
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
className:
|
|
79
|
+
S && /* @__PURE__ */ m(f, { children: [
|
|
80
|
+
/* @__PURE__ */ p("span", {
|
|
81
|
+
className: o.dot,
|
|
81
82
|
"data-color": "red",
|
|
82
83
|
"aria-hidden": "true"
|
|
83
84
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
className:
|
|
85
|
+
/* @__PURE__ */ p("span", {
|
|
86
|
+
className: o.dot,
|
|
86
87
|
"data-color": "yellow",
|
|
87
88
|
"aria-hidden": "true"
|
|
88
89
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
className:
|
|
90
|
+
/* @__PURE__ */ p("span", {
|
|
91
|
+
className: o.dot,
|
|
91
92
|
"data-color": "green",
|
|
92
93
|
"aria-hidden": "true"
|
|
93
94
|
})
|
|
94
95
|
] }),
|
|
95
|
-
|
|
96
|
-
className:
|
|
97
|
-
children:
|
|
96
|
+
_ && /* @__PURE__ */ p("span", {
|
|
97
|
+
className: o.titleText,
|
|
98
|
+
children: _
|
|
98
99
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
className:
|
|
101
|
-
children: [
|
|
100
|
+
/* @__PURE__ */ m("div", {
|
|
101
|
+
className: o.titleActions,
|
|
102
|
+
children: [x && /* @__PURE__ */ p("button", {
|
|
102
103
|
type: "button",
|
|
103
|
-
className:
|
|
104
|
-
onClick:
|
|
105
|
-
"aria-label":
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
-
component:
|
|
104
|
+
className: d(o.titleBtn, k && o.copied),
|
|
105
|
+
onClick: M,
|
|
106
|
+
"aria-label": O(k ? "terminal.copied_label" : "terminal.copy_label"),
|
|
107
|
+
children: /* @__PURE__ */ p(i, {
|
|
108
|
+
component: k ? t : r,
|
|
108
109
|
size: "sm"
|
|
109
110
|
})
|
|
110
|
-
}),
|
|
111
|
+
}), C && /* @__PURE__ */ p("button", {
|
|
111
112
|
type: "button",
|
|
112
|
-
className:
|
|
113
|
-
onClick:
|
|
114
|
-
"aria-label":
|
|
115
|
-
children: /* @__PURE__ */
|
|
113
|
+
className: o.titleBtn,
|
|
114
|
+
onClick: C,
|
|
115
|
+
"aria-label": O("terminal.clear_label"),
|
|
116
|
+
children: /* @__PURE__ */ p(i, {
|
|
116
117
|
component: n,
|
|
117
118
|
size: "sm"
|
|
118
119
|
})
|
|
119
120
|
})]
|
|
120
121
|
})
|
|
121
122
|
]
|
|
122
|
-
}), /* @__PURE__ */
|
|
123
|
-
ref:
|
|
124
|
-
className:
|
|
123
|
+
}), /* @__PURE__ */ p("div", {
|
|
124
|
+
ref: j,
|
|
125
|
+
className: o.body,
|
|
125
126
|
role: "log",
|
|
126
127
|
"aria-live": "polite",
|
|
127
|
-
"aria-label":
|
|
128
|
+
"aria-label": _,
|
|
128
129
|
tabIndex: 0,
|
|
129
|
-
children:
|
|
130
|
-
className:
|
|
131
|
-
children: [e.type === "input" && /* @__PURE__ */
|
|
132
|
-
className:
|
|
130
|
+
children: h.map((e, t) => /* @__PURE__ */ m("div", {
|
|
131
|
+
className: d(o.line, e.type && o[e.type]),
|
|
132
|
+
children: [e.type === "input" && /* @__PURE__ */ p("span", {
|
|
133
|
+
className: o.prompt,
|
|
133
134
|
"aria-hidden": "true",
|
|
134
|
-
children:
|
|
135
|
-
}), /* @__PURE__ */
|
|
136
|
-
className:
|
|
137
|
-
children:
|
|
135
|
+
children: b
|
|
136
|
+
}), /* @__PURE__ */ p("span", {
|
|
137
|
+
className: o.content,
|
|
138
|
+
children: g(e.content)
|
|
138
139
|
})]
|
|
139
140
|
}, e.id ?? t))
|
|
140
141
|
})]
|
|
141
142
|
});
|
|
142
143
|
});
|
|
143
|
-
|
|
144
|
+
_.displayName = "Terminal";
|
|
144
145
|
//#endregion
|
|
145
|
-
export {
|
|
146
|
+
export { _ as Terminal };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_1byyb_35`,t=`_titleBar_1byyb_48`,n=`_dot_1byyb_57`,r=`_titleText_1byyb_73`,i=`_titleActions_1byyb_89`,a=`_titleBtn_1byyb_95`,o=`_copied_1byyb_122`,s=`_body_1byyb_129`,c=`_line_1byyb_144`,l=`_prompt_1byyb_155`,u=`_content_1byyb_144`,d=`_input_1byyb_171`,f=`_output_1byyb_174`,p=`_error_1byyb_177`,m=`_info_1byyb_183`,h={root:e,titleBar:t,dot:n,titleText:r,titleActions:i,titleBtn:a,copied:o,body:s,line:c,prompt:l,content:u,input:d,output:f,error:p,info:m};exports.body=s,exports.content=u,exports.copied=o,exports.default=h,exports.dot=n,exports.error=p,exports.info=m,exports.input=d,exports.line=c,exports.output=f,exports.prompt=l,exports.root=e,exports.titleActions=i,exports.titleBar=t,exports.titleBtn=a,exports.titleText=r;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/ai/Terminal/terminal.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_1byyb_35", t = "_titleBar_1byyb_48", n = "_dot_1byyb_57", r = "_titleText_1byyb_73", i = "_titleActions_1byyb_89", a = "_titleBtn_1byyb_95", o = "_copied_1byyb_122", s = "_body_1byyb_129", c = "_line_1byyb_144", l = "_prompt_1byyb_155", u = "_content_1byyb_144", d = "_input_1byyb_171", f = "_output_1byyb_174", p = "_error_1byyb_177", m = "_info_1byyb_183", h = {
|
|
4
4
|
root: e,
|
|
5
5
|
titleBar: t,
|
|
6
6
|
dot: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_xia4z_4`,t=`_thinking_xia4z_23`,n=`_header_xia4z_41`,r=`_chevron_xia4z_76`,i=`_expanded_xia4z_81`,a=`_title_xia4z_84`,o=`_bodyWrapper_xia4z_89`,s=`_open_xia4z_94`,c=`_body_xia4z_89`,l=`_item_xia4z_119`,u=`_content_xia4z_122`,d=`_label_xia4z_125`,f=`_text_xia4z_141`,p=`_connector_xia4z_146`,m=`_spinner_xia4z_149`,h=`_pending_xia4z_168`,g=`_error_xia4z_171`,_=`_streaming_xia4z_177`,v={root:e,thinking:t,"thought-pulse":`_thought-pulse_xia4z_1`,header:n,chevron:r,expanded:i,title:a,bodyWrapper:o,open:s,body:c,item:l,content:u,label:d,text:f,connector:p,spinner:m,"thought-spin":`_thought-spin_xia4z_1`,pending:h,error:g,streaming:_,"cursor-blink":`_cursor-blink_xia4z_1`};exports.body=c,exports.bodyWrapper=o,exports.chevron=r,exports.connector=p,exports.content=u,exports.default=v,exports.error=g,exports.expanded=i,exports.header=n,exports.item=l,exports.label=d,exports.open=s,exports.pending=h,exports.root=e,exports.spinner=m,exports.streaming=_,exports.text=f,exports.thinking=t,exports.title=a;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/ai/ThoughtProcess/thought-process.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_xia4z_4", t = "_thinking_xia4z_23", n = "_header_xia4z_41", r = "_chevron_xia4z_76", i = "_expanded_xia4z_81", a = "_title_xia4z_84", o = "_bodyWrapper_xia4z_89", s = "_open_xia4z_94", c = "_body_xia4z_89", l = "_item_xia4z_119", u = "_content_xia4z_122", d = "_label_xia4z_125", f = "_text_xia4z_141", p = "_connector_xia4z_146", m = "_spinner_xia4z_149", h = "_pending_xia4z_168", g = "_error_xia4z_171", _ = "_streaming_xia4z_177", v = {
|
|
4
4
|
root: e,
|
|
5
5
|
thinking: t,
|
|
6
|
-
"thought-pulse": "_thought-
|
|
6
|
+
"thought-pulse": "_thought-pulse_xia4z_1",
|
|
7
7
|
header: n,
|
|
8
8
|
chevron: r,
|
|
9
9
|
expanded: i,
|
|
@@ -17,11 +17,11 @@ var e = "_root_lwulp_4", t = "_thinking_lwulp_23", n = "_header_lwulp_41", r = "
|
|
|
17
17
|
text: f,
|
|
18
18
|
connector: p,
|
|
19
19
|
spinner: m,
|
|
20
|
-
"thought-spin": "_thought-
|
|
20
|
+
"thought-spin": "_thought-spin_xia4z_1",
|
|
21
21
|
pending: h,
|
|
22
22
|
error: g,
|
|
23
23
|
streaming: _,
|
|
24
|
-
"cursor-blink": "_cursor-
|
|
24
|
+
"cursor-blink": "_cursor-blink_xia4z_1"
|
|
25
25
|
};
|
|
26
26
|
//#endregion
|
|
27
27
|
export { c as body, o as bodyWrapper, r as chevron, p as connector, u as content, v as default, g as error, i as expanded, n as header, l as item, d as label, s as open, h as pending, e as root, m as spinner, _ as streaming, f as text, t as thinking, a as title };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/close.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../../icon/close.cjs"),i=require("../../../icon/plus.cjs"),a=require("../../media/Icon/Icon.cjs"),o=require("./thread-list.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=s.default.forwardRef(({threads:e,activeId:s,onSelect:u,onDelete:d,onNewThread:f,labels:p,className:m,...h},g)=>{let{t:_}=t.useWimTranslation(n.commonNs),{newThread:v=_(`threadList.new_thread`),empty:y=_(`threadList.empty`),delete:b=_(`threadList.delete`),listAriaLabel:x=_(`threadList.label`)}=p??{};return(0,l.jsxs)(`nav`,{ref:g,className:(0,c.default)(`wim-thread-list`,o.default.root,m),"aria-label":x,...h,children:[f&&(0,l.jsxs)(`button`,{type:`button`,className:o.default.newButton,onClick:f,children:[(0,l.jsx)(a.Icon,{component:i.default,size:`sm`}),(0,l.jsx)(`span`,{children:v})]}),e.length===0?(0,l.jsx)(`p`,{className:o.default.empty,children:y}):(0,l.jsx)(`ul`,{className:o.default.list,children:e.map(e=>{let t=e.id===s;return(0,l.jsxs)(`li`,{className:o.default.item,children:[(0,l.jsxs)(`button`,{type:`button`,className:(0,c.default)(o.default.thread,t&&o.default.active),"aria-current":t||void 0,onClick:()=>u?.(e.id),children:[e.iconName&&(0,l.jsx)(`span`,{className:o.default.icon,"aria-hidden":`true`,children:(0,l.jsx)(a.Icon,{name:e.iconName,size:`sm`})}),(0,l.jsxs)(`span`,{className:o.default.body,children:[(0,l.jsxs)(`span`,{className:o.default.titleRow,children:[e.unread&&(0,l.jsx)(`span`,{className:o.default.unread,"aria-hidden":`true`}),(0,l.jsx)(`span`,{className:o.default.title,children:e.title}),e.timestamp&&(0,l.jsx)(`span`,{className:o.default.timestamp,children:e.timestamp})]}),e.preview&&(0,l.jsx)(`span`,{className:o.default.preview,children:e.preview})]})]}),d&&(0,l.jsx)(`button`,{type:`button`,className:o.default.deleteButton,"aria-label":b,onClick:()=>d(e.id),children:(0,l.jsx)(a.Icon,{component:r.default,size:`sm`})})]},e.id)})})]})});u.displayName=`ThreadList`;var d=u;exports.ConversationList=d,exports.ThreadList=u;
|
|
@@ -1,79 +1,80 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
|
-
import t from "../../../
|
|
4
|
-
import n from "../../../icon/
|
|
5
|
-
import
|
|
6
|
-
import i from "
|
|
7
|
-
import a from "
|
|
8
|
-
import o from "
|
|
9
|
-
import
|
|
3
|
+
import { commonNs as t } from "../../../i18n/generated/common.js";
|
|
4
|
+
import n from "../../../icon/close.js";
|
|
5
|
+
import r from "../../../icon/plus.js";
|
|
6
|
+
import { Icon as i } from "../../media/Icon/Icon.js";
|
|
7
|
+
import a from "./thread-list.module.js";
|
|
8
|
+
import o from "react";
|
|
9
|
+
import s from "classnames";
|
|
10
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
11
|
//#region src/components/ai/ThreadList/ThreadList.tsx
|
|
11
|
-
var
|
|
12
|
-
let { t:
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
ref:
|
|
15
|
-
className:
|
|
16
|
-
"aria-label":
|
|
17
|
-
...
|
|
18
|
-
children: [
|
|
12
|
+
var u = o.forwardRef(({ threads: o, activeId: u, onSelect: d, onDelete: f, onNewThread: p, labels: m, className: h, ...g }, _) => {
|
|
13
|
+
let { t: v } = e(t), { newThread: y = v("threadList.new_thread"), empty: b = v("threadList.empty"), delete: x = v("threadList.delete"), listAriaLabel: S = v("threadList.label") } = m ?? {};
|
|
14
|
+
return /* @__PURE__ */ l("nav", {
|
|
15
|
+
ref: _,
|
|
16
|
+
className: s("wim-thread-list", a.root, h),
|
|
17
|
+
"aria-label": S,
|
|
18
|
+
...g,
|
|
19
|
+
children: [p && /* @__PURE__ */ l("button", {
|
|
19
20
|
type: "button",
|
|
20
|
-
className:
|
|
21
|
-
onClick:
|
|
22
|
-
children: [/* @__PURE__ */
|
|
23
|
-
component:
|
|
21
|
+
className: a.newButton,
|
|
22
|
+
onClick: p,
|
|
23
|
+
children: [/* @__PURE__ */ c(i, {
|
|
24
|
+
component: r,
|
|
24
25
|
size: "sm"
|
|
25
|
-
}), /* @__PURE__ */
|
|
26
|
-
}),
|
|
27
|
-
className:
|
|
28
|
-
children:
|
|
29
|
-
}) : /* @__PURE__ */
|
|
30
|
-
className:
|
|
31
|
-
children:
|
|
32
|
-
let
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
className:
|
|
35
|
-
children: [/* @__PURE__ */
|
|
26
|
+
}), /* @__PURE__ */ c("span", { children: y })]
|
|
27
|
+
}), o.length === 0 ? /* @__PURE__ */ c("p", {
|
|
28
|
+
className: a.empty,
|
|
29
|
+
children: b
|
|
30
|
+
}) : /* @__PURE__ */ c("ul", {
|
|
31
|
+
className: a.list,
|
|
32
|
+
children: o.map((e) => {
|
|
33
|
+
let t = e.id === u;
|
|
34
|
+
return /* @__PURE__ */ l("li", {
|
|
35
|
+
className: a.item,
|
|
36
|
+
children: [/* @__PURE__ */ l("button", {
|
|
36
37
|
type: "button",
|
|
37
|
-
className:
|
|
38
|
-
"aria-current":
|
|
39
|
-
onClick: () =>
|
|
40
|
-
children: [e.iconName && /* @__PURE__ */
|
|
41
|
-
className:
|
|
38
|
+
className: s(a.thread, t && a.active),
|
|
39
|
+
"aria-current": t || void 0,
|
|
40
|
+
onClick: () => d?.(e.id),
|
|
41
|
+
children: [e.iconName && /* @__PURE__ */ c("span", {
|
|
42
|
+
className: a.icon,
|
|
42
43
|
"aria-hidden": "true",
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ c(i, {
|
|
44
45
|
name: e.iconName,
|
|
45
46
|
size: "sm"
|
|
46
47
|
})
|
|
47
|
-
}), /* @__PURE__ */
|
|
48
|
-
className:
|
|
49
|
-
children: [/* @__PURE__ */
|
|
50
|
-
className:
|
|
48
|
+
}), /* @__PURE__ */ l("span", {
|
|
49
|
+
className: a.body,
|
|
50
|
+
children: [/* @__PURE__ */ l("span", {
|
|
51
|
+
className: a.titleRow,
|
|
51
52
|
children: [
|
|
52
|
-
e.unread && /* @__PURE__ */
|
|
53
|
-
className:
|
|
53
|
+
e.unread && /* @__PURE__ */ c("span", {
|
|
54
|
+
className: a.unread,
|
|
54
55
|
"aria-hidden": "true"
|
|
55
56
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
className:
|
|
57
|
+
/* @__PURE__ */ c("span", {
|
|
58
|
+
className: a.title,
|
|
58
59
|
children: e.title
|
|
59
60
|
}),
|
|
60
|
-
e.timestamp && /* @__PURE__ */
|
|
61
|
-
className:
|
|
61
|
+
e.timestamp && /* @__PURE__ */ c("span", {
|
|
62
|
+
className: a.timestamp,
|
|
62
63
|
children: e.timestamp
|
|
63
64
|
})
|
|
64
65
|
]
|
|
65
|
-
}), e.preview && /* @__PURE__ */
|
|
66
|
-
className:
|
|
66
|
+
}), e.preview && /* @__PURE__ */ c("span", {
|
|
67
|
+
className: a.preview,
|
|
67
68
|
children: e.preview
|
|
68
69
|
})]
|
|
69
70
|
})]
|
|
70
|
-
}),
|
|
71
|
+
}), f && /* @__PURE__ */ c("button", {
|
|
71
72
|
type: "button",
|
|
72
|
-
className:
|
|
73
|
-
"aria-label":
|
|
74
|
-
onClick: () =>
|
|
75
|
-
children: /* @__PURE__ */
|
|
76
|
-
component:
|
|
73
|
+
className: a.deleteButton,
|
|
74
|
+
"aria-label": x,
|
|
75
|
+
onClick: () => f(e.id),
|
|
76
|
+
children: /* @__PURE__ */ c(i, {
|
|
77
|
+
component: n,
|
|
77
78
|
size: "sm"
|
|
78
79
|
})
|
|
79
80
|
})]
|
|
@@ -82,7 +83,7 @@ var l = a.forwardRef(({ threads: a, activeId: l, onSelect: u, onDelete: d, onNew
|
|
|
82
83
|
})]
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
|
-
|
|
86
|
-
var
|
|
86
|
+
u.displayName = "ThreadList";
|
|
87
|
+
var d = u;
|
|
87
88
|
//#endregion
|
|
88
|
-
export {
|
|
89
|
+
export { d as ConversationList, u as ThreadList };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_1kevj_24`,t=`_newButton_1kevj_39`,n=`_empty_1kevj_79`,r=`_list_1kevj_86`,i=`_item_1kevj_94`,a=`_deleteButton_1kevj_99`,o=`_thread_1kevj_102`,s=`_active_1kevj_118`,c=`_icon_1kevj_124`,l=`_body_1kevj_131`,u=`_titleRow_1kevj_138`,d=`_unread_1kevj_144`,f=`_title_1kevj_138`,p=`_timestamp_1kevj_160`,m=`_preview_1kevj_165`,h={root:e,newButton:t,empty:n,list:r,item:i,deleteButton:a,thread:o,active:s,icon:c,body:l,titleRow:u,unread:d,title:f,timestamp:p,preview:m};exports.active=s,exports.body=l,exports.default=h,exports.deleteButton=a,exports.empty=n,exports.icon=c,exports.item=i,exports.list=r,exports.newButton=t,exports.preview=m,exports.root=e,exports.thread=o,exports.timestamp=p,exports.title=f,exports.titleRow=u,exports.unread=d;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/ai/ThreadList/thread-list.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_1kevj_24", t = "_newButton_1kevj_39", n = "_empty_1kevj_79", r = "_list_1kevj_86", i = "_item_1kevj_94", a = "_deleteButton_1kevj_99", o = "_thread_1kevj_102", s = "_active_1kevj_118", c = "_icon_1kevj_124", l = "_body_1kevj_131", u = "_titleRow_1kevj_138", d = "_unread_1kevj_144", f = "_title_1kevj_138", p = "_timestamp_1kevj_160", m = "_preview_1kevj_165", h = {
|
|
4
4
|
root: e,
|
|
5
5
|
newButton: t,
|
|
6
6
|
empty: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_yu98d_23`,t=`_item_yu98d_29`,n=`_disabled_yu98d_38`,r=`_trigger_yu98d_42`,i=`_open_yu98d_62`,a=`_triggerContent_yu98d_91`,o=`_chevron_yu98d_94`,s=`_content_yu98d_105`,c=`_contentInner_yu98d_118`,l=`_contentBody_yu98d_121`,u={root:e,item:t,disabled:n,trigger:r,open:i,triggerContent:a,chevron:o,content:s,contentInner:c,contentBody:l};exports.chevron=o,exports.content=s,exports.contentBody=l,exports.contentInner=c,exports.default=u,exports.disabled=n,exports.item=t,exports.open=i,exports.root=e,exports.trigger=r,exports.triggerContent=a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/Accordion/accordion.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_yu98d_23", t = "_item_yu98d_29", n = "_disabled_yu98d_38", r = "_trigger_yu98d_42", i = "_open_yu98d_62", a = "_triggerContent_yu98d_91", o = "_chevron_yu98d_94", s = "_content_yu98d_105", c = "_contentInner_yu98d_118", l = "_contentBody_yu98d_121", u = {
|
|
4
4
|
root: e,
|
|
5
5
|
item: t,
|
|
6
6
|
disabled: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../hooks/useMergedRef.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../../hooks/useMergedRef.cjs"),i=require("./encode.cjs"),a=require("./warn-unencodable-value.cjs"),o=require("./barcode.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u={code128:`Code 128`,ean13:`EAN-13`},d=11,f=8,p=.35,m=7,h=s.default.forwardRef(({value:e,format:h=`code128`,height:g=64,moduleWidth:_=2,showValue:v=!0,label:y,className:b,...x},S)=>{let{t:C}=t.useWimTranslation(n.commonNs),w=i.encodeBarcode(e,h),T=s.default.useRef(null),[E,D]=s.default.useState(!1);s.default.useLayoutEffect(()=>{let e=T.current;if(!e||typeof ResizeObserver>`u`)return;let t=()=>D(e.scrollWidth>e.clientWidth);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[w?.modules,_]);let O=r.useMergedRef(S,T);if(!w){a.warnUnencodableValue(e,h,u[h]);let t=C(`barcode.invalid`,{format:u[h]});return(0,l.jsxs)(`div`,{ref:O,"data-invalid":`true`,className:(0,c.default)(`wim-barcode`,o.default.root,o.default.invalid,b),...x,children:[(0,l.jsx)(`span`,{className:o.default.invalidMessage,children:t}),(0,l.jsx)(`span`,{className:o.default.invalidValue,children:e})]})}let k=w.modules.length+22,A=k*_,j=d,M=i.toRuns(w.modules).map(([e,t])=>{let n=j;return j+=t,e?{x:n,width:t,module:n-d}:null}),N=h===`ean13`&&v?w.print:void 0,P=N?Math.min(f*_,g*p):0,F=g-P,I=e=>N?N.guards.some(([t,n])=>e.module>=t&&e.module+e.width<=n):!1,L=N?[...[...N.left.text].map((e,t)=>({key:`l${t}`,digit:e,module:N.left.from+t*m+m/2})),...[...N.right.text].map((e,t)=>({key:`r${t}`,digit:e,module:N.right.from+t*m+m/2}))]:[];return(0,l.jsxs)(`div`,{ref:O,role:`img`,tabIndex:E?0:void 0,"aria-label":y??C(`barcode.aria_label`,{value:w.text}),"data-format":h,className:(0,c.default)(`wim-barcode`,o.default.root,b),...x,children:[N?(0,l.jsxs)(`svg`,{className:o.default.symbol,width:A,height:g,viewBox:`0 0 ${A} ${g}`,shapeRendering:`crispEdges`,"aria-hidden":`true`,children:[M.map(e=>e?(0,l.jsx)(`rect`,{x:e.x*_,y:0,width:e.width*_,height:I(e)?g:F,"data-guard":I(e)?`true`:void 0},e.x):null),(0,l.jsx)(`text`,{className:o.default.printedDigit,x:10*_,y:g,textAnchor:`end`,fontSize:P*.86,children:N.lead}),L.map(e=>(0,l.jsx)(`text`,{className:o.default.printedDigit,x:(d+e.module)*_,y:g,textAnchor:`middle`,fontSize:P*.86,children:e.digit},e.key))]}):(0,l.jsx)(`svg`,{className:o.default.symbol,width:A,height:g,viewBox:`0 0 ${k} ${g}`,preserveAspectRatio:`none`,shapeRendering:`crispEdges`,"aria-hidden":`true`,children:M.map(e=>e?(0,l.jsx)(`rect`,{x:e.x,y:0,width:e.width,height:g},e.x):null)}),v&&!N?(0,l.jsx)(`span`,{className:o.default.value,children:w.text}):null]})});h.displayName=`Barcode`,exports.Barcode=h;
|