@deepseek-ai/dsh-client-ui-primitives 0.1.6-alpha.2 → 0.1.7-alpha.2

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.
Files changed (62) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +31 -13
  3. package/README.zh.md +31 -13
  4. package/lib/CodeCard.module.css +83 -0
  5. package/lib/ConnectionIndicator.module.css +1 -10
  6. package/lib/DiffBlock.module.css +24 -53
  7. package/lib/HoverCard.module.css +27 -0
  8. package/lib/Menu.module.css +68 -48
  9. package/lib/Modal.module.css +6 -2
  10. package/lib/OnboardingSurface.module.css +1 -2
  11. package/lib/PathLabel.module.css +28 -0
  12. package/lib/ReadBlock.module.css +13 -81
  13. package/lib/RiskConfirmation.module.css +1 -1
  14. package/lib/SegmentedControl.module.css +76 -0
  15. package/lib/SegmentedTabs.module.css +55 -0
  16. package/lib/StateDot.module.css +64 -37
  17. package/lib/TerminalBlock.module.css +13 -6
  18. package/lib/TextShimmer.module.css +27 -0
  19. package/lib/Toast.module.css +31 -2
  20. package/lib/Tooltip.module.css +12 -0
  21. package/lib/index.js +5892 -3142
  22. package/lib/markdown/CodeBlock.module.css +15 -0
  23. package/lib/markdown/MarkdownText.module.css +1 -19
  24. package/lib/settings-form/SettingsForm.module.css +53 -0
  25. package/lib/settings-form/fields.module.css +145 -0
  26. package/lib/types/CodeToolbar.d.ts +30 -0
  27. package/lib/types/ConfigField.d.ts +33 -0
  28. package/lib/types/DiffBlock.d.ts +3 -3
  29. package/lib/types/DisclosureRow.d.ts +4 -1
  30. package/lib/types/HoverCard.d.ts +14 -4
  31. package/lib/types/LinkIcon.d.ts +15 -30
  32. package/lib/types/Menu.d.ts +53 -8
  33. package/lib/types/PathLabel.d.ts +13 -0
  34. package/lib/types/PermissionIcon.d.ts +39 -0
  35. package/lib/types/ReadBlock.d.ts +2 -1
  36. package/lib/types/ReferenceIcon.d.ts +12 -7
  37. package/lib/types/SegmentedControl.d.ts +35 -0
  38. package/lib/types/SegmentedTabs.d.ts +26 -0
  39. package/lib/types/SiteGlyph.d.ts +1 -1
  40. package/lib/types/StateDot.d.ts +6 -4
  41. package/lib/types/TerminalBlock.d.ts +15 -3
  42. package/lib/types/TextShimmer.d.ts +13 -0
  43. package/lib/types/Toast.d.ts +19 -2
  44. package/lib/types/Tooltip.d.ts +13 -2
  45. package/lib/types/code-file-types.d.ts +1 -1
  46. package/lib/types/code-highlighting.d.ts +19 -0
  47. package/lib/types/icons/index.d.ts +376 -195
  48. package/lib/types/icons/props.d.ts +1 -1
  49. package/lib/types/icons/shared-artwork.d.ts +36 -0
  50. package/lib/types/index.d.ts +22 -4
  51. package/lib/types/markdown/CodeBlock.d.ts +6 -1
  52. package/lib/types/markdown/render.d.ts +3 -0
  53. package/lib/types/overlay-top-margin.d.ts +14 -0
  54. package/lib/types/plugin-artwork.d.ts +17 -0
  55. package/lib/types/settings-form/SettingsForm.d.ts +46 -0
  56. package/lib/types/settings-form/fields.d.ts +69 -0
  57. package/lib/types/settings-form/form-model.d.ts +214 -0
  58. package/lib/types/useAnchoredMaxHeight.d.ts +4 -1
  59. package/lib/types/useAnchoredPosition.d.ts +3 -1
  60. package/lib/types/user-text.d.ts +2 -2
  61. package/lib/user-text.module.css +4 -1
  62. package/package.json +5 -3
@@ -110,15 +110,18 @@
110
110
  color: var(--dsw-alias-label-tertiary);
111
111
  }
112
112
 
113
- /* `pre`, not `nowrap`: the prompt row renders the command verbatim, and
114
- `nowrap` collapses the repeated spaces, tabs, and alignment of an indented
115
- continuation. Both hold the single row and the ellipsis. */
113
+ /* Default `pre`, not `nowrap`: the prompt row renders the command verbatim,
114
+ and `nowrap` would collapse the repeated spaces, tabs, and alignment of an
115
+ indented continuation. Hosts opt into wrapping long commands by rebinding
116
+ the variable to `pre-wrap`; the ellipsis then simply never engages, and
117
+ overflow-wrap is inert while white-space stays `pre`. */
116
118
  .command {
117
119
  min-width: 0;
118
120
  color: var(--dsw-alias-label-primary);
119
121
  overflow: hidden;
120
122
  text-overflow: ellipsis;
121
- white-space: pre;
123
+ white-space: var(--dsl-terminal-command-whitespace, pre);
124
+ overflow-wrap: anywhere;
122
125
  }
