@parallelworks/ui 0.16.0 → 0.18.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/LICENSE +202 -21
- package/dist/chunks/{CodePreviewEditor-DuMZMA_k.js → CodePreviewEditor-4lx3kE-w.js} +2 -2
- package/dist/chunks/{CreateModal-B7smkHkv.js → CreateModal-BY6DLmur.js} +11 -11
- package/dist/chunks/{lib-CUTRDpa6.js → FieldWrapper-Bef01EWO.js} +49 -48
- package/dist/chunks/{Monaco-BXDH2jVj.js → Monaco-C1POOdVv.js} +485 -172
- package/dist/chunks/{PageHeader-CoZWF0pJ.js → PageHeader-l49p1nM9.js} +145 -82
- package/dist/chunks/{Provider-CbFVFB7O.js → Provider-Ghua9PkN.js} +34 -6
- package/dist/chunks/{StatusBadge-zvEtK16a.js → StatusBadge-C1Blx_cW.js} +23 -6
- package/dist/chunks/{SwitchToggle-3V836Cn7.js → SwitchToggle-CHPP8uZQ.js} +17 -14
- package/dist/chunks/{Table-CutP1bRt.js → Table-4OHjdKdO.js} +2 -2
- package/dist/chunks/{Tooltip-n9w7Tkt1.js → Tooltip-Crxo_eU_.js} +3 -3
- package/dist/chunks/{editor-Ko3zX22Y.js → editor-9_uVtUyy.js} +4 -4
- package/dist/chunks/{list-CduoUsMW.js → list-qrojZZNv.js} +146 -33
- package/dist/components/AddMenu.d.ts +1 -0
- package/dist/components/Avatar.d.ts +13 -0
- package/dist/components/Button.d.ts +2 -1
- package/dist/components/Dropdown.d.ts +2 -0
- package/dist/components/Provider.d.ts +59 -2
- package/dist/components/SectionHeader.d.ts +3 -1
- package/dist/components/StatusBadge.d.ts +7 -2
- package/dist/components/relativeTime.d.ts +15 -0
- package/dist/editor/index.js +1 -1
- package/dist/editor/usesGitlab.d.ts +97 -0
- package/dist/file-explorer/index.js +275 -274
- package/dist/file-explorer/lib/paging.d.ts +27 -28
- package/dist/file-explorer/lib/types.d.ts +0 -1
- package/dist/file-explorer/lib/utils.d.ts +16 -5
- package/dist/form/FieldWrapper.d.ts +2 -1
- package/dist/form/Form.d.ts +3 -1
- package/dist/form/index.js +23 -21
- package/dist/form/types/fieldComponentTypes.d.ts +1 -0
- package/dist/form/types/fieldTypes.d.ts +4 -4
- package/dist/form/types/workflow-schema.d.ts +38 -0
- package/dist/form/useParsedOpts.d.ts +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +3 -3
- package/dist/index.d.ts +5 -2
- package/dist/index.js +49 -18
- package/dist/list/ListPage.d.ts +3 -1
- package/dist/list/ListPager.d.ts +3 -1
- package/dist/list/ListTable.d.ts +2 -1
- package/dist/list/RowContextMenu.d.ts +9 -9
- package/dist/list/UserHoverCard.d.ts +45 -0
- package/dist/list/index.d.ts +2 -1
- package/dist/list/index.js +3 -3
- package/dist/list/listView.d.ts +1 -1
- package/dist/logviewer/index.js +7 -7
- package/dist/styles/Geist-Variable.woff2 +0 -0
- package/dist/styles/GeistMono-Variable.woff2 +0 -0
- package/dist/styles/base.css +57 -0
- package/dist/styles/fonts.css +15 -0
- package/dist/styles/theme.css +6 -40
- package/dist/styles.css +1 -1
- package/dist/workflow/DependencyGraph.d.ts +2 -0
- package/dist/workflow/index.d.ts +1 -0
- package/dist/workflow/index.js +10 -9
- package/dist/workflow/types.d.ts +5 -0
- package/package.json +12 -11
- package/dist/chunks/{BareModal-BqroLbZ5.js → BareModal-BtRiQezg.js} +1 -1
package/dist/index.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { DEFAULT_PRESET, THEME_PRESETS, THEME_TOKENS, applyTheme, contrastRatio, deriveTheme, isDarkColor } from "./theme/index.js";
|
|
2
|
+
import { a as usePersistedState, c as useRunFile, d as useWorkflowJsonResolver, i as useNotify, l as useSlots, n as useLink, o as useProvisionCorsRules, r as useNavigation, s as useRepoSuggestions, t as UIProvider, u as useStrings } from "./chunks/Provider-Ghua9PkN.js";
|
|
3
|
+
import { C as useSetDefaultBreadcrumbs, E as avatarInitials, S as useSetBreadcrumbs, T as Avatar, a as HeaderAddButton, b as useClearBreadcrumbs, c as PageHeader, i as HeaderActionMenu, l as headerActionButtonClasses, n as BreadcrumbsRightAction, o as HeaderEditButton, r as BreadcrumbsTitleAction, s as HeaderRowMenu, t as BreadcrumbsActionButton, v as BreadcrumbProvider, w as AddMenu, x as useHideBreadcrumbs, y as useBreadcrumb } from "./chunks/PageHeader-l49p1nM9.js";
|
|
2
4
|
import { AlertIcon, AngleRightIcon, EyeIcon, EyeOffIcon, FilterIcon, LoaderIcon, SortDownIcon, SortUnsortedIcon, SortUpIcon } from "./icons.js";
|
|
3
|
-
import { a as CreateModalSelect, c as ConfirmModal, d as primaryButtonClasses, f as Markdown, h as Callout, i as CreateModalField, l as dangerButtonClasses, m as CopyToClipboard, n as CreateModal, o as CreateModalSwitch, p as CopyCodeBlock, r as CreateModalAutocompleteField, s as CreateModalTextarea, t as CREATE_MODAL_SELECT_FILTER_THRESHOLD, u as ghostButtonClasses } from "./chunks/CreateModal-
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import { a as UncontrolledCollapsiblePanel, c as Dropdown, i as MaybeCollapsible, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "./chunks/SwitchToggle-3V836Cn7.js";
|
|
5
|
+
import { a as CreateModalSelect, c as ConfirmModal, d as primaryButtonClasses, f as Markdown, h as Callout, i as CreateModalField, l as dangerButtonClasses, m as CopyToClipboard, n as CreateModal, o as CreateModalSwitch, p as CopyCodeBlock, r as CreateModalAutocompleteField, s as CreateModalTextarea, t as CREATE_MODAL_SELECT_FILTER_THRESHOLD, u as ghostButtonClasses } from "./chunks/CreateModal-BY6DLmur.js";
|
|
6
|
+
import { a as truncationTooltipProps, i as formatTooltipContent, n as TOOLTIP_ID, r as TooltipInfo, t as GlobalTooltip } from "./chunks/Tooltip-Crxo_eU_.js";
|
|
7
|
+
import { a as filterOption, c as isCategory, i as DropdownCaret, l as isOption, n as StatusDot, r as statusTextClass, s as flattenOptions, t as StatusBadge, u as toggleSetMember } from "./chunks/StatusBadge-C1Blx_cW.js";
|
|
8
|
+
import { a as UncontrolledCollapsiblePanel, c as Dropdown, i as MaybeCollapsible, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "./chunks/SwitchToggle-CHPP8uZQ.js";
|
|
8
9
|
import { t as Loader } from "./chunks/Loader-BXoXTZGc.js";
|
|
9
|
-
import { n as modalPanelClasses, t as BareModal } from "./chunks/BareModal-
|
|
10
|
-
import { C as useSetDefaultBreadcrumbs, S as useSetBreadcrumbs, a as HeaderAddButton, b as useClearBreadcrumbs, c as PageHeader, i as HeaderActionMenu, l as headerActionButtonClasses, n as BreadcrumbsRightAction, o as HeaderEditButton, r as BreadcrumbsTitleAction, s as HeaderRowMenu, t as BreadcrumbsActionButton, v as BreadcrumbProvider, w as AddMenu, x as useHideBreadcrumbs, y as useBreadcrumb } from "./chunks/PageHeader-CoZWF0pJ.js";
|
|
10
|
+
import { n as modalPanelClasses, t as BareModal } from "./chunks/BareModal-BtRiQezg.js";
|
|
11
11
|
import { t as useCssIsDark } from "./chunks/useCssIsDark-DHr05dG2.js";
|
|
12
12
|
import { t as Indicator } from "./chunks/Indicator-hBSIxOPK.js";
|
|
13
13
|
import { t as SwitchToggleSmall } from "./chunks/SwitchToggleSmall-FcsaYSTs.js";
|
|
14
|
-
import { n as Table, t as CompactTable } from "./chunks/Table-
|
|
14
|
+
import { n as Table, t as CompactTable } from "./chunks/Table-4OHjdKdO.js";
|
|
15
15
|
import { t as RequiredMark } from "./chunks/RequiredMark-DfLdYbYZ.js";
|
|
16
16
|
import cx from "classnames";
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
17
|
+
import React, { forwardRef, useEffect, useId, useState } from "react";
|
|
18
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
19
19
|
import Skeleton from "react-loading-skeleton";
|
|
20
|
+
import { DateTime } from "luxon";
|
|
20
21
|
//#region src/components/DescriptionList.tsx
|
|
21
22
|
function DescriptionListItem({ label, children, tooltip, className, ...props }) {
|
|
22
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("dt", {
|
|
23
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("dt", {
|
|
23
24
|
className: cx("text-[13px] leading-6 col-span-1 font-normal flex gap-1", className),
|
|
24
25
|
children: [/* @__PURE__ */ jsx("span", {
|
|
25
26
|
className: "min-w-0 truncate",
|
|
@@ -94,7 +95,7 @@ function Overview({ Icon, name, type, children, right, className, loading, iconS
|
|
|
94
95
|
children: loading ? /* @__PURE__ */ jsx(Skeleton, {
|
|
95
96
|
count: 2,
|
|
96
97
|
height: 12
|
|
97
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
98
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
98
99
|
/* @__PURE__ */ jsx("div", {
|
|
99
100
|
className: "font-semibold text-xl tracking-tight",
|
|
100
101
|
children: name
|
|
@@ -114,6 +115,34 @@ function Overview({ Icon, name, type, children, right, className, loading, iconS
|
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
117
|
//#endregion
|
|
118
|
+
//#region src/components/relativeTime.ts
|
|
119
|
+
var TICK_MS = 3e4;
|
|
120
|
+
function compactRelativeMinutes(minutes, t) {
|
|
121
|
+
if (!Number.isFinite(minutes) || minutes < 1) return t.now;
|
|
122
|
+
if (minutes < 60) return t.minutes(minutes);
|
|
123
|
+
const hours = Math.floor(minutes / 60);
|
|
124
|
+
if (hours < 24) return t.hours(hours);
|
|
125
|
+
const days = Math.floor(hours / 24);
|
|
126
|
+
if (days < 365) return t.days(days);
|
|
127
|
+
return t.years(Math.floor(days / 365));
|
|
128
|
+
}
|
|
129
|
+
/** A clock that re-reads itself, so "5m" ages while the page sits open, with
|
|
130
|
+
* the abbreviated form a row has room for. */
|
|
131
|
+
function useRelativeTime() {
|
|
132
|
+
const t = useStrings().time;
|
|
133
|
+
const [now, setNow] = useState(() => DateTime.now());
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
const id = setInterval(() => setNow(DateTime.now()), TICK_MS);
|
|
136
|
+
return () => clearInterval(id);
|
|
137
|
+
}, []);
|
|
138
|
+
const compactMinutes = (minutes) => compactRelativeMinutes(minutes, t);
|
|
139
|
+
return {
|
|
140
|
+
now,
|
|
141
|
+
compactMinutes,
|
|
142
|
+
compact: (iso) => iso ? compactMinutes(Math.floor(now.diff(DateTime.fromISO(iso)).as("minutes"))) : ""
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
//#endregion
|
|
117
146
|
//#region src/components/Button.tsx
|
|
118
147
|
var Button = forwardRef(({ children, variant = "primary", size = "default", loading, icon, iconPosition = "right", fullWidth = true, className = "", disabled, ...props }, ref) => {
|
|
119
148
|
const baseClasses = "inline-flex items-center justify-center gap-2 font-semibold rounded-lg transition-all duration-200 cursor-pointer border-none mt-2 disabled:opacity-50 disabled:cursor-not-allowed";
|
|
@@ -135,7 +164,7 @@ var Button = forwardRef(({ children, variant = "primary", size = "default", load
|
|
|
135
164
|
disabled: disabled || loading,
|
|
136
165
|
className: cx(baseClasses, variantClasses[variant], sizeClasses[size], widthClass, className),
|
|
137
166
|
...props,
|
|
138
|
-
children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(LoaderIcon, { className: "size-[18px]" }), children] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
167
|
+
children: loading ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(LoaderIcon, { className: "size-[18px]" }), children] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
139
168
|
icon && iconPosition === "left" && /* @__PURE__ */ jsx("span", {
|
|
140
169
|
className: "flex items-center",
|
|
141
170
|
children: icon
|
|
@@ -149,10 +178,11 @@ var Button = forwardRef(({ children, variant = "primary", size = "default", load
|
|
|
149
178
|
});
|
|
150
179
|
});
|
|
151
180
|
Button.displayName = "Button";
|
|
152
|
-
function MethodButton({ icon, label, description, href, className = "", ...props }) {
|
|
181
|
+
function MethodButton({ icon, label, description, href, loading, disabled, className = "", ...props }) {
|
|
153
182
|
const Link = useLink();
|
|
154
183
|
const baseClasses = "flex items-center w-full p-4 bg-[var(--theme-muted-panel-bg)] border border-[var(--theme-border)] rounded-xl text-[var(--theme-app)] text-[0.9375rem] font-medium cursor-pointer transition-all duration-200 no-underline mb-3 last:mb-0 hover:bg-[var(--theme-border)] hover:border-[var(--theme-muted-text-color)] hover:-translate-y-0.5 active:translate-y-0";
|
|
155
|
-
const
|
|
184
|
+
const disabledClasses = "disabled:opacity-60 disabled:cursor-not-allowed disabled:hover:bg-[var(--ds-muted)] disabled:hover:border-[var(--ds-border)] disabled:hover:translate-y-0";
|
|
185
|
+
const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
156
186
|
icon && /* @__PURE__ */ jsx("span", {
|
|
157
187
|
className: "size-10 rounded-lg bg-gradient-to-br from-[var(--gradient-start,var(--theme-element))] to-[var(--gradient-mid,var(--theme-link))] flex items-center justify-center shrink-0 mr-4 [&_svg]:size-5 [&_svg]:text-white",
|
|
158
188
|
children: icon
|
|
@@ -167,7 +197,7 @@ function MethodButton({ icon, label, description, href, className = "", ...props
|
|
|
167
197
|
children: description
|
|
168
198
|
})]
|
|
169
199
|
}),
|
|
170
|
-
/* @__PURE__ */ jsx(AngleRightIcon, { className: "size-5 text-[var(--theme-muted-text-color)] shrink-0 ml-2 transition-all duration-200 group-hover:translate-x-[3px] group-hover:text-[var(--theme-app)]" })
|
|
200
|
+
loading ? /* @__PURE__ */ jsx(LoaderIcon, { className: "size-5 text-[var(--theme-muted-text-color)] shrink-0 ml-2" }) : /* @__PURE__ */ jsx(AngleRightIcon, { className: "size-5 text-[var(--theme-muted-text-color)] shrink-0 ml-2 transition-all duration-200 group-hover:translate-x-[3px] group-hover:text-[var(--theme-app)]" })
|
|
171
201
|
] });
|
|
172
202
|
if (href) {
|
|
173
203
|
if (href.startsWith("/api/") || href.startsWith("http")) return /* @__PURE__ */ jsx("a", {
|
|
@@ -183,7 +213,8 @@ function MethodButton({ icon, label, description, href, className = "", ...props
|
|
|
183
213
|
}
|
|
184
214
|
return /* @__PURE__ */ jsx("button", {
|
|
185
215
|
type: "button",
|
|
186
|
-
className: cx("group", baseClasses, className),
|
|
216
|
+
className: cx("group", baseClasses, disabledClasses, className),
|
|
217
|
+
disabled: disabled || loading,
|
|
187
218
|
...props,
|
|
188
219
|
children: content
|
|
189
220
|
});
|
|
@@ -566,4 +597,4 @@ function SettingModeOption({ name, checked, onSelect, label, description, isFirs
|
|
|
566
597
|
});
|
|
567
598
|
}
|
|
568
599
|
//#endregion
|
|
569
|
-
export { AddMenu, BareModal, BreadcrumbProvider, BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, Button, CREATE_MODAL_SELECT_FILTER_THRESHOLD, Callout, Card, CardHeader, CompactTable, ConfirmModal, ControlledCollapsiblePanel, CopyCodeBlock, CopyToClipboard, CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, CreateModalSwitch, CreateModalTextarea, CustomListbox, DEFAULT_PRESET, DescriptionList, DescriptionListItem, Dropdown, DropdownCaret, EmptyState, Filter, FilterPill, GlobalTooltip, HeaderActionMenu, HeaderAddButton, HeaderEditButton, HeaderRowMenu, IconButton, Indicator, Input, LetterBadge, Loader, Markdown, MaybeCollapsible, MethodButton, MultiSelectDropdown, Overview, PageHeader, Pagination, RequiredMark, SectionHeader, SettingModeOption, SettingRow, SettingSection, SettingsCard, SettingsGroup, Sort, StatusBadge, StatusDot, SwitchToggle, SwitchToggleSmall, THEME_PRESETS, THEME_TOKENS, TOOLTIP_ID, Table, Textarea, Toggle, TooltipInfo, UIProvider, UncontrolledCollapsiblePanel, applyTheme, contrastRatio, dangerButtonClasses, deriveTheme, filterOption, flattenOptions, formatTooltipContent, ghostButtonClasses, headerActionButtonClasses, inputClasses, isCategory, isDarkColor, isOption, modalPanelClasses, primaryButtonClasses, toggleSetMember, truncationTooltipProps, useBreadcrumb, useClearBreadcrumbs, useCssIsDark, useHideBreadcrumbs, useNavigation, useNotify, useProvisionCorsRules, useRunFile, useSetBreadcrumbs, useSetDefaultBreadcrumbs, useSlots, useStrings, useWorkflowJsonResolver };
|
|
600
|
+
export { AddMenu, Avatar, BareModal, BreadcrumbProvider, BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, Button, CREATE_MODAL_SELECT_FILTER_THRESHOLD, Callout, Card, CardHeader, CompactTable, ConfirmModal, ControlledCollapsiblePanel, CopyCodeBlock, CopyToClipboard, CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, CreateModalSwitch, CreateModalTextarea, CustomListbox, DEFAULT_PRESET, DescriptionList, DescriptionListItem, Dropdown, DropdownCaret, EmptyState, Filter, FilterPill, GlobalTooltip, HeaderActionMenu, HeaderAddButton, HeaderEditButton, HeaderRowMenu, IconButton, Indicator, Input, LetterBadge, Loader, Markdown, MaybeCollapsible, MethodButton, MultiSelectDropdown, Overview, PageHeader, Pagination, RequiredMark, SectionHeader, SettingModeOption, SettingRow, SettingSection, SettingsCard, SettingsGroup, Sort, StatusBadge, StatusDot, SwitchToggle, SwitchToggleSmall, THEME_PRESETS, THEME_TOKENS, TOOLTIP_ID, Table, Textarea, Toggle, TooltipInfo, UIProvider, UncontrolledCollapsiblePanel, applyTheme, avatarInitials, contrastRatio, dangerButtonClasses, deriveTheme, filterOption, flattenOptions, formatTooltipContent, ghostButtonClasses, headerActionButtonClasses, inputClasses, isCategory, isDarkColor, isOption, modalPanelClasses, primaryButtonClasses, statusTextClass, toggleSetMember, truncationTooltipProps, useBreadcrumb, useClearBreadcrumbs, useCssIsDark, useHideBreadcrumbs, useNavigation, useNotify, usePersistedState, useProvisionCorsRules, useRelativeTime, useRepoSuggestions, useRunFile, useSetBreadcrumbs, useSetDefaultBreadcrumbs, useSlots, useStrings, useWorkflowJsonResolver };
|
package/dist/list/ListPage.d.ts
CHANGED
|
@@ -41,8 +41,10 @@ export interface PinnedRowAction {
|
|
|
41
41
|
/** Replaces the label on hover when the action is disabled, explaining why. */
|
|
42
42
|
tooltip?: string | undefined;
|
|
43
43
|
}
|
|
44
|
-
export declare function ListRow({ href, items, goTo, openMenu, pinnedActions, selected, selectionActive, onRowSelect, leading, className, children, }: {
|
|
44
|
+
export declare function ListRow({ href, onActivate, items, goTo, openMenu, pinnedActions, selected, selectionActive, onRowSelect, leading, className, children, }: {
|
|
45
45
|
href: string | null;
|
|
46
|
+
/** Plain-click handler for rows that open something in place instead of navigating. */
|
|
47
|
+
onActivate?: (() => void) | undefined;
|
|
46
48
|
items: RowMenuItem[];
|
|
47
49
|
goTo: (to: string) => void;
|
|
48
50
|
openMenu: OpenMenu;
|
package/dist/list/ListPager.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/** Page sizes offered by the pager's per-page select; first entry is the default. */
|
|
2
2
|
export declare const LIST_PAGE_SIZES: readonly [number, ...number[]];
|
|
3
3
|
/** Footer pager bar for paginated new-nav lists: "{start}–{end} of {total}" with prev/next. Renders nothing for a single page. */
|
|
4
|
-
export declare function ListPager({ page, pageSize, total, onPageChange, pageSizes, onPageSizeChange, }: {
|
|
4
|
+
export declare function ListPager({ page, pageSize, total, onPageChange, pageSizes, onPageSizeChange, hasNext, }: {
|
|
5
5
|
page: number;
|
|
6
6
|
pageSize: number;
|
|
7
7
|
total: number;
|
|
8
8
|
onPageChange: (page: number) => void;
|
|
9
|
+
/** Cursor lists whose `total` is a capped count pass this so paging doesn't stop at the cap. */
|
|
10
|
+
hasNext?: boolean | undefined;
|
|
9
11
|
/** Selectable page sizes; shown only when onPageSizeChange is provided. */
|
|
10
12
|
pageSizes?: readonly number[];
|
|
11
13
|
onPageSizeChange?: (size: number) => void;
|
package/dist/list/ListTable.d.ts
CHANGED
|
@@ -18,12 +18,13 @@ export declare const listTableFixedProps: {
|
|
|
18
18
|
readonly tbodyClassName: 'divide-y border-b border-(--theme-border) divide-(--theme-border)';
|
|
19
19
|
readonly className: string;
|
|
20
20
|
};
|
|
21
|
-
export declare function NameCell({ icon, name, subtitle, href, badge, }: {
|
|
21
|
+
export declare function NameCell({ icon, name, subtitle, href, badge, title, }: {
|
|
22
22
|
icon: ReactNode;
|
|
23
23
|
name: string;
|
|
24
24
|
subtitle?: string | undefined;
|
|
25
25
|
href: string | null;
|
|
26
26
|
badge?: ReactNode;
|
|
27
|
+
title?: string | undefined;
|
|
27
28
|
}): import("react").JSX.Element;
|
|
28
29
|
export declare function GroupRow({ label, count, colSpan, }: {
|
|
29
30
|
label: string;
|
|
@@ -5,6 +5,8 @@ export type RowMenuItem = {
|
|
|
5
5
|
to: string;
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
destructive?: boolean | undefined;
|
|
8
|
+
/** Load the page instead of routing, for paths this app doesn't serve. */
|
|
9
|
+
reloadDocument?: boolean | undefined;
|
|
8
10
|
} | {
|
|
9
11
|
kind: 'action';
|
|
10
12
|
label: string;
|
|
@@ -17,7 +19,7 @@ export type RowMenuItem = {
|
|
|
17
19
|
/** Trailing checkmark, e.g. the active option in a radio-style submenu. */
|
|
18
20
|
selected?: boolean;
|
|
19
21
|
/** Declarative clipboard copy: the menu performs it and notifies, so
|
|
20
|
-
* builders like
|
|
22
|
+
* builders like useCopySubmenu need no toast or clipboard access. */
|
|
21
23
|
copy?: {
|
|
22
24
|
text: string;
|
|
23
25
|
label: string;
|
|
@@ -75,7 +77,7 @@ export declare function assembleRowMenu({ lead, actions, exclude, order, trailin
|
|
|
75
77
|
trailing?: string[];
|
|
76
78
|
/** Items inserted after the middle actions and before Copy, e.g. a marketplace link. */
|
|
77
79
|
extra?: RowMenuItem[];
|
|
78
|
-
/** The Copy submenu from `
|
|
80
|
+
/** The Copy submenu from `useCopySubmenu()`. */
|
|
79
81
|
copy?: RowMenuItem | undefined;
|
|
80
82
|
}): RowMenuItem[];
|
|
81
83
|
export declare function useRowMenu(zClassName?: string): {
|
|
@@ -90,11 +92,7 @@ export declare function useRowMenuActive(openMenu: OpenMenu): {
|
|
|
90
92
|
export declare function rowContextMenuProps(openMenu: OpenMenu, items: RowMenuItem[]): {
|
|
91
93
|
onContextMenu: (e: ReactMouseEvent) => void;
|
|
92
94
|
};
|
|
93
|
-
|
|
94
|
-
* order. The menu itself performs the copy and notifies; `t` is an optional
|
|
95
|
-
* host translator for the field labels (falls back to the provider defaults'
|
|
96
|
-
* English). */
|
|
97
|
-
export declare function copySubmenu({ name, nameLabel, email, username, uid, id, url, extra, t, }: {
|
|
95
|
+
export interface CopyFields {
|
|
98
96
|
name?: string | null | undefined;
|
|
99
97
|
/** Overrides the "name" label (raw, pre-translated) for entities whose primary field isn't a name, e.g. "domain". */
|
|
100
98
|
nameLabel?: string;
|
|
@@ -108,8 +106,10 @@ export declare function copySubmenu({ name, nameLabel, email, username, uid, id,
|
|
|
108
106
|
value?: string | null | undefined;
|
|
109
107
|
icon?: ReactNode;
|
|
110
108
|
}[] | undefined;
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
}
|
|
110
|
+
export type CopySubmenu = (fields: CopyFields) => RowMenuItem;
|
|
111
|
+
/** Returns a builder for the Copy submenu, labeled from the provider's strings. */
|
|
112
|
+
export declare function useCopySubmenu(): CopySubmenu;
|
|
113
113
|
/** Stays visible while active (menu open) so it doesn't vanish behind the overlay. */
|
|
114
114
|
export declare function MoreButton({ onOpen, active, className, }: {
|
|
115
115
|
onOpen: (x: number, y: number) => void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type UILinkComponent } from '../components/Provider.js';
|
|
3
|
+
/** Where an open hover card sits, and the handlers that keep it open. */
|
|
4
|
+
export interface HoverCardPlacement {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
onKeepOpen: () => void;
|
|
8
|
+
onLeave: () => void;
|
|
9
|
+
}
|
|
10
|
+
/** Opens `card` after a short hover or on focus of `children`. */
|
|
11
|
+
export declare function HoverCardTrigger({ className, children, card, }: {
|
|
12
|
+
className?: string | undefined;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
card: (placement: HoverCardPlacement) => ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
export interface UserHoverCardProps extends HoverCardPlacement {
|
|
17
|
+
username: string;
|
|
18
|
+
/** Display name; falls back to the username. */
|
|
19
|
+
name?: string | null | undefined;
|
|
20
|
+
avatarSrc?: string | null | undefined;
|
|
21
|
+
/** Short badge beside the name, such as the user's role. */
|
|
22
|
+
badge?: ReactNode;
|
|
23
|
+
/** Profile link for the card's header; absent renders the header unlinked. */
|
|
24
|
+
href?: string | undefined;
|
|
25
|
+
/** Overrides the provider's link slot for the header link. */
|
|
26
|
+
linkComponent?: UILinkComponent | undefined;
|
|
27
|
+
/** Shows placeholder detail lines while the profile loads. */
|
|
28
|
+
loading?: boolean | undefined;
|
|
29
|
+
/** Re-measures the card's position when this changes. */
|
|
30
|
+
relayoutKey?: unknown;
|
|
31
|
+
/** Detail lines, usually `HoverCardRow`s, below the header. */
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export declare function UserHoverCard({ x, y, onKeepOpen, onLeave, username, name, avatarSrc, badge, href, linkComponent, loading, relayoutKey, children, }: UserHoverCardProps): import("react").JSX.Element;
|
|
35
|
+
/** One detail line of a hover card: a leading icon and its content. With
|
|
36
|
+
* `onClick` the line is a button. */
|
|
37
|
+
export declare function HoverCardRow({ icon, children, title, align, truncate, onClick, }: {
|
|
38
|
+
icon: ReactNode;
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
title?: string | undefined;
|
|
41
|
+
/** `start` pins the icon to the first line of wrapping content. */
|
|
42
|
+
align?: 'center' | 'start' | undefined;
|
|
43
|
+
truncate?: boolean | undefined;
|
|
44
|
+
onClick?: (() => void) | undefined;
|
|
45
|
+
}): import("react").JSX.Element;
|
package/dist/list/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { ActionToolbar, stickyTabsClasses, stickyTabsUnderHeaderClasses, stickyToolbarClasses, ToolbarButton, type ToolbarAction, type ToolbarItem, } from './ActionToolbar.js';
|
|
2
2
|
export { ListColumns, ListPage, ListRow, ListRowActionsProvider, useListNavigate, type ListPageProps, type ListSection, type PinnedRowAction, } from './ListPage.js';
|
|
3
|
-
export { assembleRowMenu,
|
|
3
|
+
export { assembleRowMenu, MoreButton, rowContextMenuProps, toolbarActionToRowAction, toRowMenuItem, useCopySubmenu, useRowMenu, useRowMenuActive, type CopyFields, type CopySubmenu, type OpenMenu, type RowAction, type RowMenuItem, } from './RowContextMenu.js';
|
|
4
4
|
export { actionsColumnWidth, GroupRow, ListActionsHeader, ListError, ListSkeleton, listTableFixedProps, listTableProps, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, } from './ListTable.js';
|
|
5
5
|
export { DEFAULT_ORDER, FAVORITE_ORDER, useListView, type ActionDef, type ColumnDef, type FilterFacet, type ListView, type ListViewChrome, type ListViewConfig, type OrderByOption, } from './listView.js';
|
|
6
6
|
export { ListCount, ListSearchControl, useListSearch, type ListSearch, } from './listSearch.js';
|
|
7
7
|
export { listControlButtonClasses, ListDisplayMenu, ListFilterMenu, } from './ListViewControls.js';
|
|
8
8
|
export { LIST_PAGE_SIZES, ListPager } from './ListPager.js';
|
|
9
9
|
export { HoverCardSurface, useHoverCard } from './HoverCard.js';
|
|
10
|
+
export { HoverCardRow, HoverCardTrigger, UserHoverCard, type HoverCardPlacement, type UserHoverCardProps, } from './UserHoverCard.js';
|
|
10
11
|
export { isTextEntryContext } from './textEntry.js';
|
package/dist/list/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as useRowMenuActive, d as assembleRowMenu, f as
|
|
2
|
-
import { A as
|
|
3
|
-
export { ActionToolbar, DEFAULT_ORDER, FAVORITE_ORDER, GroupRow, HoverCardSurface, LIST_PAGE_SIZES, ListActionsHeader, ListColumns, ListCount, ListDisplayMenu, ListError, ListFilterMenu, ListPage, ListPager, ListRow, ListRowActionsProvider, ListSearchControl, ListSkeleton, MoreButton, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, ToolbarButton, actionsColumnWidth, assembleRowMenu,
|
|
1
|
+
import { _ as useRowMenuActive, d as assembleRowMenu, f as rowContextMenuProps, g as useRowMenu, h as useCopySubmenu, m as toolbarActionToRowAction, p as toRowMenuItem, u as MoreButton } from "../chunks/PageHeader-l49p1nM9.js";
|
|
2
|
+
import { A as actionsColumnWidth, C as GroupRow, D as NAME_MIN_WIDTH_PX, E as ListSkeleton, F as stickyTabsClasses, I as stickyTabsUnderHeaderClasses, L as stickyToolbarClasses, M as listTableProps, N as ActionToolbar, O as NameCell, P as ToolbarButton, S as useListNavigate, T as ListError, _ as useListView, a as useHoverCard, b as ListRow, c as ListCount, d as ListDisplayMenu, f as ListFilterMenu, g as FAVORITE_ORDER, h as DEFAULT_ORDER, i as HoverCardSurface, j as listTableFixedProps, k as RowSelectCheckbox, l as ListSearchControl, m as isTextEntryContext, n as HoverCardTrigger, o as LIST_PAGE_SIZES, p as listControlButtonClasses, r as UserHoverCard, s as ListPager, t as HoverCardRow, u as useListSearch, v as ListColumns, w as ListActionsHeader, x as ListRowActionsProvider, y as ListPage } from "../chunks/list-qrojZZNv.js";
|
|
3
|
+
export { ActionToolbar, DEFAULT_ORDER, FAVORITE_ORDER, GroupRow, HoverCardRow, HoverCardSurface, HoverCardTrigger, LIST_PAGE_SIZES, ListActionsHeader, ListColumns, ListCount, ListDisplayMenu, ListError, ListFilterMenu, ListPage, ListPager, ListRow, ListRowActionsProvider, ListSearchControl, ListSkeleton, MoreButton, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, ToolbarButton, UserHoverCard, actionsColumnWidth, assembleRowMenu, isTextEntryContext, listControlButtonClasses, listTableFixedProps, listTableProps, rowContextMenuProps, stickyTabsClasses, stickyTabsUnderHeaderClasses, stickyToolbarClasses, toRowMenuItem, toolbarActionToRowAction, useCopySubmenu, useHoverCard, useListNavigate, useListSearch, useListView, useRowMenu, useRowMenuActive };
|
package/dist/list/listView.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface ActionDef {
|
|
|
45
45
|
defaultPinned?: boolean;
|
|
46
46
|
}
|
|
47
47
|
export interface ListViewConfig<T> {
|
|
48
|
-
/**
|
|
48
|
+
/** Persistence namespace for this page's grouping/columns/filters. */
|
|
49
49
|
storageKey: string;
|
|
50
50
|
sharedFiltersKey?: string;
|
|
51
51
|
columns: ColumnDef[];
|
package/dist/logviewer/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { i as useNotify, u as useStrings } from "../chunks/Provider-Ghua9PkN.js";
|
|
1
2
|
import { ArrowDownIcon, ArrowUpIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, ClockIcon, CopyIcon, DownloadIcon, ExpandIcon, ShrinkIcon, XIcon } from "../icons.js";
|
|
2
|
-
import {
|
|
3
|
-
import { r as TooltipInfo } from "../chunks/Tooltip-n9w7Tkt1.js";
|
|
3
|
+
import { r as TooltipInfo } from "../chunks/Tooltip-Crxo_eU_.js";
|
|
4
4
|
import cx from "classnames";
|
|
5
|
-
import { Fragment,
|
|
6
|
-
import { Fragment as Fragment$1,
|
|
5
|
+
import { Fragment, memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { DateTime } from "luxon";
|
|
8
8
|
import { highlightSegments, parseAnsiSegments, plainSegments, processLinesWithCommands } from "@parallelworks/workflow-parser";
|
|
9
9
|
//#region src/logviewer/LogViewer.tsx
|
|
@@ -14,7 +14,7 @@ function LogSegments({ segments }) {
|
|
|
14
14
|
}, i) : segment.className ? /* @__PURE__ */ jsx("span", {
|
|
15
15
|
className: segment.className,
|
|
16
16
|
children: segment.content
|
|
17
|
-
}, i) : /* @__PURE__ */ jsx(Fragment
|
|
17
|
+
}, i) : /* @__PURE__ */ jsx(Fragment, { children: segment.content }, i));
|
|
18
18
|
}
|
|
19
19
|
var LogLine = memo(function LogLine({ index, segments, lineNumbers, isSelected, lineHeight, onLineClick, searchTerm, command, groupDepth = 0, isGroupCollapsed, onGroupToggle, annotationLabels }) {
|
|
20
20
|
const displaySegments = useMemo(() => highlightSegments(command?.message ? plainSegments(command.message) : segments, searchTerm), [
|
|
@@ -521,7 +521,7 @@ function LogViewer({ log, height = "unset", width, roundedBottom = false, lineNu
|
|
|
521
521
|
/* @__PURE__ */ jsxs("div", {
|
|
522
522
|
className: "flex gap-x-2 w-full",
|
|
523
523
|
children: [
|
|
524
|
-
!inline && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("button", {
|
|
524
|
+
!inline && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("button", {
|
|
525
525
|
type: "button",
|
|
526
526
|
className: "btn btn-neutral",
|
|
527
527
|
onClick: () => {
|
|
@@ -723,7 +723,7 @@ function LogViewer({ log, height = "unset", width, roundedBottom = false, lineNu
|
|
|
723
723
|
transform: "translateX(-50%)"
|
|
724
724
|
},
|
|
725
725
|
onClick: copyHighlightedText,
|
|
726
|
-
children: copied ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CheckIcon, { className: "text-green-500 w-3.5 h-3.5" }), /* @__PURE__ */ jsx("span", { children: tCommon.copied })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CopyIcon, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ jsx("span", { children: tCommon.copy })] })
|
|
726
|
+
children: copied ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CheckIcon, { className: "text-green-500 w-3.5 h-3.5" }), /* @__PURE__ */ jsx("span", { children: tCommon.copied })] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CopyIcon, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ jsx("span", { children: tCommon.copy })] })
|
|
727
727
|
}),
|
|
728
728
|
(additionalBottomLeftBarComponents || additionalBottomRightBarComponents) && /* @__PURE__ */ jsxs("div", {
|
|
729
729
|
className: cx("flex theme-panel select-none items-center gap-x-2 p-2"),
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* Page defaults and native controls, kept out of theme.css so package
|
|
2
|
+
* entries can import them into their own cascade layer (theme.css's @utility
|
|
3
|
+
* rules cannot be layered). Base layer so utilities still win. */
|
|
4
|
+
@layer base {
|
|
5
|
+
body {
|
|
6
|
+
font-family: var(--font-sans);
|
|
7
|
+
-webkit-font-smoothing: antialiased;
|
|
8
|
+
-moz-osx-font-smoothing: grayscale;
|
|
9
|
+
color: var(--theme-app);
|
|
10
|
+
background-color: var(--theme-app-bg);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
*,
|
|
14
|
+
::after,
|
|
15
|
+
::before,
|
|
16
|
+
::backdrop,
|
|
17
|
+
::file-selector-button {
|
|
18
|
+
border-color: var(--theme-border, currentColor);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
input,
|
|
22
|
+
textarea {
|
|
23
|
+
border-radius: 0.25rem;
|
|
24
|
+
border: 1px solid var(--theme-border, #d1d5db);
|
|
25
|
+
padding: 0.25rem 0.5rem;
|
|
26
|
+
min-height: 1.25rem;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
background-color: var(--theme-input-bg, #f9fafb);
|
|
29
|
+
color: var(--theme-app, #000000);
|
|
30
|
+
}
|
|
31
|
+
input:disabled,
|
|
32
|
+
textarea:disabled,
|
|
33
|
+
input.disabled,
|
|
34
|
+
textarea.disabled {
|
|
35
|
+
cursor: not-allowed;
|
|
36
|
+
background-color: var(--theme-input-disabled-bg, #f3f4f6);
|
|
37
|
+
color: var(--theme-input-disabled-text, #9ca3af);
|
|
38
|
+
}
|
|
39
|
+
.form-label,
|
|
40
|
+
.form-label-compact,
|
|
41
|
+
.form-label-top {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 0.25rem;
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
font-weight: 300;
|
|
47
|
+
height: 34px;
|
|
48
|
+
width: 13rem;
|
|
49
|
+
}
|
|
50
|
+
.form-label-compact {
|
|
51
|
+
width: fit-content;
|
|
52
|
+
margin-right: 0.5rem;
|
|
53
|
+
}
|
|
54
|
+
.form-label-top {
|
|
55
|
+
height: 20px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Geist Sans';
|
|
3
|
+
src: url('./Geist-Variable.woff2') format('woff2');
|
|
4
|
+
font-weight: 100 900;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-display: swap;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: 'Geist Mono';
|
|
11
|
+
src: url('./GeistMono-Variable.woff2') format('woff2');
|
|
12
|
+
font-weight: 100 900;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-display: swap;
|
|
15
|
+
}
|
package/dist/styles/theme.css
CHANGED
|
@@ -237,44 +237,10 @@
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
/*
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
border-radius: 0.25rem;
|
|
247
|
-
border: 1px solid var(--theme-border, #d1d5db);
|
|
248
|
-
padding: 0.25rem 0.5rem;
|
|
249
|
-
min-height: 1.25rem;
|
|
250
|
-
font-size: 14px;
|
|
251
|
-
background-color: var(--theme-input-bg, #f9fafb);
|
|
252
|
-
color: var(--theme-app, #000000);
|
|
253
|
-
}
|
|
254
|
-
input:disabled,
|
|
255
|
-
textarea:disabled,
|
|
256
|
-
input.disabled,
|
|
257
|
-
textarea.disabled {
|
|
258
|
-
cursor: not-allowed;
|
|
259
|
-
background-color: var(--theme-input-disabled-bg, #f3f4f6);
|
|
260
|
-
color: var(--theme-input-disabled-text, #9ca3af);
|
|
261
|
-
}
|
|
262
|
-
.form-label,
|
|
263
|
-
.form-label-compact,
|
|
264
|
-
.form-label-top {
|
|
265
|
-
display: flex;
|
|
266
|
-
align-items: center;
|
|
267
|
-
gap: 0.25rem;
|
|
268
|
-
flex-shrink: 0;
|
|
269
|
-
font-weight: 300;
|
|
270
|
-
height: 34px;
|
|
271
|
-
width: 13rem;
|
|
272
|
-
}
|
|
273
|
-
.form-label-compact {
|
|
274
|
-
width: fit-content;
|
|
275
|
-
margin-right: 0.5rem;
|
|
276
|
-
}
|
|
277
|
-
.form-label-top {
|
|
278
|
-
height: 20px;
|
|
279
|
-
}
|
|
240
|
+
/* Geist itself loads from fonts.css; without it these fall back to system-ui. */
|
|
241
|
+
@theme {
|
|
242
|
+
--font-geist-sans: 'Geist Sans';
|
|
243
|
+
--font-geist-mono: 'Geist Mono';
|
|
244
|
+
--font-sans: var(--font-geist-sans), system-ui, sans-serif;
|
|
245
|
+
--font-mono: var(--font-geist-mono), ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
|
|
280
246
|
}
|