dishui 0.0.83 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Demo/index.js +2 -2
- package/dist/components/Demo/index.js.map +1 -1
- package/dist/components/Input/index.js +52 -62
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/LayoutSuite/index.d.ts +10 -0
- package/dist/components/LayoutSuite/index.js +27 -18
- package/dist/components/LayoutSuite/index.js.map +1 -1
- package/dist/components/Markdown/markdownComponents.js +1 -0
- package/dist/components/Markdown/markdownComponents.js.map +1 -1
- package/dist/components/Markdown/useMarkdownSource.js +46 -31
- package/dist/components/Markdown/useMarkdownSource.js.map +1 -1
- package/dist/components/Markdown/useMarkmapRenderer.js +44 -31
- package/dist/components/Markdown/useMarkmapRenderer.js.map +1 -1
- package/dist/components/Markdown/useMermaidRenderer.js +49 -31
- package/dist/components/Markdown/useMermaidRenderer.js.map +1 -1
- package/dist/components/Page/index.d.ts +18 -4
- package/dist/components/Page/index.js +47 -35
- package/dist/components/Page/index.js.map +1 -1
- package/dist/components/ProtectedRoute/index.d.ts +2 -1
- package/dist/components/ProtectedRoute/index.js +16 -6
- package/dist/components/ProtectedRoute/index.js.map +1 -1
- package/dist/components/Select/index.d.ts +6 -0
- package/dist/components/Select/index.js +166 -136
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +12 -1
- package/dist/components/Tabs/index.js +42 -17
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/Text/index.js +2 -2
- package/dist/components/Text/index.js.map +1 -1
- package/dist/components/pro/ArticleContextMenu/index.js +7 -7
- package/dist/components/pro/CodeEditor/editors/CodeEditor.js +200 -189
- package/dist/components/pro/CodeEditor/editors/CodeEditor.js.map +1 -1
- package/dist/components/pro/CodeEditor/types.d.ts +3 -0
- package/dist/components/pro/DataTable/DataTable.d.ts +1 -1
- package/dist/components/pro/DataTable/DataTable.js +98 -240
- package/dist/components/pro/DataTable/DataTable.js.map +1 -1
- package/dist/components/pro/DataTable/components/TableBody.js +14 -16
- package/dist/components/pro/DataTable/components/TableBody.js.map +1 -1
- package/dist/components/pro/DataTable/components/TablePagination.d.ts +3 -9
- package/dist/components/pro/DataTable/components/TablePagination.js +29 -25
- package/dist/components/pro/DataTable/components/TablePagination.js.map +1 -1
- package/dist/components/pro/DataTable/tanstack-table.d.ts +2 -2
- package/dist/components/pro/DataTable/tanstack-table.js +29 -21
- package/dist/components/pro/DataTable/tanstack-table.js.map +1 -1
- package/dist/components/pro/DataTable/treeDataUtils.d.ts +2 -0
- package/dist/components/pro/DataTable/treeDataUtils.js +18 -19
- package/dist/components/pro/DataTable/treeDataUtils.js.map +1 -1
- package/dist/components/pro/DataTable/types.d.ts +24 -0
- package/dist/components/pro/DataTable/useDataTableModel.d.ts +16 -0
- package/dist/components/pro/DataTable/useDataTableModel.js +148 -0
- package/dist/components/pro/DataTable/useDataTableModel.js.map +1 -0
- package/dist/components/pro/FileExplorer/Breadcrumb.js +12 -12
- package/dist/components/pro/Flow/nodes/DataNodeView.js +87 -82
- package/dist/components/pro/Flow/nodes/DataNodeView.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.js +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaOverlay.js +1 -1
- package/dist/components/pro/Flow/nodes/MediaOverlay.js.map +1 -1
- package/dist/components/pro/Flow/nodes/Model3DView.js +69 -63
- package/dist/components/pro/Flow/nodes/Model3DView.js.map +1 -1
- package/dist/components/pro/Flow/nodes/chartGeometryBudget.d.ts +14 -0
- package/dist/components/pro/Flow/nodes/chartGeometryBudget.js +76 -0
- package/dist/components/pro/Flow/nodes/chartGeometryBudget.js.map +1 -0
- package/dist/components/pro/Flow/nodes/demandRender.d.ts +11 -0
- package/dist/components/pro/Flow/nodes/demandRender.js +26 -0
- package/dist/components/pro/Flow/nodes/demandRender.js.map +1 -0
- package/dist/components/pro/RichTextEditor/SlashMenu.js +68 -58
- package/dist/components/pro/RichTextEditor/SlashMenu.js.map +1 -1
- package/dist/contexts/AppContext.d.ts +1 -0
- package/dist/contexts/AppContext.js +144 -145
- package/dist/contexts/AppContext.js.map +1 -1
- package/dist/contexts/authentication.d.ts +7 -0
- package/dist/contexts/authentication.js +22 -0
- package/dist/contexts/authentication.js.map +1 -0
- package/dist/dishui.css +1 -1
- package/dist/hooks/useControllableState.d.ts +6 -14
- package/dist/hooks/useControllableState.js +21 -15
- package/dist/hooks/useControllableState.js.map +1 -1
- package/dist/hooks/useTableColumns.d.ts +3 -3
- package/dist/hooks/useTableColumns.js +2 -2
- package/dist/hooks/useTableColumns.js.map +1 -1
- package/dist/hooks/useTableData.d.ts +11 -4
- package/dist/hooks/useTableData.js +44 -26
- package/dist/hooks/useTableData.js.map +1 -1
- package/dist/index-nostyled.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +97 -97
- package/dist/layouts/Sidebar.d.ts +3 -1
- package/dist/layouts/Sidebar.js +131 -122
- package/dist/layouts/Sidebar.js.map +1 -1
- package/dist/utils/i18n.js +1 -1
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/routerBuilder.d.ts +7 -5
- package/dist/utils/routerBuilder.js +11 -15
- package/dist/utils/routerBuilder.js.map +1 -1
- package/dist/utils/safeStorage.d.ts +8 -0
- package/dist/utils/safeStorage.js +45 -0
- package/dist/utils/safeStorage.js.map +1 -0
- package/package.json +22 -5
package/dist/index.js
CHANGED
|
@@ -31,100 +31,100 @@ import { DesktopSidebarToggleButton as L, MobileSidebarToggleButton as R, Sideba
|
|
|
31
31
|
import B from "./layouts/Sidebar.js";
|
|
32
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
33
|
import { DashboardSuite as J } from "./components/LayoutSuite/DashboardSuite.js";
|
|
34
|
-
import { AdminSuite as Y, BlankSuite as X, BlogSuite as Z, LayoutSuite as Q, WikiSuite as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
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 { getThemes as
|
|
54
|
-
import
|
|
55
|
-
import { AppLayoutWrapper as
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import { defineExtension as
|
|
59
|
-
import { computePivot as
|
|
60
|
-
import { PivotView as
|
|
61
|
-
import { PivotPanel as
|
|
62
|
-
import { usePivotExtension as
|
|
63
|
-
import { useRowDetailExtension as
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import { getDefaultSnippets as
|
|
71
|
-
import { jsJumpableKeywords as
|
|
72
|
-
import { pyJumpableKeywords as
|
|
73
|
-
import { getJumpableKeywords as
|
|
74
|
-
import { bracketMatchingStyle as
|
|
75
|
-
import { createThemeExtension as
|
|
76
|
-
import { collectVariables as
|
|
77
|
-
import { defaultContextMenu as
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import { ProtectedRoute as
|
|
87
|
-
import { buildRouter as
|
|
88
|
-
import { DropZone as
|
|
89
|
-
import { FileItem as
|
|
90
|
-
import { UploadQueue as
|
|
91
|
-
import { FileUploader as
|
|
92
|
-
import { FileIcon as
|
|
93
|
-
import { Breadcrumb as
|
|
94
|
-
import { Toolbar as
|
|
95
|
-
import { ListView as
|
|
96
|
-
import { GridView as
|
|
97
|
-
import { CreateDialog as
|
|
98
|
-
import { FileExplorer as
|
|
99
|
-
import { defaultLabels as
|
|
100
|
-
import { MarkdownBlockExtension as
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import { CodeBlockExtension as
|
|
104
|
-
import
|
|
105
|
-
import { BORDER_STYLE_OPTIONS as
|
|
106
|
-
import { FlowProvider as
|
|
107
|
-
import { FlowUIProvider as
|
|
108
|
-
import { downloadDataURL as
|
|
109
|
-
import { useLayoutActions as
|
|
110
|
-
import
|
|
111
|
-
import
|
|
112
|
-
import { FLOW_NODE_TYPES as
|
|
113
|
-
import
|
|
114
|
-
import
|
|
115
|
-
import
|
|
116
|
-
import { useClipboard as
|
|
117
|
-
import
|
|
118
|
-
import { useNodeMutations as
|
|
119
|
-
import { useEdgeMutations as
|
|
120
|
-
import { useLineMutations as
|
|
121
|
-
import { useSelection as
|
|
122
|
-
import { DEFAULT_CATEGORY_CONFIG as
|
|
123
|
-
import { useGanttState as
|
|
124
|
-
import { useGanttDrag as
|
|
125
|
-
import
|
|
126
|
-
import { DEFAULT_COLOR_OPTIONS as
|
|
127
|
-
import { useCalendarState as
|
|
128
|
-
import { useCalendarDrag as
|
|
129
|
-
import
|
|
130
|
-
export {
|
|
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 };
|
|
@@ -11,7 +11,9 @@ export type SidebarProps = {
|
|
|
11
11
|
/**
|
|
12
12
|
* Opt-in typography for levels 1–3; deeper nodes reuse level 3.
|
|
13
13
|
* Omitted: preserve legacy Sidebar/LayoutSuite typography. When supplied,
|
|
14
|
-
* missing values default to base/sm/sm
|
|
14
|
+
* missing values default to base/sm/sm and semibold/medium/normal.
|
|
15
|
+
* Levels 3+ default to theme-adaptive neutral gray, even without levelText.
|
|
16
|
+
* Explicit colors retain Text semantics (secondary may be a theme accent).
|
|
15
17
|
* Selected labels always inherit the active row color.
|
|
16
18
|
*/
|
|
17
19
|
levelText?: readonly [SidebarLevelText?, SidebarLevelText?, SidebarLevelText?];
|
package/dist/layouts/Sidebar.js
CHANGED
|
@@ -5,9 +5,9 @@ import r from "../components/Tree/Tree.js";
|
|
|
5
5
|
import { DesktopSidebarToggleButton as i } from "../components/SidebarToggleButton/index.js";
|
|
6
6
|
import { useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
8
|
+
import { Link as d, useNavigate as f, useRouterState as p } from "@tanstack/react-router";
|
|
9
9
|
//#region src/layouts/Sidebar.tsx
|
|
10
|
-
var
|
|
10
|
+
var m = [
|
|
11
11
|
{
|
|
12
12
|
size: "base",
|
|
13
13
|
weight: "semibold"
|
|
@@ -20,36 +20,36 @@ var p = [
|
|
|
20
20
|
size: "sm",
|
|
21
21
|
weight: "normal"
|
|
22
22
|
}
|
|
23
|
-
],
|
|
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 }) => {
|
|
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();
|
|
25
25
|
a(() => {
|
|
26
|
-
|
|
26
|
+
M(Math.max(T, Math.min(S, E)));
|
|
27
27
|
}, [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
S,
|
|
29
|
+
T,
|
|
30
|
+
E
|
|
31
31
|
]);
|
|
32
|
-
let
|
|
33
|
-
let t = Math.max(
|
|
34
|
-
|
|
32
|
+
let L = (e) => {
|
|
33
|
+
let t = Math.max(T, Math.min(e, E));
|
|
34
|
+
M(t), x?.(t);
|
|
35
35
|
};
|
|
36
36
|
a(() => {
|
|
37
|
-
|
|
37
|
+
O(v === void 0 ? b ? b(_) : t(_) : v);
|
|
38
38
|
}, [
|
|
39
|
-
g,
|
|
40
39
|
_,
|
|
41
|
-
|
|
40
|
+
v,
|
|
41
|
+
b
|
|
42
42
|
]), a(() => {
|
|
43
|
-
if (!
|
|
43
|
+
if (!k) return;
|
|
44
44
|
let e = setTimeout(() => {
|
|
45
|
-
|
|
45
|
+
P.current?.querySelector(h ? "[aria-current=\"page\"]" : ".tree-node-content-active")?.scrollIntoView({
|
|
46
46
|
block: "nearest",
|
|
47
|
-
behavior: "smooth"
|
|
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
|
+
}, [k, h]), a(() => {
|
|
52
|
+
let e = P.current;
|
|
53
53
|
if (!e) return;
|
|
54
54
|
let t = (t) => {
|
|
55
55
|
if (e.scrollHeight <= e.clientHeight) return;
|
|
@@ -59,8 +59,8 @@ var p = [
|
|
|
59
59
|
e.scrollTop = r + n, e.scrollTop !== r && t.preventDefault();
|
|
60
60
|
};
|
|
61
61
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
62
|
-
}, []);
|
|
63
|
-
let
|
|
62
|
+
}, [h]);
|
|
63
|
+
let R = (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 p = [
|
|
|
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 ? R(e.children, !1) : void 0,
|
|
80
80
|
meta: { path: e.path }
|
|
81
|
-
})),
|
|
82
|
-
if (
|
|
81
|
+
})), z = o(() => R(D, !0), [D]), B = o(() => {
|
|
82
|
+
if (D.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
|
-
}, [
|
|
90
|
-
|
|
91
|
-
let e =
|
|
88
|
+
return e(D);
|
|
89
|
+
}, [D]);
|
|
90
|
+
a(() => {
|
|
91
|
+
let e = F.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,79 +97,87 @@ var p = [
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
return null;
|
|
100
|
-
}, n = t(
|
|
101
|
-
n
|
|
102
|
-
}, [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
100
|
+
}, n = t(D);
|
|
101
|
+
A(n ?? "");
|
|
102
|
+
}, [D, F.pathname]);
|
|
103
|
+
let V = (e) => {
|
|
104
|
+
if (e.meta?.path) {
|
|
105
|
+
A(e.id), I({ to: e.meta.path });
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (e.children && e.children.length > 0) {
|
|
109
|
+
let t = (e) => {
|
|
110
|
+
for (let n of e) {
|
|
111
|
+
if (n.meta?.path) return n;
|
|
112
|
+
if (n.children && n.children.length > 0) {
|
|
113
|
+
let e = t(n.children);
|
|
114
|
+
if (e) return e;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return null;
|
|
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) => {
|
|
122
|
+
let n = [...t, e.label];
|
|
123
|
+
return [...e.path ? [{
|
|
124
|
+
item: e,
|
|
125
|
+
trail: n.join(" / ")
|
|
126
|
+
}] : [], ...H(e.children ?? [], n)];
|
|
127
|
+
}), U = h ? /* @__PURE__ */ l("nav", {
|
|
128
|
+
ref: P,
|
|
129
|
+
className: "sidebar-rail",
|
|
130
|
+
"aria-label": _ === "zh" ? "侧边导航" : "Sidebar navigation",
|
|
131
|
+
children: D.map((e) => {
|
|
132
|
+
let t = H([e]);
|
|
133
|
+
return t.length > 0 ? /* @__PURE__ */ l("div", {
|
|
134
|
+
role: "group",
|
|
120
135
|
"aria-label": e.label,
|
|
121
|
-
className: "
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
})
|
|
144
|
-
}) }, e.id))
|
|
145
|
-
})]
|
|
146
|
-
}) : /* @__PURE__ */ u("div", {
|
|
147
|
-
ref: M,
|
|
148
|
-
className: "blade-sidebar h-full bg-base-200 overflow-visible flex flex-col transition-colors duration-200 ease-in-out relative",
|
|
149
|
-
style: {
|
|
150
|
-
width: `${A}px`,
|
|
151
|
-
maxWidth: T,
|
|
152
|
-
minWidth: w
|
|
136
|
+
className: "sidebar-rail-group",
|
|
137
|
+
children: t.map(({ item: e, trail: t }) => /* @__PURE__ */ l(d, {
|
|
138
|
+
to: e.path,
|
|
139
|
+
className: "sidebar-rail-link",
|
|
140
|
+
"aria-label": t,
|
|
141
|
+
title: t,
|
|
142
|
+
"aria-current": F.pathname === e.path ? "page" : void 0,
|
|
143
|
+
children: /* @__PURE__ */ l("span", {
|
|
144
|
+
"aria-hidden": "true",
|
|
145
|
+
children: e.icon || /* @__PURE__ */ l("span", { children: e.label.charAt(0) })
|
|
146
|
+
})
|
|
147
|
+
}, e.id))
|
|
148
|
+
}, e.id) : null;
|
|
149
|
+
})
|
|
150
|
+
}) : null;
|
|
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",
|
|
154
|
+
style: h ? { width: C } : {
|
|
155
|
+
width: j,
|
|
156
|
+
maxWidth: E,
|
|
157
|
+
minWidth: T
|
|
153
158
|
},
|
|
154
159
|
children: [
|
|
155
|
-
|
|
156
|
-
isCollapsed:
|
|
157
|
-
side:
|
|
158
|
-
onToggle:
|
|
159
|
-
sidebarWidth:
|
|
160
|
-
collapsedWidth:
|
|
161
|
-
onWidthChange:
|
|
162
|
-
minWidth:
|
|
163
|
-
maxWidth:
|
|
164
|
-
anchorRef:
|
|
160
|
+
w && /* @__PURE__ */ l(i, {
|
|
161
|
+
isCollapsed: h,
|
|
162
|
+
side: g,
|
|
163
|
+
onToggle: w,
|
|
164
|
+
sidebarWidth: j,
|
|
165
|
+
collapsedWidth: C,
|
|
166
|
+
onWidthChange: x ? L : void 0,
|
|
167
|
+
minWidth: T,
|
|
168
|
+
maxWidth: E,
|
|
169
|
+
anchorRef: N
|
|
165
170
|
}),
|
|
171
|
+
U,
|
|
166
172
|
/* @__PURE__ */ l("div", {
|
|
167
|
-
|
|
173
|
+
hidden: h,
|
|
174
|
+
style: h ? { display: "none" } : void 0,
|
|
175
|
+
ref: h ? void 0 : P,
|
|
168
176
|
className: "sidebar-scroll min-h-0 flex-grow overflow-y-auto scrollbar-thin scrollbar-thumb-base-300 scrollbar-track-transparent",
|
|
169
177
|
children: /* @__PURE__ */ l(r, {
|
|
170
|
-
data:
|
|
171
|
-
activeNodeId:
|
|
172
|
-
defaultExpandedIds:
|
|
178
|
+
data: z,
|
|
179
|
+
activeNodeId: k,
|
|
180
|
+
defaultExpandedIds: B,
|
|
173
181
|
showSearch: !1,
|
|
174
182
|
showExpandAll: !1,
|
|
175
183
|
showIcon: !0,
|
|
@@ -178,43 +186,44 @@ var p = [
|
|
|
178
186
|
indent: 1,
|
|
179
187
|
togglePosition: "right",
|
|
180
188
|
maxHeight: "100%",
|
|
181
|
-
className: `sidebar-tree${
|
|
189
|
+
className: `sidebar-tree${y === void 0 ? "" : " sidebar-tree-level-text"}`,
|
|
182
190
|
renderLabel: (t, n) => {
|
|
183
|
-
let r = Math.min(n, 2), i =
|
|
191
|
+
let r = Math.min(n, 2), i = y?.[r], a = m[r];
|
|
184
192
|
return /* @__PURE__ */ l(e, {
|
|
185
193
|
size: i?.size ?? a.size,
|
|
186
194
|
weight: i?.weight ?? a.weight,
|
|
187
|
-
color:
|
|
188
|
-
style:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
195
|
+
color: k === t.id ? "inherit" : i?.color ?? "inherit",
|
|
196
|
+
style: {
|
|
197
|
+
...y === void 0 ? {
|
|
198
|
+
fontSize: "inherit",
|
|
199
|
+
lineHeight: "inherit",
|
|
200
|
+
fontWeight: "inherit"
|
|
201
|
+
} : {},
|
|
202
|
+
...r === 2 && i?.color === void 0 && k !== t.id ? { color: "var(--sidebar-level-muted)" } : {}
|
|
203
|
+
},
|
|
193
204
|
children: t.label
|
|
194
205
|
});
|
|
195
206
|
},
|
|
196
|
-
onNodeClick:
|
|
197
|
-
if (e.meta?.path) {
|
|
198
|
-
k(e.id), F({ to: e.meta.path });
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
if (e.children && e.children.length > 0) {
|
|
202
|
-
let t = (e) => {
|
|
203
|
-
for (let n of e) {
|
|
204
|
-
if (n.meta?.path) return n;
|
|
205
|
-
if (n.children && n.children.length > 0) {
|
|
206
|
-
let e = t(n.children);
|
|
207
|
-
if (e) return e;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
return null;
|
|
211
|
-
}, n = t(e.children);
|
|
212
|
-
n ? (k(n.id), F({ to: n.meta.path })) : k(e.id);
|
|
213
|
-
} else k(e.id);
|
|
214
|
-
}
|
|
207
|
+
onNodeClick: V
|
|
215
208
|
})
|
|
216
209
|
}),
|
|
217
210
|
/* @__PURE__ */ l("style", { children: `
|
|
211
|
+
.sidebar-container {
|
|
212
|
+
--sidebar-level-muted: oklch(from color-mix(in oklab, var(--color-base-content) 76%, var(--color-base-200)) l 0 0);
|
|
213
|
+
}
|
|
214
|
+
/* LayoutSuite uses semantic surfaces even in colorful themes. Match its text luminance. */
|
|
215
|
+
.dishui-layout-suite-sidebar > .sidebar-container {
|
|
216
|
+
--sidebar-level-muted: oklch(from var(--dishui-text-tertiary) l 0 0);
|
|
217
|
+
}
|
|
218
|
+
.sidebar-rail { min-height: 0; height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 6px; }
|
|
219
|
+
.sidebar-rail-group { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px; margin-bottom: 8px; border: 1px solid var(--dishui-border-hairline, var(--color-base-300)); border-radius: 10px; }
|
|
220
|
+
.sidebar-rail-link { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 36px; min-height: 36px; flex-shrink: 0; border-radius: 6px; color: var(--sidebar-level-muted); text-decoration: none; transition: background-color 150ms, color 150ms; }
|
|
221
|
+
.sidebar-rail-link > span { display: flex; align-items: center; justify-content: center; }
|
|
222
|
+
.sidebar-rail-link svg { width: 18px; height: 18px; }
|
|
223
|
+
.sidebar-rail-link:hover { background: var(--color-base-300); }
|
|
224
|
+
.sidebar-rail-link[aria-current="page"] { color: var(--color-primary); background: color-mix(in oklab, var(--color-primary) 12%, var(--color-base-200)); box-shadow: inset 2px 0 var(--color-primary); }
|
|
225
|
+
.sidebar-rail-link:focus-visible { outline: 2px solid var(--dishui-ring, var(--color-primary)); outline-offset: -2px; }
|
|
226
|
+
@media (prefers-reduced-motion: reduce) { .sidebar-rail-link { transition: none; } }
|
|
218
227
|
/* Sidebar Tree 自定义样式 */
|
|
219
228
|
.sidebar-tree {
|
|
220
229
|
background: transparent;
|
|
@@ -349,6 +358,6 @@ var p = [
|
|
|
349
358
|
});
|
|
350
359
|
};
|
|
351
360
|
//#endregion
|
|
352
|
-
export {
|
|
361
|
+
export { h as default };
|
|
353
362
|
|
|
354
363
|
//# sourceMappingURL=Sidebar.js.map
|