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.
Files changed (92) hide show
  1. package/dist/.release-verified.json +6 -0
  2. package/dist/ai.js +22 -0
  3. package/dist/components/Card/Metric2.js +11 -11
  4. package/dist/components/Card/Metric2.js.map +1 -1
  5. package/dist/components/Card/index.d.ts +20 -0
  6. package/dist/components/Card/index.js +184 -179
  7. package/dist/components/Card/index.js.map +1 -1
  8. package/dist/components/GroupButton/index.js +4 -4
  9. package/dist/components/GroupButton/index.js.map +1 -1
  10. package/dist/components/GroupedTable/index.js +10 -10
  11. package/dist/components/GroupedTable/index.js.map +1 -1
  12. package/dist/components/NavigationList/index.js +9 -9
  13. package/dist/components/NavigationList/index.js.map +1 -1
  14. package/dist/components/Section/index.js +11 -11
  15. package/dist/components/Section/index.js.map +1 -1
  16. package/dist/components/Skeleton/index.js +1 -1
  17. package/dist/components/Skeleton/index.js.map +1 -1
  18. package/dist/components/Table/index.js +6 -6
  19. package/dist/components/Table/index.js.map +1 -1
  20. package/dist/components/ai/AgentChat/index.d.ts +54 -0
  21. package/dist/components/ai/AgentChat/index.js +176 -0
  22. package/dist/components/ai/AgentChat/index.js.map +1 -0
  23. package/dist/components/ai/AgentScreen/index.d.ts +50 -0
  24. package/dist/components/ai/AgentScreen/index.js +233 -0
  25. package/dist/components/ai/AgentScreen/index.js.map +1 -0
  26. package/dist/components/ai/ApprovalCard/index.d.ts +26 -0
  27. package/dist/components/ai/ApprovalCard/index.js +89 -0
  28. package/dist/components/ai/ApprovalCard/index.js.map +1 -0
  29. package/dist/components/ai/CodeView/index.d.ts +30 -0
  30. package/dist/components/ai/CodeView/index.js +149 -0
  31. package/dist/components/ai/CodeView/index.js.map +1 -0
  32. package/dist/components/ai/CommandSearch/index.d.ts +39 -0
  33. package/dist/components/ai/CommandSearch/index.js +217 -0
  34. package/dist/components/ai/CommandSearch/index.js.map +1 -0
  35. package/dist/components/ai/ContextCards/index.d.ts +42 -0
  36. package/dist/components/ai/ContextCards/index.js +106 -0
  37. package/dist/components/ai/ContextCards/index.js.map +1 -0
  38. package/dist/components/ai/DiffTable/index.d.ts +70 -0
  39. package/dist/components/ai/DiffTable/index.js +235 -0
  40. package/dist/components/ai/DiffTable/index.js.map +1 -0
  41. package/dist/components/ai/FilterTable/index.d.ts +35 -0
  42. package/dist/components/ai/FilterTable/index.js +86 -0
  43. package/dist/components/ai/FilterTable/index.js.map +1 -0
  44. package/dist/components/ai/FineTuneCard/index.d.ts +24 -0
  45. package/dist/components/ai/FineTuneCard/index.js +75 -0
  46. package/dist/components/ai/FineTuneCard/index.js.map +1 -0
  47. package/dist/components/ai/InsightCards/index.d.ts +23 -0
  48. package/dist/components/ai/InsightCards/index.js +64 -0
  49. package/dist/components/ai/InsightCards/index.js.map +1 -0
  50. package/dist/components/ai/LoadingState/index.d.ts +22 -0
  51. package/dist/components/ai/LoadingState/index.js +80 -0
  52. package/dist/components/ai/LoadingState/index.js.map +1 -0
  53. package/dist/components/ai/PromptBar/index.d.ts +26 -0
  54. package/dist/components/ai/PromptBar/index.js +117 -0
  55. package/dist/components/ai/PromptBar/index.js.map +1 -0
  56. package/dist/components/ai/RecommendationCard/index.d.ts +44 -0
  57. package/dist/components/ai/RecommendationCard/index.js +142 -0
  58. package/dist/components/ai/RecommendationCard/index.js.map +1 -0
  59. package/dist/components/ai/RecordsTable/index.d.ts +65 -0
  60. package/dist/components/ai/RecordsTable/index.js +334 -0
  61. package/dist/components/ai/RecordsTable/index.js.map +1 -0
  62. package/dist/components/ai/SelectionActions/index.d.ts +19 -0
  63. package/dist/components/ai/SelectionActions/index.js +40 -0
  64. package/dist/components/ai/SelectionActions/index.js.map +1 -0
  65. package/dist/components/ai/StateFlow/index.d.ts +24 -0
  66. package/dist/components/ai/StateFlow/index.js +50 -0
  67. package/dist/components/ai/StateFlow/index.js.map +1 -0
  68. package/dist/components/ai/StreamingText/index.d.ts +44 -0
  69. package/dist/components/ai/StreamingText/index.js +211 -0
  70. package/dist/components/ai/StreamingText/index.js.map +1 -0
  71. package/dist/components/ai/TaskRows/index.d.ts +53 -0
  72. package/dist/components/ai/TaskRows/index.js +186 -0
  73. package/dist/components/ai/TaskRows/index.js.map +1 -0
  74. package/dist/components/ai/Thinking/index.d.ts +47 -0
  75. package/dist/components/ai/Thinking/index.js +197 -0
  76. package/dist/components/ai/Thinking/index.js.map +1 -0
  77. package/dist/components/ai/ToolChips/index.d.ts +21 -0
  78. package/dist/components/ai/ToolChips/index.js +63 -0
  79. package/dist/components/ai/ToolChips/index.js.map +1 -0
  80. package/dist/components/ai/index.d.ts +50 -0
  81. package/dist/components/ai/shared.d.ts +13 -0
  82. package/dist/components/ai/shared.js +25 -0
  83. package/dist/components/ai/shared.js.map +1 -0
  84. package/dist/components/pro/DataTable/rowDetailExtension.js +1 -1
  85. package/dist/components/pro/DataTable/rowDetailExtension.js.map +1 -1
  86. package/dist/dishui.css +1 -1
  87. package/dist/index.d.ts +3 -2
  88. package/dist/index.js +128 -107
  89. package/dist/layouts/Sidebar.d.ts +16 -0
  90. package/dist/layouts/Sidebar.js +85 -52
  91. package/dist/layouts/Sidebar.js.map +1 -1
  92. 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/Card/index.js";
