From 14818c2c0c6739daeb33a9c2ed30dcac7c398dd0 Mon Sep 17 00:00:00 2001 From: suzmii Date: Sat, 29 Aug 2026 16:51:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E8=97=8F=E8=B5=84=E6=BA=90=E7=94=BB?= =?UTF-8?q?=E5=B8=83=E6=B8=B8=E6=88=8F=E4=BB=A3=E7=A0=81=E5=B9=B6=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E7=B1=BB=E5=9E=8B=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 资源画布仅展示文档、美术、音频、项目版本四个可见栏目,保留五类内部投影和依赖事实。 - 为可见资源卡增加可访问、可测试的中文类型 Tag,并隐藏代码端点依赖边。 - 补充资源投影、画布回归测试及 PRD 四栏目验收描述。 --- apps/ai-game-creator-shell/src/styles.css | 25 +++ .../src/view/project-development/index.tsx | 65 +++++--- .../resourceCanvasLayoutModel.ts | 8 + .../resourceProjectionModel.ts | 61 ++++++++ .../appSurface/project-development.suite.ts | 146 +++++++++++++++--- .../projectResourceProjectionModel.test.ts | 120 +++++++++++++- ...AI游戏创作】项目开发工作台PRD-2026-07-20.md | 10 +- 7 files changed, 388 insertions(+), 47 deletions(-) diff --git a/apps/ai-game-creator-shell/src/styles.css b/apps/ai-game-creator-shell/src/styles.css index 0c9984c75..3d0cdbc39 100644 --- a/apps/ai-game-creator-shell/src/styles.css +++ b/apps/ai-game-creator-shell/src/styles.css @@ -5457,6 +5457,31 @@ iframe.preview-frame { visibility: visible; } +.game-resource-card-type-badge { + position: absolute; + top: 8px; + right: 8px; + z-index: 2; + display: inline-flex; + max-width: calc(100% - 16px); + align-items: center; + min-width: 0; + padding: 4px 8px; + overflow: hidden; + border: 1px solid rgb(255 255 255 / 72%); + border-radius: 999px; + background: rgb(75 48 38 / 84%); + color: #fff; + font-size: 10px; + font-weight: 900; + line-height: 1; + letter-spacing: 0.02em; + pointer-events: none; + text-overflow: ellipsis; + white-space: nowrap; + box-shadow: 0 8px 18px rgb(96 62 47 / 20%); +} + .game-resource-card-open { position: absolute; z-index: 1; diff --git a/apps/ai-game-creator-shell/src/view/project-development/index.tsx b/apps/ai-game-creator-shell/src/view/project-development/index.tsx index 272916fa5..0c05b1f79 100644 --- a/apps/ai-game-creator-shell/src/view/project-development/index.tsx +++ b/apps/ai-game-creator-shell/src/view/project-development/index.tsx @@ -86,6 +86,7 @@ import { RESOURCE_CANVAS_SECTION_MIN_HEIGHT, RESOURCE_CANVAS_SECTION_MIN_WIDTH, RESOURCE_CANVAS_SECTION_ORDER, + RESOURCE_CANVAS_VISIBLE_SECTION_ORDER, type ResourceCanvasCardSize, resourceCanvasCardSize, resourceCanvasContentBounds, @@ -123,6 +124,7 @@ import { type ProjectResource, type ProjectResourceCategory, projectResourcesFromReadModels, + projectResourceTypeLabel, } from './resourceProjectionModel'; import { clampProjectResourceSectionZoom, @@ -393,6 +395,7 @@ export type ProjectDevelopmentViewProps = { }; const categoryOrder = RESOURCE_CANVAS_SECTION_ORDER; +const visibleCategoryOrder = RESOURCE_CANVAS_VISIBLE_SECTION_ORDER; const categoryLabels: Record = { code: '游戏代码', @@ -592,6 +595,7 @@ const ResourceCard = memo(function ResourceCard({ const [decodedIdentity, setDecodedIdentity] = useState(null); const Icon = categoryIcons[resource.category]; const kind = projectResourceCardPreviewKind(resource); + const resourceTypeLabel = projectResourceTypeLabel(resource); const isMedia = kind === 'video' || kind === 'audio'; const mediaActive = activeMediaIdentity === previewIdentity; const sourceUrl = @@ -797,6 +801,13 @@ const ResourceCard = memo(function ResourceCard({ + + {resourceTypeLabel} +