@mastra/playground-ui 29.0.0 → 30.0.0-alpha.1
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/CHANGELOG.md +117 -0
- package/dist/index.cjs.js +288 -378
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +110 -64
- package/dist/index.es.js +290 -371
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/Checkbox/checkbox.d.ts +18 -2
- package/dist/src/ds/components/DataList/ScoresDataList/scores-data-list.d.ts +6 -2
- package/dist/src/ds/components/DataList/TracesDataList/traces-data-list-cells.d.ts +0 -12
- package/dist/src/ds/components/DataList/TracesDataList/traces-data-list.d.ts +11 -6
- package/dist/src/ds/components/DataList/data-list-cells.d.ts +46 -3
- package/dist/src/ds/components/DataList/data-list-row-button.d.ts +3 -2
- package/dist/src/ds/components/DataList/data-list-row-link.d.ts +5 -3
- package/dist/src/ds/components/DataList/data-list-row.d.ts +7 -2
- package/dist/src/ds/components/DataList/data-list-top-cell.d.ts +24 -3
- package/dist/src/ds/components/DataList/data-list-top-cells.d.ts +35 -0
- package/dist/src/ds/components/DataList/data-list-top.d.ts +8 -1
- package/dist/src/ds/components/DataList/data-list.d.ts +18 -4
- package/dist/src/ds/components/DataList/data-list.stories.d.ts +26 -0
- package/dist/src/ds/components/DataList/shared.d.ts +44 -1
- package/dist/src/ds/components/Label/label.d.ts +1 -3
- package/dist/src/ds/components/LogsDataList/logs-data-list-cells.d.ts +0 -8
- package/dist/src/ds/components/LogsDataList/logs-data-list.d.ts +10 -5
- package/dist/src/ds/components/RadioGroup/radio-group.d.ts +10 -3
- package/dist/src/ds/components/Switch/switch.d.ts +7 -2
- package/dist/src/ds/components/ThemeToggle/theme-toggle.d.ts +4 -2
- package/dist/src/index.d.ts +0 -1
- package/package.json +6 -10
- package/dist/src/ds/components/EntryList/entry-list-entries-skeleton.d.ts +0 -6
- package/dist/src/ds/components/EntryList/entry-list-entries.d.ts +0 -5
- package/dist/src/ds/components/EntryList/entry-list-entry-col.d.ts +0 -9
- package/dist/src/ds/components/EntryList/entry-list-entry.d.ts +0 -10
- package/dist/src/ds/components/EntryList/entry-list-header.d.ts +0 -5
- package/dist/src/ds/components/EntryList/entry-list-message.d.ts +0 -7
- package/dist/src/ds/components/EntryList/entry-list-next-page-loading.d.ts +0 -8
- package/dist/src/ds/components/EntryList/entry-list-pagination.d.ts +0 -7
- package/dist/src/ds/components/EntryList/entry-list-root.d.ts +0 -5
- package/dist/src/ds/components/EntryList/entry-list-skeleton.d.ts +0 -2
- package/dist/src/ds/components/EntryList/entry-list-trim.d.ts +0 -5
- package/dist/src/ds/components/EntryList/entry-list.d.ts +0 -20
- package/dist/src/ds/components/EntryList/entry-list.stories.d.ts +0 -10
- package/dist/src/ds/components/EntryList/helpers.d.ts +0 -10
- package/dist/src/ds/components/EntryList/index.d.ts +0 -5
- package/dist/src/ds/components/EntryList/shared.d.ts +0 -2
- package/dist/src/ds/components/EntryList/types.d.ts +0 -5
package/dist/index.cjs.js
CHANGED
|
@@ -20,7 +20,7 @@ const lucideReact = require('lucide-react');
|
|
|
20
20
|
const sonner = require('sonner');
|
|
21
21
|
const react = require('@mastra/react');
|
|
22
22
|
const alertDialog = require('@base-ui/react/alert-dialog');
|
|
23
|
-
const
|
|
23
|
+
const checkbox = require('@base-ui/react/checkbox');
|
|
24
24
|
const collapsible = require('@base-ui/react/collapsible');
|
|
25
25
|
const combobox = require('@base-ui/react/combobox');
|
|
26
26
|
const cmdk = require('cmdk');
|
|
@@ -29,15 +29,15 @@ const SelectPrimitive = require('@radix-ui/react-select');
|
|
|
29
29
|
const tabs = require('@base-ui/react/tabs');
|
|
30
30
|
const menu = require('@base-ui/react/menu');
|
|
31
31
|
const VisuallyHidden = require('@radix-ui/react-visually-hidden');
|
|
32
|
-
const LabelPrimitive = require('@radix-ui/react-label');
|
|
33
32
|
const Markdown = require('react-markdown');
|
|
34
33
|
const remarkGfm = require('remark-gfm');
|
|
35
34
|
const popover = require('@base-ui/react/popover');
|
|
36
|
-
const
|
|
35
|
+
const radio = require('@base-ui/react/radio');
|
|
36
|
+
const radioGroup = require('@base-ui/react/radio-group');
|
|
37
37
|
const scrollArea = require('@base-ui/react/scroll-area');
|
|
38
38
|
const useDebounce = require('use-debounce');
|
|
39
39
|
const slider = require('@base-ui/react/slider');
|
|
40
|
-
const
|
|
40
|
+
const _switch = require('@base-ui/react/switch');
|
|
41
41
|
const dateFns = require('date-fns');
|
|
42
42
|
const reactDayPicker = require('react-day-picker');
|
|
43
43
|
const HoverCard = require('@radix-ui/react-hover-card');
|
|
@@ -74,12 +74,8 @@ function _interopNamespaceDefault(e) {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
77
|
-
const CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(CheckboxPrimitive);
|
|
78
77
|
const SelectPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SelectPrimitive);
|
|
79
78
|
const VisuallyHidden__namespace = /*#__PURE__*/_interopNamespaceDefault(VisuallyHidden);
|
|
80
|
-
const LabelPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(LabelPrimitive);
|
|
81
|
-
const RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(RadioGroupPrimitive);
|
|
82
|
-
const SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespaceDefault(SwitchPrimitives);
|
|
83
79
|
const HoverCard__namespace = /*#__PURE__*/_interopNamespaceDefault(HoverCard);
|
|
84
80
|
const Dialog__namespace = /*#__PURE__*/_interopNamespaceDefault(Dialog$1);
|
|
85
81
|
|
|
@@ -6152,35 +6148,52 @@ AlertDialog.Description = AlertDialogDescription;
|
|
|
6152
6148
|
AlertDialog.Action = AlertDialogAction;
|
|
6153
6149
|
AlertDialog.Cancel = AlertDialogCancel;
|
|
6154
6150
|
|
|
6155
|
-
const Checkbox = React__namespace.forwardRef(
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-neutral3",
|
|
6161
|
-
"shadow-sm",
|
|
6162
|
-
transitions.all,
|
|
6163
|
-
"hover:border-neutral5 hover:shadow-md",
|
|
6164
|
-
formElementFocus,
|
|
6165
|
-
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm",
|
|
6166
|
-
"data-[state=checked]:bg-accent1 data-[state=checked]:border-accent1 data-[state=checked]:text-surface1",
|
|
6167
|
-
"data-[state=checked]:shadow-glow-accent1",
|
|
6168
|
-
className
|
|
6169
|
-
),
|
|
6170
|
-
...props,
|
|
6171
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6172
|
-
CheckboxPrimitive__namespace.Indicator,
|
|
6151
|
+
const Checkbox = React__namespace.forwardRef(
|
|
6152
|
+
({ className, checked, indeterminate, ...props }, ref) => {
|
|
6153
|
+
const isCheckedIndeterminate = checked === "indeterminate";
|
|
6154
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6155
|
+
checkbox.Checkbox.Root,
|
|
6173
6156
|
{
|
|
6157
|
+
ref,
|
|
6158
|
+
checked: isCheckedIndeterminate ? false : checked,
|
|
6159
|
+
indeterminate: indeterminate ?? isCheckedIndeterminate,
|
|
6174
6160
|
className: cn(
|
|
6175
|
-
"
|
|
6176
|
-
"
|
|
6161
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-neutral3",
|
|
6162
|
+
"flex items-center justify-center",
|
|
6163
|
+
"shadow-sm",
|
|
6164
|
+
transitions.all,
|
|
6165
|
+
"hover:border-neutral5 hover:shadow-md",
|
|
6166
|
+
formElementFocus,
|
|
6167
|
+
// Base UI's Checkbox.Root is a `<span>`, so `:disabled` never matches — target `data-disabled`.
|
|
6168
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[disabled]:hover:border-neutral3 data-[disabled]:hover:shadow-sm",
|
|
6169
|
+
"data-[checked]:bg-accent1 data-[checked]:border-accent1 data-[checked]:text-surface1",
|
|
6170
|
+
"data-[indeterminate]:bg-accent1 data-[indeterminate]:border-accent1 data-[indeterminate]:text-surface1",
|
|
6171
|
+
"data-[checked]:shadow-glow-accent1 data-[indeterminate]:shadow-glow-accent1",
|
|
6172
|
+
className
|
|
6177
6173
|
),
|
|
6178
|
-
|
|
6174
|
+
...props,
|
|
6175
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6176
|
+
checkbox.Checkbox.Indicator,
|
|
6177
|
+
{
|
|
6178
|
+
className: cn(
|
|
6179
|
+
"group/checkbox-indicator flex items-center justify-center text-current",
|
|
6180
|
+
"data-[checked]:animate-in data-[checked]:zoom-in-50 data-[checked]:duration-150",
|
|
6181
|
+
"data-[indeterminate]:animate-in data-[indeterminate]:zoom-in-50 data-[indeterminate]:duration-150"
|
|
6182
|
+
),
|
|
6183
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxIndicatorIcon, {})
|
|
6184
|
+
}
|
|
6185
|
+
)
|
|
6179
6186
|
}
|
|
6180
|
-
)
|
|
6187
|
+
);
|
|
6181
6188
|
}
|
|
6182
|
-
)
|
|
6183
|
-
Checkbox.displayName =
|
|
6189
|
+
);
|
|
6190
|
+
Checkbox.displayName = "Checkbox";
|
|
6191
|
+
function CheckboxIndicatorIcon() {
|
|
6192
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6193
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5 stroke-3 group-data-[indeterminate]/checkbox-indicator:hidden" }),
|
|
6194
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "hidden h-3.5 w-3.5 stroke-3 group-data-[indeterminate]/checkbox-indicator:block" })
|
|
6195
|
+
] });
|
|
6196
|
+
}
|
|
6184
6197
|
|
|
6185
6198
|
const Collapsible = collapsible.Collapsible.Root;
|
|
6186
6199
|
const CollapsibleTrigger = React.forwardRef(
|
|
@@ -7693,8 +7706,10 @@ const Kbd = ({ children, theme = "dark", className }) => {
|
|
|
7693
7706
|
};
|
|
7694
7707
|
|
|
7695
7708
|
const labelVariants = cva("text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
7696
|
-
const Label = React__namespace.forwardRef(
|
|
7697
|
-
|
|
7709
|
+
const Label = React__namespace.forwardRef(
|
|
7710
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("label", { ref, className: cn(labelVariants(), className), ...props })
|
|
7711
|
+
);
|
|
7712
|
+
Label.displayName = "Label";
|
|
7698
7713
|
|
|
7699
7714
|
function MarkdownRenderer({ children }) {
|
|
7700
7715
|
const processedText = children.replace(/\\n/g, "\n");
|
|
@@ -8208,31 +8223,37 @@ const ButtonsGroupText = React__namespace.forwardRef(
|
|
|
8208
8223
|
ButtonsGroupText.displayName = "ButtonsGroupText";
|
|
8209
8224
|
|
|
8210
8225
|
const RadioGroup = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8211
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8226
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radioGroup.RadioGroup, { ref, className: cn("grid gap-2", className), ...props });
|
|
8212
8227
|
});
|
|
8213
|
-
RadioGroup.displayName =
|
|
8228
|
+
RadioGroup.displayName = "RadioGroup";
|
|
8214
8229
|
const RadioGroupItem = React__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8215
8230
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8216
|
-
|
|
8231
|
+
radio.Radio.Root,
|
|
8217
8232
|
{
|
|
8218
8233
|
ref,
|
|
8219
8234
|
className: cn(
|
|
8235
|
+
// Base UI's Radio.Root renders a `<span>` (inline) — unlike Radix's
|
|
8236
|
+
// `<button>`. `flex` + `shrink-0` make the sizing/centering classes
|
|
8237
|
+
// take effect and keep the control square inside flex rows.
|
|
8238
|
+
"flex shrink-0 items-center justify-center",
|
|
8220
8239
|
"aspect-square h-4 w-4 rounded-full border border-neutral3 text-neutral6",
|
|
8221
8240
|
"shadow-sm",
|
|
8222
8241
|
transitions.all,
|
|
8223
8242
|
"hover:border-neutral5 hover:shadow-md",
|
|
8224
8243
|
formElementFocus,
|
|
8225
|
-
|
|
8226
|
-
"data-[
|
|
8244
|
+
// Base UI's Radio.Root is a `<span>`, so `:disabled` never matches — target `data-disabled`.
|
|
8245
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[disabled]:hover:border-neutral3 data-[disabled]:hover:shadow-sm",
|
|
8246
|
+
// Base UI exposes `data-checked`/`data-unchecked` instead of Radix's `data-state`.
|
|
8247
|
+
"data-[checked]:border-accent1 data-[checked]:shadow-glow-accent1",
|
|
8227
8248
|
className
|
|
8228
8249
|
),
|
|
8229
8250
|
...props,
|
|
8230
8251
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8231
|
-
|
|
8252
|
+
radio.Radio.Indicator,
|
|
8232
8253
|
{
|
|
8233
8254
|
className: cn(
|
|
8234
8255
|
"flex items-center justify-center",
|
|
8235
|
-
"data-[
|
|
8256
|
+
"data-[checked]:animate-in data-[checked]:zoom-in-50 data-[checked]:duration-150"
|
|
8236
8257
|
),
|
|
8237
8258
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-accent1 text-accent1" })
|
|
8238
8259
|
}
|
|
@@ -8240,7 +8261,7 @@ const RadioGroupItem = React__namespace.forwardRef(({ className, ...props }, ref
|
|
|
8240
8261
|
}
|
|
8241
8262
|
);
|
|
8242
8263
|
});
|
|
8243
|
-
RadioGroupItem.displayName =
|
|
8264
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
8244
8265
|
|
|
8245
8266
|
function PickMultiPanel({ field, tokens, onChange }) {
|
|
8246
8267
|
const [query, setQuery] = React.useState("");
|
|
@@ -9249,35 +9270,43 @@ function BrandLoader({ className, size = "md", "aria-label": ariaLabel = "Loadin
|
|
|
9249
9270
|
);
|
|
9250
9271
|
}
|
|
9251
9272
|
|
|
9252
|
-
const Switch = React__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9273
|
+
const Switch = React__namespace.forwardRef(({ className, asChild, children, ...props }, ref) => {
|
|
9274
|
+
const renderProps = asChild && React__namespace.isValidElement(children) ? { render: children } : { render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }), nativeButton: true };
|
|
9275
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9276
|
+
_switch.Switch.Root,
|
|
9277
|
+
{
|
|
9278
|
+
ref,
|
|
9279
|
+
"data-slot": "switch",
|
|
9280
|
+
className: cn(
|
|
9281
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent",
|
|
9282
|
+
transitions.all,
|
|
9283
|
+
formElementFocus,
|
|
9284
|
+
"hover:brightness-110",
|
|
9285
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:brightness-100",
|
|
9286
|
+
"data-[checked]:bg-accent1 data-[checked]:shadow-glow-accent1",
|
|
9287
|
+
"data-[unchecked]:bg-neutral2",
|
|
9288
|
+
className
|
|
9289
|
+
),
|
|
9290
|
+
...renderProps,
|
|
9291
|
+
...props,
|
|
9292
|
+
children: [
|
|
9293
|
+
asChild ? void 0 : children,
|
|
9294
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9295
|
+
_switch.Switch.Thumb,
|
|
9296
|
+
{
|
|
9297
|
+
className: cn(
|
|
9298
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-white shadow-md",
|
|
9299
|
+
"transition-all duration-normal ease-out-custom",
|
|
9300
|
+
"data-[checked]:translate-x-4 data-[unchecked]:translate-x-0",
|
|
9301
|
+
"data-[checked]:shadow-lg"
|
|
9302
|
+
)
|
|
9303
|
+
}
|
|
9275
9304
|
)
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
)
|
|
9280
|
-
Switch.displayName =
|
|
9305
|
+
]
|
|
9306
|
+
}
|
|
9307
|
+
);
|
|
9308
|
+
});
|
|
9309
|
+
Switch.displayName = "Switch";
|
|
9281
9310
|
|
|
9282
9311
|
const DEFAULT_OPTIONS = [
|
|
9283
9312
|
{ value: "system", label: "System", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Monitor, {}) },
|
|
@@ -9308,12 +9337,11 @@ const ThemeToggle = ({
|
|
|
9308
9337
|
);
|
|
9309
9338
|
const indicatorOffset = activeIndex * (ITEM_WIDTH + ITEM_GAP);
|
|
9310
9339
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9311
|
-
|
|
9340
|
+
radioGroup.RadioGroup,
|
|
9312
9341
|
{
|
|
9313
9342
|
...rest,
|
|
9314
9343
|
value: effectiveCurrent,
|
|
9315
9344
|
onValueChange: handleChange,
|
|
9316
|
-
orientation: "horizontal",
|
|
9317
9345
|
"aria-label": ariaLabel,
|
|
9318
9346
|
className: cn(
|
|
9319
9347
|
"relative inline-flex w-fit items-center gap-0.5 rounded-full border border-border1 bg-surface3 p-0.5",
|
|
@@ -9332,14 +9360,15 @@ const ThemeToggle = ({
|
|
|
9332
9360
|
}
|
|
9333
9361
|
),
|
|
9334
9362
|
options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9335
|
-
|
|
9363
|
+
radio.Radio.Root,
|
|
9336
9364
|
{
|
|
9337
9365
|
value: option.value,
|
|
9338
9366
|
"aria-label": option.label,
|
|
9339
9367
|
style: { width: ITEM_WIDTH },
|
|
9340
9368
|
className: cn(
|
|
9341
9369
|
"relative inline-flex h-6 cursor-pointer items-center justify-center rounded-full",
|
|
9342
|
-
|
|
9370
|
+
// Base UI exposes `data-checked` instead of Radix's `data-state="checked"`.
|
|
9371
|
+
"[&_svg]:size-3.5 text-icon3 hover:text-icon6 data-[checked]:text-icon6",
|
|
9343
9372
|
"focus-visible:outline-hidden",
|
|
9344
9373
|
"active:scale-90 motion-reduce:transition-none",
|
|
9345
9374
|
transitions.colors,
|
|
@@ -9896,221 +9925,6 @@ const DefaultTrigger = React__namespace.forwardRef(
|
|
|
9896
9925
|
}
|
|
9897
9926
|
);
|
|
9898
9927
|
|
|
9899
|
-
function EntryListEntries({ children }) {
|
|
9900
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "grid bg-surface3 overflow-y-auto", children });
|
|
9901
|
-
}
|
|
9902
|
-
|
|
9903
|
-
function getColumnTemplate(columns) {
|
|
9904
|
-
if (!columns || columns.length === 0) {
|
|
9905
|
-
return "";
|
|
9906
|
-
}
|
|
9907
|
-
return columns?.map((column) => {
|
|
9908
|
-
return column.size;
|
|
9909
|
-
}).join(" ");
|
|
9910
|
-
}
|
|
9911
|
-
|
|
9912
|
-
function EntryListEntry({ entry, isSelected, onClick, children, columns }) {
|
|
9913
|
-
const handleClick = () => {
|
|
9914
|
-
onClick?.(entry?.id);
|
|
9915
|
-
};
|
|
9916
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9917
|
-
"li",
|
|
9918
|
-
{
|
|
9919
|
-
className: cn(
|
|
9920
|
-
"border-t text-neutral5 border-border1 last:border-b-0 text-ui-md",
|
|
9921
|
-
"[&:last-child>button]:rounded-b-lg",
|
|
9922
|
-
transitions.colors,
|
|
9923
|
-
{
|
|
9924
|
-
"bg-accent1Dark": isSelected
|
|
9925
|
-
}
|
|
9926
|
-
),
|
|
9927
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9928
|
-
"button",
|
|
9929
|
-
{
|
|
9930
|
-
onClick: handleClick,
|
|
9931
|
-
className: cn("grid w-full px-6 gap-6 text-left items-center min-h-12", transitions.colors, focusRing.visible, {
|
|
9932
|
-
// hover effect only not for skeleton and selected
|
|
9933
|
-
"hover:bg-surface4": entry && !isSelected
|
|
9934
|
-
}),
|
|
9935
|
-
style: { gridTemplateColumns: getColumnTemplate(columns) },
|
|
9936
|
-
disabled: !entry,
|
|
9937
|
-
children
|
|
9938
|
-
}
|
|
9939
|
-
)
|
|
9940
|
-
}
|
|
9941
|
-
);
|
|
9942
|
-
}
|
|
9943
|
-
|
|
9944
|
-
function EntryListEntryTextCol({ children, isLoading }) {
|
|
9945
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-neutral4 text-ui-md truncate ", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-surface4 rounded-md animate-pulse text-transparent h-4 select-none" }) : children });
|
|
9946
|
-
}
|
|
9947
|
-
function EntryListEntryStatusCol({ status }) {
|
|
9948
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex justify-center items-center w-full relative"), children: [
|
|
9949
|
-
status ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9950
|
-
"div",
|
|
9951
|
-
{
|
|
9952
|
-
className: cn("w-[0.6rem] h-[0.6rem] rounded-full", {
|
|
9953
|
-
"bg-green-600": status === "success",
|
|
9954
|
-
"bg-red-700": status === "failed"
|
|
9955
|
-
})
|
|
9956
|
-
}
|
|
9957
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-neutral2 text-ui-sm leading-none", children: "-" }),
|
|
9958
|
-
/* @__PURE__ */ jsxRuntime.jsxs(VisuallyHidden.VisuallyHidden, { children: [
|
|
9959
|
-
"Status: ",
|
|
9960
|
-
status ? status : "not provided"
|
|
9961
|
-
] })
|
|
9962
|
-
] });
|
|
9963
|
-
}
|
|
9964
|
-
|
|
9965
|
-
function EntryListHeader({ columns }) {
|
|
9966
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("sticky top-0 bg-surface4 z-10 rounded-t-lg px-6"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9967
|
-
"div",
|
|
9968
|
-
{
|
|
9969
|
-
className: cn("grid gap-6 text-left uppercase py-3 text-neutral3 text-ui-sm"),
|
|
9970
|
-
style: { gridTemplateColumns: getColumnTemplate(columns) },
|
|
9971
|
-
children: columns?.map((col) => /* @__PURE__ */ jsxRuntime.jsx("span", { children: col.label || col.name }, col.name))
|
|
9972
|
-
}
|
|
9973
|
-
) });
|
|
9974
|
-
}
|
|
9975
|
-
|
|
9976
|
-
function EntryListMessage({ children, message, className, type }) {
|
|
9977
|
-
if (!children && !message) {
|
|
9978
|
-
return null;
|
|
9979
|
-
}
|
|
9980
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid border-t border-border1", className), children: message ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9981
|
-
"p",
|
|
9982
|
-
{
|
|
9983
|
-
className: cn(
|
|
9984
|
-
"text-neutral3 text-ui-md text-center grid p-8 justify-center justify-items-center gap-2",
|
|
9985
|
-
"[&>svg]:w-[1.5em] [&>svg]:h-[1.5em] [&>svg]:opacity-75",
|
|
9986
|
-
{
|
|
9987
|
-
"[&>svg]:text-red-500": type === "error"
|
|
9988
|
-
}
|
|
9989
|
-
),
|
|
9990
|
-
children: [
|
|
9991
|
-
type === "error" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlertIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, {}),
|
|
9992
|
-
" ",
|
|
9993
|
-
message
|
|
9994
|
-
]
|
|
9995
|
-
}
|
|
9996
|
-
) : children });
|
|
9997
|
-
}
|
|
9998
|
-
|
|
9999
|
-
function EntryListNextPageLoading({
|
|
10000
|
-
isLoading,
|
|
10001
|
-
hasMore,
|
|
10002
|
-
setEndOfListElement,
|
|
10003
|
-
loadingText = "Loading more data...",
|
|
10004
|
-
noMoreDataText = "No more data to load"
|
|
10005
|
-
}) {
|
|
10006
|
-
if (!setEndOfListElement) {
|
|
10007
|
-
return null;
|
|
10008
|
-
}
|
|
10009
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: setEndOfListElement, className: "text-ui-md text-neutral3 opacity-50 flex mt-8 justify-center", children: [
|
|
10010
|
-
isLoading && loadingText,
|
|
10011
|
-
!hasMore && !isLoading && noMoreDataText
|
|
10012
|
-
] });
|
|
10013
|
-
}
|
|
10014
|
-
|
|
10015
|
-
function EntryListPagination({ currentPage, hasMore, onNextPage, onPrevPage }) {
|
|
10016
|
-
const showNavigation = typeof currentPage === "number" && currentPage > 0 || hasMore;
|
|
10017
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex pt-6 items-center justify-center text-neutral3 text-ui-md gap-8"), children: [
|
|
10018
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
10019
|
-
"Page ",
|
|
10020
|
-
/* @__PURE__ */ jsxRuntime.jsx("b", { children: currentPage ? currentPage + 1 : "1" })
|
|
10021
|
-
] }),
|
|
10022
|
-
showNavigation && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10023
|
-
"div",
|
|
10024
|
-
{
|
|
10025
|
-
className: cn(
|
|
10026
|
-
"flex gap-4",
|
|
10027
|
-
"[&>button]:flex [&>button]:items-center [&>button]:gap-2 [&>button]:text-neutral4 [&>button:hover]:text-neutral5 [&>button]:transition-colors [&>button]:border [&>button]:border-border1 [&>button]:p-1 [&>button]:px-2 [&>button]:rounded-md",
|
|
10028
|
-
"[&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:text-neutral3"
|
|
10029
|
-
),
|
|
10030
|
-
children: [
|
|
10031
|
-
typeof currentPage === "number" && currentPage > 0 && /* @__PURE__ */ jsxRuntime.jsxs("button", { onClick: onPrevPage, children: [
|
|
10032
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeftIcon, {}),
|
|
10033
|
-
"Previous"
|
|
10034
|
-
] }),
|
|
10035
|
-
hasMore && /* @__PURE__ */ jsxRuntime.jsxs("button", { onClick: onNextPage, children: [
|
|
10036
|
-
"Next",
|
|
10037
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRightIcon, {})
|
|
10038
|
-
] })
|
|
10039
|
-
]
|
|
10040
|
-
}
|
|
10041
|
-
)
|
|
10042
|
-
] });
|
|
10043
|
-
}
|
|
10044
|
-
|
|
10045
|
-
function EntryListRoot({ children }) {
|
|
10046
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid", children });
|
|
10047
|
-
}
|
|
10048
|
-
|
|
10049
|
-
function EntryListTrim({ children }) {
|
|
10050
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-lg border border-border1 overflow-clip"), children });
|
|
10051
|
-
}
|
|
10052
|
-
|
|
10053
|
-
const EntryList = Object.assign(EntryListRoot, {
|
|
10054
|
-
Header: EntryListHeader,
|
|
10055
|
-
Trim: EntryListTrim,
|
|
10056
|
-
Entries: EntryListEntries,
|
|
10057
|
-
Entry: EntryListEntry,
|
|
10058
|
-
Message: EntryListMessage,
|
|
10059
|
-
NextPageLoading: EntryListNextPageLoading,
|
|
10060
|
-
Pagination: EntryListPagination,
|
|
10061
|
-
EntryText: EntryListEntryTextCol,
|
|
10062
|
-
EntryStatus: EntryListEntryStatusCol
|
|
10063
|
-
});
|
|
10064
|
-
|
|
10065
|
-
const widths$3 = ["75%", "50%", "65%", "90%", "60%", "80%"];
|
|
10066
|
-
function EntryListEntriesSkeleton({ columns, numberOfRows = 3 }) {
|
|
10067
|
-
const getPseudoRandomWidth = (rowIdx, colIdx) => {
|
|
10068
|
-
const index = (rowIdx + colIdx + (columns?.length || 0) + (numberOfRows || 0)) % widths$3.length;
|
|
10069
|
-
return widths$3[index];
|
|
10070
|
-
};
|
|
10071
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EntryListEntries, { children: Array.from({ length: numberOfRows }).map((_, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx(EntryListEntry, { columns, children: (columns || []).map((col, colIdx) => {
|
|
10072
|
-
const key = `${col.name}-${colIdx}`;
|
|
10073
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10074
|
-
"div",
|
|
10075
|
-
{
|
|
10076
|
-
className: "bg-surface4 rounded-md animate-pulse text-transparent h-4 select-none",
|
|
10077
|
-
style: { width: `${getPseudoRandomWidth(rowIdx, colIdx)}` }
|
|
10078
|
-
},
|
|
10079
|
-
key
|
|
10080
|
-
);
|
|
10081
|
-
}) }, rowIdx)) });
|
|
10082
|
-
}
|
|
10083
|
-
|
|
10084
|
-
function EntryListSkeleton({ columns, numberOfRows }) {
|
|
10085
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EntryList, { children: /* @__PURE__ */ jsxRuntime.jsxs(EntryListTrim, { children: [
|
|
10086
|
-
/* @__PURE__ */ jsxRuntime.jsx(EntryListHeader, { columns }),
|
|
10087
|
-
/* @__PURE__ */ jsxRuntime.jsx(EntryListEntriesSkeleton, { columns, numberOfRows })
|
|
10088
|
-
] }) });
|
|
10089
|
-
}
|
|
10090
|
-
|
|
10091
|
-
function getToNextEntryFn({ entries, id, update }) {
|
|
10092
|
-
const currentIndex = entries.findIndex((entry) => entry.id === id);
|
|
10093
|
-
const thereIsNextItem = currentIndex < entries.length - 1;
|
|
10094
|
-
if (thereIsNextItem) {
|
|
10095
|
-
return () => {
|
|
10096
|
-
const nextItem = entries[currentIndex + 1];
|
|
10097
|
-
update(nextItem.id);
|
|
10098
|
-
};
|
|
10099
|
-
}
|
|
10100
|
-
return void 0;
|
|
10101
|
-
}
|
|
10102
|
-
function getToPreviousEntryFn({ entries, id, update }) {
|
|
10103
|
-
const currentIndex = entries.findIndex((entry) => entry.id === id);
|
|
10104
|
-
const thereIsPreviousItem = currentIndex > 0;
|
|
10105
|
-
if (thereIsPreviousItem) {
|
|
10106
|
-
return () => {
|
|
10107
|
-
const previousItem = entries[currentIndex - 1];
|
|
10108
|
-
update(previousItem.id);
|
|
10109
|
-
};
|
|
10110
|
-
}
|
|
10111
|
-
return void 0;
|
|
10112
|
-
}
|
|
10113
|
-
|
|
10114
9928
|
const JSONSchemaFormContext = React__namespace.createContext(null);
|
|
10115
9929
|
function JSONSchemaFormProvider({
|
|
10116
9930
|
children,
|
|
@@ -13149,15 +12963,17 @@ function SelectDataFilter({
|
|
|
13149
12963
|
] });
|
|
13150
12964
|
}
|
|
13151
12965
|
|
|
13152
|
-
function DataListCell({ children, className, height = "default" }) {
|
|
12966
|
+
function DataListCell({ children, className, height = "default", as, ...rest }) {
|
|
12967
|
+
const Component = as || "span";
|
|
13153
12968
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13154
|
-
|
|
12969
|
+
Component,
|
|
13155
12970
|
{
|
|
13156
12971
|
className: cn(
|
|
13157
12972
|
"relative grid items-center text-ui-md whitespace-nowrap text-neutral3",
|
|
13158
|
-
height === "compact" ? "py-2" : "py-
|
|
12973
|
+
height === "compact" ? "py-2" : "py-3",
|
|
13159
12974
|
className
|
|
13160
12975
|
),
|
|
12976
|
+
...rest,
|
|
13161
12977
|
children
|
|
13162
12978
|
}
|
|
13163
12979
|
);
|
|
@@ -13171,6 +12987,58 @@ function DataListNameCell({ children, className }) {
|
|
|
13171
12987
|
function DataListDescriptionCell({ children, className }) {
|
|
13172
12988
|
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { className: cn("text-neutral2", className), children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }) });
|
|
13173
12989
|
}
|
|
12990
|
+
function getShortId(id) {
|
|
12991
|
+
if (!id) return "";
|
|
12992
|
+
return id.length > 8 ? id.slice(0, 8) : id;
|
|
12993
|
+
}
|
|
12994
|
+
function DataListIdCell({ id }) {
|
|
12995
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd font-mono text-neutral3", children: getShortId(id) });
|
|
12996
|
+
}
|
|
12997
|
+
function DataListSelectCell({ checked, onToggle, ...rest }) {
|
|
12998
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12999
|
+
DataListCell,
|
|
13000
|
+
{
|
|
13001
|
+
as: "label",
|
|
13002
|
+
height: "compact",
|
|
13003
|
+
className: "cursor-pointer justify-items-center rounded-lg transition-colors duration-200 hover:bg-surface4 px-4",
|
|
13004
|
+
onClick: (e) => e.stopPropagation(),
|
|
13005
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13006
|
+
Checkbox,
|
|
13007
|
+
{
|
|
13008
|
+
checked,
|
|
13009
|
+
onCheckedChange: () => {
|
|
13010
|
+
},
|
|
13011
|
+
onClick: (e) => {
|
|
13012
|
+
e.stopPropagation();
|
|
13013
|
+
onToggle(e.shiftKey);
|
|
13014
|
+
},
|
|
13015
|
+
"aria-label": rest["aria-label"]
|
|
13016
|
+
}
|
|
13017
|
+
)
|
|
13018
|
+
}
|
|
13019
|
+
);
|
|
13020
|
+
}
|
|
13021
|
+
function DataListMonoCell({ children, className, height = "compact" }) {
|
|
13022
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height, className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("block text-ui-smd font-mono text-neutral3 truncate", className), children }) });
|
|
13023
|
+
}
|
|
13024
|
+
function toDate$2(value) {
|
|
13025
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
13026
|
+
return isNaN(date.getTime()) ? null : date;
|
|
13027
|
+
}
|
|
13028
|
+
function DataListDateCell({ timestamp }) {
|
|
13029
|
+
const date = toDate$2(timestamp);
|
|
13030
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral2", children: date ? dateFns.isToday(date) ? "Today" : dateFns.format(date, "MMM dd") : "-" });
|
|
13031
|
+
}
|
|
13032
|
+
function DataListTimeCell({ timestamp }) {
|
|
13033
|
+
const date = toDate$2(timestamp);
|
|
13034
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd font-mono text-neutral3 flex", children: date ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13035
|
+
dateFns.format(date, "HH:mm:ss"),
|
|
13036
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-neutral2", children: [
|
|
13037
|
+
".",
|
|
13038
|
+
String(date.getMilliseconds()).padStart(3, "0")
|
|
13039
|
+
] })
|
|
13040
|
+
] }) : "-" });
|
|
13041
|
+
}
|
|
13174
13042
|
|
|
13175
13043
|
function DataListNextPageLoading({
|
|
13176
13044
|
isLoading,
|
|
@@ -13243,30 +13111,80 @@ function DataListRoot({ children, columns, className, scrollRef }) {
|
|
|
13243
13111
|
);
|
|
13244
13112
|
}
|
|
13245
13113
|
|
|
13246
|
-
const
|
|
13247
|
-
"
|
|
13248
|
-
"hover:bg-surface4 hover:border-transparent focus-visible:bg-surface4 focus-visible:border-transparent focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent1",
|
|
13114
|
+
const dataListRowOuterStyles = [
|
|
13115
|
+
"data-list-row col-span-full border-y border-b-border1 border-t-transparent",
|
|
13249
13116
|
"[.data-list-row:hover+&]:border-t-transparent [.data-list-row:focus-visible+&]:border-t-transparent",
|
|
13250
13117
|
"[.data-list-subheader+&]:border-t-transparent",
|
|
13251
13118
|
"[&:has(+.data-list-subheader)]:border-b-transparent",
|
|
13252
13119
|
"[&:not(:has(~.data-list-row))]:border-b-transparent",
|
|
13253
13120
|
"transition-colors duration-200 rounded-lg"
|
|
13254
13121
|
];
|
|
13122
|
+
const dataListRowStyles = [
|
|
13123
|
+
"mx-1 grid grid-cols-subgrid gap-8 px-5 outline-none cursor-pointer",
|
|
13124
|
+
"hover:bg-surface4 hover:border-transparent focus-visible:bg-surface4 focus-visible:border-transparent focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent1",
|
|
13125
|
+
...dataListRowOuterStyles
|
|
13126
|
+
];
|
|
13255
13127
|
|
|
13256
13128
|
const DataListRow = React.forwardRef(({ children, className, ...rest }, ref) => {
|
|
13257
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(...
|
|
13129
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("grid grid-cols-subgrid gap-0 mx-1", ...dataListRowOuterStyles, className), ...rest, children });
|
|
13258
13130
|
});
|
|
13259
13131
|
DataListRow.displayName = "DataListRow";
|
|
13260
13132
|
|
|
13261
13133
|
const DataListRowButton = React.forwardRef(
|
|
13262
|
-
({ children, className, type = "button", ...rest }, ref) => {
|
|
13263
|
-
|
|
13134
|
+
({ children, className, type = "button", flushLeft, flushRight, colStart, colEnd, featured, style, ...rest }, ref) => {
|
|
13135
|
+
const hasColumnOverride = colStart !== void 0 || colEnd !== void 0;
|
|
13136
|
+
const resolvedStyle = hasColumnOverride ? { ...style, gridColumn: `${colStart ?? 1} / ${colEnd ?? -1}` } : style;
|
|
13137
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13138
|
+
"button",
|
|
13139
|
+
{
|
|
13140
|
+
ref,
|
|
13141
|
+
type,
|
|
13142
|
+
className: cn(
|
|
13143
|
+
...dataListRowStyles,
|
|
13144
|
+
"text-left",
|
|
13145
|
+
flushLeft && "ml-0!",
|
|
13146
|
+
flushRight && "mr-0!",
|
|
13147
|
+
featured && "bg-surface4",
|
|
13148
|
+
className
|
|
13149
|
+
),
|
|
13150
|
+
style: resolvedStyle,
|
|
13151
|
+
...rest,
|
|
13152
|
+
children
|
|
13153
|
+
}
|
|
13154
|
+
);
|
|
13264
13155
|
}
|
|
13265
13156
|
);
|
|
13266
13157
|
DataListRowButton.displayName = "DataListRowButton";
|
|
13267
13158
|
|
|
13268
|
-
function DataListRowLink({
|
|
13269
|
-
|
|
13159
|
+
function DataListRowLink({
|
|
13160
|
+
children,
|
|
13161
|
+
to,
|
|
13162
|
+
className,
|
|
13163
|
+
style,
|
|
13164
|
+
LinkComponent: Link,
|
|
13165
|
+
flushLeft,
|
|
13166
|
+
flushRight,
|
|
13167
|
+
colStart,
|
|
13168
|
+
colEnd,
|
|
13169
|
+
featured
|
|
13170
|
+
}) {
|
|
13171
|
+
const hasColumnOverride = colStart !== void 0 || colEnd !== void 0;
|
|
13172
|
+
const resolvedStyle = hasColumnOverride ? { ...style, gridColumn: `${colStart ?? 1} / ${colEnd ?? -1}` } : style;
|
|
13173
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13174
|
+
Link,
|
|
13175
|
+
{
|
|
13176
|
+
href: to,
|
|
13177
|
+
className: cn(
|
|
13178
|
+
...dataListRowStyles,
|
|
13179
|
+
flushLeft && "ml-0!",
|
|
13180
|
+
flushRight && "mr-0!",
|
|
13181
|
+
featured && "bg-surface4",
|
|
13182
|
+
className
|
|
13183
|
+
),
|
|
13184
|
+
style: resolvedStyle,
|
|
13185
|
+
children
|
|
13186
|
+
}
|
|
13187
|
+
);
|
|
13270
13188
|
}
|
|
13271
13189
|
|
|
13272
13190
|
function DataListSpacer({ height }) {
|
|
@@ -13297,12 +13215,13 @@ function DataListSubHeading({ children, className }) {
|
|
|
13297
13215
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-ui-sm text-neutral2 font-normal", className), children });
|
|
13298
13216
|
}
|
|
13299
13217
|
|
|
13300
|
-
function DataListTop({ children, className }) {
|
|
13218
|
+
function DataListTop({ children, className, hasLeadingCell }) {
|
|
13301
13219
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13302
13220
|
"div",
|
|
13303
13221
|
{
|
|
13304
13222
|
className: cn(
|
|
13305
|
-
"grid grid-cols-subgrid gap-
|
|
13223
|
+
"mx-1 grid grid-cols-subgrid gap-8 col-span-full border-b border-border1 px-5 bg-surface2 sticky top-0 z-10",
|
|
13224
|
+
hasLeadingCell && "gap-0 pl-0!",
|
|
13306
13225
|
className
|
|
13307
13226
|
),
|
|
13308
13227
|
children
|
|
@@ -13310,19 +13229,23 @@ function DataListTop({ children, className }) {
|
|
|
13310
13229
|
);
|
|
13311
13230
|
}
|
|
13312
13231
|
|
|
13313
|
-
const DataListTopCell = React.forwardRef(
|
|
13314
|
-
|
|
13315
|
-
"span"
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
className
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
|
|
13232
|
+
const DataListTopCell = React.forwardRef(
|
|
13233
|
+
({ children, className, as, ...rest }, ref) => {
|
|
13234
|
+
const Component = as || "span";
|
|
13235
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13236
|
+
Component,
|
|
13237
|
+
{
|
|
13238
|
+
ref,
|
|
13239
|
+
className: cn(
|
|
13240
|
+
"h-8 py-1 flex items-center uppercase whitespace-nowrap text-neutral2 tracking-widest text-ui-xs",
|
|
13241
|
+
className
|
|
13242
|
+
),
|
|
13243
|
+
...rest,
|
|
13244
|
+
children
|
|
13245
|
+
}
|
|
13246
|
+
);
|
|
13247
|
+
}
|
|
13248
|
+
);
|
|
13326
13249
|
function DataListTopCellWithTooltip({ children, tooltip, className }) {
|
|
13327
13250
|
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
13328
13251
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(DataListTopCell, { className, children }) }),
|
|
@@ -13361,9 +13284,37 @@ function DataListTopCellSmart({
|
|
|
13361
13284
|
}
|
|
13362
13285
|
return /* @__PURE__ */ jsxRuntime.jsx(DataListTopCell, { className: cn("flex [&_svg]:w-[1.3em] [&_svg]:h-[1.3em]", className), children: content });
|
|
13363
13286
|
}
|
|
13287
|
+
function DataListTopSelectCell({ checked, onToggle, ...rest }) {
|
|
13288
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13289
|
+
DataListTopCell,
|
|
13290
|
+
{
|
|
13291
|
+
as: "label",
|
|
13292
|
+
className: "cursor-pointer justify-center rounded-lg transition-colors duration-200 hover:bg-surface4 px-4",
|
|
13293
|
+
onClick: (e) => e.stopPropagation(),
|
|
13294
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked, onCheckedChange: () => onToggle(), "aria-label": rest["aria-label"] })
|
|
13295
|
+
}
|
|
13296
|
+
);
|
|
13297
|
+
}
|
|
13298
|
+
|
|
13299
|
+
const DataListTopCells = React.forwardRef(
|
|
13300
|
+
({ children, className, flushLeft, colStart, style, ...rest }, ref) => {
|
|
13301
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13302
|
+
"div",
|
|
13303
|
+
{
|
|
13304
|
+
ref,
|
|
13305
|
+
className: cn("grid grid-cols-subgrid gap-8 col-span-full px-5", flushLeft && "pl-0!", className),
|
|
13306
|
+
style: colStart ? { ...style, gridColumn: `${colStart} / -1` } : style,
|
|
13307
|
+
...rest,
|
|
13308
|
+
children
|
|
13309
|
+
}
|
|
13310
|
+
);
|
|
13311
|
+
}
|
|
13312
|
+
);
|
|
13313
|
+
DataListTopCells.displayName = "DataListTopCells";
|
|
13364
13314
|
|
|
13365
13315
|
const DataList = Object.assign(DataListRoot, {
|
|
13366
13316
|
Top: DataListTop,
|
|
13317
|
+
TopCells: DataListTopCells,
|
|
13367
13318
|
TopCell: DataListTopCell,
|
|
13368
13319
|
TopCellWithTooltip: DataListTopCellWithTooltip,
|
|
13369
13320
|
TopCellSmart: DataListTopCellSmart,
|
|
@@ -13374,6 +13325,12 @@ const DataList = Object.assign(DataListRoot, {
|
|
|
13374
13325
|
TextCell: DataListTextCell,
|
|
13375
13326
|
NameCell: DataListNameCell,
|
|
13376
13327
|
DescriptionCell: DataListDescriptionCell,
|
|
13328
|
+
IdCell: DataListIdCell,
|
|
13329
|
+
MonoCell: DataListMonoCell,
|
|
13330
|
+
DateCell: DataListDateCell,
|
|
13331
|
+
TimeCell: DataListTimeCell,
|
|
13332
|
+
SelectCell: DataListSelectCell,
|
|
13333
|
+
TopSelectCell: DataListTopSelectCell,
|
|
13377
13334
|
NoMatch: DataListNoMatch,
|
|
13378
13335
|
Subheader: DataListSubheader,
|
|
13379
13336
|
SubHeading: DataListSubHeading,
|
|
@@ -13407,16 +13364,16 @@ function DataListSkeleton({ columns = "auto 1fr auto auto", numberOfRows = 3 })
|
|
|
13407
13364
|
)) });
|
|
13408
13365
|
}
|
|
13409
13366
|
|
|
13410
|
-
function toDate$
|
|
13367
|
+
function toDate$1(value) {
|
|
13411
13368
|
const date = value instanceof Date ? value : new Date(value);
|
|
13412
13369
|
return isNaN(date.getTime()) ? null : date;
|
|
13413
13370
|
}
|
|
13414
13371
|
function ScoresDataListDateCell({ timestamp }) {
|
|
13415
|
-
const date = toDate$
|
|
13372
|
+
const date = toDate$1(timestamp);
|
|
13416
13373
|
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral2", children: date ? dateFns.isToday(date) ? "Today" : dateFns.format(date, "MMM dd") : "-" });
|
|
13417
13374
|
}
|
|
13418
13375
|
function ScoresDataListTimeCell({ timestamp }) {
|
|
13419
|
-
const date = toDate$
|
|
13376
|
+
const date = toDate$1(timestamp);
|
|
13420
13377
|
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral3", children: date ? dateFns.format(date, "h:mm:ss aaa") : "-" });
|
|
13421
13378
|
}
|
|
13422
13379
|
function ScoresDataListInputCell({ input }) {
|
|
@@ -13446,31 +13403,6 @@ const ScoresDataList = Object.assign(ScoresDataListRoot, {
|
|
|
13446
13403
|
ScoreCell: ScoresDataListScoreCell
|
|
13447
13404
|
});
|
|
13448
13405
|
|
|
13449
|
-
function toDate$2(value) {
|
|
13450
|
-
const date = value instanceof Date ? value : new Date(value);
|
|
13451
|
-
return isNaN(date.getTime()) ? null : date;
|
|
13452
|
-
}
|
|
13453
|
-
function getShortId(id) {
|
|
13454
|
-
if (!id) return "";
|
|
13455
|
-
return id.length > 8 ? id.slice(0, 8) : id;
|
|
13456
|
-
}
|
|
13457
|
-
function TracesDataListIdCell({ traceId }) {
|
|
13458
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd font-mono text-neutral3", children: getShortId(traceId) });
|
|
13459
|
-
}
|
|
13460
|
-
function TracesDataListDateCell({ timestamp }) {
|
|
13461
|
-
const date = toDate$2(timestamp);
|
|
13462
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral2", children: date ? dateFns.isToday(date) ? "Today" : dateFns.format(date, "MMM dd") : "-" });
|
|
13463
|
-
}
|
|
13464
|
-
function TracesDataListTimeCell({ timestamp }) {
|
|
13465
|
-
const date = toDate$2(timestamp);
|
|
13466
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd font-mono text-neutral3 flex", children: date ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13467
|
-
dateFns.format(date, "HH:mm:ss"),
|
|
13468
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-neutral2", children: [
|
|
13469
|
-
".",
|
|
13470
|
-
String(date.getMilliseconds()).padStart(3, "0")
|
|
13471
|
-
] })
|
|
13472
|
-
] }) : "-" });
|
|
13473
|
-
}
|
|
13474
13406
|
function TracesDataListNameCell({ name, parentSpanId, showLevelTooltip }) {
|
|
13475
13407
|
const isRoot = parentSpanId == null;
|
|
13476
13408
|
const Icon = isRoot ? lucideReact.ListTreeIcon : lucideReact.CornerDownRightIcon;
|
|
@@ -13485,7 +13417,7 @@ function TracesDataListNameCell({ name, parentSpanId, showLevelTooltip }) {
|
|
|
13485
13417
|
] });
|
|
13486
13418
|
}
|
|
13487
13419
|
function TracesDataListInputCell({ input }) {
|
|
13488
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13420
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DataListMonoCell, { children: input || "-" });
|
|
13489
13421
|
}
|
|
13490
13422
|
function EntityTypeIcon$1({ entityType, className }) {
|
|
13491
13423
|
const iconClass = cn("size-3.5 shrink-0 text-neutral2", className);
|
|
@@ -13530,9 +13462,9 @@ const TracesDataList = Object.assign(TracesDataListRoot, {
|
|
|
13530
13462
|
Subheader: DataListSubheader,
|
|
13531
13463
|
SubHeading: DataListSubHeading,
|
|
13532
13464
|
Spacer: DataListSpacer,
|
|
13533
|
-
IdCell:
|
|
13534
|
-
DateCell:
|
|
13535
|
-
TimeCell:
|
|
13465
|
+
IdCell: DataListIdCell,
|
|
13466
|
+
DateCell: DataListDateCell,
|
|
13467
|
+
TimeCell: DataListTimeCell,
|
|
13536
13468
|
NameCell: TracesDataListNameCell,
|
|
13537
13469
|
InputCell: TracesDataListInputCell,
|
|
13538
13470
|
EntityCell: TracesDataListEntityCell,
|
|
@@ -13755,10 +13687,6 @@ function EntityListSkeleton({ columns, numberOfRows = 3 }) {
|
|
|
13755
13687
|
)) });
|
|
13756
13688
|
}
|
|
13757
13689
|
|
|
13758
|
-
function toDate$1(value) {
|
|
13759
|
-
const date = value instanceof Date ? value : new Date(value);
|
|
13760
|
-
return isNaN(date.getTime()) ? null : date;
|
|
13761
|
-
}
|
|
13762
13690
|
const LEVEL_CONFIG = {
|
|
13763
13691
|
debug: { label: "DEBUG", color: "#71717a" },
|
|
13764
13692
|
info: { label: "INFO", color: "#60a5fa" },
|
|
@@ -13770,20 +13698,6 @@ function LogsDataListLevelCell({ level }) {
|
|
|
13770
13698
|
const config = LEVEL_CONFIG[level];
|
|
13771
13699
|
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "uppercase text-ui-sm font-semibold", style: { color: config.color }, children: config.label }) });
|
|
13772
13700
|
}
|
|
13773
|
-
function LogsDataListDateCell({ timestamp }) {
|
|
13774
|
-
const date = toDate$1(timestamp);
|
|
13775
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral2", children: date ? dateFns.isToday(date) ? "Today" : dateFns.format(date, "MMM dd") : "-" });
|
|
13776
|
-
}
|
|
13777
|
-
function LogsDataListTimeCell({ timestamp }) {
|
|
13778
|
-
const date = toDate$1(timestamp);
|
|
13779
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd font-mono text-neutral3 flex", children: date ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13780
|
-
dateFns.format(date, "HH:mm:ss"),
|
|
13781
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-neutral2", children: [
|
|
13782
|
-
".",
|
|
13783
|
-
String(date.getMilliseconds()).padStart(3, "0")
|
|
13784
|
-
] })
|
|
13785
|
-
] }) : "-" });
|
|
13786
|
-
}
|
|
13787
13701
|
function EntityTypeIcon({ entityType, className }) {
|
|
13788
13702
|
const iconClass = cn("size-3.5 shrink-0 text-neutral2", className);
|
|
13789
13703
|
switch (entityType) {
|
|
@@ -13819,7 +13733,7 @@ function LogsDataListDataCell({ data }) {
|
|
|
13819
13733
|
return `${k}: <unserializable>`;
|
|
13820
13734
|
}
|
|
13821
13735
|
}).join(", ");
|
|
13822
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13736
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DataListMonoCell, { children: summary });
|
|
13823
13737
|
}
|
|
13824
13738
|
|
|
13825
13739
|
const LogsDataList = Object.assign(DataListRoot, {
|
|
@@ -13832,8 +13746,8 @@ const LogsDataList = Object.assign(DataListRoot, {
|
|
|
13832
13746
|
RowLink: DataListRowLink,
|
|
13833
13747
|
Spacer: DataListSpacer,
|
|
13834
13748
|
NoMatch: DataListNoMatch,
|
|
13835
|
-
DateCell:
|
|
13836
|
-
TimeCell:
|
|
13749
|
+
DateCell: DataListDateCell,
|
|
13750
|
+
TimeCell: DataListTimeCell,
|
|
13837
13751
|
LevelCell: LogsDataListLevelCell,
|
|
13838
13752
|
EntityCell: LogsDataListEntityCell,
|
|
13839
13753
|
MessageCell: LogsDataListMessageCell,
|
|
@@ -15192,8 +15106,8 @@ function MetricsDataTable({
|
|
|
15192
15106
|
"span",
|
|
15193
15107
|
{
|
|
15194
15108
|
className: cn(
|
|
15195
|
-
"h-9 py-1 flex items-center border-b border-surface5 uppercase whitespace-nowrap text-neutral2 tracking-widest text-ui-xs sticky top-0 z-10 bg-
|
|
15196
|
-
i === 0 ? "text-left sticky left-0 z-20 bg-
|
|
15109
|
+
"h-9 py-1 flex items-center border-b border-surface5 uppercase whitespace-nowrap text-neutral2 tracking-widest text-ui-xs sticky top-0 z-10 bg-surface3",
|
|
15110
|
+
i === 0 ? "text-left sticky left-0 z-20 bg-surface3 pr-4 after:absolute after:right-1 after:top-1/2 after:-translate-y-1/2 after:h-3/5 after:w-px after:bg-surface5" : "px-4 text-right"
|
|
15197
15111
|
),
|
|
15198
15112
|
children: col.label
|
|
15199
15113
|
},
|
|
@@ -15210,7 +15124,7 @@ function MetricsDataTable({
|
|
|
15210
15124
|
const cellClasses = cn(
|
|
15211
15125
|
"h-10 flex items-center text-ui-sm whitespace-nowrap border-t border-surface5",
|
|
15212
15126
|
rowIndex === 0 && "border-t-transparent",
|
|
15213
|
-
i === 0 ? "text-left text-neutral3 sticky left-0 z-10 bg-
|
|
15127
|
+
i === 0 ? "text-left text-neutral3 sticky left-0 z-10 bg-surface3 pr-4 after:absolute after:right-1 after:top-1/2 after:-translate-y-1/2 after:h-3/5 after:w-px after:bg-surface5" : cn(
|
|
15214
15128
|
"px-4 text-right tabular-nums",
|
|
15215
15129
|
col.highlight ? "text-neutral4 font-semibold" : "text-neutral3"
|
|
15216
15130
|
),
|
|
@@ -20358,7 +20272,8 @@ function TracesListView({
|
|
|
20358
20272
|
ref: virtualizer.measureElement,
|
|
20359
20273
|
"data-index": vi.index,
|
|
20360
20274
|
onClick: () => onTraceClick(trace),
|
|
20361
|
-
|
|
20275
|
+
featured: isFeatured,
|
|
20276
|
+
className: cn(isRecentlyAdded && "animate-row-highlight"),
|
|
20362
20277
|
children: [
|
|
20363
20278
|
/* @__PURE__ */ jsxRuntime.jsx(TracesDataList.DateCell, { timestamp: displayDate }),
|
|
20364
20279
|
/* @__PURE__ */ jsxRuntime.jsx(TracesDataList.TimeCell, { timestamp: displayDate }),
|
|
@@ -21526,7 +21441,7 @@ function LogsListView({
|
|
|
21526
21441
|
ref: virtualizer.measureElement,
|
|
21527
21442
|
"data-index": vi.index,
|
|
21528
21443
|
onClick: () => onLogClick(log),
|
|
21529
|
-
|
|
21444
|
+
featured: isFeatured,
|
|
21530
21445
|
children: [
|
|
21531
21446
|
/* @__PURE__ */ jsxRuntime.jsx(LogsDataList.DateCell, { timestamp: log.timestamp }),
|
|
21532
21447
|
/* @__PURE__ */ jsxRuntime.jsx(LogsDataList.TimeCell, { timestamp: log.timestamp }),
|
|
@@ -22138,8 +22053,6 @@ exports.EntityListSkeleton = EntityListSkeleton;
|
|
|
22138
22053
|
exports.EntityName = EntityName;
|
|
22139
22054
|
exports.Entry = Entry;
|
|
22140
22055
|
exports.EntryCell = EntryCell;
|
|
22141
|
-
exports.EntryList = EntryList;
|
|
22142
|
-
exports.EntryListSkeleton = EntryListSkeleton;
|
|
22143
22056
|
exports.EnvIcon = EnvIcon;
|
|
22144
22057
|
exports.ErrorBoundary = ErrorBoundary;
|
|
22145
22058
|
exports.ErrorState = ErrorState;
|
|
@@ -22417,7 +22330,6 @@ exports.formatJSON = formatJSON;
|
|
|
22417
22330
|
exports.generateDefaultValues = generateDefaultValues;
|
|
22418
22331
|
exports.getAllSpanIds = getAllSpanIds;
|
|
22419
22332
|
exports.getChildFieldOptions = getChildFieldOptions;
|
|
22420
|
-
exports.getColumnTemplate = getColumnTemplate;
|
|
22421
22333
|
exports.getFieldOptionAtPath = getFieldOptionAtPath;
|
|
22422
22334
|
exports.getFieldOptionsFromSchema = getFieldOptionsFromSchema;
|
|
22423
22335
|
exports.getFileContentType = getFileContentType;
|
|
@@ -22433,9 +22345,7 @@ exports.getShortId = getShortId$1;
|
|
|
22433
22345
|
exports.getSpanDescendantIds = getSpanDescendantIds;
|
|
22434
22346
|
exports.getSpanTypeUi = getSpanTypeUi;
|
|
22435
22347
|
exports.getStatusIcon = getStatusIcon;
|
|
22436
|
-
exports.getToNextEntryFn = getToNextEntryFn;
|
|
22437
22348
|
exports.getToNextItemFn = getToNextItemFn;
|
|
22438
|
-
exports.getToPreviousEntryFn = getToPreviousEntryFn;
|
|
22439
22349
|
exports.getToPreviousItemFn = getToPreviousItemFn;
|
|
22440
22350
|
exports.getTokenLimitMessage = getTokenLimitMessage;
|
|
22441
22351
|
exports.getTracePropertyFilterTokens = getTracePropertyFilterTokens;
|