@parallelworks/ui 0.3.1 → 0.5.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.
Files changed (59) hide show
  1. package/dist/chunks/BareModal-DBa84JZO.js +80 -0
  2. package/dist/chunks/{CodePreviewEditor-CSPRILMp.js → CodePreviewEditor-CBtYRZi6.js} +2 -1
  3. package/dist/chunks/CreateModal-6zZZHxCI.js +595 -0
  4. package/dist/chunks/Loader-BXoXTZGc.js +47 -0
  5. package/dist/chunks/{Monaco-CC4ak1JG.js → Monaco-CvFXoW3r.js} +11 -5
  6. package/dist/chunks/{Provider-DvVvScTQ.js → Provider-jQCAN3NN.js} +73 -2
  7. package/dist/chunks/{SwitchToggle-2uRw8ZeJ.js → SwitchToggle-D0ud8cd5.js} +36 -29
  8. package/dist/chunks/{Table-C5z6qWjM.js → Table-ByziK93x.js} +1 -1
  9. package/dist/chunks/{editor-D55tumuZ.js → editor-CEXg6C8X.js} +5 -41
  10. package/dist/chunks/list-CvDWt0TC.js +1259 -0
  11. package/dist/chunks/useCssIsDark-DHr05dG2.js +38 -0
  12. package/dist/components/AddMenu.d.ts +17 -0
  13. package/dist/components/BareModal.d.ts +17 -0
  14. package/dist/components/Button.d.ts +18 -0
  15. package/dist/components/Card.d.ts +19 -0
  16. package/dist/components/ConfirmModal.d.ts +17 -0
  17. package/dist/components/CreateModal.d.ts +92 -0
  18. package/dist/components/Filter.d.ts +15 -0
  19. package/dist/components/FilterPill.d.ts +7 -0
  20. package/dist/components/IconButton.d.ts +17 -0
  21. package/dist/components/Input.d.ts +14 -0
  22. package/dist/components/LetterBadge.d.ts +6 -0
  23. package/dist/components/Loader.d.ts +2 -1
  24. package/dist/components/Pagination.d.ts +15 -0
  25. package/dist/components/Provider.d.ts +39 -12
  26. package/dist/components/SettingModeOption.d.ts +13 -0
  27. package/dist/components/SettingRow.d.ts +18 -0
  28. package/dist/components/SettingsCard.d.ts +24 -0
  29. package/dist/components/SettingsGroup.d.ts +8 -0
  30. package/dist/components/Sort.d.ts +9 -0
  31. package/dist/components/Toggle.d.ts +6 -0
  32. package/dist/components/dropdownUtils.d.ts +10 -0
  33. package/dist/components/ghostButton.d.ts +4 -0
  34. package/dist/components/inputClasses.d.ts +1 -0
  35. package/dist/editor/index.d.ts +0 -1
  36. package/dist/editor/index.js +2 -2
  37. package/dist/file-explorer/index.js +27 -28
  38. package/dist/form/index.js +4 -4
  39. package/dist/index.d.ts +21 -1
  40. package/dist/index.js +433 -8
  41. package/dist/list/HoverCard.d.ts +22 -0
  42. package/dist/list/ListPager.d.ts +7 -0
  43. package/dist/list/ListViewControls.d.ts +12 -0
  44. package/dist/list/index.d.ts +6 -0
  45. package/dist/list/index.js +2 -2
  46. package/dist/list/listSearch.d.ts +27 -0
  47. package/dist/list/listView.d.ts +129 -0
  48. package/dist/list/textEntry.d.ts +2 -0
  49. package/dist/logviewer/index.js +1 -1
  50. package/dist/styles/theme.css +21 -0
  51. package/dist/styles.css +1 -1
  52. package/dist/workflow/index.js +8 -8
  53. package/package.json +2 -6
  54. package/dist/chunks/Loader-DQiZ75fa.js +0 -25
  55. package/dist/chunks/Markdown-C5Re2ezs.js +0 -101
  56. package/dist/chunks/Modal-sOUEwebV.js +0 -121
  57. package/dist/chunks/list-7PyDF1tz.js +0 -465
  58. package/dist/components/Modal.d.ts +0 -26
  59. /package/dist/{editor → components}/useCssIsDark.d.ts +0 -0
