dishui 0.0.91 → 0.0.97
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/.release-verified.json +6 -0
- package/dist/ai.js +22 -0
- package/dist/components/Card/Metric2.js +11 -11
- package/dist/components/Card/Metric2.js.map +1 -1
- package/dist/components/Card/index.d.ts +20 -0
- package/dist/components/Card/index.js +184 -179
- package/dist/components/Card/index.js.map +1 -1
- package/dist/components/GroupButton/index.js +4 -4
- package/dist/components/GroupButton/index.js.map +1 -1
- package/dist/components/GroupedTable/index.js +10 -10
- package/dist/components/GroupedTable/index.js.map +1 -1
- package/dist/components/NavigationList/index.js +9 -9
- package/dist/components/NavigationList/index.js.map +1 -1
- package/dist/components/Section/index.js +11 -11
- package/dist/components/Section/index.js.map +1 -1
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/Skeleton/index.js.map +1 -1
- package/dist/components/Table/index.js +6 -6
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/ai/AgentChat/index.d.ts +54 -0
- package/dist/components/ai/AgentChat/index.js +176 -0
- package/dist/components/ai/AgentChat/index.js.map +1 -0
- package/dist/components/ai/AgentScreen/index.d.ts +50 -0
- package/dist/components/ai/AgentScreen/index.js +233 -0
- package/dist/components/ai/AgentScreen/index.js.map +1 -0
- package/dist/components/ai/ApprovalCard/index.d.ts +26 -0
- package/dist/components/ai/ApprovalCard/index.js +89 -0
- package/dist/components/ai/ApprovalCard/index.js.map +1 -0
- package/dist/components/ai/CodeView/index.d.ts +30 -0
- package/dist/components/ai/CodeView/index.js +149 -0
- package/dist/components/ai/CodeView/index.js.map +1 -0
- package/dist/components/ai/CommandSearch/index.d.ts +39 -0
- package/dist/components/ai/CommandSearch/index.js +217 -0
- package/dist/components/ai/CommandSearch/index.js.map +1 -0
- package/dist/components/ai/ContextCards/index.d.ts +42 -0
- package/dist/components/ai/ContextCards/index.js +106 -0
- package/dist/components/ai/ContextCards/index.js.map +1 -0
- package/dist/components/ai/DiffTable/index.d.ts +70 -0
- package/dist/components/ai/DiffTable/index.js +235 -0
- package/dist/components/ai/DiffTable/index.js.map +1 -0
- package/dist/components/ai/FilterTable/index.d.ts +35 -0
- package/dist/components/ai/FilterTable/index.js +86 -0
- package/dist/components/ai/FilterTable/index.js.map +1 -0
- package/dist/components/ai/FineTuneCard/index.d.ts +24 -0
- package/dist/components/ai/FineTuneCard/index.js +75 -0
- package/dist/components/ai/FineTuneCard/index.js.map +1 -0
- package/dist/components/ai/InsightCards/index.d.ts +23 -0
- package/dist/components/ai/InsightCards/index.js +64 -0
- package/dist/components/ai/InsightCards/index.js.map +1 -0
- package/dist/components/ai/LoadingState/index.d.ts +22 -0
- package/dist/components/ai/LoadingState/index.js +80 -0
- package/dist/components/ai/LoadingState/index.js.map +1 -0
- package/dist/components/ai/PromptBar/index.d.ts +26 -0
- package/dist/components/ai/PromptBar/index.js +117 -0
- package/dist/components/ai/PromptBar/index.js.map +1 -0
- package/dist/components/ai/RecommendationCard/index.d.ts +44 -0
- package/dist/components/ai/RecommendationCard/index.js +142 -0
- package/dist/components/ai/RecommendationCard/index.js.map +1 -0
- package/dist/components/ai/RecordsTable/index.d.ts +65 -0
- package/dist/components/ai/RecordsTable/index.js +334 -0
- package/dist/components/ai/RecordsTable/index.js.map +1 -0
- package/dist/components/ai/SelectionActions/index.d.ts +19 -0
- package/dist/components/ai/SelectionActions/index.js +40 -0
- package/dist/components/ai/SelectionActions/index.js.map +1 -0
- package/dist/components/ai/StateFlow/index.d.ts +24 -0
- package/dist/components/ai/StateFlow/index.js +50 -0
- package/dist/components/ai/StateFlow/index.js.map +1 -0
- package/dist/components/ai/StreamingText/index.d.ts +44 -0
- package/dist/components/ai/StreamingText/index.js +211 -0
- package/dist/components/ai/StreamingText/index.js.map +1 -0
- package/dist/components/ai/TaskRows/index.d.ts +53 -0
- package/dist/components/ai/TaskRows/index.js +186 -0
- package/dist/components/ai/TaskRows/index.js.map +1 -0
- package/dist/components/ai/Thinking/index.d.ts +47 -0
- package/dist/components/ai/Thinking/index.js +197 -0
- package/dist/components/ai/Thinking/index.js.map +1 -0
- package/dist/components/ai/ToolChips/index.d.ts +21 -0
- package/dist/components/ai/ToolChips/index.js +63 -0
- package/dist/components/ai/ToolChips/index.js.map +1 -0
- package/dist/components/ai/index.d.ts +50 -0
- package/dist/components/ai/shared.d.ts +13 -0
- package/dist/components/ai/shared.js +25 -0
- package/dist/components/ai/shared.js.map +1 -0
- package/dist/components/pro/DataTable/rowDetailExtension.js +1 -1
- package/dist/components/pro/DataTable/rowDetailExtension.js.map +1 -1
- package/dist/dishui.css +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +128 -107
- package/dist/layouts/Sidebar.d.ts +16 -0
- package/dist/layouts/Sidebar.js +85 -52
- package/dist/layouts/Sidebar.js.map +1 -1
- package/package.json +10 -3
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export type { DividerProps } from './components/Divider';
|
|
|
35
35
|
export { default as Select } from './components/Select';
|
|
36
36
|
export type { SelectProps, Option } from './components/Select';
|
|
37
37
|
export { default as Card } from './components/Card';
|
|
38
|
-
export type { CardProps, CardFeatureProps, CardQuoteProps, CardMetaProps, CardInfoProps, CardInfoTone, CardStatProps, CardMetricProps, CardMetricItem, } from './components/Card';
|
|
38
|
+
export type { CardProps, CardFeatureProps, CardQuoteProps, CardMetaProps, CardInfoProps, CardInfoTone, CardStatProps, CardMetricProps, CardMetricItem, ApprovalCardProps, ApprovalOption, RecommendationCardProps, Recommendation, RecommendationAlternative, RecommendationCardLabels, ConfidenceLevel, ContextCardsProps, ContextChunk, ContextSource, ContextSourceKind, ContextCardsLabels, InsightCardsProps, InsightCardItem, FineTuneCardProps, FineTuneMetric, } from './components/Card';
|
|
39
39
|
export { default as PageHeader } from './components/PageHeader';
|
|
40
40
|
export type { PageHeaderProps } from './components/PageHeader';
|
|
41
41
|
export { default as Page, PageBody, PageLeft, PageRight, PageMain, PageFooter, PageFloat } from './components/Page';
|
|
@@ -95,7 +95,7 @@ export type { CodeEditorProps, CodeEditorHandle, LanguageType, EditorTheme, Cont
|
|
|
95
95
|
export type { SearchResult, SearchConfig } from './layouts/headbar/HeadbarSearch';
|
|
96
96
|
export { default as MainLayout } from './layouts/MainLayout';
|
|
97
97
|
export { default as Sidebar } from './layouts/Sidebar';
|
|
98
|
-
export type { SidebarProps, SidebarLevelText } from './layouts/Sidebar';
|
|
98
|
+
export type { SidebarProps, SidebarLevelText, SidebarHeader, SidebarAction } from './layouts/Sidebar';
|
|
99
99
|
export { default as Navbar } from './layouts/Navbar';
|
|
100
100
|
export { Headbar, HeadbarTitle, HeadbarSearch, HeadbarLangSwitcher, HeadbarThemeSwitcher, } from './layouts/headbar';
|
|
101
101
|
export type { HeadbarProps, HeadbarTitleProps, HeadbarSearchProps, HeadbarThemeSwitcherProps } from './layouts/headbar';
|
|
@@ -126,3 +126,4 @@ export { Gantt, useGanttState, useGanttDrag, DEFAULT_SCALE_CONFIGS, DEFAULT_CATE
|
|
|
126
126
|
export type { GanttProps, GanttHandle, GanttNode, GanttNodeId, GanttColumn, GanttLabels, GanttScaleLevel, GanttScaleConfig, GanttCategoryConfig, GanttBarRenderProps, GanttBarChangeEvent, GanttContextMenuEvent, GanttTodayMarker, GanttTooltipConfig, GanttGridConfig, GanttDependencyLink, DependencyLineStyle, HolidayCalendar, HolidayEntry, TimeWindow, FlatGanttNode, TimelineHeaderGroup, } from './components/pro/Gantt';
|
|
127
127
|
export { Calendar, useCalendarState, useCalendarDrag, LABELS_EN as CALENDAR_LABELS_EN, LABELS_ZH as CALENDAR_LABELS_ZH, DEFAULT_COLOR_OPTIONS as CALENDAR_DEFAULT_COLOR_OPTIONS, parseDate as parseCalendarDate, formatDate as formatCalendarDate, todayStr as calendarTodayStr, isToday as isCalendarToday, isSameDay as isCalendarSameDay, isWeekend as isCalendarWeekend, isHoliday as isCalendarHoliday, isNonWorkingDay as isCalendarNonWorkingDay, getHolidayEntry as getCalendarHolidayEntry, getDaysInMonth as getCalendarDaysInMonth, getFirstDayOfMonth as getCalendarFirstDayOfMonth, getMonthDates as getCalendarMonthDates, getWeekDates as getCalendarWeekDates, minutesToTime as calendarMinutesToTime, timeToMinutes as calendarTimeToMinutes, formatTime as formatCalendarTime, parseTime as parseCalendarTime, generateTimeSlots as generateCalendarTimeSlots, TIME_SLOTS as CALENDAR_TIME_SLOTS, SLOT_HEIGHT as CALENDAR_SLOT_HEIGHT, TIME_GRID_HEIGHT as CALENDAR_TIME_GRID_HEIGHT, addDays as addCalendarDays, generateId as generateCalendarId, clamp as calendarClamp, } from './components/pro/Calendar';
|
|
128
128
|
export type { CalendarProps, CalendarHandle, CalendarEntry, CalendarViewMode, CalendarLabels, CalendarDragEvent, HolidayCalendar as CalendarHolidayCalendar, HolidayEntry as CalendarHolidayEntry, UseCalendarStateOptions, EntryModalState, CalendarDragState, CalendarDropTarget, UseCalendarDragOptions, } from './components/pro/Calendar';
|
|
129
|
+
export * from './components/ai';
|
package/dist/index.js
CHANGED
|
@@ -21,110 +21,131 @@ import b from "./components/Switch/index.js";
|
|
|
21
21
|
import x from "./components/Tooltip/index.js";
|
|
22
22
|
import S from "./components/Divider/index.js";
|
|
23
23
|
import C from "./components/Select/index.js";
|
|
24
|
-
import w from "./components/
|
|
25
|
-
import T from "./components/
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import oe from "./components/
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import {
|
|
60
|
-
import
|
|
61
|
-
import {
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import {
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import _t from "./components/pro/CodeEditor/
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import {
|
|
104
|
-
import
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import
|
|
108
|
-
import
|
|
109
|
-
import {
|
|
110
|
-
import
|
|
111
|
-
import
|
|
112
|
-
import {
|
|
113
|
-
import pn from "./components/pro/Flow/
|
|
114
|
-
import
|
|
115
|
-
import
|
|
116
|
-
import
|
|
117
|
-
import
|
|
118
|
-
import {
|
|
119
|
-
import
|
|
120
|
-
import
|
|
121
|
-
import
|
|
122
|
-
import {
|
|
123
|
-
import
|
|
124
|
-
import {
|
|
125
|
-
import
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import
|
|
130
|
-
|
|
24
|
+
import w from "./components/ai/ApprovalCard/index.js";
|
|
25
|
+
import { AGENT_STATUS_LABEL as T, formatDuration as E, formatElapsed as D } from "./components/ai/shared.js";
|
|
26
|
+
import O, { confidenceLevel as k } from "./components/ai/RecommendationCard/index.js";
|
|
27
|
+
import A from "./components/ai/ContextCards/index.js";
|
|
28
|
+
import j from "./components/ai/InsightCards/index.js";
|
|
29
|
+
import M from "./components/ai/FineTuneCard/index.js";
|
|
30
|
+
import N from "./components/Card/index.js";
|
|
31
|
+
import P from "./components/PageHeader/index.js";
|
|
32
|
+
import F from "./components/Page/Float2.js";
|
|
33
|
+
import I, { PageBody as L, PageFooter as R, PageLeft as z, PageMain as B, PageRight as V } from "./components/Page/index.js";
|
|
34
|
+
import { generateSidebarActiveStyles as H, generateTreeActiveStyles as U, themeActiveStyles as W } from "./styles/themeStyles.js";
|
|
35
|
+
import G from "./components/Tree/Tree.js";
|
|
36
|
+
import { DesktopSidebarToggleButton as K, MobileSidebarToggleButton as q, SidebarToggleButtons as J } from "./components/SidebarToggleButton/index.js";
|
|
37
|
+
import Y from "./layouts/Sidebar.js";
|
|
38
|
+
import X, { Container as Z, Flex as Q, Grid as $, GridItem as ee, Group as te, Space as ne } from "./components/Layout/index.js";
|
|
39
|
+
import { DashboardSuite as re } from "./components/LayoutSuite/DashboardSuite.js";
|
|
40
|
+
import { AdminSuite as ie, BlankSuite as ae, BlogSuite as oe, LayoutSuite as se, MailSuite as ce, WikiSuite as le } from "./components/LayoutSuite/index.js";
|
|
41
|
+
import ue from "./components/EmptyState/index.js";
|
|
42
|
+
import de from "./components/Avatar/index.js";
|
|
43
|
+
import fe from "./components/Accordion/index.js";
|
|
44
|
+
import pe from "./components/Modal/index.js";
|
|
45
|
+
import me from "./components/Tabs/index.js";
|
|
46
|
+
import he from "./components/List/index.js";
|
|
47
|
+
import ge from "./components/Row/index.js";
|
|
48
|
+
import _e from "./components/Column/index.js";
|
|
49
|
+
import ve from "./components/Image/index.js";
|
|
50
|
+
import ye from "./components/Icon/index.js";
|
|
51
|
+
import be from "./components/Slider/index.js";
|
|
52
|
+
import xe from "./components/DateTimeInput/index.js";
|
|
53
|
+
import Se from "./components/MultipleChoice/index.js";
|
|
54
|
+
import Ce from "./components/ChoicePicker/index.js";
|
|
55
|
+
import we from "./layouts/headbar/Headbar.js";
|
|
56
|
+
import Te from "./layouts/headbar/HeadbarTitle.js";
|
|
57
|
+
import Ee from "./layouts/headbar/HeadbarSearch.js";
|
|
58
|
+
import De from "./layouts/headbar/HeadbarLangSwitcher.js";
|
|
59
|
+
import { getThemes as Oe } from "./utils/themes.js";
|
|
60
|
+
import ke from "./layouts/headbar/HeadbarThemeSwitcher.js";
|
|
61
|
+
import { AppLayoutWrapper as Ae, AppProvider as je, AppShell as Me, useAppContext as Ne, useAuth as Pe } from "./contexts/AppContext.js";
|
|
62
|
+
import Fe from "./hooks/useTableColumns.js";
|
|
63
|
+
import Ie from "./hooks/useTableData.js";
|
|
64
|
+
import { defineExtension as Le } from "./components/pro/DataTable/extension.js";
|
|
65
|
+
import { computePivot as Re } from "./components/pro/DataTable/pivotEngine.js";
|
|
66
|
+
import { PivotView as ze } from "./components/pro/DataTable/PivotView.js";
|
|
67
|
+
import { PivotPanel as Be } from "./components/pro/DataTable/PivotPanel.js";
|
|
68
|
+
import { usePivotExtension as Ve } from "./components/pro/DataTable/pivotExtension.js";
|
|
69
|
+
import { useRowDetailExtension as He } from "./components/pro/DataTable/rowDetailExtension.js";
|
|
70
|
+
import Ue, { createActionColumn as We, createColumn as Ge, createComputedColumn as Ke, createSelectOptions as qe, createSelectionColumn as Je, dateSort as Ye, defaultFilterFunctions as Xe, extractUniqueOptions as Ze, numericSort as Qe, stringSort as $e, treeSort as et } from "./data-table.js";
|
|
71
|
+
import tt from "./components/Chart/Chart.js";
|
|
72
|
+
import nt from "./components/Demo/index.js";
|
|
73
|
+
import rt from "./components/pro/ArticleControl/ArticleControl2.js";
|
|
74
|
+
import it from "./components/pro/ArticleContextMenu/index.js";
|
|
75
|
+
import at from "./components/Markdown/Markdown.js";
|
|
76
|
+
import { getDefaultSnippets as ot, javascriptSnippets as st, pythonSnippets as ct } from "./components/pro/CodeEditor/langs/snippets.js";
|
|
77
|
+
import { jsJumpableKeywords as lt, jsKeywords as ut } from "./components/pro/CodeEditor/langs/javascript.js";
|
|
78
|
+
import { pyJumpableKeywords as dt, pyKeywords as ft } from "./components/pro/CodeEditor/langs/python.js";
|
|
79
|
+
import { getJumpableKeywords as pt, getLanguageKeywords as mt } from "./components/pro/CodeEditor/langs/index.js";
|
|
80
|
+
import { bracketMatchingStyle as ht, jumpTargetHighlight as gt, jumpToDefinition as _t, lineHighlightStyle as vt, smartAutocompletion as yt } from "./components/pro/CodeEditor/extensions/index.js";
|
|
81
|
+
import { createThemeExtension as bt } from "./components/pro/CodeEditor/themes.js";
|
|
82
|
+
import { collectVariables as xt, generateOutline as St } from "./components/pro/CodeEditor/utils.js";
|
|
83
|
+
import { defaultContextMenu as Ct } from "./components/pro/CodeEditor/extensions/contextMenu.js";
|
|
84
|
+
import wt from "./components/pro/CodeEditor/editors/CodeEditor.js";
|
|
85
|
+
import Tt from "./components/pro/CodeEditor/panels/TableOfContentsPanel.js";
|
|
86
|
+
import Et from "./components/pro/CodeEditor/panels/FootnotePanel.js";
|
|
87
|
+
import Dt from "./components/pro/CodeEditor/editors/MarkdownEditor.js";
|
|
88
|
+
import Ot from "./components/pro/CodeEditor/panels/OutlinePanel.js";
|
|
89
|
+
import kt from "./components/pro/CodeEditor/panels/VariablePanel.js";
|
|
90
|
+
import At from "./layouts/MainLayout.js";
|
|
91
|
+
import jt from "./layouts/Navbar.js";
|
|
92
|
+
import { ProtectedRoute as Mt } from "./components/ProtectedRoute/index.js";
|
|
93
|
+
import { buildRouter as Nt, createRouterFromConfig as Pt } from "./utils/routerBuilder.js";
|
|
94
|
+
import { DropZone as Ft, formatFileSize as It } from "./components/FileUploader/DropZone.js";
|
|
95
|
+
import { FileItem as Lt } from "./components/FileUploader/FileItem.js";
|
|
96
|
+
import { UploadQueue as Rt } from "./components/FileUploader/UploadQueue.js";
|
|
97
|
+
import { FileUploader as zt } from "./components/FileUploader/FileUploader.js";
|
|
98
|
+
import { FileIcon as Bt } from "./components/pro/FileExplorer/FileIcon.js";
|
|
99
|
+
import { Breadcrumb as Vt } from "./components/pro/FileExplorer/Breadcrumb.js";
|
|
100
|
+
import { Toolbar as Ht } from "./components/pro/FileExplorer/Toolbar.js";
|
|
101
|
+
import { ListView as Ut } from "./components/pro/FileExplorer/ListView.js";
|
|
102
|
+
import { GridView as Wt } from "./components/pro/FileExplorer/GridView.js";
|
|
103
|
+
import { CreateDialog as Gt } from "./components/pro/FileExplorer/CreateDialog.js";
|
|
104
|
+
import { FileExplorer as Kt } from "./components/pro/FileExplorer/FileExplorer.js";
|
|
105
|
+
import { defaultLabels as qt } from "./components/pro/RichTextEditor/types.js";
|
|
106
|
+
import { MarkdownBlockExtension as Jt } from "./components/pro/RichTextEditor/extensions/MarkdownBlock.js";
|
|
107
|
+
import Yt from "./components/pro/RichTextEditor/Toolbar/Toolbar.js";
|
|
108
|
+
import Xt from "./components/pro/RichTextEditor/AIRewrite.js";
|
|
109
|
+
import { CodeBlockExtension as Zt } from "./components/pro/RichTextEditor/extensions/CodeBlockView.js";
|
|
110
|
+
import Qt from "./components/pro/RichTextEditor/RichTextEditor.js";
|
|
111
|
+
import { BORDER_STYLE_OPTIONS as $t, DASH_DENSITY_OPTIONS as en, DEFAULT_EDGE_DATA as tn, DEFAULT_NODE_DATA as nn, EDGE_LINE_STYLE_OPTIONS as rn, EDGE_MARKER_OPTIONS as an, EDGE_TYPE_OPTIONS as on, GRADIENT_DIRECTION_OPTIONS as sn, PALETTE_ITEMS as cn, ROOT_CANVAS_ID as ln, createEmptyDocument as un } from "./components/pro/Flow/constants.js";
|
|
112
|
+
import { FlowProvider as dn, useFlowContext as fn } from "./components/pro/Flow/context/FlowContext.js";
|
|
113
|
+
import { FlowUIProvider as pn, useFlowUI as mn } from "./components/pro/Flow/context/FlowUIContext.js";
|
|
114
|
+
import { downloadDataURL as hn, exportCanvasToPNG as gn, useFlowImportExport as _n } from "./components/pro/Flow/hooks/useFlowImportExport.js";
|
|
115
|
+
import { useLayoutActions as vn } from "./components/pro/Flow/hooks/useLayoutActions.js";
|
|
116
|
+
import yn from "./components/pro/Flow/panels/FlowToolbar.js";
|
|
117
|
+
import bn from "./components/pro/Flow/panels/ShapePalette.js";
|
|
118
|
+
import { FLOW_NODE_TYPES as xn } from "./components/pro/Flow/types.js";
|
|
119
|
+
import Sn from "./components/pro/Flow/panels/InspectorPanel.js";
|
|
120
|
+
import Cn from "./components/pro/Flow/panels/OutlinePanel.js";
|
|
121
|
+
import wn from "./components/pro/Flow/panels/ContextMenu.js";
|
|
122
|
+
import { useClipboard as Tn } from "./components/pro/Flow/hooks/useClipboard.js";
|
|
123
|
+
import En from "./components/pro/Flow/Flow.js";
|
|
124
|
+
import { useNodeMutations as Dn } from "./components/pro/Flow/hooks/useNodeMutations.js";
|
|
125
|
+
import { useEdgeMutations as On } from "./components/pro/Flow/hooks/useEdgeMutations.js";
|
|
126
|
+
import { useLineMutations as kn } from "./components/pro/Flow/hooks/useLineMutations.js";
|
|
127
|
+
import { useSelection as An } from "./components/pro/Flow/hooks/useSelection.js";
|
|
128
|
+
import { DEFAULT_CATEGORY_CONFIG as jn, DEFAULT_SCALE_CONFIGS as Mn, DEFAULT_TIME_WINDOW as Nn, addDays as Pn, addWorkingDays as Fn, calculateWorkingDays as In, computeDateRange as Ln, dateToX as Rn, daysBetween as zn, flattenTree as Bn, formatDate as Vn, generateDateRange as Hn, generateHeaderGroups as Un, getISOWeekNumber as Wn, getISOWeekYear as Gn, isNonWorkingDay as Kn, isWeekend as qn, parseDate as Jn, startOfDay as Yn, xToDate as Xn } from "./components/pro/Gantt/utils.js";
|
|
129
|
+
import { useGanttState as Zn } from "./components/pro/Gantt/hooks/useGanttState.js";
|
|
130
|
+
import { useGanttDrag as Qn } from "./components/pro/Gantt/hooks/useGanttDrag.js";
|
|
131
|
+
import $n from "./components/pro/Gantt/Gantt.js";
|
|
132
|
+
import { DEFAULT_COLOR_OPTIONS as er, LABELS_EN as tr, LABELS_ZH as nr, SLOT_HEIGHT as rr, TIME_GRID_HEIGHT as ir, TIME_SLOTS as ar, addDays as or, clamp as sr, formatDate as cr, formatTime as lr, generateId as ur, generateTimeSlots as dr, getDaysInMonth as fr, getFirstDayOfMonth as pr, getHolidayEntry as mr, getMonthDates as hr, getWeekDates as gr, isHoliday as _r, isNonWorkingDay as vr, isSameDay as yr, isToday as br, isWeekend as xr, minutesToTime as Sr, parseDate as Cr, parseTime as wr, timeToMinutes as Tr, todayStr as Er } from "./components/pro/Calendar/utils.js";
|
|
133
|
+
import { useCalendarState as Dr } from "./components/pro/Calendar/hooks/useCalendarState.js";
|
|
134
|
+
import { useCalendarDrag as Or } from "./components/pro/Calendar/hooks/useCalendarDrag.js";
|
|
135
|
+
import kr from "./components/pro/Calendar/Calendar.js";
|
|
136
|
+
import Ar from "./components/ai/LoadingState/index.js";
|
|
137
|
+
import jr from "./components/ai/Thinking/index.js";
|
|
138
|
+
import Mr from "./components/ai/StreamingText/index.js";
|
|
139
|
+
import Nr from "./components/ai/ToolChips/index.js";
|
|
140
|
+
import Pr from "./components/ai/TaskRows/index.js";
|
|
141
|
+
import Fr from "./components/ai/AgentChat/index.js";
|
|
142
|
+
import Ir from "./components/ai/PromptBar/index.js";
|
|
143
|
+
import Lr, { diffRowChange as Rr, isDiffCellChange as zr } from "./components/ai/DiffTable/index.js";
|
|
144
|
+
import Br, { STRENGTH_LABEL as Vr, formatRelativeTime as Hr, strengthPercent as Ur } from "./components/ai/RecordsTable/index.js";
|
|
145
|
+
import Wr from "./components/ai/FilterTable/index.js";
|
|
146
|
+
import Gr from "./components/ai/CommandSearch/index.js";
|
|
147
|
+
import Kr from "./components/ai/StateFlow/index.js";
|
|
148
|
+
import qr from "./components/ai/CodeView/index.js";
|
|
149
|
+
import Jr from "./components/ai/SelectionActions/index.js";
|
|
150
|
+
import Yr from "./components/ai/AgentScreen/index.js";
|
|
151
|
+
export { T as AGENT_STATUS_LABEL, Xt as AIRewrite, fe as Accordion, ie as AdminSuite, Fr as AgentChat, Yr as AgentScreen, Ae as AppLayoutWrapper, je as AppProvider, Me as AppShell, w as ApprovalCard, it as ArticleContextMenu, rt as ArticleControl, de as Avatar, $t as BORDER_STYLE_OPTIONS, m as Badge, ae as BlankSuite, oe as BlogSuite, Vt as Breadcrumb, a as Button, p as ButtonMenu, er as CALENDAR_DEFAULT_COLOR_OPTIONS, tr as CALENDAR_LABELS_EN, nr as CALENDAR_LABELS_ZH, rr as CALENDAR_SLOT_HEIGHT, ir as CALENDAR_TIME_GRID_HEIGHT, ar as CALENDAR_TIME_SLOTS, kr as Calendar, N as Card, tt as Chart, y as Checkbox, Ce as ChoicePicker, Zt as CodeBlockExtension, wt as CodeEditor, qr as CodeView, _e as Column, Gr as CommandSearch, Z as Container, A as ContextCards, Gt as CreateDialog, en as DASH_DENSITY_OPTIONS, jn as DEFAULT_CATEGORY_CONFIG, tn as DEFAULT_EDGE_DATA, nn as DEFAULT_NODE_DATA, Mn as DEFAULT_SCALE_CONFIGS, Nn as DEFAULT_TIME_WINDOW, re as DashboardSuite, Ue as DataTable, xe as DateTimeInput, nt as Demo, K as DesktopSidebarToggleButton, Lr as DiffTable, S as Divider, Ft as DropZone, rn as EDGE_LINE_STYLE_OPTIONS, an as EDGE_MARKER_OPTIONS, on as EDGE_TYPE_OPTIONS, ue as EmptyState, xn as FLOW_NODE_TYPES, g as Field, Kt as FileExplorer, Ht as FileExplorerToolbar, Bt as FileIcon, zt as FileUploader, Wr as FilterTable, M as FineTuneCard, Q as Flex, En as Flow, wn as FlowContextMenu, Sn as FlowInspectorPanel, Cn as FlowOutlinePanel, dn as FlowProvider, bn as FlowShapePalette, yn as FlowToolbar, pn as FlowUIProvider, Et as FootnotePanel, sn as GRADIENT_DIRECTION_OPTIONS, $n as Gantt, $ as Grid, ee as GridItem, Wt as GridView, te as Group, o as GroupButton, l as GroupedTable, we as Headbar, De as HeadbarLangSwitcher, Ee as HeadbarSearch, ke as HeadbarThemeSwitcher, Te as HeadbarTitle, ye as Icon, ve as Image, h as Input, j as InsightCards, v as Label, X as Layout, se as LayoutSuite, he as List, Ut as ListView, Ar as LoadingState, ce as MailSuite, At as MainLayout, at as Markdown, Jt as MarkdownBlockExtension, Dt as MarkdownEditor, q as MobileSidebarToggleButton, pe as Modal, Se as MultipleChoice, jt as Navbar, u as NavigationList, Ot as OutlinePanel, cn as PALETTE_ITEMS, I as Page, L as PageBody, F as PageFloat, R as PageFooter, P as PageHeader, z as PageLeft, B as PageMain, V as PageRight, Be as PivotPanel, ze as PivotView, Ir as PromptBar, Mt as ProtectedRoute, ln as ROOT_CANVAS_ID, O as RecommendationCard, Br as RecordsTable, t as Resizable, n as ResizableHandle, r as ResizablePanel, Qt as RichTextEditor, Yt as RichTextToolbar, ge as Row, Vr as STRENGTH_LABEL, d as Section, C as Select, Jr as SelectionActions, Y as Sidebar, J as SidebarToggleButtons, c as Skeleton, be as Slider, ne as Space, Kr as StateFlow, Mr as StreamingText, b as Switch, s as Table, Tt as TableOfContentsPanel, me as Tabs, Pr as TaskRows, f as Text, _ as Textarea, jr as Thinking, Nr as ToolChips, x as Tooltip, G as Tree, Lt as UploadFileItem, Rt as UploadQueue, kt as VariablePanel, le as WikiSuite, or as addCalendarDays, Pn as addGanttDays, Fn as addWorkingDays, ht as bracketMatchingStyle, Nt as buildRouter, In as calculateWorkingDays, sr as calendarClamp, Sr as calendarMinutesToTime, Tr as calendarTimeToMinutes, Er as calendarTodayStr, i as cn, xt as collectVariables, Ln as computeDateRange, Re as computePivot, k as confidenceLevel, We as createActionColumn, Ge as createColumn, Ke as createComputedColumn, un as createEmptyDocument, Pt as createRouterFromConfig, qe as createSelectOptions, Je as createSelectionColumn, bt as createThemeExtension, Ye as dateSort, zn as daysBetween, Ct as defaultContextMenu, Xe as defaultFilterFunctions, Le as defineExtension, Rr as diffRowChange, hn as downloadDataURL, gn as exportCanvasToPNG, Ze as extractUniqueOptions, Bn as flattenGanttTree, cr as formatCalendarDate, lr as formatCalendarTime, E as formatDuration, D as formatElapsed, It as formatFileSize, Vn as formatGanttDate, Hr as formatRelativeTime, Rn as ganttDateToX, Xn as ganttXToDate, ur as generateCalendarId, dr as generateCalendarTimeSlots, Hn as generateDateRange, Un as generateHeaderGroups, St as generateOutline, H as generateSidebarActiveStyles, U as generateTreeActiveStyles, fr as getCalendarDaysInMonth, pr as getCalendarFirstDayOfMonth, mr as getCalendarHolidayEntry, hr as getCalendarMonthDates, gr as getCalendarWeekDates, ot as getDefaultSnippets, Wn as getISOWeekNumber, Gn as getISOWeekYear, pt as getJumpableKeywords, mt as getLanguageKeywords, Oe as getThemes, _r as isCalendarHoliday, vr as isCalendarNonWorkingDay, yr as isCalendarSameDay, br as isCalendarToday, xr as isCalendarWeekend, zr as isDiffCellChange, Kn as isGanttNonWorkingDay, qn as isGanttWeekend, st as javascriptSnippets, lt as jsJumpableKeywords, ut as jsKeywords, gt as jumpTargetHighlight, _t as jumpToDefinition, vt as lineHighlightStyle, Qe as numericSort, Cr as parseCalendarDate, wr as parseCalendarTime, Jn as parseGanttDate, dt as pyJumpableKeywords, ft as pyKeywords, ct as pythonSnippets, qt as richTextDefaultLabels, yt as smartAutocompletion, Yn as startOfGanttDay, Ur as strengthPercent, $e as stringSort, W as themeActiveStyles, et as treeSort, Ne as useAppContext, Pe as useAuth, Or as useCalendarDrag, Dr as useCalendarState, On as useEdgeMutations, Tn as useFlowClipboard, fn as useFlowContext, _n as useFlowImportExport, An as useFlowSelection, mn as useFlowUI, Qn as useGanttDrag, Zn as useGanttState, vn as useLayoutActions, kn as useLineMutations, Dn as useNodeMutations, Ve as usePivotExtension, e as useResize, He as useRowDetailExtension, Fe as useTableColumns, Ie as useTableData };
|
|
@@ -2,6 +2,16 @@ import React from 'react';
|
|
|
2
2
|
import { MenuItem } from '../types/menu';
|
|
3
3
|
import { type TextProps } from '../components/Text';
|
|
4
4
|
export type SidebarLevelText = Pick<TextProps, 'size' | 'weight' | 'color'>;
|
|
5
|
+
export type SidebarHeader = {
|
|
6
|
+
name: React.ReactNode;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
};
|
|
10
|
+
export type SidebarAction = {
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
};
|
|
5
15
|
export type SidebarProps = {
|
|
6
16
|
isCollapsed: boolean;
|
|
7
17
|
/** 侧栏所在侧,控制内侧 pill 的位置与调宽方向。 */
|
|
@@ -30,6 +40,12 @@ export type SidebarProps = {
|
|
|
30
40
|
minWidth?: number;
|
|
31
41
|
/** 拖拽调节宽度的最大值(px) */
|
|
32
42
|
maxWidth?: number;
|
|
43
|
+
/** Optional AI-style workspace header shown above the tree. */
|
|
44
|
+
workspace?: SidebarHeader;
|
|
45
|
+
/** Optional primary sidebar action, such as “New chat”. */
|
|
46
|
+
primaryAction?: SidebarAction;
|
|
47
|
+
/** Optional footer rendered below the scrollable multi-level menu. */
|
|
48
|
+
footer?: React.ReactNode;
|
|
33
49
|
};
|
|
34
50
|
declare const Sidebar: React.FC<SidebarProps>;
|
|
35
51
|
export default Sidebar;
|
package/dist/layouts/Sidebar.js
CHANGED
|
@@ -20,36 +20,36 @@ var m = [
|
|
|
20
20
|
size: "sm",
|
|
21
21
|
weight: "normal"
|
|
22
22
|
}
|
|
23
|
-
], h = ({ isCollapsed: h, side: g = "left", language: _, items: v, levelText: y, getMenuItems: b, onWidthChange: x, initialWidth: S = 280, collapsedWidth: C = 64, onToggle: w, minWidth: T = 160, maxWidth: E = 400 }) => {
|
|
24
|
-
let [
|
|
23
|
+
], h = ({ isCollapsed: h, side: g = "left", language: _, items: v, levelText: y, getMenuItems: b, onWidthChange: x, initialWidth: S = 280, collapsedWidth: C = 64, onToggle: w, minWidth: T = 160, maxWidth: E = 400, workspace: D, primaryAction: O, footer: k }) => {
|
|
24
|
+
let [A, j] = c([]), [M, N] = c(""), [P, F] = c(() => Math.max(T, Math.min(S, E))), I = s(null), L = s(null), R = p({ select: (e) => e.location }), z = f();
|
|
25
25
|
a(() => {
|
|
26
|
-
|
|
26
|
+
F(Math.max(T, Math.min(S, E)));
|
|
27
27
|
}, [
|
|
28
28
|
S,
|
|
29
29
|
T,
|
|
30
30
|
E
|
|
31
31
|
]);
|
|
32
|
-
let
|
|
32
|
+
let B = (e) => {
|
|
33
33
|
let t = Math.max(T, Math.min(e, E));
|
|
34
|
-
|
|
34
|
+
F(t), x?.(t);
|
|
35
35
|
};
|
|
36
36
|
a(() => {
|
|
37
|
-
|
|
37
|
+
j(v === void 0 ? b ? b(_) : t(_) : v);
|
|
38
38
|
}, [
|
|
39
39
|
_,
|
|
40
40
|
v,
|
|
41
41
|
b
|
|
42
42
|
]), a(() => {
|
|
43
|
-
if (!
|
|
43
|
+
if (!M) return;
|
|
44
44
|
let e = setTimeout(() => {
|
|
45
|
-
|
|
45
|
+
L.current?.querySelector(h ? "[aria-current=\"page\"]" : ".tree-node-content-active")?.scrollIntoView({
|
|
46
46
|
block: "nearest",
|
|
47
47
|
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "instant" : "smooth"
|
|
48
48
|
});
|
|
49
49
|
}, 350);
|
|
50
50
|
return () => clearTimeout(e);
|
|
51
|
-
}, [
|
|
52
|
-
let e =
|
|
51
|
+
}, [M, h]), a(() => {
|
|
52
|
+
let e = L.current;
|
|
53
53
|
if (!e) return;
|
|
54
54
|
let t = (t) => {
|
|
55
55
|
if (e.scrollHeight <= e.clientHeight) return;
|
|
@@ -60,7 +60,7 @@ var m = [
|
|
|
60
60
|
};
|
|
61
61
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
62
62
|
}, [h]);
|
|
63
|
-
let
|
|
63
|
+
let V = (e, t = !0) => e.map((e) => ({
|
|
64
64
|
id: e.id,
|
|
65
65
|
label: e.label,
|
|
66
66
|
icon: e.icon || (t ? void 0 : /* @__PURE__ */ l("svg", {
|
|
@@ -76,19 +76,19 @@ var m = [
|
|
|
76
76
|
d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
77
77
|
})
|
|
78
78
|
})),
|
|
79
|
-
children: e.children ?
|
|
79
|
+
children: e.children ? V(e.children, !1) : void 0,
|
|
80
80
|
meta: { path: e.path }
|
|
81
|
-
})),
|
|
82
|
-
if (
|
|
81
|
+
})), H = o(() => V(A, !0), [A]), U = o(() => {
|
|
82
|
+
if (A.length === 0) return [];
|
|
83
83
|
let e = (t) => {
|
|
84
84
|
let n = [];
|
|
85
85
|
for (let r of t) r.children?.length && (n.push(r.id), n = [...n, ...e(r.children)]);
|
|
86
86
|
return n;
|
|
87
87
|
};
|
|
88
|
-
return e(
|
|
89
|
-
}, [
|
|
88
|
+
return e(A);
|
|
89
|
+
}, [A]);
|
|
90
90
|
a(() => {
|
|
91
|
-
let e =
|
|
91
|
+
let e = R.pathname, t = (n) => {
|
|
92
92
|
for (let r of n) {
|
|
93
93
|
if (r.path === e) return r.id;
|
|
94
94
|
if (r.children) {
|
|
@@ -97,12 +97,12 @@ var m = [
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
return null;
|
|
100
|
-
}, n = t(
|
|
101
|
-
|
|
102
|
-
}, [
|
|
103
|
-
let
|
|
100
|
+
}, n = t(A);
|
|
101
|
+
N(n ?? "");
|
|
102
|
+
}, [A, R.pathname]);
|
|
103
|
+
let W = (e) => {
|
|
104
104
|
if (e.meta?.path) {
|
|
105
|
-
|
|
105
|
+
N(e.id), z({ to: e.meta.path });
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
if (e.children && e.children.length > 0) {
|
|
@@ -116,20 +116,20 @@ var m = [
|
|
|
116
116
|
}
|
|
117
117
|
return null;
|
|
118
118
|
}, n = t(e.children);
|
|
119
|
-
n ? (
|
|
120
|
-
} else
|
|
121
|
-
},
|
|
119
|
+
n ? (N(n.id), z({ to: n.meta.path })) : N(e.id);
|
|
120
|
+
} else N(e.id);
|
|
121
|
+
}, G = (e, t = []) => e.flatMap((e) => {
|
|
122
122
|
let n = [...t, e.label];
|
|
123
123
|
return [...e.path ? [{
|
|
124
124
|
item: e,
|
|
125
125
|
trail: n.join(" / ")
|
|
126
|
-
}] : [], ...
|
|
127
|
-
}),
|
|
128
|
-
ref:
|
|
126
|
+
}] : [], ...G(e.children ?? [], n)];
|
|
127
|
+
}), K = h ? /* @__PURE__ */ l("nav", {
|
|
128
|
+
ref: L,
|
|
129
129
|
className: "sidebar-rail",
|
|
130
130
|
"aria-label": _ === "zh" ? "侧边导航" : "Sidebar navigation",
|
|
131
|
-
children:
|
|
132
|
-
let t =
|
|
131
|
+
children: A.map((e) => {
|
|
132
|
+
let t = G([e]);
|
|
133
133
|
return t.length > 0 ? /* @__PURE__ */ l("div", {
|
|
134
134
|
role: "group",
|
|
135
135
|
"aria-label": e.label,
|
|
@@ -139,7 +139,7 @@ var m = [
|
|
|
139
139
|
className: "sidebar-rail-link",
|
|
140
140
|
"aria-label": t,
|
|
141
141
|
title: t,
|
|
142
|
-
"aria-current":
|
|
142
|
+
"aria-current": R.pathname === e.path ? "page" : void 0,
|
|
143
143
|
children: /* @__PURE__ */ l("span", {
|
|
144
144
|
"aria-hidden": "true",
|
|
145
145
|
children: e.icon || /* @__PURE__ */ l("span", { children: e.label.charAt(0) })
|
|
@@ -149,10 +149,10 @@ var m = [
|
|
|
149
149
|
})
|
|
150
150
|
}) : null;
|
|
151
151
|
return /* @__PURE__ */ u("div", {
|
|
152
|
-
ref:
|
|
153
|
-
className: "
|
|
152
|
+
ref: I,
|
|
153
|
+
className: "dishui-sidebar sidebar-container h-full bg-base-200 overflow-visible flex flex-col transition-colors duration-200 ease-in-out relative",
|
|
154
154
|
style: h ? { width: C } : {
|
|
155
|
-
width:
|
|
155
|
+
width: P,
|
|
156
156
|
maxWidth: E,
|
|
157
157
|
minWidth: T
|
|
158
158
|
},
|
|
@@ -161,23 +161,49 @@ var m = [
|
|
|
161
161
|
isCollapsed: h,
|
|
162
162
|
side: g,
|
|
163
163
|
onToggle: w,
|
|
164
|
-
sidebarWidth:
|
|
164
|
+
sidebarWidth: P,
|
|
165
165
|
collapsedWidth: C,
|
|
166
|
-
onWidthChange: x ?
|
|
166
|
+
onWidthChange: x ? B : void 0,
|
|
167
167
|
minWidth: T,
|
|
168
168
|
maxWidth: E,
|
|
169
|
-
anchorRef:
|
|
169
|
+
anchorRef: I
|
|
170
170
|
}),
|
|
171
|
-
|
|
171
|
+
(D || O) && /* @__PURE__ */ u("div", {
|
|
172
|
+
className: "dishui-sidebar-ai-header",
|
|
173
|
+
children: [D && /* @__PURE__ */ u("button", {
|
|
174
|
+
type: "button",
|
|
175
|
+
className: "dishui-sidebar-ai-workspace",
|
|
176
|
+
onClick: D.onClick,
|
|
177
|
+
title: h && typeof D.name == "string" ? D.name : void 0,
|
|
178
|
+
children: [/* @__PURE__ */ l("span", {
|
|
179
|
+
className: "dishui-sidebar-ai-avatar",
|
|
180
|
+
"aria-hidden": "true",
|
|
181
|
+
children: D.icon ?? (typeof D.name == "string" ? D.name.charAt(0).toUpperCase() : "•")
|
|
182
|
+
}), !h && /* @__PURE__ */ l("span", {
|
|
183
|
+
className: "dishui-sidebar-ai-workspace-name",
|
|
184
|
+
children: D.name
|
|
185
|
+
})]
|
|
186
|
+
}), O && /* @__PURE__ */ u("button", {
|
|
187
|
+
type: "button",
|
|
188
|
+
className: "dishui-sidebar-ai-action",
|
|
189
|
+
onClick: O.onClick,
|
|
190
|
+
title: h && typeof O.label == "string" ? O.label : void 0,
|
|
191
|
+
children: [/* @__PURE__ */ l("span", {
|
|
192
|
+
"aria-hidden": "true",
|
|
193
|
+
children: O.icon ?? "+"
|
|
194
|
+
}), !h && /* @__PURE__ */ l("span", { children: O.label })]
|
|
195
|
+
})]
|
|
196
|
+
}),
|
|
197
|
+
K,
|
|
172
198
|
/* @__PURE__ */ l("div", {
|
|
173
199
|
hidden: h,
|
|
174
200
|
style: h ? { display: "none" } : void 0,
|
|
175
|
-
ref: h ? void 0 :
|
|
201
|
+
ref: h ? void 0 : L,
|
|
176
202
|
className: "sidebar-scroll min-h-0 flex-grow overflow-y-auto scrollbar-thin scrollbar-thumb-base-300 scrollbar-track-transparent",
|
|
177
203
|
children: /* @__PURE__ */ l(r, {
|
|
178
|
-
data:
|
|
179
|
-
activeNodeId:
|
|
180
|
-
defaultExpandedIds:
|
|
204
|
+
data: H,
|
|
205
|
+
activeNodeId: M,
|
|
206
|
+
defaultExpandedIds: U,
|
|
181
207
|
showSearch: !1,
|
|
182
208
|
showExpandAll: !1,
|
|
183
209
|
showIcon: !0,
|
|
@@ -189,24 +215,31 @@ var m = [
|
|
|
189
215
|
className: `sidebar-tree${y === void 0 ? "" : " sidebar-tree-level-text"}`,
|
|
190
216
|
renderLabel: (t, n) => {
|
|
191
217
|
let r = Math.min(n, 2), i = y?.[r], a = m[r];
|
|
192
|
-
return /* @__PURE__ */
|
|
218
|
+
return /* @__PURE__ */ u(e, {
|
|
193
219
|
size: i?.size ?? a.size,
|
|
194
220
|
weight: i?.weight ?? a.weight,
|
|
195
|
-
color:
|
|
221
|
+
color: M === t.id ? "inherit" : i?.color ?? "inherit",
|
|
196
222
|
style: {
|
|
197
223
|
...y === void 0 ? {
|
|
198
224
|
fontSize: "inherit",
|
|
199
225
|
lineHeight: "inherit",
|
|
200
226
|
fontWeight: "inherit"
|
|
201
227
|
} : {},
|
|
202
|
-
...r === 2 && i?.color === void 0 &&
|
|
228
|
+
...r === 2 && i?.color === void 0 && M !== t.id ? { color: "var(--sidebar-level-muted)" } : {}
|
|
203
229
|
},
|
|
204
|
-
children: t.label
|
|
230
|
+
children: [t.label, typeof t.id == "string" && t.id.startsWith("ai-") && /* @__PURE__ */ l("span", {
|
|
231
|
+
className: "dishui-sidebar-ai-native-badge",
|
|
232
|
+
children: "AI"
|
|
233
|
+
})]
|
|
205
234
|
});
|
|
206
235
|
},
|
|
207
|
-
onNodeClick:
|
|
236
|
+
onNodeClick: W
|
|
208
237
|
})
|
|
209
238
|
}),
|
|
239
|
+
k && !h && /* @__PURE__ */ l("div", {
|
|
240
|
+
className: "dishui-sidebar-ai-footer",
|
|
241
|
+
children: k
|
|
242
|
+
}),
|
|
210
243
|
/* @__PURE__ */ l("style", { children: `
|
|
211
244
|
.sidebar-container {
|
|
212
245
|
--sidebar-level-muted: oklch(from color-mix(in oklab, var(--color-base-content) 76%, var(--color-base-200)) l 0 0);
|
|
@@ -233,8 +266,8 @@ var m = [
|
|
|
233
266
|
|
|
234
267
|
.sidebar-tree .tree-node-content {
|
|
235
268
|
padding: 0.5rem 1rem;
|
|
236
|
-
border-radius:
|
|
237
|
-
transition:
|
|
269
|
+
border-radius: var(--dishui-radius-sm);
|
|
270
|
+
transition: background-color var(--dishui-duration-normal) var(--dishui-ease-out), color var(--dishui-duration-normal) var(--dishui-ease-out), transform var(--dishui-duration-normal) var(--dishui-ease-out);
|
|
238
271
|
}
|
|
239
272
|
|
|
240
273
|
/* 活跃状态 - 为每个主题设置匹配的配色 */
|
|
@@ -259,8 +292,8 @@ var m = [
|
|
|
259
292
|
min-height: auto;
|
|
260
293
|
padding: 0.25rem;
|
|
261
294
|
opacity: 0.6;
|
|
262
|
-
transition:
|
|
263
|
-
border-radius:
|
|
295
|
+
transition: opacity var(--dishui-duration-normal) var(--dishui-ease-out), background-color var(--dishui-duration-normal) var(--dishui-ease-out);
|
|
296
|
+
border-radius: var(--dishui-radius-xs);
|
|
264
297
|
}
|
|
265
298
|
|
|
266
299
|
.sidebar-tree .tree-node-toggle-right:hover {
|
|
@@ -272,7 +305,7 @@ var m = [
|
|
|
272
305
|
.sidebar-tree .tree-node-toggle-right svg {
|
|
273
306
|
width: 1rem;
|
|
274
307
|
height: 1rem;
|
|
275
|
-
transition: transform
|
|
308
|
+
transition: transform var(--dishui-duration-normal) var(--dishui-ease-out);
|
|
276
309
|
}
|
|
277
310
|
|
|
278
311
|
.sidebar-tree .tree-node-toggle-right.tree-node-toggle-expanded svg {
|