@upbound/monarch-blocks 0.13.3 → 0.15.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/chat-interface.js.map +1 -1
- package/dist/data-table.d.ts +2 -2
- package/dist/data-table.js +46 -20
- package/dist/data-table.js.map +1 -1
- package/dist/{empty-view-DQt8-Ho8.d.ts → empty-view-DHTvKsil.d.ts} +3 -0
- package/dist/graph.css +13 -0
- package/dist/graph.d.ts +15 -3
- package/dist/graph.js +95 -59
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +136 -68
- package/dist/index.js.map +1 -1
- package/dist/page-header.js +7 -1
- package/dist/page-header.js.map +1 -1
- package/dist/relative-time.d.ts +2 -2
- package/dist/relative-time.js +4 -4
- package/dist/relative-time.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { ChartAction, ChartConfig, ChartContainer, ChartDescription, ChartFooter
|
|
|
4
4
|
export { ChatInput, ChatInputProps, ChatInterface, ChatInterfaceProps, ChatMessage, ChatMessageBubble, ChatRoutine, ChatSession, ChatSessionList, ChatSessionListProps, ChatThread, ChatThreadProps, ChatToolCall } from './chat-interface.js';
|
|
5
5
|
export { CodeBlock, CodeBlockBody, CodeBlockCode, CodeBlockCopyButton, CodeBlockDownloadButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLanguage } from './code-block.js';
|
|
6
6
|
export { CellContextualFilter, CellContextualFilterProps, ColumnOptions, ColumnOptionsProps, ContextualMenuAction, DataTable, DataTableBody, DataTableCelFilterConfig, DataTableCell, DataTableExpandedRow, DataTableFilterVisibilityConfig, DataTableGroupRow, DataTableHeader, DataTablePagination, DataTablePaginationConfig, DataTablePaginationProps, DataTableProps, DataTableRow, DataTableRowProps, DataTableSearchConfig, DataTableSkeletonBody, DataTableValueCell, DataTableValueCellProps, ExpandButton, RowActionItem, RowActions, RowCountRelation, StickyHeaderConfig, TableHookOptions, TableLayout, TimestampCell, ViewFilter, ViewFilterProps, getActionsColumnDefinition, getExpandColumnDefinition, normalizePageSizeOptions } from './data-table.js';
|
|
7
|
-
export { D as DataTableCellInstance, a as DataTableColumnDef, b as DataTableColumnInstance, c as DataTableEmptyConfig, d as DataTableEmptyView, e as DataTableFeatures, f as DataTableHeaderGroupInstance, g as DataTableHeaderInstance, h as DataTableInstance, i as DataTableOptions, j as DataTableRowInstance, k as dataTableFeatures, l as defaultEmptyConfig, m as defaultErrorConfig, n as defaultNoFilterFoundConfig } from './empty-view-
|
|
7
|
+
export { D as DataTableCellInstance, a as DataTableColumnDef, b as DataTableColumnInstance, c as DataTableEmptyConfig, d as DataTableEmptyView, e as DataTableFeatures, f as DataTableHeaderGroupInstance, g as DataTableHeaderInstance, h as DataTableInstance, i as DataTableOptions, j as DataTableRowInstance, k as dataTableFeatures, l as defaultEmptyConfig, m as defaultErrorConfig, n as defaultNoFilterFoundConfig } from './empty-view-DHTvKsil.js';
|
|
8
8
|
export { ColumnFilter, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, ColumnSort, ColumnVisibilityState, ExpandedState, PaginationState, SortingState, createColumnHelper } from '@tanstack/react-table';
|
|
9
9
|
export { ActiveFilter, CheckboxFilterDefinition, CheckboxFilterValue, DateFilterDefinition, DateFilterValue, FilterBar, FilterBarProps, FilterChip, FilterDefinition, FilterOption, FilterType, FilterValue, MultiTextFilterDefinition, MultiTextFilterValue, RadioFilterDefinition, RadioFilterValue, TextFilterDefinition, TextFilterValue } from './filter-bar.js';
|
|
10
10
|
export { FloatingWidget, FloatingWidgetProvider, useFloatingWidget } from './floating-widget.js';
|
package/dist/index.js
CHANGED
|
@@ -2186,7 +2186,7 @@ function formatRelativeDefault(date, locale) {
|
|
|
2186
2186
|
if (hrs2 < 24) return `in ${hrs2} hour${hrs2 === 1 ? "" : "s"}`;
|
|
2187
2187
|
if (days2 < 7) return `in ${days2} day${days2 === 1 ? "" : "s"}`;
|
|
2188
2188
|
if (days2 < 30) return `in ${Math.floor(days2 / 7)} week${Math.floor(days2 / 7) === 1 ? "" : "s"}`;
|
|
2189
|
-
return
|
|
2189
|
+
return `${date.toLocaleDateString(locale, __spreadValues({
|
|
2190
2190
|
month: "short",
|
|
2191
2191
|
day: "numeric"
|
|
2192
2192
|
}, date.getFullYear() !== now.getFullYear() ? { year: "numeric" } : {}))}`;
|
|
@@ -2202,7 +2202,7 @@ function formatRelativeDefault(date, locale) {
|
|
|
2202
2202
|
if (days < 7) return `${days} days ago`;
|
|
2203
2203
|
if (days < 14) return "last week";
|
|
2204
2204
|
if (days < 30) return `${Math.floor(days / 7)} weeks ago`;
|
|
2205
|
-
return
|
|
2205
|
+
return `${date.toLocaleDateString(locale, __spreadValues({
|
|
2206
2206
|
month: "short",
|
|
2207
2207
|
day: "numeric"
|
|
2208
2208
|
}, date.getFullYear() !== now.getFullYear() ? { year: "numeric" } : {}))}`;
|
|
@@ -2220,7 +2220,7 @@ function formatRelativeCompact(date, locale) {
|
|
|
2220
2220
|
if (hrs2 < 24) return `in ${hrs2}h`;
|
|
2221
2221
|
if (days2 < 7) return `in ${days2}d`;
|
|
2222
2222
|
if (days2 < 30) return `in ${Math.floor(days2 / 7)}w`;
|
|
2223
|
-
return
|
|
2223
|
+
return `${date.toLocaleDateString(locale, __spreadValues({
|
|
2224
2224
|
month: "short",
|
|
2225
2225
|
day: "numeric"
|
|
2226
2226
|
}, date.getFullYear() !== now.getFullYear() ? { year: "numeric" } : {}))}`;
|
|
@@ -2234,7 +2234,7 @@ function formatRelativeCompact(date, locale) {
|
|
|
2234
2234
|
if (hrs < 24) return `${hrs}h ago`;
|
|
2235
2235
|
if (days < 7) return `${days}d ago`;
|
|
2236
2236
|
if (days < 30) return `${Math.floor(days / 7)}w ago`;
|
|
2237
|
-
return
|
|
2237
|
+
return `${date.toLocaleDateString(locale, __spreadValues({
|
|
2238
2238
|
month: "short",
|
|
2239
2239
|
day: "numeric"
|
|
2240
2240
|
}, date.getFullYear() !== now.getFullYear() ? { year: "numeric" } : {}))}`;
|
|
@@ -4922,6 +4922,34 @@ function ColumnActionsMenuItems({
|
|
|
4922
4922
|
] })
|
|
4923
4923
|
] });
|
|
4924
4924
|
}
|
|
4925
|
+
function HeaderTooltip({ content, children }) {
|
|
4926
|
+
if (!content) return children;
|
|
4927
|
+
return /* @__PURE__ */ jsxs13(Tooltip7, { children: [
|
|
4928
|
+
/* @__PURE__ */ jsx14(TooltipTrigger6, { asChild: true, children }),
|
|
4929
|
+
/* @__PURE__ */ jsx14(TooltipContent6, { children: content })
|
|
4930
|
+
] });
|
|
4931
|
+
}
|
|
4932
|
+
function ColumnActionsMenu({
|
|
4933
|
+
header,
|
|
4934
|
+
tooltip,
|
|
4935
|
+
onAutosizeAll,
|
|
4936
|
+
onAutosizeColumn,
|
|
4937
|
+
layout,
|
|
4938
|
+
children
|
|
4939
|
+
}) {
|
|
4940
|
+
return /* @__PURE__ */ jsxs13(DropdownMenu4, { children: [
|
|
4941
|
+
/* @__PURE__ */ jsx14(HeaderTooltip, { content: tooltip, children: /* @__PURE__ */ jsx14(DropdownMenuTrigger4, { asChild: true, children }) }),
|
|
4942
|
+
/* @__PURE__ */ jsx14(
|
|
4943
|
+
ColumnActionsMenuItems,
|
|
4944
|
+
{
|
|
4945
|
+
header,
|
|
4946
|
+
onAutosizeAll,
|
|
4947
|
+
onAutosizeColumn,
|
|
4948
|
+
layout
|
|
4949
|
+
}
|
|
4950
|
+
)
|
|
4951
|
+
] });
|
|
4952
|
+
}
|
|
4925
4953
|
function HeaderCellContent({
|
|
4926
4954
|
header,
|
|
4927
4955
|
canResize,
|
|
@@ -4933,8 +4961,10 @@ function HeaderCellContent({
|
|
|
4933
4961
|
onResetColumnSize,
|
|
4934
4962
|
layout = "auto"
|
|
4935
4963
|
}) {
|
|
4964
|
+
var _a;
|
|
4936
4965
|
const resizeHandler = header.getResizeHandler();
|
|
4937
4966
|
const headerTitle = typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "";
|
|
4967
|
+
const headerTooltip = (_a = header.column.columnDef.meta) == null ? void 0 : _a.headerTooltip;
|
|
4938
4968
|
const sorted = header.column.getIsSorted();
|
|
4939
4969
|
const labelButton = /* @__PURE__ */ jsxs13(
|
|
4940
4970
|
"button",
|
|
@@ -4960,23 +4990,19 @@ function HeaderCellContent({
|
|
|
4960
4990
|
]
|
|
4961
4991
|
}
|
|
4962
4992
|
);
|
|
4963
|
-
const label = shouldShowActionsMenu ? /* @__PURE__ */
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
] }) : labelButton;
|
|
4993
|
+
const label = shouldShowActionsMenu ? /* @__PURE__ */ jsx14(
|
|
4994
|
+
ColumnActionsMenu,
|
|
4995
|
+
{
|
|
4996
|
+
header,
|
|
4997
|
+
tooltip: headerTooltip,
|
|
4998
|
+
onAutosizeAll,
|
|
4999
|
+
onAutosizeColumn,
|
|
5000
|
+
layout,
|
|
5001
|
+
children: labelButton
|
|
5002
|
+
}
|
|
5003
|
+
) : /* @__PURE__ */ jsx14(HeaderTooltip, { content: headerTooltip, children: labelButton });
|
|
4975
5004
|
return /* @__PURE__ */ jsxs13(Fragment7, { children: [
|
|
4976
|
-
/* @__PURE__ */ jsx14("div", { className: "flex min-w-0 flex-1 items-center gap-1", children: /* @__PURE__ */ jsx14("div", { className: "min-w-0 flex-1", children: !isActionColumn && !isGroupedColumn &&
|
|
4977
|
-
/* @__PURE__ */ jsx14(TooltipTrigger6, { asChild: true, children: label }),
|
|
4978
|
-
/* @__PURE__ */ jsx14(TooltipContent6, { children: headerTitle })
|
|
4979
|
-
] }) : label) }) }),
|
|
5005
|
+
/* @__PURE__ */ jsx14("div", { className: "flex min-w-0 flex-1 items-center gap-1", children: /* @__PURE__ */ jsx14("div", { className: "min-w-0 flex-1", children: !isActionColumn && !isGroupedColumn && label }) }),
|
|
4980
5006
|
canResize && /* @__PURE__ */ jsx14(
|
|
4981
5007
|
"button",
|
|
4982
5008
|
{
|
|
@@ -6614,7 +6640,7 @@ import { useCallback as useCallback10, useState as useState13 } from "react";
|
|
|
6614
6640
|
// src/graph/graph-node.tsx
|
|
6615
6641
|
import * as React14 from "react";
|
|
6616
6642
|
import { getIncomers, getOutgoers, Handle, Position as Position2 } from "reactflow";
|
|
6617
|
-
import { Badge as Badge5, Card as Card2, Icon as Icon13,
|
|
6643
|
+
import { Badge as Badge5, Button as Button10, Card as Card2, Icon as Icon13, Tooltip as Tooltip9, TooltipContent as TooltipContent8, TooltipTrigger as TooltipTrigger8 } from "@upbound/monarch-core";
|
|
6618
6644
|
|
|
6619
6645
|
// src/graph/consts.ts
|
|
6620
6646
|
var GRAPH_NODE_WIDTH = 260;
|
|
@@ -6663,7 +6689,7 @@ function isDefaultNode(node) {
|
|
|
6663
6689
|
return node.type !== "loading";
|
|
6664
6690
|
}
|
|
6665
6691
|
function GraphNode(_a) {
|
|
6666
|
-
var _b = _a, { id, data } = _b, props = __objRest(_b, ["id", "data"]);
|
|
6692
|
+
var _b = _a, { id, data, selected } = _b, props = __objRest(_b, ["id", "data", "selected"]);
|
|
6667
6693
|
var _a2, _b2;
|
|
6668
6694
|
const { nodes: originalNodes, edges: originalEdges } = useGraphActionsContext();
|
|
6669
6695
|
const nodes = originalNodes;
|
|
@@ -6723,10 +6749,11 @@ function GraphNode(_a) {
|
|
|
6723
6749
|
Card2,
|
|
6724
6750
|
{
|
|
6725
6751
|
className: cn(
|
|
6726
|
-
"relative gap-1.5 overflow-visible rounded-
|
|
6752
|
+
"relative gap-1.5 overflow-visible rounded-xl py-0",
|
|
6727
6753
|
`flex h-[106px]! w-[260px]! flex-col pt-2.5! pb-0!`,
|
|
6728
6754
|
`hover:shadow-md motion-safe:transition-shadow`,
|
|
6729
|
-
compact && `h-[47px]
|
|
6755
|
+
compact && `h-[47px]!`,
|
|
6756
|
+
(selected || data.isHighlighted) && "ring-primary ring-2"
|
|
6730
6757
|
),
|
|
6731
6758
|
style: { height: compact ? GRAPH_NODE_COLLAPSED_HEIGHT : GRAPH_NODE_HEIGHT, width: GRAPH_NODE_WIDTH },
|
|
6732
6759
|
children: [
|
|
@@ -6744,34 +6771,32 @@ function GraphNode(_a) {
|
|
|
6744
6771
|
),
|
|
6745
6772
|
/* @__PURE__ */ jsxs18("div", { className: "flex w-full flex-1 cursor-pointer flex-col", onClick: handleClick, children: [
|
|
6746
6773
|
/* @__PURE__ */ jsxs18("div", { className: cn("flex w-full justify-between gap-1 px-2.5", compact && "flex-row-reverse items-start"), children: [
|
|
6747
|
-
!!compact && /* @__PURE__ */
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
}) }),
|
|
6763
|
-
state === "progressing" && /* @__PURE__ */ jsx21("div", { className: "flex shrink-0 flex-row items-center gap-1.5 overflow-hidden", children: /* @__PURE__ */ jsx21("div", { className: "flex size-[20px]! items-center justify-center", children: /* @__PURE__ */ jsx21(Spinner, { size: "sm" }) }) })
|
|
6764
|
-
] }),
|
|
6774
|
+
!!compact && /* @__PURE__ */ jsx21(Fragment10, { children: compactBadges.length > 0 && /* @__PURE__ */ jsx21("div", { className: "flex shrink-0 flex-row items-center gap-1.5 overflow-hidden", children: compactBadges.map((_c, index) => {
|
|
6775
|
+
var _d = _c, { tooltipContent, variant } = _d, badge = __objRest(_d, ["tooltipContent", "variant"]);
|
|
6776
|
+
return /* @__PURE__ */ jsxs18(Tooltip9, { children: [
|
|
6777
|
+
/* @__PURE__ */ jsx21(TooltipTrigger8, { children: /* @__PURE__ */ jsx21(
|
|
6778
|
+
Badge5,
|
|
6779
|
+
__spreadProps(__spreadValues({
|
|
6780
|
+
variant
|
|
6781
|
+
}, badge), {
|
|
6782
|
+
className: "flex size-[20px]! cursor-default! items-center justify-center p-0!",
|
|
6783
|
+
children: badge.children
|
|
6784
|
+
})
|
|
6785
|
+
) }),
|
|
6786
|
+
tooltipContent && /* @__PURE__ */ jsx21(TooltipContent8, { children: tooltipContent })
|
|
6787
|
+
] }, index);
|
|
6788
|
+
}) }) }),
|
|
6765
6789
|
/* @__PURE__ */ jsxs18("div", { className: "mr-auto grow-0 overflow-hidden", children: [
|
|
6766
|
-
/* @__PURE__ */ jsx21("h5", { className: "text-body-sm
|
|
6767
|
-
/* @__PURE__ */ jsx21("p", { className: "text-body-sm truncate
|
|
6768
|
-
!compact && /* @__PURE__ */ jsx21("p", { className: "text-body-sm text-muted-foreground mt-
|
|
6790
|
+
/* @__PURE__ */ jsx21("h5", { className: "text-body-sm truncate font-medium", children: data.title }),
|
|
6791
|
+
/* @__PURE__ */ jsx21("p", { className: "text-body-sm text-muted-foreground truncate", children: data.subtitle }),
|
|
6792
|
+
!compact && /* @__PURE__ */ jsx21("p", { className: "text-body-sm text-muted-foreground mt-0.5 truncate", children: data.name })
|
|
6769
6793
|
] }),
|
|
6770
6794
|
/* @__PURE__ */ jsx21(
|
|
6771
|
-
|
|
6795
|
+
Badge5,
|
|
6772
6796
|
{
|
|
6797
|
+
variant: "secondary",
|
|
6773
6798
|
className: cn(
|
|
6774
|
-
"
|
|
6799
|
+
"cursor-default!",
|
|
6775
6800
|
["progressing", "paused"].includes(state) && "opacity-30",
|
|
6776
6801
|
data.typeDescriptors.className
|
|
6777
6802
|
),
|
|
@@ -6779,16 +6804,13 @@ function GraphNode(_a) {
|
|
|
6779
6804
|
}
|
|
6780
6805
|
)
|
|
6781
6806
|
] }),
|
|
6782
|
-
!compact && /* @__PURE__ */ jsx21(Fragment10, { children:
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
}) }),
|
|
6790
|
-
state === "progressing" && /* @__PURE__ */ jsx21("div", { className: "ml-auto flex size-[20px]! items-center justify-center", children: /* @__PURE__ */ jsx21(Spinner, { size: "sm" }) })
|
|
6791
|
-
] }) })
|
|
6807
|
+
!compact && /* @__PURE__ */ jsx21(Fragment10, { children: defaultBadges.length > 0 && /* @__PURE__ */ jsx21("div", { className: "mt-auto flex h-8 items-center border-t px-2.5", children: /* @__PURE__ */ jsx21("div", { className: "flex gap-1.5 overflow-hidden overflow-x-auto", children: defaultBadges.map((_e, index) => {
|
|
6808
|
+
var _f = _e, { tooltipContent, variant } = _f, badge = __objRest(_f, ["tooltipContent", "variant"]);
|
|
6809
|
+
return /* @__PURE__ */ jsxs18(Tooltip9, { children: [
|
|
6810
|
+
/* @__PURE__ */ jsx21(TooltipTrigger8, { children: /* @__PURE__ */ jsx21(Badge5, __spreadProps(__spreadValues({ variant }, badge), { className: "cursor-default! py-px! whitespace-nowrap", children: badge.children })) }),
|
|
6811
|
+
tooltipContent && /* @__PURE__ */ jsx21(TooltipContent8, { children: tooltipContent })
|
|
6812
|
+
] }, index);
|
|
6813
|
+
}) }) }) })
|
|
6792
6814
|
] }),
|
|
6793
6815
|
!!hasOutgoingEdge && /* @__PURE__ */ jsxs18(
|
|
6794
6816
|
"div",
|
|
@@ -6815,11 +6837,13 @@ function GraphNode(_a) {
|
|
|
6815
6837
|
) }),
|
|
6816
6838
|
/* @__PURE__ */ jsxs18(Tooltip9, { children: [
|
|
6817
6839
|
/* @__PURE__ */ jsx21(TooltipTrigger8, { asChild: true, children: /* @__PURE__ */ jsx21(
|
|
6818
|
-
|
|
6840
|
+
Button10,
|
|
6819
6841
|
{
|
|
6820
6842
|
type: "button",
|
|
6843
|
+
variant: "outline",
|
|
6844
|
+
size: "icon-xs",
|
|
6821
6845
|
"aria-label": data.expanded ? "Collapse" : "Expand",
|
|
6822
|
-
className: "
|
|
6846
|
+
className: "absolute top-1/2 left-1/2 size-5 -translate-1/2 rounded-full active:not-aria-[haspopup]:-translate-1/2",
|
|
6823
6847
|
onClick: (e) => {
|
|
6824
6848
|
var _a3;
|
|
6825
6849
|
e.stopPropagation();
|
|
@@ -6855,7 +6879,7 @@ function GraphNodeSkeleton(_props) {
|
|
|
6855
6879
|
Card2,
|
|
6856
6880
|
{
|
|
6857
6881
|
className: cn(
|
|
6858
|
-
`flex h-[106px]! w-[260px]! flex-col gap-1.5 rounded-
|
|
6882
|
+
`flex h-[106px]! w-[260px]! flex-col gap-1.5 rounded-xl px-0 py-0 pt-2.5! pb-0! hover:shadow-md motion-safe:transition-shadow`,
|
|
6859
6883
|
compact && `h-[47px]!`
|
|
6860
6884
|
),
|
|
6861
6885
|
children: [
|
|
@@ -7226,7 +7250,15 @@ function useViewportFocus(nodeMap, viewportFocusNodeId) {
|
|
|
7226
7250
|
|
|
7227
7251
|
// src/graph/graph-view.tsx
|
|
7228
7252
|
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7229
|
-
var GraphViewInternal = ({
|
|
7253
|
+
var GraphViewInternal = ({
|
|
7254
|
+
nodeTypes: parentNodeTypes,
|
|
7255
|
+
edgeTypes: parentEdgeTypes,
|
|
7256
|
+
children,
|
|
7257
|
+
viewportFocusNodeId,
|
|
7258
|
+
className,
|
|
7259
|
+
hideMiniMap = false,
|
|
7260
|
+
hideControls = false
|
|
7261
|
+
}) => {
|
|
7230
7262
|
const { nodes, edges, toggleNodeExpansion } = useGraphActionsContext();
|
|
7231
7263
|
const nodeTypes = React17.useMemo(
|
|
7232
7264
|
() => __spreadValues({
|
|
@@ -7265,6 +7297,7 @@ var GraphViewInternal = ({ nodeTypes: parentNodeTypes, edgeTypes: parentEdgeType
|
|
|
7265
7297
|
return /* @__PURE__ */ jsxs19(
|
|
7266
7298
|
ReactFlow,
|
|
7267
7299
|
{
|
|
7300
|
+
className: cn("overflow-hidden rounded-xl border", className),
|
|
7268
7301
|
nodeTypes,
|
|
7269
7302
|
edgeTypes,
|
|
7270
7303
|
nodes: layoutedNodes,
|
|
@@ -7281,17 +7314,40 @@ var GraphViewInternal = ({ nodeTypes: parentNodeTypes, edgeTypes: parentEdgeType
|
|
|
7281
7314
|
panOnScroll: true,
|
|
7282
7315
|
selectionOnDrag: true,
|
|
7283
7316
|
children: [
|
|
7284
|
-
/* @__PURE__ */ jsx23(Background, { className: "bg-muted
|
|
7285
|
-
/* @__PURE__ */ jsx23(Controls, { showInteractive: false }),
|
|
7286
|
-
/* @__PURE__ */ jsx23(MiniMap, { zoomable: true, pannable: true }),
|
|
7317
|
+
/* @__PURE__ */ jsx23(Background, { className: "bg-muted/50", size: 2 }),
|
|
7318
|
+
!hideControls && /* @__PURE__ */ jsx23(Controls, { showInteractive: false }),
|
|
7319
|
+
!hideMiniMap && /* @__PURE__ */ jsx23(MiniMap, { zoomable: true, pannable: true }),
|
|
7287
7320
|
children
|
|
7288
7321
|
]
|
|
7289
7322
|
}
|
|
7290
7323
|
);
|
|
7291
7324
|
};
|
|
7292
|
-
var GraphView = React17.forwardRef(
|
|
7293
|
-
|
|
7294
|
-
|
|
7325
|
+
var GraphView = React17.forwardRef(
|
|
7326
|
+
({
|
|
7327
|
+
defaultNodes = [],
|
|
7328
|
+
defaultEdges = [],
|
|
7329
|
+
nodeTypes,
|
|
7330
|
+
edgeTypes,
|
|
7331
|
+
children,
|
|
7332
|
+
viewportFocusNodeId,
|
|
7333
|
+
className,
|
|
7334
|
+
hideMiniMap,
|
|
7335
|
+
hideControls
|
|
7336
|
+
}, ref) => {
|
|
7337
|
+
return /* @__PURE__ */ jsx23(ReactFlowProvider, { children: /* @__PURE__ */ jsx23(GraphActionsProvider, { ref, initialNodes: defaultNodes, initialEdges: defaultEdges, children: /* @__PURE__ */ jsx23(
|
|
7338
|
+
GraphViewInternal,
|
|
7339
|
+
{
|
|
7340
|
+
nodeTypes,
|
|
7341
|
+
edgeTypes,
|
|
7342
|
+
viewportFocusNodeId,
|
|
7343
|
+
className,
|
|
7344
|
+
hideMiniMap,
|
|
7345
|
+
hideControls,
|
|
7346
|
+
children
|
|
7347
|
+
}
|
|
7348
|
+
) }) });
|
|
7349
|
+
}
|
|
7350
|
+
);
|
|
7295
7351
|
GraphView.displayName = "GraphView";
|
|
7296
7352
|
|
|
7297
7353
|
// src/graph/graph.tsx
|
|
@@ -7320,6 +7376,9 @@ function Graph({
|
|
|
7320
7376
|
emptyView,
|
|
7321
7377
|
showError,
|
|
7322
7378
|
className,
|
|
7379
|
+
canvasClassName,
|
|
7380
|
+
hideMiniMap = false,
|
|
7381
|
+
hideControls = false,
|
|
7323
7382
|
loading = false,
|
|
7324
7383
|
ActionsComponent: Actions,
|
|
7325
7384
|
disableSearch = false,
|
|
@@ -7414,6 +7473,9 @@ function Graph({
|
|
|
7414
7473
|
ref: graphRef,
|
|
7415
7474
|
nodeTypes: memoizedNodeTypes,
|
|
7416
7475
|
edgeTypes: memoizedEdgeTypes,
|
|
7476
|
+
className: canvasClassName,
|
|
7477
|
+
hideMiniMap,
|
|
7478
|
+
hideControls,
|
|
7417
7479
|
children
|
|
7418
7480
|
}
|
|
7419
7481
|
)
|
|
@@ -7513,7 +7575,13 @@ function PageHeaderTitle(_a) {
|
|
|
7513
7575
|
}
|
|
7514
7576
|
function PageHeaderDescription(_a) {
|
|
7515
7577
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7516
|
-
return /* @__PURE__ */ jsx25(
|
|
7578
|
+
return /* @__PURE__ */ jsx25(
|
|
7579
|
+
"p",
|
|
7580
|
+
__spreadValues({
|
|
7581
|
+
"data-slot": "page-header-description",
|
|
7582
|
+
className: cn("text-body text-muted-foreground max-w-160", className)
|
|
7583
|
+
}, props)
|
|
7584
|
+
);
|
|
7517
7585
|
}
|
|
7518
7586
|
function PageHeaderMeta(_a) {
|
|
7519
7587
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|