@upbound/monarch-blocks 0.11.0 → 0.12.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/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 DataTableEmptyConfig, a as DataTableEmptyView, d as defaultEmptyConfig, b as defaultErrorConfig, c as defaultNoFilterFoundConfig } from './empty-view-CjRwaITk.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--jBQ7evg.js';
8
8
  export { ActiveFilter, CheckboxFilterDefinition, CheckboxFilterValue, DateFilterDefinition, DateFilterValue, FilterBar, FilterBarProps, FilterChip, FilterDefinition, FilterOption, FilterType, FilterValue, MultiTextFilterDefinition, MultiTextFilterValue, RadioFilterDefinition, RadioFilterValue, TextFilterDefinition, TextFilterValue } from './filter-bar.js';
9
9
  export { FloatingWidget, FloatingWidgetProvider, useFloatingWidget } from './floating-widget.js';
10
10
  export { Edge, Node } from 'reactflow';
@@ -18,3 +18,4 @@ import 'react';
18
18
  import 'recharts';
19
19
  import '@tanstack/react-table';
20
20
  import '@upbound/monarch-core';
21
+ import '@tanstack/table-core';
package/dist/index.js CHANGED
@@ -3420,9 +3420,9 @@ function isSameColumnOrdering(left, right) {
3420
3420
  }
3421
3421
  function splitColumnOrderByPinning(fullColumnOrder, getColumnPinning2) {
3422
3422
  return {
3423
- leftPinnedColumns: fullColumnOrder.filter((columnId) => getColumnPinning2(columnId) === "left"),
3423
+ startPinnedColumns: fullColumnOrder.filter((columnId) => getColumnPinning2(columnId) === "start"),
3424
3424
  unpinnedColumns: fullColumnOrder.filter((columnId) => getColumnPinning2(columnId) === false),
3425
- rightPinnedColumns: fullColumnOrder.filter((columnId) => getColumnPinning2(columnId) === "right")
3425
+ endPinnedColumns: fullColumnOrder.filter((columnId) => getColumnPinning2(columnId) === "end")
3426
3426
  };
3427
3427
  }
