完善功能。发布 1.0.0 版本。

This commit is contained in:
wux_labs
2025-02-21 23:26:20 +08:00
parent 70b61d49b3
commit 01db2bb19d
122 changed files with 10997 additions and 328 deletions
+3
View File
@@ -0,0 +1,3 @@
import './mixins.less';
import './variables.less';
import './uaieditor.less';
+127
View File
@@ -0,0 +1,127 @@
.uai-scrollbar() {
overflow: auto;
&::-webkit-scrollbar {
width: var(--uai-scrollbar-size) !important;
height: var(--uai-scrollbar-size) !important;
position: absolute;
}
&::-webkit-scrollbar-track {
width: var(--uai-scrollbar-size) !important;
background: transparent;
}
&:hover::-webkit-scrollbar-thumb {
background-color: var(--uai-scrollbar-thumb-color);
background-clip: padding-box;
border-radius: 1em;
transition: background-color 0.3s;
cursor: pointer;
}
&::-webkit-scrollbar-thumb:hover {
background-color: var(--uai-scrollbar-thumb-hover-color);
}
}
.uai-page-divider() {
display: block;
white-space: nowrap;
letter-spacing: 100vw;
overflow: hidden;
width: 100%;
user-select: none;
border: none;
height: unset;
&::before {
display: block;
content: '\2000';
overflow: hidden;
text-decoration-line: line-through;
text-decoration-style: solid;
text-decoration-thickness: 0.1em;
}
&::after {
overflow: hidden;
}
&[data-type='signle'] {
&::before {
text-decoration-style: solid;
}
}
&[data-type='signle-bold'] {
&::before {
text-decoration-style: solid;
text-decoration-thickness: 0.3em;
}
}
&[data-type='double'] {
&::before {
text-decoration-style: double;
}
}
&[data-type='dotted'] {
&::before {
text-decoration-style: dotted;
}
}
&[data-type='dashed'] {
&::before {
text-decoration-style: dashed;
}
}
&[data-type='dashed-double'] {
&::before {
text-decoration-style: dashed;
text-decoration-thickness: 0.1em;
margin-top: 0.5em;
line-height: 0.4em;
}
&::after {
display: block;
content: '\2000';
text-decoration-line: line-through;
text-decoration-thickness: 0.1em;
text-decoration-style: dashed;
line-height: 0.4em;
margin-bottom: 0.5em;
}
}
&[data-type='double-bold-top'] {
&::before {
text-decoration-style: solid;
text-decoration-thickness: 0.3em;
margin-top: 0.5em;
line-height: 0.4em;
}
&::after {
display: block;
content: '\2000';
text-decoration-line: line-through;
text-decoration-thickness: 0.05em;
text-decoration-style: solid;
line-height: 0.4em;
margin-bottom: 0.5em;
}
}
&[data-type='double-bold-bottom'] {
&::before {
text-decoration-style: solid;
text-decoration-thickness: 0.05em;
margin-top: 0.5em;
line-height: 0.4em;
}
&::after {
display: block;
content: '\2000';
text-decoration-line: line-through;
text-decoration-thickness: 0.3em;
text-decoration-style: solid;
line-height: 0.4em;
margin-bottom: 0.5em;
}
}
&[data-type='wavy'] {
&::before {
text-decoration-style: wavy;
text-decoration-thickness: 0.12em;
}
}
}
File diff suppressed because it is too large Load Diff
+102
View File
@@ -0,0 +1,102 @@
:root {
// 主题色
--uai-primary-color: #3480f9;
--uai-color-white: #fff;
--uai-color-black: #000;
// 警示颜色
--uai-warning-color: #f6913e;
--uai-error-color: #ef3f35;
// 背景颜色
--uai-container-background: #f4f5f7;
--uai-button-hover-background: #f1f3f5;
// 文本选中时的背景颜色
--uai-text-selection-background: #94cfff;
// 字体相关
--uai-font-family: helvetica neue, helvetica, pingfang sc, hiragino sans gb,
microsoft yahei, simsun, sans-serif;
--uai-font-size: 14px;
--uai-font-size-small: 12px;
--uai-text-color: rgb(51, 54, 57);
--uai-text-color-light: rgba(0, 0, 0, 0.5);
--uai-text-color-disabled: #a7abac;
// 边框
--uai-shadow: 0 3px 14px 2px rgba(0, 0, 0, 0.03),
0 8px 10px 1px rgba(0, 0, 0, 4%), 0 5px 5px -3px rgba(0, 0, 0, 8%);
--uai-border-color: rgba(0, 0, 0, 0.08);
--uai-border-color-dark: #ddd;
--uai-border-color-light: rgba(0, 0, 0, 0.05);
// 圆角
--uai-radius: 5px;
--uai-radius-medium: 5px;
// 提示
--uai-menu-tips-bg-color: #fff;
--uai-menu-tips-text-color: #000;
// 弹出层
--uai-popup-content-padding: 12px;
--uai-popup-max-height: max(60vh, 180px);
--uai-tooltip-content-padding: 6px 10px;
--uai-mask-color: transparent;
// 编辑器
--uai-content-placeholder-color: #999;
--uai-content-text-color: #333;
--uai-content-node-border: #e7e7e7;
--uai-content-node-radius: var(--uai-radius);
--uai-content-node-bottom: 0.75em;
--uai-content-node-selected-background: #f5f8fc;
--uai-content-table-border-color: #333;
--uai-content-table-thead-background: #f1f3f5;
--uai-content-table-selected-background: rgba(200, 200, 255, 0.4);
--uai-content-line-number-color: #e7e8ea;
--uai-content-search-result-background: #fefc7ef2;
--uai-content-search-result-current-background: #0dff00c3;
--uai-content-invisible-break-color: rgb(78, 139, 252);
--uai-content-code-color: var(--uai-primary-color);
--uai-content-code-background: #f1f3f5;
--uai-content-code-family: Consolas, Monaco, Andale Mono, Ubuntu Mono,
monospace;
// 滚动条
--uai-scrollbar-size: 10px;
--uai-scrollbar-thumb-color: rgba(0, 0, 0, 0.2);
--uai-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.35);
--uai-app-bubble-sent-background-color: #a5f5a5;
--uai-app-bubble-reveived-background-color: #a5f5f5;
}
[theme-mode='dark'] {
// 主题色
--uai-color-white: #17171a;
--uai-color-black: #fff;
// 警示颜色
--uai-warning-color: rgb(207, 110, 45);
--uai-error-color: rgb(198, 71, 81);
// 背景颜色
--uai-container-background: #2a2b2d;
--uai-button-hover-background: #2c2c2c;
// 字体相关
--uai-text-color: #ddd;
--uai-text-color-light: #bbb;
--uai-text-color-disabled: #999;
// 边框
--uai-border-color: rgba(255, 255, 255, 0.15);
--uai-border-color-dark: rgba(255, 255, 255, 0.2);
--uai-border-color-light: rgba(255, 255, 255, 0.08);
// 编辑器
--uai-content-text-color: #000;
// 滚动条
--uai-scrollbar-thumb-color: rgba(255, 255, 255, 0.3);
--uai-scrollbar-thumb-hover-color: rgba(255, 255, 255, 0.45);
}