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

488 lines
9.4 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-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;
2025-06-04 17:37:03 +00:00
@media (max-width: 30rem) {
gap: 1rem;
}
2025-05-27 00:33:21 +00:00
[data-section="title"] {
display: flex;
align-items: center;
justify-content: space-between;
2025-06-04 17:37:03 +00:00
gap: 3rem;
2025-06-04 16:44:36 +00:00
& > div {
2025-06-04 17:37:03 +00:00
flex: 0 0 auto;
2025-06-04 16:44:36 +00:00
display: flex;
flex-direction: column;
gap: 0.5rem;
align-items: flex-end;
[data-section="date"] {
span {
font-size: 0.875rem;
color: var(--sl-color-text-secondary);
&[data-placeholder] {
color: var(--sl-color-text-dimmed);
}
}
}
p[data-section="status"] {
flex: 0 0 auto;
display: flex;
gap: 0.375rem;
font-size: 0.75rem;
span:first-child {
color: var(--sl-color-divider);
&[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
}
[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-06-03 19:57:00 +00:00
line-height: 1.25;
2025-05-28 20:42:30 +00:00
letter-spacing: -0.05em;
2025-06-03 19:57:00 +00:00
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
2025-06-04 17:37:03 +00:00
@media (max-width: 30rem) {
font-size: 1.25rem;
-webkit-line-clamp: 3;
}
2025-05-26 23:01:48 +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] {
2025-06-04 17:37:03 +00:00
color: var(--sl-color-text);
}
}
}
[data-section="system-prompt"] {
display: flex;
gap: 0.3125rem;
[data-section="icon"] {
flex: 0 0 auto;
color: var(--sl-color-text-dimmed);
opacity: 0.85;
svg {
display: block;
2025-05-29 00:04:58 +00:00
}
2025-05-28 22:32:38 +00:00
}
2025-06-04 17:37:03 +00:00
[data-section="content"] {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
button {
line-height: 1rem;
font-size: 0.875rem;
}
2025-05-28 22:32:38 +00:00
}
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-06-04 21:01:00 +00:00
& > [data-section="decoration"] {
2025-05-28 00:38:23 +00:00
flex: 0 0 auto;
2025-05-30 17:58:32 +00:00
display: flex;
flex-direction: column;
2025-06-04 21:01:00 +00:00
gap: 0.625rem;
align-items: center;
justify-content: flex-start;
2025-05-29 18:24:21 +00:00
2025-06-04 21:01:00 +00:00
div:first-child {
flex: 0 0 auto;
width: 18px;
opacity: 0.65;
svg {
color: var(--sl-color-text-secondary);
display: block;
}
2025-06-03 19:55:31 +00:00
}
2025-06-04 21:01:00 +00:00
div:last-child {
width: 3px;
height: 100%;
border-radius: 1px;
background-color: var(--sl-color-hairline);
2025-05-29 18:24:21 +00:00
}
2025-05-28 18:10:15 +00:00
}
2025-06-04 21:01:00 +00:00
& > [data-section="content"] {
min-width: 0;
padding: 0 0 0.375rem;
display: flex;
flex-direction: column;
gap: 1rem;
2025-05-28 22:32:38 +00:00
2025-06-04 21:01:00 +00:00
[data-part-tool-body] {
display: flex;
flex-direction: column;
gap: 0.375rem;
}
2025-05-29 18:24:21 +00:00
2025-06-04 21:01:00 +00:00
span[data-part-title] {
line-height: 18px;
font-size: 0.75rem;
2025-05-29 18:24:21 +00:00
2025-06-04 21:01:00 +00:00
b {
font-weight: 500;
}
&[data-size="md"] {
font-size: 0.875rem;
}
2025-05-29 18:24:21 +00:00
}
2025-06-04 21:01:00 +00:00
span[data-part-footer] {
align-self: flex-start;
2025-05-29 18:24:21 +00:00
font-size: 0.75rem;
2025-06-04 21:01:00 +00:00
color: var(--sl-color-text-dimmed);
}
span[data-part-model] {
2025-05-29 18:24:21 +00:00
line-height: 1.5;
}
2025-06-04 21:01:00 +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;
& > div:nth-child(3n + 1) {
width: 8px;
height: 2px;
border-radius: 1px;
background: var(--sl-color-divider);
}
& > div:nth-child(3n + 2),
& > div:nth-child(3n + 3) {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 0.75rem;
line-height: 1.5;
}
& > div:nth-child(3n + 3) {
padding-left: 0.125rem;
color: var(--sl-color-text-dimmed);
}
2025-05-29 18:24:21 +00:00
}
2025-06-04 21:01:00 +00:00
[data-part-tool-result] {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
2025-05-30 17:58:32 +00:00
2025-06-04 21:01:00 +00:00
button {
font-size: 0.75rem;
}
2025-05-30 17:58:32 +00:00
}
2025-05-29 18:24:21 +00:00
}
2025-05-26 23:01:48 +00:00
}
2025-06-03 19:55:31 +00:00
2025-06-03 22:08:46 +00:00
/* Part types */
[data-part-type="user-text"],
[data-part-type="ai-text"],
[data-part-type="ai-model"],
[data-part-type="system-text"],
[data-part-type="fallback"] {
& > [data-section="content"] {
padding-bottom: 1rem;
}
}
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-06-04 21:01:00 +00:00
.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-04 21:01:00 +00:00
.message-terminal {
2025-06-03 19:55:31 +00:00
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
2025-06-04 21:01:00 +00:00
& > [data-section="body"] {
2025-06-03 19:55:31 +00:00
border: 1px solid var(--sl-color-divider);
border-radius: 0.25rem;
2025-06-04 21:01:00 +00:00
max-width: 100%;
2025-06-03 19:55:31 +00:00
[data-section="header"] {
position: relative;
border-bottom: 1px solid var(--sl-color-divider);
width: 100%;
2025-06-04 21:01:00 +00:00
height: 1.625rem;
text-align: center;
padding: 0 0.75rem 0 3.25rem;
& > span {
max-width: min(100%, 140ch);
display: inline-block;
white-space: nowrap;
overflow: hidden;
line-height: 1.625rem;
font-size: 0.75rem;
text-overflow: ellipsis;
color: var(--sl-color-text-dimmed);
}
2025-06-03 19:55:31 +00:00
&::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;
}
}