@parallelworks/ui 0.4.0 → 0.5.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/README.md +0 -6
- package/dist/chunks/BareModal-DBa84JZO.js +80 -0
- package/dist/chunks/{CodePreviewEditor-B3688Fx4.js → CodePreviewEditor-KwzSyk3-.js} +2 -1
- package/dist/chunks/CreateModal-CXSi9ELO.js +595 -0
- package/dist/chunks/Loader-BXoXTZGc.js +47 -0
- package/dist/chunks/{Monaco-BEj--GTx.js → Monaco-FlGHL7zR.js} +3 -2
- package/dist/chunks/{Provider-uUHgWOWc.js → Provider-wC9G01Ou.js} +22 -1
- package/dist/chunks/RowContextMenu-D3G3DPQk.js +319 -0
- package/dist/chunks/{SwitchToggle-BqD0dE-L.js → SwitchToggle-CkYT1isd.js} +1 -1
- package/dist/chunks/{Table-C5z6qWjM.js → Table-ByziK93x.js} +1 -1
- package/dist/chunks/{editor-CdQbKtYO.js → editor-DbDUZn8w.js} +5 -41
- package/dist/chunks/{list-D5f5Fq-O.js → list-CGbR-ueU.js} +4 -316
- package/dist/chunks/useCssIsDark-DHr05dG2.js +38 -0
- package/dist/components/AddMenu.d.ts +17 -0
- package/dist/components/BareModal.d.ts +17 -0
- package/dist/components/Breadcrumbs.d.ts +28 -0
- package/dist/components/ConfirmModal.d.ts +17 -0
- package/dist/components/CreateModal.d.ts +92 -0
- package/dist/components/Loader.d.ts +2 -1
- package/dist/components/PageHeader.d.ts +69 -0
- package/dist/components/Provider.d.ts +25 -12
- package/dist/components/ghostButton.d.ts +4 -0
- package/dist/editor/index.d.ts +0 -1
- package/dist/editor/index.js +2 -2
- package/dist/file-explorer/index.js +24 -25
- package/dist/form/index.js +4 -4
- package/dist/index.d.ts +8 -1
- package/dist/index.js +237 -10
- package/dist/list/index.js +2 -1
- package/dist/logviewer/index.js +1 -1
- package/dist/styles/theme.css +22 -0
- package/dist/styles.css +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +6 -0
- package/dist/workflow/index.js +8 -8
- package/package.json +1 -1
- package/dist/chunks/Loader-DQiZ75fa.js +0 -25
- package/dist/chunks/Markdown-iFhq8Gb0.js +0 -101
- package/dist/chunks/Modal-sOUEwebV.js +0 -121
- package/dist/components/Modal.d.ts +0 -26
- /package/dist/{editor → components}/useCssIsDark.d.ts +0 -0
|
@@ -29,6 +29,20 @@ export interface UINotify {
|
|
|
29
29
|
}
|
|
30
30
|
export interface UIStrings {
|
|
31
31
|
loading: string;
|
|
32
|
+
modal: {
|
|
33
|
+
cancel: string;
|
|
34
|
+
close: string;
|
|
35
|
+
create: string;
|
|
36
|
+
creating: string;
|
|
37
|
+
addDescription: string;
|
|
38
|
+
advanced: string;
|
|
39
|
+
favorite: string;
|
|
40
|
+
favorited: string;
|
|
41
|
+
favoriteHintOn: string;
|
|
42
|
+
favoriteHintOff: string;
|
|
43
|
+
filter: string;
|
|
44
|
+
noOptions: string;
|
|
45
|
+
};
|
|
32
46
|
common: {
|
|
33
47
|
copy: string;
|
|
34
48
|
copied: string;
|
|
@@ -36,6 +50,8 @@ export interface UIStrings {
|
|
|
36
50
|
showHiddenFields: string;
|
|
37
51
|
showHiddenFieldsHint: string;
|
|
38
52
|
jsonHasErrors: string;
|
|
53
|
+
add: string;
|
|
54
|
+
create: string;
|
|
39
55
|
};
|
|
40
56
|
dropdown: {
|
|
41
57
|
select: (type: string) => string;
|
|
@@ -368,12 +384,17 @@ export interface UIData {
|
|
|
368
384
|
}>;
|
|
369
385
|
}
|
|
370
386
|
import type { FieldComponent } from '../form/fieldRegistry.js';
|
|
371
|
-
|
|
387
|
+
import type { PageHeaderCrumb } from './PageHeader.js';
|
|
388
|
+
/** Renders internal navigation; hosts bind their router's Link. Accessibility
|
|
389
|
+
* and tooltip data attributes pass through so header links keep their labels. */
|
|
372
390
|
export type UILinkComponent = React.ComponentType<{
|
|
373
391
|
to: string;
|
|
374
392
|
onClick?: () => void;
|
|
375
393
|
className?: string;
|
|
376
394
|
children: ReactNode;
|
|
395
|
+
title?: string;
|
|
396
|
+
'aria-label'?: string;
|
|
397
|
+
[dataAttr: `data-${string}`]: string | undefined;
|
|
377
398
|
}>;
|
|
378
399
|
/** The provider's link slot, with a plain anchor fallback. */
|
|
379
400
|
export declare function useLink(): UILinkComponent;
|
|
@@ -422,17 +443,9 @@ export interface UISlots {
|
|
|
422
443
|
storage: unknown;
|
|
423
444
|
groups?: unknown;
|
|
424
445
|
}) => ReactNode;
|
|
425
|
-
/**
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
onClose: () => void;
|
|
429
|
-
typeIcon?: ReactNode;
|
|
430
|
-
typeLabel: string;
|
|
431
|
-
namePlaceholder: string;
|
|
432
|
-
submitLabel: string;
|
|
433
|
-
submittingLabel: string;
|
|
434
|
-
validateName: (name: string) => string | null;
|
|
435
|
-
onSubmit: (name: string) => Promise<boolean>;
|
|
446
|
+
/** Pin affordance rendered after the page header's crumb trail; absent hides it. */
|
|
447
|
+
breadcrumbPin?: (args: {
|
|
448
|
+
crumbs: readonly PageHeaderCrumb[];
|
|
436
449
|
}) => ReactNode;
|
|
437
450
|
}
|
|
438
451
|
export interface UIProviderValue {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const ghostButtonClasses = "inline-flex cursor-pointer items-center gap-1.5 h-8 px-3 rounded-md text-sm text-(--theme-muted-text-color) hover:text-(--theme-app) hover:bg-(--theme-muted-panel-bg) transition-colors";
|
|
2
|
+
export declare const primaryButtonClasses = "inline-flex cursor-pointer items-center gap-1.5 h-7 px-2.5 rounded-md text-[12.5px] font-medium bg-(--theme-element) text-(--theme-element-text) hover:opacity-90 transition-opacity";
|
|
3
|
+
/** Filled destructive button for confirming irreversible actions in ds modals. */
|
|
4
|
+
export declare const dangerButtonClasses = "inline-flex cursor-pointer items-center gap-1.5 h-7 px-2.5 rounded-md text-[12.5px] font-medium bg-red-600 text-white hover:bg-red-700 transition-colors";
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -4,4 +4,3 @@ export { default as FormCodePanel } from './FormCodePanel.js';
|
|
|
4
4
|
export type { EditorMarketplaceItem, EditorWorkflowItem, IEditorProps, ISchemaError, } from './Monaco.js';
|
|
5
5
|
export { defineEditorThemes, getThemeName } from './themes.js';
|
|
6
6
|
export { setupMonacoWorkers } from './workers.js';
|
|
7
|
-
export { useCssIsDark } from './useCssIsDark.js';
|
package/dist/editor/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { Editor, EditorField, FormCodePanel, defineEditorThemes, getThemeName, setupMonacoWorkers
|
|
1
|
+
import { a as EditorField, i as FormCodePanel, n as defineEditorThemes, o as Editor, r as getThemeName, t as setupMonacoWorkers } from "../chunks/editor-DbDUZn8w.js";
|
|
2
|
+
export { Editor, EditorField, FormCodePanel, defineEditorThemes, getThemeName, setupMonacoWorkers };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AccessIcon, AlertIcon, AngleDownIcon, AngleRightIcon, AngleUpIcon, ChevronLeftIcon, ChevronRightIcon, ClipboardIcon, CloseIcon, CloudUploadIcon, CollapseIcon, CustomizeIcon, DiskIcon, DocumentIcon, DownloadFileIcon, ExpandIcon, ExpandVerticalIcon, EyeIcon, FileIcon, FileTextIcon, FolderIcon, FolderOpenIcon, ImageIcon, LinkIcon, LockIcon, MinimizeIcon, MusicIcon, PdfIcon, RefreshIcon, ShareIcon, SpreadsheetIcon, SuccessIcon, TrashIcon, UploadIcon, UserIcon, VideoIcon, ZipIcon, ZoomInIcon, ZoomOutIcon } from "../icons.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as useProvisionCorsRules, c as useStrings, i as useNotify, s as useSlots } from "../chunks/Provider-
|
|
2
|
+
import { c as ConfirmModal, f as Markdown, h as Callout, m as CopyToClipboard, p as CopyCodeBlock, t as CreateModal } from "../chunks/CreateModal-CXSi9ELO.js";
|
|
3
|
+
import { a as useProvisionCorsRules, c as useStrings, i as useNotify, s as useSlots } from "../chunks/Provider-wC9G01Ou.js";
|
|
4
4
|
import { n as TOOLTIP_ID, r as TooltipInfo } from "../chunks/Tooltip-WgbiC_nd.js";
|
|
5
|
-
import { t as Loader } from "../chunks/Loader-
|
|
6
|
-
import { t as Modal } from "../chunks/Modal-sOUEwebV.js";
|
|
5
|
+
import { t as Loader } from "../chunks/Loader-BXoXTZGc.js";
|
|
7
6
|
import { t as StatusBadge } from "../chunks/StatusBadge-DXp4zkSd.js";
|
|
8
|
-
import { n as Table } from "../chunks/Table-
|
|
9
|
-
import {
|
|
7
|
+
import { n as Table } from "../chunks/Table-ByziK93x.js";
|
|
8
|
+
import { c as useRowMenuActive, n as assembleRowMenu, r as copySubmenu, s as useRowMenu, t as MoreButton } from "../chunks/RowContextMenu-D3G3DPQk.js";
|
|
9
|
+
import { C as listTableProps, S as listTableFixedProps, _ as ListSkeleton, b as RowSelectCheckbox, h as ListActionsHeader } from "../chunks/list-CGbR-ueU.js";
|
|
10
10
|
import cx from "classnames";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { Suspense, createContext, lazy, memo, use, useCallback, useEffect, useEffectEvent, useId, useLayoutEffect, useMemo, useRef, useState, useTransition } from "react";
|
|
@@ -2519,7 +2519,7 @@ function useObjectText(url, { enabled, maxBytes, maxLines, knownSize, cacheKey,
|
|
|
2519
2519
|
}
|
|
2520
2520
|
//#endregion
|
|
2521
2521
|
//#region src/file-explorer/FilePreview/Viewer.tsx
|
|
2522
|
-
var CodePreviewEditor = lazy(() => import("../chunks/CodePreviewEditor-
|
|
2522
|
+
var CodePreviewEditor = lazy(() => import("../chunks/CodePreviewEditor-KwzSyk3-.js"));
|
|
2523
2523
|
var PREVIEW_MARKDOWN_CONTROLS = {
|
|
2524
2524
|
table: { fullscreen: false },
|
|
2525
2525
|
mermaid: { fullscreen: false }
|
|
@@ -5499,7 +5499,7 @@ function FileExplorer({ storages, onRefresh, showUserHierarchy = false, groups =
|
|
|
5499
5499
|
onDownload: downloadNode,
|
|
5500
5500
|
onCopyUri: copyNodeUri
|
|
5501
5501
|
}),
|
|
5502
|
-
|
|
5502
|
+
/* @__PURE__ */ jsx(CreateModal, {
|
|
5503
5503
|
open: !!createFolderTarget,
|
|
5504
5504
|
onClose: () => setCreateFolderTarget(null),
|
|
5505
5505
|
typeIcon: /* @__PURE__ */ jsx(FolderIcon, { className: "w-3 h-3" }),
|
|
@@ -5514,19 +5514,18 @@ function FileExplorer({ storages, onRefresh, showUserHierarchy = false, groups =
|
|
|
5514
5514
|
className: "absolute inset-0 bg-(--theme-app-bg)/75 backdrop-blur-[2px] transition-opacity flex items-center justify-center z-50",
|
|
5515
5515
|
children: /* @__PURE__ */ jsx(Loader, { full: true })
|
|
5516
5516
|
}),
|
|
5517
|
-
/* @__PURE__ */ jsx(
|
|
5518
|
-
|
|
5519
|
-
|
|
5517
|
+
/* @__PURE__ */ jsx(ConfirmModal, {
|
|
5518
|
+
open: uploadModalOpen && !!pendingUpload,
|
|
5519
|
+
onClose: () => {
|
|
5520
5520
|
setUploadModalOpen(false);
|
|
5521
5521
|
setPendingUpload(null);
|
|
5522
5522
|
},
|
|
5523
|
-
|
|
5523
|
+
align: "center",
|
|
5524
5524
|
title: t.confirmUpload.title,
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
fitWidth: true,
|
|
5525
|
+
description: t.confirmUpload.text(pendingUpload?.targetPath || t.confirmUpload.defaultPath),
|
|
5526
|
+
confirmLabel: t.confirmUpload.confirm,
|
|
5527
|
+
onConfirm: handleUpload,
|
|
5528
|
+
confirmDisabled: pendingUpload ? isUploadSizeExceeded(pendingUpload.totalSize) : false,
|
|
5530
5529
|
children: /* @__PURE__ */ jsxs("div", {
|
|
5531
5530
|
className: "text-sm flex flex-col gap-2 mt-2 text-left",
|
|
5532
5531
|
children: [
|
|
@@ -5575,19 +5574,19 @@ function FileExplorer({ storages, onRefresh, showUserHierarchy = false, groups =
|
|
|
5575
5574
|
]
|
|
5576
5575
|
})
|
|
5577
5576
|
}),
|
|
5578
|
-
/* @__PURE__ */ jsx(
|
|
5579
|
-
|
|
5580
|
-
|
|
5577
|
+
/* @__PURE__ */ jsx(ConfirmModal, {
|
|
5578
|
+
open: deleteModalOpen && !!pendingDelete,
|
|
5579
|
+
onClose: () => {
|
|
5581
5580
|
setDeleteModalOpen(false);
|
|
5582
5581
|
setPendingDelete(null);
|
|
5583
5582
|
setCheckedItems(/* @__PURE__ */ new Set());
|
|
5584
5583
|
},
|
|
5585
|
-
|
|
5584
|
+
align: "center",
|
|
5585
|
+
destructive: true,
|
|
5586
5586
|
title: t.confirmDelete.title,
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
fitWidth: true,
|
|
5587
|
+
description: t.confirmDelete.text,
|
|
5588
|
+
confirmLabel: t.confirmDelete.action,
|
|
5589
|
+
onConfirm: handleDelete,
|
|
5591
5590
|
children: /* @__PURE__ */ jsx("div", {
|
|
5592
5591
|
className: "text-sm flex flex-col gap-2 mt-2 text-left",
|
|
5593
5592
|
children: /* @__PURE__ */ jsx("ul", {
|
package/dist/form/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AngleRightIcon, EyeIcon, EyeOffIcon, SuccessCheckmark, TrashIcon } from "../icons.js";
|
|
2
|
-
import { c as useStrings, s as useSlots } from "../chunks/Provider-
|
|
2
|
+
import { c as useStrings, s as useSlots } from "../chunks/Provider-wC9G01Ou.js";
|
|
3
3
|
import { n as TOOLTIP_ID, r as TooltipInfo } from "../chunks/Tooltip-WgbiC_nd.js";
|
|
4
|
-
import { a as UncontrolledCollapsiblePanel, c as Dropdown, f as isCategory, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "../chunks/SwitchToggle-
|
|
5
|
-
import { t as Loader } from "../chunks/Loader-
|
|
4
|
+
import { a as UncontrolledCollapsiblePanel, c as Dropdown, f as isCategory, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "../chunks/SwitchToggle-CkYT1isd.js";
|
|
5
|
+
import { t as Loader } from "../chunks/Loader-BXoXTZGc.js";
|
|
6
6
|
import { n as StatusDot } from "../chunks/StatusBadge-DXp4zkSd.js";
|
|
7
|
-
import { n as Table } from "../chunks/Table-
|
|
7
|
+
import { n as Table } from "../chunks/Table-ByziK93x.js";
|
|
8
8
|
import { a as resolvedFlag, c as FieldWrapper, i as initializeValues, n as flattenGroups, o as applySecondaryField, r as impureSetValueFromPath, s as findSecondaryOption, t as enforceOneMustBeTrue } from "../chunks/lib-DTgL8klR.js";
|
|
9
9
|
import cx from "classnames";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/index.d.ts
CHANGED
|
@@ -13,10 +13,15 @@ export { default as CustomListbox } from './components/Listbox.js';
|
|
|
13
13
|
export { default as Loader } from './components/Loader.js';
|
|
14
14
|
export { default as Markdown } from './components/Markdown.js';
|
|
15
15
|
export type { MarkdownProps } from './components/Markdown.js';
|
|
16
|
-
export {
|
|
16
|
+
export { BareModal, modalPanelClasses } from './components/BareModal.js';
|
|
17
|
+
export { ConfirmModal } from './components/ConfirmModal.js';
|
|
18
|
+
export { CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, type CreateModalSelectOption, CreateModalSwitch, CreateModalTextarea, } from './components/CreateModal.js';
|
|
19
|
+
export { AddMenu, type HeaderAddMenuItem } from './components/AddMenu.js';
|
|
20
|
+
export { dangerButtonClasses, ghostButtonClasses, primaryButtonClasses, } from './components/ghostButton.js';
|
|
17
21
|
export { default as MultiSelectDropdown } from './components/MultiSelect.js';
|
|
18
22
|
export { Overview } from './components/Overview.js';
|
|
19
23
|
export { UIProvider, useNavigation, useNotify, useProvisionCorsRules, useRunFile, useSlots, useStrings, useWorkflowJsonResolver, type RunFileResult, type WorkflowJsonRef, type UIData, type UINavigation, type UINotify, type UISlots, type UIStrings, } from './components/Provider.js';
|
|
24
|
+
export { useCssIsDark } from './components/useCssIsDark.js';
|
|
20
25
|
export { Indicator } from './components/Indicator.js';
|
|
21
26
|
export { ControlledCollapsiblePanel, MaybeCollapsible, UncontrolledCollapsiblePanel, } from './components/CollapsiblePanel.js';
|
|
22
27
|
export { default as SectionHeader } from './components/SectionHeader.js';
|
|
@@ -40,3 +45,5 @@ export { default as SettingsCard } from './components/SettingsCard.js';
|
|
|
40
45
|
export { default as SettingsGroup } from './components/SettingsGroup.js';
|
|
41
46
|
export { SettingRow, SettingSection } from './components/SettingRow.js';
|
|
42
47
|
export { SettingModeOption } from './components/SettingModeOption.js';
|
|
48
|
+
export { BreadcrumbProvider, useBreadcrumb, useClearBreadcrumbs, useHideBreadcrumbs, useSetBreadcrumbs, type IBreadcrumbItem, } from './components/Breadcrumbs.js';
|
|
49
|
+
export { BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, HeaderActionMenu, HeaderAddButton, HeaderEditButton, HeaderRowMenu, PageHeader, type PageHeaderBreadcrumb, type PageHeaderCrumb, } from './components/PageHeader.js';
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { DEFAULT_PRESET, THEME_PRESETS, THEME_TOKENS, applyTheme, contrastRatio, deriveTheme, isDarkColor } from "./theme/index.js";
|
|
2
|
-
import { AlertIcon, AngleRightIcon, EyeIcon, EyeOffIcon, FilterIcon, LoaderIcon, SortDownIcon, SortUnsortedIcon, SortUpIcon } from "./icons.js";
|
|
3
|
-
import {
|
|
4
|
-
import { a as useProvisionCorsRules, c as useStrings, i as useNotify, l as useWorkflowJsonResolver, n as useLink, o as useRunFile, r as useNavigation, s as useSlots, t as UIProvider } from "./chunks/Provider-
|
|
2
|
+
import { AddIcon, AlertIcon, AngleRightIcon, ChevronRightIcon, EditIcon, EyeIcon, EyeOffIcon, FilterIcon, LoaderIcon, MoreIcon, SortDownIcon, SortUnsortedIcon, SortUpIcon } from "./icons.js";
|
|
3
|
+
import { a as CreateModalSwitch, c as ConfirmModal, d as primaryButtonClasses, f as Markdown, h as Callout, i as CreateModalSelect, l as dangerButtonClasses, m as CopyToClipboard, n as CreateModalAutocompleteField, o as CreateModalTextarea, p as CopyCodeBlock, r as CreateModalField, s as AddMenu, t as CreateModal, u as ghostButtonClasses } from "./chunks/CreateModal-CXSi9ELO.js";
|
|
4
|
+
import { a as useProvisionCorsRules, c as useStrings, i as useNotify, l as useWorkflowJsonResolver, n as useLink, o as useRunFile, r as useNavigation, s as useSlots, t as UIProvider } from "./chunks/Provider-wC9G01Ou.js";
|
|
5
5
|
import { i as formatTooltipContent, n as TOOLTIP_ID, r as TooltipInfo, t as GlobalTooltip } from "./chunks/Tooltip-WgbiC_nd.js";
|
|
6
|
-
import { a as UncontrolledCollapsiblePanel, c as Dropdown, d as flattenOptions, f as isCategory, i as MaybeCollapsible, l as DropdownCaret, n as SectionHeader, o as MultiSelectDropdown, p as isOption, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle, u as filterOption } from "./chunks/SwitchToggle-
|
|
7
|
-
import { t as Loader } from "./chunks/Loader-
|
|
8
|
-
import { t as
|
|
6
|
+
import { a as UncontrolledCollapsiblePanel, c as Dropdown, d as flattenOptions, f as isCategory, i as MaybeCollapsible, l as DropdownCaret, n as SectionHeader, o as MultiSelectDropdown, p as isOption, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle, u as filterOption } from "./chunks/SwitchToggle-CkYT1isd.js";
|
|
7
|
+
import { t as Loader } from "./chunks/Loader-BXoXTZGc.js";
|
|
8
|
+
import { n as modalPanelClasses, t as BareModal } from "./chunks/BareModal-DBa84JZO.js";
|
|
9
|
+
import { t as useCssIsDark } from "./chunks/useCssIsDark-DHr05dG2.js";
|
|
9
10
|
import { t as Indicator } from "./chunks/Indicator-hBSIxOPK.js";
|
|
10
11
|
import { t as SwitchToggleSmall } from "./chunks/SwitchToggleSmall-FcsaYSTs.js";
|
|
11
12
|
import { n as StatusDot, t as StatusBadge } from "./chunks/StatusBadge-DXp4zkSd.js";
|
|
12
|
-
import { n as Table, t as CompactTable } from "./chunks/Table-
|
|
13
|
+
import { n as Table, t as CompactTable } from "./chunks/Table-ByziK93x.js";
|
|
14
|
+
import { s as useRowMenu } from "./chunks/RowContextMenu-D3G3DPQk.js";
|
|
13
15
|
import cx from "classnames";
|
|
14
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import React, { forwardRef, useState } from "react";
|
|
17
|
+
import React, { Fragment as Fragment$1, createContext, forwardRef, useContext, useEffect, useLayoutEffect, useState } from "react";
|
|
18
|
+
import { createPortal } from "react-dom";
|
|
16
19
|
import Skeleton from "react-loading-skeleton";
|
|
17
20
|
//#region src/components/DescriptionList.tsx
|
|
18
21
|
function DescriptionListItem({ label, children, tooltip, className, ...props }) {
|
|
@@ -187,7 +190,7 @@ function MethodButton({ icon, label, description, href, className = "", ...props
|
|
|
187
190
|
//#region src/components/Card.tsx
|
|
188
191
|
function Card({ children, className = "", wide, compact, interactive, authShadow }) {
|
|
189
192
|
return /* @__PURE__ */ jsx("div", {
|
|
190
|
-
className: cx("w-full bg-[var(--theme-
|
|
193
|
+
className: cx("w-full bg-[var(--theme-card-bg)] backdrop-blur-xl border border-[var(--theme-border)] rounded-2xl", authShadow ? "shadow-[var(--theme-auth-shadow)]" : "shadow-[var(--theme-shadow)]", wide && "max-w-[560px] p-8", compact && "max-w-[400px] p-6", !wide && !compact && "max-w-[520px] p-10", interactive && "ds-card-interactive cursor-pointer", className),
|
|
191
194
|
children
|
|
192
195
|
});
|
|
193
196
|
}
|
|
@@ -534,4 +537,228 @@ function SettingModeOption({ name, checked, onSelect, label, description, isFirs
|
|
|
534
537
|
});
|
|
535
538
|
}
|
|
536
539
|
//#endregion
|
|
537
|
-
|
|
540
|
+
//#region src/components/Breadcrumbs.tsx
|
|
541
|
+
var BreadcrumbContext = createContext({
|
|
542
|
+
breadcrumbs: [],
|
|
543
|
+
setBreadcrumbs: () => {},
|
|
544
|
+
rightsideBreadcrumb: null,
|
|
545
|
+
setRightsideBreadcrumb: () => {},
|
|
546
|
+
hidden: false,
|
|
547
|
+
setHidden: () => {},
|
|
548
|
+
titleActionSlot: null,
|
|
549
|
+
setTitleActionSlot: () => {},
|
|
550
|
+
rightActionSlot: null,
|
|
551
|
+
setRightActionSlot: () => {}
|
|
552
|
+
});
|
|
553
|
+
var useBreadcrumb = () => useContext(BreadcrumbContext);
|
|
554
|
+
function BreadcrumbProvider({ children }) {
|
|
555
|
+
const [breadcrumbs, setBreadcrumbs] = React.useState([]);
|
|
556
|
+
const [rightsideBreadcrumb, setRightsideBreadcrumb] = React.useState(null);
|
|
557
|
+
const [hidden, setHidden] = React.useState(false);
|
|
558
|
+
const [titleActionSlot, setTitleActionSlot] = React.useState(null);
|
|
559
|
+
const [rightActionSlot, setRightActionSlot] = React.useState(null);
|
|
560
|
+
return /* @__PURE__ */ jsx(BreadcrumbContext.Provider, {
|
|
561
|
+
value: {
|
|
562
|
+
breadcrumbs,
|
|
563
|
+
setBreadcrumbs,
|
|
564
|
+
rightsideBreadcrumb,
|
|
565
|
+
setRightsideBreadcrumb,
|
|
566
|
+
hidden,
|
|
567
|
+
setHidden,
|
|
568
|
+
titleActionSlot,
|
|
569
|
+
setTitleActionSlot,
|
|
570
|
+
rightActionSlot,
|
|
571
|
+
setRightActionSlot
|
|
572
|
+
},
|
|
573
|
+
children
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
function useSetBreadcrumbs(getBreadcrumbs) {
|
|
577
|
+
const { setBreadcrumbs } = useBreadcrumb();
|
|
578
|
+
useLayoutEffect(() => {
|
|
579
|
+
setBreadcrumbs(typeof getBreadcrumbs === "function" ? getBreadcrumbs() : getBreadcrumbs);
|
|
580
|
+
}, [getBreadcrumbs, setBreadcrumbs]);
|
|
581
|
+
}
|
|
582
|
+
var EMPTY_BREADCRUMBS = [];
|
|
583
|
+
/** For pages that render their own header instead of the breadcrumb strip. */
|
|
584
|
+
function useClearBreadcrumbs() {
|
|
585
|
+
useSetBreadcrumbs(EMPTY_BREADCRUMBS);
|
|
586
|
+
}
|
|
587
|
+
function useHideBreadcrumbs(hidden) {
|
|
588
|
+
const { setHidden } = useBreadcrumb();
|
|
589
|
+
useEffect(() => {
|
|
590
|
+
setHidden(hidden);
|
|
591
|
+
return () => setHidden(false);
|
|
592
|
+
}, [hidden, setHidden]);
|
|
593
|
+
}
|
|
594
|
+
//#endregion
|
|
595
|
+
//#region src/components/PageHeader.tsx
|
|
596
|
+
var headerActionButtonClasses = "flex items-center justify-center w-6 h-6 rounded-md shrink-0 cursor-pointer text-(--theme-muted-text-color) hover:text-(--theme-app) hover:bg-(--theme-muted-panel-bg) transition-colors";
|
|
597
|
+
var headerAddButtonClasses = "inline-flex h-[26px] shrink-0 items-center gap-1.5 rounded-md border border-(--theme-border) px-2 text-xs font-medium cursor-pointer text-(--theme-muted-text-color) hover:bg-(--theme-muted-panel-bg) hover:text-(--theme-app) transition-colors";
|
|
598
|
+
/** With menu, the plus opens a chooser; otherwise navigates to or calls the
|
|
599
|
+
* single action. `word` is the visible verb; `label` stays the full action for
|
|
600
|
+
* the tooltip and screen readers. */
|
|
601
|
+
function HeaderAddButton({ to, onClick, label, word = "add", menu }) {
|
|
602
|
+
const { common } = useStrings();
|
|
603
|
+
const Link = useLink();
|
|
604
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AddIcon, { className: "w-3 h-3" }), /* @__PURE__ */ jsx("span", { children: word === "create" ? common.create : common.add })] });
|
|
605
|
+
if (menu) return /* @__PURE__ */ jsx(AddMenu, {
|
|
606
|
+
items: menu,
|
|
607
|
+
label,
|
|
608
|
+
buttonClassName: headerAddButtonClasses,
|
|
609
|
+
children: content
|
|
610
|
+
});
|
|
611
|
+
if (to) return /* @__PURE__ */ jsx(Link, {
|
|
612
|
+
to,
|
|
613
|
+
"aria-label": label,
|
|
614
|
+
title: label,
|
|
615
|
+
className: headerAddButtonClasses,
|
|
616
|
+
children: content
|
|
617
|
+
});
|
|
618
|
+
return /* @__PURE__ */ jsx("button", {
|
|
619
|
+
type: "button",
|
|
620
|
+
onClick,
|
|
621
|
+
"aria-label": label,
|
|
622
|
+
title: label,
|
|
623
|
+
className: headerAddButtonClasses,
|
|
624
|
+
children: content
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
function HeaderActionMenu({ items, label = "Actions" }) {
|
|
628
|
+
if (items.length === 0) return null;
|
|
629
|
+
return /* @__PURE__ */ jsx(AddMenu, {
|
|
630
|
+
items,
|
|
631
|
+
label,
|
|
632
|
+
buttonClassName: headerActionButtonClasses,
|
|
633
|
+
children: /* @__PURE__ */ jsx(MoreIcon, { className: "w-3.5 h-3.5" })
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
/** The header "…" trigger for a RowMenuItem menu — same rendering (submenus,
|
|
637
|
+
* destructive styling) as the list pages' right-click context menus. */
|
|
638
|
+
function HeaderRowMenu({ items, label = "Actions" }) {
|
|
639
|
+
const { openMenu, contextMenu } = useRowMenu();
|
|
640
|
+
if (items.length === 0) return null;
|
|
641
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("button", {
|
|
642
|
+
type: "button",
|
|
643
|
+
"aria-label": label,
|
|
644
|
+
title: label,
|
|
645
|
+
className: headerActionButtonClasses,
|
|
646
|
+
onClick: (e) => {
|
|
647
|
+
const r = e.currentTarget.getBoundingClientRect();
|
|
648
|
+
openMenu(r.left, r.bottom + 4, items);
|
|
649
|
+
},
|
|
650
|
+
children: /* @__PURE__ */ jsx(MoreIcon, { className: "w-3.5 h-3.5" })
|
|
651
|
+
}), contextMenu] });
|
|
652
|
+
}
|
|
653
|
+
function HeaderEditButton({ to, onClick, label = "Edit", disabled, tooltip }) {
|
|
654
|
+
const Link = useLink();
|
|
655
|
+
const tooltipProps = tooltip ? {
|
|
656
|
+
"data-tooltip-id": TOOLTIP_ID,
|
|
657
|
+
"data-tooltip-content": tooltip
|
|
658
|
+
} : {};
|
|
659
|
+
if (to && !disabled) return /* @__PURE__ */ jsx(Link, {
|
|
660
|
+
to,
|
|
661
|
+
"aria-label": label,
|
|
662
|
+
...tooltip ? {} : { title: label },
|
|
663
|
+
className: headerActionButtonClasses,
|
|
664
|
+
...tooltipProps,
|
|
665
|
+
children: /* @__PURE__ */ jsx(EditIcon, { className: "w-3 h-3" })
|
|
666
|
+
});
|
|
667
|
+
return /* @__PURE__ */ jsx("button", {
|
|
668
|
+
type: "button",
|
|
669
|
+
onClick,
|
|
670
|
+
disabled,
|
|
671
|
+
"aria-label": label,
|
|
672
|
+
title: tooltip ? void 0 : label,
|
|
673
|
+
className: cx(headerActionButtonClasses, disabled && "opacity-50 cursor-not-allowed hover:bg-transparent"),
|
|
674
|
+
...tooltipProps,
|
|
675
|
+
children: /* @__PURE__ */ jsx(EditIcon, { className: "w-3 h-3" })
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
/** Renders nothing when the modern breadcrumb strip isn't mounted (classic chrome or self-headered pages). */
|
|
679
|
+
function BreadcrumbsTitleAction({ children }) {
|
|
680
|
+
const { titleActionSlot } = useBreadcrumb();
|
|
681
|
+
if (!titleActionSlot) return null;
|
|
682
|
+
return createPortal(children, titleActionSlot);
|
|
683
|
+
}
|
|
684
|
+
function BreadcrumbsRightAction({ children }) {
|
|
685
|
+
const { rightActionSlot } = useBreadcrumb();
|
|
686
|
+
if (!rightActionSlot) return null;
|
|
687
|
+
return createPortal(children, rightActionSlot);
|
|
688
|
+
}
|
|
689
|
+
var breadcrumbsActionClasses = "flex items-center gap-1 link text-xs whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed";
|
|
690
|
+
function BreadcrumbsActionButton({ icon: Icon, label, to, onClick, disabled, tooltip }) {
|
|
691
|
+
const Link = useLink();
|
|
692
|
+
const tip = tooltip ? {
|
|
693
|
+
"data-tooltip-id": TOOLTIP_ID,
|
|
694
|
+
"data-tooltip-content": tooltip
|
|
695
|
+
} : {};
|
|
696
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Icon, { className: "w-3 h-3" }), label] });
|
|
697
|
+
if (to && !disabled) return /* @__PURE__ */ jsx(Link, {
|
|
698
|
+
to,
|
|
699
|
+
className: breadcrumbsActionClasses,
|
|
700
|
+
...tip,
|
|
701
|
+
children: content
|
|
702
|
+
});
|
|
703
|
+
return /* @__PURE__ */ jsx("button", {
|
|
704
|
+
type: "button",
|
|
705
|
+
onClick,
|
|
706
|
+
disabled,
|
|
707
|
+
className: breadcrumbsActionClasses,
|
|
708
|
+
...tip,
|
|
709
|
+
children: content
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
function PageHeader({ breadcrumbs, title, titleAction, actions, toolbar, className, sticky = true, stickyTopClassName = "top-0" }) {
|
|
713
|
+
const { setHidden } = useBreadcrumb();
|
|
714
|
+
const Link = useLink();
|
|
715
|
+
const { breadcrumbPin } = useSlots();
|
|
716
|
+
useLayoutEffect(() => {
|
|
717
|
+
setHidden(true);
|
|
718
|
+
return () => setHidden(false);
|
|
719
|
+
}, [setHidden]);
|
|
720
|
+
const crumbs = [...breadcrumbs ?? []];
|
|
721
|
+
const lastLabel = crumbs[crumbs.length - 1]?.label;
|
|
722
|
+
if (title !== null && title !== void 0 && title !== lastLabel) crumbs.push({ label: title });
|
|
723
|
+
const crumbRow = crumbs.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
724
|
+
className: "flex items-center gap-1.5 min-w-0",
|
|
725
|
+
children: [
|
|
726
|
+
/* @__PURE__ */ jsx("nav", {
|
|
727
|
+
"aria-label": "Breadcrumb",
|
|
728
|
+
className: "flex items-center gap-2 min-w-0 text-[13px]",
|
|
729
|
+
children: crumbs.map((crumb, idx) => {
|
|
730
|
+
if (idx === crumbs.length - 1) return /* @__PURE__ */ jsx("h1", {
|
|
731
|
+
className: "m-0 text-[13px] font-medium leading-none text-(--theme-app) truncate",
|
|
732
|
+
children: crumb.label
|
|
733
|
+
}, `${crumb.label}-${idx}`);
|
|
734
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [crumb.href ? /* @__PURE__ */ jsx(Link, {
|
|
735
|
+
to: crumb.href,
|
|
736
|
+
className: "text-(--theme-muted-text-color) hover:text-(--theme-app) transition-colors cursor-pointer whitespace-nowrap",
|
|
737
|
+
children: crumb.label
|
|
738
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
739
|
+
className: "text-(--theme-muted-text-color) whitespace-nowrap",
|
|
740
|
+
children: crumb.label
|
|
741
|
+
}), /* @__PURE__ */ jsx(ChevronRightIcon, { className: "w-3 h-3 opacity-60 shrink-0 text-(--theme-muted-text-color)" })] }, `${crumb.label}-${idx}`);
|
|
742
|
+
})
|
|
743
|
+
}),
|
|
744
|
+
titleAction,
|
|
745
|
+
breadcrumbPin?.({ crumbs })
|
|
746
|
+
]
|
|
747
|
+
});
|
|
748
|
+
const actionCluster = actions && /* @__PURE__ */ jsx("div", {
|
|
749
|
+
className: "flex items-center gap-1.5 shrink-0",
|
|
750
|
+
children: actions
|
|
751
|
+
});
|
|
752
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
753
|
+
className: cx(sticky && cx("sticky z-20", stickyTopClassName), "w-full bg-(--theme-app-bg)", className),
|
|
754
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
755
|
+
className: cx("flex items-center justify-between gap-6 px-4 h-11", crumbRow && "border-b border-(--theme-border)"),
|
|
756
|
+
children: [crumbRow || /* @__PURE__ */ jsx("div", {}), actionCluster]
|
|
757
|
+
}), toolbar && /* @__PURE__ */ jsx("div", {
|
|
758
|
+
className: "px-4",
|
|
759
|
+
children: toolbar
|
|
760
|
+
})]
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
//#endregion
|
|
764
|
+
export { AddMenu, BareModal, BreadcrumbProvider, BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, Button, 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, 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, inputClasses, isCategory, isDarkColor, isOption, modalPanelClasses, primaryButtonClasses, useBreadcrumb, useClearBreadcrumbs, useCssIsDark, useHideBreadcrumbs, useNavigation, useNotify, useProvisionCorsRules, useRunFile, useSetBreadcrumbs, useSlots, useStrings, useWorkflowJsonResolver };
|
package/dist/list/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as toRowMenuItem, c as useRowMenuActive, i as rowContextMenuProps, n as assembleRowMenu, o as toolbarActionToRowAction, r as copySubmenu, s as useRowMenu, t as MoreButton } from "../chunks/RowContextMenu-D3G3DPQk.js";
|
|
2
|
+
import { C as listTableProps, S as listTableFixedProps, _ as ListSkeleton, a as ListSearchControl, b as RowSelectCheckbox, c as ListFilterMenu, d as DEFAULT_ORDER, f as FAVORITE_ORDER, g as ListError, h as ListActionsHeader, i as ListCount, l as listControlButtonClasses, m as GroupRow, n as useHoverCard, o as useListSearch, p as useListView, r as ListPager, s as ListDisplayMenu, t as HoverCardSurface, u as isTextEntryContext, v as NAME_MIN_WIDTH_PX, x as actionsColumnWidth, y as NameCell } from "../chunks/list-CGbR-ueU.js";
|
|
2
3
|
export { DEFAULT_ORDER, FAVORITE_ORDER, GroupRow, HoverCardSurface, ListActionsHeader, ListCount, ListDisplayMenu, ListError, ListFilterMenu, ListPager, ListSearchControl, ListSkeleton, MoreButton, NAME_MIN_WIDTH_PX, NameCell, RowSelectCheckbox, actionsColumnWidth, assembleRowMenu, copySubmenu, isTextEntryContext, listControlButtonClasses, listTableFixedProps, listTableProps, rowContextMenuProps, toRowMenuItem, toolbarActionToRowAction, useHoverCard, useListSearch, useListView, useRowMenu, useRowMenuActive };
|
package/dist/logviewer/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArrowDownIcon, ArrowUpIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, CopyIcon, DownloadIcon, ExpandIcon, ShrinkIcon, XIcon } from "../icons.js";
|
|
2
|
-
import { c as useStrings, i as useNotify } from "../chunks/Provider-
|
|
2
|
+
import { c as useStrings, i as useNotify } from "../chunks/Provider-wC9G01Ou.js";
|
|
3
3
|
import cx from "classnames";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Fragment as Fragment$1, memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
package/dist/styles/theme.css
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
--theme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
|
|
47
47
|
--theme-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
|
|
48
48
|
--theme-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
|
|
49
|
+
--theme-auth-shadow: 0 25px 80px -20px rgba(0, 0, 0, 0.2), 0 10px 30px -10px rgba(0, 0, 0, 0.1);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
@utility theme-element {
|
|
@@ -213,3 +214,24 @@
|
|
|
213
214
|
background-color: #ef4444;
|
|
214
215
|
color: #ffffff;
|
|
215
216
|
}
|
|
217
|
+
|
|
218
|
+
@keyframes logo-loader-ripple {
|
|
219
|
+
0%,
|
|
220
|
+
100% {
|
|
221
|
+
opacity: 0.18;
|
|
222
|
+
}
|
|
223
|
+
30% {
|
|
224
|
+
opacity: 1;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.logo-loader-ring {
|
|
229
|
+
animation: logo-loader-ripple 2.2s ease-in-out infinite backwards;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@media (prefers-reduced-motion: reduce) {
|
|
233
|
+
.logo-loader-ring {
|
|
234
|
+
animation: none;
|
|
235
|
+
opacity: 1;
|
|
236
|
+
}
|
|
237
|
+
}
|