@shepai/cli 1.22.1 → 1.23.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/infrastructure/services/file-dialog.service.d.ts +28 -0
- package/dist/packages/core/src/infrastructure/services/file-dialog.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/file-dialog.service.js +63 -0
- package/dist/src/presentation/web/app/api/dialog/pick-files/route.d.ts +11 -0
- package/dist/src/presentation/web/app/api/dialog/pick-files/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/dialog/pick-files/route.js +16 -0
- package/dist/src/presentation/web/app/derive-state.d.ts +12 -0
- package/dist/src/presentation/web/app/derive-state.d.ts.map +1 -0
- package/dist/src/presentation/web/app/derive-state.js +21 -0
- package/dist/src/presentation/web/app/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/page.js +23 -12
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +15 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +102 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +63 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +164 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/index.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/index.js +1 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/pick-files.d.ts +7 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/pick-files.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/pick-files.js +13 -0
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.d.ts +7 -0
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.js +28 -0
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.stories.d.ts +19 -0
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.stories.js +167 -0
- package/dist/src/presentation/web/components/common/feature-drawer/index.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-drawer/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-drawer/index.js +1 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +2 -5
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.js +4 -13
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +7 -9
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts +0 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +4 -23
- package/dist/src/presentation/web/components/common/feature-node/index.d.ts +1 -3
- package/dist/src/presentation/web/components/common/feature-node/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/index.js +1 -3
- package/dist/src/presentation/web/components/common/index.d.ts +2 -0
- package/dist/src/presentation/web/components/common/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/index.js +2 -0
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +11 -3
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +4 -0
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +20 -4
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts +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 +5 -1
- package/dist/src/presentation/web/components/ui/button.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/drawer.d.ts +17 -0
- package/dist/src/presentation/web/components/ui/drawer.d.ts.map +1 -0
- package/dist/src/presentation/web/components/ui/drawer.js +45 -0
- package/dist/src/presentation/web/components/ui/drawer.stories.d.ts +17 -0
- package/dist/src/presentation/web/components/ui/drawer.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/ui/drawer.stories.js +29 -0
- package/dist/src/presentation/web/components/ui/textarea.d.ts +4 -0
- package/dist/src/presentation/web/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/presentation/web/components/ui/textarea.js +6 -0
- package/dist/src/presentation/web/components/ui/textarea.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/ui/textarea.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/ui/textarea.stories.js +28 -0
- package/dist/src/presentation/web/lib/features.d.ts +30 -0
- package/dist/src/presentation/web/lib/features.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/features.js +50 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +1 -0
- package/web/.next/build-manifest.json +5 -5
- package/web/.next/cache/.previewinfo +1 -1
- package/web/.next/cache/.rscinfo +1 -1
- package/web/.next/cache/.tsbuildinfo +1 -1
- package/web/.next/cache/config.json +3 -3
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/routes-manifest.json +6 -0
- package/web/.next/server/app/_global-error/page/build-manifest.json +3 -3
- package/web/.next/server/app/_global-error/page.js +1 -1
- package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/web/.next/server/app/_global-error/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/build-manifest.json +3 -3
- package/web/.next/server/app/_not-found/page.js +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/_not-found.html +2 -2
- package/web/.next/server/app/_not-found.rsc +9 -9
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +9 -9
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/api/dialog/pick-files/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/dialog/pick-files/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/dialog/pick-files/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/dialog/pick-files/route.js +6 -0
- package/web/.next/server/app/api/dialog/pick-files/route.js.map +5 -0
- package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -0
- package/web/.next/server/app/api/dialog/pick-files/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/dialog/pick-folder/route.js +2 -2
- package/web/.next/server/app/api/dialog/pick-folder/route.js.nft.json +1 -1
- package/web/.next/server/app/index.html +2 -2
- package/web/.next/server/app/index.rsc +4 -4
- package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/web/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/page/build-manifest.json +3 -3
- package/web/.next/server/app/page.js +3 -3
- package/web/.next/server/app/page.js.nft.json +1 -1
- package/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/build-manifest.json +3 -3
- package/web/.next/server/app/version/page.js +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/app/version.html +2 -2
- package/web/.next/server/app/version.rsc +4 -4
- package/web/.next/server/app/version.segments/_full.segment.rsc +4 -4
- package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_index.segment.rsc +3 -3
- package/web/.next/server/app/version.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +2 -2
- package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
- package/web/.next/server/app-paths-manifest.json +1 -0
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_dialog_pick-files_route_actions_f9868286.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__00833626._.js +21 -0
- package/web/.next/server/chunks/[root-of-the-server]__00833626._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__22cabd43._.js +4 -0
- package/web/.next/server/chunks/[root-of-the-server]__22cabd43._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__95785ac7._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__95785ac7._.js.map +1 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_dbf21e04.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1eade43f._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1eade43f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__6b3c1f2b._.js → [root-of-the-server]__685eaa45._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__71515c64._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__757c7912._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7c64f85c._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7c64f85c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8507ac68._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8507ac68._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__e55e9c7f._.js → [root-of-the-server]__dbd220d2._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f12b60be._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fa87595c._.js +1 -1
- package/web/.next/server/chunks/ssr/_09afa42a._.js +1 -1
- package/web/.next/server/chunks/ssr/_09afa42a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1f9347c8._.js +7 -0
- package/web/.next/server/chunks/ssr/_1f9347c8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_884ddade._.js +1 -1
- package/web/.next/server/chunks/ssr/_937b37e2._.js +3 -0
- package/web/.next/server/chunks/ssr/_937b37e2._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a0c04017._.js +1 -5
- package/web/.next/server/chunks/ssr/_a0c04017._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_c5d377cc._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_version_version-page-client_tsx_fe9db753._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_version_version-page-client_tsx_fe9db753._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_badge_tsx_964c2a3b._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_badge_tsx_964c2a3b._.js.map +1 -0
- package/web/.next/server/middleware-build-manifest.js +3 -3
- package/web/.next/server/pages/404.html +2 -2
- 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 +1 -1
- package/web/.next/static/chunks/4431cc2d3628b6f6.js +1 -0
- package/web/.next/static/chunks/49488cbe99543598.css +1 -0
- package/web/.next/static/chunks/70993ebedee7eab0.js +2 -0
- package/web/.next/static/chunks/8bc34062bc0f4ddc.js +1 -0
- package/web/.next/static/chunks/c95b4cf170b7f301.js +1 -0
- package/web/.next/static/chunks/df7d29673e0ac11d.js +1 -0
- package/web/.next/static/chunks/e78d1b265b8110c3.js +1 -0
- package/web/.next/static/chunks/f5099c5888ef9a74.js +5 -0
- package/web/.next/static/chunks/{b29c0572633eb9e4.js → f6b5484377f4e78e.js} +2 -2
- package/web/.next/static/chunks/{turbopack-e0a0178ee911c212.js → turbopack-a5a88a85e7ac8e8d.js} +1 -1
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- package/web/.next/types/link.d.ts +1 -0
- package/web/.next/types/routes.d.ts +2 -1
- package/web/.next/types/validator.ts +9 -0
- package/web/next.config.mjs +1 -1
- package/web/package.json +3 -3
- package/web/.next/server/chunks/[externals]_next_dist_a6d89067._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__ebcd3642._.js +0 -21
- package/web/.next/server/chunks/[root-of-the-server]__ebcd3642._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2127336f._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__44c4e191._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__44c4e191._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__492e833d._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__492e833d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__80e5bed2._.js +0 -3
- package/web/.next/server/chunks/ssr/_3d152196._.js +0 -3
- package/web/.next/server/chunks/ssr/_3d152196._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_b11d5ad4._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_b11d5ad4._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js.map +0 -1
- package/web/.next/static/chunks/3701b9d5749e6143.css +0 -1
- package/web/.next/static/chunks/a8030d19b4d73c95.js +0 -1
- package/web/.next/static/chunks/b0d13220be9ac29c.js +0 -1
- package/web/.next/static/chunks/be34161188b4e0a0.js +0 -2
- package/web/.next/static/chunks/c87445f8cbe36c74.js +0 -1
- package/web/.next/static/chunks/f220dad9d38bff95.js +0 -5
- package/web/.next/static/chunks/f74cb59a5a6c94f1.js +0 -1
- /package/web/.next/server/chunks/{[externals]_next_dist_a6d89067._.js.map → 744ca_web__next-internal_server_app_api_dialog_pick-files_route_actions_f9868286.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__6b3c1f2b._.js.map → [root-of-the-server]__685eaa45._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__80e5bed2._.js.map → [root-of-the-server]__71515c64._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__2127336f._.js.map → [root-of-the-server]__757c7912._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__e55e9c7f._.js.map → [root-of-the-server]__dbd220d2._.js.map} +0 -0
- /package/web/.next/static/{Ox87EvwGC4i-5d3Y6mR8W → WqMlhB4Xv4T13f0oXQ5uG}/_buildManifest.js +0 -0
- /package/web/.next/static/{Ox87EvwGC4i-5d3Y6mR8W → WqMlhB4Xv4T13f0oXQ5uG}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{Ox87EvwGC4i-5d3Y6mR8W → WqMlhB4Xv4T13f0oXQ5uG}/_ssgManifest.js +0 -0
package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js
CHANGED
|
@@ -7,6 +7,7 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
7
7
|
const [nodes, setNodes] = useState(initialNodes);
|
|
8
8
|
const [edges, setEdges] = useState(initialEdges);
|
|
9
9
|
const [selectedNode, setSelectedNode] = useState(null);
|
|
10
|
+
const [isCreateDrawerOpen, setIsCreateDrawerOpen] = useState(false);
|
|
10
11
|
const onNodesChange = useCallback((changes) => {
|
|
11
12
|
setNodes((ns) => applyNodeChanges(changes, ns));
|
|
12
13
|
}, []);
|
|
@@ -15,6 +16,7 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
15
16
|
}, []);
|
|
16
17
|
const handleNodeClick = useCallback((_event, node) => {
|
|
17
18
|
if (node.type === 'featureNode') {
|
|
19
|
+
setIsCreateDrawerOpen(false);
|
|
18
20
|
setSelectedNode(node.data);
|
|
19
21
|
}
|
|
20
22
|
}, []);
|
|
@@ -56,11 +58,11 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
56
58
|
return currentNodes;
|
|
57
59
|
});
|
|
58
60
|
}, []);
|
|
59
|
-
const createFeatureNode = useCallback((sourceNodeId) => {
|
|
61
|
+
const createFeatureNode = useCallback((sourceNodeId, dataOverride) => {
|
|
60
62
|
const id = `feature-${Date.now()}-${nextFeatureId++}`;
|
|
61
63
|
const newFeatureData = {
|
|
62
|
-
name: 'New Feature',
|
|
63
|
-
description: 'Describe what this feature does',
|
|
64
|
+
name: dataOverride?.name ?? 'New Feature',
|
|
65
|
+
description: dataOverride?.description ?? 'Describe what this feature does',
|
|
64
66
|
featureId: `#${id.slice(-4)}`,
|
|
65
67
|
lifecycle: 'requirements',
|
|
66
68
|
state: 'running',
|
|
@@ -156,8 +158,19 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
156
158
|
setSelectedNode(newFeatureData);
|
|
157
159
|
}, [edges]);
|
|
158
160
|
const handleAddFeature = useCallback(() => {
|
|
159
|
-
|
|
161
|
+
setSelectedNode(null);
|
|
162
|
+
setIsCreateDrawerOpen(true);
|
|
163
|
+
}, []);
|
|
164
|
+
const handleCreateFeatureSubmit = useCallback((data) => {
|
|
165
|
+
setIsCreateDrawerOpen(false);
|
|
166
|
+
createFeatureNode(null, {
|
|
167
|
+
name: data.name,
|
|
168
|
+
description: data.description || undefined,
|
|
169
|
+
});
|
|
160
170
|
}, [createFeatureNode]);
|
|
171
|
+
const closeCreateDrawer = useCallback(() => {
|
|
172
|
+
setIsCreateDrawerOpen(false);
|
|
173
|
+
}, []);
|
|
161
174
|
const handleAddFeatureToRepo = useCallback((repoNodeId) => {
|
|
162
175
|
createFeatureNode(repoNodeId);
|
|
163
176
|
}, [createFeatureNode]);
|
|
@@ -206,6 +219,7 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
206
219
|
nodes,
|
|
207
220
|
edges,
|
|
208
221
|
selectedNode,
|
|
222
|
+
isCreateDrawerOpen,
|
|
209
223
|
onNodesChange,
|
|
210
224
|
handleConnect,
|
|
211
225
|
clearSelection,
|
|
@@ -215,5 +229,7 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
215
229
|
handleAddFeatureToFeature,
|
|
216
230
|
handleAddRepository,
|
|
217
231
|
handleLayout,
|
|
232
|
+
handleCreateFeatureSubmit,
|
|
233
|
+
closeCreateDrawer,
|
|
218
234
|
};
|
|
219
235
|
}
|
|
@@ -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,KAAK,
|
|
1
|
+
{"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/layouts/app-shell/app-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKpD,UAAU,aAAa;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAkBnD"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback } from 'react';
|
|
3
4
|
import { SidebarProvider, SidebarInset } from '../../ui/sidebar.js';
|
|
4
5
|
import { AppSidebar } from '../../layouts/app-sidebar/index.js';
|
|
5
6
|
import { ThemeToggle } from '../../common/theme-toggle/index.js';
|
|
6
7
|
export function AppShell({ children }) {
|
|
7
|
-
|
|
8
|
+
const handleNewFeature = useCallback(() => {
|
|
9
|
+
window.dispatchEvent(new CustomEvent('shep:open-create-drawer'));
|
|
10
|
+
}, []);
|
|
11
|
+
return (_jsxs(SidebarProvider, { children: [_jsx(AppSidebar, { features: [], onNewFeature: handleNewFeature }), _jsx(SidebarInset, { children: _jsxs("div", { className: "relative h-full", children: [_jsx("div", { className: "absolute top-3 right-3 z-50", children: _jsx(ThemeToggle, {}) }), _jsx("main", { className: "h-full", children: children })] }) })] }));
|
|
8
12
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "default" | "icon" | "
|
|
5
|
+
size?: "default" | "icon" | "sm" | "lg" | "xs" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
3
|
+
declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DrawerContent({ className, children, direction, showCloseButton, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content> & {
|
|
9
|
+
direction?: 'top' | 'right' | 'bottom' | 'left';
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DrawerFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerClose, DrawerTrigger, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|
|
17
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/ui/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAIjD,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAE9E;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAExF;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAEtF;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEpF;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAQtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,SAAoB,EACpB,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IACxD,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,2CAsCA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQ/F;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { XIcon } from 'lucide-react';
|
|
4
|
+
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
function Drawer({ ...props }) {
|
|
7
|
+
return _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
|
|
8
|
+
}
|
|
9
|
+
function DrawerTrigger({ ...props }) {
|
|
10
|
+
return _jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
11
|
+
}
|
|
12
|
+
function DrawerPortal({ ...props }) {
|
|
13
|
+
return _jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
|
|
14
|
+
}
|
|
15
|
+
function DrawerClose({ ...props }) {
|
|
16
|
+
return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
|
|
17
|
+
}
|
|
18
|
+
function DrawerOverlay({ className, ...props }) {
|
|
19
|
+
return (_jsx(DrawerPrimitive.Overlay, { "data-slot": "drawer-overlay", className: cn('fixed inset-0 z-50 bg-black/50', className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function DrawerContent({ className, children, direction = 'bottom', showCloseButton = true, ...props }) {
|
|
22
|
+
return (_jsx(DrawerPortal, { children: _jsxs(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn('bg-background fixed z-50 flex flex-col shadow-lg', direction === 'bottom' && 'inset-x-0 bottom-0 mb-24 rounded-t-lg border-t', direction === 'top' && 'inset-x-0 top-0 mt-24 rounded-b-lg border-b', direction === 'right' && 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm', direction === 'left' && 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm', className), style: {
|
|
23
|
+
'--initial-transform': direction === 'right'
|
|
24
|
+
? 'calc(100% + 8px)'
|
|
25
|
+
: direction === 'left'
|
|
26
|
+
? 'calc(-100% - 8px)'
|
|
27
|
+
: direction === 'top'
|
|
28
|
+
? 'calc(-100% - 8px)'
|
|
29
|
+
: 'calc(100% + 8px)',
|
|
30
|
+
...(props.style ?? {}),
|
|
31
|
+
}, ...props, children: [children, showCloseButton ? (_jsxs(DrawerPrimitive.Close, { className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })) : null] }) }));
|
|
32
|
+
}
|
|
33
|
+
function DrawerHeader({ className, ...props }) {
|
|
34
|
+
return (_jsx("div", { "data-slot": "drawer-header", className: cn('flex flex-col gap-1.5 p-4', className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
function DrawerFooter({ className, ...props }) {
|
|
37
|
+
return (_jsx("div", { "data-slot": "drawer-footer", className: cn('mt-auto flex flex-col gap-2 p-4', className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
function DrawerTitle({ className, ...props }) {
|
|
40
|
+
return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn('text-foreground font-semibold', className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
function DrawerDescription({ className, ...props }) {
|
|
43
|
+
return (_jsx(DrawerPrimitive.Description, { "data-slot": "drawer-description", className: cn('text-muted-foreground text-sm', className), ...props }));
|
|
44
|
+
}
|
|
45
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerClose, DrawerTrigger, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: string;
|
|
6
|
+
};
|
|
7
|
+
tags: string[];
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof meta>;
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
export declare const RightSide: Story;
|
|
13
|
+
export declare const RightNonModal: Story;
|
|
14
|
+
export declare const LeftSide: Story;
|
|
15
|
+
export declare const TopSide: Story;
|
|
16
|
+
export declare const WithContent: Story;
|
|
17
|
+
//# sourceMappingURL=drawer.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/ui/drawer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAavD,QAAA,MAAM,IAAI;;;;;;CAMM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA0BvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAqB3B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAiBtB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA0CzB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, } from './drawer.js';
|
|
3
|
+
import { Button } from './button.js';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Primitives/Drawer',
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'centered',
|
|
8
|
+
},
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const Default = {
|
|
13
|
+
render: () => (_jsxs(Drawer, { children: [_jsx(DrawerTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Drawer" }) }), _jsxs(DrawerContent, { children: [_jsxs(DrawerHeader, { children: [_jsx(DrawerTitle, { children: "Drawer Title" }), _jsx(DrawerDescription, { children: "This is a default bottom drawer with header and footer content." })] }), _jsx("div", { className: "p-4", children: _jsx("p", { className: "text-muted-foreground text-sm", children: "Drawer body content goes here." }) }), _jsxs(DrawerFooter, { children: [_jsx(Button, { children: "Submit" }), _jsx(DrawerClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cancel" }) })] })] })] })),
|
|
14
|
+
};
|
|
15
|
+
export const RightSide = {
|
|
16
|
+
render: () => (_jsxs(Drawer, { direction: "right", children: [_jsx(DrawerTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Right Drawer" }) }), _jsxs(DrawerContent, { direction: "right", children: [_jsxs(DrawerHeader, { children: [_jsx(DrawerTitle, { children: "Right Drawer" }), _jsx(DrawerDescription, { children: "This drawer slides in from the right side, commonly used for inspector panels." })] }), _jsx("div", { className: "flex-1 overflow-y-auto p-4", children: _jsx("p", { className: "text-muted-foreground text-sm", children: "Inspector panel content. The drawer is fixed to the right edge of the viewport." }) }), _jsx(DrawerFooter, { children: _jsx(DrawerClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Close" }) }) })] })] })),
|
|
17
|
+
};
|
|
18
|
+
export const RightNonModal = {
|
|
19
|
+
render: () => (_jsxs(Drawer, { direction: "right", modal: false, children: [_jsx(DrawerTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Non-Modal Right Drawer" }) }), _jsxs(DrawerContent, { direction: "right", children: [_jsxs(DrawerHeader, { children: [_jsx(DrawerTitle, { children: "Non-Modal Drawer" }), _jsx(DrawerDescription, { children: "This drawer does not block interaction with the background. No overlay is rendered." })] }), _jsx("div", { className: "flex-1 overflow-y-auto p-4", children: _jsx("p", { className: "text-muted-foreground text-sm", children: "You can interact with elements behind this drawer while it is open." }) })] })] })),
|
|
20
|
+
};
|
|
21
|
+
export const LeftSide = {
|
|
22
|
+
render: () => (_jsxs(Drawer, { direction: "left", children: [_jsx(DrawerTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Left Drawer" }) }), _jsxs(DrawerContent, { direction: "left", children: [_jsxs(DrawerHeader, { children: [_jsx(DrawerTitle, { children: "Left Drawer" }), _jsx(DrawerDescription, { children: "This drawer slides in from the left side." })] }), _jsx("div", { className: "flex-1 overflow-y-auto p-4", children: _jsx("p", { className: "text-muted-foreground text-sm", children: "Navigation panel or sidebar content." }) })] })] })),
|
|
23
|
+
};
|
|
24
|
+
export const TopSide = {
|
|
25
|
+
render: () => (_jsxs(Drawer, { direction: "top", children: [_jsx(DrawerTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Top Drawer" }) }), _jsxs(DrawerContent, { direction: "top", children: [_jsxs(DrawerHeader, { children: [_jsx(DrawerTitle, { children: "Top Drawer" }), _jsx(DrawerDescription, { children: "This drawer slides down from the top." })] }), _jsx("div", { className: "p-4", children: _jsx("p", { className: "text-muted-foreground text-sm", children: "Notification bar or alert content." }) })] })] })),
|
|
26
|
+
};
|
|
27
|
+
export const WithContent = {
|
|
28
|
+
render: () => (_jsxs(Drawer, { direction: "right", children: [_jsx(DrawerTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Detail Panel" }) }), _jsxs(DrawerContent, { direction: "right", className: "w-96 sm:max-w-96", children: [_jsxs(DrawerHeader, { children: [_jsx(DrawerTitle, { children: "Feature Details" }), _jsx(DrawerDescription, { children: "Inspect the selected feature's properties." })] }), _jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto p-4", children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm font-medium", children: "Status" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "Running" })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm font-medium", children: "Lifecycle" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "Implementation" })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm font-medium", children: "Progress" }), _jsx("div", { className: "bg-muted h-2 rounded-full", children: _jsx("div", { className: "h-full w-3/4 rounded-full bg-blue-500" }) })] }), _jsxs("div", { children: [_jsx("p", { className: "text-sm font-medium", children: "Description" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "A longer description of the feature that would be truncated on the canvas node but is fully visible here in the drawer panel." })] })] }), _jsx(DrawerFooter, { children: _jsx(DrawerClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Close" }) }) })] })] })),
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,2CAa1E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../../lib/utils.js';
|
|
3
|
+
function Textarea({ className, ...props }) {
|
|
4
|
+
return (_jsx("textarea", { "data-slot": "textarea", className: cn('placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]', 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive', className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
export { Textarea };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Textarea } from './textarea.js';
|
|
3
|
+
declare const meta: Meta<typeof Textarea>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const WithValue: Story;
|
|
10
|
+
//# sourceMappingURL=textarea.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/ui/textarea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAW/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Textarea } from './textarea.js';
|
|
3
|
+
import { Label } from './label.js';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Primitives/Textarea',
|
|
6
|
+
component: Textarea,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
disabled: { control: 'boolean' },
|
|
13
|
+
rows: { control: 'number' },
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
export const Default = {
|
|
18
|
+
args: { placeholder: 'Type your message here...' },
|
|
19
|
+
};
|
|
20
|
+
export const WithLabel = {
|
|
21
|
+
render: () => (_jsxs("div", { className: "grid w-full max-w-sm gap-1.5", children: [_jsx(Label, { htmlFor: "description", children: "Description" }), _jsx(Textarea, { id: "description", placeholder: "Describe the feature..." })] })),
|
|
22
|
+
};
|
|
23
|
+
export const Disabled = {
|
|
24
|
+
args: { disabled: true, placeholder: 'Disabled textarea' },
|
|
25
|
+
};
|
|
26
|
+
export const WithValue = {
|
|
27
|
+
args: { defaultValue: 'This textarea has initial content that can be edited.' },
|
|
28
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Data Access
|
|
3
|
+
*
|
|
4
|
+
* Queries the shared ~/.shep/data SQLite database directly with better-sqlite3.
|
|
5
|
+
* Self-contained to avoid importing CLI source files whose Node.js ESM
|
|
6
|
+
* .js extension imports are incompatible with Turbopack's module resolution.
|
|
7
|
+
*
|
|
8
|
+
* Server-side only (used in server components).
|
|
9
|
+
*/
|
|
10
|
+
/** Domain Feature object returned to the UI. */
|
|
11
|
+
export interface Feature {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
description: string;
|
|
16
|
+
repositoryPath: string;
|
|
17
|
+
branch: string;
|
|
18
|
+
lifecycle: string;
|
|
19
|
+
specPath?: string;
|
|
20
|
+
agentStatus?: string;
|
|
21
|
+
agentError?: string;
|
|
22
|
+
/** Current agent graph node, e.g. "node:plan". */
|
|
23
|
+
agentResult?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* List all features from the shared ~/.shep/data SQLite database.
|
|
27
|
+
* Returns an empty array if the database doesn't exist or the query fails.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getFeatures(): Promise<Feature[]>;
|
|
30
|
+
//# sourceMappingURL=features.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/features.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4BH,gDAAgD;AAChD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAkBD;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAkBtD"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Data Access
|
|
3
|
+
*
|
|
4
|
+
* Queries the shared ~/.shep/data SQLite database directly with better-sqlite3.
|
|
5
|
+
* Self-contained to avoid importing CLI source files whose Node.js ESM
|
|
6
|
+
* .js extension imports are incompatible with Turbopack's module resolution.
|
|
7
|
+
*
|
|
8
|
+
* Server-side only (used in server components).
|
|
9
|
+
*/
|
|
10
|
+
import Database from 'better-sqlite3';
|
|
11
|
+
import { homedir } from 'node:os';
|
|
12
|
+
import { join } from 'node:path';
|
|
13
|
+
import { existsSync } from 'node:fs';
|
|
14
|
+
function fromRow(row) {
|
|
15
|
+
return {
|
|
16
|
+
id: row.id,
|
|
17
|
+
name: row.name,
|
|
18
|
+
slug: row.slug,
|
|
19
|
+
description: row.description,
|
|
20
|
+
repositoryPath: row.repository_path,
|
|
21
|
+
branch: row.branch,
|
|
22
|
+
lifecycle: row.lifecycle,
|
|
23
|
+
...(row.spec_path !== null && { specPath: row.spec_path }),
|
|
24
|
+
...(row.agent_status !== null && { agentStatus: row.agent_status }),
|
|
25
|
+
...(row.agent_error !== null && { agentError: row.agent_error }),
|
|
26
|
+
...(row.agent_result !== null && { agentResult: row.agent_result }),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* List all features from the shared ~/.shep/data SQLite database.
|
|
31
|
+
* Returns an empty array if the database doesn't exist or the query fails.
|
|
32
|
+
*/
|
|
33
|
+
export async function getFeatures() {
|
|
34
|
+
const dbPath = join(homedir(), '.shep', 'data');
|
|
35
|
+
if (!existsSync(dbPath))
|
|
36
|
+
return [];
|
|
37
|
+
try {
|
|
38
|
+
const db = new Database(dbPath, { readonly: true });
|
|
39
|
+
const rows = db
|
|
40
|
+
.prepare('SELECT f.*, ar.status as agent_status, ar.error as agent_error, ar.result as agent_result FROM features f LEFT JOIN agent_runs ar ON f.agent_run_id = ar.id')
|
|
41
|
+
.all();
|
|
42
|
+
db.close();
|
|
43
|
+
return rows.map(fromRow);
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
// eslint-disable-next-line no-console
|
|
47
|
+
console.error('Failed to load features:', error);
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
}
|