25
- import T from "./components/PageHeader/index.js";
26
- import E from "./components/Page/Float2.js";
27
- import D, { PageBody as O, PageFooter as k, PageLeft as A, PageMain as j, PageRight as M } from "./components/Page/index.js";
28
- import { generateSidebarActiveStyles as N, generateTreeActiveStyles as P, themeActiveStyles as F } from "./styles/themeStyles.js";
29
- import I from "./components/Tree/Tree.js";
30
- import { DesktopSidebarToggleButton as L, MobileSidebarToggleButton as R, SidebarToggleButtons as z } from "./components/SidebarToggleButton/index.js";
31
- import B from "./layouts/Sidebar.js";
32
- import V, { Container as H, Flex as U, Grid as W, GridItem as G, Group as K, Space as q } from "./components/Layout/index.js";
33
- import { DashboardSuite as J } from "./components/LayoutSuite/DashboardSuite.js";
34
- import { AdminSuite as Y, BlankSuite as X, BlogSuite as Z, LayoutSuite as Q, MailSuite as $, WikiSuite as ee } from "./components/LayoutSuite/index.js";
35
- import te from "./components/EmptyState/index.js";
36
- import ne from "./components/Avatar/index.js";
37
- import re from "./components/Accordion/index.js";
38
- import ie from "./components/Modal/index.js";
39
- import ae from "./components/Tabs/index.js";
40
- import oe from "./components/List/index.js";
41
- import se from "./components/Row/index.js";
42
- import ce from "./components/Column/index.js";
43
- import le from "./components/Image/index.js";
44
- import ue from "./components/Icon/index.js";
45
- import de from "./components/Slider/index.js";
46
- import fe from "./components/DateTimeInput/index.js";
47
- import pe from "./components/MultipleChoice/index.js";
48
- import me from "./components/ChoicePicker/index.js";
49
- import he from "./layouts/headbar/Headbar.js";
50
- import ge from "./layouts/headbar/HeadbarTitle.js";
51
- import _e from "./layouts/headbar/HeadbarSearch.js";
52
- import ve from "./layouts/headbar/HeadbarLangSwitcher.js";
53
- import { getThemes as ye } from "./utils/themes.js";
54
- import be from "./layouts/headbar/HeadbarThemeSwitcher.js";
55
- import { AppLayoutWrapper as xe, AppProvider as Se, AppShell as Ce, useAppContext as we, useAuth as Te } from "./contexts/AppContext.js";
56
- import Ee from "./hooks/useTableColumns.js";
57
- import De from "./hooks/useTableData.js";
58
- import { defineExtension as Oe } from "./components/pro/DataTable/extension.js";
59
- import { computePivot as ke } from "./components/pro/DataTable/pivotEngine.js";
60
- import { PivotView as Ae } from "./components/pro/DataTable/PivotView.js";
61
- import { PivotPanel as je } from "./components/pro/DataTable/PivotPanel.js";
62
- import { usePivotExtension as Me } from "./components/pro/DataTable/pivotExtension.js";
63
- import { useRowDetailExtension as Ne } from "./components/pro/DataTable/rowDetailExtension.js";
64
- import Pe, { createActionColumn as Fe, createColumn as Ie, createComputedColumn as Le, createSelectOptions as Re, createSelectionColumn as ze, dateSort as Be, defaultFilterFunctions as Ve, extractUniqueOptions as He, numericSort as Ue, stringSort as We, treeSort as Ge } from "./data-table.js";
65
- import Ke from "./components/Chart/Chart.js";
66
- import qe from "./components/Demo/index.js";
67
- import Je from "./components/pro/ArticleControl/ArticleControl2.js";
68
- import Ye from "./components/pro/ArticleContextMenu/index.js";
69
- import Xe from "./components/Markdown/Markdown.js";
70
- import { getDefaultSnippets as Ze, javascriptSnippets as Qe, pythonSnippets as $e } from "./components/pro/CodeEditor/langs/snippets.js";
71
- import { jsJumpableKeywords as et, jsKeywords as tt } from "./components/pro/CodeEditor/langs/javascript.js";
72
- import { pyJumpableKeywords as nt, pyKeywords as rt } from "./components/pro/CodeEditor/langs/python.js";
73
- import { getJumpableKeywords as it, getLanguageKeywords as at } from "./components/pro/CodeEditor/langs/index.js";
74
- import { bracketMatchingStyle as ot, jumpTargetHighlight as st, jumpToDefinition as ct, lineHighlightStyle as lt, smartAutocompletion as ut } from "./components/pro/CodeEditor/extensions/index.js";
75
- import { createThemeExtension as dt } from "./components/pro/CodeEditor/themes.js";
76
- import { collectVariables as ft, generateOutline as pt } from "./components/pro/CodeEditor/utils.js";
77
- import { defaultContextMenu as mt } from "./components/pro/CodeEditor/extensions/contextMenu.js";
78
- import ht from "./components/pro/CodeEditor/editors/CodeEditor.js";
79
- import gt from "./components/pro/CodeEditor/panels/TableOfContentsPanel.js";
80
- import _t from "./components/pro/CodeEditor/panels/FootnotePanel.js";
81
- import vt from "./components/pro/CodeEditor/editors/MarkdownEditor.js";
82
- import yt from "./components/pro/CodeEditor/panels/OutlinePanel.js";
83
- import bt from "./components/pro/CodeEditor/panels/VariablePanel.js";
84
- import xt from "./layouts/MainLayout.js";
85
- import St from "./layouts/Navbar.js";
86
- import { ProtectedRoute as Ct } from "./components/ProtectedRoute/index.js";
87
- import { buildRouter as wt, createRouterFromConfig as Tt } from "./utils/routerBuilder.js";
88
- import { DropZone as Et, formatFileSize as Dt } from "./components/FileUploader/DropZone.js";
89
- import { FileItem as Ot } from "./components/FileUploader/FileItem.js";
90
- import { UploadQueue as kt } from "./components/FileUploader/UploadQueue.js";
91
- import { FileUploader as At } from "./components/FileUploader/FileUploader.js";
92
- import { FileIcon as jt } from "./components/pro/FileExplorer/FileIcon.js";
93
- import { Breadcrumb as Mt } from "./components/pro/FileExplorer/Breadcrumb.js";
94
- import { Toolbar as Nt } from "./components/pro/FileExplorer/Toolbar.js";
95
- import { ListView as Pt } from "./components/pro/FileExplorer/ListView.js";
96
- import { GridView as Ft } from "./components/pro/FileExplorer/GridView.js";
97
- import { CreateDialog as It } from "./components/pro/FileExplorer/CreateDialog.js";
98
- import { FileExplorer as Lt } from "./components/pro/FileExplorer/FileExplorer.js";
99
- import { defaultLabels as Rt } from "./components/pro/RichTextEditor/types.js";
100
- import { MarkdownBlockExtension as zt } from "./components/pro/RichTextEditor/extensions/MarkdownBlock.js";
101
- import Bt from "./components/pro/RichTextEditor/Toolbar/Toolbar.js";
102
- import Vt from "./components/pro/RichTextEditor/AIRewrite.js";
103
- import { CodeBlockExtension as Ht } from "./components/pro/RichTextEditor/extensions/CodeBlockView.js";
104
- import Ut from "./components/pro/RichTextEditor/RichTextEditor.js";
105
- import { BORDER_STYLE_OPTIONS as Wt, DASH_DENSITY_OPTIONS as Gt, DEFAULT_EDGE_DATA as Kt, DEFAULT_NODE_DATA as qt, EDGE_LINE_STYLE_OPTIONS as Jt, EDGE_MARKER_OPTIONS as Yt, EDGE_TYPE_OPTIONS as Xt, GRADIENT_DIRECTION_OPTIONS as Zt, PALETTE_ITEMS as Qt, ROOT_CANVAS_ID as $t, createEmptyDocument as en } from "./components/pro/Flow/constants.js";
106
- import { FlowProvider as tn, useFlowContext as nn } from "./components/pro/Flow/context/FlowContext.js";
107
- import { FlowUIProvider as rn, useFlowUI as an } from "./components/pro/Flow/context/FlowUIContext.js";
108
- import { downloadDataURL as on, exportCanvasToPNG as sn, useFlowImportExport as cn } from "./components/pro/Flow/hooks/useFlowImportExport.js";
109
- import { useLayoutActions as ln } from "./components/pro/Flow/hooks/useLayoutActions.js";
110
- import un from "./components/pro/Flow/panels/FlowToolbar.js";
111
- import dn from "./components/pro/Flow/panels/ShapePalette.js";
112
- import { FLOW_NODE_TYPES as fn } from "./components/pro/Flow/types.js";
113
- import pn from "./components/pro/Flow/panels/InspectorPanel.js";
114
- import mn from "./components/pro/Flow/panels/OutlinePanel.js";
115
- import hn from "./components/pro/Flow/panels/ContextMenu.js";
116
- import { useClipboard as gn } from "./components/pro/Flow/hooks/useClipboard.js";
117
- import _n from "./components/pro/Flow/Flow.js";
118
- import { useNodeMutations as vn } from "./components/pro/Flow/hooks/useNodeMutations.js";
119
- import { useEdgeMutations as yn } from "./components/pro/Flow/hooks/useEdgeMutations.js";
120
- import { useLineMutations as bn } from "./components/pro/Flow/hooks/useLineMutations.js";
121
- import { useSelection as xn } from "./components/pro/Flow/hooks/useSelection.js";
122
- import { DEFAULT_CATEGORY_CONFIG as Sn, DEFAULT_SCALE_CONFIGS as Cn, DEFAULT_TIME_WINDOW as wn, addDays as Tn, addWorkingDays as En, calculateWorkingDays as Dn, computeDateRange as On, dateToX as kn, daysBetween as An, flattenTree as jn, formatDate as Mn, generateDateRange as Nn, generateHeaderGroups as Pn, getISOWeekNumber as Fn, getISOWeekYear as In, isNonWorkingDay as Ln, isWeekend as Rn, parseDate as zn, startOfDay as Bn, xToDate as Vn } from "./components/pro/Gantt/utils.js";
123
- import { useGanttState as Hn } from "./components/pro/Gantt/hooks/useGanttState.js";
124
- import { useGanttDrag as Un } from "./components/pro/Gantt/hooks/useGanttDrag.js";
125
- import Wn from "./components/pro/Gantt/Gantt.js";
126
- import { DEFAULT_COLOR_OPTIONS as Gn, LABELS_EN as Kn, LABELS_ZH as qn, SLOT_HEIGHT as Jn, TIME_GRID_HEIGHT as Yn, TIME_SLOTS as Xn, addDays as Zn, clamp as Qn, formatDate as $n, formatTime as er, generateId as tr, generateTimeSlots as nr, getDaysInMonth as rr, getFirstDayOfMonth as ir, getHolidayEntry as ar, getMonthDates as or, getWeekDates as sr, isHoliday as cr, isNonWorkingDay as lr, isSameDay as ur, isToday as dr, isWeekend as fr, minutesToTime as pr, parseDate as mr, parseTime as hr, timeToMinutes as gr, todayStr as _r } from "./components/pro/Calendar/utils.js";
127
- import { useCalendarState as vr } from "./components/pro/Calendar/hooks/useCalendarState.js";
128
- import { useCalendarDrag as yr } from "./components/pro/Calendar/hooks/useCalendarDrag.js";
129
- import br from "./components/pro/Calendar/Calendar.js";
130
- export { Vt as AIRewrite, re as Accordion, Y as AdminSuite, xe as AppLayoutWrapper, Se as AppProvider, Ce as AppShell, Ye as ArticleContextMenu, Je as ArticleControl, ne as Avatar, Wt as BORDER_STYLE_OPTIONS, m as Badge, X as BlankSuite, Z as BlogSuite, Mt as Breadcrumb, a as Button, p as ButtonMenu, Gn as CALENDAR_DEFAULT_COLOR_OPTIONS, Kn as CALENDAR_LABELS_EN, qn as CALENDAR_LABELS_ZH, Jn as CALENDAR_SLOT_HEIGHT, Yn as CALENDAR_TIME_GRID_HEIGHT, Xn as CALENDAR_TIME_SLOTS, br as Calendar, w as Card, Ke as Chart, y as Checkbox, me as ChoicePicker, Ht as CodeBlockExtension, ht as CodeEditor, ce as Column, H as Container, It as CreateDialog, Gt as DASH_DENSITY_OPTIONS, Sn as DEFAULT_CATEGORY_CONFIG, Kt as DEFAULT_EDGE_DATA, qt as DEFAULT_NODE_DATA, Cn as DEFAULT_SCALE_CONFIGS, wn as DEFAULT_TIME_WINDOW, J as DashboardSuite, Pe as DataTable, fe as DateTimeInput, qe as Demo, L as DesktopSidebarToggleButton, S as Divider, Et as DropZone, Jt as EDGE_LINE_STYLE_OPTIONS, Yt as EDGE_MARKER_OPTIONS, Xt as EDGE_TYPE_OPTIONS, te as EmptyState, fn as FLOW_NODE_TYPES, g as Field, Lt as FileExplorer, Nt as FileExplorerToolbar, jt as FileIcon, At as FileUploader, U as Flex, _n as Flow, hn as FlowContextMenu, pn as FlowInspectorPanel, mn as FlowOutlinePanel, tn as FlowProvider, dn as FlowShapePalette, un as FlowToolbar, rn as FlowUIProvider, _t as FootnotePanel, Zt as GRADIENT_DIRECTION_OPTIONS, Wn as Gantt, W as Grid, G as GridItem, Ft as GridView, K as Group, o as GroupButton, l as GroupedTable, he as Headbar, ve as HeadbarLangSwitcher, _e as HeadbarSearch, be as HeadbarThemeSwitcher, ge as HeadbarTitle, ue as Icon, le as Image, h as Input, v as Label, V as Layout, Q as LayoutSuite, oe as List, Pt as ListView, $ as MailSuite, xt as MainLayout, Xe as Markdown, zt as MarkdownBlockExtension, vt as MarkdownEditor, R as MobileSidebarToggleButton, ie as Modal, pe as MultipleChoice, St as Navbar, u as NavigationList, yt as OutlinePanel, Qt as PALETTE_ITEMS, D as Page, O as PageBody, E as PageFloat, k as PageFooter, T as PageHeader, A as PageLeft, j as PageMain, M as PageRight, je as PivotPanel, Ae as PivotView, Ct as ProtectedRoute, $t as ROOT_CANVAS_ID, t as Resizable, n as ResizableHandle, r as ResizablePanel, Ut as RichTextEditor, Bt as RichTextToolbar, se as Row, d as Section, C as Select, B as Sidebar, z as SidebarToggleButtons, c as Skeleton, de as Slider, q as Space, b as Switch, s as Table, gt as TableOfContentsPanel, ae as Tabs, f as Text, _ as Textarea, x as Tooltip, I as Tree, Ot as UploadFileItem, kt as UploadQueue, bt as VariablePanel, ee as WikiSuite, Zn as addCalendarDays, Tn as addGanttDays, En as addWorkingDays, ot as bracketMatchingStyle, wt as buildRouter, Dn as calculateWorkingDays, Qn as calendarClamp, pr as calendarMinutesToTime, gr as calendarTimeToMinutes, _r as calendarTodayStr, i as cn, ft as collectVariables, On as computeDateRange, ke as computePivot, Fe as createActionColumn, Ie as createColumn, Le as createComputedColumn, en as createEmptyDocument, Tt as createRouterFromConfig, Re as createSelectOptions, ze as createSelectionColumn, dt as createThemeExtension, Be as dateSort, An as daysBetween, mt as defaultContextMenu, Ve as defaultFilterFunctions, Oe as defineExtension, on as downloadDataURL, sn as exportCanvasToPNG, He as extractUniqueOptions, jn as flattenGanttTree, $n as formatCalendarDate, er as formatCalendarTime, Dt as formatFileSize, Mn as formatGanttDate, kn as ganttDateToX, Vn as ganttXToDate, tr as generateCalendarId, nr as generateCalendarTimeSlots, Nn as generateDateRange, Pn as generateHeaderGroups, pt as generateOutline, N as generateSidebarActiveStyles, P as generateTreeActiveStyles, rr as getCalendarDaysInMonth, ir as getCalendarFirstDayOfMonth, ar as getCalendarHolidayEntry, or as getCalendarMonthDates, sr as getCalendarWeekDates, Ze as getDefaultSnippets, Fn as getISOWeekNumber, In as getISOWeekYear, it as getJumpableKeywords, at as getLanguageKeywords, ye as getThemes, cr as isCalendarHoliday, lr as isCalendarNonWorkingDay, ur as isCalendarSameDay, dr as isCalendarToday, fr as isCalendarWeekend, Ln as isGanttNonWorkingDay, Rn as isGanttWeekend, Qe as javascriptSnippets, et as jsJumpableKeywords, tt as jsKeywords, st as jumpTargetHighlight, ct as jumpToDefinition, lt as lineHighlightStyle, Ue as numericSort, mr as parseCalendarDate, hr as parseCalendarTime, zn as parseGanttDate, nt as pyJumpableKeywords, rt as pyKeywords, $e as pythonSnippets, Rt as richTextDefaultLabels, ut as smartAutocompletion, Bn as startOfGanttDay, We as stringSort, F as themeActiveStyles, Ge as treeSort, we as useAppContext, Te as useAuth, yr as useCalendarDrag, vr as useCalendarState, yn as useEdgeMutations, gn as useFlowClipboard, nn as useFlowContext, cn as useFlowImportExport, xn as useFlowSelection, an as useFlowUI, Un as useGanttDrag, Hn as useGanttState, ln as useLayoutActions, bn as useLineMutations, vn as useNodeMutations, Me as usePivotExtension, e as useResize, Ne as useRowDetailExtension, Ee as useTableColumns, De as useTableData };
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;
@@ -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 [D, O] = c([]), [k, A] = c(""), [j, M] = c(() => Math.max(T, Math.min(S, E))), N = s(null), P = s(null), F = p({ select: (e) => e.location }), I = f();
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
- M(Math.max(T, Math.min(S, E)));
26
+ F(Math.max(T, Math.min(S, E)));
27
27
  }, [
28
28
  S,
29
29
  T,
30
30
  E
31
31
  ]);