@@ -0,0 +1,38 @@
1
+ import { useEffect, useState } from "react";
2
+ //#region src/components/useCssIsDark.ts
3
+ function readIsDark() {
4
+ const scheme = getComputedStyle(document.documentElement).colorScheme;
5
+ const dark = scheme.includes("dark");
6
+ if (dark !== scheme.includes("light")) return dark;
7
+ if (typeof window.matchMedia !== "function") return false;
8
+ return window.matchMedia("(prefers-color-scheme: dark)").matches;
9
+ }
10
+ /**
11
+ * Follows the host's CSS color-scheme, the same signal the log viewer's
12
+ * light-dark() palette uses — no provider API involved. For the rare concrete
13
+ * pick (editor themes, image variants) the tokens cannot express.
14
+ */
15
+ function useCssIsDark() {
16
+ const [isDark, setIsDark] = useState(readIsDark);
17
+ useEffect(() => {
18
+ const update = () => setIsDark(readIsDark());
19
+ const media = typeof window.matchMedia === "function" ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
20
+ media?.addEventListener("change", update);
21
+ const observer = new MutationObserver(update);
22
+ observer.observe(document.documentElement, {
23
+ attributes: true,
24
+ attributeFilter: [
25
+ "style",
26
+ "class",
27
+ "data-theme"
28
+ ]
29
+ });
30
+ return () => {
31
+ media?.removeEventListener("change", update);
32
+ observer.disconnect();
33
+ };
34
+ }, []);
35
+ return isDark;
36
+ }
37
+ //#endregion
38
+ export { useCssIsDark as t };
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface HeaderAddMenuItem {
3
+ label: string;
4
+ icon?: ReactNode;
5
+ to?: string;
6
+ onSelect?: () => void;
7
+ disabled?: boolean;
8
+ separatorAbove?: boolean;
9
+ }
10
+ export declare function AddMenu({ items, label, buttonClassName, zClassName, children, }: {
11
+ items: HeaderAddMenuItem[];
12
+ label: string;
13
+ buttonClassName?: string;
14
+ /** Raise above modals when needed (e.g. z-[9999]). */
15
+ zClassName?: string;
16
+ children: ReactNode;
17
+ }): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent, ReactNode } from 'react';
2
+ /** Omit when the content supplies its own panel styling. */
3
+ export declare const modalPanelClasses = "rounded-xl border border-(--theme-border) bg-(--theme-app-bg) text-(--theme-app) shadow-2xl";
4
+ export declare function BareModal({ open, onClose, ariaLabel, className, onPanelKeyDown, onPanelMouseDown, align, preventClose, children, }: {
5
+ open: boolean;
6
+ onClose: () => void;
7
+ ariaLabel?: string;
8
+ className?: string;
9
+ onPanelKeyDown?: (e: ReactKeyboardEvent<HTMLDivElement>) => void;
10
+ onPanelMouseDown?: (e: ReactMouseEvent<HTMLDivElement>) => void;
11
+ /** Vertical placement of the panel. Defaults to the ds top-anchored position. */
12
+ align?: 'top' | 'center';
13
+ /** Block the accidental-dismiss paths (backdrop click, Escape) so typed
14
+ * input isn't lost. The explicit close controls still work. */
15
+ preventClose?: boolean;
16
+ children: ReactNode;
17
+ }): import("react").ReactPortal | null;
@@ -0,0 +1,18 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
4
+ size?: 'default' | 'sm' | 'lg';
5
+ loading?: boolean;
6
+ icon?: ReactNode;
7
+ iconPosition?: 'left' | 'right';
8
+ fullWidth?: boolean;
9
+ }
10
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
11
+ interface MethodButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
12
+ icon?: ReactNode;
13
+ label: string;
14
+ description?: string;
15
+ href?: string;
16
+ }
17
+ export declare function MethodButton({ icon, label, description, href, className, ...props }: MethodButtonProps): import("react").JSX.Element;
18
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ interface CardProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ wide?: boolean;
6
+ compact?: boolean;
7
+ interactive?: boolean;
8
+ authShadow?: boolean;
9
+ }
10
+ export declare function Card({ children, className, wide, compact, interactive, authShadow, }: CardProps): import("react").JSX.Element;
11
+ interface CardHeaderProps {
12
+ badge?: ReactNode;
13
+ title: string;
14
+ description?: ReactNode;
15
+ className?: string;
16
+ align?: 'center' | 'left';
17
+ }
18
+ export declare function CardHeader({ badge, title, description, className, align, }: CardHeaderProps): import("react").JSX.Element;
19
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ export declare function ConfirmModal({ open, onClose, title, description, children, confirmLabel, onConfirm, confirmDisabled, destructive, align, cancelLabel, closeOnConfirm, }: {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ title: string;
6
+ description?: ReactNode;
7
+ children?: ReactNode;
8
+ confirmLabel: string;
9
+ /** An async handler keeps both buttons disabled until it settles. */
10
+ onConfirm: () => void | Promise<unknown>;
11
+ confirmDisabled?: boolean;
12
+ destructive?: boolean;
13
+ align?: 'top' | 'center';
14
+ cancelLabel?: string;
15
+ /** When false, the dialog stays open after a successful confirm. */
16
+ closeOnConfirm?: boolean;
17
+ }): import("react").JSX.Element;
@@ -0,0 +1,92 @@
1
+ import type { InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from 'react';
2
+ import { type HeaderAddMenuItem } from './AddMenu.js';
3
+ interface CreateModalProps {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ typeIcon?: ReactNode;
7
+ typeLabel: string;
8
+ /** Makes the type chip a dropdown to switch between sibling form types. */
9
+ typeMenu?: HeaderAddMenuItem[];
10
+ namePlaceholder: string;
11
+ hideName?: boolean;
12
+ initialName?: string;
13
+ showDescription?: boolean;
14
+ descriptionPlaceholder?: string;
15
+ submitLabel?: string;
16
+ submittingLabel?: string;
17
+ validateName?: (name: string) => string | null;
18
+ /** Normalize the name as the user types (e.g. strip disallowed characters). */
19
+ sanitizeName?: (name: string) => string;
20
+ nameHint?: (name: string) => ReactNode;
21
+ children?: ReactNode;
22
+ properties?: ReactNode;
23
+ advanced?: ReactNode;
24
+ submitDisabled?: boolean;
25
+ /** Hide the primary submit button and label the dismiss button "Close". */
26
+ hideSubmit?: boolean;
27
+ nameOptional?: boolean;
28
+ onNameChange?: (name: string) => void;
29
+ /** Additional unsaved input in `children`/`properties` that should block an
30
+ * accidental dismiss (name/description/favorite are already tracked). */
31
+ dirty?: boolean;
32
+ /** Show a favorite toggle in the footer. */
33
+ showFavorite?: boolean;
34
+ /** Resolves true to close the modal, false to keep it open (e.g. on error). */
35
+ onSubmit: (name: string, description: string, favorite: boolean) => Promise<boolean>;
36
+ }
37
+ /** Submits on Enter in the name field or ⌘/Ctrl+Enter from anywhere in the panel. */
38
+ export declare function CreateModal({ open, onClose, typeIcon, typeLabel, typeMenu, namePlaceholder, hideName, initialName, showDescription, descriptionPlaceholder, submitLabel, submittingLabel, validateName, sanitizeName, nameHint, children, properties, advanced, submitDisabled, hideSubmit, nameOptional, onNameChange, dirty, showFavorite, onSubmit, }: CreateModalProps): import("react").JSX.Element;
39
+ /** Labeled single-line input row for the dialog's extra fields. */
40
+ export declare function CreateModalField({ label, tooltip, ...props }: InputHTMLAttributes<HTMLInputElement> & {
41
+ label: string;
42
+ /** Help text surfaced via an info icon next to the label. */
43
+ tooltip?: string;
44
+ }): import("react").JSX.Element;
45
+ /** Labeled multi-line field for credential blobs (JSON keys, PEM keys). */
46
+ export declare function CreateModalTextarea({ label, tooltip, rows, ...props }: TextareaHTMLAttributes<HTMLTextAreaElement> & {
47
+ label: string;
48
+ /** Help text surfaced via an info icon next to the label. */
49
+ tooltip?: string;
50
+ }): import("react").JSX.Element;
51
+ /** Labeled input row with typeahead suggestions; free-form values allowed. */
52
+ export declare function CreateModalAutocompleteField({ label, tooltip, value, onChange, options, placeholder, }: {
53
+ label: string;
54
+ /** Help text surfaced via an info icon next to the label. */
55
+ tooltip?: string;
56
+ value: string;
57
+ onChange: (value: string) => void;
58
+ options: string[];
59
+ placeholder?: string;
60
+ }): import("react").JSX.Element;
61
+ /** Compact property pill with an on/off switch. */
62
+ export declare function CreateModalSwitch({ label, checked, onChange, tooltip, }: {
63
+ label: string;
64
+ checked: boolean;
65
+ onChange: (checked: boolean) => void;
66
+ /** Help text surfaced on hover (explains what the toggle does). */
67
+ tooltip?: string;
68
+ }): import("react").JSX.Element;
69
+ export interface CreateModalSelectOption {
70
+ label: string;
71
+ value: string;
72
+ /** Small leading icon (e.g. the resource's provider icon). */
73
+ icon?: ReactNode;
74
+ /** Category header to group this option under in the dropdown. */
75
+ group?: string;
76
+ }
77
+ /** Compact property pill with a dropdown of options. Options may carry leading
78
+ * icons and group headers (e.g. Clusters vs Kubernetes). */
79
+ export declare function CreateModalSelect({ label, icon, value, options, onChange, disabled, disabledHint, tooltip, }: {
80
+ label: string;
81
+ icon?: ReactNode;
82
+ value?: string;
83
+ options: CreateModalSelectOption[];
84
+ onChange: (value: string) => void;
85
+ /** Gray the pill out (e.g. while a prerequisite pill is unset). */
86
+ disabled?: boolean;
87
+ /** Shown as the pill's tooltip while disabled (e.g. the prerequisite). */
88
+ disabledHint?: string;
89
+ /** Help text surfaced on hover (explains what the pill selects). */
90
+ tooltip?: string;
91
+ }): import("react").JSX.Element;
92
+ export {};
@@ -0,0 +1,15 @@
1
+ interface FilterPill {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ interface FilterProps {
6
+ filter: string;
7
+ setFilter: (value: string) => void;
8
+ placeholder?: string;
9
+ /** Optional filter pills rendered before the search input */
10
+ pills?: FilterPill[];
11
+ activePill?: string;
12
+ onPillChange?: (value: string) => void;
13
+ }
14
+ export default function Filter({ filter, setFilter, placeholder, pills, activePill, onPillChange, }: FilterProps): import("react").JSX.Element;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ interface FilterPillProps {
2
+ active: boolean;
3
+ onClick: () => void;
4
+ children: React.ReactNode;
5
+ }
6
+ export declare function FilterPill({ active, onClick, children }: FilterPillProps): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ /** Icon to display */
4
+ icon: ReactNode;
5
+ /** Accessible label (used for aria-label and tooltip) */
6
+ label: string;
7
+ /** Button variant */
8
+ variant?: 'default' | 'ghost' | 'primary' | 'success';
9
+ /** Size of the button */
10
+ size?: 'sm' | 'md' | 'lg';
11
+ /** Whether button is in active/selected state */
12
+ active?: boolean;
13
+ /** Whether to show tooltip on hover */
14
+ showTooltip?: boolean;
15
+ }
16
+ export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
17
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { InputHTMLAttributes, TextareaHTMLAttributes, ReactNode } from 'react';
2
+ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ label?: ReactNode;
4
+ error?: string;
5
+ mono?: boolean;
6
+ }
7
+ export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
8
+ interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
9
+ label?: string;
10
+ error?: string;
11
+ mono?: boolean;
12
+ }
13
+ export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
14
+ export {};
@@ -0,0 +1,6 @@
1
+ /** A compact letter badge ("AI", "PUB", "SSH") used as a type mark in place of
2
+ * an icon. Size the box and text via className (e.g. "h-5 w-5 text-[8px]"). */
3
+ export declare function LetterBadge({ text, className, }: {
4
+ text: string;
5
+ className?: string;
6
+ }): import("react").JSX.Element;
@@ -5,6 +5,7 @@ interface LoaderProps {
5
5
  color?: string;
6
6
  full?: boolean;
7
7
  loaderStyle?: React.CSSProperties;
8
+ variant?: 'spinner' | 'logo';
8
9
  }
