Files
DndGamePlayer/app/renderer/npcs/NpcsEditorApp.module.css
T
Ivan Fontosh 101f595bac feat(players): app Players library and circular NPC tokens on scenes
Add userData players/teams, scene npcTokens with hex-inscribed sizing, session scale synced to presentation, and Playwright e2e coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 13:38:35 +08:00

412 lines
6.2 KiB
CSS

.page {
height: 100vh;
display: grid;
grid-template-rows: 56px 1fr;
background: #09090b;
color: var(--text1);
}
.topBar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
border-bottom: 1px solid var(--stroke);
background: #18181b;
}
.topTitle {
font-weight: 900;
font-size: 15px;
letter-spacing: 0.2px;
}
.body {
display: grid;
grid-template-columns: 280px 1fr 480px;
min-height: 0;
}
.col {
min-height: 0;
border-right: 1px solid var(--stroke);
}
.graphLoading {
height: 100%;
min-height: 240px;
display: flex;
align-items: center;
justify-content: center;
color: var(--text2);
font-size: 13px;
}
.col:last-child {
border-right: 0;
}
.side {
display: grid;
grid-template-rows: auto auto 1fr;
gap: 10px;
padding: 12px;
min-height: 0;
background: #0f0f12;
}
.sideActions {
display: flex;
gap: 8px;
flex-wrap: nowrap;
align-items: stretch;
}
.sideActions > * {
flex: 1 1 0;
min-width: 0;
}
.sideActions button {
width: 100%;
padding-left: 8px;
padding-right: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.list {
display: grid;
gap: 8px;
align-content: start;
overflow: auto;
min-height: 0;
padding-right: 2px;
}
.tile {
display: grid;
grid-template-columns: 1fr auto;
gap: 4px;
align-items: center;
padding: 4px;
border-radius: 12px;
border: 1px solid var(--stroke);
background: #18181b;
width: 100%;
}
.tileBody {
display: grid;
grid-template-columns: 44px 1fr;
gap: 10px;
align-items: center;
padding: 4px;
border: 0;
background: transparent;
cursor: pointer;
text-align: left;
color: inherit;
min-width: 0;
}
.tileSelected {
border-color: #60a5fa;
box-shadow: 0 0 0 1px #60a5fa;
}
.tileDragging {
opacity: 0.55;
}
.tileDropBefore {
box-shadow: inset 0 2px 0 #60a5fa;
}
.tileDropAfter {
box-shadow: inset 0 -2px 0 #60a5fa;
}
.tileAvatar {
width: 44px;
height: 44px;
border-radius: 10px;
overflow: hidden;
background: #09090b;
}
.tileAvatarImg {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.tileName {
font-size: 13px;
font-weight: 700;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tileMenuBtn {
width: 28px;
height: 28px;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--text2);
cursor: pointer;
}
.tileMenuBtn:hover {
background: #27272a;
color: var(--text1);
}
.inspector {
display: grid;
grid-template-rows: 1fr;
min-height: 0;
background: #0f0f12;
}
.inspectorScroll {
overflow: auto;
padding: 14px 16px 24px;
display: grid;
gap: 14px;
align-content: start;
}
.fieldLabel {
color: var(--text2);
font-size: 11px;
font-weight: 900;
letter-spacing: 0.6px;
margin-bottom: 8px;
}
.colorInput {
width: 100%;
height: 36px;
padding: 0;
border: 1px solid var(--stroke);
border-radius: 8px;
background: transparent;
}
.avatarPick {
display: grid;
gap: 10px;
justify-items: start;
}
.avatarPreview {
width: 120px;
height: 120px;
border-radius: 14px;
overflow: hidden;
border: 1px solid var(--stroke);
background: #09090b;
}
.avatarPreviewImg {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.descShell {
display: grid;
grid-template-rows: auto 1fr;
min-height: 220px;
border-radius: var(--radius-md, 10px);
border: 1px solid var(--stroke);
background: var(--color-overlay-dark-3, #0c0c0f);
overflow: hidden;
}
.descContent {
min-height: 160px;
max-height: 280px;
overflow: auto;
padding: 12px 14px;
}
.relationsTitle {
font-weight: 900;
font-size: 13px;
margin-bottom: 8px;
}
.relationsList {
display: grid;
gap: 6px;
}
.relationItem {
padding: 8px 10px;
border-radius: 10px;
border: 1px solid var(--stroke);
background: #18181b;
font-size: 13px;
font-weight: 600;
}
.emptyInspector {
color: var(--text2);
font-size: 13px;
line-height: 1.45;
}
.muted {
color: var(--text2);
font-size: 13px;
}
.menu {
position: fixed;
z-index: 80;
min-width: 160px;
padding: 6px;
border-radius: 10px;
background: #18181b;
border: 1px solid var(--stroke);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
display: grid;
gap: 2px;
}
.menuItem {
border: 0;
background: transparent;
color: var(--text1);
text-align: left;
padding: 8px 10px;
border-radius: 8px;
cursor: pointer;
font-size: 13px;
width: 100%;
}
.menuItem:hover {
background: #27272a;
}
.menuItemDanger {
border: 0;
background: transparent;
color: var(--color-danger);
text-align: left;
padding: 8px 10px;
border-radius: 8px;
cursor: pointer;
font-size: 13px;
width: 100%;
}
.menuItemDanger:hover {
background: rgba(239, 68, 68, 0.18);
}
.groupBlock {
display: grid;
gap: 4px;
}
.groupHeader {
display: grid;
grid-template-columns: auto auto 1fr auto;
align-items: center;
gap: 6px;
padding: 4px 2px;
border-bottom: 1px solid var(--stroke);
cursor: grab;
user-select: none;
}
.groupHeaderDragging {
opacity: 0.55;
}
.groupDropBefore {
box-shadow: inset 0 2px 0 #60a5fa;
}
.groupDropAfter {
box-shadow: inset 0 -2px 0 #60a5fa;
}
.groupToggle {
border: 0;
background: transparent;
color: var(--text2);
cursor: pointer;
width: 18px;
padding: 0;
font-size: 11px;
}
.groupColorDot {
width: 10px;
height: 10px;
border-radius: 999px;
flex-shrink: 0;
}
.groupTitle {
font-size: 12px;
font-weight: 800;
letter-spacing: 0.3px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.groupMenuBtn {
width: 24px;
height: 24px;
border: 0;
border-radius: 6px;
background: transparent;
color: var(--text2);
cursor: pointer;
}
.groupMenuBtn:hover {
background: #27272a;
color: var(--text1);
}
.groupBody {
display: grid;
gap: 6px;
padding: 4px 0 8px 4px;
min-height: 8px;
}
.groupBodyDrop {
background: rgba(96, 165, 250, 0.08);
border-radius: 8px;
outline: 1px dashed rgba(96, 165, 250, 0.45);
}
.ungroupedSection {
display: grid;
gap: 4px;
margin-top: 4px;
}
.ungroupedHeader {
font-size: 11px;
font-weight: 900;
letter-spacing: 0.6px;
color: var(--text2);
padding: 6px 2px 4px;
border-bottom: 1px solid var(--stroke);
}