@zvk/composite 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +410 -0
- package/dist/activity/activity-feed.d.ts +27 -0
- package/dist/activity/activity-feed.js +30 -0
- package/dist/ai/conversation-directory.d.ts +31 -0
- package/dist/ai/conversation-directory.js +44 -0
- package/dist/ai/provider-model-selector.d.ts +31 -0
- package/dist/ai/provider-model-selector.js +41 -0
- package/dist/ai/sticky-composer.d.ts +14 -0
- package/dist/ai/sticky-composer.js +13 -0
- package/dist/data/data-table-control-bar.d.ts +13 -0
- package/dist/data/data-table-control-bar.js +11 -0
- package/dist/detail/detail-inspector-panel.d.ts +21 -0
- package/dist/detail/detail-inspector-panel.js +18 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +16 -0
- package/dist/integrations/integration-status-card.d.ts +20 -0
- package/dist/integrations/integration-status-card.js +15 -0
- package/dist/layout/feature-shell.d.ts +13 -0
- package/dist/layout/feature-shell.js +7 -0
- package/dist/navigation/command-palette-shell.d.ts +31 -0
- package/dist/navigation/command-palette-shell.js +45 -0
- package/dist/navigation/entity-switcher-menu.d.ts +38 -0
- package/dist/navigation/entity-switcher-menu.js +56 -0
- package/dist/navigation/link-action.d.ts +11 -0
- package/dist/navigation/link-action.js +41 -0
- package/dist/navigation/sectioned-workspace-shell.d.ts +2 -1
- package/dist/navigation/sectioned-workspace-shell.js +2 -2
- package/dist/settings/parameter-editor.d.ts +27 -0
- package/dist/settings/parameter-editor.js +12 -0
- package/dist/settings/settings-section-stack.d.ts +20 -0
- package/dist/settings/settings-section-stack.js +10 -0
- package/dist/state/route-state-frame.d.ts +10 -0
- package/dist/state/route-state-frame.js +31 -0
- package/dist/styles.css +2138 -99
- package/dist/workflows/process-list-panel.d.ts +26 -0
- package/dist/workflows/process-list-panel.js +24 -0
- package/dist/workflows/workflow-status-card.d.ts +20 -0
- package/dist/workflows/workflow-status-card.js +46 -0
- package/package.json +112 -17
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ParameterEditorDensity = "compact" | "default";
|
|
3
|
+
export interface ParameterEditorGroup {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly title?: React.ReactNode;
|
|
6
|
+
readonly description?: React.ReactNode;
|
|
7
|
+
readonly rows: readonly ParameterEditorRow[];
|
|
8
|
+
}
|
|
9
|
+
export interface ParameterEditorRow {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly label: React.ReactNode;
|
|
12
|
+
readonly description?: React.ReactNode;
|
|
13
|
+
readonly value?: React.ReactNode;
|
|
14
|
+
readonly control: React.ReactNode;
|
|
15
|
+
readonly actions?: React.ReactNode;
|
|
16
|
+
readonly changed?: boolean;
|
|
17
|
+
readonly invalid?: boolean;
|
|
18
|
+
readonly disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ParameterEditorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
readonly groups: readonly ParameterEditorGroup[];
|
|
22
|
+
readonly density?: ParameterEditorDensity;
|
|
23
|
+
readonly resetAllAction?: React.ReactNode;
|
|
24
|
+
readonly footer?: React.ReactNode;
|
|
25
|
+
readonly ref?: React.Ref<HTMLDivElement>;
|
|
26
|
+
}
|
|
27
|
+
export declare function ParameterEditor({ className, density, footer, groups, ref, resetAllAction, ...props }: ParameterEditorProps): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../utils/cn.js";
|
|
4
|
+
function hasValue(value) {
|
|
5
|
+
return value !== null && value !== undefined && value !== false;
|
|
6
|
+
}
|
|
7
|
+
function shouldRenderGroup(group) {
|
|
8
|
+
return hasValue(group.title) || hasValue(group.description) || group.rows.length > 0;
|
|
9
|
+
}
|
|
10
|
+
export function ParameterEditor({ className, density = "default", footer, groups, ref, resetAllAction, ...props }) {
|
|
11
|
+
return (_jsxs("div", { ...props, ref: ref, className: cn("zvk-composite-parameter-editor", className), "data-density": density, children: [hasValue(resetAllAction) ? (_jsx("div", { className: "zvk-composite-parameter-editor__toolbar", children: resetAllAction })) : null, _jsx("div", { className: "zvk-composite-parameter-editor__groups", children: groups.filter(shouldRenderGroup).map((group) => (_jsxs("section", { className: "zvk-composite-parameter-editor__group", children: [hasValue(group.title) || hasValue(group.description) ? (_jsxs("div", { className: "zvk-composite-parameter-editor__group-header", children: [hasValue(group.title) ? (_jsx("h3", { className: "zvk-composite-parameter-editor__group-title", children: group.title })) : null, hasValue(group.description) ? (_jsx("p", { className: "zvk-composite-parameter-editor__group-description", children: group.description })) : null] })) : null, group.rows.length > 0 ? (_jsx("div", { className: "zvk-composite-parameter-editor__rows", children: group.rows.map((row) => (_jsxs("div", { className: "zvk-composite-parameter-editor__row", "data-changed": row.changed ? "" : undefined, "data-disabled": row.disabled ? "" : undefined, "data-invalid": row.invalid ? "" : undefined, children: [_jsxs("div", { className: "zvk-composite-parameter-editor__row-copy", children: [_jsx("div", { className: "zvk-composite-parameter-editor__row-label", children: row.label }), hasValue(row.description) ? (_jsx("p", { className: "zvk-composite-parameter-editor__row-description", children: row.description })) : null] }), hasValue(row.value) ? (_jsx("div", { className: "zvk-composite-parameter-editor__row-value", children: row.value })) : null, _jsx("div", { className: "zvk-composite-parameter-editor__row-control", children: row.control }), hasValue(row.actions) ? (_jsx("div", { className: "zvk-composite-parameter-editor__row-actions", children: row.actions })) : null] }, row.id))) })) : null] }, group.id))) }), hasValue(footer) ? _jsx("div", { className: "zvk-composite-parameter-editor__footer", children: footer }) : null] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SettingsSection {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly title: React.ReactNode;
|
|
5
|
+
readonly description?: React.ReactNode;
|
|
6
|
+
readonly content: React.ReactNode;
|
|
7
|
+
readonly alert?: React.ReactNode;
|
|
8
|
+
readonly actions?: React.ReactNode;
|
|
9
|
+
readonly disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface SettingsSectionStackProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
12
|
+
readonly title?: React.ReactNode;
|
|
13
|
+
readonly description?: React.ReactNode;
|
|
14
|
+
readonly sections: readonly SettingsSection[];
|
|
15
|
+
readonly dirty?: boolean;
|
|
16
|
+
readonly saveBar?: React.ReactNode;
|
|
17
|
+
readonly footer?: React.ReactNode;
|
|
18
|
+
readonly ref?: React.Ref<HTMLDivElement>;
|
|
19
|
+
}
|
|
20
|
+
export declare function SettingsSectionStack({ className, description, dirty, footer, ref, saveBar, sections, title, ...props }: SettingsSectionStackProps): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../utils/cn.js";
|
|
4
|
+
function hasValue(value) {
|
|
5
|
+
return value !== null && value !== undefined && value !== false;
|
|
6
|
+
}
|
|
7
|
+
export function SettingsSectionStack({ className, description, dirty = false, footer, ref, saveBar, sections, title, ...props }) {
|
|
8
|
+
const hasHeader = hasValue(title) || hasValue(description);
|
|
9
|
+
return (_jsxs("div", { ...props, ref: ref, className: cn("zvk-composite-settings-section-stack", className), "data-dirty": dirty ? "" : undefined, children: [hasHeader ? (_jsxs("div", { className: "zvk-composite-settings-section-stack__header", children: [hasValue(title) ? _jsx("h2", { className: "zvk-composite-settings-section-stack__title", children: title }) : null, hasValue(description) ? (_jsx("p", { className: "zvk-composite-settings-section-stack__description", children: description })) : null] })) : null, _jsx("div", { className: "zvk-composite-settings-section-stack__sections", children: sections.map((section) => (_jsxs("section", { className: "zvk-composite-settings-section-stack__section", "data-disabled": section.disabled ? "" : undefined, children: [_jsxs("div", { className: "zvk-composite-settings-section-stack__section-header", children: [_jsxs("div", { className: "zvk-composite-settings-section-stack__section-copy", children: [_jsx("h3", { className: "zvk-composite-settings-section-stack__section-title", children: section.title }), hasValue(section.description) ? (_jsx("p", { className: "zvk-composite-settings-section-stack__section-description", children: section.description })) : null] }), hasValue(section.actions) ? (_jsx("div", { className: "zvk-composite-settings-section-stack__section-actions", children: section.actions })) : null] }), hasValue(section.alert) ? (_jsx("div", { className: "zvk-composite-settings-section-stack__section-alert", children: section.alert })) : null, _jsx("div", { className: "zvk-composite-settings-section-stack__section-content", children: section.content })] }, section.id))) }), hasValue(saveBar) ? (_jsx("div", { className: "zvk-composite-settings-section-stack__save-bar", "data-dirty": dirty ? "" : undefined, children: saveBar })) : null, hasValue(footer) ? _jsx("div", { className: "zvk-composite-settings-section-stack__footer", children: footer }) : null] }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type RouteStateFrameStatus = "loading" | "empty" | "error" | "not-found" | "ready";
|
|
3
|
+
export interface RouteStateFrameProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "title"> {
|
|
4
|
+
readonly status: RouteStateFrameStatus;
|
|
5
|
+
readonly title?: React.ReactNode;
|
|
6
|
+
readonly description?: React.ReactNode;
|
|
7
|
+
readonly actions?: React.ReactNode;
|
|
8
|
+
readonly children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function RouteStateFrame({ actions, children, className, description, status, title, ...props }: RouteStateFrameProps): React.JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { StateSurface } from "../state/state-surface.js";
|
|
4
|
+
import { cn } from "../utils/cn.js";
|
|
5
|
+
const routeStateDefaults = {
|
|
6
|
+
loading: {
|
|
7
|
+
title: "Loading",
|
|
8
|
+
description: "Please wait while this view prepares its data."
|
|
9
|
+
},
|
|
10
|
+
empty: {
|
|
11
|
+
title: "Nothing to show",
|
|
12
|
+
description: "There are no items to display yet."
|
|
13
|
+
},
|
|
14
|
+
error: {
|
|
15
|
+
title: "Something went wrong",
|
|
16
|
+
description: "An error prevented this route from loading."
|
|
17
|
+
},
|
|
18
|
+
"not-found": {
|
|
19
|
+
title: "Page not found",
|
|
20
|
+
description: "The requested route is unavailable."
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export function RouteStateFrame({ actions, children, className, description, status, title, ...props }) {
|
|
24
|
+
if (status === "ready") {
|
|
25
|
+
return (_jsx("section", { ...props, className: cn("zvk-composite-route-state-frame", className), "data-status": status, children: children }));
|
|
26
|
+
}
|
|
27
|
+
const fallback = routeStateDefaults[status];
|
|
28
|
+
const resolvedTitle = title ?? fallback.title;
|
|
29
|
+
const resolvedDescription = description ?? fallback.description;
|
|
30
|
+
return (_jsx(StateSurface, { ...props, actions: actions, className: cn("zvk-composite-route-state-frame", "zvk-composite-route-state-frame__surface", className), "data-status": status, description: resolvedDescription, state: status, title: resolvedTitle }));
|
|
31
|
+
}
|