9
- export default function Loader({ size, text, textSize, full, color, loaderStyle, }: LoaderProps): import("react").JSX.Element;
10
+ export default function Loader({ size, text, textSize, full, color, loaderStyle, variant, }: LoaderProps): import("react").JSX.Element;
10
11
  export {};
@@ -0,0 +1,15 @@
1
+ interface IPaginationProps {
2
+ nextCallback: () => void;
3
+ prevCallback: () => void;
4
+ startingNumber?: string | number;
5
+ endingNumber?: string | number;
6
+ startingTime?: string;
7
+ endingTime?: string;
8
+ nextDisabled: boolean;
9
+ prevDisabled: boolean;
10
+ name?: string;
11
+ roundedBottom?: boolean;
12
+ useTimeRange?: boolean;
13
+ }
14
+ declare function Pagination({ endingNumber, endingTime, nextCallback, prevCallback, roundedBottom, startingNumber, startingTime, nextDisabled, prevDisabled, name, useTimeRange, }: IPaginationProps): import("react").JSX.Element;
15
+ export { Pagination };
@@ -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;
@@ -295,6 +309,31 @@ export interface UIStrings {
295
309
  labelId: string;
296
310
  labelUrl: string;
297
311
  couldNotLoad: (noun: string) => string;
312
+ displayOptions: string;
313
+ grouping: string;
314
+ ordering: string;
315
+ orderDefault: string;
316
+ orderFavorites: string;
317
+ ascending: string;
318
+ descending: string;
319
+ columnHeaders: string;
320
+ showColumnHeaders: string;
321
+ showActions: string;
322
+ showRowActions: string;
323
+ alwaysShowActions: string;
324
+ alwaysShowRowActions: string;
325
+ displayProperties: string;
326
+ pinnedActions: string;
327
+ pinnedActionsHelp: string;
328
+ reset: string;
329
+ none: string;
330
+ filter: string;
331
+ clear: string;
332
+ pager: (start: number, end: number, total: number) => string;
333
+ paginationPrevious: string;
334
+ paginationNext: string;
335
+ paginationShowing: (name: string, start: number | string, end: number | string) => ReactNode;
336
+ paginationShowingTimeRange: (name: string, startTime: string, endTime: string) => ReactNode;
298
337
  };
