@upbound/monarch-blocks 0.2.0 → 0.2.2

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
@@ -1,8 +1,8 @@
1
- export { CelFilterBar, RELATIVE_DURATION_PRESET_VALUES, allowsMultipleConditions, appendCondition, applyDisplayRules, applyOperatorChange, calendarDayStartInstant, celStringLiteral, compileCelFilterTree, computeIsEmitReady, createCelNodeId, createDefaultCondition, createEmptyCelFilterTree, dateBoundaryForOperator, denormalizeColumnIdWithReservedNames, escapeCelString, formatCalendarDateUtc, formatInstantLabel, getAllowedOperators, getColumnEmitOn, getDefaultOperator, getOperatorLabel, getQuantifierLabel, isDateRangeOperator, isDateRelativeOperator, isDateWindowOperator, isMultiTextColumn, isRealCalendarDay, isRelativeDateCelValue, isRelativeDurationPreset, mergeContextualIntoCelTree, parseCalendarDate, readDateCelValue, readMapKeyCelValue, readMultiTextCelValue, readTimeOfDay, removeConditionById, replaceCondition, resolveColumnDefinition, resolveFilterShape, validateCondition, withTimeOfDay } from './cel-filter-bar.js';
1
+ export { CelFilterBar, RELATIVE_DURATION_PRESET_VALUES, allowsMultipleConditions, appendCondition, applyDisplayRules, applyOperatorChange, calendarDayStartInstant, celStringLiteral, compileCelFilterTree, computeIsEmitReady, createCelNodeId, createDefaultCondition, createEmptyCelFilterTree, dateBoundaryForOperator, denormalizeColumnIdWithReservedNames, denormalizeColumnsWithReservedNames, escapeCelString, formatCalendarDateUtc, formatInstantLabel, getAllowedOperators, getColumnEmitOn, getDefaultOperator, getOperatorLabel, getQuantifierLabel, isDateRangeOperator, isDateRelativeOperator, isDateWindowOperator, isMultiTextColumn, isRealCalendarDay, isRelativeDateCelValue, isRelativeDurationPreset, mergeContextualIntoCelTree, parseCalendarDate, readDateCelValue, readMapKeyCelValue, readMultiTextCelValue, readTimeOfDay, removeConditionById, replaceCondition, resolveColumnDefinition, resolveFilterShape, validateCondition, withTimeOfDay } from './cel-filter-bar.js';
2
2
  export { C as CelColumnDefinition, a as CelColumnOption, b as CelConditionValue, c as CelFilterBarProps, d as CelFilterCondition, e as CelFilterGroup, f as CelFilterSchema, g as CelFilterTree, h as CelOperator, i as CelRestrictedOptionSelectPayload, j as CheckboxCelValue, k as CompileResult, D as DateCelValue, M as MapKeyCelValue, l as MultiTextCelValue, P as PillActiveSurface, R as RadioCelValue, m as RelativeDurationPreset, V as ValidationIssue, n as isCelFilterCondition, o as isCelFilterGroup, p as isCheckboxCelValue, q as isDateCelValue, r as isMapKeyCelValue, s as isMultiTextCelValue } from './types-BULiU2qC.js';
3
3
  export { ChartAction, ChartConfig, ChartContainer, ChartDescription, ChartFooter, ChartHeader, ChartLegend, ChartLegendContent, ChartStyle, ChartTitle, ChartTooltip, ChartTooltipContent } from './chart.js';
4
4
  export { ChatInput, ChatInputProps, ChatInterface, ChatInterfaceProps, ChatMessage, ChatMessageBubble, ChatRoutine, ChatSession, ChatSessionList, ChatSessionListProps, ChatThread, ChatThreadProps, ChatToolCall } from './chat-interface.js';
5
- export { CodeBlock, CodeBlockBody, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader } from './code-block.js';
5
+ export { CodeBlock, CodeBlockBody, CodeBlockCopyButton, CodeBlockDownloadButton, CodeBlockFooter, CodeBlockHeader } from './code-block.js';
6
6
  export { CellContextualFilter, CellContextualFilterProps, ColumnOptions, ColumnOptionsProps, ContextualMenuAction, DataTable, DataTableBody, DataTableCelFilterConfig, DataTableCell, DataTableEmptyConfig, DataTableEmptyView, DataTableExpandedRow, DataTableGroupRow, DataTableHeader, DataTablePagination, DataTablePaginationConfig, DataTablePaginationProps, DataTableProps, DataTableRow, DataTableRowProps, DataTableSkeletonBody, DataTableValueCell, DataTableValueCellProps, ExpandButton, RowActionItem, RowActions, RowCountRelation, StickyHeaderConfig, TableHookOptions, TableLayout, TimestampCell, ViewFilter, ViewFilterProps, defaultEmptyConfig, defaultErrorConfig, defaultNoFilterFoundConfig, getActionsColumnDefinition, getExpandColumnDefinition, normalizePageSizeOptions } from './data-table.js';