123
126
 
124
127
  /* Capped to the prompt's line height (Pill's own 24px height would exceed a
@@ -176,10 +179,14 @@
176
179
  margin: 6px;
177
180
  }
178
181
 
179
- /* No wrapping, no word-break: alignment is the payload of terminal output. */
182
+ /* Default `pre`: alignment is the payload of terminal output. Hosts opt
183
+ into wrapping long lines by rebinding the variable to `pre-wrap`, which
184
+ also keeps the output region from ever scrolling sideways; overflow-wrap
185
+ is inert while white-space stays `pre`. */
180
186
  .line {
181
187
  min-height: var(--dsl-terminal-line-height);
182
- white-space: pre;
188
+ white-space: var(--dsl-terminal-line-whitespace, pre);
189
+ overflow-wrap: anywhere;
183
190
  }
184
191
 
185
192
  .expand {
@@ -0,0 +1,27 @@
1
+ .root[data-text-shimmer] {
2
+ background-image: linear-gradient(
3
+ 90deg,
4
+ currentColor calc(50% - var(--dsh-text-shimmer-spread)),
5
+ color-mix(in oklab, currentColor 50%, transparent),
6
+ currentColor calc(50% + var(--dsh-text-shimmer-spread))
7
+ );
8
+ background-position: 100% center;
9
+ background-repeat: no-repeat;
10
+ background-size: 250% 100%;
11
+ background-clip: text;
12
+ -webkit-background-clip: text;
13
+ -webkit-text-fill-color: transparent;
14
+ animation: dsh-text-shimmer 1.5s cubic-bezier(0.33, 0, 0.67, 1) infinite;
15
+ }
16
+
17
+ @keyframes dsh-text-shimmer {
18
+ 66.6667%, 100% { background-position: 0% center; }
19
+ }
20
+
21
+ @media (prefers-reduced-motion: reduce) {
22
+ .root[data-text-shimmer] {
23
+ background-image: none;
24
+ -webkit-text-fill-color: currentColor;
25
+ animation: none;
26
+ }
27
+ }
@@ -23,8 +23,11 @@
23
23
  max-width: min(640px, calc(100vw - 48px));
24
24
  padding: 12px 16px;
25
25
  border-radius: 14px;
26
- background: var(--dsw-alias-button-contrast-fill);
27
- color: var(--dsw-alias-label-primary-inverted);
26
+ /* The design platform's toast surface is dark in BOTH themes (bluish-800
27
+ light / bluish-750 dark), so the label and the action text below stay
28
+ fixed instead of flipping with the theme. */
29
+ background: var(--dsw-alias-toast-bg);
30
+ color: var(--dsw-static-neutral-bluish-00);
28
31
  font-size: 14px;
29
32
  line-height: 22px;
30
33
  box-shadow: var(--dsw-shadow-lv3);
@@ -41,10 +44,35 @@
41
44
  color: var(--dsw-alias-state-warn-label);
42
45
  }
43
46
 
47
+ .icon.success {
48
+ color: var(--dsw-alias-state-success-primary);
49
+ }
50
+
44
51
  .text {
45
52
  min-width: 0;
46
53
  }
47
54
 
55
+ .action {
56
+ display: inline;
57
+ padding: 0;
58
+ border: 0;
59
+ background: none;
60
+ /* deepseek-400, brightened at the designer's request, reads as the action
61
+ against the always-dark toast surface without an underline. */
62
+ color: var(--dsw-static-deepseek-400);
63
+ font: inherit;
64
+ cursor: pointer;
65
+ /* Breathing room where the action text meets the surrounding copy. */
66
+ margin-inline: 3px;
67
+ /* The banner surface stays click-through (`pointer-events: none` above);
68
+ only its action text takes the pointer. */
69
+ pointer-events: auto;
70
+ }
71
+
72
+ .action:hover {
73
+ opacity: 0.8;
74
+ }
75
+
48
76
  @keyframes dsh-toast-in {
49
77
  from {
50
78
  opacity: 0;
@@ -60,6 +88,7 @@
60
88
  @keyframes dsh-toast-fade {
61
89
  to {
62
90
  opacity: 0;
91
+ visibility: hidden;
63
92
  }
64
93
  }
65
94
 
@@ -19,6 +19,8 @@
19
19
  animation: tooltip-in 150ms var(--ds-ease-in-out);
20
20
  }
21
21
 
22
+ .bubble[data-portal] { z-index: 1100; }
23
+
22
24
  .bubble[data-side='right'] {
23
25
  transform: translateY(-50%);
24
26
  }
@@ -31,6 +33,16 @@
31
33
  transform: translate(-50%, -100%);
32
34
  }
33
35
 
36
+ /* End alignment: `left` carries the anchor's right edge, so the bubble sits
37
+ fully left of it instead of centering. */
38
+ .bubble[data-side='bottom'][data-align='end'] {
39
+ transform: translateX(-100%);
40
+ }
41
+
42
+ .bubble[data-side='top'][data-align='end'] {
43
+ transform: translate(-100%, -100%);
44
+ }
45
+
34
46
  @keyframes tooltip-in {
35
47
  from { opacity: 0; }
36
48
  }