@shepai/cli 1.84.0-pr246.f230189 → 1.84.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/apis/json-schema/Feature.yaml +0 -5
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts +1 -3
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +3 -35
- package/dist/packages/core/src/application/use-cases/features/create/types.d.ts +1 -7
- package/dist/packages/core/src/application/use-cases/features/create/types.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.d.ts +0 -33
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +0 -3
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +0 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +0 -4
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +0 -16
- package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/new.command.js +1 -21
- package/dist/src/presentation/web/app/actions/create-feature.d.ts +0 -1
- package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/create-feature.js +9 -3
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +2 -11
- 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 +60 -199
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +0 -6
- 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 +0 -18
- package/dist/src/presentation/web/components/ui/dialog.js +1 -1
- package/dist/src/presentation/web/next.config.d.ts.map +1 -1
- package/dist/src/presentation/web/next.config.js +0 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +0 -2
- 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 +1 -4
- package/web/.next/required-server-files.json +1 -4
- package/web/.next/routes-manifest.json +0 -12
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -2
- 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]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
- 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 +14 -14
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -2
- 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 +18 -18
- package/web/.next/server/app/(dashboard)/create/page.js +2 -2
- 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]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -2
- 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 +14 -14
- package/web/.next/server/app/(dashboard)/page.js +2 -2
- 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 +14 -14
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -2
- 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/page.js +2 -2
- 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/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page.js +2 -2
- 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/feature-logs/route.js +1 -1
- package/web/.next/server/app/api/feature-logs/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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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-paths-manifest.json +0 -2
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__52c318d1._.js → [root-of-the-server]__91d44424._.js} +2 -2
- 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/7f428_lucide-react_dist_esm_icons_c7cfe351._.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_c7cfe351._.js.map +1 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__01a37f7a._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__f8210f45._.js.map → [root-of-the-server]__01a37f7a._.js.map} +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]__17143953._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__8d9536c4._.js → [root-of-the-server]__3534949f._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__55f60c9d._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__b65f78cf._.js.map → [root-of-the-server]__55f60c9d._.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]__9de266fa._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
- 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]__f1a05100._.js → [root-of-the-server]__ad2b2a3c._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c3694f82._.js +10 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__b14946f5._.js.map → [root-of-the-server]__c3694f82._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.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/_0387eb83._.js +3 -0
- package/web/.next/server/chunks/ssr/_0387eb83._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_1bb131c4._.js +1 -1
- package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js +1 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_34fbed18._.js +1 -1
- package/web/.next/server/chunks/ssr/_34fbed18._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_f95d315b._.js → _3785d5be._.js} +2 -2
- package/web/.next/server/chunks/ssr/_3785d5be._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_cf366ac8._.js → _3e88ce9d._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_cf366ac8._.js.map → _3e88ce9d._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_63868199._.js +1 -1
- package/web/.next/server/chunks/ssr/_63868199._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_67dd9041._.js +3 -0
- package/web/.next/server/chunks/ssr/_67dd9041._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_6e08ce21._.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/_c3a8bcb1._.js +3 -0
- package/web/.next/server/chunks/ssr/_c3a8bcb1._.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/node_modules__pnpm_04f4e45f._.js +5 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.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_c4348b8a._.js +3 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.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_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +3 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.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 +28 -28
- package/web/.next/static/chunks/{b31f2c82654437a6.js → 0fb7745c30469b39.js} +1 -1
- package/web/.next/static/chunks/2a24ac257fc1c10b.js +1 -0
- package/web/.next/static/chunks/{b59390a4c830ad08.js → 48060fe38d7b8432.js} +3 -3
- package/web/.next/static/chunks/{96a1c17f680f9aa6.js → 4de791d92c72ae58.js} +1 -1
- package/web/.next/static/chunks/{b5d6f0436f9bbe9b.js → 6b4620c8b57a0683.js} +1 -1
- package/web/.next/static/chunks/6d0190cd8484320c.js +1 -0
- package/web/.next/static/chunks/6f0622cb06faf358.js +1 -0
- package/web/.next/static/chunks/7e92542991a14568.js +1 -0
- package/web/.next/static/chunks/a56b3854d2169db0.js +1 -0
- package/web/.next/static/chunks/ae01d2be1d0bad47.css +2 -0
- package/web/.next/static/chunks/{28aa439fc1b5f6b6.js → d00436ccde44862f.js} +1 -1
- package/web/.next/static/chunks/{abf7985ed51675bb.js → de2515446676e0ae.js} +1 -1
- package/web/.next/static/chunks/df0b93fbb9b512e6.js +1 -0
- package/web/.next/static/chunks/e405f0502431ea60.js +3 -0
- package/apis/json-schema/Attachment.yaml +0 -31
- package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts +0 -31
- package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/attachment-storage.service.js +0 -136
- package/dist/src/presentation/web/app/actions/compose-user-input.d.ts +0 -7
- package/dist/src/presentation/web/app/actions/compose-user-input.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/compose-user-input.js +0 -7
- package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts +0 -4
- package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts.map +0 -1
- package/dist/src/presentation/web/app/api/attachments/preview/route.js +0 -47
- package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts +0 -3
- package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts.map +0 -1
- package/dist/src/presentation/web/app/api/attachments/upload/route.js +0 -100
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts +0 -16
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.js +0 -53
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts +0 -12
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.js +0 -55
- package/dist/src/presentation/web/components/common/attachment-card/index.d.ts +0 -3
- package/dist/src/presentation/web/components/common/attachment-card/index.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/attachment-card/index.js +0 -1
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts +0 -11
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.js +0 -34
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts +0 -10
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.js +0 -44
- package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts +0 -3
- package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/attachment-chip/index.js +0 -1
- package/web/.next/server/app/api/attachments/preview/route/app-paths-manifest.json +0 -3
- package/web/.next/server/app/api/attachments/preview/route/build-manifest.json +0 -11
- package/web/.next/server/app/api/attachments/preview/route/server-reference-manifest.json +0 -4
- package/web/.next/server/app/api/attachments/preview/route.js +0 -7
- package/web/.next/server/app/api/attachments/preview/route.js.map +0 -5
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +0 -1
- package/web/.next/server/app/api/attachments/preview/route_client-reference-manifest.js +0 -2
- package/web/.next/server/app/api/attachments/upload/route/app-paths-manifest.json +0 -3
- package/web/.next/server/app/api/attachments/upload/route/build-manifest.json +0 -11
- package/web/.next/server/app/api/attachments/upload/route/server-reference-manifest.json +0 -4
- package/web/.next/server/app/api/attachments/upload/route.js +0 -7
- package/web/.next/server/app/api/attachments/upload/route.js.map +0 -5
- package/web/.next/server/app/api/attachments/upload/route.js.nft.json +0 -1
- package/web/.next/server/app/api/attachments/upload/route_client-reference-manifest.js +0 -2
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js +0 -3
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js.map +0 -1
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js +0 -3
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js.map +0 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js +0 -3
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b14946f5._.js +0 -10
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b65f78cf._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f8210f45._.js +0 -3
- package/web/.next/server/chunks/ssr/_9ac70f88._.js +0 -5
- package/web/.next/server/chunks/ssr/_9ac70f88._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d42594dd._.js +0 -3
- package/web/.next/server/chunks/ssr/_d42594dd._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f95d315b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_80b5b4bc._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_80b5b4bc._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_82416b8f._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_82416b8f._.js.map +0 -1
- package/web/.next/static/chunks/01c38223d965f45d.js +0 -1
- package/web/.next/static/chunks/06d565dc763cad04.js +0 -1
- package/web/.next/static/chunks/30c827a88342741e.js +0 -1
- package/web/.next/static/chunks/46d3853fdf7c5efc.js +0 -1
- package/web/.next/static/chunks/48650231d9933738.js +0 -1
- package/web/.next/static/chunks/50f89c3112f6dd23.css +0 -2
- package/web/.next/static/chunks/52b56677c842e45f.js +0 -3
- package/web/.next/static/chunks/7d1c741ac3db2eae.js +0 -1
- /package/web/.next/server/chunks/{[root-of-the-server]__52c318d1._.js.map → [root-of-the-server]__91d44424._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__8d9536c4._.js.map → [root-of-the-server]__3534949f._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__f1a05100._.js.map → [root-of-the-server]__ad2b2a3c._.js.map} +0 -0
- /package/web/.next/static/{e0oQotcTVoj0dtOxfFjEK → 7IllAyl6ItP_HYk-RfUYQ}/_buildManifest.js +0 -0
- /package/web/.next/static/{e0oQotcTVoj0dtOxfFjEK → 7IllAyl6ItP_HYk-RfUYQ}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{e0oQotcTVoj0dtOxfFjEK → 7IllAyl6ItP_HYk-RfUYQ}/_ssgManifest.js +0 -0
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { injectable } from 'tsyringe';
|
|
8
|
-
import { mkdirSync, writeFileSync, renameSync, rmSync, existsSync, readdirSync } from 'fs';
|
|
9
|
-
import { join, basename } from 'path';
|
|
10
|
-
import { createHash, randomUUID } from 'crypto';
|
|
11
|
-
import { getShepHomeDir } from './filesystem/shep-directory.service.js';
|
|
12
|
-
let AttachmentStorageService = class AttachmentStorageService {
|
|
13
|
-
/** In-memory dedup index: sessionId -> Map<sha256, StoredAttachment> */
|
|
14
|
-
dedupIndex = new Map();
|
|
15
|
-
/**
|
|
16
|
-
* Store a file buffer in the pending attachment directory within SHEP_HOME.
|
|
17
|
-
* Returns existing record if SHA-256 matches (dedup within same session).
|
|
18
|
-
*/
|
|
19
|
-
store(buffer, filename, mimeType, sessionId) {
|
|
20
|
-
const hash = createHash('sha256').update(buffer).digest('hex');
|
|
21
|
-
// Check dedup
|
|
22
|
-
const sessionMap = this.dedupIndex.get(sessionId);
|
|
23
|
-
if (sessionMap?.has(hash)) {
|
|
24
|
-
return sessionMap.get(hash);
|
|
25
|
-
}
|
|
26
|
-
const sanitized = this.uniqueFilename(this.sanitizeFilename(filename), hash);
|
|
27
|
-
const pendingDir = this.getPendingDir(sessionId);
|
|
28
|
-
mkdirSync(pendingDir, { recursive: true });
|
|
29
|
-
const filePath = join(pendingDir, sanitized);
|
|
30
|
-
writeFileSync(filePath, buffer);
|
|
31
|
-
const attachment = {
|
|
32
|
-
id: randomUUID(),
|
|
33
|
-
name: sanitized,
|
|
34
|
-
size: BigInt(buffer.length),
|
|
35
|
-
mimeType,
|
|
36
|
-
path: filePath,
|
|
37
|
-
createdAt: new Date(),
|
|
38
|
-
sha256: hash,
|
|
39
|
-
};
|
|
40
|
-
// Track for dedup
|
|
41
|
-
if (!this.dedupIndex.has(sessionId)) {
|
|
42
|
-
this.dedupIndex.set(sessionId, new Map());
|
|
43
|
-
}
|
|
44
|
-
this.dedupIndex.get(sessionId).set(hash, attachment);
|
|
45
|
-
return attachment;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Commit pending uploads: rename pending dir to feature slug dir,
|
|
49
|
-
* update paths on all attachment records.
|
|
50
|
-
*/
|
|
51
|
-
commit(sessionId, featureSlug) {
|
|
52
|
-
const pendingDir = this.getPendingDir(sessionId);
|
|
53
|
-
const slugDir = this.getSlugDir(featureSlug);
|
|
54
|
-
if (!existsSync(pendingDir)) {
|
|
55
|
-
return [];
|
|
56
|
-
}
|
|
57
|
-
// Rename atomically
|
|
58
|
-
mkdirSync(this.getAttachmentsRoot(), { recursive: true });
|
|
59
|
-
renameSync(pendingDir, slugDir);
|
|
60
|
-
// Build updated attachment records
|
|
61
|
-
const sessionMap = this.dedupIndex.get(sessionId);
|
|
62
|
-
const attachments = [];
|
|
63
|
-
if (sessionMap) {
|
|
64
|
-
for (const stored of sessionMap.values()) {
|
|
65
|
-
const newPath = join(slugDir, basename(stored.path));
|
|
66
|
-
attachments.push({
|
|
67
|
-
id: stored.id,
|
|
68
|
-
name: stored.name,
|
|
69
|
-
size: stored.size,
|
|
70
|
-
mimeType: stored.mimeType,
|
|
71
|
-
path: newPath,
|
|
72
|
-
createdAt: stored.createdAt,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
this.dedupIndex.delete(sessionId);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
// Fallback: read files from slugDir
|
|
79
|
-
const files = readdirSync(slugDir);
|
|
80
|
-
for (const file of files) {
|
|
81
|
-
const filePath = join(slugDir, file);
|
|
82
|
-
attachments.push({
|
|
83
|
-
id: randomUUID(),
|
|
84
|
-
name: file,
|
|
85
|
-
size: BigInt(0),
|
|
86
|
-
mimeType: 'application/octet-stream',
|
|
87
|
-
path: filePath,
|
|
88
|
-
createdAt: new Date(),
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return attachments;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Delete all attachments for a feature.
|
|
96
|
-
*/
|
|
97
|
-
delete(featureSlug) {
|
|
98
|
-
const slugDir = this.getSlugDir(featureSlug);
|
|
99
|
-
if (existsSync(slugDir)) {
|
|
100
|
-
rmSync(slugDir, { recursive: true, force: true });
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
getAttachmentsRoot() {
|
|
104
|
-
return join(getShepHomeDir(), 'attachments');
|
|
105
|
-
}
|
|
106
|
-
getPendingDir(sessionId) {
|
|
107
|
-
return join(getShepHomeDir(), 'attachments', `pending-${sessionId}`);
|
|
108
|
-
}
|
|
109
|
-
getSlugDir(featureSlug) {
|
|
110
|
-
return join(getShepHomeDir(), 'attachments', featureSlug);
|
|
111
|
-
}
|
|
112
|
-
/** Generate unique filename by appending content hash when name collides (e.g. clipboard "image.png"). */
|
|
113
|
-
uniqueFilename(filename, hash) {
|
|
114
|
-
const dot = filename.lastIndexOf('.');
|
|
115
|
-
if (dot <= 0)
|
|
116
|
-
return `${filename}-${hash.slice(0, 8)}`;
|
|
117
|
-
return `${filename.slice(0, dot)}-${hash.slice(0, 8)}${filename.slice(dot)}`;
|
|
118
|
-
}
|
|
119
|
-
/** Strip path traversal and non-safe characters from filenames. */
|
|
120
|
-
sanitizeFilename(filename) {
|
|
121
|
-
// Remove path components, keep only the filename
|
|
122
|
-
let name = basename(filename);
|
|
123
|
-
// Remove path traversal
|
|
124
|
-
name = name.replace(/\.\./g, '');
|
|
125
|
-
// Replace non-alphanumeric chars (except dot, hyphen, underscore) with underscore
|
|
126
|
-
name = name.replace(/[^a-zA-Z0-9._-]/g, '_');
|
|
127
|
-
// Remove leading dots (hidden files)
|
|
128
|
-
name = name.replace(/^\.+/, '');
|
|
129
|
-
// Fallback if empty
|
|
130
|
-
return name || 'unnamed';
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
AttachmentStorageService = __decorate([
|
|
134
|
-
injectable()
|
|
135
|
-
], AttachmentStorageService);
|
|
136
|
-
export { AttachmentStorageService };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compose-user-input.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/compose-user-input.ts"],"names":[],"mappings":"AAAA,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,UAAU,EAAE,GAAG,SAAS,GACpC,MAAM,CAOR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/api/attachments/preview/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAsB3C,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CA6BrE"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { NextResponse } from 'next/server';
|
|
2
|
-
import { readFile, stat } from 'fs/promises';
|
|
3
|
-
import { extname, resolve } from 'path';
|
|
4
|
-
import { getShepHomeDir } from '../../../../../../../packages/core/src/infrastructure/services/filesystem/shep-directory.service.js';
|
|
5
|
-
const MIME_MAP = {
|
|
6
|
-
'.png': 'image/png',
|
|
7
|
-
'.jpg': 'image/jpeg',
|
|
8
|
-
'.jpeg': 'image/jpeg',
|
|
9
|
-
'.gif': 'image/gif',
|
|
10
|
-
'.webp': 'image/webp',
|
|
11
|
-
'.svg': 'image/svg+xml',
|
|
12
|
-
'.bmp': 'image/bmp',
|
|
13
|
-
'.ico': 'image/x-icon',
|
|
14
|
-
'.pdf': 'application/pdf',
|
|
15
|
-
'.txt': 'text/plain',
|
|
16
|
-
'.md': 'text/markdown',
|
|
17
|
-
'.json': 'application/json',
|
|
18
|
-
'.yaml': 'text/yaml',
|
|
19
|
-
'.yml': 'text/yaml',
|
|
20
|
-
};
|
|
21
|
-
export async function GET(request) {
|
|
22
|
-
const path = request.nextUrl.searchParams.get('path');
|
|
23
|
-
const mimeTypeHint = request.nextUrl.searchParams.get('mimeType');
|
|
24
|
-
if (!path) {
|
|
25
|
-
return NextResponse.json({ error: 'Missing path parameter' }, { status: 400 });
|
|
26
|
-
}
|
|
27
|
-
// Security: only allow paths within SHEP_HOME/attachments
|
|
28
|
-
const attachmentsRoot = resolve(getShepHomeDir(), 'attachments');
|
|
29
|
-
if (!resolve(path).startsWith(attachmentsRoot)) {
|
|
30
|
-
return NextResponse.json({ error: 'Access denied' }, { status: 403 });
|
|
31
|
-
}
|
|
32
|
-
try {
|
|
33
|
-
await stat(path);
|
|
34
|
-
const buffer = await readFile(path);
|
|
35
|
-
const ext = extname(path).toLowerCase();
|
|
36
|
-
const contentType = MIME_MAP[ext] ?? mimeTypeHint ?? 'application/octet-stream';
|
|
37
|
-
return new NextResponse(buffer, {
|
|
38
|
-
headers: {
|
|
39
|
-
'Content-Type': contentType,
|
|
40
|
-
'Cache-Control': 'private, max-age=3600',
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
return NextResponse.json({ error: 'File not found' }, { status: 404 });
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/api/attachments/upload/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAqE3C,wBAAsB,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAkDlE"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { NextResponse } from 'next/server';
|
|
2
|
-
import { resolve } from '../../../../lib/server-container.js';
|
|
3
|
-
const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB
|
|
4
|
-
const ALLOWED_EXTENSIONS = new Set([
|
|
5
|
-
'.png',
|
|
6
|
-
'.jpg',
|
|
7
|
-
'.jpeg',
|
|
8
|
-
'.gif',
|
|
9
|
-
'.webp',
|
|
10
|
-
'.svg',
|
|
11
|
-
'.bmp',
|
|
12
|
-
'.ico',
|
|
13
|
-
'.pdf',
|
|
14
|
-
'.doc',
|
|
15
|
-
'.docx',
|
|
16
|
-
'.xls',
|
|
17
|
-
'.xlsx',
|
|
18
|
-
'.ppt',
|
|
19
|
-
'.pptx',
|
|
20
|
-
'.txt',
|
|
21
|
-
'.md',
|
|
22
|
-
'.csv',
|
|
23
|
-
'.json',
|
|
24
|
-
'.yaml',
|
|
25
|
-
'.yml',
|
|
26
|
-
'.xml',
|
|
27
|
-
'.ts',
|
|
28
|
-
'.tsx',
|
|
29
|
-
'.js',
|
|
30
|
-
'.jsx',
|
|
31
|
-
'.py',
|
|
32
|
-
'.rb',
|
|
33
|
-
'.go',
|
|
34
|
-
'.rs',
|
|
35
|
-
'.java',
|
|
36
|
-
'.c',
|
|
37
|
-
'.cpp',
|
|
38
|
-
'.h',
|
|
39
|
-
'.hpp',
|
|
40
|
-
'.cs',
|
|
41
|
-
'.swift',
|
|
42
|
-
'.kt',
|
|
43
|
-
'.html',
|
|
44
|
-
'.css',
|
|
45
|
-
'.scss',
|
|
46
|
-
'.less',
|
|
47
|
-
'.sh',
|
|
48
|
-
'.bash',
|
|
49
|
-
'.zsh',
|
|
50
|
-
'.fish',
|
|
51
|
-
'.toml',
|
|
52
|
-
'.ini',
|
|
53
|
-
'.cfg',
|
|
54
|
-
'.conf',
|
|
55
|
-
'.env',
|
|
56
|
-
'.zip',
|
|
57
|
-
'.tar',
|
|
58
|
-
'.gz',
|
|
59
|
-
'.log',
|
|
60
|
-
]);
|
|
61
|
-
function getExtension(filename) {
|
|
62
|
-
const dot = filename.lastIndexOf('.');
|
|
63
|
-
return dot >= 0 ? filename.slice(dot).toLowerCase() : '';
|
|
64
|
-
}
|
|
65
|
-
export async function POST(request) {
|
|
66
|
-
try {
|
|
67
|
-
const formData = await request.formData();
|
|
68
|
-
const file = formData.get('file');
|
|
69
|
-
const sessionId = formData.get('sessionId');
|
|
70
|
-
if (!file || !sessionId) {
|
|
71
|
-
return NextResponse.json({ error: 'Missing required fields: file, sessionId' }, { status: 400 });
|
|
72
|
-
}
|
|
73
|
-
// Validate file size
|
|
74
|
-
if (file.size > MAX_FILE_SIZE) {
|
|
75
|
-
return NextResponse.json({
|
|
76
|
-
error: `File "${file.name}" exceeds 10 MB limit (${(file.size / 1024 / 1024).toFixed(1)} MB)`,
|
|
77
|
-
}, { status: 413 });
|
|
78
|
-
}
|
|
79
|
-
// Validate extension
|
|
80
|
-
const ext = getExtension(file.name);
|
|
81
|
-
if (ext && !ALLOWED_EXTENSIONS.has(ext)) {
|
|
82
|
-
return NextResponse.json({ error: `File type "${ext}" is not allowed` }, { status: 400 });
|
|
83
|
-
}
|
|
84
|
-
const buffer = Buffer.from(await file.arrayBuffer());
|
|
85
|
-
const service = resolve('AttachmentStorageService');
|
|
86
|
-
const attachment = service.store(buffer, file.name, file.type ?? 'application/octet-stream', sessionId);
|
|
87
|
-
return NextResponse.json({
|
|
88
|
-
id: attachment.id,
|
|
89
|
-
name: attachment.name,
|
|
90
|
-
size: Number(attachment.size),
|
|
91
|
-
mimeType: attachment.mimeType,
|
|
92
|
-
path: attachment.path,
|
|
93
|
-
createdAt: attachment.createdAt,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
catch (error) {
|
|
97
|
-
const message = error instanceof Error ? error.message : 'Upload failed';
|
|
98
|
-
return NextResponse.json({ error: message }, { status: 500 });
|
|
99
|
-
}
|
|
100
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { LucideIcon } from 'lucide-react';
|
|
2
|
-
export interface AttachmentCardProps {
|
|
3
|
-
name: string;
|
|
4
|
-
size: number;
|
|
5
|
-
mimeType: string;
|
|
6
|
-
onRemove: () => void;
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
/** Optional secondary text shown below the filename (e.g. file path). */
|
|
10
|
-
subtitle?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function AttachmentCard({ name, size, mimeType: _mimeType, onRemove, loading, disabled, subtitle, }: AttachmentCardProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare function getFileIcon(ext: string): LucideIcon;
|
|
14
|
-
export declare function getFileIconColor(ext: string): string;
|
|
15
|
-
export declare function formatFileSize(bytes: number): string;
|
|
16
|
-
//# sourceMappingURL=attachment-card.d.ts.map
|
package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-card.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/attachment-card/attachment-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK/C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAI,EACJ,QAAQ,EAAE,SAAS,EACnB,QAAQ,EACR,OAAe,EACf,QAAgB,EAChB,QAAQ,GACT,EAAE,mBAAmB,2CAqCrB;AAsBD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAKnD;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKpD"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { FileIcon, FileTextIcon, ImageIcon, CodeIcon, Trash2Icon, Loader2Icon } from 'lucide-react';
|
|
3
|
-
import { cn } from '../../../lib/utils.js';
|
|
4
|
-
import { Button } from '../../ui/button.js';
|
|
5
|
-
export function AttachmentCard({ name, size, mimeType: _mimeType, onRemove, loading = false, disabled = false, subtitle, }) {
|
|
6
|
-
const ext = getExtension(name);
|
|
7
|
-
const Icon = getFileIcon(ext);
|
|
8
|
-
const iconColorClass = getFileIconColor(ext);
|
|
9
|
-
return (_jsxs("div", { className: "flex items-center gap-3 rounded-md border p-2", children: [_jsx("div", { className: cn('flex h-8 w-8 shrink-0 items-center justify-center rounded', iconColorClass), children: _jsx(Icon, { className: "h-4 w-4" }) }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "truncate text-sm font-medium", children: name }), subtitle ? (_jsx("span", { className: "text-muted-foreground truncate text-xs", children: subtitle })) : null, _jsx("span", { className: "text-muted-foreground text-xs", children: loading ? 'Uploading...' : formatFileSize(size) })] }), loading ? (_jsx(Loader2Icon, { className: "text-muted-foreground h-4 w-4 animate-spin" })) : (_jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", onClick: onRemove, disabled: disabled, "aria-label": `Remove ${name}`, children: _jsx(Trash2Icon, { className: "h-3 w-3" }) }))] }));
|
|
10
|
-
}
|
|
11
|
-
function getExtension(filename) {
|
|
12
|
-
const dot = filename.lastIndexOf('.');
|
|
13
|
-
return dot >= 0 ? filename.slice(dot).toLowerCase() : '';
|
|
14
|
-
}
|
|
15
|
-
const IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);
|
|
16
|
-
const CODE_EXTS = new Set([
|
|
17
|
-
'.ts',
|
|
18
|
-
'.tsx',
|
|
19
|
-
'.js',
|
|
20
|
-
'.jsx',
|
|
21
|
-
'.json',
|
|
22
|
-
'.yaml',
|
|
23
|
-
'.yml',
|
|
24
|
-
'.xml',
|
|
25
|
-
'.html',
|
|
26
|
-
'.css',
|
|
27
|
-
'.md',
|
|
28
|
-
]);
|
|
29
|
-
export function getFileIcon(ext) {
|
|
30
|
-
if (IMAGE_EXTS.has(ext))
|
|
31
|
-
return ImageIcon;
|
|
32
|
-
if (ext === '.pdf')
|
|
33
|
-
return FileTextIcon;
|
|
34
|
-
if (CODE_EXTS.has(ext))
|
|
35
|
-
return CodeIcon;
|
|
36
|
-
return FileIcon;
|
|
37
|
-
}
|
|
38
|
-
export function getFileIconColor(ext) {
|
|
39
|
-
if (ext === '.pdf')
|
|
40
|
-
return 'bg-red-50 text-red-600';
|
|
41
|
-
if (IMAGE_EXTS.has(ext))
|
|
42
|
-
return 'bg-blue-50 text-blue-600';
|
|
43
|
-
if (CODE_EXTS.has(ext))
|
|
44
|
-
return 'bg-emerald-50 text-emerald-600';
|
|
45
|
-
return 'bg-gray-50 text-gray-600';
|
|
46
|
-
}
|
|
47
|
-
export function formatFileSize(bytes) {
|
|
48
|
-
if (bytes === 0)
|
|
49
|
-
return '0 B';
|
|
50
|
-
const units = ['B', 'KB', 'MB', 'GB'];
|
|
51
|
-
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
52
|
-
return `${(bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1)} ${units[i]}`;
|
|
53
|
-
}
|
package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { AttachmentCard } from './attachment-card.js';
|
|
3
|
-
declare const meta: Meta<typeof AttachmentCard>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AttachmentCard>;
|
|
6
|
-
export declare const ImageFile: Story;
|
|
7
|
-
export declare const PdfFile: Story;
|
|
8
|
-
export declare const CodeFile: Story;
|
|
9
|
-
export declare const UnknownFile: Story;
|
|
10
|
-
export declare const Loading: Story;
|
|
11
|
-
export declare const Disabled: Story;
|
|
12
|
-
//# sourceMappingURL=attachment-card.stories.d.ts.map
|
package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-card.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/attachment-card/attachment-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAOrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC"}
|
package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { fn } from '@storybook/test';
|
|
2
|
-
import { AttachmentCard } from './attachment-card.js';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Common/AttachmentCard',
|
|
5
|
-
component: AttachmentCard,
|
|
6
|
-
tags: ['autodocs'],
|
|
7
|
-
args: {
|
|
8
|
-
onRemove: fn(),
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
export const ImageFile = {
|
|
13
|
-
args: {
|
|
14
|
-
name: 'screenshot.png',
|
|
15
|
-
size: 150000,
|
|
16
|
-
mimeType: 'image/png',
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
export const PdfFile = {
|
|
20
|
-
args: {
|
|
21
|
-
name: 'requirements.pdf',
|
|
22
|
-
size: 42000,
|
|
23
|
-
mimeType: 'application/pdf',
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
export const CodeFile = {
|
|
27
|
-
args: {
|
|
28
|
-
name: 'index.ts',
|
|
29
|
-
size: 1024,
|
|
30
|
-
mimeType: 'text/typescript',
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
export const UnknownFile = {
|
|
34
|
-
args: {
|
|
35
|
-
name: 'data.bin',
|
|
36
|
-
size: 8192,
|
|
37
|
-
mimeType: 'application/octet-stream',
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
export const Loading = {
|
|
41
|
-
args: {
|
|
42
|
-
name: 'uploading-image.png',
|
|
43
|
-
size: 0,
|
|
44
|
-
mimeType: 'image/png',
|
|
45
|
-
loading: true,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
export const Disabled = {
|
|
49
|
-
args: {
|
|
50
|
-
name: 'screenshot.png',
|
|
51
|
-
size: 150000,
|
|
52
|
-
mimeType: 'image/png',
|
|
53
|
-
disabled: true,
|
|
54
|
-
},
|
|
55
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/attachment-card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AttachmentCard } from './attachment-card.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface AttachmentChipProps {
|
|
2
|
-
name: string;
|
|
3
|
-
size: number;
|
|
4
|
-
mimeType: string;
|
|
5
|
-
path: string;
|
|
6
|
-
onRemove: () => void;
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare function AttachmentChip({ name, size, mimeType, path, onRemove, loading, disabled, }: AttachmentChipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
//# sourceMappingURL=attachment-chip.d.ts.map
|
package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-chip.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/attachment-chip/attachment-chip.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAmBD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,OAAe,EACf,QAAgB,GACjB,EAAE,mBAAmB,2CA2FrB"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @next/next/no-img-element -- Local file preview requires raw <img>, not next/image */
|
|
2
|
-
'use client';
|
|
3
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { X, Loader2Icon, DownloadIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../../lib/utils.js';
|
|
6
|
-
import { Dialog, DialogTrigger, DialogContent, DialogTitle } from '../../ui/dialog.js';
|
|
7
|
-
import { VisuallyHidden } from 'radix-ui';
|
|
8
|
-
import { formatFileSize, getFileIcon, getFileIconColor, } from '../../common/attachment-card/attachment-card.js';
|
|
9
|
-
const IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);
|
|
10
|
-
function isImage(name) {
|
|
11
|
-
const dot = name.lastIndexOf('.');
|
|
12
|
-
return dot >= 0 && IMAGE_EXTS.has(name.slice(dot).toLowerCase());
|
|
13
|
-
}
|
|
14
|
-
function previewUrl(path, mimeType) {
|
|
15
|
-
const params = new URLSearchParams({ path, mimeType });
|
|
16
|
-
return `/api/attachments/preview?${params.toString()}`;
|
|
17
|
-
}
|
|
18
|
-
function getExtension(filename) {
|
|
19
|
-
const dot = filename.lastIndexOf('.');
|
|
20
|
-
return dot >= 0 ? filename.slice(dot).toLowerCase() : '';
|
|
21
|
-
}
|
|
22
|
-
export function AttachmentChip({ name, size, mimeType, path, onRemove, loading = false, disabled = false, }) {
|
|
23
|
-
const ext = getExtension(name);
|
|
24
|
-
const Icon = getFileIcon(ext);
|
|
25
|
-
const iconColorClass = getFileIconColor(ext);
|
|
26
|
-
const imageFile = isImage(name);
|
|
27
|
-
if (loading) {
|
|
28
|
-
return (_jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-md border", children: _jsx(Loader2Icon, { className: "text-muted-foreground h-5 w-5 animate-spin" }) }));
|
|
29
|
-
}
|
|
30
|
-
if (imageFile) {
|
|
31
|
-
return (_jsxs(Dialog, { children: [_jsxs("div", { className: "group relative", children: [_jsx(DialogTrigger, { asChild: true, children: _jsx("img", { src: previewUrl(path, mimeType), alt: name, title: name, className: "h-12 w-12 cursor-pointer rounded-md border object-cover transition-opacity hover:opacity-80" }) }), !disabled && (_jsx("button", { type: "button", onClick: onRemove, className: "absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex", "aria-label": `Remove ${name}`, children: _jsx(X, { className: "h-3 w-3" }) }))] }), _jsxs(DialogContent, { className: "max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90", children: [_jsx(VisuallyHidden.Root, { children: _jsxs(DialogTitle, { children: ["Preview: ", name] }) }), _jsx("div", { className: "relative bg-black/90", children: _jsx("img", { src: previewUrl(path, mimeType), alt: name, className: "h-auto max-h-[70vh] w-full object-contain" }) }), _jsxs("div", { className: "bg-background flex items-center gap-3 px-4 py-3", children: [_jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "truncate text-sm font-medium", children: name }), _jsx("span", { className: "text-muted-foreground text-xs", children: formatFileSize(size) })] }), _jsx("a", { href: previewUrl(path, mimeType), download: name, className: "text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors", "aria-label": `Download ${name}`, children: _jsx(DownloadIcon, { className: "h-4 w-4" }) })] })] })] }));
|
|
32
|
-
}
|
|
33
|
-
return (_jsxs("div", { className: "group relative flex items-center gap-2 rounded-full border py-1 pr-3 pl-2", children: [_jsx("div", { className: cn('flex h-6 w-6 shrink-0 items-center justify-center rounded-full', iconColorClass), children: _jsx(Icon, { className: "h-3 w-3" }) }), _jsx("span", { className: "max-w-[120px] truncate text-sm", children: name }), _jsx("span", { className: "text-muted-foreground text-xs", children: formatFileSize(size) }), !disabled && (_jsx("button", { type: "button", onClick: onRemove, className: "absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex", "aria-label": `Remove ${name}`, children: _jsx(X, { className: "h-3 w-3" }) }))] }));
|
|
34
|
-
}
|
package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { AttachmentChip } from './attachment-chip.js';
|
|
3
|
-
declare const meta: Meta<typeof AttachmentChip>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AttachmentChip>;
|
|
6
|
-
export declare const ImageFile: Story;
|
|
7
|
-
export declare const PdfFile: Story;
|
|
8
|
-
export declare const CodeFile: Story;
|
|
9
|
-
export declare const Loading: Story;
|
|
10
|
-
//# sourceMappingURL=attachment-chip.stories.d.ts.map
|
package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-chip.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/attachment-chip/attachment-chip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAOrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
|
package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { fn } from '@storybook/test';
|
|
2
|
-
import { AttachmentChip } from './attachment-chip.js';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Common/AttachmentChip',
|
|
5
|
-
component: AttachmentChip,
|
|
6
|
-
tags: ['autodocs'],
|
|
7
|
-
args: {
|
|
8
|
-
onRemove: fn(),
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
export const ImageFile = {
|
|
13
|
-
args: {
|
|
14
|
-
name: 'screenshot.png',
|
|
15
|
-
size: 150000,
|
|
16
|
-
mimeType: 'image/png',
|
|
17
|
-
path: '/tmp/test/screenshot.png',
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
export const PdfFile = {
|
|
21
|
-
args: {
|
|
22
|
-
name: 'requirements.pdf',
|
|
23
|
-
size: 42000,
|
|
24
|
-
mimeType: 'application/pdf',
|
|
25
|
-
path: '/tmp/test/requirements.pdf',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export const CodeFile = {
|
|
29
|
-
args: {
|
|
30
|
-
name: 'index.ts',
|
|
31
|
-
size: 1024,
|
|
32
|
-
mimeType: 'text/typescript',
|
|
33
|
-
path: '/tmp/test/index.ts',
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
export const Loading = {
|
|
37
|
-
args: {
|
|
38
|
-
name: 'uploading-image.png',
|
|
39
|
-
size: 0,
|
|
40
|
-
mimeType: 'image/png',
|
|
41
|
-
path: '',
|
|
42
|
-
loading: true,
|
|
43
|
-
},
|
|
44
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/attachment-chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AttachmentChip } from './attachment-chip.js';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
var R=require("../../../../chunks/[turbopack]_runtime.js")("server/app/api/attachments/preview/route.js")
|
|
2
|
-
R.c("server/chunks/[root-of-the-server]__0b10355c._.js")
|
|
3
|
-
R.c("server/chunks/[root-of-the-server]__57104a4c._.js")
|
|
4
|
-
R.c("server/chunks/403f9_next_567de315._.js")
|
|
5
|
-
R.c("server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js")
|
|
6
|
-
R.m(18095)
|
|
7
|
-
module.exports=R.m(18095).exports
|