@reopt-ai/opt-ui 1.8.0 → 1.10.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/COMPONENT_CATALOG.md +222 -34
- package/README.md +70 -6
- package/dist/core/index.cjs +170 -155
- package/dist/core/index.d.cts +3 -2
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +3 -3
- package/dist/docs/02-components/01-core.md +223 -18
- package/dist/docs/02-components/02-visuals.md +1 -1
- package/dist/docs/02-components/03-shells.md +17 -16
- package/dist/docs/02-components/04-surfaces.md +1 -1
- package/dist/docs/02-components/index.md +4 -4
- package/dist/{field-sidebar-Bqfp6dgg.cjs → field-sidebar-B6Ndr8HE.cjs} +304 -289
- package/dist/{field-sidebar-BYD_UIjG.js → field-sidebar-BXjvV7Cz.js} +25 -10
- package/dist/{field-sidebar-BYD_UIjG.js.map → field-sidebar-BXjvV7Cz.js.map} +1 -1
- package/dist/{field-sidebar-5KYVlpSs.d.ts → field-sidebar-DWfJAJlx.d.ts} +32 -3
- package/dist/{field-sidebar-5KYVlpSs.d.ts.map → field-sidebar-DWfJAJlx.d.ts.map} +1 -1
- package/dist/{field-sidebar-BP0iWkoV.d.cts → field-sidebar-nwcE9LC4.d.cts} +32 -3
- package/dist/{field-sidebar-BP0iWkoV.d.cts.map → field-sidebar-nwcE9LC4.d.cts.map} +1 -1
- package/dist/id-registry.cjs +98 -2
- package/dist/id-registry.d.cts.map +1 -1
- package/dist/id-registry.d.ts.map +1 -1
- package/dist/id-registry.js +98 -2
- package/dist/id-registry.js.map +1 -1
- package/dist/id-registry.json +202 -4
- package/dist/index.cjs +664 -643
- package/dist/index.d.cts +5 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/{shader-surface-BUPZ0P-n.js → key-pad-menu-BQunU20e.js} +727 -19
- package/dist/key-pad-menu-BQunU20e.js.map +1 -0
- package/dist/{shader-surface-BfTP9c1Q.d.ts → key-pad-menu-BsgJMjD4.d.ts} +415 -3
- package/dist/key-pad-menu-BsgJMjD4.d.ts.map +1 -0
- package/dist/{shader-surface-Fav5K9UC.cjs → key-pad-menu-D5mQcS5v.cjs} +969 -201
- package/dist/{shader-surface-DRrcLrWf.d.cts → key-pad-menu-DfZbeXhG.d.cts} +415 -3
- package/dist/key-pad-menu-DfZbeXhG.d.cts.map +1 -0
- package/dist/meta.cjs +641 -0
- package/dist/meta.d.cts.map +1 -1
- package/dist/meta.d.ts.map +1 -1
- package/dist/meta.js +641 -0
- package/dist/meta.js.map +1 -1
- package/dist/shells/index.cjs +1 -1
- package/dist/shells/index.d.cts +1 -1
- package/dist/shells/index.d.ts +1 -1
- package/dist/shells/index.js +1 -1
- package/dist/{types-D0FlcYnM.d.ts → text-truncate-BGr7bB_8.d.cts} +110 -2
- package/dist/text-truncate-BGr7bB_8.d.cts.map +1 -0
- package/dist/{types-D0FlcYnM.d.cts → text-truncate-BGr7bB_8.d.ts} +110 -2
- package/dist/text-truncate-BGr7bB_8.d.ts.map +1 -0
- package/dist/{pagination-DjfxBcjX.cjs → text-truncate-CxdzAnhS.cjs} +418 -8
- package/dist/{pagination-DWbvACuN.js → text-truncate-j6X3z7Pv.js} +392 -12
- package/dist/text-truncate-j6X3z7Pv.js.map +1 -0
- package/package.json +3 -3
- package/dist/pagination-DWbvACuN.js.map +0 -1
- package/dist/shader-surface-BUPZ0P-n.js.map +0 -1
- package/dist/shader-surface-BfTP9c1Q.d.ts.map +0 -1
- package/dist/shader-surface-DRrcLrWf.d.cts.map +0 -1
- package/dist/types-D0FlcYnM.d.cts.map +0 -1
- package/dist/types-D0FlcYnM.d.ts.map +0 -1
package/dist/shells/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const require_field_sidebar = require("../field-sidebar-
|
|
4
|
+
const require_field_sidebar = require("../field-sidebar-B6Ndr8HE.cjs");
|
|
5
5
|
let _reopt_ai_opt_charts = require("@reopt-ai/opt-charts");
|
|
6
6
|
exports.AppMenubar = require_field_sidebar.AppMenubar;
|
|
7
7
|
exports.BranchSelect = require_field_sidebar.BranchSelect;
|
package/dist/shells/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as FailureListProps, A as LogTable, At as SidebarNav, B as TimeRangeControlLabels, Bt as CommandPaletteTrigger, Ct as SettingsFormProps, D as LogColumnPriority, Dt as ContentTabsProps, E as LogColumn, Et as ContentTabs, F as TimeSeriesPanelLabels, Ft as StatusSelectProps, G as WorkflowCanvasProps, H as TimeRangePreset, Ht as CommandPalette, I as TimeSeriesPanelProps, It as SearchCombobox, J as KeyValueEditorLabels, K as WorkflowCanvasStep, L as DEFAULT_TIME_PRESETS, Lt as SearchComboboxProps, M as LogTableLabels, Mt as AppMenubar, N as LogTableProps, Nt as AppMenubarProps, O as LogDensity, Ot as EditorToolbar, P as TimeSeriesPanel, Pt as StatusSelect, Q as FailureListLabels, R as RefreshSetting, Rt as DashboardGrid, St as SettingsForm, T as LogCellAction, Tt as FaqAccordionProps, U as WorkflowCanvas, Ut as CommandPaletteProps, V as TimeRangeControlProps, Vt as CommandPaletteTriggerProps, W as WorkflowCanvasConnection, X as KeyValueEntry, Y as KeyValueEditorProps, Z as FailureList, _t as EnvPanelProps, a as FieldValueCount, at as ToastProviderProps, bt as DeploymentTimeline, c as QueryBarProps, ct as useToast, dt as DataTableProps, et as NotificationToast, ft as DomainTable, gt as EnvPanel, ht as BranchSelectProps, i as FieldSummary, it as ToastProvider, j as LogTableHandle, jt as SidebarNavProps, k as LogSort, kt as EditorToolbarProps, l as QueryField, lt as ColumnDef, mt as BranchSelect, n as FieldSidebarLabels, nt as ToastContextValue, o as QueryBar, pt as DomainTableProps, q as KeyValueEditor, r as FieldSidebarProps, rt as ToastMessage, s as QueryBarLabels, t as FieldSidebar, ut as DataTable, vt as ProjectSwitcher, wt as FaqAccordion, xt as DeploymentTimelineProps, yt as ProjectSwitcherProps, z as TimeRangeControl, zt as DashboardGridProps } from "../field-sidebar-
|
|
2
|
+
import { $ as FailureListProps, A as LogTable, At as SidebarNav, B as TimeRangeControlLabels, Bt as CommandPaletteTrigger, Ct as SettingsFormProps, D as LogColumnPriority, Dt as ContentTabsProps, E as LogColumn, Et as ContentTabs, F as TimeSeriesPanelLabels, Ft as StatusSelectProps, G as WorkflowCanvasProps, H as TimeRangePreset, Ht as CommandPalette, I as TimeSeriesPanelProps, It as SearchCombobox, J as KeyValueEditorLabels, K as WorkflowCanvasStep, L as DEFAULT_TIME_PRESETS, Lt as SearchComboboxProps, M as LogTableLabels, Mt as AppMenubar, N as LogTableProps, Nt as AppMenubarProps, O as LogDensity, Ot as EditorToolbar, P as TimeSeriesPanel, Pt as StatusSelect, Q as FailureListLabels, R as RefreshSetting, Rt as DashboardGrid, St as SettingsForm, T as LogCellAction, Tt as FaqAccordionProps, U as WorkflowCanvas, Ut as CommandPaletteProps, V as TimeRangeControlProps, Vt as CommandPaletteTriggerProps, W as WorkflowCanvasConnection, X as KeyValueEntry, Y as KeyValueEditorProps, Z as FailureList, _t as EnvPanelProps, a as FieldValueCount, at as ToastProviderProps, bt as DeploymentTimeline, c as QueryBarProps, ct as useToast, dt as DataTableProps, et as NotificationToast, ft as DomainTable, gt as EnvPanel, ht as BranchSelectProps, i as FieldSummary, it as ToastProvider, j as LogTableHandle, jt as SidebarNavProps, k as LogSort, kt as EditorToolbarProps, l as QueryField, lt as ColumnDef, mt as BranchSelect, n as FieldSidebarLabels, nt as ToastContextValue, o as QueryBar, pt as DomainTableProps, q as KeyValueEditor, r as FieldSidebarProps, rt as ToastMessage, s as QueryBarLabels, t as FieldSidebar, ut as DataTable, vt as ProjectSwitcher, wt as FaqAccordion, xt as DeploymentTimelineProps, yt as ProjectSwitcherProps, z as TimeRangeControl, zt as DashboardGridProps } from "../field-sidebar-nwcE9LC4.cjs";
|
|
3
3
|
import { EventSparkline, EventSparklineLabels, EventSparklineProps, MetricsCard, MetricsCardProps, ReportWidget, ReportWidgetConfig, ReportWidgetLabels, ReportWidgetProps, ReportWidgetType, TrendChart, TrendChartProps } from "@reopt-ai/opt-charts";
|
|
4
4
|
export { AppMenubar, type AppMenubarProps, BranchSelect, type BranchSelectProps, type ColumnDef, CommandPalette, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, ContentTabs, type ContentTabsProps, DEFAULT_TIME_PRESETS, DashboardGrid, type DashboardGridProps, DataTable, type DataTableProps, DeploymentTimeline, type DeploymentTimelineProps, DomainTable, type DomainTableProps, EditorToolbar, type EditorToolbarProps, EnvPanel, type EnvPanelProps, EventSparkline, type EventSparklineLabels, type EventSparklineProps, FailureList, type FailureListLabels, type FailureListProps, FaqAccordion, type FaqAccordionProps, FieldSidebar, type FieldSidebarLabels, type FieldSidebarProps, type FieldSummary, type FieldValueCount, KeyValueEditor, type KeyValueEditorLabels, type KeyValueEditorProps, type KeyValueEntry, type LogCellAction, type LogColumn, type LogColumnPriority, type LogDensity, type LogSort, LogTable, type LogTableHandle, type LogTableLabels, type LogTableProps, MetricsCard, type MetricsCardProps, NotificationToast, ProjectSwitcher, type ProjectSwitcherProps, QueryBar, type QueryBarLabels, type QueryBarProps, type QueryField, type RefreshSetting, ReportWidget, type ReportWidgetConfig, type ReportWidgetLabels, type ReportWidgetProps, type ReportWidgetType, SearchCombobox, type SearchComboboxProps, SettingsForm, type SettingsFormProps, SidebarNav, type SidebarNavProps, StatusSelect, type StatusSelectProps, TimeRangeControl, type TimeRangeControlLabels, type TimeRangeControlProps, type TimeRangePreset, TimeSeriesPanel, type TimeSeriesPanelLabels, type TimeSeriesPanelProps, type ToastContextValue, type ToastMessage, ToastProvider, type ToastProviderProps, TrendChart, type TrendChartProps, WorkflowCanvas, type WorkflowCanvasConnection, type WorkflowCanvasProps, type WorkflowCanvasStep, useToast };
|
package/dist/shells/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as FailureListProps, A as LogTable, At as SidebarNav, B as TimeRangeControlLabels, Bt as CommandPaletteTrigger, Ct as SettingsFormProps, D as LogColumnPriority, Dt as ContentTabsProps, E as LogColumn, Et as ContentTabs, F as TimeSeriesPanelLabels, Ft as StatusSelectProps, G as WorkflowCanvasProps, H as TimeRangePreset, Ht as CommandPalette, I as TimeSeriesPanelProps, It as SearchCombobox, J as KeyValueEditorLabels, K as WorkflowCanvasStep, L as DEFAULT_TIME_PRESETS, Lt as SearchComboboxProps, M as LogTableLabels, Mt as AppMenubar, N as LogTableProps, Nt as AppMenubarProps, O as LogDensity, Ot as EditorToolbar, P as TimeSeriesPanel, Pt as StatusSelect, Q as FailureListLabels, R as RefreshSetting, Rt as DashboardGrid, St as SettingsForm, T as LogCellAction, Tt as FaqAccordionProps, U as WorkflowCanvas, Ut as CommandPaletteProps, V as TimeRangeControlProps, Vt as CommandPaletteTriggerProps, W as WorkflowCanvasConnection, X as KeyValueEntry, Y as KeyValueEditorProps, Z as FailureList, _t as EnvPanelProps, a as FieldValueCount, at as ToastProviderProps, bt as DeploymentTimeline, c as QueryBarProps, ct as useToast, dt as DataTableProps, et as NotificationToast, ft as DomainTable, gt as EnvPanel, ht as BranchSelectProps, i as FieldSummary, it as ToastProvider, j as LogTableHandle, jt as SidebarNavProps, k as LogSort, kt as EditorToolbarProps, l as QueryField, lt as ColumnDef, mt as BranchSelect, n as FieldSidebarLabels, nt as ToastContextValue, o as QueryBar, pt as DomainTableProps, q as KeyValueEditor, r as FieldSidebarProps, rt as ToastMessage, s as QueryBarLabels, t as FieldSidebar, ut as DataTable, vt as ProjectSwitcher, wt as FaqAccordion, xt as DeploymentTimelineProps, yt as ProjectSwitcherProps, z as TimeRangeControl, zt as DashboardGridProps } from "../field-sidebar-
|
|
2
|
+
import { $ as FailureListProps, A as LogTable, At as SidebarNav, B as TimeRangeControlLabels, Bt as CommandPaletteTrigger, Ct as SettingsFormProps, D as LogColumnPriority, Dt as ContentTabsProps, E as LogColumn, Et as ContentTabs, F as TimeSeriesPanelLabels, Ft as StatusSelectProps, G as WorkflowCanvasProps, H as TimeRangePreset, Ht as CommandPalette, I as TimeSeriesPanelProps, It as SearchCombobox, J as KeyValueEditorLabels, K as WorkflowCanvasStep, L as DEFAULT_TIME_PRESETS, Lt as SearchComboboxProps, M as LogTableLabels, Mt as AppMenubar, N as LogTableProps, Nt as AppMenubarProps, O as LogDensity, Ot as EditorToolbar, P as TimeSeriesPanel, Pt as StatusSelect, Q as FailureListLabels, R as RefreshSetting, Rt as DashboardGrid, St as SettingsForm, T as LogCellAction, Tt as FaqAccordionProps, U as WorkflowCanvas, Ut as CommandPaletteProps, V as TimeRangeControlProps, Vt as CommandPaletteTriggerProps, W as WorkflowCanvasConnection, X as KeyValueEntry, Y as KeyValueEditorProps, Z as FailureList, _t as EnvPanelProps, a as FieldValueCount, at as ToastProviderProps, bt as DeploymentTimeline, c as QueryBarProps, ct as useToast, dt as DataTableProps, et as NotificationToast, ft as DomainTable, gt as EnvPanel, ht as BranchSelectProps, i as FieldSummary, it as ToastProvider, j as LogTableHandle, jt as SidebarNavProps, k as LogSort, kt as EditorToolbarProps, l as QueryField, lt as ColumnDef, mt as BranchSelect, n as FieldSidebarLabels, nt as ToastContextValue, o as QueryBar, pt as DomainTableProps, q as KeyValueEditor, r as FieldSidebarProps, rt as ToastMessage, s as QueryBarLabels, t as FieldSidebar, ut as DataTable, vt as ProjectSwitcher, wt as FaqAccordion, xt as DeploymentTimelineProps, yt as ProjectSwitcherProps, z as TimeRangeControl, zt as DashboardGridProps } from "../field-sidebar-DWfJAJlx.js";
|
|
3
3
|
import { EventSparkline, EventSparklineLabels, EventSparklineProps, MetricsCard, MetricsCardProps, ReportWidget, ReportWidgetConfig, ReportWidgetLabels, ReportWidgetProps, ReportWidgetType, TrendChart, TrendChartProps } from "@reopt-ai/opt-charts";
|
|
4
4
|
export { AppMenubar, type AppMenubarProps, BranchSelect, type BranchSelectProps, type ColumnDef, CommandPalette, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, ContentTabs, type ContentTabsProps, DEFAULT_TIME_PRESETS, DashboardGrid, type DashboardGridProps, DataTable, type DataTableProps, DeploymentTimeline, type DeploymentTimelineProps, DomainTable, type DomainTableProps, EditorToolbar, type EditorToolbarProps, EnvPanel, type EnvPanelProps, EventSparkline, type EventSparklineLabels, type EventSparklineProps, FailureList, type FailureListLabels, type FailureListProps, FaqAccordion, type FaqAccordionProps, FieldSidebar, type FieldSidebarLabels, type FieldSidebarProps, type FieldSummary, type FieldValueCount, KeyValueEditor, type KeyValueEditorLabels, type KeyValueEditorProps, type KeyValueEntry, type LogCellAction, type LogColumn, type LogColumnPriority, type LogDensity, type LogSort, LogTable, type LogTableHandle, type LogTableLabels, type LogTableProps, MetricsCard, type MetricsCardProps, NotificationToast, ProjectSwitcher, type ProjectSwitcherProps, QueryBar, type QueryBarLabels, type QueryBarProps, type QueryField, type RefreshSetting, ReportWidget, type ReportWidgetConfig, type ReportWidgetLabels, type ReportWidgetProps, type ReportWidgetType, SearchCombobox, type SearchComboboxProps, SettingsForm, type SettingsFormProps, SidebarNav, type SidebarNavProps, StatusSelect, type StatusSelectProps, TimeRangeControl, type TimeRangeControlLabels, type TimeRangeControlProps, type TimeRangePreset, TimeSeriesPanel, type TimeSeriesPanelLabels, type TimeSeriesPanelProps, type ToastContextValue, type ToastMessage, ToastProvider, type ToastProviderProps, TrendChart, type TrendChartProps, WorkflowCanvas, type WorkflowCanvasConnection, type WorkflowCanvasProps, type WorkflowCanvasStep, useToast };
|
package/dist/shells/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { A as DataTable, B as SidebarNav, C as WorkflowCanvas, D as ToastProvider, E as NotificationToast, F as DeploymentTimeline, G as CommandPaletteTrigger, H as StatusSelect, I as SettingsForm, K as CommandPalette, L as FaqAccordion, M as BranchSelect, N as EnvPanel, P as ProjectSwitcher, R as ContentTabs, T as FailureList, U as SearchCombobox, V as AppMenubar, W as DashboardGrid, b as DEFAULT_TIME_PRESETS, j as DomainTable, k as useToast, n as QueryBar, t as FieldSidebar, v as LogTable, w as KeyValueEditor, x as TimeRangeControl, y as TimeSeriesPanel, z as EditorToolbar } from "../field-sidebar-
|
|
3
|
+
import { A as DataTable, B as SidebarNav, C as WorkflowCanvas, D as ToastProvider, E as NotificationToast, F as DeploymentTimeline, G as CommandPaletteTrigger, H as StatusSelect, I as SettingsForm, K as CommandPalette, L as FaqAccordion, M as BranchSelect, N as EnvPanel, P as ProjectSwitcher, R as ContentTabs, T as FailureList, U as SearchCombobox, V as AppMenubar, W as DashboardGrid, b as DEFAULT_TIME_PRESETS, j as DomainTable, k as useToast, n as QueryBar, t as FieldSidebar, v as LogTable, w as KeyValueEditor, x as TimeRangeControl, y as TimeSeriesPanel, z as EditorToolbar } from "../field-sidebar-BXjvV7Cz.js";
|
|
4
4
|
import { EventSparkline, MetricsCard, ReportWidget, TrendChart } from "@reopt-ai/opt-charts";
|
|
5
5
|
export { AppMenubar, BranchSelect, CommandPalette, CommandPaletteTrigger, ContentTabs, DEFAULT_TIME_PRESETS, DashboardGrid, DataTable, DeploymentTimeline, DomainTable, EditorToolbar, EnvPanel, EventSparkline, FailureList, FaqAccordion, FieldSidebar, KeyValueEditor, LogTable, MetricsCard, NotificationToast, ProjectSwitcher, QueryBar, ReportWidget, SearchCombobox, SettingsForm, SidebarNav, StatusSelect, TimeRangeControl, TimeSeriesPanel, ToastProvider, TrendChart, WorkflowCanvas, useToast };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
import { LucideIcon } from "lucide-react";
|
|
2
3
|
//#region src/lib/types.d.ts
|
|
3
4
|
/** Defines the command shape (data for command palettes / menus). */
|
|
4
5
|
interface CommandDef {
|
|
@@ -297,5 +298,112 @@ interface ChatStylePresetDef {
|
|
|
297
298
|
systemPrompt?: string;
|
|
298
299
|
}
|
|
299
300
|
//#endregion
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
//#region src/core/field-token.d.ts
|
|
302
|
+
/**
|
|
303
|
+
* The kinds of field an analytics schema actually carries. Two fields of the
|
|
304
|
+
* same shape but different meaning — a `date` you group by and a `duration`
|
|
305
|
+
* you average — get different glyphs, because the reader is scanning for
|
|
306
|
+
* meaning, not for storage class.
|
|
307
|
+
*/
|
|
308
|
+
type FieldDataType = "string" | "number" | "boolean" | "date" | "datetime" | "duration" | "percent" | "currency" | "enum" | "array" | "object" | "json" | "ip" | "geo" | "url" | "email" | "id" | "binary" | "aggregate" | "nested" | "unknown";
|
|
309
|
+
interface TokenAppearance {
|
|
310
|
+
icon: LucideIcon;
|
|
311
|
+
/** Index into the chart palette, so a token inherits the active theme. */
|
|
312
|
+
tone: number;
|
|
313
|
+
/** Fallback `title` when the caller gives none. */
|
|
314
|
+
name: string;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* The glyph and palette slot each field type reads as. Exported so a product
|
|
318
|
+
* can render the same legend the tokens imply.
|
|
319
|
+
*/
|
|
320
|
+
declare const FIELD_TYPE_TOKENS: Record<FieldDataType, TokenAppearance>;
|
|
321
|
+
/**
|
|
322
|
+
* Names a backend type as one of ours. Accepts the spellings Postgres,
|
|
323
|
+
* ClickHouse, DuckDB, and JSON Schema actually emit, so a caller can hand
|
|
324
|
+
* over a column type verbatim instead of maintaining its own table.
|
|
325
|
+
*/
|
|
326
|
+
declare function resolveFieldType(raw: string | null | undefined): FieldDataType;
|
|
327
|
+
/** Props for the field token component. */
|
|
328
|
+
interface FieldTokenProps {
|
|
329
|
+
/** The field's type. Pass a raw backend type through `resolveFieldType`. */
|
|
330
|
+
type: FieldDataType;
|
|
331
|
+
size?: "xs" | "sm" | "md" | "lg";
|
|
332
|
+
/** `subtle` tints the square; `solid` fills it; `none` draws the glyph bare. */
|
|
333
|
+
fill?: "subtle" | "solid" | "none";
|
|
334
|
+
shape?: "square" | "circle";
|
|
335
|
+
/**
|
|
336
|
+
* Accessible name. Defaults to the type's own name — pass the field name
|
|
337
|
+
* when the token stands alone, so a reader hears "user_id, identifier"
|
|
338
|
+
* rather than just "identifier".
|
|
339
|
+
*/
|
|
340
|
+
title?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Hide the token from the accessibility tree. Use when the field's type is
|
|
343
|
+
* already stated in adjacent text, so it is not read twice.
|
|
344
|
+
*/
|
|
345
|
+
decorative?: boolean;
|
|
346
|
+
className?: string;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* FieldToken — the type of a field, as a glyph.
|
|
350
|
+
*
|
|
351
|
+
* A field list, a column header, and a property table all have to answer
|
|
352
|
+
* "what kind of thing is this?" before anything else, and they have to answer
|
|
353
|
+
* it in the width of an icon. This is that answer: one glyph per type, one
|
|
354
|
+
* palette slot per glyph, stable across every surface that shows fields, so a
|
|
355
|
+
* reader learns the vocabulary once.
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* ```tsx
|
|
359
|
+
* <FieldToken type={resolveFieldType(column.dataType)} title={column.name} />
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
declare function FieldToken({ type, size, fill, shape, title, decorative, className }: FieldTokenProps): import("react").JSX.Element;
|
|
363
|
+
//#endregion
|
|
364
|
+
//#region src/core/text-truncate.d.ts
|
|
365
|
+
/** Where the characters are dropped from. */
|
|
366
|
+
type TruncationSide = "end" | "start" | "middle" | "startEnd";
|
|
367
|
+
/** Props for the text truncate component. */
|
|
368
|
+
interface TextTruncateProps {
|
|
369
|
+
text: string;
|
|
370
|
+
/**
|
|
371
|
+
* `end` is the browser default. `start` keeps a filename, `startEnd` keeps
|
|
372
|
+
* both ends of a path or id, `middle` keeps a timestamp buried in a line.
|
|
373
|
+
*/
|
|
374
|
+
truncation?: TruncationSide;
|
|
375
|
+
ellipsis?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Fixed width in pixels. Omit to measure the container, which is what a
|
|
378
|
+
* table cell wants.
|
|
379
|
+
*/
|
|
380
|
+
width?: number;
|
|
381
|
+
/**
|
|
382
|
+
* Render the visible text yourself — to wrap the kept part in a `<mark>`,
|
|
383
|
+
* say. Receives the already-truncated string.
|
|
384
|
+
*/
|
|
385
|
+
children?: (truncated: string) => React.ReactNode;
|
|
386
|
+
className?: string;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* TextTruncate — drops characters from the part of a string that identifies it
|
|
390
|
+
* least.
|
|
391
|
+
*
|
|
392
|
+
* CSS can only cut the end. That is the wrong end for the strings analytics
|
|
393
|
+
* shows most: two URLs that differ in their query string, two ids that share a
|
|
394
|
+
* prefix, a stack frame whose filename is at the tail. This measures the real
|
|
395
|
+
* text in the real font against the real available width and cuts where the
|
|
396
|
+
* caller says.
|
|
397
|
+
*
|
|
398
|
+
* The full string stays in the accessibility tree and in `title`, so
|
|
399
|
+
* truncation never costs the reader information — only space.
|
|
400
|
+
*
|
|
401
|
+
* @example
|
|
402
|
+
* ```tsx
|
|
403
|
+
* <TextTruncate text={event.url} truncation="startEnd" />
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
declare function TextTruncate({ text, truncation, ellipsis, width, children, className }: TextTruncateProps): import("react").JSX.Element;
|
|
407
|
+
//#endregion
|
|
408
|
+
export { FormFieldDef as A, TableColumn as B, EnvVarDef as C, FaqItem as D, FailureItem as E, ProjectDef as F, ToolbarButtonDef as G, TeamMemberDef as H, QuickActionDef as I, SelectOption as L, MenuItemDef as M, NavItem as N, FilterGroupDef as O, NavItemDef as P, StatCard as R, EnvGroupDef as S, ExportFormat as T, TimePreset as U, TaskDef as V, ToastOptions as W, ChatModelDef as _, FieldDataType as a, DeploymentStep as b, resolveFieldType as c, ChartConfig as d, ChartDataPoint as f, ChatMessageDef as g, ChatConversationDef as h, FIELD_TYPE_TOKENS as i, MenuDef as j, FilterOption as k, ActivityDef as l, ChartSeriesDef as m, TextTruncateProps as n, FieldToken as o, ChartMargin as p, TruncationSide as r, FieldTokenProps as s, TextTruncate as t, BranchDef as u, ChatStylePresetDef as v, ExportColumn as w, DomainDef as x, CommandDef as y, TabDef as z };
|
|
409
|
+
//# sourceMappingURL=text-truncate-BGr7bB_8.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-truncate-BGr7bB_8.d.cts","names":[],"sources":["../src/lib/types.ts","../src/core/field-token.tsx","../src/core/text-truncate.tsx"],"mappings":";;;;UACiB;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;EACZ;;;UAIe;EACf;EACA;EACA,OAAO;;;UAIQ;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA,MAAM,MAAM;EACZ;;;UAIe;EACf;EACA;EACA,SAAS,MAAM;;;UAIA;EACf;EACA;EACA;EAWA;EACA;EACA;EACA;EACA,YAAY;EACZ;IAAY;IAAe;;;EAE3B;;EAEA;;EAEA;;EAEA;;EAEA,sBAAsB,QAAQ;;;UAMf;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA,MAAM;;;UAIS;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;UAMe,YAAY;EAC3B;EACA;EACA,gBAAgB,MAAM,KAAK,MAAM,MAAM;EACvC;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAMe;EACf;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;IAAa;IAAY;IAAe;;;;UAIzB;EACf;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EAQA;EACA;EACA,OAAO;EACP;EACA,WAAW;EACX;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA,UAAU;EACV;;;UAIe;EACf;EACA;EACA;EACA,OAAO,MAAM;EACb;EACA;EACA;;;UAMe;EACf;EACA;;;KAIU;;UAGK;EACf;EACA;;;UAMe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;;;UAMI;EACf;GACC;;;UAIc;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf,QAAQ;EACR;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAMe;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;;;;;;;;KCnUU;UAuBF;EACR,MAAM;;EAEN;;EAEA;;;;;;cAOW,mBAAmB,OAAO,eAAe;;;;;;iBA6BtC,iBACd,iCACC;;UA2Cc;;EAEf,MAAM;EACN;;EAEA;EACA;;;;;;EAMA;;;;;EAKA;EACA;;;;;;;;;;;;;;;;iBAiBc,aACd,MACA,MACA,MACA,OACA,OACA,YACA,aACC,kCAAe,IAAA;;;;KCjLN;;UA8FK;EACf;;;;;EAKA,aAAa;EACb;;;;;EAKA;;;;;EAKA,YAAY,sBAAsB,MAAM;EACxC;;;;;;;;;;;;;;;;;;;;iBAqBc,eACd,MACA,YACA,UACA,OACA,UACA,aACC,oCAAiB,IAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
import { LucideIcon } from "lucide-react";
|
|
2
3
|
//#region src/lib/types.d.ts
|
|
3
4
|
/** Defines the command shape (data for command palettes / menus). */
|
|
4
5
|
interface CommandDef {
|
|
@@ -297,5 +298,112 @@ interface ChatStylePresetDef {
|
|
|
297
298
|
systemPrompt?: string;
|
|
298
299
|
}
|
|
299
300
|
//#endregion
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
//#region src/core/field-token.d.ts
|
|
302
|
+
/**
|
|
303
|
+
* The kinds of field an analytics schema actually carries. Two fields of the
|
|
304
|
+
* same shape but different meaning — a `date` you group by and a `duration`
|
|
305
|
+
* you average — get different glyphs, because the reader is scanning for
|
|
306
|
+
* meaning, not for storage class.
|
|
307
|
+
*/
|
|
308
|
+
type FieldDataType = "string" | "number" | "boolean" | "date" | "datetime" | "duration" | "percent" | "currency" | "enum" | "array" | "object" | "json" | "ip" | "geo" | "url" | "email" | "id" | "binary" | "aggregate" | "nested" | "unknown";
|
|
309
|
+
interface TokenAppearance {
|
|
310
|
+
icon: LucideIcon;
|
|
311
|
+
/** Index into the chart palette, so a token inherits the active theme. */
|
|
312
|
+
tone: number;
|
|
313
|
+
/** Fallback `title` when the caller gives none. */
|
|
314
|
+
name: string;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* The glyph and palette slot each field type reads as. Exported so a product
|
|
318
|
+
* can render the same legend the tokens imply.
|
|
319
|
+
*/
|
|
320
|
+
declare const FIELD_TYPE_TOKENS: Record<FieldDataType, TokenAppearance>;
|
|
321
|
+
/**
|
|
322
|
+
* Names a backend type as one of ours. Accepts the spellings Postgres,
|
|
323
|
+
* ClickHouse, DuckDB, and JSON Schema actually emit, so a caller can hand
|
|
324
|
+
* over a column type verbatim instead of maintaining its own table.
|
|
325
|
+
*/
|
|
326
|
+
declare function resolveFieldType(raw: string | null | undefined): FieldDataType;
|
|
327
|
+
/** Props for the field token component. */
|
|
328
|
+
interface FieldTokenProps {
|
|
329
|
+
/** The field's type. Pass a raw backend type through `resolveFieldType`. */
|
|
330
|
+
type: FieldDataType;
|
|
331
|
+
size?: "xs" | "sm" | "md" | "lg";
|
|
332
|
+
/** `subtle` tints the square; `solid` fills it; `none` draws the glyph bare. */
|
|
333
|
+
fill?: "subtle" | "solid" | "none";
|
|
334
|
+
shape?: "square" | "circle";
|
|
335
|
+
/**
|
|
336
|
+
* Accessible name. Defaults to the type's own name — pass the field name
|
|
337
|
+
* when the token stands alone, so a reader hears "user_id, identifier"
|
|
338
|
+
* rather than just "identifier".
|
|
339
|
+
*/
|
|
340
|
+
title?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Hide the token from the accessibility tree. Use when the field's type is
|
|
343
|
+
* already stated in adjacent text, so it is not read twice.
|
|
344
|
+
*/
|
|
345
|
+
decorative?: boolean;
|
|
346
|
+
className?: string;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* FieldToken — the type of a field, as a glyph.
|
|
350
|
+
*
|
|
351
|
+
* A field list, a column header, and a property table all have to answer
|
|
352
|
+
* "what kind of thing is this?" before anything else, and they have to answer
|
|
353
|
+
* it in the width of an icon. This is that answer: one glyph per type, one
|
|
354
|
+
* palette slot per glyph, stable across every surface that shows fields, so a
|
|
355
|
+
* reader learns the vocabulary once.
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* ```tsx
|
|
359
|
+
* <FieldToken type={resolveFieldType(column.dataType)} title={column.name} />
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
declare function FieldToken({ type, size, fill, shape, title, decorative, className }: FieldTokenProps): import("react").JSX.Element;
|
|
363
|
+
//#endregion
|
|
364
|
+
//#region src/core/text-truncate.d.ts
|
|
365
|
+
/** Where the characters are dropped from. */
|
|
366
|
+
type TruncationSide = "end" | "start" | "middle" | "startEnd";
|
|
367
|
+
/** Props for the text truncate component. */
|
|
368
|
+
interface TextTruncateProps {
|
|
369
|
+
text: string;
|
|
370
|
+
/**
|
|
371
|
+
* `end` is the browser default. `start` keeps a filename, `startEnd` keeps
|
|
372
|
+
* both ends of a path or id, `middle` keeps a timestamp buried in a line.
|
|
373
|
+
*/
|
|
374
|
+
truncation?: TruncationSide;
|
|
375
|
+
ellipsis?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Fixed width in pixels. Omit to measure the container, which is what a
|
|
378
|
+
* table cell wants.
|
|
379
|
+
*/
|
|
380
|
+
width?: number;
|
|
381
|
+
/**
|
|
382
|
+
* Render the visible text yourself — to wrap the kept part in a `<mark>`,
|
|
383
|
+
* say. Receives the already-truncated string.
|
|
384
|
+
*/
|
|
385
|
+
children?: (truncated: string) => React.ReactNode;
|
|
386
|
+
className?: string;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* TextTruncate — drops characters from the part of a string that identifies it
|
|
390
|
+
* least.
|
|
391
|
+
*
|
|
392
|
+
* CSS can only cut the end. That is the wrong end for the strings analytics
|
|
393
|
+
* shows most: two URLs that differ in their query string, two ids that share a
|
|
394
|
+
* prefix, a stack frame whose filename is at the tail. This measures the real
|
|
395
|
+
* text in the real font against the real available width and cuts where the
|
|
396
|
+
* caller says.
|
|
397
|
+
*
|
|
398
|
+
* The full string stays in the accessibility tree and in `title`, so
|
|
399
|
+
* truncation never costs the reader information — only space.
|
|
400
|
+
*
|
|
401
|
+
* @example
|
|
402
|
+
* ```tsx
|
|
403
|
+
* <TextTruncate text={event.url} truncation="startEnd" />
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
declare function TextTruncate({ text, truncation, ellipsis, width, children, className }: TextTruncateProps): import("react").JSX.Element;
|
|
407
|
+
//#endregion
|
|
408
|
+
export { FormFieldDef as A, TableColumn as B, EnvVarDef as C, FaqItem as D, FailureItem as E, ProjectDef as F, ToolbarButtonDef as G, TeamMemberDef as H, QuickActionDef as I, SelectOption as L, MenuItemDef as M, NavItem as N, FilterGroupDef as O, NavItemDef as P, StatCard as R, EnvGroupDef as S, ExportFormat as T, TimePreset as U, TaskDef as V, ToastOptions as W, ChatModelDef as _, FieldDataType as a, DeploymentStep as b, resolveFieldType as c, ChartConfig as d, ChartDataPoint as f, ChatMessageDef as g, ChatConversationDef as h, FIELD_TYPE_TOKENS as i, MenuDef as j, FilterOption as k, ActivityDef as l, ChartSeriesDef as m, TextTruncateProps as n, FieldToken as o, ChartMargin as p, TruncationSide as r, FieldTokenProps as s, TextTruncate as t, BranchDef as u, ChatStylePresetDef as v, ExportColumn as w, DomainDef as x, CommandDef as y, TabDef as z };
|
|
409
|
+
//# sourceMappingURL=text-truncate-BGr7bB_8.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-truncate-BGr7bB_8.d.ts","names":[],"sources":["../src/lib/types.ts","../src/core/field-token.tsx","../src/core/text-truncate.tsx"],"mappings":";;;;UACiB;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;EACZ;;;UAIe;EACf;EACA;EACA,OAAO;;;UAIQ;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA,MAAM,MAAM;EACZ;;;UAIe;EACf;EACA;EACA,SAAS,MAAM;;;UAIA;EACf;EACA;EACA;EAWA;EACA;EACA;EACA;EACA,YAAY;EACZ;IAAY;IAAe;;;EAE3B;;EAEA;;EAEA;;EAEA;;EAEA,sBAAsB,QAAQ;;;UAMf;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA,MAAM;;;UAIS;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;UAMe,YAAY;EAC3B;EACA;EACA,gBAAgB,MAAM,KAAK,MAAM,MAAM;EACvC;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAMe;EACf;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;IAAa;IAAY;IAAe;;;;UAIzB;EACf;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EAQA;EACA;EACA,OAAO;EACP;EACA,WAAW;EACX;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA,UAAU;EACV;;;UAIe;EACf;EACA;EACA;EACA,OAAO,MAAM;EACb;EACA;EACA;;;UAMe;EACf;EACA;;;KAIU;;UAGK;EACf;EACA;;;UAMe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;;;UAMI;EACf;GACC;;;UAIc;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf,QAAQ;EACR;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAMe;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;;;;;;;;KCnUU;UAuBF;EACR,MAAM;;EAEN;;EAEA;;;;;;cAOW,mBAAmB,OAAO,eAAe;;;;;;iBA6BtC,iBACd,iCACC;;UA2Cc;;EAEf,MAAM;EACN;;EAEA;EACA;;;;;;EAMA;;;;;EAKA;EACA;;;;;;;;;;;;;;;;iBAiBc,aACd,MACA,MACA,MACA,OACA,OACA,YACA,aACC,kCAAe,IAAA;;;;KCjLN;;UA8FK;EACf;;;;;EAKA,aAAa;EACb;;;;;EAKA;;;;;EAKA,YAAY,sBAAsB,MAAM;EACxC;;;;;;;;;;;;;;;;;;;;iBAqBc,eACd,MACA,YACA,UACA,OACA,UACA,aACC,oCAAiB,IAAA"}
|