@shepai/cli 1.112.1 → 1.113.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/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +1 -0
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +5 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.js +42 -2
- package/dist/src/presentation/web/app/(dashboard)/@drawer/create/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/@drawer/create/page.js +9 -2
- package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.d.ts +3 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.js +2 -2
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +17 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +96 -5
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +11 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +51 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/index.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/index.js +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts +14 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.js +42 -0
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.d.ts +22 -0
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.js +43 -0
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.js +63 -0
- package/dist/src/presentation/web/components/common/floating-action-button/index.d.ts +3 -0
- package/dist/src/presentation/web/components/common/floating-action-button/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/floating-action-button/index.js +1 -0
- package/dist/src/presentation/web/components/common/index.d.ts +1 -0
- package/dist/src/presentation/web/components/common/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/index.js +1 -0
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +35 -6
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts +1 -4
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +4 -4
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +0 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +20 -20
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +20 -20
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_a1104008.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_a1104008.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_92642200.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_92642200.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__039967e3._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__039967e3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07a39ff2._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2773312c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2773312c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5edfc56b._.js +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__845a9d2a._.js → [root-of-the-server]__6367aea0._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6367aea0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__cbd8062c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__cbd8062c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e70c5627._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e70c5627._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0e506641._.js +7 -0
- package/web/.next/server/chunks/ssr/{_e6f2da4f._.js.map → _0e506641._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_573c7402._.js → _88e359a0._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_573c7402._.js.map → _88e359a0._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_6b105fbc._.js → _e6b5ebbd._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_6b105fbc._.js.map → _e6b5ebbd._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_07178808._.js → _fcfc1141._.js} +2 -2
- package/web/.next/server/chunks/ssr/_fcfc1141._.js.map +1 -0
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_888633e1.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_888633e1.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ce7cbc3c._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_ce7cbc3c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e2604413._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_e2604413._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +31 -31
- package/web/.next/static/chunks/0e3793f87c0d2be4.js +1 -0
- package/web/.next/static/chunks/1213d5af738d8e44.js +1 -0
- package/web/.next/static/chunks/{49edfaea86bca4d4.js → 45687d169255cd7a.js} +1 -1
- package/web/.next/static/chunks/619af41a8d3232e5.js +1 -0
- package/web/.next/static/chunks/694fc9a1173043d8.css +1 -0
- package/web/.next/static/chunks/{9de58b31821657a7.js → 7249bab754695c9b.js} +2 -2
- package/web/.next/static/chunks/9bfafbbd2d362548.js +2 -0
- package/web/.next/static/chunks/af4d18c173729fc0.js +1 -0
- package/web/.next/static/chunks/d3ae2e0768e0361a.js +11 -0
- package/web/.next/static/chunks/{ac1fcc4b433cdbbf.js → e7d33f2288fea0d0.js} +1 -1
- package/web/.next/static/chunks/{ea5af66e7cd1d64c.js → e870d8454835338c.js} +1 -1
- package/web/.next/static/chunks/ebf7b7a1414b813f.js +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_07178808._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e6f2da4f._.js +0 -7
- package/web/.next/static/chunks/3a785cd8a96b8402.js +0 -1
- package/web/.next/static/chunks/5025b973997eb889.js +0 -1
- package/web/.next/static/chunks/5543614d36607aef.js +0 -1
- package/web/.next/static/chunks/5558a658fa82a01f.css +0 -1
- package/web/.next/static/chunks/a9357597e52bd4bc.js +0 -1
- package/web/.next/static/chunks/e04a5e18ea5fd053.js +0 -1
- package/web/.next/static/chunks/f02fe16cf143e186.js +0 -11
- package/web/.next/static/chunks/fc7dda19227ec43d.js +0 -2
- /package/web/.next/static/{h5YMwar8bSq9VnHhJNqVt → f-Ju5FEgjPPi1hAjRWRoZ}/_buildManifest.js +0 -0
- /package/web/.next/static/{h5YMwar8bSq9VnHhJNqVt → f-Ju5FEgjPPi1hAjRWRoZ}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{h5YMwar8bSq9VnHhJNqVt → f-Ju5FEgjPPi1hAjRWRoZ}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { RepositoryCombobox } from './feature-create-drawer.js';
|
|
4
|
+
const SAMPLE_REPOSITORIES = [
|
|
5
|
+
{ id: 'repo-001', name: 'my-app', path: '/Users/dev/projects/my-app' },
|
|
6
|
+
{ id: 'repo-002', name: 'api-service', path: '/Users/dev/projects/api-service' },
|
|
7
|
+
{ id: 'repo-003', name: 'shared-lib', path: '/Users/dev/libs/shared-lib' },
|
|
8
|
+
{ id: 'repo-004', name: 'docs-site', path: '/Users/dev/projects/docs-site' },
|
|
9
|
+
];
|
|
10
|
+
const meta = {
|
|
11
|
+
title: 'Drawers/Feature/RepositoryCombobox',
|
|
12
|
+
component: RepositoryCombobox,
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'centered',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
function RepositoryComboboxWrapper({ repositories: initialRepos, initialValue, disabled, }) {
|
|
20
|
+
const [repos, setRepos] = useState(initialRepos);
|
|
21
|
+
const [value, setValue] = useState(initialValue);
|
|
22
|
+
return (_jsxs("div", { className: "w-80", children: [_jsx(RepositoryCombobox, { repositories: repos, value: value, onChange: setValue, onAddRepository: (repo) => {
|
|
23
|
+
setRepos((prev) => [...prev, repo]);
|
|
24
|
+
setValue(repo.path);
|
|
25
|
+
}, disabled: disabled }), value ? _jsxs("p", { className: "text-muted-foreground mt-2 text-xs", children: ["Selected: ", value] }) : null] }));
|
|
26
|
+
}
|
|
27
|
+
/** Default state with multiple repositories available for selection. */
|
|
28
|
+
export const WithRepositories = {
|
|
29
|
+
render: () => _jsx(RepositoryComboboxWrapper, { repositories: SAMPLE_REPOSITORIES }),
|
|
30
|
+
};
|
|
31
|
+
/** Empty list — shows "No repositories found." message and "Add new repository..." option. */
|
|
32
|
+
export const EmptyList = {
|
|
33
|
+
render: () => _jsx(RepositoryComboboxWrapper, { repositories: [] }),
|
|
34
|
+
};
|
|
35
|
+
/** Pre-selected repository — trigger button shows the selected repo name. */
|
|
36
|
+
export const PreSelected = {
|
|
37
|
+
render: () => (_jsx(RepositoryComboboxWrapper, { repositories: SAMPLE_REPOSITORIES, initialValue: "/Users/dev/projects/api-service" })),
|
|
38
|
+
};
|
|
39
|
+
/** Disabled state — combobox trigger button is non-interactive. */
|
|
40
|
+
export const Disabled = {
|
|
41
|
+
render: () => _jsx(RepositoryComboboxWrapper, { repositories: SAMPLE_REPOSITORIES, disabled: true }),
|
|
42
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface FloatingActionButtonAction {
|
|
2
|
+
/** Unique key for the action. */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Accessible label shown next to the icon. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Lucide icon component. */
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
/** Called when the action is clicked. */
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
/** Whether the action is currently loading. */
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
/** Whether the action is disabled. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface FloatingActionButtonProps {
|
|
16
|
+
/** Action items shown when the FAB is expanded. */
|
|
17
|
+
actions: FloatingActionButtonAction[];
|
|
18
|
+
/** Additional CSS classes for the container. */
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function FloatingActionButton({ actions, className }: FloatingActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=floating-action-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-action-button.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/floating-action-button/floating-action-button.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,0BAA0B;IACzC,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,yCAAyC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,mDAAmD;IACnD,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD,wBAAgB,oBAAoB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,yBAAyB,2CAiHrF"}
|
package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { Plus, Loader2, X } from 'lucide-react';
|
|
5
|
+
import { cn } from '../../../lib/utils.js';
|
|
6
|
+
import { Button } from '../../ui/button.js';
|
|
7
|
+
/** Stagger delay between each item animation in ms. */
|
|
8
|
+
const STAGGER_MS = 50;
|
|
9
|
+
/** Total animation duration in ms. */
|
|
10
|
+
const DURATION_MS = 250;
|
|
11
|
+
export function FloatingActionButton({ actions, className }) {
|
|
12
|
+
const [open, setOpen] = useState(false);
|
|
13
|
+
// Close on Escape key
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!open)
|
|
16
|
+
return;
|
|
17
|
+
function handleKeyDown(e) {
|
|
18
|
+
if (e.key === 'Escape') {
|
|
19
|
+
setOpen(false);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
23
|
+
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
24
|
+
}, [open]);
|
|
25
|
+
// Reversed actions so bottom-most item in stack = first action
|
|
26
|
+
const reversedActions = [...actions].reverse();
|
|
27
|
+
return (_jsxs(_Fragment, { children: [open ? (_jsx("div", { "data-testid": "fab-overlay", className: "fixed inset-0 z-40", onClick: () => setOpen(false), "aria-hidden": "true" })) : null, _jsxs("div", { "data-testid": "floating-action-button", className: cn('fixed right-6 bottom-6 z-50', className), children: [_jsx("div", { className: "absolute right-0 bottom-16 flex flex-col-reverse items-end gap-3", "data-testid": "fab-actions", children: reversedActions.map((action, reversedIndex) => {
|
|
28
|
+
const originalIndex = actions.length - 1 - reversedIndex;
|
|
29
|
+
// Stagger: bottom items appear first (closest to FAB)
|
|
30
|
+
const openDelay = originalIndex * STAGGER_MS;
|
|
31
|
+
// Close: top items disappear first
|
|
32
|
+
const closeDelay = reversedIndex * STAGGER_MS;
|
|
33
|
+
return (_jsxs("button", { "data-testid": `fab-action-${action.id}`, "aria-label": action.label, disabled: action.disabled ?? action.loading, className: cn('flex items-center gap-3 rounded-full px-4 py-2.5', 'bg-background text-foreground shadow-lg', 'border-border border', 'transition-all ease-out', 'hover:bg-accent hover:text-accent-foreground', 'disabled:pointer-events-none disabled:opacity-50', open
|
|
34
|
+
? 'translate-y-0 scale-100 opacity-100'
|
|
35
|
+
: 'pointer-events-none translate-y-4 scale-95 opacity-0'), style: {
|
|
36
|
+
transitionDuration: `${DURATION_MS}ms`,
|
|
37
|
+
transitionDelay: open ? `${openDelay}ms` : `${closeDelay}ms`,
|
|
38
|
+
}, onClick: () => {
|
|
39
|
+
action.onClick();
|
|
40
|
+
setOpen(false);
|
|
41
|
+
}, children: [_jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: action.loading ? _jsx(Loader2, { className: "h-5 w-5 animate-spin" }) : action.icon }), _jsx("span", { className: "text-sm font-medium whitespace-nowrap", children: action.label })] }, action.id));
|
|
42
|
+
}) }), _jsxs(Button, { size: "icon", "data-testid": "fab-trigger", "aria-label": open ? 'Close actions' : 'Open actions', className: cn('relative h-12 w-12 rounded-full shadow-lg', 'transition-colors duration-200'), onClick: () => setOpen((prev) => !prev), children: [_jsx(Plus, { className: cn('absolute h-5 w-5 transition-all', open ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100'), style: { transitionDuration: `${DURATION_MS}ms` } }), _jsx(X, { className: cn('absolute h-5 w-5 transition-all', open ? 'scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0'), style: { transitionDuration: `${DURATION_MS}ms` } })] })] })] }));
|
|
43
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FloatingActionButton } from './floating-action-button.js';
|
|
3
|
+
declare const meta: Meta<typeof FloatingActionButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLoadingAction: Story;
|
|
8
|
+
export declare const SingleAction: Story;
|
|
9
|
+
export declare const ThreeActions: Story;
|
|
10
|
+
//# sourceMappingURL=floating-action-button.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-action-button.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/floating-action-button/floating-action-button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAmC,MAAM,0BAA0B,CAAC;AAiBjG,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,oBAAoB,CAiB3C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAU/B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Plus, FolderPlus } from 'lucide-react';
|
|
3
|
+
import { FloatingActionButton } from './floating-action-button.js';
|
|
4
|
+
const defaultActions = [
|
|
5
|
+
{
|
|
6
|
+
id: 'new-feature',
|
|
7
|
+
label: 'Feature',
|
|
8
|
+
icon: _jsx(Plus, { className: "h-5 w-5" }),
|
|
9
|
+
onClick: () => undefined,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: 'add-repository',
|
|
13
|
+
label: 'Repository',
|
|
14
|
+
icon: _jsx(FolderPlus, { className: "h-5 w-5" }),
|
|
15
|
+
onClick: () => undefined,
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
const meta = {
|
|
19
|
+
title: 'Composed/FloatingActionButton',
|
|
20
|
+
component: FloatingActionButton,
|
|
21
|
+
parameters: {
|
|
22
|
+
layout: 'fullscreen',
|
|
23
|
+
},
|
|
24
|
+
tags: ['autodocs'],
|
|
25
|
+
decorators: [
|
|
26
|
+
(Story) => (_jsxs("div", { style: { height: '500px', position: 'relative', background: 'var(--background)' }, children: [_jsx("div", { style: { padding: '2rem', opacity: 0.5 }, children: _jsx("p", { children: "Canvas content behind the FAB. Click the + button to see the expanding menu." }) }), _jsx(Story, {})] })),
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
export const Default = {
|
|
31
|
+
args: {
|
|
32
|
+
actions: defaultActions,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export const WithLoadingAction = {
|
|
36
|
+
args: {
|
|
37
|
+
actions: [
|
|
38
|
+
defaultActions[0],
|
|
39
|
+
{
|
|
40
|
+
...defaultActions[1],
|
|
41
|
+
loading: true,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export const SingleAction = {
|
|
47
|
+
args: {
|
|
48
|
+
actions: [defaultActions[0]],
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
export const ThreeActions = {
|
|
52
|
+
args: {
|
|
53
|
+
actions: [
|
|
54
|
+
...defaultActions,
|
|
55
|
+
{
|
|
56
|
+
id: 'import',
|
|
57
|
+
label: 'Import Project',
|
|
58
|
+
icon: _jsx(Plus, { className: "h-5 w-5" }),
|
|
59
|
+
onClick: () => undefined,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/floating-action-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,YAAY,EACV,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FloatingActionButton } from './floating-action-button.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { computeDrawerView, type DrawerView } from './control-center-drawer/index.js';
|
|
2
2
|
export { AddRepositoryButton } from './add-repository-button/index.js';
|
|
3
|
+
export { FloatingActionButton, type FloatingActionButtonProps, type FloatingActionButtonAction, } from './floating-action-button/index.js';
|
|
3
4
|
export { ElapsedTime, formatElapsed } from './elapsed-time/index.js';
|
|
4
5
|
export { EmptyState, type EmptyStateProps } from './empty-state/index.js';
|
|
5
6
|
export { FeatureCreateDrawer, type FeatureCreateDrawerProps, type FeatureCreatePayload, } from './feature-create-drawer/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,GAChC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { computeDrawerView } from './control-center-drawer/index.js';
|
|
2
2
|
export { AddRepositoryButton } from './add-repository-button/index.js';
|
|
3
|
+
export { FloatingActionButton, } from './floating-action-button/index.js';
|
|
3
4
|
export { ElapsedTime, formatElapsed } from './elapsed-time/index.js';
|
|
4
5
|
export { EmptyState } from './empty-state/index.js';
|
|
5
6
|
export { FeatureCreateDrawer, } from './feature-create-drawer/index.js';
|
package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-center-inner.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/control-center-inner.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,eAAe,CAAC;AAGpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"control-center-inner.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/control-center-inner.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,eAAe,CAAC;AAGpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAuB5E,UAAU,uBAAuB;IAC/B,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,YAAY,EAAE,IAAI,EAAE,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,uBAAuB,2CAqUzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/layouts/app-shell/app-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/layouts/app-shell/app-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAsBvE,UAAU,aAAa;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAiFD,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAUnD"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback } from 'react';
|
|
3
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
4
4
|
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { Plus, FolderPlus } from 'lucide-react';
|
|
5
6
|
import { SidebarProvider, SidebarInset } from '../../ui/sidebar.js';
|
|
6
7
|
import { AppSidebar } from '../../layouts/app-sidebar/index.js';
|
|
7
|
-
import {
|
|
8
|
+
import { FloatingActionButton, } from '../../common/floating-action-button/index.js';
|
|
8
9
|
import { ThemeToggle } from '../../common/theme-toggle/index.js';
|
|
9
10
|
import { SoundToggle } from '../../common/sound-toggle/index.js';
|
|
11
|
+
import { pickFolder } from '../../common/add-repository-button/pick-folder.js';
|
|
10
12
|
import { AgentEventsProvider } from '../../../hooks/agent-events-provider.js';
|
|
11
13
|
import { DrawerCloseGuardProvider, useDrawerCloseGuard } from '../../../hooks/drawer-close-guard.js';
|
|
12
14
|
import { SidebarFeaturesProvider, useSidebarFeaturesContext, } from '../../../hooks/sidebar-features-context.js';
|
|
@@ -26,10 +28,37 @@ function AppShellInner({ children }) {
|
|
|
26
28
|
const handleFeatureClick = useCallback((featureId) => {
|
|
27
29
|
guardedNavigate(() => router.push(`/feature/${featureId}`));
|
|
28
30
|
}, [router, guardedNavigate]);
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const [addingRepo, setAddingRepo] = useState(false);
|
|
32
|
+
const handleAddRepository = useCallback(async () => {
|
|
33
|
+
if (addingRepo)
|
|
34
|
+
return;
|
|
35
|
+
setAddingRepo(true);
|
|
36
|
+
try {
|
|
37
|
+
const path = await pickFolder();
|
|
38
|
+
if (path) {
|
|
39
|
+
window.dispatchEvent(new CustomEvent('shep:add-repository', { detail: { path } }));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
finally {
|
|
43
|
+
setAddingRepo(false);
|
|
44
|
+
}
|
|
45
|
+
}, [addingRepo]);
|
|
46
|
+
const fabActions = useMemo(() => [
|
|
47
|
+
{
|
|
48
|
+
id: 'new-feature',
|
|
49
|
+
label: 'New Feature',
|
|
50
|
+
icon: _jsx(Plus, { className: "h-4 w-4" }),
|
|
51
|
+
onClick: handleNewFeature,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: 'add-repository',
|
|
55
|
+
label: 'Add Repository',
|
|
56
|
+
icon: _jsx(FolderPlus, { className: "h-4 w-4" }),
|
|
57
|
+
onClick: handleAddRepository,
|
|
58
|
+
loading: addingRepo,
|
|
59
|
+
},
|
|
60
|
+
], [handleNewFeature, handleAddRepository, addingRepo]);
|
|
61
|
+
return (_jsxs(SidebarProvider, { defaultOpen: false, children: [_jsx(AppSidebar, { features: features, featureFlags: featureFlags, onFeatureClick: handleFeatureClick }), _jsx(SidebarInset, { children: _jsxs("div", { className: "relative h-full", children: [_jsxs("div", { className: "absolute top-3 right-3 z-50 flex gap-1", "data-test-id": "canvas-actions-toolbar", children: [_jsx(SoundToggle, {}), _jsx(ThemeToggle, {})] }), _jsx("main", { className: "h-full", children: children }), _jsx(FloatingActionButton, { actions: fabActions })] }) })] }));
|
|
33
62
|
}
|
|
34
63
|
export function AppShell({ children }) {
|
|
35
64
|
return (_jsx(AgentEventsProvider, { children: _jsx(DrawerCloseGuardProvider, { children: _jsx(SidebarFeaturesProvider, { children: _jsx(AppShellInner, { children: children }) }) }) }));
|
|
@@ -12,10 +12,7 @@ export interface FeatureItem {
|
|
|
12
12
|
export interface AppSidebarProps {
|
|
13
13
|
features: FeatureItem[];
|
|
14
14
|
featureFlags: FeatureFlagsState;
|
|
15
|
-
/** Whether to show the "New feature" button in the sidebar footer. Defaults to `false`. */
|
|
16
|
-
showNewFeature?: boolean;
|
|
17
|
-
onNewFeature?: () => void;
|
|
18
15
|
onFeatureClick?: (featureId: string) => void;
|
|
19
16
|
}
|
|
20
|
-
export declare function AppSidebar({ features, featureFlags,
|
|
17
|
+
export declare function AppSidebar({ features, featureFlags, onFeatureClick, }: AppSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
21
18
|
//# sourceMappingURL=app-sidebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-sidebar.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/layouts/app-sidebar/app-sidebar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-sidebar.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/layouts/app-sidebar/app-sidebar.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,EAAE,iBAAiB,CAAC;IAEhC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,YAAY,EAEZ,cAAc,GACf,EAAE,eAAe,2CAgHjB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { usePathname } from 'next/navigation';
|
|
4
|
-
import { Home, Wrench, Puzzle,
|
|
5
|
-
import { Sidebar, SidebarHeader, SidebarContent,
|
|
4
|
+
import { Home, Wrench, Puzzle, Settings } from 'lucide-react';
|
|
5
|
+
import { Sidebar, SidebarHeader, SidebarContent, SidebarMenu, SidebarMenuItem, SidebarRail, useSidebar, } from '../../ui/sidebar.js';
|
|
6
6
|
import { ScrollArea } from '../../ui/scroll-area.js';
|
|
7
7
|
import { SidebarNavItem } from '../../common/sidebar-nav-item/index.js';
|
|
8
8
|
import { SidebarCollapseToggle } from '../../common/sidebar-collapse-toggle/index.js';
|
|
@@ -14,7 +14,7 @@ import { SidebarSectionHeader } from '../../common/sidebar-section-header/index.
|
|
|
14
14
|
import { featureStatusConfig, featureStatusOrder } from '../../common/feature-status-config.js';
|
|
15
15
|
import { useDeferredMount } from '../../../hooks/use-deferred-mount.js';
|
|
16
16
|
import { useVersion } from '../../../hooks/use-version.js';
|
|
17
|
-
export function AppSidebar({ features, featureFlags,
|
|
17
|
+
export function AppSidebar({ features, featureFlags, onFeatureClick, }) {
|
|
18
18
|
const pathname = usePathname();
|
|
19
19
|
const { state } = useSidebar();
|
|
20
20
|
const collapsed = state === 'collapsed';
|
|
@@ -33,5 +33,5 @@ export function AppSidebar({ features, featureFlags, showNewFeature = false, onN
|
|
|
33
33
|
'min-w-0 overflow-hidden transition-opacity duration-200 ease-out',
|
|
34
34
|
'[&_[data-sidebar=group-label]]:!mt-0 [&_[data-sidebar=group-label]]:!opacity-100 [&_[data-sidebar=group-label]]:!transition-none',
|
|
35
35
|
expandedVisible ? 'opacity-100' : 'opacity-0',
|
|
36
|
-
].join(' '), children: [_jsx(SidebarSectionHeader, { label: "Features" }), _jsx(ScrollArea, { children: grouped.map(({ key, label, items }) => items.length > 0 ? (_jsx(FeatureStatusGroup, { label: label, count: items.length, children: items.map((feature) => (_jsx(FeatureListItem, { name: feature.name, status: feature.status, startedAt: feature.startedAt, duration: feature.duration, agentType: feature.agentType, modelId: feature.modelId, onClick: onFeatureClick ? () => onFeatureClick(feature.featureId) : undefined }, feature.featureId))) }, key)) : null) })] })) : null }),
|
|
36
|
+
].join(' '), children: [_jsx(SidebarSectionHeader, { label: "Features" }), _jsx(ScrollArea, { children: grouped.map(({ key, label, items }) => items.length > 0 ? (_jsx(FeatureStatusGroup, { label: label, count: items.length, children: items.map((feature) => (_jsx(FeatureListItem, { name: feature.name, status: feature.status, startedAt: feature.startedAt, duration: feature.duration, agentType: feature.agentType, modelId: feature.modelId, onClick: onFeatureClick ? () => onFeatureClick(feature.featureId) : undefined }, feature.featureId))) }, key)) : null) })] })) : null }), _jsx(SidebarRail, {})] }));
|
|
37
37
|
}
|
package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-sidebar.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAyBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAmDnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"app-sidebar.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAyBjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAmDnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAIlC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAiB3B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
|