cloudaxe-opencode/packages/web/src/components/share.module.css

435 lines
8 KiB
CSS
Raw Normal View History

2025-05-27 00:33:21 +00:00
.root {
2025-05-28 00:38:23 +00:00
padding-top: 0.5rem;
display: flex;
flex-direction: column;
gap: 2.5rem;
2025-05-27 00:33:21 +00:00
line-height: 1;
2025-06-03 19:55:31 +00:00
--term-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2060%2016'%20preserveAspectRatio%3D'xMidYMid%20meet'%3E%3Ccircle%20cx%3D'8'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'30'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'52'%20cy%3D'8'%20r%3D'8'%2F%3E%3C%2Fsvg%3E");
2025-05-27 00:33:21 +00:00
}
2025-05-28 18:10:15 +00:00
[data-element-button-text] {
cursor: pointer;
appearance: none;
background-color: transparent;
border: none;
padding: 0;
color: var(--sl-color-text-secondary);
&:hover {
color: var(--sl-color-text);
}
}
2025-05-30 17:58:32 +00:00
[data-element-button-text] {
cursor: pointer;
appearance: none;
background-color: transparent;
border: none;
padding: 0;
color: var(--sl-color-text-secondary);
&:hover {
color: var(--sl-color-text);
}
&[data-element-button-more] {
display: flex;
align-items: center;
gap: 0.125rem;
span[data-button-icon] {
line-height: 1;
opacity: 0.85;
svg {
display: block;
}
}
}
}
2025-05-28 00:38:23 +00:00
[data-element-label] {
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--sl-color-text-dimmed);
}
2025-05-26 23:01:48 +00:00
.header {
display: flex;
2025-05-27 00:33:21 +00:00
flex-direction: column;
gap: 0.75rem;
[data-section="title"] {
display: flex;
align-items: center;
justify-content: space-between;
2025-06-03 19:55:31 +00:00
gap: 1rem;
h1 {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
2025-05-27 00:33:21 +00:00
}
[data-section="row"] {
display: flex;
flex-direction: column;
gap: 0.375rem;
}
2025-05-26 23:01:48 +00:00
h1 {
2025-05-27 00:33:21 +00:00
font-size: 1.75rem;
2025-05-26 23:01:48 +00:00
font-weight: 500;
2025-05-28 20:42:30 +00:00
line-height: 1.125;
letter-spacing: -0.05em;
2025-05-26 23:01:48 +00:00
}
p {
2025-05-28 20:42:30 +00:00
flex: 0 0 auto;
2025-05-26 23:01:48 +00:00
display: flex;
2025-05-27 00:33:21 +00:00
gap: 0.375rem;
font-size: 0.75rem;
span:first-child {
2025-05-28 18:10:15 +00:00
color: var(--sl-color-divider);
2025-05-27 00:33:21 +00:00
2025-05-31 18:41:00 +00:00
&[data-status="connected"] {
color: var(--sl-color-green);
}
&[data-status="connecting"] {
color: var(--sl-color-orange);
}
&[data-status="disconnected"] {
color: var(--sl-color-divider);
}
&[data-status="reconnecting"] {
color: var(--sl-color-orange);
}
&[data-status="error"] {
color: var(--sl-color-red);
}
2025-05-27 00:33:21 +00:00
}
2025-05-28 00:38:23 +00:00
}
[data-section="stats"] {
list-style-type: none;
padding: 0;
margin: 0;
display: flex;
2025-06-03 19:55:31 +00:00
gap: 0.5rem 1rem;
flex-wrap: wrap;
2025-05-28 00:38:23 +00:00
li {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
2025-05-28 22:32:38 +00:00
span[data-placeholder] {
2025-05-31 18:41:00 +00:00
color: var(--sl-color-text-dimmed);
2025-05-28 00:38:23 +00:00
}
}
}
2025-05-28 22:32:38 +00:00
[data-section="stats"][data-section-models] {
2025-05-29 00:04:58 +00:00
li {
gap: 0.3125rem;
2025-05-28 22:32:38 +00:00
2025-05-29 00:04:58 +00:00
[data-stat-model-icon] {
flex: 0 0 auto;
color: var(--sl-color-text-dimmed);
opacity: 0.85;
svg {
display: block;
}
2025-05-28 22:32:38 +00:00
}
2025-05-29 00:04:58 +00:00
span[data-stat-model] {
color: var(sl-color-text);
}
2025-05-28 22:32:38 +00:00
}
}
2025-05-28 00:38:23 +00:00
[data-section="date"] {
span {
font-size: 0.875rem;
color: var(--sl-color-text);
&[data-placeholder] {
color: var(--sl-color-text-dimmed);
}
2025-05-27 00:33:21 +00:00
}
}
}
2025-05-28 00:38:23 +00:00
.parts {
2025-05-27 00:33:21 +00:00
display: flex;
2025-05-28 00:38:23 +00:00
flex-direction: column;
gap: 0.625rem;
2025-05-27 00:33:21 +00:00
2025-05-28 00:38:23 +00:00
[data-section="part"] {
2025-05-27 00:33:21 +00:00
display: flex;
2025-05-29 18:24:21 +00:00
gap: 0.625rem;
2025-05-28 00:38:23 +00:00
}
2025-05-26 23:01:48 +00:00
2025-05-28 00:38:23 +00:00
[data-section="decoration"] {
flex: 0 0 auto;
display: flex;
flex-direction: column;
gap: 0.625rem;
align-items: center;
justify-content: flex-start;
div:first-child {
flex: 0 0 auto;
width: 18px;
2025-06-03 19:55:31 +00:00
opacity: 0.65;
2025-05-28 00:38:23 +00:00
svg {
color: var(--sl-color-text-secondary);
display: block;
}
}
div:last-child {
width: 3px;
height: 100%;
border-radius: 1px;
background-color: var(--sl-color-hairline);
2025-05-27 00:33:21 +00:00
}
2025-05-28 00:38:23 +00:00
}
[data-section="content"] {
2025-05-29 18:24:21 +00:00
padding: 0 0 0.375rem;
2025-05-28 00:38:23 +00:00
display: flex;
flex-direction: column;
2025-05-30 17:58:32 +00:00
gap: 1rem;
[data-part-tool-body] {
display: flex;
flex-direction: column;
gap: 0.375rem;
}
2025-05-28 00:38:23 +00:00
2025-05-28 22:32:38 +00:00
span[data-part-title] {
2025-05-29 18:24:21 +00:00
line-height: 18px;
2025-05-28 18:10:15 +00:00
font-size: 0.75rem;
2025-05-29 18:24:21 +00:00
2025-06-03 19:55:31 +00:00
b {
font-weight: 500;
}
2025-05-29 18:24:21 +00:00
&[data-size="md"] {
font-size: 0.875rem;
}
2025-05-28 18:10:15 +00:00
}
2025-05-28 22:32:38 +00:00
span[data-part-footer] {
2025-05-28 20:42:30 +00:00
align-self: flex-start;
2025-05-28 00:38:23 +00:00
font-size: 0.75rem;
color: var(--sl-color-text-dimmed);
2025-05-26 23:01:48 +00:00
}
2025-05-28 22:32:38 +00:00
span[data-part-model] {
line-height: 1.5;
}
2025-05-29 18:24:21 +00:00
[data-part-tool-args] {
display: inline-grid;
align-items: center;
grid-template-columns: max-content max-content minmax(0, 1fr);
max-width: 100%;
gap: 0.25rem 0.375rem;
2025-05-31 18:41:00 +00:00
& > div:nth-child(3n + 1) {
2025-05-29 18:24:21 +00:00
width: 8px;
height: 2px;
border-radius: 1px;
background: var(--sl-color-divider);
}
2025-05-31 18:41:00 +00:00
& > div:nth-child(3n + 2),
& > div:nth-child(3n + 3) {
2025-05-29 18:24:21 +00:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 0.75rem;
line-height: 1.5;
}
2025-05-31 18:41:00 +00:00
& > div:nth-child(3n + 3) {
2025-05-29 18:24:21 +00:00
padding-left: 0.125rem;
color: var(--sl-color-text-dimmed);
}
2025-05-30 17:58:32 +00:00
}
2025-05-29 18:24:21 +00:00
2025-05-30 17:58:32 +00:00
[data-part-tool-result] {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
button {
font-size: 0.75rem;
}
2025-05-29 18:24:21 +00:00
}
2025-05-26 23:01:48 +00:00
}
2025-06-03 19:55:31 +00:00
[data-part-type="tool-edit"] {
[data-part-tool-body] {
gap: 0.5rem;
}
[data-part-title] {
display: flex;
align-items: center;
gap: 0.5rem;
b {
color: var(--sl-color-text);
}
}
}
2025-05-26 23:01:48 +00:00
}
2025-05-28 00:38:23 +00:00
[data-element-message-text] {
2025-05-28 18:10:15 +00:00
background-color: var(--sl-color-bg-surface);
padding: 0.5rem calc(0.5rem + 3px);
border-radius: 0.25rem;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 1rem;
2025-05-29 18:24:21 +00:00
&[data-size="sm"] {
pre {
font-size: 0.75rem;
}
}
&[data-color="dimmed"] {
pre {
color: var(--sl-color-text-dimmed);
}
2025-05-27 00:33:21 +00:00
}
2025-05-28 18:10:15 +00:00
2025-06-03 19:55:31 +00:00
pre {
line-height: 1.5;
font-size: 0.875rem;
white-space: pre-wrap;
overflow-wrap: anywhere;
color: var(--sl-color-text);
}
2025-05-28 18:10:15 +00:00
button {
flex: 0 0 auto;
padding: 2px 0;
font-size: 0.75rem;
}
&[data-highlight="true"] {
background-color: var(--sl-color-blue-high);
2025-05-29 18:24:21 +00:00
pre {
color: var(--sl-color-text-invert);
}
2025-05-28 18:10:15 +00:00
button {
opacity: 0.85;
color: var(--sl-color-text-invert);
&:hover {
opacity: 1;
}
}
}
&[data-expanded="true"] {
pre {
display: block;
}
}
&[data-expanded="false"] {
pre {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
}
2025-05-27 00:33:21 +00:00
}
2025-05-30 17:58:32 +00:00
2025-06-03 19:55:31 +00:00
[data-element-message-terminal] {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
[data-section="body"] {
border: 1px solid var(--sl-color-divider);
border-radius: 0.25rem;
[data-section="header"] {
position: relative;
border-bottom: 1px solid var(--sl-color-divider);
width: 100%;
height: 25px;
&::before {
content: '';
position: absolute;
pointer-events: none;
top: 8px;
left: 10px;
width: 2rem;
height: 0.5rem;
line-height: 0;
background-color: var(--sl-color-hairline);
mask-image: var(--term-icon);
mask-repeat: no-repeat;
}
}
}
[data-section="content"] {
padding: 0.5rem calc(0.5rem + 3px);
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 1rem;
pre {
line-height: 1.6;
font-size: 0.75rem;
white-space: pre-wrap;
word-break: break-word;
}
}
&[data-expanded="true"] {
pre {
display: block;
}
}
&[data-expanded="false"] {
pre {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 7;
overflow: hidden;
}
}
button {
flex: 0 0 auto;
padding-left: 1px;
font-size: 0.75rem;
}
}
.diff-code-block {
2025-05-30 17:58:32 +00:00
pre {
2025-05-30 20:42:56 +00:00
line-height: 1.25;
2025-05-30 17:58:32 +00:00
font-size: 0.75rem;
}
}