@x1a0f3n9/dsh-client-ui-primitives 0.1.5-rc.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 +6 -0
- package/README.md +164 -0
- package/README.zh.md +164 -0
- package/lib/Button.module.css +79 -0
- package/lib/ConnectionIndicator.module.css +107 -0
- package/lib/DiffBlock.module.css +101 -0
- package/lib/DisclosureRow.module.css +84 -0
- package/lib/FileTypeIcon.module.css +50 -0
- package/lib/HoverCard.module.css +54 -0
- package/lib/Input.module.css +38 -0
- package/lib/JsonTree.module.css +222 -0
- package/lib/Menu.module.css +248 -0
- package/lib/Modal.module.css +103 -0
- package/lib/OnboardingSurface.module.css +29 -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/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/Toast.module.css +72 -0
- package/lib/Tooltip.module.css +42 -0
- package/lib/WebBlock.module.css +141 -0
- package/lib/index.js +8030 -0
- package/lib/markdown/CodeBlock.module.css +130 -0
- package/lib/markdown/JsonBlock.module.css +32 -0
- package/lib/markdown/MarkdownText.module.css +321 -0
- package/lib/types/BrandWordmark.d.ts +15 -0
- package/lib/types/Button.d.ts +18 -0
- package/lib/types/CodeFileIcon.d.ts +12 -0
- package/lib/types/ConnectionIndicator.d.ts +25 -0
- package/lib/types/DiffBlock.d.ts +53 -0
- package/lib/types/DisclosureRow.d.ts +29 -0
- package/lib/types/FileTypeIcon.d.ts +43 -0
- package/lib/types/FishLogo.d.ts +16 -0
- package/lib/types/FoldToggle.d.ts +20 -0
- package/lib/types/HoverCard.d.ts +24 -0
- package/lib/types/Input.d.ts +11 -0
- package/lib/types/JsonTree.d.ts +48 -0
- package/lib/types/LinkIcon.d.ts +38 -0
- package/lib/types/Menu.d.ts +85 -0
- package/lib/types/Modal.d.ts +35 -0
- package/lib/types/OnboardingSurface.d.ts +11 -0
- package/lib/types/Pill.d.ts +13 -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/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 +61 -0
- package/lib/types/Toast.d.ts +32 -0
- package/lib/types/Tooltip.d.ts +34 -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/file-size.d.ts +8 -0
- package/lib/types/head-tail-cap.d.ts +23 -0
- package/lib/types/icons/index.d.ts +194 -0
- package/lib/types/icons/props.d.ts +9 -0
- package/lib/types/index.d.ts +66 -0
- package/lib/types/markdown/CodeBlock.d.ts +28 -0
- package/lib/types/markdown/JsonBlock.d.ts +8 -0
- package/lib/types/markdown/MarkdownText.d.ts +42 -0
- package/lib/types/markdown/cjkFriendlyStrong.d.ts +9 -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/mathCompatibility.d.ts +11 -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 +138 -0
- package/lib/types/markdown/useViewportHighlighting.d.ts +11 -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/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/user-text.d.ts +39 -0
- package/lib/user-text.module.css +43 -0
- package/package.json +58 -0
|
@@ -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(--dsw-alias-markdown-code-block-banner);
|
|
6
|
+
--dsl-code-block-border-radius: 12px;
|
|
7
|
+
/* Local 11/18 instead of the shared --dsw-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(--dsw-font-family);
|
|
10
|
+
--dsl-code-block-content-font: var(--dsw-font-markdown-code-block);
|
|
11
|
+
--dsl-code-block-background: var(--dsw-alias-markdown-code-block);
|
|
12
|
+
|
|
13
|
+
position: relative;
|
|
14
|
+
margin: 16px 0;
|
|
15
|
+
color: var(--dsw-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(--dsw-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(--dsw-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(--dsw-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(--dsw-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(--dsw-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(--dsw-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(--dsw-alias-markdown-code-block);
|
|
26
|
+
border: 0.5px solid var(--dsw-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(--dsw-alias-label-primary);
|
|
32
|
+
}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/* Visual baseline: deepsuite `@deepseek/md` markdown.css, adapted to CSS
|
|
2
|
+
Modules. Cite pills, header anchors, and thinking-small variants are
|
|
3
|
+
intentionally absent (no matching DOM). Token names match that sheet. */
|
|
4
|
+
|
|
5
|
+
.markdown {
|
|
6
|
+
min-width: 0;
|
|
7
|
+
overflow-wrap: anywhere;
|
|
8
|
+
font: var(--dsw-font-markdown-base);
|
|
9
|
+
color: var(--dsw-alias-label-primary);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.markdown strong {
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.markdown h1 {
|
|
17
|
+
font: var(--dsw-font-markdown-h1);
|
|
18
|
+
margin: 32px 0 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.markdown h2 {
|
|
22
|
+
font: var(--dsw-font-markdown-h2);
|
|
23
|
+
margin: 32px 0 16px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.markdown h3 {
|
|
27
|
+
font: var(--dsw-font-markdown-h3);
|
|
28
|
+
margin: 32px 0 16px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.markdown h4 {
|
|
32
|
+
font: var(--dsw-font-markdown-h4);
|
|
33
|
+
margin: 16px 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.markdown :where(h5, h6) {
|
|
37
|
+
font: var(--dsw-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
|
+
/* deepsuite markdown.css uses brand-text (blue in newDesign); this sheet
|
|
60
|
+
keeps design-platform brand-text as near-black, so links use the
|
|
61
|
+
dedicated link alias instead. */
|
|
62
|
+
color: var(--dsw-alias-link);
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
transition: box-shadow var(--ds-transition-duration) var(--ds-ease-in-out);
|
|
65
|
+
position: relative;
|
|
66
|
+
text-decoration: none;
|
|
67
|
+
/* Transparent hit-area padding; literal zero-alpha only (no painted color). */
|
|
68
|
+
border-left: 3px solid rgb(255 255 255 / 0);
|
|
69
|
+
border-right: 3px solid rgb(255 255 255 / 0);
|
|
70
|
+
border-top: 2px solid rgb(255 255 255 / 0);
|
|
71
|
+
border-bottom: 2px solid rgb(255 255 255 / 0);
|
|
72
|
+
margin-left: -3px;
|
|
73
|
+
margin-right: -3px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.markdown a:hover,
|
|
77
|
+
.markdown a:focus {
|
|
78
|
+
outline: none;
|
|
79
|
+
text-decoration: underline dotted var(--dsw-alias-link);
|
|
80
|
+
text-underline-offset: 3px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.markdown a:focus-visible {
|
|
84
|
+
box-shadow: 0 0 0 2px var(--dsw-alias-state-business-primary);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Leading link-category glyph inside anchors, file mentions, and
|
|
88
|
+
URL-promoted inline code: outline glyphs ride the link's currentColor.
|
|
89
|
+
1.1em keeps the glyph proportional to the surrounding text's size (it
|
|
90
|
+
shrinks with the code chip's 0.875em); the small negative offset seats
|
|
91
|
+
its optical center on the cap height. */
|
|
92
|
+
.linkIcon {
|
|
93
|
+
flex: none;
|
|
94
|
+
width: 1.1em;
|
|
95
|
+
height: 1.1em;
|
|
96
|
+
vertical-align: -0.25em;
|
|
97
|
+
margin-right: 5px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.markdown :where(ul, ol) {
|
|
101
|
+
margin: 16px 0;
|
|
102
|
+
padding-left: 18px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.markdown li:not(:first-child) {
|
|
106
|
+
margin-top: 6px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.markdown li > :where(ul, ol) {
|
|
110
|
+
margin-top: 4px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.markdown li::marker {
|
|
114
|
+
line-height: 24px;
|
|
115
|
+
color: var(--dsw-alias-label-secondary);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Nested ol under ul/ol: markers inside (models sometimes emit this shape). */
|
|
119
|
+
.markdown :where(ul, ol) ol {
|
|
120
|
+
list-style-position: inside;
|
|
121
|
+
padding-left: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.markdown :where(ul, ol) ol li p {
|
|
125
|
+
display: inline;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.markdown li > p {
|
|
129
|
+
margin: 8px 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.markdown li > *:first-child {
|
|
133
|
+
margin-top: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Keep list-nested code-block vertical margins (design: +4px vs other last children). */
|
|
137
|
+
.markdown li > *:last-child:not(:global(.md-code-block)) {
|
|
138
|
+
margin-bottom: 0;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.markdown hr {
|
|
142
|
+
display: block;
|
|
143
|
+
border: none;
|
|
144
|
+
height: 0.5px;
|
|
145
|
+
margin: 32px 0;
|
|
146
|
+
background: var(--dsw-alias-border-l2);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.markdown blockquote {
|
|
150
|
+
border-left: 2px solid var(--dsw-alias-label-caption);
|
|
151
|
+
margin: 16px 0 0;
|
|
152
|
+
padding-left: 14px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.markdown pre {
|
|
156
|
+
margin: 16px 0;
|
|
157
|
+
font-family: var(--ds-font-family-code);
|
|
158
|
+
overflow: auto;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.markdown :not(pre) > code {
|
|
162
|
+
display: inline-flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
box-sizing: border-box;
|
|
165
|
+
font: var(--dsw-font-markdown-code);
|
|
166
|
+
font-family: var(--ds-font-family-code);
|
|
167
|
+
font-size: 0.875em !important;
|
|
168
|
+
background-color: var(--dsw-alias-markdown-inline-code);
|
|
169
|
+
border: 0.5px solid var(--dsw-alias-border-l1);
|
|
170
|
+
border-radius: 6px;
|
|
171
|
+
padding: 0 5px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.markdown :where(h1, h2, h3, h4, h5, h6) code {
|
|
175
|
+
font: inherit;
|
|
176
|
+
font-family: var(--ds-font-family-code);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.markdown :global(.katex-display) {
|
|
180
|
+
max-width: 100%;
|
|
181
|
+
overflow-x: auto;
|
|
182
|
+
overflow-y: hidden;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.markdown input[type='checkbox'] {
|
|
186
|
+
margin: 0 8px 0 0;
|
|
187
|
+
accent-color: var(--dsw-alias-label-secondary);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.tableScroll {
|
|
191
|
+
max-width: 100%;
|
|
192
|
+
overflow-x: auto;
|
|
193
|
+
overscroll-behavior-x: contain;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Wide tables reveal their horizontal bar on hover (or keyboard focus)
|
|
197
|
+
instead of keeping it painted. Chromium never repaints state-conditioned
|
|
198
|
+
scrollbar STYLES (neither hover-conditioned `::-webkit-scrollbar*` rules
|
|
199
|
+
nor a :hover `scrollbar-color` change reaches the painted bar), so the
|
|
200
|
+
toggle is `overflow-x` itself — a layout change repaints reliably. The
|
|
201
|
+
resting padding matches the themed bar's height, so on an overflowing
|
|
202
|
+
table the appearing bar exactly replaces it and nothing below shifts.
|
|
203
|
+
Wheel and trackpad scrolling need the pointer over the table, which is
|
|
204
|
+
already the hover that re-enables `auto`. */
|
|
205
|
+
.tableScroll:global(.md-table-wide) {
|
|
206
|
+
overflow-x: hidden;
|
|
207
|
+
padding-bottom: var(--dsh-scrollbar-width, 8px);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.tableScroll:global(.md-table-wide):hover,
|
|
211
|
+
.tableScroll:global(.md-table-wide):focus-visible {
|
|
212
|
+
overflow-x: auto;
|
|
213
|
+
padding-bottom: 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Chromium keyboard-focuses scrollable containers by default; the ring uses
|
|
217
|
+
the sheet's link focus color. */
|
|
218
|
+
.tableScroll:focus-visible {
|
|
219
|
+
outline: none;
|
|
220
|
+
box-shadow: 0 0 0 2px var(--dsw-alias-state-business-primary);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Many-column tables (the renderer's `md-table-wide` hook) keep their
|
|
224
|
+
natural width and scroll inside the wrapper; a hosting layout may widen
|
|
225
|
+
the wrapper through the hook (deepsuite chat TableWrapper parity). */
|
|
226
|
+
.tableScroll table {
|
|
227
|
+
border-collapse: collapse;
|
|
228
|
+
width: max-content;
|
|
229
|
+
max-width: max-content;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* Tables under four columns, and any table inside a blockquote, fill the
|
|
233
|
+
column instead: cells wrap down to their minimum readable width, and the
|
|
234
|
+
wrapper's scroll only remains for the below-floor case (deepsuite chat
|
|
235
|
+
parity: `.wrapper:not(:has(th:nth-child(4), td:nth-child(4)))`). */
|
|
236
|
+
.tableFill table {
|
|
237
|
+
width: 100%;
|
|
238
|
+
max-width: none;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.tableScroll th {
|
|
242
|
+
text-align: start;
|
|
243
|
+
padding: 10px 16px;
|
|
244
|
+
border-bottom: 0.5px solid var(--dsw-alias-border-l3);
|
|
245
|
+
border-top: none;
|
|
246
|
+
font: var(--dsw-font-markdown-table-head);
|
|
247
|
+
max-width: 320px;
|
|
248
|
+
max-width: min(30vw, 320px);
|
|
249
|
+
min-width: 100px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.tableScroll td {
|
|
253
|
+
padding: 10px 16px;
|
|
254
|
+
border-bottom: 0.5px solid var(--dsw-alias-border-l2);
|
|
255
|
+
font: var(--dsw-font-markdown-table);
|
|
256
|
+
max-width: 320px;
|
|
257
|
+
max-width: min(30vw, 320px);
|
|
258
|
+
min-width: 100px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.tableScroll th:first-child,
|
|
262
|
+
.tableScroll td:first-child {
|
|
263
|
+
padding-left: 0;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.tableScroll td:last-child {
|
|
267
|
+
padding-right: 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.tableScroll table code {
|
|
271
|
+
font-size: 11px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.markdown > *:first-child,
|
|
275
|
+
.markdown p:first-child {
|
|
276
|
+
margin-top: 0 !important;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.markdown > *:last-child,
|
|
280
|
+
.markdown p:last-child {
|
|
281
|
+
margin-bottom: 0 !important;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.imageAlt {
|
|
285
|
+
color: var(--dsw-alias-label-tertiary);
|
|
286
|
+
font-style: italic;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.image {
|
|
290
|
+
display: block;
|
|
291
|
+
width: auto;
|
|
292
|
+
max-width: 100%;
|
|
293
|
+
height: auto;
|
|
294
|
+
margin: 0;
|
|
295
|
+
border-radius: 8px;
|
|
296
|
+
background: var(--dsw-alias-bg-base);
|
|
297
|
+
object-fit: contain;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/* Inline file mention: the same link language this sheet gives anchors (and
|
|
301
|
+
thereby URL-promoted inline code) — link-blue at rest, dotted underline only
|
|
302
|
+
on hover/focus. An underline at rest reads badly inside the code chip, where
|
|
303
|
+
it collides with monospace descenders and the pill background. */
|
|
304
|
+
.fileMention {
|
|
305
|
+
margin: 0;
|
|
306
|
+
padding: 0;
|
|
307
|
+
border: none;
|
|
308
|
+
background: none;
|
|
309
|
+
font: inherit;
|
|
310
|
+
font-weight: 500;
|
|
311
|
+
color: var(--dsw-alias-link);
|
|
312
|
+
text-decoration: none;
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.fileMention:hover,
|
|
317
|
+
.fileMention:focus {
|
|
318
|
+
outline: none;
|
|
319
|
+
text-decoration: underline dotted var(--dsw-alias-link);
|
|
320
|
+
text-underline-offset: 3px;
|
|
321
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IconProps } from './icons/props.ts';
|
|
2
|
+
/** Display options for the official brand wordmark. */
|
|
3
|
+
export interface BrandWordmarkProps extends IconProps {
|
|
4
|
+
/** Whether to include the leading whale mark; defaults to true. */
|
|
5
|
+
includeMark?: boolean | undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Render the full brand wordmark.
|
|
9
|
+
* @param props.size - height in px (default 24; width follows the selected artwork).
|
|
10
|
+
* @param props.className - extra class for layout placement.
|
|
11
|
+
* @param props.includeMark - whether to include the leading whale mark.
|
|
12
|
+
* @returns the wordmark svg (aria-hidden decorative brand art).
|
|
13
|
+
*/
|
|
14
|
+
export declare function BrandWordmark({ size, className, includeMark }: BrandWordmarkProps): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=BrandWordmark.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Visual variant, each backed by its --dsw-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
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { IconProps } from './icons/props.ts';
|
|
3
|
+
import type { CodeFileType } from './code-file-types.ts';
|
|
4
|
+
/**
|
|
5
|
+
* Render one full-color square code-file glyph from the embedded icon set.
|
|
6
|
+
* @param props - Detailed code type, optional size, and optional CSS class.
|
|
7
|
+
* @returns The selected decorative SVG with its identifying palette intact.
|
|
8
|
+
*/
|
|
9
|
+
export declare function CodeFileIcon({ type, size, className }: IconProps & {
|
|
10
|
+
readonly type: CodeFileType;
|
|
11
|
+
}): ReactNode;
|
|
12
|
+
//# sourceMappingURL=CodeFileIcon.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Visual state rendered by {@link ConnectionIndicator}. */
|
|
2
|
+
export type ConnectionIndicatorState = 'disconnected' | 'connecting' | 'recovered';
|
|
3
|
+
/**
|
|
4
|
+
* Render an inline connection-recovery control.
|
|
5
|
+
* @param props.state - visible outage, retry-attempt, or recovered state.
|
|
6
|
+
* @param props.disconnectedLabel - localized outage text.
|
|
7
|
+
* @param props.reconnectLabel - localized action text shown on hover or focus.
|
|
8
|
+
* @param props.connectingLabel - localized retry text followed by the attempt dots.
|
|
9
|
+
* @param props.recoveredLabel - localized recovery confirmation.
|
|
10
|
+
* @param props.reconnectActionLabel - accessible label for the outage action.
|
|
11
|
+
* @param props.restartActionLabel - accessible label for replacing an active attempt.
|
|
12
|
+
* @param props.onReconnect - request an immediate reconnect attempt.
|
|
13
|
+
* @returns the indicator, or null when no connection feedback is active.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ConnectionIndicator({ state, disconnectedLabel, reconnectLabel, connectingLabel, recoveredLabel, reconnectActionLabel, restartActionLabel, onReconnect, }: {
|
|
16
|
+
state: ConnectionIndicatorState | undefined;
|
|
17
|
+
disconnectedLabel: string;
|
|
18
|
+
reconnectLabel: string;
|
|
19
|
+
connectingLabel: string;
|
|
20
|
+
recoveredLabel: string;
|
|
21
|
+
reconnectActionLabel: string;
|
|
22
|
+
restartActionLabel: string;
|
|
23
|
+
onReconnect: () => void;
|
|
24
|
+
}): import("react").JSX.Element | null;
|
|
25
|
+
//# sourceMappingURL=ConnectionIndicator.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** Output lines shown before the height cap collapses the middle. */
|
|
2
|
+
export declare const DEFAULT_DIFF_MAX_LINES = 16;
|
|
3
|
+
/**
|
|
4
|
+
* One file change in the form {@link DiffBlock} renders. It is declared here
|
|
5
|
+
* so this primitive stays independent of the tool contract.
|
|
6
|
+
*/
|
|
7
|
+
export interface DiffHunk {
|
|
8
|
+
/** The changed file's path, drawn verbatim as the hunk's header (the tool's model-facing path). */
|
|
9
|
+
path: string;
|
|
10
|
+
/** Prior content, or `null` for a new file / an overwrite (nothing on the removed side). */
|
|
11
|
+
oldText: string | null;
|
|
12
|
+
/** Content after the change (the added side). */
|
|
13
|
+
newText: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DiffBlockProps {
|
|
16
|
+
/** One entry per applied hunk, in file order; empty renders nothing. */
|
|
17
|
+
diffs: DiffHunk[];
|
|
18
|
+
/** Localized chrome supplied by the owning render site. */
|
|
19
|
+
labels: DiffBlockLabels;
|
|
20
|
+
/** Height cap in body lines before the middle collapses (default {@link DEFAULT_DIFF_MAX_LINES}). */
|
|
21
|
+
maxLines?: number | undefined;
|
|
22
|
+
/** Extra class merged onto the wrapper (callers position; this component draws). */
|
|
23
|
+
className?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
/** Localized chrome for {@link DiffBlock}. */
|
|
26
|
+
export interface DiffBlockLabels {
|
|
27
|
+
copy: string;
|
|
28
|
+
copied: string;
|
|
29
|
+
collapseAria: string;
|
|
30
|
+
expandAria: (hidden: number) => string;
|
|
31
|
+
collapse: string;
|
|
32
|
+
expand: (hidden: number) => string;
|
|
33
|
+
files: (count: number) => string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Total added/removed line counts across hunks — the same numbers the footer
|
|
37
|
+
* prints, exported so a summary row can show them without rebuilding the body.
|
|
38
|
+
* Every old-side line counts toward `removed` and every new-side line toward
|
|
39
|
+
* `added`, under {@link contentLines}'s terminator rule.
|
|
40
|
+
* @param diffs - the hunks to count.
|
|
41
|
+
* @returns the +/- totals.
|
|
42
|
+
*/
|
|
43
|
+
export declare function diffTotals(diffs: DiffHunk[]): {
|
|
44
|
+
added: number;
|
|
45
|
+
removed: number;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Render a file mutation as an inline diff surface.
|
|
49
|
+
* @param props - see {@link DiffBlockProps}.
|
|
50
|
+
* @returns the diff block element.
|
|
51
|
+
*/
|
|
52
|
+
export declare function DiffBlock({ diffs, labels, maxLines, className }: DiffBlockProps): import("react").JSX.Element | null;
|
|
53
|
+
//# sourceMappingURL=DiffBlock.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Shared 24px disclosure chrome for compact flow rows. */
|
|
3
|
+
export interface DisclosureRowProps {
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
title: string;
|
|
6
|
+
open: boolean;
|
|
7
|
+
expandable: boolean;
|
|
8
|
+
onToggle: () => void;
|
|
9
|
+
/** Makes the complete title row the disclosure target. */
|
|
10
|
+
expandOnRowClick?: boolean | undefined;
|
|
11
|
+
/** Replaces the collapsed icon with a chevron while the row is hovered. */
|
|
12
|
+
previewChevron?: boolean | undefined;
|
|
13
|
+
/** Keeps `collapsedContent` inline while open. */
|
|
14
|
+
keepContentWhenOpen?: boolean | undefined;
|
|
15
|
+
collapsedContent?: ReactNode;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
className?: string | undefined;
|
|
18
|
+
rowClassName?: string | undefined;
|
|
19
|
+
leadingClassName?: string | undefined;
|
|
20
|
+
chevronClassName?: string | undefined;
|
|
21
|
+
titleClassName?: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Render one disclosure header and its controlled expanded content.
|
|
25
|
+
* @param props - Visual content, controlled state, and interaction policy.
|
|
26
|
+
* @returns the disclosure row.
|
|
27
|
+
*/
|
|
28
|
+
export declare function DisclosureRow({ icon, title, open, expandable, onToggle, expandOnRowClick, previewChevron, keepContentWhenOpen, collapsedContent, children, className, rowClassName, leadingClassName, chevronClassName, titleClassName, }: DisclosureRowProps): import("react").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=DisclosureRow.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type CodeFileType, type FileTypeProjectContext } from './code-file-types.ts';
|
|
3
|
+
import type { IconProps } from './icons/props.ts';
|
|
4
|
+
/** File categories with distinct 28px glyphs. */
|
|
5
|
+
export type FileType = CodeFileType | 'code' | 'excel' | 'folder' | 'html' | 'image' | 'markdown' | 'other' | 'pdf' | 'ppt' | 'video' | 'word';
|
|
6
|
+
/** Compatibility name for consumers that pass an already resolved category. */
|
|
7
|
+
export type FileTypeKind = FileType;
|
|
8
|
+
type ClassifiedFileType = Exclude<FileType, 'folder'>;
|
|
9
|
+
export type { CodeFileType, FileTypeProjectContext } from './code-file-types.ts';
|
|
10
|
+
/** Props for {@link FileTypeIcon}: either a path to classify or an already resolved kind. */
|
|
11
|
+
export type FileTypeIconProps = IconProps & ({
|
|
12
|
+
/** File path or name to classify. */
|
|
13
|
+
readonly path: string;
|
|
14
|
+
/** Optional project-file snapshot for context-sensitive code icons such as Flutter. */
|
|
15
|
+
readonly context?: FileTypeProjectContext | undefined;
|
|
16
|
+
} | {
|
|
17
|
+
/** Explicit category for callers that already resolved the file type. */
|
|
18
|
+
readonly kind: FileTypeKind;
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Extract the final suffix from a file path without changing its case.
|
|
22
|
+
* A leading dot starts a suffix, while a missing or trailing dot returns an empty string.
|
|
23
|
+
* @param path - File path or basename using either path separator.
|
|
24
|
+
* @returns The characters after the basename's final dot.
|
|
25
|
+
*/
|
|
26
|
+
export declare function fileExtension(path: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Classify a file path or name for file-card presentation.
|
|
29
|
+
* Matching is case-insensitive and applies code filename rules before extension rules;
|
|
30
|
+
* unknown names fall back to `other`.
|
|
31
|
+
* @param path - File path or basename using either path separator.
|
|
32
|
+
* @param context - Optional project files used by context-sensitive code mappings.
|
|
33
|
+
* @returns The file's closed presentation category.
|
|
34
|
+
*/
|
|
35
|
+
export declare function classifyFileType(path: string, context?: FileTypeProjectContext): ClassifiedFileType;
|
|
36
|
+
/**
|
|
37
|
+
* Render a decorative file-type glyph for a path or an explicitly resolved kind.
|
|
38
|
+
* @param props - Path or kind selection, optional project context, size, and CSS class.
|
|
39
|
+
* @returns The category-colored SVG; the caller owns the accessible name and may override
|
|
40
|
+
* the color through `--dsh-file-type-icon-color`.
|
|
41
|
+
*/
|
|
42
|
+
export declare function FileTypeIcon(props: FileTypeIconProps): ReactNode;
|
|
43
|
+
//# sourceMappingURL=FileTypeIcon.d.ts.map
|