7
7
  export { ActiveFilter, CheckboxFilterDefinition, CheckboxFilterValue, DateFilterDefinition, DateFilterValue, FilterBar, FilterBarProps, FilterChip, FilterDefinition, FilterOption, FilterType, FilterValue, MultiTextFilterDefinition, MultiTextFilterValue, RadioFilterDefinition, RadioFilterValue, TextFilterDefinition, TextFilterValue } from './filter-bar.js';
8
8
  export { FloatingWidget, FloatingWidgetProvider, useFloatingWidget } from './floating-widget.js';
package/dist/index.js CHANGED
@@ -423,6 +423,10 @@ var RESERVED_COLUMN_CEL_IDENTIFIERS = {
423
423
  var CEL_IDENTIFIER_TO_COLUMN_ID = Object.fromEntries(
424
424
  Object.entries(RESERVED_COLUMN_CEL_IDENTIFIERS).map(([columnId, celIdentifier]) => [celIdentifier, columnId])
425
425
  );
426
+ var RESERVED_FIELD_OPERATOR_PATTERN = "(?=\\s*(?:in\\b|==|!=|<=|>=|<|>|\\.))";
427
+ function escapeRegExp(value) {
428
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
429
+ }
426
430
  var ENUM_OPERATORS = ["is", "is_not"];
427
431
  var TEXT_OPERATORS = [
428
432
  "is",
@@ -717,6 +721,15 @@ function denormalizeColumnIdWithReservedNames(columnId) {
717
721
  var _a;
718
722
  return (_a = CEL_IDENTIFIER_TO_COLUMN_ID[columnId]) != null ? _a : columnId;
719
723
  }
724
+ function denormalizeColumnsWithReservedNames(expression) {
725
+ return Object.entries(RESERVED_COLUMN_CEL_IDENTIFIERS).reduce(
726
+ (denormalized, [columnId, celIdentifier]) => denormalized.replace(
727
+ new RegExp(`\\b${escapeRegExp(celIdentifier)}\\b${RESERVED_FIELD_OPERATOR_PATTERN}`, "g"),
728
+ columnId
729
+ ),
730
+ expression
731
+ );
732
+ }
720
733
 
721
734
  // src/lib/cel-filter/compile/validate-condition.ts
722
735
  function statusFromIssues(issues) {
@@ -2838,7 +2851,15 @@ function ChatInterface(_a) {
2838
2851
  // src/code-block.tsx
2839
2852
  import { useState as useState5 } from "react";
2840
2853
  import { Icon as Icon3 } from "@upbound/monarch-core";
2841
- import { Card, CardContent, CardFooter, CardHeader } from "@upbound/monarch-core";
2854
+ import {
2855
+ Card,
2856
+ CardContent,
2857
+ CardFooter,
2858
+ CardHeader,
2859
+ Tooltip as Tooltip3,
2860
+ TooltipContent as TooltipContent2,
2861
+ TooltipTrigger as TooltipTrigger2
2862
+ } from "@upbound/monarch-core";
2842
2863
  import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
2843
2864
  function CodeBlock(_a) {
2844
2865
  var _b = _a, {
@@ -2886,17 +2907,22 @@ function CodeBlockBody(_a) {
2886
2907
  html,
2887
2908
  lineNumbers,
2888
2909
  maxHeight,
2889
- copyButton
2910
+ copyButton,
2911
+ downloadButton
2890
2912
  } = _b, props = __objRest(_b, [
2891
2913
  "className",
2892
2914
  "code",
2893
2915
  "html",
2894
2916
  "lineNumbers",
2895
2917
  "maxHeight",
2896
- "copyButton"
2918
+ "copyButton",
2919
+ "downloadButton"
2897
2920
  ]);
2898
2921
  return /* @__PURE__ */ jsxs4(CardContent, __spreadProps(__spreadValues({ "data-line-numbers": lineNumbers || void 0, className: cn("relative p-0!", className) }, props), { children: [
2899
- copyButton && /* @__PURE__ */ jsx6("div", { className: "absolute top-2 right-2 z-10 opacity-0 transition-opacity group-hover/code-block:opacity-100", children: copyButton }),
2922
+ (copyButton || downloadButton) && /* @__PURE__ */ jsxs4("div", { className: "absolute top-2 right-2 z-10 flex items-center gap-1 opacity-0 transition-opacity group-hover/code-block:opacity-100", children: [
2923
+ copyButton,
2924
+ downloadButton
2925
+ ] }),
2900
2926
  /* @__PURE__ */ jsx6(
2901
2927
  "div",
2902
2928
  {
@@ -2942,23 +2968,73 @@ function CodeBlockCopyButton(_a) {
2942
2968
  setCopied(true);
2943
2969
  setTimeout(() => setCopied(false), 2e3);
2944
2970
  };
2945
- return /* @__PURE__ */ jsx6(
2946
- "button",
2947
- __spreadProps(__spreadValues({
2948
- "data-slot": "code-block-copy-button",
2949
- onClick: handleCopy,
2950
- className: cn(
2951
- "border-border bg-background inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md border motion-safe:transition-colors",
2952
- "text-muted-foreground hover:bg-accent hover:text-foreground",
2953
- "focus-visible:ring-ring/30 focus-visible:ring-2 focus-visible:outline-none",
2954
- "group-data-[variant=terminal]/code-block:border-terminal-border group-data-[variant=terminal]/code-block:bg-terminal-bg group-data-[variant=terminal]/code-block:text-terminal-muted group-data-[variant=terminal]/code-block:hover:bg-terminal-muted-hover-bg group-data-[variant=terminal]/code-block:hover:text-terminal-muted-hover-fg",
2955
- className
2956
- ),
2957
- "aria-label": copied ? "Copied" : "Copy code"
2958
- }, props), {
2959
- children: copied ? /* @__PURE__ */ jsx6(Icon3, { name: "check", size: "sm", className: "text-green-500" }) : /* @__PURE__ */ jsx6(Icon3, { name: "copy", size: "sm" })
2960
- })
2961
- );
2971
+ return /* @__PURE__ */ jsxs4(Tooltip3, { children: [
2972
+ /* @__PURE__ */ jsx6(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx6(
2973
+ "button",
2974
+ __spreadProps(__spreadValues({
2975
+ "data-slot": "code-block-copy-button",
2976
+ onClick: handleCopy,
2977
+ className: cn(
2978
+ "border-border bg-background inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md border motion-safe:transition-colors",
2979
+ "text-muted-foreground hover:bg-accent hover:text-foreground",
2980
+ "focus-visible:ring-ring/30 focus-visible:ring-2 focus-visible:outline-none",
2981
+ "group-data-[variant=terminal]/code-block:border-terminal-border group-data-[variant=terminal]/code-block:bg-terminal-bg group-data-[variant=terminal]/code-block:text-terminal-muted group-data-[variant=terminal]/code-block:hover:bg-terminal-muted-hover-bg group-data-[variant=terminal]/code-block:hover:text-terminal-muted-hover-fg",
2982
+ className
2983
+ ),
2984
+ "aria-label": copied ? "Copied" : "Copy code"
2985
+ }, props), {
2986
+ children: copied ? /* @__PURE__ */ jsx6(Icon3, { name: "check", size: "sm", className: "text-green-500" }) : /* @__PURE__ */ jsx6(Icon3, { name: "copy", size: "sm" })
2987
+ })
2988
+ ) }),
2989
+ /* @__PURE__ */ jsx6(TooltipContent2, { children: copied ? "Copied" : "Copy" })
2990
+ ] });
2991
+ }
2992
+ function CodeBlockDownloadButton(_a) {
2993
+ var _b = _a, {
2994
+ code,
2995
+ fileName,
2996
+ mimeType = "text/plain",
2997
+ className
2998
+ } = _b, props = __objRest(_b, [
2999
+ "code",
3000
+ "fileName",
3001
+ "mimeType",
3002
+ "className"
3003
+ ]);
3004
+ const [downloaded, setDownloaded] = useState5(false);
3005
+ const handleDownload = () => {
3006
+ const blob = new Blob([code], { type: mimeType });
3007
+ const url = URL.createObjectURL(blob);
3008
+ const link = document.createElement("a");
3009
+ link.href = url;
3010
+ link.download = fileName;
3011
+ document.body.appendChild(link);
3012
+ link.click();
3013
+ document.body.removeChild(link);
3014
+ URL.revokeObjectURL(url);
3015
+ setDownloaded(true);
3016
+ setTimeout(() => setDownloaded(false), 2e3);
3017
+ };
3018
+ return /* @__PURE__ */ jsxs4(Tooltip3, { children: [
3019
+ /* @__PURE__ */ jsx6(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx6(
3020
+ "button",
3021
+ __spreadProps(__spreadValues({
3022
+ "data-slot": "code-block-download-button",
3023
+ onClick: handleDownload,
3024
+ className: cn(
3025
+ "border-border bg-background inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md border motion-safe:transition-colors",
3026
+ "text-muted-foreground hover:bg-accent hover:text-foreground",
3027
+ "focus-visible:ring-ring/30 focus-visible:ring-2 focus-visible:outline-none",
3028
+ "group-data-[variant=terminal]/code-block:border-terminal-border group-data-[variant=terminal]/code-block:bg-terminal-bg group-data-[variant=terminal]/code-block:text-terminal-muted group-data-[variant=terminal]/code-block:hover:bg-terminal-muted-hover-bg group-data-[variant=terminal]/code-block:hover:text-terminal-muted-hover-fg",
3029
+ className
3030
+ ),
3031
+ "aria-label": downloaded ? "Downloaded" : "Download code"
3032
+ }, props), {
3033
+ children: downloaded ? /* @__PURE__ */ jsx6(Icon3, { name: "check", size: "sm", className: "text-green-500" }) : /* @__PURE__ */ jsx6(Icon3, { name: "download", size: "sm" })
3034
+ })
3035
+ ) }),
3036
+ /* @__PURE__ */ jsx6(TooltipContent2, { children: downloaded ? "Downloaded" : "Download" })
3037
+ ] });
2962
3038
  }
2963
3039
 
2964
3040
  // src/data-table/cell-contextual-filter.tsx
@@ -3345,7 +3421,7 @@ function ColumnOptions({
3345
3421
  import { Button as Button4 } from "@upbound/monarch-core";
3346
3422
  import { DropdownMenu as DropdownMenu3, DropdownMenuContent as DropdownMenuContent3, DropdownMenuItem as DropdownMenuItem3, DropdownMenuTrigger as DropdownMenuTrigger3 } from "@upbound/monarch-core";
3347
3423
  import { Icon as Icon5 } from "@upbound/monarch-core";
3348
- import { Tooltip as Tooltip3, TooltipContent as TooltipContent2, TooltipTrigger as TooltipTrigger2 } from "@upbound/monarch-core";
3424
+ import { Tooltip as Tooltip4, TooltipContent as TooltipContent3, TooltipTrigger as TooltipTrigger3 } from "@upbound/monarch-core";
3349
3425
  import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
3350
3426
  function RowActions({
3351
3427
  align = "end",
@@ -3353,8 +3429,8 @@ function RowActions({
3353
3429
  contentClassName
3354
3430
  }) {
3355
3431
  return /* @__PURE__ */ jsxs7(DropdownMenu3, { children: [
3356
- /* @__PURE__ */ jsx9(DropdownMenuTrigger3, { asChild: true, children: /* @__PURE__ */ jsx9(Button4, { variant: "ghost", size: "icon-xs", "aria-label": "Row actions", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx9(Icon5, { name: "ellipsis", size: "sm" }) }) }),
3357
- /* @__PURE__ */ jsx9(DropdownMenuContent3, { align, className: contentClassName, children })
3432
+ /* @__PURE__ */ jsx9(DropdownMenuTrigger3, { asChild: true, children: /* @__PURE__ */ jsx9(Button4, { variant: "ghost", size: "icon-xs", "aria-label": "Row actions", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx9(Icon5, { name: "ellipsis-vertical", size: "sm" }) }) }),
3433
+ /* @__PURE__ */ jsx9(DropdownMenuContent3, { align, className: contentClassName, onClick: (event) => event.stopPropagation(), children })
3358
3434
  ] });
3359
3435
  }
3360
3436
  function RowActionItem({
@@ -3366,9 +3442,9 @@ function RowActionItem({
3366
3442
  }) {
3367
3443
  const item = /* @__PURE__ */ jsx9(DropdownMenuItem3, { disabled, className, onClick, children });
3368
3444
  if (!tooltip) return item;
3369
- return /* @__PURE__ */ jsxs7(Tooltip3, { children: [
3370
- /* @__PURE__ */ jsx9(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx9("span", { className: "block", children: item }) }),
3371
- /* @__PURE__ */ jsx9(TooltipContent2, { children: tooltip })
3445
+ return /* @__PURE__ */ jsxs7(Tooltip4, { children: [
3446
+ /* @__PURE__ */ jsx9(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx9("span", { className: "block", children: item }) }),
3447
+ /* @__PURE__ */ jsx9(TooltipContent3, { children: tooltip })
3372
3448
  ] });
3373
3449
  }
3374
3450
  function getActionsColumnDefinition({
@@ -3426,8 +3502,8 @@ function DataTableValueCell({ content, title, className, href, onClick }) {
3426
3502
  return /* @__PURE__ */ jsx9("p", { className: baseClassName, children: /* @__PURE__ */ jsx9("a", { href, title, className: "underline hover:no-underline", onClick, children: content }) });
3427
3503
  }
3428
3504
  if (title) {
3429
- return /* @__PURE__ */ jsxs7(Tooltip3, { children: [
3430
- /* @__PURE__ */ jsx9(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx9(
3505
+ return /* @__PURE__ */ jsxs7(Tooltip4, { children: [
3506
+ /* @__PURE__ */ jsx9(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx9(
3431
3507
  "button",
3432
3508
  {
3433
3509
  type: "button",
@@ -3439,7 +3515,7 @@ function DataTableValueCell({ content, title, className, href, onClick }) {
3439
3515
  children: content
3440
3516
  }
3441
3517
  ) }),
3442
- /* @__PURE__ */ jsx9(TooltipContent2, { side: "bottom", children: title })
3518
+ /* @__PURE__ */ jsx9(TooltipContent3, { side: "bottom", children: title })
3443
3519
  ] });
3444
3520
  }
3445
3521
  return /* @__PURE__ */ jsx9("p", { className: baseClassName, children: content ? /* @__PURE__ */ jsx9("span", { children: content }) : /* @__PURE__ */ jsx9("span", { children: "\u2014" }) });
@@ -3497,11 +3573,11 @@ function hasContextualFilterValue(value) {
3497
3573
  }
3498
3574
  function getDefaultContextualFilterValue(cell, filter) {
3499
3575
  const value = cell.getValue();
3500
- if (filter.type === "checkbox" || filter.type === "scrollableCheckbox" || filter.type === "multiText") {
3576
+ if (filter.type === "checkbox" || filter.type === "multiText") {
3501
3577
  const values = stringArrayFromValue(value);
3502
3578
  return values.length > 0 ? values : void 0;
3503
3579
  }
3504
- if (filter.type === "radio" || filter.type === "scrollableRadio" || filter.type === "text") {
3580
+ if (filter.type === "radio" || filter.type === "text") {
3505
3581
  return valueToString(value);
3506
3582
  }
3507
3583
  return void 0;
@@ -3521,7 +3597,7 @@ function getContextualGlobalSearch(cell) {
3521
3597
  return valueToString(globalSearchValue(cell));
3522
3598
  }
3523
3599
  function mergeColumnFilter(columnFilters, nextFilter, filterDefinition) {
3524
- const shouldMergeArrayValue = (filterDefinition == null ? void 0 : filterDefinition.type) === "checkbox" || (filterDefinition == null ? void 0 : filterDefinition.type) === "scrollableCheckbox" || (filterDefinition == null ? void 0 : filterDefinition.type) === "multiText";
3600
+ const shouldMergeArrayValue = (filterDefinition == null ? void 0 : filterDefinition.type) === "checkbox" || (filterDefinition == null ? void 0 : filterDefinition.type) === "multiText";
3525
3601
  if (!shouldMergeArrayValue) {
3526
3602
  return [...columnFilters.filter((filter) => filter.id !== nextFilter.id), nextFilter];
3527
3603
  }
@@ -3537,10 +3613,10 @@ function getColumnFilterCount(filterValue, filter) {
3537
3613
  const isCheckboxValue = (value) => value === void 0 || Array.isArray(value) && value.every((item) => typeof item === "string");
3538
3614
  const isRadioValue = (value) => value === void 0 || typeof value === "string";
3539
3615
  const isDateRangeValue = (value) => value === void 0 || typeof value === "object" && value !== null && "startDate" in value && "endDate" in value;
3540
- if ((filter == null ? void 0 : filter.type) === "checkbox" || (filter == null ? void 0 : filter.type) === "scrollableCheckbox") {
3616
+ if ((filter == null ? void 0 : filter.type) === "checkbox") {
3541
3617
  return isCheckboxValue(filterValue) ? (filterValue || []).length : 0;
3542
3618
  }
3543
- if ((filter == null ? void 0 : filter.type) === "radio" || (filter == null ? void 0 : filter.type) === "scrollableRadio") {
3619
+ if ((filter == null ? void 0 : filter.type) === "radio") {
3544
3620
  return isRadioValue(filterValue) && filterValue !== void 0 ? 1 : 0;
3545
3621
  }
3546
3622
  if ((filter == null ? void 0 : filter.type) === "dateRange") {
@@ -4125,7 +4201,7 @@ import {
4125
4201
  PaginationLink
4126
4202
  } from "@upbound/monarch-core";
4127
4203
  import { Select as Select2, SelectContent as SelectContent2, SelectGroup as SelectGroup2, SelectItem as SelectItem2, SelectTrigger as SelectTrigger2, SelectValue as SelectValue2 } from "@upbound/monarch-core";
4128
- import { Tooltip as Tooltip4, TooltipContent as TooltipContent3, TooltipTrigger as TooltipTrigger3 } from "@upbound/monarch-core";
4204
+ import { Tooltip as Tooltip5, TooltipContent as TooltipContent4, TooltipTrigger as TooltipTrigger4 } from "@upbound/monarch-core";
4129
4205
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
4130
4206
  var DEFAULT_PAGINATION_CONFIG = {
4131
4207
  summary: true,
@@ -4180,9 +4256,9 @@ function DataTablePagination({
4180
4256
  ] }),
4181
4257
  " ",
4182
4258
  "results",
4183
- !isRowCountExact && /* @__PURE__ */ jsxs9(Tooltip4, { children: [
4184
- /* @__PURE__ */ jsx11(TooltipTrigger3, { className: "ml-1 align-middle", children: /* @__PURE__ */ jsx11(Icon7, { name: "circle-info", size: "sm" }) }),
4185
- /* @__PURE__ */ jsx11(TooltipContent3, { children: "Add filters or refine your search to reduce the result set." })
4259
+ !isRowCountExact && /* @__PURE__ */ jsxs9(Tooltip5, { children: [
4260
+ /* @__PURE__ */ jsx11(TooltipTrigger4, { className: "ml-1 align-middle", children: /* @__PURE__ */ jsx11(Icon7, { name: "circle-info", size: "sm" }) }),
4261
+ /* @__PURE__ */ jsx11(TooltipContent4, { children: "Add filters or refine your search to reduce the result set." })
4186
4262
  ] })
4187
4263
  ] }) : /* @__PURE__ */ jsx11("div", {}),
4188
4264
  /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-4", children: [
@@ -4280,7 +4356,7 @@ import {
4280
4356
  TableHeader as BaseTableHeader,
4281
4357
  TableRow as BaseTableRow
4282
4358
  } from "@upbound/monarch-core";
4283
- import { Tooltip as Tooltip5, TooltipContent as TooltipContent4, TooltipTrigger as TooltipTrigger4 } from "@upbound/monarch-core";
4359
+ import { Tooltip as Tooltip6, TooltipContent as TooltipContent5, TooltipTrigger as TooltipTrigger5 } from "@upbound/monarch-core";
4284
4360
  import { Fragment as Fragment7, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
4285
4361
  var HEADER_SURFACE_BG = "bg-[color-mix(in_oklch,var(--muted)_50%,var(--card))]";
4286
4362
  var TABLE_HEAD_CLASSES = "text-body-sm text-muted-foreground h-10 px-4 text-left align-middle font-medium whitespace-nowrap has-[[role=checkbox]]:pr-0";
@@ -4456,9 +4532,9 @@ function HeaderCellContent({
4456
4532
  )
4457
4533
  ] }) : labelButton;
4458
4534
  return /* @__PURE__ */ jsxs10(Fragment7, { children: [
4459
- /* @__PURE__ */ jsx12("div", { className: "flex min-w-0 items-center gap-1", children: /* @__PURE__ */ jsx12("div", { className: "min-w-0 flex-1", children: !isActionColumn && !isGroupedColumn && (headerTitle ? /* @__PURE__ */ jsxs10(Tooltip5, { children: [
4460
- /* @__PURE__ */ jsx12(TooltipTrigger4, { asChild: true, children: label }),
4461
- /* @__PURE__ */ jsx12(TooltipContent4, { children: headerTitle })
4535
+ /* @__PURE__ */ jsx12("div", { className: "flex min-w-0 items-center gap-1", children: /* @__PURE__ */ jsx12("div", { className: "min-w-0 flex-1", children: !isActionColumn && !isGroupedColumn && (headerTitle ? /* @__PURE__ */ jsxs10(Tooltip6, { children: [
4536
+ /* @__PURE__ */ jsx12(TooltipTrigger5, { asChild: true, children: label }),
4537
+ /* @__PURE__ */ jsx12(TooltipContent5, { children: headerTitle })
4462
4538
  ] }) : label) }) }),
4463
4539
  canResize && /* @__PURE__ */ jsx12(
4464
4540
  "button",
@@ -5309,8 +5385,8 @@ function DateFilterChip({
5309
5385
 
5310
5386
  // src/lib/data-table/filter-types.ts
5311
5387
  var isDateRangeColumnFilter = (definition) => definition.type === "dateRange";
5312
- var isRadioColumnFilter = (definition) => definition.type === "radio" || definition.type === "scrollableRadio";
5313
- var isCheckboxColumnFilter = (definition) => definition.type === "checkbox" || definition.type === "scrollableCheckbox";
5388
+ var isRadioColumnFilter = (definition) => definition.type === "radio";
5389
+ var isCheckboxColumnFilter = (definition) => definition.type === "checkbox";
5314
5390
  var isMultiTextColumnFilter = (definition) => definition.type === "multiText";
5315
5391
 
5316
5392
  // src/data-table/view-filter.tsx
@@ -5319,21 +5395,21 @@ function toFilterOption(opt) {
5319
5395
  return typeof opt === "string" ? { value: opt, label: opt } : { value: opt.value, label: opt.label };
5320
5396
  }
5321
5397
  function toFilterBarDefinition(key, filter) {
5322
- var _a;
5398
+ var _a, _b, _c;
5323
5399
  const base = { key, label: filter.title, order: (_a = filter.order) != null ? _a : 0 };
5324
5400
  if (isCheckboxColumnFilter(filter)) {
5325
5401
  const options = "options" in filter && filter.options ? filter.options : [];
5326
5402
  return __spreadProps(__spreadValues({}, base), {
5327
5403
  type: "checkbox",
5328
5404
  options: options.map(toFilterOption),
5329
- searchable: filter.type === "scrollableCheckbox"
5405
+ searchable: (_b = filter.searchable) != null ? _b : true
5330
5406
  });
5331
5407
  }
5332
5408
  if (isRadioColumnFilter(filter)) {
5333
5409
  return __spreadProps(__spreadValues({}, base), {
5334
5410
  type: "radio",
5335
5411
  options: filter.options.map(toFilterOption),
5336
- searchable: filter.type === "scrollableRadio"
5412
+ searchable: (_c = filter.searchable) != null ? _c : true
5337
5413
  });
5338
5414
  }
5339
5415
  if (isDateRangeColumnFilter(filter)) {
@@ -5847,7 +5923,7 @@ import { Button as Button8 } from "@upbound/monarch-core";
5847
5923
  import { DropdownMenu as DropdownMenu6, DropdownMenuContent as DropdownMenuContent6, DropdownMenuTrigger as DropdownMenuTrigger6 } from "@upbound/monarch-core";
5848
5924
  import { Icon as Icon11 } from "@upbound/monarch-core";
5849
5925
  import { Kbd as Kbd2 } from "@upbound/monarch-core";
5850
- import { Tooltip as Tooltip6, TooltipContent as TooltipContent5, TooltipTrigger as TooltipTrigger5 } from "@upbound/monarch-core";
5926
+ import { Tooltip as Tooltip7, TooltipContent as TooltipContent6, TooltipTrigger as TooltipTrigger6 } from "@upbound/monarch-core";
5851
5927
  import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
5852
5928
  var FloatingWidgetContext = React11.createContext(null);
5853
5929
  function FloatingWidgetProvider({ children }) {
@@ -5960,8 +6036,8 @@ function FloatingWidget({ title = "Ask AI", subtitle, menuItems, children, class
5960
6036
  className
5961
6037
  ),
5962
6038
  children: [
5963
- !isCollapsed && /* @__PURE__ */ jsxs13(Tooltip6, { children: [
5964
- /* @__PURE__ */ jsx17(TooltipTrigger5, { asChild: true, children: /* @__PURE__ */ jsx17(
6039
+ !isCollapsed && /* @__PURE__ */ jsxs13(Tooltip7, { children: [
6040
+ /* @__PURE__ */ jsx17(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx17(
5965
6041
  "div",
5966
6042
  {
5967
6043
  role: "separator",
@@ -5972,22 +6048,22 @@ function FloatingWidget({ title = "Ask AI", subtitle, menuItems, children, class
5972
6048
  children: /* @__PURE__ */ jsx17("div", { className: "bg-border h-12 w-1 shrink-0 rounded-lg opacity-0 transition-opacity duration-150 group-hover:opacity-100" })
5973
6049
  }
5974
6050
  ) }),
5975
- /* @__PURE__ */ jsx17(TooltipContent5, { side: "left", children: "Resize" })
6051
+ /* @__PURE__ */ jsx17(TooltipContent6, { side: "left", children: "Resize" })
5976
6052
  ] }),
5977
6053
  /* @__PURE__ */ jsxs13("header", { className: "flex min-h-12 shrink-0 items-center gap-1 border-b px-3 py-2", children: [
5978
6054
  /* @__PURE__ */ jsxs13("div", { className: "flex min-w-0 flex-1 flex-col justify-center", children: [
5979
6055
  /* @__PURE__ */ jsx17("span", { className: "text-body truncate font-medium", children: title }),
5980
6056
  subtitle && /* @__PURE__ */ jsx17("span", { className: "text-body-sm text-muted-foreground truncate", children: subtitle })
5981
6057
  ] }),
5982
- menuItems && !isCollapsed && /* @__PURE__ */ jsxs13(Tooltip6, { children: [
6058
+ menuItems && !isCollapsed && /* @__PURE__ */ jsxs13(Tooltip7, { children: [
5983
6059
  /* @__PURE__ */ jsxs13(DropdownMenu6, { children: [
5984
- /* @__PURE__ */ jsx17(TooltipTrigger5, { asChild: true, children: /* @__PURE__ */ jsx17(DropdownMenuTrigger6, { asChild: true, children: /* @__PURE__ */ jsx17(Button8, { variant: "ghost", size: "icon-sm", "aria-label": "More options", children: /* @__PURE__ */ jsx17(Icon11, { name: "ellipsis-vertical" }) }) }) }),
6060
+ /* @__PURE__ */ jsx17(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx17(DropdownMenuTrigger6, { asChild: true, children: /* @__PURE__ */ jsx17(Button8, { variant: "ghost", size: "icon-sm", "aria-label": "More options", children: /* @__PURE__ */ jsx17(Icon11, { name: "ellipsis-vertical" }) }) }) }),
5985
6061
  /* @__PURE__ */ jsx17(DropdownMenuContent6, { align: "end", children: menuItems })
5986
6062
  ] }),
5987
- /* @__PURE__ */ jsx17(TooltipContent5, { children: "More options" })
6063
+ /* @__PURE__ */ jsx17(TooltipContent6, { children: "More options" })
5988
6064
  ] }),
5989
- !isCollapsed && /* @__PURE__ */ jsxs13(Tooltip6, { children: [
5990
- /* @__PURE__ */ jsx17(TooltipTrigger5, { asChild: true, children: /* @__PURE__ */ jsx17(
6065
+ !isCollapsed && /* @__PURE__ */ jsxs13(Tooltip7, { children: [
6066
+ /* @__PURE__ */ jsx17(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx17(
5991
6067
  Button8,
5992
6068
  {
5993
6069
  variant: "ghost",
@@ -5997,15 +6073,15 @@ function FloatingWidget({ title = "Ask AI", subtitle, menuItems, children, class
5997
6073
  children: /* @__PURE__ */ jsx17(Icon11, { name: isExpanded ? "shrink" : "arrow-up-right-and-arrow-down-left-from-center" })
5998
6074
  }
5999
6075
  ) }),
6000
- /* @__PURE__ */ jsx17(TooltipContent5, { children: isExpanded ? "Shrink widget" : "Expand widget" })
6076
+ /* @__PURE__ */ jsx17(TooltipContent6, { children: isExpanded ? "Shrink widget" : "Expand widget" })
6001
6077
  ] }),
6002
- /* @__PURE__ */ jsxs13(Tooltip6, { children: [
6003
- /* @__PURE__ */ jsx17(TooltipTrigger5, { asChild: true, children: isCollapsed ? /* @__PURE__ */ jsx17(Button8, { variant: "ghost", size: "icon-sm", onClick: restore, "aria-label": "Restore widget", children: /* @__PURE__ */ jsx17(Icon11, { name: "window-maximize" }) }) : /* @__PURE__ */ jsx17(Button8, { variant: "ghost", size: "icon-sm", onClick: collapse, "aria-label": "Minimize widget", children: /* @__PURE__ */ jsx17(Icon11, { name: "minus" }) }) }),
6004
- /* @__PURE__ */ jsx17(TooltipContent5, { children: isCollapsed ? "Restore widget" : "Minimize widget" })
6078
+ /* @__PURE__ */ jsxs13(Tooltip7, { children: [
6079
+ /* @__PURE__ */ jsx17(TooltipTrigger6, { asChild: true, children: isCollapsed ? /* @__PURE__ */ jsx17(Button8, { variant: "ghost", size: "icon-sm", onClick: restore, "aria-label": "Restore widget", children: /* @__PURE__ */ jsx17(Icon11, { name: "window-maximize" }) }) : /* @__PURE__ */ jsx17(Button8, { variant: "ghost", size: "icon-sm", onClick: collapse, "aria-label": "Minimize widget", children: /* @__PURE__ */ jsx17(Icon11, { name: "minus" }) }) }),
6080
+ /* @__PURE__ */ jsx17(TooltipContent6, { children: isCollapsed ? "Restore widget" : "Minimize widget" })
6005
6081
  ] }),
6006
- /* @__PURE__ */ jsxs13(Tooltip6, { children: [
6007
- /* @__PURE__ */ jsx17(TooltipTrigger5, { asChild: true, children: /* @__PURE__ */ jsx17(Button8, { variant: "ghost", size: "icon-sm", onClick: close, "aria-label": "Close widget", children: /* @__PURE__ */ jsx17(Icon11, { name: "xmark" }) }) }),
6008
- /* @__PURE__ */ jsxs13(TooltipContent5, { children: [
6082
+ /* @__PURE__ */ jsxs13(Tooltip7, { children: [
6083
+ /* @__PURE__ */ jsx17(TooltipTrigger6, { asChild: true, children: /* @__PURE__ */ jsx17(Button8, { variant: "ghost", size: "icon-sm", onClick: close, "aria-label": "Close widget", children: /* @__PURE__ */ jsx17(Icon11, { name: "xmark" }) }) }),
6084
+ /* @__PURE__ */ jsxs13(TooltipContent6, { children: [
6009
6085
  "Close widget",
6010
6086
  /* @__PURE__ */ jsx17(Kbd2, { children: "Esc" })
6011
6087
  ] })
@@ -6110,6 +6186,7 @@ export {
6110
6186
  CodeBlock,
6111
6187
  CodeBlockBody,
6112
6188
  CodeBlockCopyButton,
6189
+ CodeBlockDownloadButton,
6113
6190
  CodeBlockFooter,
6114
6191
  CodeBlockHeader,
6115
6192
  ColumnOptions,
@@ -6176,6 +6253,7 @@ export {
6176
6253
  defaultErrorConfig,
6177
6254
  defaultNoFilterFoundConfig,
6178
6255
  denormalizeColumnIdWithReservedNames,
6256
+ denormalizeColumnsWithReservedNames,
6179
6257
  escapeCelString,
6180
6258
  formatCalendarDateUtc,
6181
6259
  formatInstantLabel,