@qilin-agent/client-ui-primitives 0.0.0-stage → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.i18n.yaml +61 -0
- package/README.md +181 -2
- package/README.zh.md +182 -0
- package/lib/Button.module.css +79 -0
- package/lib/Checkbox.module.css +28 -0
- package/lib/ConnectionIndicator.module.css +123 -0
- package/lib/DiffBlock.module.css +109 -0
- package/lib/DisclosureRow.module.css +84 -0
- package/lib/FileTypeIcon.module.css +50 -0
- package/lib/HoverCard.module.css +70 -0
- package/lib/ImageLightbox.module.css +48 -0
- package/lib/ImagePreview.module.css +24 -0
- package/lib/Input.module.css +38 -0
- package/lib/JsonTree.module.css +345 -0
- package/lib/Menu.module.css +274 -0
- package/lib/MenuGroup.module.css +37 -0
- package/lib/MenuSurface.module.css +49 -0
- package/lib/Modal.module.css +103 -0
- package/lib/OnboardingSurface.module.css +29 -0
- package/lib/PathLabel.module.css +28 -0
- package/lib/Pill.module.css +27 -0
- package/lib/ReadBlock.module.css +111 -0
- package/lib/RiskConfirmation.module.css +73 -0
- package/lib/SearchBlock.module.css +112 -0
- package/lib/SegmentedControl.module.css +76 -0
- package/lib/ShortcutKeys.module.css +33 -0
- package/lib/StateDot.module.css +73 -0
- package/lib/Switch.module.css +50 -0
- package/lib/Tag.module.css +57 -0
- package/lib/TerminalBlock.module.css +205 -0
- package/lib/TextShimmer.module.css +88 -0
- package/lib/Toast.module.css +76 -0
- package/lib/Tooltip.module.css +52 -0
- package/lib/WebBlock.module.css +141 -0
- package/lib/index.js +10096 -0
- package/lib/markdown/CodeBlock.module.css +130 -0
- package/lib/markdown/JsonBlock.module.css +32 -0
- package/lib/markdown/MarkdownText.module.css +485 -0
- package/lib/markdown/mermaid.module.css +49 -0
- package/lib/types/Button.d.ts +18 -0
- package/lib/types/Checkbox.d.ts +20 -0
- package/lib/types/CodeFileIcon.d.ts +12 -0
- package/lib/types/ConnectionIndicator.d.ts +26 -0
- package/lib/types/DiffBlock.d.ts +52 -0
- package/lib/types/DisclosureRow.d.ts +36 -0
- package/lib/types/FileTypeIcon.d.ts +43 -0
- package/lib/types/FoldToggle.d.ts +20 -0
- package/lib/types/HoverCard.d.ts +32 -0
- package/lib/types/ImageLightbox.d.ts +27 -0
- package/lib/types/ImagePreview.d.ts +12 -0
- package/lib/types/Input.d.ts +12 -0
- package/lib/types/JsonTree.d.ts +59 -0
- package/lib/types/LinkIcon.d.ts +49 -0
- package/lib/types/Menu.d.ts +133 -0
- package/lib/types/MenuGroup.d.ts +22 -0
- package/lib/types/MenuSurface.d.ts +16 -0
- package/lib/types/Modal.d.ts +44 -0
- package/lib/types/OnboardingSurface.d.ts +11 -0
- package/lib/types/PathLabel.d.ts +13 -0
- package/lib/types/Pill.d.ts +13 -0
- package/lib/types/QilinSeal.d.ts +18 -0
- package/lib/types/ReadBlock.d.ts +47 -0
- package/lib/types/ReferenceIcon.d.ts +16 -0
- package/lib/types/RiskConfirmation.d.ts +20 -0
- package/lib/types/SearchBlock.d.ts +72 -0
- package/lib/types/SegmentedControl.d.ts +35 -0
- package/lib/types/ShortcutKeys.d.ts +11 -0
- package/lib/types/SiteGlyph.d.ts +25 -0
- package/lib/types/StateDot.d.ts +18 -0
- package/lib/types/Switch.d.ts +20 -0
- package/lib/types/Tag.d.ts +32 -0
- package/lib/types/TerminalBlock.d.ts +66 -0
- package/lib/types/TextShimmer.d.ts +22 -0
- package/lib/types/Toast.d.ts +36 -0
- package/lib/types/Tooltip.d.ts +45 -0
- package/lib/types/WebBlock.d.ts +61 -0
- package/lib/types/ansi.d.ts +17 -0
- package/lib/types/clipboard.d.ts +9 -0
- package/lib/types/code-file-icon-artwork.d.ts +54 -0
- package/lib/types/code-file-types.d.ts +30 -0
- package/lib/types/darwin-desktop.d.ts +9 -0
- package/lib/types/file-size.d.ts +17 -0
- package/lib/types/focus.d.ts +9 -0
- package/lib/types/head-tail-cap.d.ts +23 -0
- package/lib/types/icons/index.d.ts +211 -0
- package/lib/types/icons/props.d.ts +9 -0
- package/lib/types/index.d.ts +84 -0
- package/lib/types/input-modality.d.ts +19 -0
- package/lib/types/keyboard-composition.d.ts +11 -0
- package/lib/types/markdown/CodeBlock.d.ts +30 -0
- package/lib/types/markdown/JsonBlock.d.ts +8 -0
- package/lib/types/markdown/MarkdownDelegate.d.ts +46 -0
- package/lib/types/markdown/MarkdownText.d.ts +54 -0
- package/lib/types/markdown/cjkFriendlyStrong.d.ts +9 -0
- package/lib/types/markdown/file-link.d.ts +13 -0
- package/lib/types/markdown/highlight.d.ts +142 -0
- package/lib/types/markdown/incremental.d.ts +80 -0
- package/lib/types/markdown/katex.d.ts +27 -0
- package/lib/types/markdown/local-image-syntax.d.ts +10 -0
- package/lib/types/markdown/mathCompatibility.d.ts +11 -0
- package/lib/types/markdown/mermaid.d.ts +39 -0
- package/lib/types/markdown/parse.d.ts +25 -0
- package/lib/types/markdown/plain-text.d.ts +22 -0
- package/lib/types/markdown/render.d.ts +158 -0
- package/lib/types/markdown/useViewportHighlighting.d.ts +11 -0
- package/lib/types/overlay-top-margin.d.ts +8 -0
- package/lib/types/pointer-grace.d.ts +22 -0
- package/lib/types/rank-by-name.d.ts +22 -0
- package/lib/types/relative-time.d.ts +23 -0
- package/lib/types/seal-geometry.d.ts +27 -0
- package/lib/types/seal-glyphs.d.ts +9 -0
- package/lib/types/use-copy-feedback.d.ts +14 -0
- package/lib/types/useAnchoredMaxHeight.d.ts +11 -0
- package/lib/types/useAnchoredPosition.d.ts +34 -0
- package/lib/types/useDismissOnOutsidePointer.d.ts +11 -0
- package/lib/types/useModalLayer.d.ts +27 -0
- package/lib/types/user-text.d.ts +37 -0
- package/lib/user-text.module.css +43 -0
- package/package.json +62 -3
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* Visual baseline: deepsuite `@deepseek/md` code-block.css. Highlight colors
|
|
2
|
+
stay on the existing shiki `--shiki-*` sheet (not Prism highlight.css). */
|
|
3
|
+
|
|
4
|
+
.block {
|
|
5
|
+
--dsl-code-block-banner-background-color: var(--qilin-alias-markdown-code-block-banner);
|
|
6
|
+
--dsl-code-block-border-radius: 12px;
|
|
7
|
+
/* Local 11/18 instead of the shared --qilin-font-xs-13: the banner scales
|
|
8
|
+
with the markdown 0.875 ladder without shrinking every other xs-13 use. */
|
|
9
|
+
--dsl-code-block-banner-font: 11px/18px var(--qilin-font-family);
|
|
10
|
+
--dsl-code-block-content-font: var(--qilin-font-markdown-code-block);
|
|
11
|
+
--dsl-code-block-background: var(--qilin-alias-markdown-code-block);
|
|
12
|
+
|
|
13
|
+
position: relative;
|
|
14
|
+
margin: 16px 0;
|
|
15
|
+
color: var(--qilin-alias-label-primary);
|
|
16
|
+
background: var(--dsl-code-block-background);
|
|
17
|
+
border-radius: var(--dsl-code-block-border-radius);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.block:not(:last-child) {
|
|
21
|
+
margin-bottom: 11px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.bannerWrap {
|
|
25
|
+
position: sticky;
|
|
26
|
+
top: 0;
|
|
27
|
+
z-index: 6;
|
|
28
|
+
background-color: var(--qilin-alias-bg-base);
|
|
29
|
+
border-top-left-radius: var(--dsl-code-block-border-radius);
|
|
30
|
+
border-top-right-radius: var(--dsl-code-block-border-radius);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.banner {
|
|
34
|
+
background: var(--dsl-code-block-banner-background-color);
|
|
35
|
+
padding: 9px 14px;
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 12px;
|
|
40
|
+
font: var(--dsl-code-block-banner-font);
|
|
41
|
+
border-top-left-radius: var(--dsl-code-block-border-radius);
|
|
42
|
+
border-top-right-radius: var(--dsl-code-block-border-radius);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.infostring {
|
|
46
|
+
color: var(--qilin-alias-label-primary);
|
|
47
|
+
font-family: var(--ds-font-family-code);
|
|
48
|
+
font-size: 11px;
|
|
49
|
+
line-height: 18px;
|
|
50
|
+
min-width: 0;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
text-overflow: ellipsis;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.action {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
flex-shrink: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.copyButton {
|
|
63
|
+
background-color: rgb(255 255 255 / 0);
|
|
64
|
+
border: none;
|
|
65
|
+
padding: 0;
|
|
66
|
+
margin: 0;
|
|
67
|
+
color: inherit;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
font: inherit;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Consumers may turn the stable content node into a viewport without changing
|
|
73
|
+
the default CodeBlock layout. */
|
|
74
|
+
.content {
|
|
75
|
+
display: contents;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.block :where(pre) {
|
|
79
|
+
font: var(--dsl-code-block-content-font);
|
|
80
|
+
padding: 16px;
|
|
81
|
+
margin: 0 !important;
|
|
82
|
+
overflow-x: auto;
|
|
83
|
+
white-space: pre-wrap;
|
|
84
|
+
word-break: break-all;
|
|
85
|
+
background: var(--dsl-code-block-background);
|
|
86
|
+
/* Bottom radii live on <pre>: overflow:hidden on .block would kill the
|
|
87
|
+
sticky banner, and this opaque fill otherwise squares off the wrapper. */
|
|
88
|
+
border-bottom-left-radius: var(--dsl-code-block-border-radius);
|
|
89
|
+
border-bottom-right-radius: var(--dsl-code-block-border-radius);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Shiki inlines its theme background var; route it to the repo token. */
|
|
93
|
+
.block :where(pre.shiki) {
|
|
94
|
+
background: var(--dsl-code-block-background) !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.block :where(pre) code {
|
|
98
|
+
font: inherit;
|
|
99
|
+
background: none;
|
|
100
|
+
padding: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.plain {
|
|
104
|
+
color: var(--qilin-alias-label-primary);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.numbered :where(pre) code {
|
|
108
|
+
display: block;
|
|
109
|
+
counter-reset: source-line;
|
|
110
|
+
white-space: normal;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.numbered :where(pre) code > :global(.line) {
|
|
114
|
+
position: relative;
|
|
115
|
+
display: block;
|
|
116
|
+
min-height: 1lh;
|
|
117
|
+
padding-inline-start: calc(var(--dsl-code-block-line-number-width) + 12px);
|
|
118
|
+
counter-increment: source-line;
|
|
119
|
+
white-space: var(--dsl-code-block-line-white-space, pre-wrap);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.numbered :where(pre) code > :global(.line)::before {
|
|
123
|
+
position: absolute;
|
|
124
|
+
inset-inline-start: 0;
|
|
125
|
+
width: var(--dsl-code-block-line-number-width);
|
|
126
|
+
color: var(--qilin-alias-label-tertiary);
|
|
127
|
+
text-align: end;
|
|
128
|
+
content: counter(source-line);
|
|
129
|
+
user-select: none;
|
|
130
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
margin: 4px 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.toggle {
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
line-height: 18px;
|
|
8
|
+
color: var(--qilin-alias-label-secondary);
|
|
9
|
+
padding: 2px 6px;
|
|
10
|
+
border: none;
|
|
11
|
+
background: transparent;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
border-radius: 6px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.toggle:hover {
|
|
17
|
+
background: var(--qilin-alias-interactive-bg-hover);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.body {
|
|
21
|
+
margin: 4px 0 0;
|
|
22
|
+
padding: 8px;
|
|
23
|
+
max-height: 200px;
|
|
24
|
+
overflow: auto;
|
|
25
|
+
background: var(--qilin-alias-markdown-code-block);
|
|
26
|
+
border: 0.5px solid var(--qilin-alias-border-l1);
|
|
27
|
+
border-radius: 6px;
|
|
28
|
+
font-family: var(--ds-font-family-code);
|
|
29
|
+
font-size: 11px;
|
|
30
|
+
line-height: 16px;
|
|
31
|
+
color: var(--qilin-alias-label-primary);
|
|
32
|
+
}
|
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
/* Visual baseline: deepsuite `@deepseek/md` markdown.css, adapted to CSS
|
|
2
|
+
Modules. Cite pills and header anchors are absent (no matching DOM).
|
|
3
|
+
Token names match that sheet. */
|
|
4
|
+
|
|
5
|
+
.markdown {
|
|
6
|
+
min-width: 0;
|
|
7
|
+
overflow-wrap: anywhere;
|
|
8
|
+
font: var(--qilin-font-markdown-base);
|
|
9
|
+
color: var(--qilin-alias-label-primary);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.markdown strong {
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.markdown h1 {
|
|
17
|
+
font: var(--qilin-font-markdown-h1);
|
|
18
|
+
margin: 32px 0 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.markdown h2 {
|
|
22
|
+
font: var(--qilin-font-markdown-h2);
|
|
23
|
+
margin: 32px 0 16px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.markdown h3 {
|
|
27
|
+
font: var(--qilin-font-markdown-h3);
|
|
28
|
+
margin: 32px 0 16px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.markdown h4 {
|
|
32
|
+
font: var(--qilin-font-markdown-h4);
|
|
33
|
+
margin: 16px 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.markdown :where(h5, h6) {
|
|
37
|
+
font: var(--qilin-font-markdown-base-strong);
|
|
38
|
+
margin: 16px 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.markdown :where(h1, h2, h3, h4, h5, h6) strong {
|
|
42
|
+
font-weight: inherit;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.markdown p {
|
|
46
|
+
margin: 16px 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Tighten h4–h6 against a following list (design: 8px gap). */
|
|
50
|
+
.markdown :where(h4, h5, h6) + :where(ul, ol) {
|
|
51
|
+
margin-top: 8px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.markdown :where(h4, h5, h6):has(+ :where(ul, ol)) {
|
|
55
|
+
margin-bottom: 8px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.markdown a,
|
|
59
|
+
.markdown .fileLink {
|
|
60
|
+
/* deepsuite markdown.css uses brand-text (blue in newDesign); this sheet
|
|
61
|
+
keeps design-platform brand-text as near-black, so links use the
|
|
62
|
+
dedicated link alias instead. */
|
|
63
|
+
color: var(--qilin-alias-link);
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
transition: box-shadow var(--ds-transition-duration) var(--ds-ease-in-out);
|
|
66
|
+
position: relative;
|
|
67
|
+
text-decoration: none;
|
|
68
|
+
/* Transparent hit-area padding; literal zero-alpha only (no painted color). */
|
|
69
|
+
border-left: 3px solid rgb(255 255 255 / 0);
|
|
70
|
+
border-right: 3px solid rgb(255 255 255 / 0);
|
|
71
|
+
border-top: 2px solid rgb(255 255 255 / 0);
|
|
72
|
+
border-bottom: 2px solid rgb(255 255 255 / 0);
|
|
73
|
+
margin-left: -3px;
|
|
74
|
+
margin-right: -3px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.markdown a:hover,
|
|
78
|
+
.markdown a:focus {
|
|
79
|
+
outline: none;
|
|
80
|
+
text-decoration: underline dotted var(--qilin-alias-link);
|
|
81
|
+
text-underline-offset: 3px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.markdown a:focus-visible,
|
|
85
|
+
.fileMention:focus-visible {
|
|
86
|
+
box-shadow: 0 0 0 2px var(--qilin-focus-ring-color, var(--qilin-alias-state-business-primary));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Leading link-category glyph inside anchors, file mentions, and
|
|
90
|
+
URL-promoted inline code: outline glyphs ride the link's currentColor.
|
|
91
|
+
1.1em keeps the glyph proportional to the surrounding text's size (it
|
|
92
|
+
shrinks with the code chip's 0.875em); the small negative offset seats
|
|
93
|
+
its optical center on the cap height. */
|
|
94
|
+
.linkIcon {
|
|
95
|
+
flex: none;
|
|
96
|
+
width: 1.1em;
|
|
97
|
+
height: 1.1em;
|
|
98
|
+
vertical-align: -0.25em;
|
|
99
|
+
margin-right: 5px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.markdown :where(ul, ol) {
|
|
103
|
+
margin: 16px 0;
|
|
104
|
+
padding-left: 18px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.markdown li:not(:first-child) {
|
|
108
|
+
margin-top: 6px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.markdown li > :where(ul, ol) {
|
|
112
|
+
margin-top: 4px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.markdown li::marker {
|
|
116
|
+
line-height: 24px;
|
|
117
|
+
color: var(--qilin-alias-label-secondary);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Nested ol under ul/ol: markers inside (models sometimes emit this shape). */
|
|
121
|
+
.markdown :where(ul, ol) ol {
|
|
122
|
+
list-style-position: inside;
|
|
123
|
+
padding-left: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.markdown :where(ul, ol) ol li p {
|
|
127
|
+
display: inline;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.markdown li > p {
|
|
131
|
+
margin: 8px 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.markdown li > *:first-child {
|
|
135
|
+
margin-top: 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Keep list-nested code-block vertical margins (design: +4px vs other last children). */
|
|
139
|
+
.markdown li > *:last-child:not(:global(.md-code-block)) {
|
|
140
|
+
margin-bottom: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.markdown hr {
|
|
144
|
+
display: block;
|
|
145
|
+
border: none;
|
|
146
|
+
height: 0.5px;
|
|
147
|
+
margin: 32px 0;
|
|
148
|
+
background: var(--qilin-alias-border-l2);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.markdown blockquote {
|
|
152
|
+
border-left: 2px solid var(--qilin-alias-label-caption);
|
|
153
|
+
margin: 16px 0 0;
|
|
154
|
+
padding-left: 14px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.markdown pre {
|
|
158
|
+
margin: 16px 0;
|
|
159
|
+
font-family: var(--ds-font-family-code);
|
|
160
|
+
overflow: auto;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.markdown :not(pre) > code {
|
|
164
|
+
display: inline-flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
box-sizing: border-box;
|
|
167
|
+
font: var(--qilin-font-markdown-code);
|
|
168
|
+
font-family: var(--ds-font-family-code);
|
|
169
|
+
font-size: 0.875em !important;
|
|
170
|
+
background-color: var(--qilin-alias-markdown-inline-code);
|
|
171
|
+
border: 0.5px solid var(--qilin-alias-border-l1);
|
|
172
|
+
border-radius: 6px;
|
|
173
|
+
padding: 0 5px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.markdown :where(h1, h2, h3, h4, h5, h6) code {
|
|
177
|
+
font: inherit;
|
|
178
|
+
font-family: var(--ds-font-family-code);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.markdown :global(.katex-display) {
|
|
182
|
+
max-width: 100%;
|
|
183
|
+
overflow-x: auto;
|
|
184
|
+
overflow-y: hidden;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.markdown input[type='checkbox'] {
|
|
188
|
+
margin: 0 8px 0 0;
|
|
189
|
+
accent-color: var(--qilin-alias-label-secondary);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.tableScroll {
|
|
193
|
+
max-width: 100%;
|
|
194
|
+
overflow-x: auto;
|
|
195
|
+
overscroll-behavior-x: contain;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Wide tables reveal their horizontal bar on hover (or keyboard focus)
|
|
199
|
+
instead of keeping it painted. Chromium never repaints state-conditioned
|
|
200
|
+
scrollbar STYLES (neither hover-conditioned `::-webkit-scrollbar*` rules
|
|
201
|
+
nor a :hover `scrollbar-color` change reaches the painted bar), so the
|
|
202
|
+
toggle is `overflow-x` itself — a layout change repaints reliably. The
|
|
203
|
+
resting padding matches the themed bar's height on the WebKit scrollbar
|
|
204
|
+
path. There, `scroll` reserves that height even when the table fits.
|
|
205
|
+
Other engines and overlay scrollbars may reserve a different height.
|
|
206
|
+
Wheel and trackpad scrolling need the pointer over the table, which is
|
|
207
|
+
already the hover that re-enables scrolling. */
|
|
208
|
+
.tableScroll:global(.md-table-wide) {
|
|
209
|
+
overflow-x: hidden;
|
|
210
|
+
padding-bottom: var(--qilin-scrollbar-width, 8px);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.tableScroll:global(.md-table-wide):hover,
|
|
214
|
+
.tableScroll:global(.md-table-wide):focus-visible {
|
|
215
|
+
overflow-x: scroll;
|
|
216
|
+
padding-bottom: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Chromium keyboard-focuses scrollable containers by default; the ring uses
|
|
220
|
+
the sheet's link focus color. */
|
|
221
|
+
.tableScroll:focus-visible {
|
|
222
|
+
outline: none;
|
|
223
|
+
box-shadow: 0 0 0 2px var(--qilin-focus-ring-color, var(--qilin-alias-state-business-primary));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Many-column tables (the renderer's `md-table-wide` hook) keep their
|
|
227
|
+
natural width and scroll inside the wrapper; a hosting layout may widen
|
|
228
|
+
the wrapper through the hook (deepsuite chat TableWrapper parity). */
|
|
229
|
+
.tableScroll table {
|
|
230
|
+
border-collapse: collapse;
|
|
231
|
+
width: max-content;
|
|
232
|
+
max-width: max-content;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Tables under four columns, and any table inside a blockquote, fill the
|
|
236
|
+
column instead: cells wrap down to their minimum readable width, and the
|
|
237
|
+
wrapper's scroll only remains for the below-floor case (deepsuite chat
|
|
238
|
+
parity: `.wrapper:not(:has(th:nth-child(4), td:nth-child(4)))`). */
|
|
239
|
+
.tableFill table {
|
|
240
|
+
width: 100%;
|
|
241
|
+
max-width: none;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.tableScroll th {
|
|
245
|
+
text-align: start;
|
|
246
|
+
padding: 10px 16px;
|
|
247
|
+
border-bottom: 0.5px solid var(--qilin-alias-border-l3);
|
|
248
|
+
border-top: none;
|
|
249
|
+
font: var(--qilin-font-markdown-table-head);
|
|
250
|
+
max-width: 320px;
|
|
251
|
+
max-width: min(30vw, 320px);
|
|
252
|
+
min-width: 100px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.tableScroll td {
|
|
256
|
+
padding: 10px 16px;
|
|
257
|
+
border-bottom: 0.5px solid var(--qilin-alias-border-l2);
|
|
258
|
+
font: var(--qilin-font-markdown-table);
|
|
259
|
+
max-width: 320px;
|
|
260
|
+
max-width: min(30vw, 320px);
|
|
261
|
+
min-width: 100px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.tableScroll th:first-child,
|
|
265
|
+
.tableScroll td:first-child {
|
|
266
|
+
padding-left: 0;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.tableScroll td:last-child {
|
|
270
|
+
padding-right: 0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.tableScroll table code {
|
|
274
|
+
font-size: 11px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.markdown > *:first-child,
|
|
278
|
+
.markdown p:first-child {
|
|
279
|
+
margin-top: 0 !important;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.markdown > *:last-child,
|
|
283
|
+
.markdown p:last-child {
|
|
284
|
+
margin-bottom: 0 !important;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.imageAlt {
|
|
288
|
+
color: var(--qilin-alias-label-tertiary);
|
|
289
|
+
font-style: italic;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.image {
|
|
293
|
+
display: block;
|
|
294
|
+
width: auto;
|
|
295
|
+
max-width: 100%;
|
|
296
|
+
height: auto;
|
|
297
|
+
margin: 0;
|
|
298
|
+
border-radius: 8px;
|
|
299
|
+
background: var(--qilin-alias-bg-base);
|
|
300
|
+
object-fit: contain;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* Inline file mention: the same link language this sheet gives anchors (and
|
|
304
|
+
thereby URL-promoted inline code) — link-blue at rest, dotted underline only
|
|
305
|
+
on hover/focus. An underline at rest reads badly inside the code chip, where
|
|
306
|
+
it collides with monospace descenders and the pill background. */
|
|
307
|
+
.fileMention {
|
|
308
|
+
margin: 0;
|
|
309
|
+
padding: 0;
|
|
310
|
+
border: none;
|
|
311
|
+
background: none;
|
|
312
|
+
font: inherit;
|
|
313
|
+
font-weight: 500;
|
|
314
|
+
color: var(--qilin-alias-link);
|
|
315
|
+
text-decoration: none;
|
|
316
|
+
cursor: pointer;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.fileLink {
|
|
320
|
+
max-width: 100%;
|
|
321
|
+
text-align: inherit;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.fileMention:hover,
|
|
325
|
+
.fileMention:focus {
|
|
326
|
+
outline: none;
|
|
327
|
+
text-decoration: underline dotted var(--qilin-alias-link);
|
|
328
|
+
text-underline-offset: 3px;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.compact {
|
|
332
|
+
max-width: 100%;
|
|
333
|
+
font-size: var(--qilin-content-font-size-secondary, 13px);
|
|
334
|
+
line-height: calc(20px + var(--qilin-content-font-delta-secondary, 0px));
|
|
335
|
+
color: var(--qilin-alias-label-tertiary);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.compact :is(h1, h2, h3, h4, h5, h6) {
|
|
339
|
+
margin: 8px 0 4px;
|
|
340
|
+
font: inherit;
|
|
341
|
+
font-weight: 600;
|
|
342
|
+
color: inherit;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.compact :is(p, ul, ol, blockquote) {
|
|
346
|
+
margin: 4px 0;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.compact li:not(:first-child) {
|
|
350
|
+
margin-top: 2px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.compact li > p {
|
|
354
|
+
margin: 4px 0;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.compact li::marker {
|
|
358
|
+
line-height: inherit;
|
|
359
|
+
color: inherit;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.compact blockquote {
|
|
363
|
+
padding-left: 8px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.compact hr {
|
|
367
|
+
margin: 8px 0;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.compact a,
|
|
371
|
+
.compact .fileMention {
|
|
372
|
+
font-weight: inherit;
|
|
373
|
+
color: inherit;
|
|
374
|
+
text-decoration: underline dotted;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.compact a:hover,
|
|
378
|
+
.compact a:focus,
|
|
379
|
+
.compact .fileMention:hover,
|
|
380
|
+
.compact .fileMention:focus {
|
|
381
|
+
text-decoration-color: currentColor;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.compact :not(pre) > code {
|
|
385
|
+
display: inline;
|
|
386
|
+
font: inherit;
|
|
387
|
+
font-family: var(--ds-font-family-code);
|
|
388
|
+
font-size: 1em !important;
|
|
389
|
+
border-radius: 4px;
|
|
390
|
+
padding: 0 3px;
|
|
391
|
+
box-decoration-break: clone;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.markdown.compact :global(.md-code-block) {
|
|
395
|
+
margin: 4px 0;
|
|
396
|
+
color: inherit;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.compact :global(.md-code-block) > :has(> [data-code-block-banner]) {
|
|
400
|
+
position: static;
|
|
401
|
+
z-index: auto;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.compact [data-code-block-banner] {
|
|
405
|
+
padding: 4px 8px;
|
|
406
|
+
font: inherit;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.compact [data-code-block-banner] > :first-child {
|
|
410
|
+
font-size: inherit;
|
|
411
|
+
line-height: inherit;
|
|
412
|
+
color: inherit;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.compact pre {
|
|
416
|
+
margin: 4px 0;
|
|
417
|
+
padding: 8px;
|
|
418
|
+
font-size: inherit;
|
|
419
|
+
line-height: inherit;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/* Shiki writes token colors inline; compact code uses the surrounding text color. */
|
|
423
|
+
.compact pre,
|
|
424
|
+
.compact pre :is(code, span) {
|
|
425
|
+
color: inherit !important;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.markdown.compact .tableScroll {
|
|
429
|
+
width: 100%;
|
|
430
|
+
max-width: 100%;
|
|
431
|
+
margin: 4px 0;
|
|
432
|
+
padding-left: 0;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.markdown.compact .tableScroll > table {
|
|
436
|
+
z-index: auto;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.compact :is(th, td) {
|
|
440
|
+
padding: 4px 8px;
|
|
441
|
+
font: inherit;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.compact th {
|
|
445
|
+
font-weight: 600;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.compact :global(.katex) {
|
|
449
|
+
font-size: 1em;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* Keep KaTeX's inline baseline and scroll the containing block only when needed. */
|
|
453
|
+
.compact :is(p, h1, h2, h3, h4, h5, h6, ul, ol):has(:global(.katex)) {
|
|
454
|
+
overflow-x: auto;
|
|
455
|
+
overflow-y: hidden;
|
|
456
|
+
/* KaTeX descenders can paint one pixel below a fractional line-box edge. */
|
|
457
|
+
padding-bottom: 1px;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.compact :global(.katex-display) {
|
|
461
|
+
margin: 4px 0;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.imageButton {
|
|
465
|
+
display: inline-block;
|
|
466
|
+
max-width: 100%;
|
|
467
|
+
padding: 0;
|
|
468
|
+
border: 0;
|
|
469
|
+
border-radius: 8px;
|
|
470
|
+
background: transparent;
|
|
471
|
+
vertical-align: middle;
|
|
472
|
+
cursor: zoom-in;
|
|
473
|
+
}
|
|
474
|
+
.imageButton .image { max-width: min(100%, 640px); max-height: 360px; }
|
|
475
|
+
.imageButton:focus-visible { outline: var(--qilin-focus-ring-width) solid var(--qilin-focus-ring-color, var(--qilin-alias-state-business-primary)); outline-offset: 3px; }
|
|
476
|
+
.previewName {
|
|
477
|
+
display: block;
|
|
478
|
+
margin-top: 8px;
|
|
479
|
+
overflow: hidden;
|
|
480
|
+
text-overflow: ellipsis;
|
|
481
|
+
white-space: nowrap;
|
|
482
|
+
color: var(--qilin-alias-label-secondary);
|
|
483
|
+
font-size: 12px;
|
|
484
|
+
line-height: 18px;
|
|
485
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* Mermaid diagram stage: centered, theme-neutral, click-to-zoom. */
|
|
2
|
+
.stage {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
margin: 8px 0;
|
|
6
|
+
padding: 12px;
|
|
7
|
+
border-radius: var(--qilin-radius-md, 8px);
|
|
8
|
+
background: var(--qilin-alias-markdown-code-block, transparent);
|
|
9
|
+
cursor: zoom-in;
|
|
10
|
+
overflow-x: auto;
|
|
11
|
+
}
|
|
12
|
+
.stage:focus-visible {
|
|
13
|
+
outline: 2px solid var(--qilin-focus-ring-color, var(--qilin-alias-state-business-primary));
|
|
14
|
+
outline-offset: 2px;
|
|
15
|
+
}
|
|
16
|
+
.stage[data-mermaid-loading] {
|
|
17
|
+
min-height: 48px;
|
|
18
|
+
cursor: default;
|
|
19
|
+
}
|
|
20
|
+
.error {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: 4px;
|
|
24
|
+
}
|
|
25
|
+
.errorLine {
|
|
26
|
+
color: var(--qilin-alias-state-error-primary, inherit);
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
white-space: pre-wrap;
|
|
29
|
+
}
|
|
30
|
+
.zoomOverlay {
|
|
31
|
+
position: fixed;
|
|
32
|
+
inset: 0;
|
|
33
|
+
z-index: 1000;
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
padding: 32px;
|
|
38
|
+
background: var(--qilin-alias-scrim, rgba(0, 0, 0, 0.5));
|
|
39
|
+
cursor: zoom-out;
|
|
40
|
+
}
|
|
41
|
+
.zoomStage {
|
|
42
|
+
max-width: 100%;
|
|
43
|
+
max-height: 100%;
|
|
44
|
+
overflow: auto;
|
|
45
|
+
background: var(--qilin-alias-surface-raised, white);
|
|
46
|
+
border-radius: var(--qilin-radius-lg, 10px);
|
|
47
|
+
padding: 16px;
|
|
48
|
+
cursor: default;
|
|
49
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Visual variant, each backed by its --qilin-alias-button-* token family. */
|
|
3
|
+
export type ButtonVariant = 'primary' | 'ghost' | 'outline' | 'toolbar';
|
|
4
|
+
/**
|
|
5
|
+
* Render a button.
|
|
6
|
+
* @param props.variant - visual family (default 'ghost').
|
|
7
|
+
* @param props.size - 'md' 36px capsule (figma Button) or 'sm' 28px compact.
|
|
8
|
+
* @param props.icon - optional leading 16px icon node.
|
|
9
|
+
* @returns the button element; native button attributes pass through.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Button({ variant, size, icon, className, children, ...rest }: {
|
|
12
|
+
variant?: ButtonVariant;
|
|
13
|
+
size?: 'md' | 'sm';
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
className?: string | undefined;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=Button.d.ts.map
|