299
338
  }
300
339
  export interface UINavigation {
@@ -397,18 +436,6 @@ export interface UISlots {
397
436
  storage: unknown;
398
437
  groups?: unknown;
399
438
  }) => ReactNode;
400
- /** The storage explorer's create-folder dialog; absent hides the affordance. */
401
- createFolderDialog?: (args: {
402
- open: boolean;
403
- onClose: () => void;
404
- typeIcon?: ReactNode;
405
- typeLabel: string;
406
- namePlaceholder: string;
407
- submitLabel: string;
408
- submittingLabel: string;
409
- validateName: (name: string) => string | null;
410
- onSubmit: (name: string) => Promise<boolean>;
411
- }) => ReactNode;
412
439
  }
413
440
  export interface UIProviderValue {
414
441
  notify: UINotify;
@@ -0,0 +1,13 @@
1
+ /** A labeled + described radio option row, used inside a SettingsCard to pick
2
+ * between modes (e.g. default vs custom). Stacked rows share the card's
3
+ * dividers via `isFirst`. */
4
+ export declare function SettingModeOption({ name, checked, onSelect, label, description, isFirst, disabled, }: {
5
+ /** Radio group name; shared across the options of one picker. */
6
+ name: string;
7
+ checked: boolean;
8
+ onSelect: () => void;
9
+ label: string;
10
+ description: string;
11
+ isFirst?: boolean;
12
+ disabled?: boolean;
13
+ }): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ export declare function SettingRow({ label, htmlFor, helpText, children, isFirst, fill, onClick, }: {
3
+ label: string;
4
+ htmlFor?: string;
5
+ helpText?: ReactNode;
6
+ children: ReactNode;
7
+ isFirst?: boolean;
8
+ /** When set, the control column fills and left-aligns for full-width inputs; default is the compact right-aligned control. */
9
+ fill?: boolean;
10
+ /** Makes the whole row a click target for its control (e.g. a toggle). The
11
+ * control still handles its own click; stop propagation there to avoid a
12
+ * double toggle. */
13
+ onClick?: () => void;
14
+ }): import("react").JSX.Element;
15
+ export declare function SettingSection({ title, isFirst, }: {
16
+ title: string;
17
+ isFirst?: boolean;
18
+ }): import("react").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import type { ReactNode } from 'react';
2
+ interface SettingsCardProps {
3
+ /** Sentence-case section label above the card. Omit on the first card of a
4
+ * page, where the page title already names the section. */
5
+ title?: string;
6
+ description?: ReactNode;
7
+ /** Control rendered on the right of the section label (e.g. a small action). */
8
+ action?: ReactNode;
9
+ /** 'adjacent' (default) sits the action next to the title (e.g. a `+`);
10
+ * 'right' pushes it to the far edge of the header (e.g. a Save button). */
11
+ actionAlign?: 'adjacent' | 'right';
12
+ /** Let inner content (e.g. a dropdown menu) overflow the panel instead of
13
+ * being clipped to its rounded corners. */
14
+ overflowVisible?: boolean;
15
+ children: ReactNode;
16
+ className?: string;
17
+ }
18
+ /**
19
+ * A settings card: an optional sentence-case section label sits above a
20
+ * bordered panel of rows. The label carries the breathing-room rhythm between
21
+ * cards; the rows inside provide their own dividers via SettingRow's `isFirst`.
22
+ */
23
+ export default function SettingsCard({ title, description, action, actionAlign, overflowVisible, children, className, }: SettingsCardProps): import("react").JSX.Element;
24
+ export {};
@@ -0,0 +1,8 @@
1
+ import type React from 'react';
2
+ interface SettingsGroupProps {
3
+ title?: string;
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ }
7
+ export default function SettingsGroup({ title, children, className, }: SettingsGroupProps): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ export type TDirection = 'ascending' | 'descending' | 'unsorted';
2
+ declare function Sort<T extends string>({ currentlySorted, name, setCurrentDirection, setCurrentlySorted, currentDirection, }: {
3
+ currentlySorted: T | null;
4
+ name: NoInfer<T>;
5
+ setCurrentDirection: (direction: TDirection) => void;
6
+ setCurrentlySorted: (value: NoInfer<T> | '') => void;
7
+ currentDirection: TDirection;
8
+ }): import("react").JSX.Element;
9
+ export default Sort;
@@ -0,0 +1,6 @@
1
+ export declare function Toggle({ checked, onChange, disabled, label, }: {
2
+ checked: boolean;
3
+ onChange: (checked: boolean) => void;
4
+ disabled?: boolean;
5
+ label?: string;
6
+ }): import("react").JSX.Element;
@@ -15,4 +15,14 @@ export declare function isCategory<T>(option: ICategory<T> | IOptions<T> | strin
15
15
  export declare function isOption<T>(option: ICategory<T> | IOptions<T> | string): option is IOptions<T>;
16
16
  export declare function flattenOptions<T>(options: (ICategory<T> | IOptions<T> | string)[]): (IOptions<T> | ICategory<T>)[];
17
17
  export declare function filterOption<T>(option: IOptions<T>, query: string): boolean;
18
+ export type FlatOption = IOptions & {
19
+ category?: boolean;
20
+ };
21
+ export declare function flattenFilteredOptions({ options, query, selectedValue, allowCustomValue, customValueLabel, }: {
22
+ options: (ICategory | IOptions)[];
23
+ query: string;
24
+ selectedValue?: unknown;
25
+ allowCustomValue?: boolean;
26
+ customValueLabel?: string;
27
+ }): FlatOption[];
18
28
  export declare function DropdownCaret(): React.JSX.Element;
@@ -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";
@@ -0,0 +1 @@
1
+ export declare const inputClasses = "w-full rounded-md border theme-border bg-(--theme-input-bg) px-3 py-2 text-sm text-(--theme-panel) outline-none focus:ring-2 focus:ring-(--theme-element)";
@@ -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';
@@ -1,2 +1,2 @@
1
- import { a as FormCodePanel, i as getThemeName, n as setupMonacoWorkers, o as EditorField, r as defineEditorThemes, s as Editor, t as useCssIsDark } from "../chunks/editor-D55tumuZ.js";
2
- export { Editor, EditorField, FormCodePanel, defineEditorThemes, getThemeName, setupMonacoWorkers, useCssIsDark };
1
+ import { a as EditorField, i as FormCodePanel, n as defineEditorThemes, o as Editor, r as getThemeName, t as setupMonacoWorkers } from "../chunks/editor-CEXg6C8X.js";
2
+ export { Editor, EditorField, FormCodePanel, defineEditorThemes, getThemeName, setupMonacoWorkers };
@@ -1,12 +1,11 @@
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 { i as Callout, n as CopyCodeBlock, r as CopyToClipboard, t as Markdown } from "../chunks/Markdown-C5Re2ezs.js";
3
- import { a as useProvisionCorsRules, c as useStrings, i as useNotify, s as useSlots } from "../chunks/Provider-DvVvScTQ.js";
2
+ import { c as ConfirmModal, f as Markdown, h as Callout, m as CopyToClipboard, p as CopyCodeBlock, t as CreateModal } from "../chunks/CreateModal-6zZZHxCI.js";
3
+ import { a as useProvisionCorsRules, c as useStrings, i as useNotify, s as useSlots } from "../chunks/Provider-jQCAN3NN.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-DQiZ75fa.js";
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-C5z6qWjM.js";
9
- import { _ as useRowMenu, d as MoreButton, f as assembleRowMenu, i as ListSkeleton, l as listTableFixedProps, n as ListActionsHeader, p as copySubmenu, s as RowSelectCheckbox, u as listTableProps, v as useRowMenuActive } from "../chunks/list-7PyDF1tz.js";
7
+ import { n as Table } from "../chunks/Table-ByziK93x.js";
8
+ import { A as useRowMenu, C as listTableProps, E as copySubmenu, S as listTableFixedProps, T as assembleRowMenu, _ as ListSkeleton, b as RowSelectCheckbox, h as ListActionsHeader, j as useRowMenuActive, w as MoreButton } from "../chunks/list-CvDWt0TC.js";
10
9
  import cx from "classnames";
11
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
11
  import { Suspense, createContext, lazy, memo, use, useCallback, useEffect, useEffectEvent, useId, useLayoutEffect, useMemo, useRef, useState, useTransition } from "react";
@@ -39,10 +38,11 @@ function getNodeName(node) {
39
38
  return parts[parts.length - 1];
40
39
  }
41
40
  function buildTreeFromStorage(storage, unsortedParents) {
42
- if (!storage || !storage.objects) return {
41
+ if (!storage) return {
43
42
  treeMap: {},
44
43
  parentToChildrenMap: {}
45
44
  };
45
+ const objects = storage.objects ?? [];
46
46
  const cspBucketName = storage.bucketName || storage.name;
47
47
  const storagePath = storage.user ? ensureTrailingSlash(`${storage.user}/${storage.name}`) : ensureTrailingSlash(storage.name);
48
48
  const treeMap = { [storagePath]: {
@@ -60,8 +60,8 @@ function buildTreeFromStorage(storage, unsortedParents) {
60
60
  storageType: storage.type,
61
61
  root: true
62
62
  } };
63
- const directories = storage.objects.filter((obj) => obj.type === "directory");
64
- const files = storage.objects.filter((obj) => obj.type === "file");
63
+ const directories = objects.filter((obj) => obj.type === "directory");
64
+ const files = objects.filter((obj) => obj.type === "file");
65
65
  directories.forEach((dir) => {
66
66
  const fullPath = ensureTrailingSlash(`${storagePath}${removeLeadingSlash(removeTrailingSlash(dir.path))}`);
67
67
  treeMap[fullPath] = {
@@ -2518,7 +2518,7 @@ function useObjectText(url, { enabled, maxBytes, maxLines, knownSize, cacheKey,
2518
2518
  }
2519
2519
  //#endregion
2520
2520
  //#region src/file-explorer/FilePreview/Viewer.tsx
2521
- var CodePreviewEditor = lazy(() => import("../chunks/CodePreviewEditor-CSPRILMp.js"));
2521
+ var CodePreviewEditor = lazy(() => import("../chunks/CodePreviewEditor-CBtYRZi6.js"));
2522
2522
  var PREVIEW_MARKDOWN_CONTROLS = {
2523
2523
  table: { fullscreen: false },
2524
2524
  mermaid: { fullscreen: false }
@@ -5498,7 +5498,7 @@ function FileExplorer({ storages, onRefresh, showUserHierarchy = false, groups =
5498
5498
  onDownload: downloadNode,
5499
5499
  onCopyUri: copyNodeUri
5500
5500
  }),
5501
- slots.createFolderDialog?.({
5501
+ /* @__PURE__ */ jsx(CreateModal, {
5502
5502
  open: !!createFolderTarget,
5503
5503
  onClose: () => setCreateFolderTarget(null),
5504
5504
  typeIcon: /* @__PURE__ */ jsx(FolderIcon, { className: "w-3 h-3" }),
@@ -5513,19 +5513,18 @@ function FileExplorer({ storages, onRefresh, showUserHierarchy = false, groups =
5513
5513
  className: "absolute inset-0 bg-(--theme-app-bg)/75 backdrop-blur-[2px] transition-opacity flex items-center justify-center z-50",
5514
5514
  children: /* @__PURE__ */ jsx(Loader, { full: true })
5515
5515
  }),
5516
- /* @__PURE__ */ jsx(Modal, {
5517
- isOpen: uploadModalOpen && !!pendingUpload,
5518
- close: () => {
5516
+ /* @__PURE__ */ jsx(ConfirmModal, {
5517
+ open: uploadModalOpen && !!pendingUpload,
5518
+ onClose: () => {
5519
5519
  setUploadModalOpen(false);
5520
5520
  setPendingUpload(null);
5521
5521
  },
5522
- type: "info",
5522
+ align: "center",
5523
5523
  title: t.confirmUpload.title,
5524
- text: t.confirmUpload.text(pendingUpload?.targetPath || t.confirmUpload.defaultPath),
5525
- actionLabel: t.confirmUpload.confirm,
5526
- action: handleUpload,
5527
- disableAction: pendingUpload ? isUploadSizeExceeded(pendingUpload.totalSize) : false,
5528
- fitWidth: true,
5524
+ description: t.confirmUpload.text(pendingUpload?.targetPath || t.confirmUpload.defaultPath),
5525
+ confirmLabel: t.confirmUpload.confirm,
5526
+ onConfirm: handleUpload,
5527
+ confirmDisabled: pendingUpload ? isUploadSizeExceeded(pendingUpload.totalSize) : false,
5529
5528
  children: /* @__PURE__ */ jsxs("div", {
5530
5529
  className: "text-sm flex flex-col gap-2 mt-2 text-left",
5531
5530
  children: [
@@ -5574,19 +5573,19 @@ function FileExplorer({ storages, onRefresh, showUserHierarchy = false, groups =
5574
5573
  ]
5575
5574
  })
5576
5575
  }),
5577
- /* @__PURE__ */ jsx(Modal, {
5578
- isOpen: deleteModalOpen && !!pendingDelete,
5579
- close: () => {
5576
+ /* @__PURE__ */ jsx(ConfirmModal, {
5577
+ open: deleteModalOpen && !!pendingDelete,
5578
+ onClose: () => {
5580
5579
  setDeleteModalOpen(false);
5581
5580
  setPendingDelete(null);
5582
5581
  setCheckedItems(/* @__PURE__ */ new Set());
5583
5582
  },
5584
- type: "destructive",
5583
+ align: "center",
5584
+ destructive: true,
5585
5585
  title: t.confirmDelete.title,
5586
- text: t.confirmDelete.text,
5587
- actionLabel: t.confirmDelete.action,
5588
- action: handleDelete,
5589
- fitWidth: true,
5586
+ description: t.confirmDelete.text,
5587
+ confirmLabel: t.confirmDelete.action,
5588
+ onConfirm: handleDelete,
5590
5589
  children: /* @__PURE__ */ jsx("div", {
5591
5590
  className: "text-sm flex flex-col gap-2 mt-2 text-left",
5592
5591
  children: /* @__PURE__ */ jsx("ul", {