An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
.layout {
overflow-y: hidden; // https://github.com/siyuan-note/siyuan/issues/6706
&__wnd--active .layout-tab-bar .item--focus {
color: var(--b3-theme-on-background);
background-color: var(--b3-theme-primary-lightest);
box-shadow: 0 0 0 1px var(--b3-theme-primary-lighter) inset;
}
&__center {
min-width: 148px;
border-radius: var(--b3-border-radius-b);
.layout-tab-container {
background-color: var(--b3-theme-background);
}
}
// 缓动取「收尾不减速」的曲线:ease-out 会把「宽度不足两倍圆角、半径被浏览器压缩」的尾声摊到约 40% 时长里,形状变化可见
$dock-transition: 80ms cubic-bezier(.1, .4, .7, .75) 0ms;
&__dockl,
&__dockr,
&__dockb {
flex-shrink: 0;
background-color: var(--b3-theme-background);
border-radius: var(--b3-border-radius-b);
overflow: hidden;
}
// 左右停靠栏只过渡本侧的占位间距:其高度由容器决定,而顶栏隐藏时 margin-top 会随顶栏高度切换,
// 过渡整个 margin 会把面板顶部下移、高度压小
&__dockl {
transition: width $dock-transition, margin-right $dock-transition;
}
&__dockr {
transition: width $dock-transition, margin-left $dock-transition;
}
// 底部停靠栏的展开收起依赖高度,占位间距为 margin-top
&__dockb {
transition: width $dock-transition, height $dock-transition, margin-top $dock-transition;
}
&--no-transition {
transition: none !important;
}
&__dockl + .layout__resize {
margin: 0 0 0 var(--b3-layout-space-margin);
width: var(--b3-layout-space);
}
&__center + .layout__resize {
margin: 0 var(--b3-layout-space-margin) 0 0;
width: var(--b3-layout-space);
}
&:not(.layout__center) > .layout__resize {
margin: 0 0 var(--b3-layout-space-margin) 0;
height: var(--b3-layout-space);
}
&__dockl + .layout__resize:after,
&__center + .layout__resize:after,
&:not(.layout__center) > .layout__resize:after {
content: none;
}
& > .layout__dockresize {
display: none;
}
&--float {
position: fixed;
min-height: auto;
transition: transform .2s cubic-bezier(0, 0, .2, 1) 0ms, opacity .3s cubic-bezier(0, 0, .2, 1) 0ms;
&.layout__dockl {
border-radius: 0 var(--b3-border-radius-b) var(--b3-border-radius-b) 0;
overflow: hidden;
box-shadow: 8px 0 24px var(--b3-dock-shadow-color);
top: 112px;
bottom: 82px;
left: 0;
}
&.layout__dockr {
box-shadow: -8px 0 24px var(--b3-dock-shadow-color);
border-radius: var(--b3-border-radius-b) 0 0 var(--b3-border-radius-b);
overflow: hidden;
top: 112px;
bottom: 82px;
right: 0;
& > .layout__dockresize--lr {
left: 0;
}
}
&.layout__dockb {
box-shadow: 0 -8px 24px var(--b3-dock-shadow-color);
left: 0;
right: 0;
bottom: 0;
}
& > .layout__dockresize {
display: block;
cursor: row-resize;
height: 6px;
width: 100%;
position: absolute;
touch-action: none;
&--lr {
cursor: col-resize;
width: 6px;
height: 100%;
right: 0;
top: 0;
bottom: 0;
}
}
}
&__tab--active {
.b3-list--background li.b3-list-item--focus {
background-color: var(--b3-theme-primary-lightest);
}
}
&__resize {
cursor: row-resize;
margin: -3px 0;
height: 6px;
width: 100%;
position: relative;
// 需高于 #sidebarContainer 和 .protyle-breadcrumb,并低于 .protyle-toolbar
// https://github.com/siyuan-note/siyuan/issues/11759
z-index: 6;
flex-shrink: 0;
touch-action: none;
&:hover::after {
background-color: var(--b3-scroll-color);
}
&::after {
content: "";
width: 100%;
height: .5px;
display: block;
background-color: var(--b3-border-color);
top: 3px;
position: absolute;
left: 0;
transition: var(--b3-transition);
}
&--lr {
cursor: col-resize;
width: 6px;
margin: 0 -6px 0 0;
height: auto;
&::after {
top: 0;
width: .5px;
left: 0;
height: 100%;
}
}
}
&__empty {
display: flex;
height: 100%;
justify-content: center;
flex-direction: column;
width: 100%;
background-color: var(--b3-theme-background);
align-items: center;
overflow: auto;
.b3-list-item {
white-space: nowrap;
font-size: 17px;
color: var(--b3-theme-on-surface);
margin-top: 8px !important;
&:hover {
color: var(--b3-theme-on-background);
}
}
.b3-list-item__graphic {
margin-right: 8px;
height: 18px;
width: 18px;
}
}
&-tab {
&-container {
display: flex;
position: relative;
user-select: none;
&__drag {
background-color: var(--b3-theme-primary-lightest);
position: absolute;
z-index: 100;
transition: var(--b3-transition);
}
}
&-bars--drag > .layout-tab-bar {
background-color: var(--b3-theme-primary-lightest);
}
&-bar {
list-style: none;
align-items: center;
overflow: auto;
position: relative;
background-color: var(--b3-theme-background);
border-bottom: 1px solid var(--b3-theme-background-light);
padding: 0 4px;
&::-webkit-scrollbar {
display: none;
}
&--readonly {
flex-shrink: 0;
min-width: 71px;
margin-left: var(--b3-ui-tab-actions-margin-left, -8px);
}
.item {
line-height: 22px;
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
transition: var(--b3-transition);
min-height: var(--b3-ui-tab-min-height, 29px);
position: relative;
max-width: 186px;
flex-shrink: 0;
overflow: hidden;
color: var(--b3-theme-on-surface);
margin: var(--b3-ui-tab-margin, 6px 4px);
border-radius: var(--b3-border-radius);
&[data-clone="true"] {
opacity: .38;
pointer-events: none;
}
&--full {
max-width: none;
flex: 1;
}
&--document-drop {
cursor: grabbing;
flex: 0 0 200px;
max-width: 200px;
transition: none;
width: 200px;
z-index: 3;
> .item__document-drop {
align-items: stretch;
background-color: var(--b3-theme-background);
border-radius: var(--b3-border-radius);
box-shadow: 0 0 0 1px var(--b3-theme-primary-lighter) inset, var(--b3-point-shadow);
direction: ltr;
display: flex;
inset: 0;
overflow: hidden;
position: absolute;
.item__document-drop-option {
align-items: center;
direction: initial;
display: flex;
flex: 1;
font-size: 12px;
justify-content: center;
min-width: 0;
overflow: hidden;
padding: 0 8px;
text-overflow: ellipsis;
white-space: nowrap;
&--active {
background-color: var(--b3-theme-primary-lightest);
color: var(--b3-theme-primary);
}
}
}
}
&:hover:not(.item--focus):not(.item--readonly) {
background-color: var(--b3-theme-surface);
color: var(--b3-theme-on-background);
}
&:hover,
&.item--focus {
.item__close svg {
opacity: .68;
}
}
&--readonly {
cursor: default;
max-width: none;
}
&--pin {
flex: none;
min-width: 34px;
.item__text {
max-width: 148px;
font-style: normal;
color: var(--b3-theme-on-background);
}
.item__graphic,
.item__icon {
padding: 0 8px;
}
.item__close {
display: none;
}
}
&--focus {
background-color: var(--b3-theme-surface-light);
box-shadow: 0 0 0 1px var(--b3-border-color) inset;
}
&--unupdate:not(.item--pin) {
font-style: italic;
color: var(--b3-theme-on-surface);
}
&__icon {
padding: var(--b3-ui-tab-icon-padding, 4px 0 4px 8px);
line-height: 22px;
flex-shrink: 0;
font-family: var(--b3-font-family-emoji);
font-variant-emoji: emoji;
max-height: 21px;
& > img,
& > svg {
float: left;
height: 18px;
width: 18px;
margin-top: 1px;
}
}
&__graphic {
padding-left: 8px;
height: 16px;
width: 16px;
flex-shrink: 0;
line-height: 1em;
font-variant-emoji: emoji;
}
&__text {
text-align: center;
transition: var(--b3-transition);
padding: var(--b3-ui-tab-text-padding, 0 8px);
white-space: nowrap;
overflow: hidden;
-webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0) 0, #000 12px);
}
&__close {
padding: var(--b3-ui-tab-close-padding, 7px 6px 6px 0);
display: flex;
align-items: center;
svg {
border-radius: var(--b3-border-radius-b);
height: 12px;
width: 12px;
color: var(--b3-theme-on-surface);
transition: var(--b3-transition);
padding: 2px;
opacity: 0;
}
&:hover svg {
color: var(--b3-theme-on-background);
background-color: var(--b3-theme-background-light);
}
}
}
}
}
&__wnd--left,
&__wnd--center,
&__wnd--right {
& > [data-type="wnd"] > .fn__flex > .layout-tab-bar {
background-color: transparent;
border-bottom-color: transparent;
}
}
}
.dock {
display: flex;
user-select: none;
box-sizing: border-box;
-webkit-user-select: none;
width: var(--b3-ui-dock-width, 42px);
flex-direction: column;
height: 100%;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior-y: contain;
scrollbar-width: none;
&--float {
position: fixed;
left: 0;
height: auto;
&#dockRight {
left: auto;
right: 0;
}
}
&--closing {
pointer-events: none;
}
// 背景独立于可滚动的图标栏,内圆角可以伸入编辑区而不被滚动容器裁剪。
&__backdrop {
position: fixed;
left: 0;
// 隐藏顶栏时窗口按钮仍位于背景之上,浮动面板和全屏内容也可覆盖背景。
z-index: 6;
pointer-events: none;
width: calc(var(--b3-ui-dock-width, 42px) + var(--b3-border-radius-b));
background-color: var(--b3-body-background);
background-image: var(--b3-window-background-image);
background-size: 100vw 100vh;
background-position: left var(--b3-dock-background-y);
background-repeat: no-repeat;
mask-image: linear-gradient(#000, #000),
radial-gradient(circle at 100% 100%, transparent calc(var(--b3-border-radius-b) - .5px), #000 var(--b3-border-radius-b)),
radial-gradient(circle at 100% 0, transparent calc(var(--b3-border-radius-b) - .5px), #000 var(--b3-border-radius-b));
mask-size: calc(100% - var(--b3-border-radius-b)) 100%,
var(--b3-border-radius-b) var(--b3-border-radius-b), var(--b3-border-radius-b) var(--b3-border-radius-b);
mask-position: left top, right top, right bottom;
mask-repeat: no-repeat;
&--right {
left: auto;
right: 0;
background-position-x: right;
mask-image: linear-gradient(#000, #000),
radial-gradient(circle at 0 100%, transparent calc(var(--b3-border-radius-b) - .5px), #000 var(--b3-border-radius-b)),
radial-gradient(circle at 0 0, transparent calc(var(--b3-border-radius-b) - .5px), #000 var(--b3-border-radius-b));
mask-position: right top, left top, left bottom;
}
}
&::-webkit-scrollbar {
display: none;
}
&__split {
height: var(--b3-ui-dock-split-height, 17px);
position: relative;
&::after {
height: 1px;
width: 22px;
background: var(--b3-theme-on-surface-lighter);
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: var(--b3-border-radius);
}
}
svg {
height: 16px;
width: 17.5px;
}
&__item {
padding: var(--b3-ui-dock-padding, 5px);
color: var(--b3-theme-on-surface-light);
display: flex;
border-radius: var(--b3-border-radius);
margin: var(--b3-ui-dock-margin, 7px);
cursor: pointer;
touch-action: none;
&:hover:not(.dock__item--activefocus),
&--active {
background-color: var(--b3-toolbar-hover);
}
&--activefocus {
color: var(--b3-theme-on-primary);
background-color: var(--b3-theme-primary);
}
}
}