@pstdio/ui 0.14.0 → 0.16.0
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/{MermaidComponent-CatfVUxA.js → MermaidComponent-BCMQqPqu.js} +11 -11
- package/dist/{MermaidComponent-CatfVUxA.js.map → MermaidComponent-BCMQqPqu.js.map} +1 -1
- package/dist/browser-storage-BinyFNJX.js +40 -0
- package/dist/browser-storage-BinyFNJX.js.map +1 -0
- package/dist/chat-ui.js +1160 -1120
- package/dist/chat-ui.js.map +1 -1
- package/dist/checkbox-D5AzFRlb.js +70 -0
- package/dist/checkbox-D5AzFRlb.js.map +1 -0
- package/dist/components/chat-ui/components/ai-conversation.d.ts +1 -1
- package/dist/components/chat-ui/components/ai-message.d.ts +1 -1
- package/dist/components/chat-ui/components/ai-response.d.ts +0 -1
- package/dist/components/chat-ui/components/attachment-list.d.ts +1 -1
- package/dist/components/chat-ui/components/auto-scroll.d.ts +27 -0
- package/dist/components/chat-ui/components/chat-message-animation.d.ts +22 -0
- package/dist/components/chat-ui/components/timeline.d.ts +0 -2
- package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -1
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -12
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
- package/dist/components/chat-ui/tool-rendering/types.d.ts +1 -2
- package/dist/components/command-palette/index.d.ts +4 -0
- package/dist/components/data-renderer/data-renderer-board.d.ts +1 -1
- package/dist/components/data-renderer/data-renderer-card.d.ts +1 -1
- package/dist/components/data-renderer/data-renderer-enum-helpers.d.ts +3 -3
- package/dist/components/data-renderer/data-renderer-helpers.d.ts +2 -0
- package/dist/components/data-renderer/data-renderer-list.d.ts +1 -1
- package/dist/components/data-renderer/data-renderer.d.ts +1 -1
- package/dist/components/data-renderer/index.d.ts +18 -0
- package/dist/components/data-renderer/types.d.ts +0 -6
- package/dist/components/diff-viewer/diff-card.d.ts +1 -0
- package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -19
- package/dist/components/diff-viewer/diff-drawer.d.ts +1 -0
- package/dist/components/diff-viewer/diff-viewer-options-menu.d.ts +16 -0
- package/dist/components/diff-viewer/index.d.ts +2 -0
- package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +7 -3
- package/dist/components/internal/style-guide.d.ts +14 -0
- package/dist/components/internal/token-editor-controls.d.ts +8 -0
- package/dist/components/internal/token-editor-data.d.ts +40 -0
- package/dist/components/internal/token-editor-state.d.ts +22 -0
- package/dist/components/layout/index.d.ts +6 -0
- package/dist/components/list-row/list-row.types.d.ts +1 -1
- package/dist/components/notification-center/index.d.ts +2 -0
- package/dist/components/notification-center/notification-center.d.ts +2 -0
- package/dist/components/notification-center/notification-center.types.d.ts +37 -0
- package/dist/components/{bubble-button.d.ts → overlays/bubble-button.d.ts} +1 -1
- package/dist/components/overlays/index.d.ts +12 -0
- package/dist/components/overlays/search-modal-content.d.ts +20 -0
- package/dist/components/{searchable-menu.d.ts → overlays/searchable-menu.d.ts} +1 -1
- package/dist/components/param-editor/index.d.ts +23 -0
- package/dist/components/param-editor/inputs/action-input.d.ts +13 -0
- package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +12 -0
- package/dist/components/param-editor/inputs/anchor-grid.d.ts +4 -0
- package/dist/components/param-editor/inputs/file-accept.d.ts +22 -0
- package/dist/components/param-editor/inputs/file-drop-input.d.ts +14 -0
- package/dist/components/param-editor/inputs/numeric-value.d.ts +6 -0
- package/dist/components/param-editor/inputs/range-input.d.ts +17 -0
- package/dist/components/param-editor/inputs/range-value.d.ts +5 -0
- package/dist/components/param-editor/inputs/resource-input-chips.d.ts +15 -0
- package/dist/components/param-editor/inputs/resource-input.d.ts +18 -0
- package/dist/components/param-editor/inputs/segmented-input.d.ts +14 -0
- package/dist/components/param-editor/inputs/slider-marks.d.ts +5 -0
- package/dist/components/param-editor/inputs/vector-input.d.ts +17 -0
- package/dist/components/param-editor/inputs/vector-value.d.ts +7 -0
- package/dist/components/param-editor/param-editor-control-item.d.ts +15 -0
- package/dist/components/param-editor/param-editor-control-list.d.ts +5 -0
- package/dist/components/param-editor/param-editor-field-label.d.ts +1 -0
- package/dist/components/param-editor/param-editor-field.d.ts +11 -0
- package/dist/components/param-editor/param-editor-inline-group.d.ts +5 -0
- package/dist/components/param-editor/param-editor-section.d.ts +16 -0
- package/dist/components/param-editor/param-editor.d.ts +2 -1
- package/dist/components/param-editor/param-editor.types.d.ts +101 -19
- package/dist/components/{breadcrumb.d.ts → primitives/breadcrumb.d.ts} +1 -1
- package/dist/components/{icon-color-picker.d.ts → primitives/icon-color-picker.d.ts} +2 -6
- package/dist/components/primitives/index.d.ts +28 -0
- package/dist/components/{number-input.d.ts → primitives/number-input.d.ts} +0 -2
- package/dist/components/{session-indicator.d.ts → primitives/session-indicator.d.ts} +2 -1
- package/dist/components/{tooltip.d.ts → primitives/tooltip.d.ts} +0 -1
- package/dist/components/rich-text/prompt-input/commands.d.ts +0 -17
- package/dist/components/rich-text/prompt-input/events.d.ts +0 -13
- package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +1 -2
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +1 -2
- package/dist/components/rich-text/prompt-input/utils.d.ts +1 -2
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -1
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
- package/dist/components/sidebar/sidebar.types.d.ts +1 -1
- package/dist/components/tab-strip/tab-visibility-filter.d.ts +5 -3
- package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor.types.d.ts +1 -1
- package/dist/components/terminal/bind-session.d.ts +33 -0
- package/dist/components/terminal/index.d.ts +6 -0
- package/dist/components/terminal/scripted-bridge.d.ts +35 -0
- package/dist/components/terminal/terminal-contract.d.ts +22 -0
- package/dist/components/terminal/terminal-theme.d.ts +12 -0
- package/dist/components/terminal/terminal.d.ts +45 -0
- package/dist/components/terminal/types.d.ts +35 -0
- package/dist/components/terminal/use-terminal-session.d.ts +21 -0
- package/dist/components/tree-list/tree-list-order-filter.d.ts +1 -2
- package/dist/components/tree-list/tree-list-visibility-filter.d.ts +12 -4
- package/dist/components/tree-list/tree-list.d.ts +1 -1
- package/dist/components/tree-list/tree-list.types.d.ts +7 -2
- package/dist/data-renderer.js +1669 -0
- package/dist/data-renderer.js.map +1 -0
- package/dist/diff-editor-BnfV8cYB.js +182 -0
- package/dist/diff-editor-BnfV8cYB.js.map +1 -0
- package/dist/diff.js +1313 -0
- package/dist/diff.js.map +1 -0
- package/dist/empty-state-Bo4HVrgr.js +34 -0
- package/dist/empty-state-Bo4HVrgr.js.map +1 -0
- package/dist/foundations/gallery/gallery-frame.d.ts +21 -0
- package/dist/foundations/gallery/sections/badges-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/buttons-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/composite-chat-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/composites-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/feedback-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/input-authoring-card.d.ts +1 -0
- package/dist/foundations/gallery/sections/inputs-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/layout-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/overlays-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/panels-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +1 -0
- package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +1 -0
- package/dist/index.d.ts +15 -84
- package/dist/index.js +3594 -7450
- package/dist/index.js.map +1 -1
- package/dist/list-row-mi3Hn-Um.js +740 -0
- package/dist/list-row-mi3Hn-Um.js.map +1 -0
- package/dist/mermaid-renderer-DZo3qj6D.js +425 -0
- package/dist/mermaid-renderer-DZo3qj6D.js.map +1 -0
- package/dist/mermaid.js +5 -0
- package/dist/mermaid.js.map +1 -0
- package/dist/radio-cLMEBBZk.js +76 -0
- package/dist/radio-cLMEBBZk.js.map +1 -0
- package/dist/resource-badge-qCWHP-wQ.js +99 -0
- package/dist/resource-badge-qCWHP-wQ.js.map +1 -0
- package/dist/{rich-message-BFtvH9H7.js → rich-message-DBf_5YlW.js} +462 -481
- package/dist/rich-message-DBf_5YlW.js.map +1 -0
- package/dist/rich-text.js +397 -390
- package/dist/rich-text.js.map +1 -1
- package/dist/scroll-area-BMbg1WcD.js +91 -0
- package/dist/scroll-area-BMbg1WcD.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/terminal.js +339 -0
- package/dist/terminal.js.map +1 -0
- package/dist/theme/global.d.ts +3 -0
- package/dist/theme/recipes/badge.d.ts +50 -0
- package/dist/theme/recipes/button.d.ts +24 -19
- package/dist/theme/recipes/color-picker.d.ts +1 -0
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/input.d.ts +55 -0
- package/dist/theme/recipes/number-input.d.ts +98 -0
- package/dist/theme/recipes/tabs.d.ts +49 -28
- package/dist/theme/recipes/textarea.d.ts +62 -1
- package/dist/theme/recipes/timeline.d.ts +74 -0
- package/dist/theme/shadowless-default-config.d.ts +2 -0
- package/dist/theme/tokens/borders.d.ts +0 -3
- package/dist/theme/tokens/colors.d.ts +100 -70
- package/dist/{theme-C5qHTCU9.js → theme-CJBYBJaA.js} +1264 -415
- package/dist/theme-CJBYBJaA.js.map +1 -0
- package/dist/theme-preference-DOzHx64J.js +123 -0
- package/dist/theme-preference-DOzHx64J.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-CcuZMLS5.js +930 -0
- package/dist/tree-list-CcuZMLS5.js.map +1 -0
- package/dist/workspace-badge-Fuo-1zPj.js +314 -0
- package/dist/workspace-badge-Fuo-1zPj.js.map +1 -0
- package/package.json +23 -3
- package/dist/components/file-tree-helpers.d.ts +0 -8
- package/dist/components/open-source-notices-screen.d.ts +0 -20
- package/dist/components/param-editor/input-group.d.ts +0 -10
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/index.d.ts +0 -1
- package/dist/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -5
- package/dist/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -2
- package/dist/components/rich-text/theme/report-theme.d.ts +0 -3
- package/dist/components/sidebar/sidebar-project-menu.d.ts +0 -7
- package/dist/components/style-guide-data.d.ts +0 -46
- package/dist/components/style-guide.d.ts +0 -1
- package/dist/mermaid-renderer-DYEiYmYQ.js +0 -411
- package/dist/mermaid-renderer-DYEiYmYQ.js.map +0 -1
- package/dist/radio-DJtQY9po.js +0 -286
- package/dist/radio-DJtQY9po.js.map +0 -1
- package/dist/resource-badge-D33IFv74.js +0 -188
- package/dist/resource-badge-D33IFv74.js.map +0 -1
- package/dist/rich-message-BFtvH9H7.js.map +0 -1
- package/dist/theme/tokens/shadows.d.ts +0 -64
- package/dist/theme-C5qHTCU9.js.map +0 -1
- package/dist/utils/formats.d.ts +0 -7
- /package/dist/components/{palette-filter.d.ts → command-palette/palette-filter.d.ts} +0 -0
- /package/dist/components/{palette-list.d.ts → command-palette/palette-list.d.ts} +0 -0
- /package/dist/components/{palette-shortcut.d.ts → command-palette/palette-shortcut.d.ts} +0 -0
- /package/dist/components/{palette.d.ts → command-palette/palette.d.ts} +0 -0
- /package/dist/components/{code-editor.d.ts → diff-viewer/code-editor.d.ts} +0 -0
- /package/dist/components/{column-file-browser.d.ts → file-browser/column-file-browser.d.ts} +0 -0
- /package/dist/components/{performance-panel.d.ts → internal/performance-panel.d.ts} +0 -0
- /package/dist/components/{header.d.ts → layout/header.d.ts} +0 -0
- /package/dist/components/{horizontal-menu-stack.d.ts → layout/horizontal-menu-stack.d.ts} +0 -0
- /package/dist/components/{item-section.d.ts → layout/item-section.d.ts} +0 -0
- /package/dist/components/{panel-header.constants.d.ts → layout/panel-header.constants.d.ts} +0 -0
- /package/dist/components/{resizable-split-layout.d.ts → layout/resizable-split-layout.d.ts} +0 -0
- /package/dist/components/{resizable-split-layout.handle.d.ts → layout/resizable-split-layout.handle.d.ts} +0 -0
- /package/dist/components/{attached-panel.d.ts → overlays/attached-panel.d.ts} +0 -0
- /package/dist/components/{bubble-panel.d.ts → overlays/bubble-panel.d.ts} +0 -0
- /package/dist/components/{delete-confirmation-modal.d.ts → overlays/delete-confirmation-modal.d.ts} +0 -0
- /package/dist/components/{repo-picker-dialog.d.ts → overlays/repo-picker-dialog.d.ts} +0 -0
- /package/dist/components/{resource-context-menu.d.ts → overlays/resource-context-menu.d.ts} +0 -0
- /package/dist/components/param-editor/{color-input.d.ts → inputs/color-input.d.ts} +0 -0
- /package/dist/components/param-editor/{date-input.d.ts → inputs/date-input.d.ts} +0 -0
- /package/dist/components/param-editor/{horizontal-text-input.d.ts → inputs/horizontal-text-input.d.ts} +0 -0
- /package/dist/components/param-editor/{number-input.d.ts → inputs/number-input.d.ts} +0 -0
- /package/dist/components/param-editor/{selection-input.d.ts → inputs/selection-input.d.ts} +0 -0
- /package/dist/components/param-editor/{text-input.d.ts → inputs/text-input.d.ts} +0 -0
- /package/dist/components/{alert.d.ts → primitives/alert.d.ts} +0 -0
- /package/dist/components/{checkbox.d.ts → primitives/checkbox.d.ts} +0 -0
- /package/dist/components/{content-placeholder.d.ts → primitives/content-placeholder.d.ts} +0 -0
- /package/dist/components/{empty-state.d.ts → primitives/empty-state.d.ts} +0 -0
- /package/dist/components/{error-boundary.d.ts → primitives/error-boundary.d.ts} +0 -0
- /package/dist/components/{info-card.d.ts → primitives/info-card.d.ts} +0 -0
- /package/dist/components/{integration-card.d.ts → primitives/integration-card.d.ts} +0 -0
- /package/dist/components/{radio.d.ts → primitives/radio.d.ts} +0 -0
- /package/dist/components/{resource-badge.d.ts → primitives/resource-badge.d.ts} +0 -0
- /package/dist/components/{scroll-area.d.ts → primitives/scroll-area.d.ts} +0 -0
- /package/dist/components/{simple-card.d.ts → primitives/simple-card.d.ts} +0 -0
- /package/dist/components/{slider.d.ts → primitives/slider.d.ts} +0 -0
- /package/dist/components/{switch.d.ts → primitives/switch.d.ts} +0 -0
- /package/dist/components/{toaster.d.ts → primitives/toaster.d.ts} +0 -0
- /package/dist/components/{workspace-badge.d.ts → primitives/workspace-badge.d.ts} +0 -0
|
@@ -0,0 +1,930 @@
|
|
|
1
|
+
import { jsx as f, jsxs as Y, Fragment as Ge } from "react/jsx-runtime";
|
|
2
|
+
import { c as F } from "react/compiler-runtime";
|
|
3
|
+
import { Box as M, Flex as Ve, Stack as le, Text as Nt, Menu as ie, IconButton as Ye, HStack as Ke } from "@chakra-ui/react";
|
|
4
|
+
import { useId as kt, useRef as te, useState as re, useEffect as ne } from "react";
|
|
5
|
+
import { useVirtualizer as Tt } from "@tanstack/react-virtual";
|
|
6
|
+
import { L as Ze, S as zt, R as Ct } from "./list-row-mi3Hn-Um.js";
|
|
7
|
+
import { ChevronRight as Et } from "lucide-react";
|
|
8
|
+
import { useSensors as Wt, useSensor as At, PointerSensor as Pt, DndContext as Lt } from "@dnd-kit/core";
|
|
9
|
+
import { SortableContext as rt, verticalListSortingStrategy as lt, useSortable as _t } from "@dnd-kit/sortable";
|
|
10
|
+
import { CSS as Dt } from "@dnd-kit/utilities";
|
|
11
|
+
const Mt = {
|
|
12
|
+
_before: {
|
|
13
|
+
bg: "border.emphasized"
|
|
14
|
+
}
|
|
15
|
+
}, Je = "12px", Ft = (t) => {
|
|
16
|
+
const e = F(16), {
|
|
17
|
+
bounds: o,
|
|
18
|
+
contentPanelId: n,
|
|
19
|
+
resizablePanelId: i,
|
|
20
|
+
resizeLabel: s,
|
|
21
|
+
resolvedPanelWidth: r,
|
|
22
|
+
showResizeSeparator: d,
|
|
23
|
+
onResizeKeyDown: a,
|
|
24
|
+
onResizeStart: l
|
|
25
|
+
} = t, g = `${i} ${n}`;
|
|
26
|
+
let m;
|
|
27
|
+
e[0] !== o.maxSize ? (m = Math.round(o.maxSize), e[0] = o.maxSize, e[1] = m) : m = e[1];
|
|
28
|
+
let h;
|
|
29
|
+
e[2] !== r ? (h = Math.round(r), e[2] = r, e[3] = h) : h = e[3];
|
|
30
|
+
const I = d ? "border.subtle" : "transparent";
|
|
31
|
+
let c;
|
|
32
|
+
e[4] !== I ? (c = {
|
|
33
|
+
content: '""',
|
|
34
|
+
position: "absolute",
|
|
35
|
+
top: 0,
|
|
36
|
+
bottom: 0,
|
|
37
|
+
insetInlineStart: "50%",
|
|
38
|
+
w: "1px",
|
|
39
|
+
bg: I,
|
|
40
|
+
transform: "translateX(-50%)"
|
|
41
|
+
}, e[4] = I, e[5] = c) : c = e[5];
|
|
42
|
+
const u = d ? Mt : void 0;
|
|
43
|
+
let p;
|
|
44
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = {
|
|
45
|
+
_before: {
|
|
46
|
+
bg: "colorPalette.focusRing",
|
|
47
|
+
w: "2px"
|
|
48
|
+
}
|
|
49
|
+
}, e[6] = p) : p = e[6];
|
|
50
|
+
let b;
|
|
51
|
+
return e[7] !== a || e[8] !== l || e[9] !== s || e[10] !== g || e[11] !== m || e[12] !== h || e[13] !== c || e[14] !== u ? (b = /* @__PURE__ */ f(M, { role: "separator", "aria-label": s, "aria-orientation": "vertical", "aria-controls": g, "aria-valuemin": 0, "aria-valuemax": m, "aria-valuenow": h, tabIndex: 0, position: "relative", zIndex: "1", flex: `0 0 ${Je}`, w: Je, mx: "-6px", cursor: "col-resize", touchAction: "none", outline: "none", onPointerDown: l, onKeyDown: a, _before: c, _hover: u, _focusVisible: p }), e[7] = a, e[8] = l, e[9] = s, e[10] = g, e[11] = m, e[12] = h, e[13] = c, e[14] = u, e[15] = b) : b = e[15], b;
|
|
52
|
+
}, $t = 1200, Qe = 24, Vt = 72, Ht = 160, se = (t, e, o) => Math.min(Math.max(t, e), o), Ot = (t) => t > 0 ? t : $t, Gt = (t) => se(t / 2, Vt, Ht), He = (t) => {
|
|
53
|
+
const e = Ot(t.rootWidth), o = Math.max(0, e - t.contentMinSizePx), n = t.maxSizePx ?? o, i = Math.max(0, Math.min(n, o));
|
|
54
|
+
return {
|
|
55
|
+
minSize: Math.min(t.minSizePx, i),
|
|
56
|
+
maxSize: i
|
|
57
|
+
};
|
|
58
|
+
}, Oe = (t) => t?.getBoundingClientRect().width ?? 0, et = (t, e) => {
|
|
59
|
+
t && (t.style.width = `${e}px`, t.style.flexBasis = `${e}px`, t.style.flexGrow = "0", t.style.flexShrink = "0", t.style.display = e > 0 ? "flex" : "none");
|
|
60
|
+
}, Kt = (t) => {
|
|
61
|
+
t && (t.style.width = "", t.style.flexBasis = "", t.style.flexGrow = "", t.style.flexShrink = "", t.style.display = "");
|
|
62
|
+
}, En = (t) => {
|
|
63
|
+
const e = F(88);
|
|
64
|
+
let o, n, i, s, r, d, a, l, g, m, h, I, c, u;
|
|
65
|
+
e[0] !== t ? ({
|
|
66
|
+
resizablePanel: d,
|
|
67
|
+
contentPanel: o,
|
|
68
|
+
resizableSide: l,
|
|
69
|
+
defaultSizePx: g,
|
|
70
|
+
minSizePx: m,
|
|
71
|
+
maxSizePx: i,
|
|
72
|
+
contentMinSizePx: h,
|
|
73
|
+
collapsed: n,
|
|
74
|
+
collapsible: I,
|
|
75
|
+
resizeLabel: c,
|
|
76
|
+
showResizeSeparator: u,
|
|
77
|
+
onSizeChange: r,
|
|
78
|
+
onCollapsedChange: s,
|
|
79
|
+
...a
|
|
80
|
+
} = t, e[0] = t, e[1] = o, e[2] = n, e[3] = i, e[4] = s, e[5] = r, e[6] = d, e[7] = a, e[8] = l, e[9] = g, e[10] = m, e[11] = h, e[12] = I, e[13] = c, e[14] = u) : (o = e[1], n = e[2], i = e[3], s = e[4], r = e[5], d = e[6], a = e[7], l = e[8], g = e[9], m = e[10], h = e[11], I = e[12], c = e[13], u = e[14]);
|
|
81
|
+
const p = l === void 0 ? "left" : l, b = g === void 0 ? 240 : g, w = m === void 0 ? 200 : m, x = h === void 0 ? 0 : h, y = I === void 0 ? !0 : I, k = c === void 0 ? "Resize panel" : c, T = u === void 0 ? !0 : u, z = kt(), C = te(null), A = te(null), E = te(null), S = te(Bt), R = te(b), [D, H] = re(b), [B, O] = re(0), [U, G] = re(!1), N = n ?? U;
|
|
82
|
+
let W, _, L;
|
|
83
|
+
e[15] !== N || e[16] !== x || e[17] !== i || e[18] !== w || e[19] !== D || e[20] !== B ? (W = He({
|
|
84
|
+
rootWidth: B,
|
|
85
|
+
minSizePx: w,
|
|
86
|
+
maxSizePx: i,
|
|
87
|
+
contentMinSizePx: x
|
|
88
|
+
}), _ = Gt(w), L = N ? 0 : se(D, W.minSize, W.maxSize), e[15] = N, e[16] = x, e[17] = i, e[18] = w, e[19] = D, e[20] = B, e[21] = W, e[22] = _, e[23] = L) : (W = e[21], _ = e[22], L = e[23]);
|
|
89
|
+
const P = L, Z = `${z}-content`, J = `${z}-resizable`;
|
|
90
|
+
let de, ce;
|
|
91
|
+
e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (de = () => {
|
|
92
|
+
const v = C.current;
|
|
93
|
+
if (!v)
|
|
94
|
+
return;
|
|
95
|
+
const $ = () => {
|
|
96
|
+
O(v.getBoundingClientRect().width);
|
|
97
|
+
};
|
|
98
|
+
if ($(), typeof ResizeObserver > "u")
|
|
99
|
+
return;
|
|
100
|
+
const V = new ResizeObserver($);
|
|
101
|
+
return V.observe(v), () => {
|
|
102
|
+
V.disconnect();
|
|
103
|
+
};
|
|
104
|
+
}, ce = [], e[24] = de, e[25] = ce) : (de = e[24], ce = e[25]), ne(de, ce);
|
|
105
|
+
let ae, ue;
|
|
106
|
+
e[26] !== b ? (ae = () => {
|
|
107
|
+
R.current = b, H(b);
|
|
108
|
+
}, ue = [b], e[26] = b, e[27] = ae, e[28] = ue) : (ae = e[27], ue = e[28]), ne(ae, ue);
|
|
109
|
+
let fe, me;
|
|
110
|
+
e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (fe = () => () => S.current(), me = [], e[29] = fe, e[30] = me) : (fe = e[29], me = e[30]), ne(fe, me);
|
|
111
|
+
let ge;
|
|
112
|
+
e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ge = (v) => {
|
|
113
|
+
et(A.current, v);
|
|
114
|
+
}, e[31] = ge) : ge = e[31];
|
|
115
|
+
const Ae = ge;
|
|
116
|
+
let he, xe;
|
|
117
|
+
e[32] !== P ? (he = () => {
|
|
118
|
+
Kt(E.current), et(A.current, P);
|
|
119
|
+
}, xe = [P], e[32] = P, e[33] = he, e[34] = xe) : (he = e[33], xe = e[34]), ne(he, xe);
|
|
120
|
+
let pe;
|
|
121
|
+
e[35] !== x || e[36] !== i || e[37] !== w || e[38] !== r ? (pe = (v) => {
|
|
122
|
+
const $ = Oe(C.current), V = He({
|
|
123
|
+
rootWidth: $,
|
|
124
|
+
minSizePx: w,
|
|
125
|
+
maxSizePx: i,
|
|
126
|
+
contentMinSizePx: x
|
|
127
|
+
}), X = se(v, V.minSize, V.maxSize);
|
|
128
|
+
R.current = X, H(X), Ae(X), r?.(X);
|
|
129
|
+
}, e[35] = x, e[36] = i, e[37] = w, e[38] = r, e[39] = pe) : pe = e[39];
|
|
130
|
+
const K = pe;
|
|
131
|
+
let Ie;
|
|
132
|
+
e[40] !== n || e[41] !== s ? (Ie = (v) => {
|
|
133
|
+
n === void 0 && G(v), s?.(v);
|
|
134
|
+
}, e[40] = n, e[41] = s, e[42] = Ie) : Ie = e[42];
|
|
135
|
+
const j = Ie;
|
|
136
|
+
let we;
|
|
137
|
+
e[43] !== _ || e[44] !== N || e[45] !== y || e[46] !== K || e[47] !== x || e[48] !== i || e[49] !== w || e[50] !== p || e[51] !== j ? (we = (v) => {
|
|
138
|
+
if (v.button !== 0 || N && !y)
|
|
139
|
+
return;
|
|
140
|
+
v.preventDefault(), S.current();
|
|
141
|
+
const $ = v.currentTarget, V = Oe(C.current), X = He({
|
|
142
|
+
rootWidth: V,
|
|
143
|
+
minSizePx: w,
|
|
144
|
+
maxSizePx: i,
|
|
145
|
+
contentMinSizePx: x
|
|
146
|
+
}), bt = v.clientX, $e = N ? 0 : Oe(A.current) || R.current, St = p === "left" ? 1 : -1, yt = document.body.style.cursor, vt = document.body.style.userSelect;
|
|
147
|
+
let ze = $e === 0 ? 0 : se($e, X.minSize, X.maxSize), Ce = N, ee = 0;
|
|
148
|
+
const Ue = (Ee) => {
|
|
149
|
+
A.current && (A.current.style.pointerEvents = Ee), E.current && (E.current.style.pointerEvents = Ee);
|
|
150
|
+
}, Rt = () => {
|
|
151
|
+
ee || (ee = window.requestAnimationFrame(() => {
|
|
152
|
+
ee = 0, Ae(ze);
|
|
153
|
+
}));
|
|
154
|
+
}, je = (Ee) => {
|
|
155
|
+
const qe = $e + (Ee.clientX - bt) * St;
|
|
156
|
+
Ce = y && qe <= _, ze = Ce ? 0 : se(qe, X.minSize, X.maxSize), Ce || (R.current = ze), Rt();
|
|
157
|
+
}, q = () => {
|
|
158
|
+
window.removeEventListener("pointermove", je), window.removeEventListener("pointerup", q), window.removeEventListener("pointercancel", q), window.removeEventListener("blur", q), document.body.style.cursor = yt, document.body.style.userSelect = vt, $.hasPointerCapture(v.pointerId) && $.releasePointerCapture(v.pointerId), Ue(""), ee && (window.cancelAnimationFrame(ee), ee = 0), S.current = Xt, Ce ? (Ae(0), j(!0)) : (j(!1), K(ze));
|
|
159
|
+
};
|
|
160
|
+
S.current = q, $.setPointerCapture(v.pointerId), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", Ue("none"), window.addEventListener("pointermove", je), window.addEventListener("pointerup", q, {
|
|
161
|
+
once: !0
|
|
162
|
+
}), window.addEventListener("pointercancel", q, {
|
|
163
|
+
once: !0
|
|
164
|
+
}), window.addEventListener("blur", q, {
|
|
165
|
+
once: !0
|
|
166
|
+
});
|
|
167
|
+
}, e[43] = _, e[44] = N, e[45] = y, e[46] = K, e[47] = x, e[48] = i, e[49] = w, e[50] = p, e[51] = j, e[52] = we) : we = e[52];
|
|
168
|
+
const Pe = we;
|
|
169
|
+
let be;
|
|
170
|
+
e[53] !== W || e[54] !== N || e[55] !== y || e[56] !== K || e[57] !== p || e[58] !== j ? (be = (v) => {
|
|
171
|
+
const $ = p === "left" ? 1 : -1, V = R.current;
|
|
172
|
+
N && (v.key === "ArrowLeft" || v.key === "ArrowRight" || v.key === "End") ? (v.preventDefault(), j(!1), K(V)) : v.key === "ArrowLeft" ? (v.preventDefault(), K(V - Qe * $)) : v.key === "ArrowRight" ? (v.preventDefault(), K(V + Qe * $)) : v.key === "Home" ? (v.preventDefault(), y ? j(!0) : K(W.minSize)) : v.key === "End" && (v.preventDefault(), K(W.maxSize));
|
|
173
|
+
}, e[53] = W, e[54] = N, e[55] = y, e[56] = K, e[57] = p, e[58] = j, e[59] = be) : be = e[59];
|
|
174
|
+
const Le = be, _e = N ? "none" : "flex", De = `0 0 ${P}px`, Me = `${P}px`, Fe = N ? !0 : void 0;
|
|
175
|
+
let Se;
|
|
176
|
+
e[60] !== d || e[61] !== J || e[62] !== _e || e[63] !== De || e[64] !== Me || e[65] !== Fe ? (Se = /* @__PURE__ */ f(Ve, { id: J, ref: A, display: _e, h: "full", minW: "0", minH: "0", overflow: "hidden", flex: De, w: Me, "aria-hidden": Fe, children: d }), e[60] = d, e[61] = J, e[62] = _e, e[63] = De, e[64] = Me, e[65] = Fe, e[66] = Se) : Se = e[66];
|
|
177
|
+
const ye = Se;
|
|
178
|
+
let ve;
|
|
179
|
+
e[67] !== o || e[68] !== Z ? (ve = /* @__PURE__ */ f(Ve, { id: Z, ref: E, display: "flex", h: "full", minW: "0", minH: "0", overflow: "hidden", flex: "1", children: o }), e[67] = o, e[68] = Z, e[69] = ve) : ve = e[69];
|
|
180
|
+
const Re = ve;
|
|
181
|
+
let Ne;
|
|
182
|
+
e[70] !== W || e[71] !== N || e[72] !== Z || e[73] !== Le || e[74] !== Pe || e[75] !== J || e[76] !== k || e[77] !== P || e[78] !== T ? (Ne = N ? null : /* @__PURE__ */ f(Ft, { bounds: W, contentPanelId: Z, resizablePanelId: J, resizeLabel: k, resolvedPanelWidth: P, showResizeSeparator: T, onResizeKeyDown: Le, onResizeStart: Pe }), e[70] = W, e[71] = N, e[72] = Z, e[73] = Le, e[74] = Pe, e[75] = J, e[76] = k, e[77] = P, e[78] = T, e[79] = Ne) : Ne = e[79];
|
|
183
|
+
const ke = Ne;
|
|
184
|
+
let Q;
|
|
185
|
+
e[80] !== Re || e[81] !== ye || e[82] !== p || e[83] !== ke ? (Q = p === "left" ? /* @__PURE__ */ Y(Ge, { children: [
|
|
186
|
+
ye,
|
|
187
|
+
ke,
|
|
188
|
+
Re
|
|
189
|
+
] }) : /* @__PURE__ */ Y(Ge, { children: [
|
|
190
|
+
Re,
|
|
191
|
+
ke,
|
|
192
|
+
ye
|
|
193
|
+
] }), e[80] = Re, e[81] = ye, e[82] = p, e[83] = ke, e[84] = Q) : Q = e[84];
|
|
194
|
+
let Te;
|
|
195
|
+
return e[85] !== a || e[86] !== Q ? (Te = /* @__PURE__ */ f(Ve, { ref: C, direction: "row", h: "full", w: "full", overflow: "hidden", ...a, children: Q }), e[85] = a, e[86] = Q, e[87] = Te) : Te = e[87], Te;
|
|
196
|
+
};
|
|
197
|
+
function Bt() {
|
|
198
|
+
}
|
|
199
|
+
function Xt() {
|
|
200
|
+
}
|
|
201
|
+
const We = (t, e) => e.includes(t), Ut = (t, e) => Array.isArray(e) ? e.includes(t) : e === t, jt = (t) => t.isNavigable || t.navigationIntent !== void 0, dt = (t) => t.children ?? [], ct = (t) => dt(t).length > 0 || t.isContainer === !0, at = (t) => {
|
|
202
|
+
const {
|
|
203
|
+
rows: e,
|
|
204
|
+
sectionId: o,
|
|
205
|
+
nodes: n,
|
|
206
|
+
expandedNodeIds: i,
|
|
207
|
+
level: s,
|
|
208
|
+
parentNodeId: r
|
|
209
|
+
} = t;
|
|
210
|
+
for (const d of n) {
|
|
211
|
+
e.push({
|
|
212
|
+
kind: "node",
|
|
213
|
+
key: `${o}:${d.id}`,
|
|
214
|
+
sectionId: o,
|
|
215
|
+
node: d,
|
|
216
|
+
level: s,
|
|
217
|
+
parentNodeId: r
|
|
218
|
+
});
|
|
219
|
+
const a = dt(d);
|
|
220
|
+
a.length === 0 || !We(d.id, i) || at({
|
|
221
|
+
rows: e,
|
|
222
|
+
sectionId: o,
|
|
223
|
+
nodes: a,
|
|
224
|
+
expandedNodeIds: i,
|
|
225
|
+
level: s + 1,
|
|
226
|
+
parentNodeId: d.id
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}, ut = (t, e, o) => {
|
|
230
|
+
const n = [];
|
|
231
|
+
for (const i of t) {
|
|
232
|
+
const s = i.collapsible !== !1 && i.label !== void 0, r = s ? We(i.id, e) : !0;
|
|
233
|
+
if (i.label && n.push({
|
|
234
|
+
kind: "section-header",
|
|
235
|
+
key: `header:${i.id}`,
|
|
236
|
+
sectionId: i.id,
|
|
237
|
+
section: i,
|
|
238
|
+
collapsible: s,
|
|
239
|
+
expanded: r
|
|
240
|
+
}), !!r) {
|
|
241
|
+
if (i.nodes.length === 0) {
|
|
242
|
+
i.emptyState && n.push({
|
|
243
|
+
kind: "section-empty",
|
|
244
|
+
key: `empty:${i.id}`,
|
|
245
|
+
sectionId: i.id,
|
|
246
|
+
emptyState: i.emptyState
|
|
247
|
+
});
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
at({
|
|
251
|
+
rows: n,
|
|
252
|
+
sectionId: i.id,
|
|
253
|
+
nodes: i.nodes,
|
|
254
|
+
expandedNodeIds: o,
|
|
255
|
+
level: 0
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return n;
|
|
260
|
+
}, oe = (t) => t.kind === "node" ? t.node.id : t.key, ft = (t) => t.kind === "node" ? t.node.disabled !== !0 : t.kind === "section-header" && t.collapsible, Be = (t) => t.filter(ft), mt = (t, e, o) => {
|
|
261
|
+
const n = Be(o), i = new Set(n.map(oe));
|
|
262
|
+
if (t && i.has(t)) return t;
|
|
263
|
+
const r = (Array.isArray(e) ? e : e ? [e] : []).find((a) => i.has(a));
|
|
264
|
+
if (r) return r;
|
|
265
|
+
const d = n[0];
|
|
266
|
+
return d ? oe(d) : void 0;
|
|
267
|
+
}, qt = (t) => {
|
|
268
|
+
const {
|
|
269
|
+
row: e,
|
|
270
|
+
focusableRows: o,
|
|
271
|
+
currentIndex: n,
|
|
272
|
+
key: i
|
|
273
|
+
} = t;
|
|
274
|
+
if (i === "Enter" || i === " ") return {
|
|
275
|
+
type: "toggle-section",
|
|
276
|
+
sectionId: e.sectionId
|
|
277
|
+
};
|
|
278
|
+
if (i === "ArrowRight") {
|
|
279
|
+
if (!e.expanded) return {
|
|
280
|
+
type: "toggle-section",
|
|
281
|
+
sectionId: e.sectionId
|
|
282
|
+
};
|
|
283
|
+
const s = o[n + 1];
|
|
284
|
+
return s?.kind === "node" && s.sectionId === e.sectionId ? {
|
|
285
|
+
type: "focus",
|
|
286
|
+
rowId: s.node.id
|
|
287
|
+
} : null;
|
|
288
|
+
}
|
|
289
|
+
return i === "ArrowLeft" && e.expanded ? {
|
|
290
|
+
type: "toggle-section",
|
|
291
|
+
sectionId: e.sectionId
|
|
292
|
+
} : null;
|
|
293
|
+
}, Yt = (t) => {
|
|
294
|
+
const {
|
|
295
|
+
row: e,
|
|
296
|
+
focusableRows: o,
|
|
297
|
+
currentIndex: n,
|
|
298
|
+
expandedNodeIds: i,
|
|
299
|
+
key: s
|
|
300
|
+
} = t, r = We(e.node.id, i), d = ct(e.node);
|
|
301
|
+
if (s === "ArrowRight") {
|
|
302
|
+
if (!d) return null;
|
|
303
|
+
if (!r) return {
|
|
304
|
+
type: "toggle-node",
|
|
305
|
+
nodeId: e.node.id
|
|
306
|
+
};
|
|
307
|
+
const a = o[n + 1];
|
|
308
|
+
return a?.kind === "node" && a.parentNodeId === e.node.id ? {
|
|
309
|
+
type: "focus",
|
|
310
|
+
rowId: a.node.id
|
|
311
|
+
} : null;
|
|
312
|
+
}
|
|
313
|
+
if (s === "ArrowLeft") {
|
|
314
|
+
if (d && r) return {
|
|
315
|
+
type: "toggle-node",
|
|
316
|
+
nodeId: e.node.id
|
|
317
|
+
};
|
|
318
|
+
if (e.parentNodeId) return {
|
|
319
|
+
type: "focus",
|
|
320
|
+
rowId: e.parentNodeId
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
return null;
|
|
324
|
+
}, Zt = (t) => {
|
|
325
|
+
const {
|
|
326
|
+
rows: e,
|
|
327
|
+
focusedRowId: o,
|
|
328
|
+
activeNodeId: n,
|
|
329
|
+
expandedNodeIds: i,
|
|
330
|
+
key: s
|
|
331
|
+
} = t, r = Be(e);
|
|
332
|
+
if (r.length === 0) return null;
|
|
333
|
+
const d = mt(o, n, e), a = Math.max(0, r.findIndex((m) => oe(m) === d)), l = r[a];
|
|
334
|
+
if (!l) return null;
|
|
335
|
+
const g = (m) => {
|
|
336
|
+
const h = Math.min(Math.max(m, 0), r.length - 1);
|
|
337
|
+
return {
|
|
338
|
+
type: "focus",
|
|
339
|
+
rowId: oe(r[h])
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
return s === "ArrowDown" ? g(a + 1) : s === "ArrowUp" ? g(a - 1) : s === "Home" ? g(0) : s === "End" ? g(r.length - 1) : l.kind === "section-header" ? qt({
|
|
343
|
+
row: l,
|
|
344
|
+
focusableRows: r,
|
|
345
|
+
currentIndex: a,
|
|
346
|
+
key: s
|
|
347
|
+
}) : Yt({
|
|
348
|
+
row: l,
|
|
349
|
+
focusableRows: r,
|
|
350
|
+
currentIndex: a,
|
|
351
|
+
expandedNodeIds: i,
|
|
352
|
+
key: s
|
|
353
|
+
});
|
|
354
|
+
}, gt = (t) => {
|
|
355
|
+
const e = F(52), {
|
|
356
|
+
sectionId: o,
|
|
357
|
+
node: n,
|
|
358
|
+
level: i,
|
|
359
|
+
expandedNodeIds: s,
|
|
360
|
+
activeNodeId: r,
|
|
361
|
+
rowVariant: d,
|
|
362
|
+
nodeGap: a,
|
|
363
|
+
linkComponent: l,
|
|
364
|
+
tabIndex: g,
|
|
365
|
+
onFocus: m,
|
|
366
|
+
onNavigate: h,
|
|
367
|
+
onToggleNode: I
|
|
368
|
+
} = t;
|
|
369
|
+
let c;
|
|
370
|
+
e[0] !== n ? (c = ct(n), e[0] = n, e[1] = c) : c = e[1];
|
|
371
|
+
const u = c;
|
|
372
|
+
let p;
|
|
373
|
+
e[2] !== s || e[3] !== u || e[4] !== n.id ? (p = u && We(n.id, s), e[2] = s, e[3] = u, e[4] = n.id, e[5] = p) : p = e[5];
|
|
374
|
+
const b = p;
|
|
375
|
+
let w;
|
|
376
|
+
e[6] !== r || e[7] !== n.id ? (w = Ut(n.id, r), e[6] = r, e[7] = n.id, e[8] = w) : w = e[8];
|
|
377
|
+
const x = w, y = n.disabled === !0;
|
|
378
|
+
let k;
|
|
379
|
+
e[9] !== n ? (k = jt(n), e[9] = n, e[10] = k) : k = e[10];
|
|
380
|
+
const T = k, z = !!(l && n.href && T && !u && !y);
|
|
381
|
+
let C;
|
|
382
|
+
e[11] !== u || e[12] !== y || e[13] !== T || e[14] !== n || e[15] !== h || e[16] !== I || e[17] !== o ? (C = () => {
|
|
383
|
+
if (!y) {
|
|
384
|
+
if (u) {
|
|
385
|
+
I?.(n.id);
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
if (T && h) {
|
|
389
|
+
h({
|
|
390
|
+
sectionId: o,
|
|
391
|
+
nodeId: n.id,
|
|
392
|
+
node: n,
|
|
393
|
+
intent: n.navigationIntent
|
|
394
|
+
});
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
n.onActivate?.();
|
|
398
|
+
}
|
|
399
|
+
}, e[11] = u, e[12] = y, e[13] = T, e[14] = n, e[15] = h, e[16] = I, e[17] = o, e[18] = C) : C = e[18];
|
|
400
|
+
const A = C;
|
|
401
|
+
let E;
|
|
402
|
+
e[19] !== n.actions || e[20] !== n.id || e[21] !== o ? (E = n.actions?.map((L) => ({
|
|
403
|
+
...L,
|
|
404
|
+
onAction: L.onAction ? (P) => L.onAction?.({
|
|
405
|
+
sectionId: o,
|
|
406
|
+
nodeId: n.id,
|
|
407
|
+
...P
|
|
408
|
+
}) : void 0
|
|
409
|
+
})), e[19] = n.actions, e[20] = n.id, e[21] = o, e[22] = E) : E = e[22];
|
|
410
|
+
let S, R;
|
|
411
|
+
if (e[23] !== n || e[24] !== E) {
|
|
412
|
+
const L = {
|
|
413
|
+
...n,
|
|
414
|
+
actions: E
|
|
415
|
+
};
|
|
416
|
+
({
|
|
417
|
+
rowVariant: R,
|
|
418
|
+
...S
|
|
419
|
+
} = L), e[23] = n, e[24] = E, e[25] = S, e[26] = R;
|
|
420
|
+
} else
|
|
421
|
+
S = e[25], R = e[26];
|
|
422
|
+
const D = R ?? d, H = i + 1, B = u ? b : void 0;
|
|
423
|
+
let O;
|
|
424
|
+
e[27] !== n.id || e[28] !== I ? (O = () => I?.(n.id), e[27] = n.id, e[28] = I, e[29] = O) : O = e[29];
|
|
425
|
+
let U;
|
|
426
|
+
e[30] !== b || e[31] !== A || e[32] !== u || e[33] !== x || e[34] !== i || e[35] !== S || e[36] !== n.id || e[37] !== m || e[38] !== D || e[39] !== H || e[40] !== B || e[41] !== O || e[42] !== g ? (U = {
|
|
427
|
+
...S,
|
|
428
|
+
depth: i,
|
|
429
|
+
variant: D,
|
|
430
|
+
isSelected: x,
|
|
431
|
+
isExpanded: b,
|
|
432
|
+
showExpandToggle: u,
|
|
433
|
+
tabIndex: g,
|
|
434
|
+
"data-tree-list-focus-id": n.id,
|
|
435
|
+
"aria-level": H,
|
|
436
|
+
"aria-expanded": B,
|
|
437
|
+
onFocus: m,
|
|
438
|
+
onActivate: A,
|
|
439
|
+
onToggleExpand: O
|
|
440
|
+
}, e[30] = b, e[31] = A, e[32] = u, e[33] = x, e[34] = i, e[35] = S, e[36] = n.id, e[37] = m, e[38] = D, e[39] = H, e[40] = B, e[41] = O, e[42] = g, e[43] = U) : U = e[43];
|
|
441
|
+
const G = U;
|
|
442
|
+
let N;
|
|
443
|
+
e[44] !== l || e[45] !== z || e[46] !== n.href || e[47] !== G ? (N = z && l && n.href ? /* @__PURE__ */ f(l, { to: n.href, children: /* @__PURE__ */ f(Ze, { ...G, asChild: !0 }) }) : /* @__PURE__ */ f(Ze, { ...G }), e[44] = l, e[45] = z, e[46] = n.href, e[47] = G, e[48] = N) : N = e[48];
|
|
444
|
+
const W = N;
|
|
445
|
+
let _;
|
|
446
|
+
return e[49] !== a || e[50] !== W ? (_ = /* @__PURE__ */ f(le, { gap: a, w: "full", minW: "0", maxW: "full", children: W }), e[49] = a, e[50] = W, e[51] = _) : _ = e[51], _;
|
|
447
|
+
}, Jt = (t) => {
|
|
448
|
+
const e = F(9), {
|
|
449
|
+
sectionId: o,
|
|
450
|
+
actions: n
|
|
451
|
+
} = t;
|
|
452
|
+
if (n.length === 0)
|
|
453
|
+
return null;
|
|
454
|
+
let i, s;
|
|
455
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
|
|
456
|
+
opacity: "1",
|
|
457
|
+
pointerEvents: "auto"
|
|
458
|
+
}, s = {
|
|
459
|
+
opacity: "1",
|
|
460
|
+
pointerEvents: "auto"
|
|
461
|
+
}, e[0] = i, e[1] = s) : (i = e[0], s = e[1]);
|
|
462
|
+
let r;
|
|
463
|
+
if (e[2] !== n || e[3] !== o) {
|
|
464
|
+
let a;
|
|
465
|
+
e[5] !== o ? (a = (l) => l.menuItems && l.menuItems.length >= 8 ? /* @__PURE__ */ f(zt, { action: l }, l.id) : l.menuItems && l.menuItems.length > 0 ? /* @__PURE__ */ Y(ie.Root, { children: [
|
|
466
|
+
/* @__PURE__ */ f(ie.Trigger, { asChild: !0, children: /* @__PURE__ */ f(Ye, { variant: "ghost", size: "2xs", "aria-label": l.label, children: l.icon }) }),
|
|
467
|
+
/* @__PURE__ */ f(ie.Positioner, { children: /* @__PURE__ */ f(ie.Content, { minW: "160px", bg: "bg", children: l.menuItems.map(en) }) })
|
|
468
|
+
] }, l.id) : /* @__PURE__ */ f(Ye, { variant: "ghost", size: "2xs", "aria-label": l.label, onClick: (g) => {
|
|
469
|
+
g.stopPropagation(), l.onAction?.({
|
|
470
|
+
sectionId: o
|
|
471
|
+
});
|
|
472
|
+
}, children: l.icon }, l.id), e[5] = o, e[6] = a) : a = e[6], r = n.map(a), e[2] = n, e[3] = o, e[4] = r;
|
|
473
|
+
} else
|
|
474
|
+
r = e[4];
|
|
475
|
+
let d;
|
|
476
|
+
return e[7] !== r ? (d = /* @__PURE__ */ f(Ke, { gap: "0", opacity: "0", pointerEvents: "none", _groupHover: i, _groupFocusWithin: s, transition: "opacity 120ms ease", onClick: Qt, children: r }), e[7] = r, e[8] = d) : d = e[8], d;
|
|
477
|
+
}, ht = (t) => {
|
|
478
|
+
const e = F(32), {
|
|
479
|
+
section: o,
|
|
480
|
+
collapsible: n,
|
|
481
|
+
expanded: i,
|
|
482
|
+
focusId: s,
|
|
483
|
+
tabIndex: r,
|
|
484
|
+
onFocus: d,
|
|
485
|
+
onToggle: a,
|
|
486
|
+
onContextMenu: l
|
|
487
|
+
} = t, g = n ? "pointer" : "default", m = n ? r : void 0, h = n ? s : void 0, I = n ? i : void 0;
|
|
488
|
+
let c;
|
|
489
|
+
e[0] !== n ? (c = n ? {
|
|
490
|
+
bg: "bg.hover"
|
|
491
|
+
} : void 0, e[0] = n, e[1] = c) : c = e[1];
|
|
492
|
+
let u;
|
|
493
|
+
e[2] !== n ? (u = n ? {
|
|
494
|
+
bg: "bg.hover"
|
|
495
|
+
} : void 0, e[2] = n, e[3] = u) : u = e[3];
|
|
496
|
+
const p = n ? d : void 0, b = n ? a : void 0;
|
|
497
|
+
let w;
|
|
498
|
+
e[4] !== l || e[5] !== o.id ? (w = l ? (A) => {
|
|
499
|
+
A.preventDefault(), l(A, o.id);
|
|
500
|
+
} : void 0, e[4] = l, e[5] = o.id, e[6] = w) : w = e[6];
|
|
501
|
+
let x;
|
|
502
|
+
e[7] !== o.label ? (x = /* @__PURE__ */ f(Nt, { textStyle: "label/XS", textTransform: "uppercase", color: "fg.muted", letterSpacing: "0.08em", truncate: !0, children: o.label }), e[7] = o.label, e[8] = x) : x = e[8];
|
|
503
|
+
let y;
|
|
504
|
+
e[9] !== n || e[10] !== i ? (y = n ? /* @__PURE__ */ f(M, { color: "fg.muted", flexShrink: 0, children: /* @__PURE__ */ f(Et, { size: 14, style: {
|
|
505
|
+
transform: i ? "rotate(90deg)" : "rotate(0deg)",
|
|
506
|
+
transition: "120ms"
|
|
507
|
+
} }) }) : null, e[9] = n, e[10] = i, e[11] = y) : y = e[11];
|
|
508
|
+
let k;
|
|
509
|
+
e[12] !== y || e[13] !== x ? (k = /* @__PURE__ */ Y(Ke, { gap: "1", flex: "1", minW: "0", children: [
|
|
510
|
+
x,
|
|
511
|
+
y
|
|
512
|
+
] }), e[12] = y, e[13] = x, e[14] = k) : k = e[14];
|
|
513
|
+
let T;
|
|
514
|
+
e[15] !== o.actions ? (T = o.actions ?? [], e[15] = o.actions, e[16] = T) : T = e[16];
|
|
515
|
+
let z;
|
|
516
|
+
e[17] !== o.id || e[18] !== T ? (z = /* @__PURE__ */ f(Jt, { sectionId: o.id, actions: T }), e[17] = o.id, e[18] = T, e[19] = z) : z = e[19];
|
|
517
|
+
let C;
|
|
518
|
+
return e[20] !== g || e[21] !== m || e[22] !== k || e[23] !== z || e[24] !== h || e[25] !== I || e[26] !== c || e[27] !== u || e[28] !== p || e[29] !== b || e[30] !== w ? (C = /* @__PURE__ */ Y(Ke, { className: "group", justify: "space-between", align: "center", w: "full", minW: "0", maxW: "full", px: "sm", py: "2xs", height: "7", cursor: g, tabIndex: m, "data-tree-list-focus-id": h, "aria-expanded": I, _hover: c, _focusVisible: u, onFocus: p, onClick: b, onContextMenu: w, children: [
|
|
519
|
+
k,
|
|
520
|
+
z
|
|
521
|
+
] }), e[20] = g, e[21] = m, e[22] = k, e[23] = z, e[24] = h, e[25] = I, e[26] = c, e[27] = u, e[28] = p, e[29] = b, e[30] = w, e[31] = C) : C = e[31], C;
|
|
522
|
+
};
|
|
523
|
+
function Qt(t) {
|
|
524
|
+
return t.stopPropagation();
|
|
525
|
+
}
|
|
526
|
+
function en(t) {
|
|
527
|
+
return /* @__PURE__ */ f(ie.Item, { value: t.id, disabled: t.disabled, onClick: () => t.onAction?.(), children: t.label }, t.id);
|
|
528
|
+
}
|
|
529
|
+
const Xe = "section:", xt = (t) => `${Xe}${t}`, tt = (t) => t.startsWith(Xe), nt = (t) => t.slice(Xe.length), ot = (t, e, o) => {
|
|
530
|
+
const n = t.slice(), [i] = n.splice(e, 1);
|
|
531
|
+
return n.splice(o, 0, i), n;
|
|
532
|
+
}, tn = (t, e, o) => {
|
|
533
|
+
if (e === o) return null;
|
|
534
|
+
if (tt(e) && tt(o)) {
|
|
535
|
+
const n = t.map((r) => r.id), i = n.indexOf(nt(e)), s = n.indexOf(nt(o));
|
|
536
|
+
return i < 0 || s < 0 || i === s ? null : {
|
|
537
|
+
kind: "section",
|
|
538
|
+
nextSectionIds: ot(n, i, s)
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
for (const n of t) {
|
|
542
|
+
const i = n.nodes.map((d) => d.id), s = i.indexOf(e), r = i.indexOf(o);
|
|
543
|
+
if (!(s < 0 || r < 0))
|
|
544
|
+
return s === r ? null : {
|
|
545
|
+
kind: "node",
|
|
546
|
+
sectionId: n.id,
|
|
547
|
+
nextNodeIds: ot(i, s, r)
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
return null;
|
|
551
|
+
}, pt = (t) => {
|
|
552
|
+
const e = F(12);
|
|
553
|
+
let o;
|
|
554
|
+
e[0] !== t.id ? (o = {
|
|
555
|
+
id: t.id
|
|
556
|
+
}, e[0] = t.id, e[1] = o) : o = e[1];
|
|
557
|
+
const n = _t(o);
|
|
558
|
+
let i;
|
|
559
|
+
if (e[2] !== t.children || e[3] !== n.attributes || e[4] !== n.isDragging || e[5] !== n.listeners || e[6] !== n.setNodeRef || e[7] !== n.transform || e[8] !== n.transition) {
|
|
560
|
+
const r = {
|
|
561
|
+
transform: Dt.Transform.toString(n.transform),
|
|
562
|
+
transition: n.transition,
|
|
563
|
+
opacity: n.isDragging ? 0.5 : 1
|
|
564
|
+
};
|
|
565
|
+
i = t.children({
|
|
566
|
+
setNodeRef: n.setNodeRef,
|
|
567
|
+
attributes: n.attributes,
|
|
568
|
+
listeners: n.listeners,
|
|
569
|
+
style: r
|
|
570
|
+
}), e[2] = t.children, e[3] = n.attributes, e[4] = n.isDragging, e[5] = n.listeners, e[6] = n.setNodeRef, e[7] = n.transform, e[8] = n.transition, e[9] = i;
|
|
571
|
+
} else
|
|
572
|
+
i = e[9];
|
|
573
|
+
let s;
|
|
574
|
+
return e[10] !== i ? (s = /* @__PURE__ */ f(Ge, { children: i }), e[10] = i, e[11] = s) : s = e[11], s;
|
|
575
|
+
}, nn = (t) => {
|
|
576
|
+
const e = F(23), {
|
|
577
|
+
section: o,
|
|
578
|
+
sectionRows: n,
|
|
579
|
+
expandedNodeIds: i,
|
|
580
|
+
activeNodeId: s,
|
|
581
|
+
rowVariant: r,
|
|
582
|
+
nodeGap: d,
|
|
583
|
+
linkComponent: a,
|
|
584
|
+
onNavigate: l,
|
|
585
|
+
onToggleSection: g,
|
|
586
|
+
onToggleNode: m,
|
|
587
|
+
onSectionContextMenu: h
|
|
588
|
+
} = t;
|
|
589
|
+
let I;
|
|
590
|
+
e[0] !== n ? (I = n.find(rn), e[0] = n, e[1] = I) : I = e[1];
|
|
591
|
+
const c = I;
|
|
592
|
+
let u, p;
|
|
593
|
+
e[2] !== n ? (u = n.filter(ln), p = u.filter(dn).map(cn), e[2] = n, e[3] = u, e[4] = p) : (u = e[3], p = e[4]);
|
|
594
|
+
const b = p;
|
|
595
|
+
let w;
|
|
596
|
+
e[5] !== o.id ? (w = xt(o.id), e[5] = o.id, e[6] = w) : w = e[6];
|
|
597
|
+
let x;
|
|
598
|
+
e[7] !== s || e[8] !== i || e[9] !== c || e[10] !== a || e[11] !== d || e[12] !== u || e[13] !== l || e[14] !== h || e[15] !== m || e[16] !== g || e[17] !== r || e[18] !== b ? (x = (k) => {
|
|
599
|
+
const {
|
|
600
|
+
setNodeRef: T,
|
|
601
|
+
attributes: z,
|
|
602
|
+
listeners: C,
|
|
603
|
+
style: A
|
|
604
|
+
} = k;
|
|
605
|
+
return /* @__PURE__ */ Y(M, { ref: T, style: A, w: "full", minW: "0", children: [
|
|
606
|
+
c && c.kind === "section-header" ? /* @__PURE__ */ f(M, { ...z, ...C, children: /* @__PURE__ */ f(ht, { section: c.section, collapsible: c.collapsible, expanded: c.expanded, focusId: c.key, tabIndex: -1, onFocus: an, onToggle: () => g?.(c.sectionId), onContextMenu: h }) }) : null,
|
|
607
|
+
/* @__PURE__ */ f(rt, { items: b, strategy: lt, children: /* @__PURE__ */ f(le, { gap: d, w: "full", minW: "0", children: u.map((E) => E.kind === "node" ? /* @__PURE__ */ f(on, { row: E, expandedNodeIds: i, activeNodeId: s, rowVariant: r, nodeGap: d, linkComponent: a, onNavigate: l, onToggleNode: m }, E.key) : null) }) })
|
|
608
|
+
] });
|
|
609
|
+
}, e[7] = s, e[8] = i, e[9] = c, e[10] = a, e[11] = d, e[12] = u, e[13] = l, e[14] = h, e[15] = m, e[16] = g, e[17] = r, e[18] = b, e[19] = x) : x = e[19];
|
|
610
|
+
let y;
|
|
611
|
+
return e[20] !== w || e[21] !== x ? (y = /* @__PURE__ */ f(pt, { id: w, children: x }), e[20] = w, e[21] = x, e[22] = y) : y = e[22], y;
|
|
612
|
+
}, it = (t) => /* @__PURE__ */ f(gt, { sectionId: t.sectionId, node: t.node, level: t.level, expandedNodeIds: t.expandedNodeIds, activeNodeId: t.activeNodeId, rowVariant: t.rowVariant, nodeGap: t.nodeGap, linkComponent: t.linkComponent, onNavigate: t.onNavigate, onToggleNode: t.onToggleNode }), on = (t) => {
|
|
613
|
+
const e = F(12);
|
|
614
|
+
let o, n, i;
|
|
615
|
+
if (e[0] !== t) {
|
|
616
|
+
i = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
617
|
+
e:
|
|
618
|
+
if ({
|
|
619
|
+
row: n,
|
|
620
|
+
...o
|
|
621
|
+
} = t, n.level > 0) {
|
|
622
|
+
i = it({
|
|
623
|
+
node: n.node,
|
|
624
|
+
sectionId: n.sectionId,
|
|
625
|
+
level: n.level,
|
|
626
|
+
...o
|
|
627
|
+
});
|
|
628
|
+
break e;
|
|
629
|
+
}
|
|
630
|
+
e[0] = t, e[1] = o, e[2] = n, e[3] = i;
|
|
631
|
+
} else
|
|
632
|
+
o = e[1], n = e[2], i = e[3];
|
|
633
|
+
if (i !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
634
|
+
return i;
|
|
635
|
+
let s;
|
|
636
|
+
e[4] !== o || e[5] !== n.level || e[6] !== n.node || e[7] !== n.sectionId ? (s = (d) => {
|
|
637
|
+
const {
|
|
638
|
+
setNodeRef: a,
|
|
639
|
+
attributes: l,
|
|
640
|
+
listeners: g,
|
|
641
|
+
style: m
|
|
642
|
+
} = d;
|
|
643
|
+
return /* @__PURE__ */ f(M, { ref: a, style: m, w: "full", minW: "0", ...l, ...g, children: it({
|
|
644
|
+
node: n.node,
|
|
645
|
+
sectionId: n.sectionId,
|
|
646
|
+
level: n.level,
|
|
647
|
+
...o
|
|
648
|
+
}) });
|
|
649
|
+
}, e[4] = o, e[5] = n.level, e[6] = n.node, e[7] = n.sectionId, e[8] = s) : s = e[8];
|
|
650
|
+
let r;
|
|
651
|
+
return e[9] !== n.node.id || e[10] !== s ? (r = /* @__PURE__ */ f(pt, { id: n.node.id, children: s }), e[9] = n.node.id, e[10] = s, e[11] = r) : r = e[11], r;
|
|
652
|
+
}, sn = (t) => {
|
|
653
|
+
const e = F(21), {
|
|
654
|
+
sections: o,
|
|
655
|
+
expandedSectionIds: n,
|
|
656
|
+
expandedNodeIds: i,
|
|
657
|
+
activeNodeId: s,
|
|
658
|
+
rowVariant: r,
|
|
659
|
+
sectionGap: d,
|
|
660
|
+
nodeGap: a,
|
|
661
|
+
linkComponent: l,
|
|
662
|
+
onNavigate: g,
|
|
663
|
+
onToggleSection: m,
|
|
664
|
+
onToggleNode: h,
|
|
665
|
+
onSectionContextMenu: I,
|
|
666
|
+
onReorderSections: c,
|
|
667
|
+
onReorderNodes: u
|
|
668
|
+
} = t, p = n === void 0 ? [] : n, b = i === void 0 ? [] : i, w = r === void 0 ? "tree" : r, x = d === void 0 ? "0" : d, y = a === void 0 ? "0" : a;
|
|
669
|
+
let k;
|
|
670
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = {
|
|
671
|
+
activationConstraint: {
|
|
672
|
+
distance: 4
|
|
673
|
+
}
|
|
674
|
+
}, e[0] = k) : k = e[0];
|
|
675
|
+
const T = Wt(At(Pt, k));
|
|
676
|
+
let z;
|
|
677
|
+
e[1] !== u || e[2] !== c || e[3] !== o ? (z = (L) => {
|
|
678
|
+
if (!L.over)
|
|
679
|
+
return;
|
|
680
|
+
const P = tn(o, String(L.active.id), String(L.over.id));
|
|
681
|
+
P && (P.kind === "section" ? c?.(P.nextSectionIds) : u?.(P.sectionId, P.nextNodeIds));
|
|
682
|
+
}, e[1] = u, e[2] = c, e[3] = o, e[4] = z) : z = e[4];
|
|
683
|
+
const C = z, A = ut(o, p, b), E = Lt, S = rt;
|
|
684
|
+
let R;
|
|
685
|
+
e[5] !== o ? (R = o.map(un), e[5] = o, e[6] = R) : R = e[6];
|
|
686
|
+
const D = lt, H = le, B = "full", O = "0", U = "full", G = o.map((L) => /* @__PURE__ */ f(nn, { section: L, sectionRows: A.filter((P) => P.sectionId === L.id), expandedNodeIds: b, activeNodeId: s, rowVariant: w, nodeGap: y, linkComponent: l, onNavigate: g, onToggleSection: m, onToggleNode: h, onSectionContextMenu: I }, L.id));
|
|
687
|
+
let N;
|
|
688
|
+
e[7] !== H || e[8] !== x || e[9] !== G ? (N = /* @__PURE__ */ f(H, { gap: x, w: B, minW: O, maxW: U, children: G }), e[7] = H, e[8] = x, e[9] = G, e[10] = N) : N = e[10];
|
|
689
|
+
let W;
|
|
690
|
+
e[11] !== S || e[12] !== N || e[13] !== R || e[14] !== D ? (W = /* @__PURE__ */ f(S, { items: R, strategy: D, children: N }), e[11] = S, e[12] = N, e[13] = R, e[14] = D, e[15] = W) : W = e[15];
|
|
691
|
+
let _;
|
|
692
|
+
return e[16] !== E || e[17] !== C || e[18] !== T || e[19] !== W ? (_ = /* @__PURE__ */ f(E, { sensors: T, onDragEnd: C, children: W }), e[16] = E, e[17] = C, e[18] = T, e[19] = W, e[20] = _) : _ = e[20], _;
|
|
693
|
+
};
|
|
694
|
+
function rn(t) {
|
|
695
|
+
return t.kind === "section-header";
|
|
696
|
+
}
|
|
697
|
+
function ln(t) {
|
|
698
|
+
return t.kind === "node";
|
|
699
|
+
}
|
|
700
|
+
function dn(t) {
|
|
701
|
+
return t.kind === "node" && t.level === 0;
|
|
702
|
+
}
|
|
703
|
+
function cn(t) {
|
|
704
|
+
return t.kind === "node" ? t.node.id : "";
|
|
705
|
+
}
|
|
706
|
+
function an() {
|
|
707
|
+
}
|
|
708
|
+
function un(t) {
|
|
709
|
+
return xt(t.id);
|
|
710
|
+
}
|
|
711
|
+
const st = (t, e) => t ? [...t.querySelectorAll("[data-tree-list-focus-id]")].find((n) => n.dataset.treeListFocusId === e) ?? null : null, fn = (t, e) => {
|
|
712
|
+
if (!(!t || !(e instanceof HTMLElement) || !t.contains(e)))
|
|
713
|
+
return e.closest("[data-tree-list-focus-id]")?.dataset.treeListFocusId;
|
|
714
|
+
}, mn = (t) => t instanceof HTMLElement ? t.isContentEditable ? !0 : ["INPUT", "TEXTAREA", "SELECT"].includes(t.tagName) : !1, gn = (t, e) => t.findIndex((o) => ft(o) && oe(o) === e), It = (t) => {
|
|
715
|
+
const e = F(28), {
|
|
716
|
+
rows: o,
|
|
717
|
+
activeNodeId: n,
|
|
718
|
+
expandedNodeIds: i,
|
|
719
|
+
onToggleNode: s,
|
|
720
|
+
onToggleSection: r,
|
|
721
|
+
scrollToRow: d
|
|
722
|
+
} = t, a = te(null), [l, g] = re(), [m, h] = re();
|
|
723
|
+
let I;
|
|
724
|
+
e[0] !== n || e[1] !== l || e[2] !== o ? (I = mt(l, n, o), e[0] = n, e[1] = l, e[2] = o, e[3] = I) : I = e[3];
|
|
725
|
+
const c = I;
|
|
726
|
+
let u;
|
|
727
|
+
e[4] !== o ? (u = Be(o).map(oe).join("\0"), e[4] = o, e[5] = u) : u = e[5];
|
|
728
|
+
const p = u;
|
|
729
|
+
let b, w;
|
|
730
|
+
e[6] !== p || e[7] !== l ? (b = () => {
|
|
731
|
+
l && (p.split("\0").includes(l) || g(void 0));
|
|
732
|
+
}, w = [l, p], e[6] = p, e[7] = l, e[8] = b, e[9] = w) : (b = e[8], w = e[9]), ne(b, w);
|
|
733
|
+
let x, y;
|
|
734
|
+
e[10] !== m ? (x = () => {
|
|
735
|
+
if (!m)
|
|
736
|
+
return;
|
|
737
|
+
const S = requestAnimationFrame(() => {
|
|
738
|
+
requestAnimationFrame(() => {
|
|
739
|
+
const R = st(a.current, m);
|
|
740
|
+
R && (R.focus(), h(void 0));
|
|
741
|
+
});
|
|
742
|
+
});
|
|
743
|
+
return () => cancelAnimationFrame(S);
|
|
744
|
+
}, y = [m], e[10] = m, e[11] = x, e[12] = y) : (x = e[11], y = e[12]), ne(x, y);
|
|
745
|
+
let k;
|
|
746
|
+
e[13] !== o || e[14] !== d ? (k = (S) => {
|
|
747
|
+
g(S);
|
|
748
|
+
const R = st(a.current, S);
|
|
749
|
+
if (R) {
|
|
750
|
+
R.focus();
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
const D = gn(o, S);
|
|
754
|
+
D !== -1 && (d?.(D), h(S));
|
|
755
|
+
}, e[13] = o, e[14] = d, e[15] = k) : k = e[15];
|
|
756
|
+
const T = k;
|
|
757
|
+
let z;
|
|
758
|
+
e[16] !== n || e[17] !== i || e[18] !== T || e[19] !== c || e[20] !== s || e[21] !== r || e[22] !== o ? (z = (S) => {
|
|
759
|
+
if (S.altKey || S.ctrlKey || S.metaKey || S.shiftKey || mn(S.target))
|
|
760
|
+
return;
|
|
761
|
+
const R = Zt({
|
|
762
|
+
rows: o,
|
|
763
|
+
focusedRowId: fn(a.current, S.target) ?? c,
|
|
764
|
+
activeNodeId: n,
|
|
765
|
+
expandedNodeIds: i,
|
|
766
|
+
key: S.key
|
|
767
|
+
});
|
|
768
|
+
if (R) {
|
|
769
|
+
if (S.preventDefault(), R.type === "toggle-node") {
|
|
770
|
+
s?.(R.nodeId);
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
if (R.type === "toggle-section") {
|
|
774
|
+
r?.(R.sectionId);
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
T(R.rowId);
|
|
778
|
+
}
|
|
779
|
+
}, e[16] = n, e[17] = i, e[18] = T, e[19] = c, e[20] = s, e[21] = r, e[22] = o, e[23] = z) : z = e[23];
|
|
780
|
+
const C = z;
|
|
781
|
+
let A;
|
|
782
|
+
e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = (S) => g(S), e[24] = A) : A = e[24];
|
|
783
|
+
let E;
|
|
784
|
+
return e[25] !== c || e[26] !== C ? (E = {
|
|
785
|
+
focusRowId: c,
|
|
786
|
+
rootRef: a,
|
|
787
|
+
handleKeyDown: C,
|
|
788
|
+
onRowFocus: A
|
|
789
|
+
}, e[25] = c, e[26] = C, e[27] = E) : E = e[27], E;
|
|
790
|
+
}, hn = 32, xn = 4, wt = (t) => {
|
|
791
|
+
const {
|
|
792
|
+
row: e,
|
|
793
|
+
expandedNodeIds: o,
|
|
794
|
+
activeNodeId: n,
|
|
795
|
+
focusRowId: i,
|
|
796
|
+
rowVariant: s,
|
|
797
|
+
nodeGap: r,
|
|
798
|
+
linkComponent: d,
|
|
799
|
+
onRowFocus: a,
|
|
800
|
+
onNavigate: l,
|
|
801
|
+
onToggleSection: g,
|
|
802
|
+
onToggleNode: m,
|
|
803
|
+
onSectionContextMenu: h
|
|
804
|
+
} = t;
|
|
805
|
+
return e.kind === "section-header" ? /* @__PURE__ */ f(ht, { section: e.section, collapsible: e.collapsible, expanded: e.expanded, focusId: e.key, tabIndex: e.key === i ? 0 : -1, onFocus: () => a(e.key), onToggle: () => g?.(e.sectionId), onContextMenu: h }) : e.kind === "section-empty" ? e.emptyState ?? null : /* @__PURE__ */ f(gt, { sectionId: e.sectionId, node: e.node, level: e.level, expandedNodeIds: o, activeNodeId: n, rowVariant: s, nodeGap: r, linkComponent: d, tabIndex: e.node.id === i ? 0 : -1, onFocus: () => a(e.node.id), onNavigate: l, onToggleNode: m });
|
|
806
|
+
}, pn = (t) => {
|
|
807
|
+
const {
|
|
808
|
+
rows: e,
|
|
809
|
+
expandedNodeIds: o = [],
|
|
810
|
+
activeNodeId: n,
|
|
811
|
+
rowVariant: i = "tree",
|
|
812
|
+
nodeGap: s = "0",
|
|
813
|
+
linkComponent: r,
|
|
814
|
+
onNavigate: d,
|
|
815
|
+
onToggleSection: a,
|
|
816
|
+
onToggleNode: l,
|
|
817
|
+
onSectionContextMenu: g,
|
|
818
|
+
scrollRef: m
|
|
819
|
+
} = t, h = Tt({
|
|
820
|
+
count: e.length,
|
|
821
|
+
getScrollElement: () => m.current,
|
|
822
|
+
estimateSize: () => hn,
|
|
823
|
+
overscan: xn,
|
|
824
|
+
getItemKey: (c) => e[c]?.key ?? c
|
|
825
|
+
}), I = It({
|
|
826
|
+
rows: e,
|
|
827
|
+
activeNodeId: n,
|
|
828
|
+
expandedNodeIds: o,
|
|
829
|
+
onToggleNode: l,
|
|
830
|
+
onToggleSection: a,
|
|
831
|
+
scrollToRow: (c) => h.scrollToIndex(c, {
|
|
832
|
+
align: "auto"
|
|
833
|
+
})
|
|
834
|
+
});
|
|
835
|
+
return /* @__PURE__ */ f(M, { ref: I.rootRef, role: "listbox", w: "full", minW: "0", maxW: "full", position: "relative", style: {
|
|
836
|
+
height: h.getTotalSize()
|
|
837
|
+
}, onKeyDown: I.handleKeyDown, children: h.getVirtualItems().map((c) => {
|
|
838
|
+
const u = e[c.index];
|
|
839
|
+
return u ? /* @__PURE__ */ f(M, { ref: h.measureElement, "data-index": c.index, "data-tree-list-row": u.kind, position: "absolute", top: "0", left: "0", w: "full", pb: c.index === e.length - 1 ? "0" : s, style: {
|
|
840
|
+
transform: `translateY(${c.start}px)`
|
|
841
|
+
}, children: wt({
|
|
842
|
+
row: u,
|
|
843
|
+
expandedNodeIds: o,
|
|
844
|
+
activeNodeId: n,
|
|
845
|
+
focusRowId: I.focusRowId,
|
|
846
|
+
rowVariant: i,
|
|
847
|
+
nodeGap: s,
|
|
848
|
+
linkComponent: r,
|
|
849
|
+
onRowFocus: I.onRowFocus,
|
|
850
|
+
onNavigate: d,
|
|
851
|
+
onToggleSection: a,
|
|
852
|
+
onToggleNode: l,
|
|
853
|
+
onSectionContextMenu: g
|
|
854
|
+
}) }, c.key) : null;
|
|
855
|
+
}) });
|
|
856
|
+
}, In = (t) => {
|
|
857
|
+
const {
|
|
858
|
+
sections: e,
|
|
859
|
+
expandedSectionIds: o = [],
|
|
860
|
+
expandedNodeIds: n = [],
|
|
861
|
+
activeNodeId: i,
|
|
862
|
+
rowVariant: s = "tree",
|
|
863
|
+
sectionGap: r = "0",
|
|
864
|
+
nodeGap: d = "0",
|
|
865
|
+
linkComponent: a,
|
|
866
|
+
onNavigate: l,
|
|
867
|
+
onToggleSection: g,
|
|
868
|
+
onToggleNode: m,
|
|
869
|
+
onSectionContextMenu: h,
|
|
870
|
+
virtualize: I,
|
|
871
|
+
scrollRef: c
|
|
872
|
+
} = t, u = ut(e, o, n), p = It({
|
|
873
|
+
rows: u,
|
|
874
|
+
activeNodeId: i,
|
|
875
|
+
expandedNodeIds: n,
|
|
876
|
+
onToggleNode: m,
|
|
877
|
+
onToggleSection: g
|
|
878
|
+
});
|
|
879
|
+
return I && c ? /* @__PURE__ */ f(pn, { ...t, rows: u, scrollRef: c }) : /* @__PURE__ */ f(le, { ref: p.rootRef, role: "listbox", gap: r, w: "full", minW: "0", maxW: "full", overflowX: "hidden", onKeyDown: p.handleKeyDown, children: e.map((b) => {
|
|
880
|
+
const w = u.filter((x) => x.sectionId === b.id);
|
|
881
|
+
return /* @__PURE__ */ f(le, { gap: d, w: "full", minW: "0", maxW: "full", "data-testid": `tree-list-section-${b.id}`, children: w.map((x) => /* @__PURE__ */ f(M, { w: "full", minW: "0", children: wt({
|
|
882
|
+
row: x,
|
|
883
|
+
expandedNodeIds: n,
|
|
884
|
+
activeNodeId: i,
|
|
885
|
+
focusRowId: p.focusRowId,
|
|
886
|
+
rowVariant: s,
|
|
887
|
+
nodeGap: d,
|
|
888
|
+
linkComponent: a,
|
|
889
|
+
onRowFocus: p.onRowFocus,
|
|
890
|
+
onNavigate: l,
|
|
891
|
+
onToggleSection: g,
|
|
892
|
+
onToggleNode: m,
|
|
893
|
+
onSectionContextMenu: h
|
|
894
|
+
}) }, x.key)) }, b.id);
|
|
895
|
+
}) });
|
|
896
|
+
}, wn = (t) => {
|
|
897
|
+
const e = F(8), {
|
|
898
|
+
actions: o,
|
|
899
|
+
children: n
|
|
900
|
+
} = t;
|
|
901
|
+
let i;
|
|
902
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ f(M, { position: "absolute", inset: "0", zIndex: 0, "aria-hidden": !0, "data-tree-list-background": "true" }), e[0] = i) : i = e[0];
|
|
903
|
+
let s;
|
|
904
|
+
e[1] !== o ? (s = /* @__PURE__ */ f(Ct, { actions: o, closeOnSelect: !1, children: i }), e[1] = o, e[2] = s) : s = e[2];
|
|
905
|
+
let r;
|
|
906
|
+
e[3] !== n ? (r = /* @__PURE__ */ f(M, { position: "relative", zIndex: 1, w: "full", minW: "0", maxW: "full", children: n }), e[3] = n, e[4] = r) : r = e[4];
|
|
907
|
+
let d;
|
|
908
|
+
return e[5] !== s || e[6] !== r ? (d = /* @__PURE__ */ Y(M, { position: "relative", flex: "1 0 auto", minH: "full", w: "full", minW: "0", maxW: "full", children: [
|
|
909
|
+
s,
|
|
910
|
+
r
|
|
911
|
+
] }), e[5] = s, e[6] = r, e[7] = d) : d = e[7], d;
|
|
912
|
+
}, Wn = (t) => {
|
|
913
|
+
const e = F(5);
|
|
914
|
+
let o;
|
|
915
|
+
if (e[0] !== t) {
|
|
916
|
+
const s = t.draggable ? /* @__PURE__ */ f(sn, { sections: t.sections, expandedSectionIds: t.expandedSectionIds, expandedNodeIds: t.expandedNodeIds, activeNodeId: t.activeNodeId, rowVariant: t.rowVariant, sectionGap: t.sectionGap, nodeGap: t.nodeGap, linkComponent: t.linkComponent, onNavigate: t.onNavigate, onToggleSection: t.onToggleSection, onToggleNode: t.onToggleNode, onSectionContextMenu: t.onSectionContextMenu, onReorderSections: t.onReorderSections, onReorderNodes: t.onReorderNodes }) : /* @__PURE__ */ f(In, { ...t });
|
|
917
|
+
o = /* @__PURE__ */ f(M, { px: "xs", w: "full", minW: "0", maxW: "full", children: s }), e[0] = t, e[1] = o;
|
|
918
|
+
} else
|
|
919
|
+
o = e[1];
|
|
920
|
+
const n = o;
|
|
921
|
+
if (!t.backgroundContextActions || t.backgroundContextActions.length === 0)
|
|
922
|
+
return n;
|
|
923
|
+
let i;
|
|
924
|
+
return e[2] !== n || e[3] !== t.backgroundContextActions ? (i = /* @__PURE__ */ f(wn, { actions: t.backgroundContextActions, children: n }), e[2] = n, e[3] = t.backgroundContextActions, e[4] = i) : i = e[4], i;
|
|
925
|
+
};
|
|
926
|
+
export {
|
|
927
|
+
En as R,
|
|
928
|
+
Wn as T
|
|
929
|
+
};
|
|
930
|
+
//# sourceMappingURL=tree-list-CcuZMLS5.js.map
|