32
- let L = (e) => {
32
+ let B = (e) => {
33
33
  let t = Math.max(T, Math.min(e, E));
34
- M(t), x?.(t);
34
+ F(t), x?.(t);
35
35
  };
36
36
  a(() => {
37
- O(v === void 0 ? b ? b(_) : t(_) : v);
37
+ j(v === void 0 ? b ? b(_) : t(_) : v);
38
38
  }, [
39
39
  _,
40
40
  v,
41
41
  b
42
42
  ]), a(() => {
43
- if (!k) return;
43
+ if (!M) return;
44
44
  let e = setTimeout(() => {
45
- P.current?.querySelector(h ? "[aria-current=\"page\"]" : ".tree-node-content-active")?.scrollIntoView({
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
- }, [k, h]), a(() => {
52
- let e = P.current;
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 R = (e, t = !0) => e.map((e) => ({
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 ? R(e.children, !1) : void 0,
79
+ children: e.children ? V(e.children, !1) : void 0,
80
80
  meta: { path: e.path }
81
- })), z = o(() => R(D, !0), [D]), B = o(() => {
82
- if (D.length === 0) return [];
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(D);
89
- }, [D]);
88
+ return e(A);
89
+ }, [A]);
90
90
  a(() => {
91
- let e = F.pathname, t = (n) => {
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(D);
101
- A(n ?? "");
102
- }, [D, F.pathname]);
103
- let V = (e) => {
100
+ }, n = t(A);
101
+ N(n ?? "");
102
+ }, [A, R.pathname]);
103
+ let W = (e) => {
104
104
  if (e.meta?.path) {
105
- A(e.id), I({ to: e.meta.path });
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 ? (A(n.id), I({ to: n.meta.path })) : A(e.id);
120
- } else A(e.id);
121
- }, H = (e, t = []) => e.flatMap((e) => {
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
- }] : [], ...H(e.children ?? [], n)];
127
- }), U = h ? /* @__PURE__ */ l("nav", {
128
- ref: P,
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: D.map((e) => {
132
- let t = H([e]);
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": F.pathname === e.path ? "page" : void 0,
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: N,
153
- className: "blade-sidebar sidebar-container h-full bg-base-200 overflow-visible flex flex-col transition-colors duration-200 ease-in-out relative",
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: j,
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: j,
164
+ sidebarWidth: P,
165
165
  collapsedWidth: C,
166
- onWidthChange: x ? L : void 0,
166
+ onWidthChange: x ? B : void 0,
167
167
  minWidth: T,
168
168
  maxWidth: E,
169
- anchorRef: N
169
+ anchorRef: I
170
170
  }),
171
- U,
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 : P,
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: z,
179
- activeNodeId: k,
180
- defaultExpandedIds: B,
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__ */ l(e, {
218
+ return /* @__PURE__ */ u(e, {
193
219
  size: i?.size ?? a.size,
194
220
  weight: i?.weight ?? a.weight,
195
- color: k === t.id ? "inherit" : i?.color ?? "inherit",
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 && k !== t.id ? { color: "var(--sidebar-level-muted)" } : {}
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: V
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: 0.5rem;
237
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
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: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
263
- border-radius: 0.25rem;
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 0.3s cubic-bezier(0.4, 0, 0.2, 1);
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 {