3428
3428
  function mergeUnpinnedColumnOrder(fullColumnOrder, nextUnpinnedOrder, getColumnPinning2) {
@@ -3569,7 +3569,7 @@ function ColumnOptions({
3569
3569
  (columnId) => getColumnPinning(allColumnById.get(columnId)),
3570
3570
  [allColumnById]
3571
3571
  );
3572
- const { leftPinnedColumns, unpinnedColumns, rightPinnedColumns } = splitColumnOrderByPinning(
3572
+ const { startPinnedColumns, unpinnedColumns, endPinnedColumns } = splitColumnOrderByPinning(
3573
3573
  fullColumnOrder,
3574
3574
  getColumnPinningFor
3575
3575
  );
@@ -3645,9 +3645,9 @@ function ColumnOptions({
3645
3645
  var _a;
3646
3646
  return column.getIsPinned() === false && !((_a = column.columnDef.meta) == null ? void 0 : _a.pinning);
3647
3647
  }
3648
- const leftPinned = orderedColumns(leftPinnedColumns);
3648
+ const startPinned = orderedColumns(startPinnedColumns);
3649
3649
  const unpinned = orderedColumns(unpinnedColumns);
3650
- const rightPinned = orderedColumns(rightPinnedColumns);
3650
+ const endPinned = orderedColumns(endPinnedColumns);
3651
3651
  return /* @__PURE__ */ jsxs6(DropdownMenu2, { children: [
3652
3652
  /* @__PURE__ */ jsx8(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs6(Button3, { variant: "outline", className: "shrink-0", children: [
3653
3653
  /* @__PURE__ */ jsx8(Icon4, { name: "table-columns", "data-icon": "inline-start" }),
@@ -3655,7 +3655,7 @@ function ColumnOptions({
3655
3655
  /* @__PURE__ */ jsx8(Icon4, { name: "chevron-down", "data-icon": "inline-end" })
3656
3656
  ] }) }),
3657
3657
  /* @__PURE__ */ jsx8(DropdownMenuContent2, { className: "w-58 p-0", children: /* @__PURE__ */ jsxs6("div", { className: "p-1", children: [
3658
- [...leftPinned, ...unpinned].map((column) => /* @__PURE__ */ jsx8(
3658
+ [...startPinned, ...unpinned].map((column) => /* @__PURE__ */ jsx8(
3659
3659
  ColumnOptionsItem,
3660
3660
  {
3661
3661
  column,
@@ -3684,7 +3684,7 @@ function ColumnOptions({
3684
3684
  )
3685
3685
  }
3686
3686
  ),
3687
- rightPinned.map((column) => /* @__PURE__ */ jsx8(
3687
+ endPinned.map((column) => /* @__PURE__ */ jsx8(
3688
3688
  ColumnOptionsItem,
3689
3689
  {
3690
3690
  column,
@@ -3761,7 +3761,7 @@ function getActionsColumnDefinition({
3761
3761
  enableGlobalFilter: false,
3762
3762
  enableSorting: false,
3763
3763
  enableHiding: false,
3764
- meta: { pinning: "right", actions: true },
3764
+ meta: { pinning: "end", actions: true },
3765
3765
  cell
3766
3766
  };
3767
3767
  }
@@ -3795,7 +3795,7 @@ function getExpandColumnDefinition(options) {
3795
3795
  enableGlobalFilter: false,
3796
3796
  enableSorting: false,
3797
3797
  enableHiding: false,
3798
- meta: { pinning: "right", actions: true },
3798
+ meta: { pinning: "end", actions: true },
3799
3799
  cell: (_a = options == null ? void 0 : options.cell) != null ? _a : (({ row }) => /* @__PURE__ */ jsx9(ExpandButton, { row }))
3800
3800
  };
3801
3801
  }
@@ -3831,20 +3831,60 @@ function TimestampCell({ timestamp }) {
3831
3831
  // src/data-table/data-table.tsx
3832
3832
  import * as React11 from "react";
3833
3833
  import {
3834
- getCoreRowModel,
3835
- getExpandedRowModel,
3836
- getFacetedRowModel,
3837
- getFacetedUniqueValues,
3838
- getFilteredRowModel,
3839
- getGroupedRowModel,
3840
- getPaginationRowModel,
3841
- getSortedRowModel,
3842
- noop,
3843
- useReactTable
3834
+ useTable
3844
3835
  } from "@tanstack/react-table";
3845
3836
  import { Icon as Icon11 } from "@upbound/monarch-core";
3846
3837
  import { InputGroup as InputGroup4, InputGroupAddon as InputGroupAddon4, InputGroupButton as InputGroupButton2, InputGroupInput as InputGroupInput3 } from "@upbound/monarch-core";
3847
3838
 
3839
+ // src/lib/data-table/features.ts
3840
+ import {
3841
+ columnFacetingFeature,
3842
+ columnFilteringFeature,
3843
+ columnGroupingFeature,
3844
+ columnOrderingFeature,
3845
+ columnPinningFeature,
3846
+ columnResizingFeature,
3847
+ columnSizingFeature,
3848
+ columnVisibilityFeature,
3849
+ createExpandedRowModel,
3850
+ createFacetedRowModel,
3851
+ createFacetedUniqueValues,
3852
+ createFilteredRowModel,
3853
+ createGroupedRowModel,
3854
+ createPaginatedRowModel,
3855
+ createSortedRowModel,
3856
+ filterFns,
3857
+ globalFilteringFeature,
3858
+ rowExpandingFeature,
3859
+ rowPaginationFeature,
3860
+ rowSortingFeature,
3861
+ sortFns,
3862
+ tableFeatures
3863
+ } from "@tanstack/react-table";
3864
+ var dataTableFeatures = tableFeatures({
3865
+ columnFilteringFeature,
3866
+ globalFilteringFeature,
3867
+ columnFacetingFeature,
3868
+ rowSortingFeature,
3869
+ rowPaginationFeature,
3870
+ rowExpandingFeature,
3871
+ columnGroupingFeature,
3872
+ columnOrderingFeature,
3873
+ columnPinningFeature,
3874
+ columnVisibilityFeature,
3875
+ columnSizingFeature,
3876
+ columnResizingFeature,
3877
+ filteredRowModel: createFilteredRowModel(),
3878
+ facetedRowModel: createFacetedRowModel(),
3879
+ facetedUniqueValues: createFacetedUniqueValues(),
3880
+ sortedRowModel: createSortedRowModel(),
3881
+ paginatedRowModel: createPaginatedRowModel(),
3882
+ groupedRowModel: createGroupedRowModel(),
3883
+ expandedRowModel: createExpandedRowModel(),
3884
+ filterFns,
3885
+ sortFns
3886
+ });
3887
+
3848
3888
  // src/lib/data-table/contextual-filters.ts
3849
3889
  function valueToString(value) {
3850
3890
  if (value === void 0 || value === null) return void 0;
@@ -4276,7 +4316,7 @@ function useGridLayout({
4276
4316
  React6.useLayoutEffect(() => {
4277
4317
  if (gridTemplate) gridVisualColumnOrder.current = gridTemplate.visualOrder;
4278
4318
  }, [gridTemplate]);
4279
- const resizingColumn = table.getState().columnSizingInfo.isResizingColumn;
4319
+ const resizingColumn = table.state.columnResizing.isResizingColumn;
4280
4320
  React6.useLayoutEffect(() => {
4281
4321
  var _a;
4282
4322
  if (resizingColumn && !prevResizingColumn.current) {
@@ -4335,7 +4375,7 @@ function useGridLayout({
4335
4375
  const scrollEl = tableBodyScrollRef.current;
4336
4376
  if (!scrollEl) return;
4337
4377
  const observer = new ResizeObserver(() => {
4338
- if (!table.getState().columnSizingInfo.isResizingColumn) {
4378
+ if (!table.atoms.columnResizing.get().isResizingColumn) {
4339
4379
  measureContentMins();
4340
4380
  }
4341
4381
  });
@@ -4346,7 +4386,7 @@ function useGridLayout({
4346
4386
  if (!isGrid) return;
4347
4387
  const tableEl = gridRootRef.current;
4348
4388
  if (!tableEl) return;
4349
- const { isResizingColumn, deltaOffset } = table.getState().columnSizingInfo;
4389
+ const { isResizingColumn, deltaOffset } = table.atoms.columnResizing.get();
4350
4390
  if (isResizingColumn && deltaOffset != null) {
4351
4391
  const nextFr = computeGridResizeFrValues({
4352
4392
  resizingColumnId: isResizingColumn,
@@ -4363,7 +4403,7 @@ function useGridLayout({
4363
4403
  gridPersistedFr.current = resolveGridPersistedFr({
4364
4404
  visualOrder: gridVisualColumnOrder.current,
4365
4405
  persistedFr: gridPersistedFr.current,
4366
- columnSizing: table.getState().columnSizing,
4406
+ columnSizing: table.atoms.columnSizing.get(),
4367
4407
  measuredMins: gridMeasuredMins,
4368
4408
  getGridSizing: (colId) => {
4369
4409
  var _a, _b;
@@ -4507,32 +4547,18 @@ function DataTableEmptyView({
4507
4547
  }
4508
4548
 
4509
4549
  // src/data-table/filter-toggle.tsx
4510
- import { Icon as Icon7, Toggle } from "@upbound/monarch-core";
4550
+ import { Badge as Badge3, Button as Button6, Icon as Icon7 } from "@upbound/monarch-core";
4511
4551
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
4512
4552
  function FilterToggle({ pressed, onPressedChange, count }) {
4513
- return /* @__PURE__ */ jsxs9(
4514
- Toggle,
4515
- {
4516
- variant: "outline",
4517
- pressed,
4518
- onPressedChange,
4519
- "aria-label": "Toggle filters",
4520
- className: "shrink-0 gap-1.5",
4521
- children: [
4522
- /* @__PURE__ */ jsx11(Icon7, { name: "filter", "data-icon": "inline-start" }),
4523
- "Filter",
4524
- !!count && /* @__PURE__ */ jsxs9("span", { className: "tabular-nums", children: [
4525
- "(",
4526
- count,
4527
- ")"
4528
- ] })
4529
- ]
4530
- }
4531
- );
4553
+ return /* @__PURE__ */ jsxs9(Button6, { variant: "outline", onClick: () => onPressedChange(!pressed), className: "shrink-0", children: [
4554
+ /* @__PURE__ */ jsx11(Icon7, { name: "filter", "data-icon": "inline-start" }),
4555
+ pressed ? "Hide filters" : "Show filters",
4556
+ !!count && /* @__PURE__ */ jsx11(Badge3, { variant: "secondary", className: "tabular-nums", children: count })
4557
+ ] });
4532
4558
  }
4533
4559
 
4534
4560
  // src/data-table/pagination.tsx
4535
- import { Button as Button6 } from "@upbound/monarch-core";
4561
+ import { Button as Button7 } from "@upbound/monarch-core";
4536
4562
  import { Icon as Icon8 } from "@upbound/monarch-core";
4537
4563
  import { Label as Label2 } from "@upbound/monarch-core";
4538
4564
  import {
@@ -4613,7 +4639,7 @@ function DataTablePagination({
4613
4639
  ] }),
4614
4640
  pageCount > 1 && (resolved.arrows || resolved.numbers) && /* @__PURE__ */ jsx12(Pagination, { className: "mx-0 w-auto justify-end", children: /* @__PURE__ */ jsxs10(PaginationContent, { children: [
4615
4641
  resolved.arrows && /* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
4616
- Button6,
4642
+ Button7,
4617
4643
  {
4618
4644
  variant: "outline",
4619
4645
  size: "icon",
@@ -4624,7 +4650,7 @@ function DataTablePagination({
4624
4650
  }
4625
4651
  ) }),
4626
4652
  resolved.arrows && /* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
4627
- Button6,
4653
+ Button7,
4628
4654
  {
4629
4655
  variant: "outline",
4630
4656
  size: "icon",
@@ -4650,7 +4676,7 @@ function DataTablePagination({
4650
4676
  ) }, page)
4651
4677
  ),
4652
4678
  resolved.arrows && /* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
4653
- Button6,
4679
+ Button7,
4654
4680
  {
4655
4681
  variant: "outline",
4656
4682
  size: "icon",
@@ -4661,7 +4687,7 @@ function DataTablePagination({
4661
4687
  }
4662
4688
  ) }),
4663
4689
  resolved.arrows && /* @__PURE__ */ jsx12(PaginationItem, { children: /* @__PURE__ */ jsx12(
4664
- Button6,
4690
+ Button7,
4665
4691
  {
4666
4692
  variant: "outline",
4667
4693
  size: "icon",
@@ -4678,9 +4704,7 @@ function DataTablePagination({
4678
4704
 
4679
4705
  // src/data-table/table-primitives.tsx
4680
4706
  import * as React8 from "react";
4681
- import {
4682
- flexRender as flexRender2
4683
- } from "@tanstack/react-table";
4707
+ import { flexRender as flexRender2 } from "@tanstack/react-table";
4684
4708
  import { ContextMenu, ContextMenuTrigger } from "@upbound/monarch-core";
4685
4709
  import {
4686
4710
  DropdownMenu as DropdownMenu4,
@@ -4730,18 +4754,18 @@ function DataTableRoot({
4730
4754
  function getColumnPinningProps(column, surface = "body") {
4731
4755
  const isPinned = column.getIsPinned();
4732
4756
  if (!isPinned) return { className: "", style: {} };
4733
- const isLastLeft = isPinned === "left" && column.getIsLastColumn("left");
4734
- const isFirstRight = isPinned === "right" && column.getIsFirstColumn("right");
4757
+ const isLastStart = isPinned === "start" && column.getIsLastColumn("start");
4758
+ const isFirstEnd = isPinned === "end" && column.getIsFirstColumn("end");
4735
4759
  return {
4736
4760
  className: cn(
4737
4761
  "sticky",
4738
4762
  surface === "header" ? HEADER_SURFACE_BG : "bg-card",
4739
- isLastLeft && "border-r-2 border-r-border",
4740
- isFirstRight && "border-l-2 border-l-border"
4763
+ isLastStart && "border-e-2 border-e-border",
4764
+ isFirstEnd && "border-s-2 border-s-border"
4741
4765
  ),
4742
4766
  style: {
4743
- left: isPinned === "left" ? `${column.getStart("left")}px` : void 0,
4744
- right: isPinned === "right" ? `${column.getAfter("right")}px` : void 0,
4767
+ insetInlineStart: isPinned === "start" ? `${column.getStart("start")}px` : void 0,
4768
+ insetInlineEnd: isPinned === "end" ? `${column.getAfter("end")}px` : void 0,
4745
4769
  width: column.getSize()
4746
4770
  }
4747
4771
  };
@@ -4817,7 +4841,7 @@ function ColumnActionsMenuItems({
4817
4841
  canPin && (header.column.getIsPinned() ? /* @__PURE__ */ jsxs11(DropdownMenuItem4, { onClick: () => header.column.pin(false), children: [
4818
4842
  /* @__PURE__ */ jsx13(Icon9, { name: "thumbtack" }),
4819
4843
  "Unpin column"
4820
- ] }) : /* @__PURE__ */ jsxs11(DropdownMenuItem4, { onClick: () => header.column.pin("left"), children: [
4844
+ ] }) : /* @__PURE__ */ jsxs11(DropdownMenuItem4, { onClick: () => header.column.pin("start"), children: [
4821
4845
  /* @__PURE__ */ jsx13(Icon9, { name: "thumbtack" }),
4822
4846
  "Pin column"
4823
4847
  ] }))
@@ -5211,8 +5235,8 @@ import * as React10 from "react";
5211
5235
  // src/filter-bar/filter-bar.tsx
5212
5236
  import * as React9 from "react";
5213
5237
  import { Icon as Icon10 } from "@upbound/monarch-core";
5214
- import { Badge as Badge3 } from "@upbound/monarch-core";
5215
- import { Button as Button7 } from "@upbound/monarch-core";
5238
+ import { Badge as Badge4 } from "@upbound/monarch-core";
5239
+ import { Button as Button8 } from "@upbound/monarch-core";
5216
5240
  import { ButtonGroup as ButtonGroup2, ButtonGroupText as ButtonGroupText2 } from "@upbound/monarch-core";
5217
5241
  import { Calendar as Calendar2 } from "@upbound/monarch-core";
5218
5242
  import {
@@ -5335,7 +5359,7 @@ function FilterBar(_a) {
5335
5359
  if (filter) handleAddFilter(filter.key);
5336
5360
  },
5337
5361
  children: [
5338
- /* @__PURE__ */ jsxs12(ComboboxTrigger2, { "aria-label": "Add filter", showIndicator: false, render: /* @__PURE__ */ jsx14(Button7, { variant: "outline" }), children: [
5362
+ /* @__PURE__ */ jsxs12(ComboboxTrigger2, { "aria-label": "Add filter", showIndicator: false, render: /* @__PURE__ */ jsx14(Button8, { variant: "outline" }), children: [
5339
5363
  /* @__PURE__ */ jsx14(Icon10, { name: "plus", "data-icon": "inline-start" }),
5340
5364
  "Add filter"
5341
5365
  ] }),
@@ -5432,7 +5456,7 @@ function FilterChip({ definition, value, autoOpen, container, onChangeValue, onR
5432
5456
  }
5433
5457
  }
5434
5458
  function FilterChipRemoveButton({ label, onRemove }) {
5435
- return /* @__PURE__ */ jsx14(Button7, { variant: "outline", size: "icon", "aria-label": `Remove ${label} filter`, onClick: onRemove, children: /* @__PURE__ */ jsx14(Icon10, { name: "xmark" }) });
5459
+ return /* @__PURE__ */ jsx14(Button8, { variant: "outline", size: "icon", "aria-label": `Remove ${label} filter`, onClick: onRemove, children: /* @__PURE__ */ jsx14(Icon10, { name: "xmark" }) });
5436
5460
  }
5437
5461
  function CheckboxFilterChip({
5438
5462
  definition,
@@ -5466,7 +5490,7 @@ function CheckboxFilterChip({
5466
5490
  /* @__PURE__ */ jsx14(
5467
5491
  ComboboxTrigger2,
5468
5492
  {
5469
- render: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
5493
+ render: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
5470
5494
  children: /* @__PURE__ */ jsx14("span", { className: values.length === 0 ? "text-muted-foreground" : "", children: displayLabel })
5471
5495
  }
5472
5496
  ),
@@ -5500,7 +5524,7 @@ function CheckboxFilterChip({
5500
5524
  ]
5501
5525
  }
5502
5526
  ) : /* @__PURE__ */ jsxs12(DropdownMenu5, { defaultOpen: autoOpen, children: [
5503
- /* @__PURE__ */ jsx14(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs12(Button7, { variant: "outline", className: "gap-1 font-normal", children: [
5527
+ /* @__PURE__ */ jsx14(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs12(Button8, { variant: "outline", className: "gap-1 font-normal", children: [
5504
5528
  /* @__PURE__ */ jsx14("span", { className: values.length === 0 ? "text-muted-foreground" : "", children: displayLabel }),
5505
5529
  /* @__PURE__ */ jsx14(Icon10, { name: "chevron-down", size: "sm", className: "text-muted-foreground" })
5506
5530
  ] }) }),
@@ -5551,7 +5575,7 @@ function RadioFilterChip({
5551
5575
  /* @__PURE__ */ jsx14(
5552
5576
  ComboboxTrigger2,
5553
5577
  {
5554
- render: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
5578
+ render: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal [&>svg:last-child]:size-(--icon-sm)" }),
5555
5579
  children: /* @__PURE__ */ jsx14("span", { className: selectedValue ? "" : "text-muted-foreground", children: displayLabel })
5556
5580
  }
5557
5581
  ),
@@ -5578,7 +5602,7 @@ function RadioFilterChip({
5578
5602
  ]
5579
5603
  }
5580
5604
  ) : /* @__PURE__ */ jsxs12(DropdownMenu5, { defaultOpen: autoOpen, children: [
5581
- /* @__PURE__ */ jsx14(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs12(Button7, { variant: "outline", className: "gap-1 font-normal", children: [
5605
+ /* @__PURE__ */ jsx14(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs12(Button8, { variant: "outline", className: "gap-1 font-normal", children: [
5582
5606
  /* @__PURE__ */ jsx14("span", { className: selectedValue ? "" : "text-muted-foreground", children: displayLabel }),
5583
5607
  /* @__PURE__ */ jsx14(Icon10, { name: "chevron-down", size: "sm", className: "text-muted-foreground" })
5584
5608
  ] }) }),
@@ -5603,7 +5627,7 @@ function TextFilterChip({
5603
5627
  return /* @__PURE__ */ jsxs12(ButtonGroup2, { children: [
5604
5628
  /* @__PURE__ */ jsx14(ButtonGroupText2, { children: label }),
5605
5629
  /* @__PURE__ */ jsxs12(Popover2, { open, onOpenChange: setOpen, children: [
5606
- /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: text ? "" : "text-muted-foreground", children: text || "Any" }) }) }),
5630
+ /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: text ? "" : "text-muted-foreground", children: text || "Any" }) }) }),
5607
5631
  /* @__PURE__ */ jsx14(PopoverContent2, { align: "start", children: /* @__PURE__ */ jsx14(
5608
5632
  Input2,
5609
5633
  {
@@ -5646,9 +5670,9 @@ function MultiTextFilterChip({
5646
5670
  return /* @__PURE__ */ jsxs12(ButtonGroup2, { children: [
5647
5671
  /* @__PURE__ */ jsx14(ButtonGroupText2, { children: label }),
5648
5672
  /* @__PURE__ */ jsxs12(Popover2, { defaultOpen: autoOpen, children: [
5649
- /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: tokens.length === 0 ? "text-muted-foreground" : "", children: displayLabel }) }) }),
5673
+ /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: tokens.length === 0 ? "text-muted-foreground" : "", children: displayLabel }) }) }),
5650
5674
  /* @__PURE__ */ jsx14(PopoverContent2, { align: "start", children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-2", children: [
5651
- tokens.length > 0 && /* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-1", children: tokens.map((token) => /* @__PURE__ */ jsxs12(Badge3, { variant: "secondary", className: "gap-1", children: [
5675
+ tokens.length > 0 && /* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-1", children: tokens.map((token) => /* @__PURE__ */ jsxs12(Badge4, { variant: "secondary", className: "gap-1", children: [
5652
5676
  token,
5653
5677
  /* @__PURE__ */ jsx14(
5654
5678
  "button",
@@ -5713,7 +5737,7 @@ function DateFilterChip({
5713
5737
  return /* @__PURE__ */ jsxs12(ButtonGroup2, { children: [
5714
5738
  /* @__PURE__ */ jsx14(ButtonGroupText2, { children: label }),
5715
5739
  /* @__PURE__ */ jsxs12(Popover2, { defaultOpen: autoOpen, children: [
5716
- /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button7, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: startDate ? "" : "text-muted-foreground", children: displayLabel }) }) }),
5740
+ /* @__PURE__ */ jsx14(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx14(Button8, { variant: "outline", className: "gap-1 font-normal", children: /* @__PURE__ */ jsx14("span", { className: startDate ? "" : "text-muted-foreground", children: displayLabel }) }) }),
5717
5741
  /* @__PURE__ */ jsx14(PopoverContent2, { align: "start", className: "w-fit", children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-2", children: [
5718
5742
  /* @__PURE__ */ jsx14(
5719
5743
  Calendar2,
@@ -5913,6 +5937,8 @@ function SectionHeaderTabs(_a) {
5913
5937
  // src/data-table/data-table.tsx
5914
5938
  import { Fragment as Fragment9, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
5915
5939
  var DEFAULT_PAGE_SIZE = 20;
5940
+ var noop = () => {
5941
+ };
5916
5942
  var STICKY_HEADER_MAX_HEIGHT_CLASS = "max-h-[calc(100svh-250px)]";
5917
5943
  function DataTable({
5918
5944
  id,
@@ -5976,7 +6002,7 @@ function DataTable({
5976
6002
  const [innerColumnOrdering, setInnerColumnOrdering] = React11.useState([]);
5977
6003
  const [innerColumnFilters, setInnerColumnFilters] = React11.useState([]);
5978
6004
  const [innerSorting, setInnerSorting] = React11.useState(((_a = config.state) == null ? void 0 : _a.sorting) || []);
5979
- const [innerColumnPinning, setInnerColumnPinning] = React11.useState({ left: [], right: [] });
6005
+ const [innerColumnPinning, setInnerColumnPinning] = React11.useState({ start: [], end: [] });
5980
6006
  const [innerPagination, setInnerPagination] = React11.useState({
5981
6007
  pageIndex: ((_c = (_b = config.state) == null ? void 0 : _b.pagination) == null ? void 0 : _c.pageIndex) || 0,
5982
6008
  pageSize: ((_e = (_d = config.state) == null ? void 0 : _d.pagination) == null ? void 0 : _e.pageSize) || DEFAULT_PAGE_SIZE
@@ -6049,18 +6075,18 @@ function DataTable({
6049
6075
  const hasExternalSearch = parentGlobalFilter !== void 0;
6050
6076
  const hasExternalFilters = parentColumnFilters !== void 0;
6051
6077
  const shouldDisableFiltersModels = !!disableFilters && !!disableSearch && !hasExternalSearch && !hasExternalFilters;
6052
- const table = useReactTable(__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, config), {
6053
- getCoreRowModel: getCoreRowModel(),
6054
- getSortedRowModel: !disableSorting ? getSortedRowModel() : void 0,
6055
- getPaginationRowModel: !shouldDisablePagination ? getPaginationRowModel() : void 0,
6056
- getFilteredRowModel: !shouldDisableFiltersModels ? getFilteredRowModel() : void 0,
6057
- getFacetedRowModel: !shouldDisableFiltersModels ? getFacetedRowModel() : void 0,
6058
- getFacetedUniqueValues: !shouldDisableFiltersModels ? getFacetedUniqueValues() : void 0
6059
- }), !!renderExpandedRow && { getRowCanExpand: () => true }), hasExpansion && { paginateExpandedRows: false }), {
6060
- getGroupedRowModel: hasGrouping ? getGroupedRowModel() : void 0,
6078
+ const table = useTable(__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, config), {
6079
+ features: dataTableFeatures,
6080
+ // Row models are registered statically in `dataTableFeatures`, so a disabled stage is switched
6081
+ // off with its `manual*` option (the stage then passes rows through untouched).
6082
+ manualSorting: serverSidePagination || disableSorting,
6083
+ manualFiltering: serverSidePagination || shouldDisableFiltersModels,
6084
+ manualPagination: serverSidePagination || shouldDisablePagination,
6061
6085
  // Only grouping and `getSubRows` put extra rows in the row model; `renderExpandedRow`
6062
6086
  // content renders outside it (see `DataTableBody`).
6063
- getExpandedRowModel: hasGrouping || hasSubRows ? getExpandedRowModel() : void 0,
6087
+ manualGrouping: !hasGrouping,
6088
+ manualExpanding: !hasGrouping && !hasSubRows
6089
+ }), !!renderExpandedRow && { getRowCanExpand: () => true }), hasExpansion && { paginateExpandedRows: false }), {
6064
6090
  groupedColumnMode: hasGrouping ? "reorder" : void 0,
6065
6091
  enableFilters: !shouldDisableFiltersModels,
6066
6092
  enableGlobalFilter: !shouldDisableFiltersModels,
@@ -6082,13 +6108,10 @@ function DataTable({
6082
6108
  columnOrder: disableColumnReordering ? [] : columnOrdering,
6083
6109
  columnVisibility: disableColumnVisibility ? {} : columnVisibility,
6084
6110
  columnSizing: disableColumnResizing ? {} : columnSizing,
6085
- columnPinning: disableColumnPinning ? { left: [], right: [] } : columnPinning
6111
+ columnPinning: disableColumnPinning ? { start: [], end: [] } : columnPinning
6086
6112
  }, hasExpansion && { expanded }), {
6087
6113
  grouping
6088
6114
  }), hasGrouping && { expanded: true }),
6089
- manualSorting: serverSidePagination,
6090
- manualFiltering: serverSidePagination,
6091
- manualPagination: serverSidePagination,
6092
6115
  onSortingChange: disableSorting ? noop : setSorting,
6093
6116
  onColumnFiltersChange: shouldDisableFiltersModels ? noop : setColumnFilters,
6094
6117
  onGlobalFilterChange: shouldDisableFiltersModels ? noop : setGlobalFilter,
@@ -6154,7 +6177,7 @@ function DataTable({
6154
6177
  const displayableIds = new Set(displayableColumns.map((c) => c.id));
6155
6178
  return firstGroup.headers.filter((h) => displayableIds.has(h.column.id)).reduce((sum, h) => sum + h.column.getSize(), 0);
6156
6179
  }, [isGrid, headerGroups, displayableColumns]);
6157
- const filterCount = celFilterConfig ? celFilterConfig.activeFilterCount : table.getState().columnFilters.map(
6180
+ const filterCount = celFilterConfig ? celFilterConfig.activeFilterCount : table.state.columnFilters.map(
6158
6181
  ({ id: columnFilterId, value }) => {
6159
6182
  var _a2, _b2;
6160
6183
  return getColumnFilterCount(value, (_b2 = (_a2 = table.getColumn(columnFilterId)) == null ? void 0 : _a2.columnDef.meta) == null ? void 0 : _b2.filter);
@@ -6346,7 +6369,7 @@ function DataTable({
6346
6369
 
6347
6370
  // src/floating-widget.tsx
6348
6371
  import * as React12 from "react";
6349
- import { Button as Button8 } from "@upbound/monarch-core";
6372
+ import { Button as Button9 } from "@upbound/monarch-core";
6350
6373
  import { DropdownMenu as DropdownMenu6, DropdownMenuContent as DropdownMenuContent6, DropdownMenuTrigger as DropdownMenuTrigger6 } from "@upbound/monarch-core";
6351
6374
  import { Icon as Icon12 } from "@upbound/monarch-core";
6352
6375
  import { Kbd as Kbd2 } from "@upbound/monarch-core";
@@ -6484,14 +6507,14 @@ function FloatingWidget({ title = "Ask AI", subtitle, menuItems, children, class
6484
6507
  ] }),
6485
6508
  menuItems && !isCollapsed && /* @__PURE__ */ jsxs14(Tooltip7, { children: [
6486
6509
  /* @__PURE__ */ jsxs14(DropdownMenu6, { children: [
6487
- /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(DropdownMenuTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(Button8, { variant: "ghost", size: "icon-sm", "aria-label": "More options", children: /* @__PURE__ */ jsx18(Icon12, { name: "ellipsis-vertical" }) }) }) }),
6510
+ /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(DropdownMenuTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(Button9, { variant: "ghost", size: "icon-sm", "aria-label": "More options", children: /* @__PURE__ */ jsx18(Icon12, { name: "ellipsis-vertical" }) }) }) }),
6488
6511
  /* @__PURE__ */ jsx18(DropdownMenuContent6, { align: "end", children: menuItems })
6489
6512
  ] }),
6490
6513
  /* @__PURE__ */ jsx18(TooltipContent6, { children: "More options" })
6491
6514
  ] }),
6492
6515
  !isCollapsed && /* @__PURE__ */ jsxs14(Tooltip7, { children: [
6493
6516
  /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(
6494
- Button8,
6517
+ Button9,
6495
6518
  {
6496
6519
  variant: "ghost",
6497
6520
  size: "icon-sm",
@@ -6503,11 +6526,11 @@ function FloatingWidget({ title = "Ask AI", subtitle, menuItems, children, class
6503
6526
  /* @__PURE__ */ jsx18(TooltipContent6, { children: isExpanded ? "Shrink widget" : "Expand widget" })
6504
6527
  ] }),
6505
6528
  /* @__PURE__ */ jsxs14(Tooltip7, { children: [
6506
- /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: isCollapsed ? /* @__PURE__ */ jsx18(Button8, { variant: "ghost", size: "icon-sm", onClick: restore, "aria-label": "Restore widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "window-maximize" }) }) : /* @__PURE__ */ jsx18(Button8, { variant: "ghost", size: "icon-sm", onClick: collapse, "aria-label": "Minimize widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "minus" }) }) }),
6529
+ /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: isCollapsed ? /* @__PURE__ */ jsx18(Button9, { variant: "ghost", size: "icon-sm", onClick: restore, "aria-label": "Restore widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "window-maximize" }) }) : /* @__PURE__ */ jsx18(Button9, { variant: "ghost", size: "icon-sm", onClick: collapse, "aria-label": "Minimize widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "minus" }) }) }),
6507
6530
  /* @__PURE__ */ jsx18(TooltipContent6, { children: isCollapsed ? "Restore widget" : "Minimize widget" })
6508
6531
  ] }),
6509
6532
  /* @__PURE__ */ jsxs14(Tooltip7, { children: [
6510
- /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(Button8, { variant: "ghost", size: "icon-sm", onClick: close, "aria-label": "Close widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "xmark" }) }) }),
6533
+ /* @__PURE__ */ jsx18(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx18(Button9, { variant: "ghost", size: "icon-sm", onClick: close, "aria-label": "Close widget", children: /* @__PURE__ */ jsx18(Icon12, { name: "xmark" }) }) }),
6511
6534
  /* @__PURE__ */ jsxs14(TooltipContent6, { children: [
6512
6535
  "Close widget",
6513
6536
  /* @__PURE__ */ jsx18(Kbd2, { children: "Esc" })
@@ -6540,7 +6563,7 @@ import { useCallback as useCallback10, useState as useState12 } from "react";
6540
6563
  // src/graph/graph-node.tsx
6541
6564
  import * as React13 from "react";
6542
6565
  import { getIncomers, getOutgoers, Handle, Position as Position2 } from "reactflow";
6543
- import { Badge as Badge4, Card as Card2, Icon as Icon13, Spinner, Tooltip as Tooltip8, TooltipContent as TooltipContent7, TooltipTrigger as TooltipTrigger7 } from "@upbound/monarch-core";
6566
+ import { Badge as Badge5, Card as Card2, Icon as Icon13, Spinner, Tooltip as Tooltip8, TooltipContent as TooltipContent7, TooltipTrigger as TooltipTrigger7 } from "@upbound/monarch-core";
6544
6567
 
6545
6568
  // src/graph/consts.ts
6546
6569
  var GRAPH_NODE_WIDTH = 260;
@@ -6675,7 +6698,7 @@ function GraphNode(_a) {
6675
6698
  var _d = _c, { tooltipContent, variant } = _d, badge = __objRest(_d, ["tooltipContent", "variant"]);
6676
6699
  return /* @__PURE__ */ jsxs16(Tooltip8, { children: [
6677
6700
  /* @__PURE__ */ jsx20(TooltipTrigger7, { children: /* @__PURE__ */ jsx20(
6678
- Badge4,
6701
+ Badge5,
6679
6702
  __spreadProps(__spreadValues({
6680
6703
  variant
6681
6704
  }, badge), {
@@ -6709,7 +6732,7 @@ function GraphNode(_a) {
6709
6732
  /* @__PURE__ */ jsx20("div", { className: "flex gap-1.5 overflow-hidden overflow-x-auto", children: defaultBadges.map((_e, index) => {
6710
6733
  var _f = _e, { tooltipContent, variant } = _f, badge = __objRest(_f, ["tooltipContent", "variant"]);
6711
6734
  return /* @__PURE__ */ jsxs16(Tooltip8, { children: [
6712
- /* @__PURE__ */ jsx20(TooltipTrigger7, { children: /* @__PURE__ */ jsx20(Badge4, __spreadProps(__spreadValues({ variant }, badge), { className: "cursor-default! py-px! whitespace-nowrap", children: badge.children })) }),
6735
+ /* @__PURE__ */ jsx20(TooltipTrigger7, { children: /* @__PURE__ */ jsx20(Badge5, __spreadProps(__spreadValues({ variant }, badge), { className: "cursor-default! py-px! whitespace-nowrap", children: badge.children })) }),
6713
6736
  tooltipContent && /* @__PURE__ */ jsx20(TooltipContent7, { children: tooltipContent })
6714
6737
  ] }, index);
6715
6738
  }) }),
@@ -6914,13 +6937,7 @@ GraphActionsProvider.displayName = "GraphActionsProvider";
6914
6937
 
6915
6938
  // src/graph/graph.tsx
6916
6939
  import * as React17 from "react";
6917
- import {
6918
- getCoreRowModel as getCoreRowModel2,
6919
- getFacetedRowModel as getFacetedRowModel2,
6920
- getFacetedUniqueValues as getFacetedUniqueValues2,
6921
- getFilteredRowModel as getFilteredRowModel2,
6922
- useReactTable as useReactTable2
6923
- } from "@tanstack/react-table";
6940
+ import { useTable as useTable2 } from "@tanstack/react-table";
6924
6941
  import { Icon as Icon14, InputGroup as InputGroup5, InputGroupAddon as InputGroupAddon5, InputGroupInput as InputGroupInput4 } from "@upbound/monarch-core";
6925
6942
 
6926
6943
  // src/graph/graph-view.tsx
@@ -7276,13 +7293,10 @@ function Graph({
7276
7293
  }, [parentGlobalFilter]);
7277
7294
  const columnFilters = parentColumnFilters != null ? parentColumnFilters : innerColumnFilters;
7278
7295
  const setColumnFilters = parentSetColumnFilters != null ? parentSetColumnFilters : setInnerColumnFilters;
7279
- const table = useReactTable2({
7296
+ const table = useTable2({
7297
+ features: dataTableFeatures,
7280
7298
  data: config.data,
7281
7299
  columns: columnDefinitions,
7282
- getCoreRowModel: getCoreRowModel2(),
7283
- getFilteredRowModel: getFilteredRowModel2(),
7284
- getFacetedRowModel: getFacetedRowModel2(),
7285
- getFacetedUniqueValues: getFacetedUniqueValues2(),
7286
7300
  state: { columnFilters, globalFilter },
7287
7301
  onColumnFiltersChange: setColumnFilters,
7288
7302
  onGlobalFilterChange: setGlobalFilter,
@@ -7606,6 +7620,7 @@ export {
7606
7620
  createCelNodeId,
7607
7621
  createDefaultCondition,
7608
7622
  createEmptyCelFilterTree,
7623
+ dataTableFeatures,
7609
7624
  dateBoundaryForOperator,
7610
7625
  defaultEmptyConfig,
7611
7626
  defaultErrorConfig,