mirror of
https://github.com/hansjone/mind-map.git
synced 2026-10-09 05:53:19 +08:00
Initial commit: DSH mind-map canvas monorepo
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
2ecd300ada
92 changed files with 20486 additions and 0 deletions
560
apps/web/src/styles.css
Normal file
560
apps/web/src/styles.css
Normal file
|
|
@ -0,0 +1,560 @@
|
|||
:root {
|
||||
color: var(--dsw-alias-label-primary, #f4f5f7);
|
||||
background: var(--dsw-alias-bg-base, #101014);
|
||||
font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.08));
|
||||
background: var(--dsw-specific-selector, rgba(255, 255, 255, 0.08));
|
||||
border-radius: 8px;
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: var(--dsw-alias-interactive-bg-hover, rgba(94, 106, 210, 0.16));
|
||||
}
|
||||
|
||||
button.primary {
|
||||
background: var(--dsw-alias-brand-primary, #5e6ad2);
|
||||
color: var(--dsw-alias-brand-text, #fff);
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
input {
|
||||
background: var(--dsw-specific-input-major, rgba(255, 255, 255, 0.08));
|
||||
border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.08));
|
||||
border-radius: 8px;
|
||||
padding: 6px 8px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.app-shell {
|
||||
display: grid;
|
||||
grid-template-rows: 48px 1fr;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.app-shell.embed {
|
||||
grid-template-rows: 1fr;
|
||||
}
|
||||
|
||||
.embed-main {
|
||||
display: grid !important;
|
||||
grid-template-columns: 1fr !important;
|
||||
grid-template-rows: 1fr;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 0 12px;
|
||||
border-bottom: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.08));
|
||||
background: var(--dsw-alias-bg-layer-1, #1b1e28);
|
||||
}
|
||||
|
||||
.topbar .brand {
|
||||
font-weight: 650;
|
||||
letter-spacing: 0.02em;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.topbar .spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.main {
|
||||
display: grid;
|
||||
grid-template-columns: var(--left, 240px) 1fr;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* Aside is display:none when collapsed — only canvas remains as grid child,
|
||||
so switch to a single column or it sits in the 0-width track and vanishes. */
|
||||
.main.left-collapsed {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.panel {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
border-right: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.08));
|
||||
background: var(--dsw-specific-sidebar-fill, rgba(16, 16, 20, 0.92));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
padding: 10px 12px;
|
||||
font-weight: 600;
|
||||
color: var(--dsw-alias-label-secondary, #a5adb8);
|
||||
border-bottom: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.08));
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.canvas-host {
|
||||
position: relative;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
background: var(--dsw-alias-bg-base, #101014);
|
||||
}
|
||||
|
||||
.canvas-host canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.canvas-list-item,
|
||||
.outline-item {
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 4px;
|
||||
cursor: pointer;
|
||||
color: var(--dsw-alias-label-primary, #f4f5f7);
|
||||
}
|
||||
|
||||
.canvas-list-item:hover,
|
||||
.outline-item:hover {
|
||||
background: var(--dsw-specific-sidebar-nav-item-hover, rgba(255, 255, 255, 0.05));
|
||||
}
|
||||
|
||||
.canvas-list-item.active,
|
||||
.outline-item.active {
|
||||
background: var(--dsw-specific-sidebar-nav-item-active, rgba(255, 255, 255, 0.09));
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: var(--dsw-alias-label-tertiary, #7b838f);
|
||||
}
|
||||
|
||||
.skin-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.skin-swatch {
|
||||
height: 28px;
|
||||
border-radius: 6px;
|
||||
border: 2px solid transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.skin-swatch.active {
|
||||
border-color: var(--dsw-alias-brand-primary, #5e6ad2);
|
||||
}
|
||||
|
||||
.proposal-box {
|
||||
padding: 8px 10px;
|
||||
border-top: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.08));
|
||||
max-height: 180px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.proposal-item {
|
||||
padding: 8px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 6px;
|
||||
background: var(--dsw-specific-selector, rgba(255, 255, 255, 0.06));
|
||||
}
|
||||
|
||||
.canvas-hint {
|
||||
position: absolute;
|
||||
left: 56px;
|
||||
bottom: 10px;
|
||||
font-size: 12px;
|
||||
pointer-events: none;
|
||||
opacity: 0.75;
|
||||
max-width: calc(100% - 240px);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.canvas-controls {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
bottom: 12px;
|
||||
z-index: 4;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.12));
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--dsw-alias-bg-layer1, #1a1d27) 92%,
|
||||
transparent
|
||||
);
|
||||
backdrop-filter: blur(8px);
|
||||
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
|
||||
}
|
||||
|
||||
.canvas-controls__btn {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
border-bottom: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.1));
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: var(--dsw-alias-label-secondary, #a5adb8);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.canvas-controls__btn:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.canvas-controls__btn:hover {
|
||||
background: var(--dsw-specific-sidebar-nav-item-hover, rgba(255, 255, 255, 0.06));
|
||||
color: var(--dsw-alias-label-primary, #f4f5f7);
|
||||
}
|
||||
|
||||
.canvas-controls__btn.is-active {
|
||||
color: var(--dsw-alias-state-warning, #d4a017);
|
||||
background: rgba(212, 160, 23, 0.12);
|
||||
}
|
||||
|
||||
.canvas-controls__btn svg {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.canvas-toolbar {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 8px;
|
||||
border-radius: 10px;
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--dsw-alias-bg-layer1, #1a1d27) 92%,
|
||||
transparent
|
||||
);
|
||||
border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.1));
|
||||
backdrop-filter: blur(8px);
|
||||
z-index: 4;
|
||||
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
|
||||
max-width: calc(100% - 24px);
|
||||
}
|
||||
|
||||
.canvas-toolbar__group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.canvas-toolbar__sep {
|
||||
width: 1px;
|
||||
height: 18px;
|
||||
background: var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.12));
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
.canvas-toolbar__zoom {
|
||||
font-size: 11px;
|
||||
color: var(--dsw-alias-label-tertiary, #7b838f);
|
||||
min-width: 36px;
|
||||
text-align: right;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.canvas-tool-btn {
|
||||
appearance: none;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--dsw-alias-label-secondary, #a5adb8);
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
padding: 6px 9px;
|
||||
border-radius: 7px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.canvas-tool-btn:disabled {
|
||||
opacity: 0.35;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.canvas-tool-btn:hover {
|
||||
background: var(--dsw-specific-sidebar-nav-item-hover, rgba(255, 255, 255, 0.06));
|
||||
color: var(--dsw-alias-label-primary, #f4f5f7);
|
||||
}
|
||||
|
||||
.canvas-tool-btn.is-active {
|
||||
background: var(--dsw-specific-sidebar-nav-item-active, rgba(255, 255, 255, 0.1));
|
||||
color: var(--dsw-alias-brand-primary, #5e6ad2);
|
||||
}
|
||||
|
||||
.canvas-style-menu {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.canvas-style-menu__trigger:disabled {
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.canvas-style-menu__panel {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: calc(100% + 6px);
|
||||
z-index: 40;
|
||||
min-width: 112px;
|
||||
padding: 4px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.12));
|
||||
background: var(--dsw-alias-bg-layer-1, #1b1e28);
|
||||
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.canvas-style-menu__item {
|
||||
appearance: none;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--dsw-alias-label-secondary, #a5adb8);
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
padding: 7px 10px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.canvas-style-menu__item:hover {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
color: var(--dsw-alias-label-primary, #f4f5f7);
|
||||
}
|
||||
|
||||
.canvas-style-menu__item.is-active {
|
||||
background: var(--dsw-specific-sidebar-nav-item-active, rgba(255, 255, 255, 0.1));
|
||||
color: var(--dsw-alias-brand-primary, #5e6ad2);
|
||||
}
|
||||
|
||||
.canvas-host.is-locked .canvas-tool-btn.is-active {
|
||||
color: var(--dsw-alias-state-warning, #d4a017);
|
||||
}
|
||||
|
||||
.canvas-minimap {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
width: 168px;
|
||||
height: 118px;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.14));
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--dsw-alias-bg-layer1, #1a1d27) 88%,
|
||||
transparent
|
||||
);
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
|
||||
cursor: crosshair;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.canvas-minimap canvas {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.trash-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 6px 8px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 4px;
|
||||
background: var(--dsw-specific-selector, rgba(255, 255, 255, 0.06));
|
||||
}
|
||||
|
||||
.trash-item button {
|
||||
padding: 4px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.node-handles {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.node-handle {
|
||||
position: absolute;
|
||||
pointer-events: auto;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--dsw-alias-brand-primary, #5e6ad2);
|
||||
background: var(--dsw-alias-bg-layer-1, #1b1e28);
|
||||
color: var(--dsw-alias-brand-primary, #5e6ad2);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.node-handle:hover {
|
||||
background: var(--dsw-alias-brand-primary, #5e6ad2);
|
||||
color: var(--dsw-alias-brand-text, #fff);
|
||||
}
|
||||
|
||||
.hover-card {
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
max-width: 280px;
|
||||
min-width: 180px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.12));
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--dsw-alias-bg-layer-1, #1b1e28) 92%,
|
||||
transparent
|
||||
);
|
||||
backdrop-filter: blur(10px);
|
||||
box-shadow:
|
||||
0 1px 0 rgba(255, 255, 255, 0.05) inset,
|
||||
0 12px 36px rgba(0, 0, 0, 0.42);
|
||||
pointer-events: none;
|
||||
font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
|
||||
"Noto Sans SC", system-ui, sans-serif;
|
||||
}
|
||||
|
||||
.hover-card__title {
|
||||
font-weight: 600;
|
||||
font-size: 13.5px;
|
||||
letter-spacing: 0.01em;
|
||||
line-height: 1.35;
|
||||
margin-bottom: 6px;
|
||||
color: var(--dsw-alias-label-primary, #f4f5f7);
|
||||
}
|
||||
|
||||
.hover-card__note {
|
||||
font-size: 12px;
|
||||
line-height: 1.45;
|
||||
color: var(--dsw-alias-label-secondary, #a5adb8);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.hover-card__tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.hover-card__tag {
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
color: var(--dsw-alias-label-secondary, #a5adb8);
|
||||
}
|
||||
|
||||
.hover-card__meta {
|
||||
font-size: 11px;
|
||||
color: var(--dsw-alias-label-tertiary, #7b838f);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.edit-overlay {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
min-width: 140px;
|
||||
padding: 6px 10px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--dsw-alias-brand-primary, #5e6ad2);
|
||||
background: var(--dsw-alias-bg-layer-1, #1b1e28);
|
||||
color: var(--dsw-alias-label-primary, #f4f5f7);
|
||||
font: 600 13px "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui,
|
||||
sans-serif;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.inspector {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding: 4px 0 12px;
|
||||
}
|
||||
|
||||
.inspector__title {
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.inspector__field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
font-size: 12px;
|
||||
color: var(--dsw-alias-label-secondary, #a5adb8);
|
||||
}
|
||||
|
||||
.inspector__field input,
|
||||
.inspector__field textarea,
|
||||
.inspector__field select {
|
||||
width: 100%;
|
||||
color: var(--dsw-alias-label-primary, #f4f5f7);
|
||||
}
|
||||
|
||||
.inspector__field textarea {
|
||||
resize: vertical;
|
||||
min-height: 56px;
|
||||
}
|
||||
|
||||
.inspector__row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue