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>
This commit is contained in:
@@ -0,0 +1,243 @@
|
||||
.dialog {
|
||||
width: min(1080px, calc(100vw - 48px));
|
||||
max-width: 1080px;
|
||||
}
|
||||
|
||||
.body {
|
||||
display: grid;
|
||||
grid-template-columns: 330px minmax(0, 1fr);
|
||||
gap: 16px;
|
||||
min-height: 560px;
|
||||
max-height: min(78vh, 760px);
|
||||
}
|
||||
|
||||
.sidebar,
|
||||
.editor {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sidebarActions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sidebarActions > * {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sidebarActions button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.teamForm {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
padding: 10px;
|
||||
border: 1px solid var(--stroke);
|
||||
border-radius: 10px;
|
||||
background: var(--color-overlay-dark-3);
|
||||
}
|
||||
|
||||
.teamFormField {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
color: var(--text2);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.teamFormField input[type='color'] {
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--stroke);
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.teamFormActions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.teamFormActions > * {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.teamFormActions button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
overflow: auto;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
.team {
|
||||
border: 1px solid var(--stroke);
|
||||
border-radius: 10px;
|
||||
background: var(--color-overlay-dark-2);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.teamHeader {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
min-height: 34px;
|
||||
padding: 4px 8px;
|
||||
border-bottom: 1px solid var(--stroke);
|
||||
}
|
||||
|
||||
.teamDot {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.teamName {
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.teamMenu {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.teamMenu summary {
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
padding: 4px 7px;
|
||||
}
|
||||
|
||||
.teamMenuPopup {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
min-width: 130px;
|
||||
padding: 5px;
|
||||
border: 1px solid var(--stroke);
|
||||
border-radius: 8px;
|
||||
background: var(--bg1, #1a1d24);
|
||||
box-shadow: 0 10px 24px rgb(0 0 0 / 45%);
|
||||
}
|
||||
|
||||
.teamMenuPopup button {
|
||||
width: 100%;
|
||||
padding: 7px 9px;
|
||||
border: 0;
|
||||
border-radius: 5px;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.teamMenuPopup button:hover {
|
||||
background: rgb(255 255 255 / 8%);
|
||||
}
|
||||
|
||||
.teamBody {
|
||||
display: grid;
|
||||
gap: 5px;
|
||||
min-height: 28px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.playerRow {
|
||||
display: grid;
|
||||
grid-template-columns: 48px minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
text-align: left;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.playerRow:hover,
|
||||
.playerRowSelected {
|
||||
border-color: var(--color-accent, #c9a227);
|
||||
background: rgb(255 255 255 / 5%);
|
||||
}
|
||||
|
||||
.playerRow > span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dropTarget {
|
||||
padding: 8px;
|
||||
color: var(--text2);
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.editor {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
overflow: auto;
|
||||
padding: 22px;
|
||||
border: 1px solid var(--stroke);
|
||||
border-radius: 12px;
|
||||
background: var(--color-overlay-dark-3);
|
||||
}
|
||||
|
||||
.editorDropOver {
|
||||
border-color: var(--color-accent, #c9a227);
|
||||
}
|
||||
|
||||
.field {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
width: min(420px, 100%);
|
||||
color: var(--text2);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.field input[type='color'] {
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--stroke);
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.body {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user