@deepseek-ai/dsh-client-ui-primitives 0.2.1-alpha.1 → 0.2.1-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.
- package/README.i18n.yaml +8 -8
- package/README.md +5 -3
- package/README.zh.md +5 -3
- package/lib/CommandText.module.css +12 -0
- package/lib/DisclosureRow.module.css +15 -0
- package/lib/ImageLightbox.module.css +12 -4
- package/lib/TerminalBlock.module.css +3 -10
- package/lib/index.js +180 -120
- package/lib/types/CommandText.d.ts +16 -0
- package/lib/types/DisclosureRow.d.ts +4 -2
- package/lib/types/TerminalBlock.d.ts +3 -1
- package/lib/types/index.d.ts +2 -0
- package/package.json +9 -9
package/README.i18n.yaml
CHANGED
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
en: 7bae72c97d0449f5
|
|
19
19
|
zh: 4589ecc2b216edc5
|
|
20
20
|
/deepseek-ai-dsh-client-ui-primitives/use-this-package/component-catalog:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
21
|
+
en: b9ef1bec616d1038
|
|
22
|
+
zh: 51db8274f3a432fc
|
|
23
23
|
/deepseek-ai-dsh-client-ui-primitives/use-this-package/controls-and-icons:
|
|
24
24
|
en: f0e54915b896af5a
|
|
25
25
|
zh: 2047520fd321be90
|
|
26
26
|
/deepseek-ai-dsh-client-ui-primitives/use-this-package/rendering-agent-output:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: 4a1a61bb2d64fe4c
|
|
28
|
+
zh: 1b0097fff440c2ef
|
|
29
29
|
/deepseek-ai-dsh-client-ui-primitives/use-this-package/localizing-copy:
|
|
30
30
|
en: 4aef65dea11de083
|
|
31
31
|
zh: abc22cd7c65cdf38
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
en: 8bbfa14c27f3bfd7
|
|
43
43
|
zh: 88f7548ac3a114e1
|
|
44
44
|
/deepseek-ai-dsh-client-ui-primitives/understand-the-implementation/geometry-and-overflow:
|
|
45
|
-
en:
|
|
46
|
-
zh:
|
|
45
|
+
en: e283bf2366b43879
|
|
46
|
+
zh: d089076d7834e853
|
|
47
47
|
/deepseek-ai-dsh-client-ui-primitives/further-exploration:
|
|
48
48
|
en: e82b713cdb2f954b
|
|
49
49
|
zh: a877f34b148f433f
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
en: ca75c51c89c2c9b0
|
|
55
55
|
zh: de54f3467ef3b9be
|
|
56
56
|
/deepseek-ai-dsh-client-ui-primitives/known-limitations-and-deferred-work:
|
|
57
|
-
en:
|
|
58
|
-
zh:
|
|
57
|
+
en: 22fc14aa3a224552
|
|
58
|
+
zh: aa6309e84ad8c2a3
|
|
59
59
|
/deepseek-ai-dsh-client-ui-primitives/known-limitations-and-deferred-work/dev-note:
|
|
60
60
|
en: e67f633dc6fe7773
|
|
61
61
|
zh: 3bb0c20c93f16f98
|
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ Check this table before writing a control in a feature package. A plugin cannot
|
|
|
54
54
|
| `PathLabel` | Single-line file path with subdued directories, a primary filename, and the full path on hover. Fitting paths align left; clipped paths preserve their suffix with a left-edge fade that updates on path and size changes. |
|
|
55
55
|
| `StateDot` | Solid green `done`, amber `warning`, red `error`, and neutral-grey `idle` marks in a 10px slot, plus a tertiary-grey 14px rotating `ongoing` loader whose animations pin to document time zero on mount and on every animation restart, such as a list reorder, so every visible loader rotates in phase. `aria-hidden`, so the render site owns the name. `appearance="step"` shows a filled check for completion and a hollow pending circle. |
|
|
56
56
|
| `ConnectionIndicator` | Inline connection-recovery control across outage, retry, and recovered states. |
|
|
57
|
-
| `DisclosureRow` | 24px compact disclosure that lays title and content side by side. The header supplies tertiary at rest and secondary on hover; text and icons inherit it regardless of expandability or open state unless the caller supplies a feature-specific override. Semantic status colors remain explicit. Collapsed rows preview a down chevron on hover, and expanded rows keep an up chevron visible. Memoized with shallow prop comparison; keep callbacks and React-node props stable when their content is unchanged. |
|
|
57
|
+
| `DisclosureRow` | 24px compact disclosure that lays title and content side by side. The header supplies tertiary at rest and secondary on hover; text and icons inherit it regardless of expandability or open state unless the caller supplies a feature-specific override. Semantic status colors remain explicit. Collapsed rows preview a down chevron on hover, and expanded rows keep an up chevron visible. `headerAccessory` places an independent action outside the disclosure target and shimmer; with an accessory, the title row shrinks to its content width. Memoized with shallow prop comparison; keep callbacks and React-node props stable when their content is unchanged. |
|
|
58
58
|
| `TextShimmer` | One left-to-right highlight across a row’s title, separators, summary, and suffix, with a 300ms initial delay, a one-second sweep and a 500ms rest. The mask spans the content width, capped by the visible row and tilts 15° from vertical, with a flat peak and soft edges. The moving decoration stays clipped to the row without enlarging its scrollable area. Base text inherits the caller’s color, including hover changes; the theme supplies the translucent highlight. Place icons and chevrons outside `TextShimmer` so only text and separators receive the highlight. A string child uses the same retained text interface; nested `TextShimmer` instances share the outer animation. Composite children render twice while active and must have no effects or element ids. Mark separators with `data-shimmer-decoration` so their fill receives the highlight. `DisclosureRow` forwards `contentClassName` for the text area and `contentLayoutClassName` for its inner layout. The inert decorative copy is excluded from interaction, selection, and accessibility; text updates retain the animation, and reduced-motion mode keeps the static base. |
|
|
59
59
|
| `Modal` | Centered dialog over a page mask. A nested dialog can intercept keys with `onKeyDownCapture` before document Escape handlers. The tint and dialog fade in while backdrop blur stays fully applied, honoring reduced motion. Set `backdropBlur={false}` when the caller already blurs the source page. |
|
|
60
60
|
| `RiskConfirmation` | Sensitive action gated behind an explicit checkbox. |
|
|
@@ -66,6 +66,7 @@ Check this table before writing a control in a feature package. A plugin cannot
|
|
|
66
66
|
| `SettingsFormModel`, `settingsNumberField`, `settingsTextField` | The staged-edit model behind such a page over a settings scope: drafts are staged and written on save, a field is overridden by its presence in the user layer, and a save that did not land keeps its drafts. |
|
|
67
67
|
| `JsonTree`, `JsonBlock` | Read-only JSON inspection. |
|
|
68
68
|
| `MarkdownText`, `MarkdownDelegateProvider`, `CodeBlock` | Untrusted GFM with TeX math, owner-delegated HTTP(S) navigation, and highlighted code. `CodeBlock` accepts opt-in `lineNumbers`; copied source excludes the gutter, and `contentRef` exposes its stable source wrapper to an owner that uses it as a scrollport. Set `showHeader={false}` when the owner supplies its own language and copy toolbar. |
|
|
69
|
+
| `CommandText` | Selectable command or argument text; only horizontal overflow adds a named keyboard focus target. |
|
|
69
70
|
| `TerminalBlock`, `ReadBlock`, `DiffBlock`, `SearchBlock`, `WebBlock` | The agent-output card matching each tool-result intent. |
|
|
70
71
|
| `icons/*`, `FishLogo`, `BrandWordmark`, `ReferenceIconRegular`/`ReferenceIconMedium`, `LinkIconRegular`/`LinkIconMedium` | Glyphs and brand marks. The thinking glyph keeps an inset orbit within its 16px view box. Use `LinkIconMedium` for 14px clickable-link categories and known-site marks. |
|
|
71
72
|
| `PermissionIconReadOnlyRegular`/`Medium`, `PermissionIconWorkspaceWriteRegular`/`Medium`, `PermissionIconFullAccessRegular`/`Medium` | Permission-mode glyphs for read-only, workspace-write, and full-access choices. |
|
|
@@ -105,7 +106,7 @@ The nearest `MarkdownDelegateProvider` supplies optional `openExternalLink` and
|
|
|
105
106
|
|
|
106
107
|
`JsonTree` clamps collapsed strings to `collapsedStringLines` (three by default). Expanded strings show raw text, retain sibling commas, and fit within the window and outer scrolling containers. Resize and ancestor-scroll events update that limit. Row copy feedback updates independently of JSON value rendering; pending clipboard writes cannot update a different row or an unmounted tree.
|
|
107
108
|
|
|
108
|
-
`ImageLightbox` is the shared original-image modal with focus restoration and Escape dismissal. The internal thumbnail renderer receives loading/failure labels from its owner. `HoverCard.inline` keeps a file link in the text flow and uses the shared menu material, keyboard-visible focus, and placement above or below the anchor without covering it. Escape closes an open thumbnail even when focus is elsewhere; subsequent Escape presses reach the owner. `MarkdownDelegateProvider.fileImages` supplies a decoded-path resolver and complete image labels: settled image links gain hover previews, and standalone images gain lightbox activation. Image-only anchors retain their single navigation target. The parser recovers only complete, unescaped, standalone local image references with bare spaces and an unambiguous supported image suffix; code and ambiguous destinations remain literal.
|
|
109
|
+
`ImageLightbox` is the shared original-image modal with focus restoration and Escape dismissal. Like `Modal`, its mask leaves the Windows caption unpainted, and its close control sits 20px below the caption. The internal thumbnail renderer receives loading/failure labels from its owner. `HoverCard.inline` keeps a file link in the text flow and uses the shared menu material, keyboard-visible focus, and placement above or below the anchor without covering it. Escape closes an open thumbnail even when focus is elsewhere; subsequent Escape presses reach the owner. `MarkdownDelegateProvider.fileImages` supplies a decoded-path resolver and complete image labels: settled image links gain hover previews, and standalone images gain lightbox activation. Image-only anchors retain their single navigation target. The parser recovers only complete, unescaped, standalone local image references with bare spaces and an unambiguous supported image suffix; code and ambiguous destinations remain literal.
|
|
109
110
|
|
|
110
111
|
### Localizing copy
|
|
111
112
|
|
|
@@ -160,7 +161,7 @@ While a reply streams, `MarkdownText` parses incrementally: all but the trailing
|
|
|
160
161
|
|
|
161
162
|
### Geometry and overflow
|
|
162
163
|
|
|
163
|
-
The output cards share one geometry model: `white-space: pre` with horizontal scrolling so column-aligned content keeps its alignment, and a head-plus-tail slice behind an expand button past `maxLines` (default 16) so a long body never stretches the card. `TerminalBlock` parses ANSI into React spans with a per-line column buffer for cursor movement, honoring erase-in-line, tab stops, and character width. Hosts opt out of the shared geometry per surface: rebinding `--dsl-terminal-command-whitespace` / `--dsl-terminal-line-whitespace` to `pre-wrap` wraps commands and output in full with no sideways scroll, `maxLines: Infinity` disables the fold for hosts capping height through `--dsl-terminal-output-max-height` instead, `copyText` overrides the copy payload (and keeps the control rendered before any output), and `runStateDot: false` omits the run-state dot when the surrounding row already carries the state, reclaiming its gutter via `--dsl-terminal-gutter`. The banner divider follows the rendered body, so a running card that streams live output separates its command from the text like a settled card.
|
|
164
|
+
The output cards share one geometry model: `white-space: pre` with horizontal scrolling so column-aligned content keeps its alignment, and a head-plus-tail slice behind an expand button past `maxLines` (default 16) so a long body never stretches the card. `TerminalBlock` uses `CommandText` to keep each authored command line selectable and horizontally scrollable; the prompt and status stay fixed. Only horizontally overflowing text enters the Tab order as a named group, using the owner’s localized `commandLine(line)` label. Text that fits, including wrapped Jobs commands, adds no Tab stop. Size, text, and font changes update focusability without changing the scroll position. `TerminalBlock` parses ANSI into React spans with a per-line column buffer for cursor movement, honoring erase-in-line, tab stops, and character width. Hosts opt out of the shared geometry per surface: rebinding `--dsl-terminal-command-whitespace` / `--dsl-terminal-line-whitespace` to `pre-wrap` wraps commands and output in full with no sideways scroll, `maxLines: Infinity` disables the fold for hosts capping height through `--dsl-terminal-output-max-height` instead, `copyText` overrides the copy payload (and keeps the control rendered before any output), and `runStateDot: false` omits the run-state dot when the surrounding row already carries the state, reclaiming its gutter via `--dsl-terminal-gutter`. The banner divider follows the rendered body, so a running card that streams live output separates its command from the text like a settled card.
|
|
164
165
|
|
|
165
166
|
</details>
|
|
166
167
|
|
|
@@ -199,6 +200,7 @@ These limits define how the atoms behave at the edges; they are current package
|
|
|
199
200
|
- **Known-site marks are a fixed list** — only the named hosts resolve to their own mark, and every other external host keeps the globe; recognizing an arbitrary site would require fetching its icon over the network.
|
|
200
201
|
- **Streaming defers cross-boundary reference resolution** — a reference-style link or footnote whose definition sits on the other side of the incremental freeze boundary renders as literal text while the reply streams; the settled full parse at finalize resolves it.
|
|
201
202
|
- **A long highlighted fence retains its complete token DOM** — streaming avoids re-parsing, re-tokenizing, and reconciling the completed prefix, but it does not discard old colors or virtualize token spans. Final DOM cardinality therefore still follows the fence's token count; nested/container fences and a pathological single long line remain on the general tail path.
|
|
203
|
+
- **Overlong lines stay uncolored** — a source line of 1,000 or more UTF-16 units renders as one plain run in every highlighted surface, because TextMate scanning cost grows superlinearly with line length and a single generated line can otherwise block the page for seconds. The grammar state skips that line, so a comment or template literal that opens or closes on it mis-colors the following lines. Highlighting still runs synchronously during render, so a file with thousands of ordinary lines costs proportionally more.
|
|
202
204
|
- **The fish logo is a redrawn approximation** — its font glyph has no exportable vector geometry in the local design data, so a hand-authored recreation stands in until an exact export path exists.
|
|
203
205
|
- **`Pill` and `Input` have no design source** — both atoms are self-defined; the sidebar search field and view-tab strip that resemble them are consumer-owned compositions, not these atoms.
|
|
204
206
|
- **No `Active` `StateDot` variant** — the supported states are done, warning, ongoing, error, and idle.
|
package/README.zh.md
CHANGED
|
@@ -54,7 +54,7 @@ kind: "package-library"
|
|
|
54
54
|
| `PathLabel` | 单行文件路径:目录使用弱化颜色,文件名使用主色,悬停可查看完整路径。空间足够时靠左显示;溢出时保留尾部并在左侧渐隐,路径或尺寸变化时更新。 |
|
|
55
55
|
| `StateDot` | 10px 槽内的绿色 `done`、琥珀色 `warning`、红色 `error`、中性灰色 `idle` 圆点,以及 tertiary 灰色 14px 旋转 `ongoing` loading,其动画在挂载时以及每次动画重启(如列表重排)时固定到文档时间零点,所以所有可见 loading 同相旋转。它是 `aria-hidden` 的,名称由渲染点提供。 `appearance="step"` 以实心勾表示完成、空心圆表示等待。 |
|
|
56
56
|
| `ConnectionIndicator` | 行内连接恢复控件,覆盖断线、重试与已恢复三种状态。 |
|
|
57
|
-
| `DisclosureRow` | 24px 紧凑折叠行,标题与内容左右排列。标题行默认使用 tertiary,悬停时使用 secondary
|
|
57
|
+
| `DisclosureRow` | 24px 紧凑折叠行,标题与内容左右排列。标题行默认使用 tertiary,悬停时使用 secondary;文字与图标继承该颜色,不受能否展开及开合状态影响,调用方可提供功能专属覆盖。语义状态色保持显式指定。收起时悬停预览向下箭头,展开后持续显示向上箭头。`headerAccessory` 将独立操作放在折叠触发区域和流光之外;有此操作时,标题行收窄到内容宽度。使用浅层 prop 比较进行 memo;内容未变时,保持回调与 React 节点 prop 的引用稳定。 |
|
|
58
58
|
| `TextShimmer` | 同一道高光从左到右扫过一行的标题、分隔符、摘要与后缀:首次等待 300ms,扫动一秒,再静止 500ms。遮罩覆盖内容宽度,并限制在可见行宽内,相对垂直方向倾斜 15°,峰值区域平坦,两侧柔和渐隐。移动的装饰层始终裁剪在行内,不会扩大可滚动区域。底色继承调用方的颜色,包括悬停变化;主题提供半透明高光。图标和箭头放在 `TextShimmer` 外,只有文字和分隔符参与扫光。字符串子节点沿用稳定的文字接口;嵌套的 `TextShimmer` 共用外层动画。活动期间组合子节点渲染两次,因此不得带副作用或元素 id。分隔符标记 `data-shimmer-decoration`,让填色参与扫光。`DisclosureRow` 将 `contentClassName` 传给文字区域,将 `contentLayoutClassName` 传给内部布局。惰性装饰副本不参与交互、选区和无障碍访问;文字更新保留动画,减少动态效果模式保留静态底色。 |
|
|
59
59
|
| `Modal` | 页面遮罩之上的居中对话框。嵌套对话框可通过 `onKeyDownCapture` 在文档级 Escape 处理器之前拦截按键。 色层与弹窗淡入,背景模糊始终完整生效,并遵循减少动态效果偏好。调用方已模糊源页面时设置 `backdropBlur={false}`。 |
|
|
60
60
|
| `RiskConfirmation` | 以显式复选框把关的敏感操作确认。 |
|
|
@@ -66,6 +66,7 @@ kind: "package-library"
|
|
|
66
66
|
| `SettingsFormModel`、`settingsNumberField`、`settingsTextField` | 这类页面背后基于设置 scope 的暂存编辑模型:草稿先暂存、保存时写入,字段是否被覆盖看用户层是否含有它,未落地的保存保留草稿。 |
|
|
67
67
|
| `JsonTree`、`JsonBlock` | 只读 JSON 查看。 |
|
|
68
68
|
| `MarkdownText`、`MarkdownDelegateProvider`、`CodeBlock` | 不可信 GFM 与 TeX 数学、owner 委托的 HTTP(S) 导航,以及高亮代码。`CodeBlock` 可通过 `lineNumbers` 开启行号;复制的源码不含行号栏,`contentRef` 则向需要把稳定源码包装节点用作滚动区的 owner 提供该节点。调用方提供自己的语言与复制工具栏时,设置 `showHeader={false}`。 |
|
|
69
|
+
| `CommandText` | 可选中的命令或参数文本;仅横向溢出时添加具名的键盘聚焦目标。 |
|
|
69
70
|
| `TerminalBlock`、`ReadBlock`、`DiffBlock`、`SearchBlock`、`WebBlock` | 与各类工具结果意图对应的 agent 输出卡片。 |
|
|
70
71
|
| `icons/*`、`FishLogo`、`BrandWordmark`、`ReferenceIconRegular`/`ReferenceIconMedium`、`LinkIconRegular`/`LinkIconMedium` | 字形与品牌标识。思考图标的轨道在 16px 视口内保留内边距。`LinkIconMedium` 用于 14px 的可点击链接分类及已知站点标记。 |
|
|
71
72
|
| `PermissionIconReadOnlyRegular`/`Medium`、`PermissionIconWorkspaceWriteRegular`/`Medium`、`PermissionIconFullAccessRegular`/`Medium` | 只读、工作区写入与完全访问选项使用的权限模式图形。 |
|
|
@@ -105,7 +106,7 @@ kind: "package-library"
|
|
|
105
106
|
|
|
106
107
|
`JsonTree` 把折叠字符串限制为 `collapsedStringLines` 行(默认三行)。展开后显示原始文本、保留同级逗号,并限制在窗口与外层滚动容器内;尺寸变化和祖先滚动事件会更新此限制。行复制反馈独立于 JSON 值渲染更新;尚未完成的剪贴板写入不会更新另一行或已卸载的树。
|
|
107
108
|
|
|
108
|
-
`ImageLightbox` 是共享原图浮层,支持焦点恢复与 Esc
|
|
109
|
+
`ImageLightbox` 是共享原图浮层,支持焦点恢复与 Esc 关闭。与 `Modal` 相同,其遮罩不覆盖 Windows 顶栏,关闭按钮位于顶栏下方 20px。包内缩略图渲染器由调用方提供加载及失败文案。`HoverCard.inline` 使文件链接保持在文本流内,并使用共享菜单材质、键盘可见焦点,并在锚点上方或下方定位而不遮挡锚点。即使焦点位于其他位置,Esc 也会关闭已打开的缩略图;后续 Esc 按键继续传给 owner。`MarkdownDelegateProvider.fileImages` 提供已解码路径解析器与完整图片文案:消息落定后的图片链接支持悬停预览,独立图片支持点击放大。仅包含图片的链接保留单一导航目标。解析器仅恢复完整、未转义、独立成段且带明确图片扩展名的含裸空格本地图片引用;代码与有歧义的目标保持原文。
|
|
109
110
|
|
|
110
111
|
### 本地化文案
|
|
111
112
|
|
|
@@ -160,7 +161,7 @@ kind: "package-library"
|
|
|
160
161
|
|
|
161
162
|
### 几何与溢出
|
|
162
163
|
|
|
163
|
-
输出卡片共享同一套几何模型:`white-space: pre` 并横向滚动,让按列对齐的内容保持对齐;超过 `maxLines`(默认 16)时折叠为头部切片加尾部切片,由展开按钮控制,长正文不会撑高卡片。`TerminalBlock` 把 ANSI 解析为 React span,并带逐行列缓冲处理光标移动,遵循行内擦除、制表位与字符宽度。宿主可按表层选择退出共享几何:把 `--dsl-terminal-command-whitespace` / `--dsl-terminal-line-whitespace` 重绑为 `pre-wrap` 让命令与输出完整换行且不横向滚动;`maxLines: Infinity` 为改用 `--dsl-terminal-output-max-height` 限高滚动的宿主禁用折叠;`copyText` 覆盖复制载荷(并让控件在任何输出出现之前就保持渲染);`runStateDot: false` 在外围行已携带同一状态时省去状态点,并经 `--dsl-terminal-gutter` 收回其落区。横幅分割线跟随渲染出的正文:正在流式输出的 running 卡片像已结束卡片一样把命令与文本分隔开。
|
|
164
|
+
输出卡片共享同一套几何模型:`white-space: pre` 并横向滚动,让按列对齐的内容保持对齐;超过 `maxLines`(默认 16)时折叠为头部切片加尾部切片,由展开按钮控制,长正文不会撑高卡片。`TerminalBlock` 通过 `CommandText` 让每条原始命令行可选中并横向滚动;提示符和状态保持固定。只有横向溢出的文本以具名 group 进入 Tab 顺序,名称使用 owner 的本地化 `commandLine(line)` 标签。能完整显示的文本(包括 Jobs 中已换行的命令)不会添加 Tab 停靠点。尺寸、文本与字体变化会更新可聚焦状态,不改变滚动位置。`TerminalBlock` 把 ANSI 解析为 React span,并带逐行列缓冲处理光标移动,遵循行内擦除、制表位与字符宽度。宿主可按表层选择退出共享几何:把 `--dsl-terminal-command-whitespace` / `--dsl-terminal-line-whitespace` 重绑为 `pre-wrap` 让命令与输出完整换行且不横向滚动;`maxLines: Infinity` 为改用 `--dsl-terminal-output-max-height` 限高滚动的宿主禁用折叠;`copyText` 覆盖复制载荷(并让控件在任何输出出现之前就保持渲染);`runStateDot: false` 在外围行已携带同一状态时省去状态点,并经 `--dsl-terminal-gutter` 收回其落区。横幅分割线跟随渲染出的正文:正在流式输出的 running 卡片像已结束卡片一样把命令与文本分隔开。
|
|
164
165
|
|
|
165
166
|
</details>
|
|
166
167
|
|
|
@@ -199,6 +200,7 @@ kind: "package-library"
|
|
|
199
200
|
- **已知站点标记是固定列表**:只有列名的主机解析为自己的标记,其余外部主机仍使用地球;要识别任意站点需要通过网络抓取它的图标。
|
|
200
201
|
- **流式期间跨边界引用解析被推迟**:定义落在增量冻结边界另一侧的引用式链接或脚注,在回复流式输出期间渲染为字面文本;定稿时的全量解析会将其解析。
|
|
201
202
|
- **长高亮 fence 会保留完整 token DOM**:流式路径避免重新解析、重新 tokenize 和 reconcile 已完成前缀,但不会丢弃旧颜色或虚拟化 token span。因此最终 DOM 数量仍随 fence 的 token 数增长;嵌套/容器内 fence 与病态的单个超长行仍走通用尾部路径。
|
|
203
|
+
- **超长行不着色**:所有高亮界面中,长度达到 1,000 个 UTF-16 单元的源码行渲染为一段纯文本,因为 TextMate 扫描成本随行长超线性增长,单个生成行否则会阻塞页面数秒。语法状态会跳过该行,因此在该行开始或结束的注释、模板字符串会使后续行着色错误。高亮仍在渲染期间同步执行,因此数千个普通行的文件仍按比例增加开销。
|
|
202
204
|
- **鱼形标志是重新绘制的近似版本**:它来自字体字形,而本地设计数据无法导出其矢量几何;在获得精确导出路径前,使用手工重建版本代替。
|
|
203
205
|
- **`Pill` 与 `Input` 没有设计来源**:两个原子组件均自行定义;与其相似的侧边栏搜索字段和视图标签条由消费方组合,不是这些原子组件。
|
|
204
206
|
- **`StateDot` 没有 `Active` 变体**:支持的状态为 done、warning、ongoing、error 和 idle。
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.text {
|
|
2
|
+
display: block;
|
|
3
|
+
min-width: 0;
|
|
4
|
+
overflow-x: auto;
|
|
5
|
+
white-space: var(--dsl-command-whitespace, pre);
|
|
6
|
+
overflow-wrap: anywhere;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.text:focus-visible {
|
|
10
|
+
outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
|
|
11
|
+
outline-offset: -2px;
|
|
12
|
+
}
|
|
@@ -13,7 +13,22 @@
|
|
|
13
13
|
min-width: 0;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.header {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
min-width: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.header[data-has-accessory] {
|
|
23
|
+
gap: 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.header[data-has-accessory] .row {
|
|
27
|
+
flex: 0 1 auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
16
30
|
.row {
|
|
31
|
+
flex: 1 1 auto;
|
|
17
32
|
position: relative;
|
|
18
33
|
overflow: hidden;
|
|
19
34
|
display: flex;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
/* Full-viewport layer that blocks background clicks, including on the Windows caption. */
|
|
1
2
|
.backdrop {
|
|
2
3
|
position: fixed;
|
|
3
4
|
inset: 0;
|
|
4
5
|
z-index: 1000;
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Painted area below the Windows caption; like Modal, the caption stays unpainted. */
|
|
9
|
+
.stage {
|
|
10
|
+
position: absolute;
|
|
11
|
+
inset: var(--dsh-frame-chrome-top, 0px) 0 0;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
7
15
|
padding: 40px;
|
|
8
16
|
}
|
|
9
17
|
|
|
@@ -18,7 +26,7 @@
|
|
|
18
26
|
.image {
|
|
19
27
|
position: relative;
|
|
20
28
|
max-width: min(100%, 1600px);
|
|
21
|
-
max-height:
|
|
29
|
+
max-height: 100%;
|
|
22
30
|
object-fit: contain;
|
|
23
31
|
border-radius: var(--dsw-radius-lg);
|
|
24
32
|
background: var(--dsw-specific-input-major);
|
|
@@ -27,7 +35,7 @@
|
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
.close {
|
|
30
|
-
position:
|
|
38
|
+
position: absolute;
|
|
31
39
|
top: 20px;
|
|
32
40
|
right: 20px;
|
|
33
41
|
z-index: 1;
|
|
@@ -110,18 +110,11 @@
|
|
|
110
110
|
color: var(--dsw-alias-label-tertiary);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
/*
|
|
114
|
-
|
|
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`. */
|
|
113
|
+
/* Each authored command line scrolls independently of its prompt and status.
|
|
114
|
+
`pre` preserves whitespace; hosts can opt into wrapping with `pre-wrap`. */
|
|
118
115
|
.command {
|
|
119
|
-
|
|
116
|
+
--dsl-command-whitespace: var(--dsl-terminal-command-whitespace, pre);
|
|
120
117
|
color: var(--dsw-alias-label-primary);
|
|
121
|
-
overflow: hidden;
|
|
122
|
-
text-overflow: ellipsis;
|
|
123
|
-
white-space: var(--dsl-terminal-command-whitespace, pre);
|
|
124
|
-
overflow-wrap: anywhere;
|
|
125
118
|
}
|
|
126
119
|
|
|
127
120
|
/* Capped to the prompt's line height (Pill's own 24px height would exceed a
|
package/lib/index.js
CHANGED
|
@@ -42,11 +42,12 @@ import { CODE_HIGHLIGHT_EXTENSIONS, languageForPath } from "@deepseek-ai/dsh-uti
|
|
|
42
42
|
import css$27 from "./JsonTree.module.css";
|
|
43
43
|
import Anser from "anser";
|
|
44
44
|
import css$28 from "./TerminalBlock.module.css";
|
|
45
|
+
import css$29 from "./CommandText.module.css";
|
|
45
46
|
import cardCss from "./CodeCard.module.css";
|
|
46
|
-
import css$
|
|
47
|
+
import css$30 from "./ReadBlock.module.css";
|
|
47
48
|
import { structuredPatch } from "diff";
|
|
48
|
-
import css$
|
|
49
|
-
import css$
|
|
49
|
+
import css$31 from "./DiffBlock.module.css";
|
|
50
|
+
import css$32 from "./SearchBlock.module.css";
|
|
50
51
|
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
51
52
|
import { gfmFromMarkdown } from "mdast-util-gfm";
|
|
52
53
|
import { mathFromMarkdown } from "mdast-util-math";
|
|
@@ -58,13 +59,13 @@ import { classifyCharacter } from "micromark-util-classify-character";
|
|
|
58
59
|
import { codes, constants, types } from "micromark-util-symbol";
|
|
59
60
|
import { factorySpace } from "micromark-factory-space";
|
|
60
61
|
import { normalizeUri } from "micromark-util-sanitize-uri";
|
|
61
|
-
import css$
|
|
62
|
+
import css$33 from "./markdown/CodeBlock.module.css";
|
|
62
63
|
import katex from "katex";
|
|
63
|
-
import css$
|
|
64
|
-
import css$
|
|
64
|
+
import css$34 from "./ImageLightbox.module.css";
|
|
65
|
+
import css$35 from "./ImagePreview.module.css";
|
|
65
66
|
import "katex/dist/katex.min.css";
|
|
66
|
-
import css$
|
|
67
|
-
import css$
|
|
67
|
+
import css$36 from "./WebBlock.module.css";
|
|
68
|
+
import css$37 from "./markdown/JsonBlock.module.css";
|
|
68
69
|
//#region lib/types/icons/shared-artwork.js
|
|
69
70
|
/**
|
|
70
71
|
* Render new-conversation geometry — the bubble around a plus — for product icons.
|
|
@@ -3166,7 +3167,7 @@ const TextShimmer = memo(function TextShimmer({ children, active = false, classN
|
|
|
3166
3167
|
* @param props - Visual content, controlled state, and interaction policy.
|
|
3167
3168
|
* @returns the disclosure row.
|
|
3168
3169
|
*/
|
|
3169
|
-
const DisclosureRow = memo(function DisclosureRow({ icon, title, open, expandable, onToggle, running = false, expandOnRowClick = false, previewChevron = expandable, keepContentWhenOpen = false, collapsedContent, children, className, rowClassName, contentClassName, contentLayoutClassName, leadingClassName, chevronClassName, titleClassName }) {
|
|
3170
|
+
const DisclosureRow = memo(function DisclosureRow({ icon, title, open, expandable, onToggle, running = false, expandOnRowClick = false, previewChevron = expandable, keepContentWhenOpen = false, collapsedContent, headerAccessory, children, className, rowClassName, contentClassName, contentLayoutClassName, leadingClassName, chevronClassName, titleClassName }) {
|
|
3170
3171
|
const rowExpands = expandable && expandOnRowClick;
|
|
3171
3172
|
const toggleFromLeading = (event) => {
|
|
3172
3173
|
event.stopPropagation();
|
|
@@ -3186,33 +3187,38 @@ const DisclosureRow = memo(function DisclosureRow({ icon, title, open, expandabl
|
|
|
3186
3187
|
className: clsx(css$2.root, className),
|
|
3187
3188
|
"data-open": open || void 0,
|
|
3188
3189
|
children: [jsxs("div", {
|
|
3189
|
-
className:
|
|
3190
|
-
"data-disclosure-
|
|
3191
|
-
"data-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
"
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3190
|
+
className: css$2.header,
|
|
3191
|
+
"data-disclosure-header": true,
|
|
3192
|
+
"data-has-accessory": !!headerAccessory || void 0,
|
|
3193
|
+
children: [jsxs("div", {
|
|
3194
|
+
className: clsx(css$2.row, rowClassName),
|
|
3195
|
+
"data-disclosure-row": true,
|
|
3196
|
+
"data-expandable": rowExpands || void 0,
|
|
3197
|
+
role: rowExpands ? "button" : void 0,
|
|
3198
|
+
tabIndex: rowExpands ? 0 : void 0,
|
|
3199
|
+
"aria-expanded": rowExpands ? open : void 0,
|
|
3200
|
+
onClick: rowExpands ? onToggle : void 0,
|
|
3201
|
+
onKeyDown: rowExpands ? toggleFromKeyboard : void 0,
|
|
3202
|
+
children: [expandable && !rowExpands ? jsx("button", {
|
|
3203
|
+
type: "button",
|
|
3204
|
+
className: clsx(css$2.leading, leadingClassName),
|
|
3205
|
+
"aria-label": title,
|
|
3206
|
+
"aria-expanded": open,
|
|
3207
|
+
onClick: toggleFromLeading,
|
|
3208
|
+
children: leading
|
|
3209
|
+
}) : jsx("span", {
|
|
3210
|
+
className: clsx(css$2.leading, leadingClassName),
|
|
3211
|
+
children: leading
|
|
3212
|
+
}), jsxs(TextShimmer, {
|
|
3213
|
+
active: running,
|
|
3214
|
+
className: contentClassName,
|
|
3215
|
+
contentClassName: contentLayoutClassName,
|
|
3216
|
+
children: [jsx(TextShimmer, {
|
|
3217
|
+
className: clsx(css$2.title, titleClassName),
|
|
3218
|
+
children: title
|
|
3219
|
+
}), (keepContentWhenOpen || !open) && collapsedContent]
|
|
3220
|
+
})]
|
|
3221
|
+
}), headerAccessory]
|
|
3216
3222
|
}), open && children]
|
|
3217
3223
|
});
|
|
3218
3224
|
});
|
|
@@ -7700,6 +7706,15 @@ const regexEngine = createJavaScriptRegexEngine({
|
|
|
7700
7706
|
forgiving: true,
|
|
7701
7707
|
regexConstructor: (pattern) => defaultJavaScriptRegexConstructor(pattern, { lazyCompileLength: Number.POSITIVE_INFINITY })
|
|
7702
7708
|
});
|
|
7709
|
+
/**
|
|
7710
|
+
* Lines at least this many UTF-16 units long render as one uncolored token.
|
|
7711
|
+
* With the JavaScript regex engine, scanning one JavaScript string-literal
|
|
7712
|
+
* line costs about 70 ms at 1,000 units, 300 ms at 2,000, 600 ms at 5,000 and
|
|
7713
|
+
* 2.5 s at 10,000, so this cap keeps one line within a few frames. A skipped
|
|
7714
|
+
* line leaves the grammar state unchanged: a multi-line construct that opens
|
|
7715
|
+
* or closes on it colors the following lines as if the line were absent.
|
|
7716
|
+
*/
|
|
7717
|
+
const TOKENIZE_MAX_LINE_LENGTH = 1e3;
|
|
7703
7718
|
let singleton;
|
|
7704
7719
|
/** Representative paths through every boot grammar, compiled before user content is timed. */
|
|
7705
7720
|
const BOOT_GRAMMAR_WARMUPS = [
|
|
@@ -7807,7 +7822,8 @@ function highlightToHtml(code, lang) {
|
|
|
7807
7822
|
if (!ensureGrammar(resolved)) return void 0;
|
|
7808
7823
|
return highlighter().codeToHtml(code, {
|
|
7809
7824
|
lang: resolved,
|
|
7810
|
-
theme: "css-variables"
|
|
7825
|
+
theme: "css-variables",
|
|
7826
|
+
tokenizeMaxLineLength: TOKENIZE_MAX_LINE_LENGTH
|
|
7811
7827
|
});
|
|
7812
7828
|
}
|
|
7813
7829
|
/** vscode-textmate FontStyle bits shiki folds into `text-decoration` values. */
|
|
@@ -7900,6 +7916,7 @@ var StreamingHighlightSession = class {
|
|
|
7900
7916
|
return highlighter().codeToTokensBase(text, {
|
|
7901
7917
|
lang: resolved,
|
|
7902
7918
|
theme: "css-variables",
|
|
7919
|
+
tokenizeMaxLineLength: TOKENIZE_MAX_LINE_LENGTH,
|
|
7903
7920
|
...this.state === void 0 ? {} : { grammarState: this.state }
|
|
7904
7921
|
});
|
|
7905
7922
|
}
|
|
@@ -7979,7 +7996,8 @@ function highlightLines(code, lang) {
|
|
|
7979
7996
|
if (!ensureGrammar(resolved)) return void 0;
|
|
7980
7997
|
const { tokens } = highlighter().codeToTokens(code, {
|
|
7981
7998
|
lang: resolved,
|
|
7982
|
-
theme: "css-variables"
|
|
7999
|
+
theme: "css-variables",
|
|
8000
|
+
tokenizeMaxLineLength: TOKENIZE_MAX_LINE_LENGTH
|
|
7983
8001
|
});
|
|
7984
8002
|
const last = tokens[tokens.length - 1];
|
|
7985
8003
|
return (tokens.length > 1 && last !== void 0 && last.length === 0 ? tokens.slice(0, -1) : tokens).map((line) => line.map((token) => ({
|
|
@@ -9333,6 +9351,44 @@ function useCopyFeedback(text) {
|
|
|
9333
9351
|
};
|
|
9334
9352
|
}
|
|
9335
9353
|
//#endregion
|
|
9354
|
+
//#region lib/types/CommandText.js
|
|
9355
|
+
/** Selectable command text with keyboard access while horizontally overflowing. */
|
|
9356
|
+
/**
|
|
9357
|
+
* Render command text without adding Tab stops for content that fits.
|
|
9358
|
+
* @param props - Text, localized scrollport name, and owner styling.
|
|
9359
|
+
* @returns A horizontal text scrollport, named and keyboard-focusable only when overflowing.
|
|
9360
|
+
*/
|
|
9361
|
+
function CommandText({ text, label, className }) {
|
|
9362
|
+
const ref = useRef(null);
|
|
9363
|
+
const [overflow, setOverflow] = useState(false);
|
|
9364
|
+
useLayoutEffect(() => {
|
|
9365
|
+
const element = ref.current;
|
|
9366
|
+
/* v8 ignore next -- the span is rendered unconditionally. */
|
|
9367
|
+
if (element === null) return void 0;
|
|
9368
|
+
const measure = () => {
|
|
9369
|
+
setOverflow(element.scrollWidth > element.clientWidth);
|
|
9370
|
+
};
|
|
9371
|
+
measure();
|
|
9372
|
+
const observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(measure);
|
|
9373
|
+
observer?.observe(element);
|
|
9374
|
+
const fonts = "fonts" in element.ownerDocument ? element.ownerDocument.fonts : void 0;
|
|
9375
|
+
fonts?.addEventListener("loadingdone", measure);
|
|
9376
|
+
return () => {
|
|
9377
|
+
observer?.disconnect();
|
|
9378
|
+
fonts?.removeEventListener("loadingdone", measure);
|
|
9379
|
+
};
|
|
9380
|
+
}, [text]);
|
|
9381
|
+
return jsx("span", {
|
|
9382
|
+
ref,
|
|
9383
|
+
className: clsx(css$29.text, className),
|
|
9384
|
+
"data-command-text": true,
|
|
9385
|
+
tabIndex: overflow ? 0 : void 0,
|
|
9386
|
+
role: overflow ? "group" : void 0,
|
|
9387
|
+
"aria-label": overflow ? label : void 0,
|
|
9388
|
+
children: text
|
|
9389
|
+
});
|
|
9390
|
+
}
|
|
9391
|
+
//#endregion
|
|
9336
9392
|
//#region lib/types/TerminalBlock.js
|
|
9337
9393
|
/** Output lines shown before the height cap collapses the middle. */
|
|
9338
9394
|
const DEFAULT_TERMINAL_MAX_LINES = 16;
|
|
@@ -9457,9 +9513,10 @@ function TerminalBlock({ command, cwd, home, output, exitCode, signal, running =
|
|
|
9457
9513
|
className: css$28.cwd,
|
|
9458
9514
|
children: index > 0 || cwd === void 0 ? "$" : promptLabel(cwd, home)
|
|
9459
9515
|
}),
|
|
9460
|
-
jsx(
|
|
9516
|
+
jsx(CommandText, {
|
|
9461
9517
|
className: css$28.command,
|
|
9462
|
-
|
|
9518
|
+
text: line,
|
|
9519
|
+
label: copy.commandLine(index + 1)
|
|
9463
9520
|
})
|
|
9464
9521
|
]
|
|
9465
9522
|
}, index))]
|
|
@@ -9697,13 +9754,13 @@ function ReadBlock({ label, labels, lines, totalLines, lang, maxLines = 16, clas
|
|
|
9697
9754
|
const tailLines = maxLines - headLines;
|
|
9698
9755
|
const windowed = lines.length < totalLines;
|
|
9699
9756
|
const rows = (slice) => slice.map(([line, spans]) => jsxs("div", {
|
|
9700
|
-
className: css$
|
|
9757
|
+
className: css$30.line,
|
|
9701
9758
|
children: [jsx("span", {
|
|
9702
|
-
className: css$
|
|
9759
|
+
className: css$30.gutter,
|
|
9703
9760
|
"aria-hidden": true,
|
|
9704
9761
|
children: line.number
|
|
9705
9762
|
}), jsx("span", {
|
|
9706
|
-
className: css$
|
|
9763
|
+
className: css$30.content,
|
|
9707
9764
|
children: spans === void 0 ? line.text : renderSpans(spans)
|
|
9708
9765
|
})]
|
|
9709
9766
|
}, line.number));
|
|
@@ -9711,7 +9768,7 @@ function ReadBlock({ label, labels, lines, totalLines, lang, maxLines = 16, clas
|
|
|
9711
9768
|
const paired = lines.map((line, index) => [line, highlighted?.[index]]);
|
|
9712
9769
|
return jsxs("div", {
|
|
9713
9770
|
ref: rootRef,
|
|
9714
|
-
className: clsx(cardCss.card, css$
|
|
9771
|
+
className: clsx(cardCss.card, css$30.block, className),
|
|
9715
9772
|
"data-read": "",
|
|
9716
9773
|
"data-code-wrap": wrapped,
|
|
9717
9774
|
style: gutterStyle,
|
|
@@ -9733,7 +9790,7 @@ function ReadBlock({ label, labels, lines, totalLines, lang, maxLines = 16, clas
|
|
|
9733
9790
|
children: [
|
|
9734
9791
|
rows(capped ? paired.slice(0, headLines) : paired),
|
|
9735
9792
|
hidden > 0 && jsx(FoldToggle, {
|
|
9736
|
-
className: css$
|
|
9793
|
+
className: css$30.expand,
|
|
9737
9794
|
expanded,
|
|
9738
9795
|
hidden,
|
|
9739
9796
|
labels,
|
|
@@ -9755,11 +9812,11 @@ function assertNever(value) {
|
|
|
9755
9812
|
}
|
|
9756
9813
|
/** The dim class per row kind (path/gap chrome vs the diff's own +/- colors). */
|
|
9757
9814
|
const ROW_CLASS = {
|
|
9758
|
-
path: css$
|
|
9759
|
-
del: css$
|
|
9760
|
-
add: css$
|
|
9761
|
-
context: css$
|
|
9762
|
-
gap: css$
|
|
9815
|
+
path: css$31.path,
|
|
9816
|
+
del: css$31.del,
|
|
9817
|
+
add: css$31.add,
|
|
9818
|
+
context: css$31.context,
|
|
9819
|
+
gap: css$31.gap
|
|
9763
9820
|
};
|
|
9764
9821
|
/** Bound synchronous edit-graph search; one replacement consumes two edits. */
|
|
9765
9822
|
const MAX_DIFF_EDIT_LENGTH = 256;
|
|
@@ -9893,7 +9950,7 @@ function DiffBlock({ diffs, labels, maxLines = 16, className }) {
|
|
|
9893
9950
|
const head = capped ? rows.slice(0, headLines) : rows;
|
|
9894
9951
|
const tail = capped ? rows.slice(rows.length - tailLines) : [];
|
|
9895
9952
|
return jsxs("div", {
|
|
9896
|
-
className: clsx(cardCss.card, css$
|
|
9953
|
+
className: clsx(cardCss.card, css$31.block, className),
|
|
9897
9954
|
"data-diff": "",
|
|
9898
9955
|
"data-code-wrap": wrapped,
|
|
9899
9956
|
children: [jsx(CodeToolbar, {
|
|
@@ -9908,21 +9965,21 @@ function DiffBlock({ diffs, labels, maxLines = 16, className }) {
|
|
|
9908
9965
|
setWrapped((value) => !value);
|
|
9909
9966
|
}
|
|
9910
9967
|
}), jsxs("div", {
|
|
9911
|
-
className: css$
|
|
9968
|
+
className: css$31.body,
|
|
9912
9969
|
children: [
|
|
9913
9970
|
head.map((row, index) => jsx("div", {
|
|
9914
|
-
className: clsx(css$
|
|
9971
|
+
className: clsx(css$31.line, ROW_CLASS[row.kind]),
|
|
9915
9972
|
children: row.text
|
|
9916
9973
|
}, index)),
|
|
9917
9974
|
hidden > 0 && jsx(FoldToggle, {
|
|
9918
|
-
className: css$
|
|
9975
|
+
className: css$31.expand,
|
|
9919
9976
|
expanded,
|
|
9920
9977
|
hidden,
|
|
9921
9978
|
labels,
|
|
9922
9979
|
onToggle
|
|
9923
9980
|
}),
|
|
9924
9981
|
tail.map((row, index) => jsx("div", {
|
|
9925
|
-
className: clsx(css$
|
|
9982
|
+
className: clsx(css$31.line, ROW_CLASS[row.kind]),
|
|
9926
9983
|
children: row.text
|
|
9927
9984
|
}, index))
|
|
9928
9985
|
]
|
|
@@ -10052,56 +10109,56 @@ function SearchBlock(props) {
|
|
|
10052
10109
|
const tail = tailHeader === void 0 ? naturalTail : naturalTail.slice(1);
|
|
10053
10110
|
const renderRow = (row) => {
|
|
10054
10111
|
if (row.type === "path") return jsx("div", {
|
|
10055
|
-
className: css$
|
|
10112
|
+
className: css$32.line,
|
|
10056
10113
|
children: row.path
|
|
10057
10114
|
});
|
|
10058
10115
|
if (row.type === "match") return jsxs("div", {
|
|
10059
|
-
className: css$
|
|
10116
|
+
className: css$32.line,
|
|
10060
10117
|
children: [jsxs("span", {
|
|
10061
|
-
className: css$
|
|
10118
|
+
className: css$32.lineNumber,
|
|
10062
10119
|
children: [row.lineNumber, ": "]
|
|
10063
10120
|
}), row.line]
|
|
10064
10121
|
});
|
|
10065
10122
|
return jsxs("button", {
|
|
10066
10123
|
type: "button",
|
|
10067
|
-
className: css$
|
|
10124
|
+
className: css$32.fileHeader,
|
|
10068
10125
|
"aria-expanded": !row.collapsed,
|
|
10069
10126
|
onClick: () => {
|
|
10070
10127
|
toggleFile(row.index);
|
|
10071
10128
|
},
|
|
10072
10129
|
children: [jsx("span", {
|
|
10073
|
-
className: css$
|
|
10130
|
+
className: css$32.filePath,
|
|
10074
10131
|
children: row.path
|
|
10075
10132
|
}), jsx("span", {
|
|
10076
|
-
className: css$
|
|
10133
|
+
className: css$32.fileCount,
|
|
10077
10134
|
children: row.count
|
|
10078
10135
|
})]
|
|
10079
10136
|
});
|
|
10080
10137
|
};
|
|
10081
10138
|
return jsxs("div", {
|
|
10082
|
-
className: clsx(css$
|
|
10139
|
+
className: clsx(css$32.block, className),
|
|
10083
10140
|
"data-search": props.kind,
|
|
10084
10141
|
children: [jsxs("div", {
|
|
10085
|
-
className: css$
|
|
10142
|
+
className: css$32.header,
|
|
10086
10143
|
children: [jsx("span", {
|
|
10087
|
-
className: css$
|
|
10144
|
+
className: css$32.summary,
|
|
10088
10145
|
children: summaryText(props, shown, truncated, total)
|
|
10089
10146
|
}), !empty && jsx("button", {
|
|
10090
10147
|
type: "button",
|
|
10091
|
-
className: css$
|
|
10148
|
+
className: css$32.copyButton,
|
|
10092
10149
|
onClick: onCopy,
|
|
10093
10150
|
children: copied ? props.labels.copied : props.labels.copy
|
|
10094
10151
|
})]
|
|
10095
10152
|
}), empty ? jsx("div", {
|
|
10096
|
-
className: css$
|
|
10153
|
+
className: css$32.empty,
|
|
10097
10154
|
children: props.labels.noResults
|
|
10098
10155
|
}) : jsxs("div", {
|
|
10099
|
-
className: css$
|
|
10156
|
+
className: css$32.body,
|
|
10100
10157
|
children: [
|
|
10101
10158
|
head.map((row) => jsx("div", { children: renderRow(row) }, rowKey(row))),
|
|
10102
10159
|
hidden > 0 && jsx("button", {
|
|
10103
10160
|
type: "button",
|
|
10104
|
-
className: css$
|
|
10161
|
+
className: css$32.expand,
|
|
10105
10162
|
"aria-expanded": expanded,
|
|
10106
10163
|
"aria-label": expanded ? props.labels.collapseAria : props.labels.expandAria(hidden),
|
|
10107
10164
|
onClick: onToggle,
|
|
@@ -10931,7 +10988,7 @@ function CodeBlock({ code, lang, streaming, className, contentRef, lineNumbers =
|
|
|
10931
10988
|
});
|
|
10932
10989
|
}, [copied, trimmed]);
|
|
10933
10990
|
const body = streamedBody !== void 0 ? streamedBody : html === void 0 ? jsx("pre", {
|
|
10934
|
-
className: css$
|
|
10991
|
+
className: css$33.plain,
|
|
10935
10992
|
children: jsx("code", { children: sourceLines === void 0 ? trimmed : sourceLines.map((line, index) => jsxs(Fragment$1, { children: [index > 0 && "\n", jsx("span", {
|
|
10936
10993
|
className: "line",
|
|
10937
10994
|
children: line
|
|
@@ -10939,12 +10996,12 @@ function CodeBlock({ code, lang, streaming, className, contentRef, lineNumbers =
|
|
|
10939
10996
|
}) : jsx("div", { dangerouslySetInnerHTML: { __html: html } });
|
|
10940
10997
|
return jsxs("div", {
|
|
10941
10998
|
ref: rootRef,
|
|
10942
|
-
className: clsx(css$
|
|
10999
|
+
className: clsx(css$33.block, "md-code-block", lineNumbers && css$33.numbered, toolbarLabels !== void 0 && css$33.card, className),
|
|
10943
11000
|
"data-line-numbers": lineNumbers || void 0,
|
|
10944
11001
|
"data-code-wrap": toolbarLabels === void 0 ? void 0 : wrapped,
|
|
10945
11002
|
style: sourceLines === void 0 ? void 0 : { "--dsl-code-block-line-number-width": `${Math.max(2, String(sourceLines.length).length)}ch` },
|
|
10946
11003
|
children: [showHeader && jsx("div", {
|
|
10947
|
-
className: css$
|
|
11004
|
+
className: css$33.bannerWrap,
|
|
10948
11005
|
children: toolbarLabels !== void 0 ? jsx(CodeToolbar, {
|
|
10949
11006
|
lang,
|
|
10950
11007
|
labels: toolbarLabels,
|
|
@@ -10957,16 +11014,16 @@ function CodeBlock({ code, lang, streaming, className, contentRef, lineNumbers =
|
|
|
10957
11014
|
setWrapped((value) => !value);
|
|
10958
11015
|
} : void 0
|
|
10959
11016
|
}) : jsxs("div", {
|
|
10960
|
-
className: css$
|
|
11017
|
+
className: css$33.banner,
|
|
10961
11018
|
"data-code-block-banner": true,
|
|
10962
11019
|
children: [jsx("div", {
|
|
10963
|
-
className: css$
|
|
11020
|
+
className: css$33.infostring,
|
|
10964
11021
|
children: lang ?? ""
|
|
10965
11022
|
}), jsx("div", {
|
|
10966
|
-
className: css$
|
|
11023
|
+
className: css$33.action,
|
|
10967
11024
|
children: jsx("button", {
|
|
10968
11025
|
type: "button",
|
|
10969
|
-
className: css$
|
|
11026
|
+
className: css$33.copyButton,
|
|
10970
11027
|
onClick: onCopy,
|
|
10971
11028
|
children: copied ? copiedLabel : copyLabel
|
|
10972
11029
|
})
|
|
@@ -10974,7 +11031,7 @@ function CodeBlock({ code, lang, streaming, className, contentRef, lineNumbers =
|
|
|
10974
11031
|
})
|
|
10975
11032
|
}), jsx("div", {
|
|
10976
11033
|
ref: contentRef,
|
|
10977
|
-
className: css$
|
|
11034
|
+
className: css$33.content,
|
|
10978
11035
|
"data-code-block-content": true,
|
|
10979
11036
|
children: body
|
|
10980
11037
|
})]
|
|
@@ -11163,31 +11220,34 @@ function ImageLightbox({ src, alt, labels, onClose }) {
|
|
|
11163
11220
|
restoreRef.current?.focus();
|
|
11164
11221
|
};
|
|
11165
11222
|
}, [onClose]);
|
|
11166
|
-
return createPortal(
|
|
11167
|
-
className: css$
|
|
11223
|
+
return createPortal(jsx("div", {
|
|
11224
|
+
className: css$34.backdrop,
|
|
11168
11225
|
role: "dialog",
|
|
11169
11226
|
"aria-modal": "true",
|
|
11170
11227
|
"aria-label": labels.dialog,
|
|
11171
|
-
children:
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
"
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11228
|
+
children: jsxs("div", {
|
|
11229
|
+
className: css$34.stage,
|
|
11230
|
+
children: [
|
|
11231
|
+
jsx("div", {
|
|
11232
|
+
className: css$34.mask,
|
|
11233
|
+
"aria-hidden": "true",
|
|
11234
|
+
onMouseDown: onClose
|
|
11235
|
+
}),
|
|
11236
|
+
jsx("img", {
|
|
11237
|
+
className: css$34.image,
|
|
11238
|
+
src,
|
|
11239
|
+
alt
|
|
11240
|
+
}),
|
|
11241
|
+
jsx("button", {
|
|
11242
|
+
ref: closeRef,
|
|
11243
|
+
type: "button",
|
|
11244
|
+
className: css$34.close,
|
|
11245
|
+
"aria-label": labels.close,
|
|
11246
|
+
onClick: onClose,
|
|
11247
|
+
children: jsx(IconCloseOutlineRegular, { size: 16 })
|
|
11248
|
+
})
|
|
11249
|
+
]
|
|
11250
|
+
})
|
|
11191
11251
|
}), document.body);
|
|
11192
11252
|
}
|
|
11193
11253
|
//#endregion
|
|
@@ -11209,14 +11269,14 @@ function ImagePreview({ src, alt, loadingLabel, failedLabel }) {
|
|
|
11209
11269
|
function Preview({ src, alt, loadingLabel, failedLabel }) {
|
|
11210
11270
|
const [state, setState] = useState("loading");
|
|
11211
11271
|
return jsxs("span", {
|
|
11212
|
-
className: css$
|
|
11272
|
+
className: css$35.frame,
|
|
11213
11273
|
children: [state !== "failed" && jsx("img", {
|
|
11214
11274
|
src,
|
|
11215
11275
|
alt,
|
|
11216
11276
|
loading: "lazy",
|
|
11217
11277
|
decoding: "async",
|
|
11218
11278
|
referrerPolicy: "no-referrer",
|
|
11219
|
-
className: css$
|
|
11279
|
+
className: css$35.image,
|
|
11220
11280
|
"data-ready": state === "ready" || void 0,
|
|
11221
11281
|
onLoad: () => {
|
|
11222
11282
|
setState("ready");
|
|
@@ -11225,7 +11285,7 @@ function Preview({ src, alt, loadingLabel, failedLabel }) {
|
|
|
11225
11285
|
setState("failed");
|
|
11226
11286
|
}
|
|
11227
11287
|
}), state !== "ready" && jsxs("span", {
|
|
11228
|
-
className: css$
|
|
11288
|
+
className: css$35.status,
|
|
11229
11289
|
role: "status",
|
|
11230
11290
|
children: [state === "loading" && jsx(IconLoadingOutlineRegular, { size: 16 }), jsx("span", { children: state === "loading" ? loadingLabel : failedLabel })]
|
|
11231
11291
|
})]
|
|
@@ -11964,7 +12024,7 @@ function SafeLink({ url, label, className }) {
|
|
|
11964
12024
|
children: [jsx(LinkIconMedium, {
|
|
11965
12025
|
kind: "url",
|
|
11966
12026
|
href,
|
|
11967
|
-
className: css$
|
|
12027
|
+
className: css$36.linkIcon
|
|
11968
12028
|
}), label]
|
|
11969
12029
|
});
|
|
11970
12030
|
}
|
|
@@ -11979,20 +12039,20 @@ function SafeLink({ url, label, className }) {
|
|
|
11979
12039
|
*/
|
|
11980
12040
|
function SourceItem({ source, ordinal }) {
|
|
11981
12041
|
return jsxs("li", {
|
|
11982
|
-
className: css$
|
|
12042
|
+
className: css$36.source,
|
|
11983
12043
|
value: ordinal,
|
|
11984
12044
|
children: [
|
|
11985
12045
|
jsx(SafeLink, {
|
|
11986
12046
|
url: source.url,
|
|
11987
12047
|
label: linkLabel(source.url, source.title),
|
|
11988
|
-
className: css$
|
|
12048
|
+
className: css$36.sourceLink
|
|
11989
12049
|
}),
|
|
11990
12050
|
source.snippet !== void 0 && source.snippet !== "" && jsx("div", {
|
|
11991
|
-
className: css$
|
|
12051
|
+
className: css$36.snippet,
|
|
11992
12052
|
children: source.snippet
|
|
11993
12053
|
}),
|
|
11994
12054
|
source.publishedAt !== void 0 && source.publishedAt !== "" && jsx("div", {
|
|
11995
|
-
className: css$
|
|
12055
|
+
className: css$36.published,
|
|
11996
12056
|
children: source.publishedAt
|
|
11997
12057
|
})
|
|
11998
12058
|
]
|
|
@@ -12007,28 +12067,28 @@ function SourceItem({ source, ordinal }) {
|
|
|
12007
12067
|
function WebSearchBlock({ answer, sources, truncated, labels, className }) {
|
|
12008
12068
|
const empty = (answer === void 0 || answer === "") && sources.length === 0;
|
|
12009
12069
|
return jsxs("div", {
|
|
12010
|
-
className: clsx(css$
|
|
12070
|
+
className: clsx(css$36.block, className),
|
|
12011
12071
|
"data-web": "search",
|
|
12012
12072
|
children: [
|
|
12013
12073
|
answer !== void 0 && answer !== "" && jsx("div", {
|
|
12014
|
-
className: css$
|
|
12074
|
+
className: css$36.answer,
|
|
12015
12075
|
children: jsx(MarkdownText, {
|
|
12016
12076
|
text: answer,
|
|
12017
12077
|
labels: labels.markdown
|
|
12018
12078
|
})
|
|
12019
12079
|
}),
|
|
12020
12080
|
empty ? jsx("div", {
|
|
12021
|
-
className: css$
|
|
12081
|
+
className: css$36.empty,
|
|
12022
12082
|
children: labels.noResults
|
|
12023
12083
|
}) : jsx("ol", {
|
|
12024
|
-
className: css$
|
|
12084
|
+
className: css$36.sources,
|
|
12025
12085
|
children: sources.map((source, index) => jsx(SourceItem, {
|
|
12026
12086
|
source,
|
|
12027
12087
|
ordinal: index + 1
|
|
12028
12088
|
}, index))
|
|
12029
12089
|
}),
|
|
12030
12090
|
truncated && jsx("div", {
|
|
12031
|
-
className: css$
|
|
12091
|
+
className: css$36.truncated,
|
|
12032
12092
|
children: labels.sourcesTruncated
|
|
12033
12093
|
})
|
|
12034
12094
|
]
|
|
@@ -12041,23 +12101,23 @@ function WebSearchBlock({ answer, sources, truncated, labels, className }) {
|
|
|
12041
12101
|
*/
|
|
12042
12102
|
function WebFetchBlock({ url, statusCode, truncated, labels, className }) {
|
|
12043
12103
|
return jsxs("div", {
|
|
12044
|
-
className: clsx(css$
|
|
12104
|
+
className: clsx(css$36.block, css$36.fetch, className),
|
|
12045
12105
|
"data-web": "fetch",
|
|
12046
12106
|
children: [jsx(SafeLink, {
|
|
12047
12107
|
url,
|
|
12048
12108
|
label: url,
|
|
12049
|
-
className: css$
|
|
12109
|
+
className: css$36.fetchUrl
|
|
12050
12110
|
}), jsxs("div", {
|
|
12051
|
-
className: css$
|
|
12111
|
+
className: css$36.fetchMeta,
|
|
12052
12112
|
children: [jsxs("span", {
|
|
12053
|
-
className: css$
|
|
12113
|
+
className: css$36.status,
|
|
12054
12114
|
children: [
|
|
12055
12115
|
labels.http,
|
|
12056
12116
|
" ",
|
|
12057
12117
|
statusCode
|
|
12058
12118
|
]
|
|
12059
12119
|
}), truncated && jsx("span", {
|
|
12060
|
-
className: css$
|
|
12120
|
+
className: css$36.truncated,
|
|
12061
12121
|
children: labels.contentTruncated
|
|
12062
12122
|
})]
|
|
12063
12123
|
})]
|
|
@@ -12091,10 +12151,10 @@ function JsonBlock({ label, payload, defaultOpen = false, truncatedLabel }) {
|
|
|
12091
12151
|
truncatedLabel
|
|
12092
12152
|
]);
|
|
12093
12153
|
return jsxs("div", {
|
|
12094
|
-
className: css$
|
|
12154
|
+
className: css$37.root,
|
|
12095
12155
|
children: [jsxs("button", {
|
|
12096
12156
|
type: "button",
|
|
12097
|
-
className: css$
|
|
12157
|
+
className: css$37.toggle,
|
|
12098
12158
|
onClick: () => {
|
|
12099
12159
|
setOpen((v) => !v);
|
|
12100
12160
|
},
|
|
@@ -12104,7 +12164,7 @@ function JsonBlock({ label, payload, defaultOpen = false, truncatedLabel }) {
|
|
|
12104
12164
|
label
|
|
12105
12165
|
]
|
|
12106
12166
|
}), open && jsx("pre", {
|
|
12107
|
-
className: css$
|
|
12167
|
+
className: css$37.body,
|
|
12108
12168
|
children: body
|
|
12109
12169
|
})]
|
|
12110
12170
|
});
|
|
@@ -12445,6 +12505,6 @@ function GuideArtworkFiles({ size = 36, className }) {
|
|
|
12445
12505
|
});
|
|
12446
12506
|
}
|
|
12447
12507
|
//#endregion
|
|
12448
|
-
export { BrandWordmark, Button, CODE_HIGHLIGHT_EXTENSIONS, Checkbox, CodeBlock, ConnectionIndicator, DEFAULT_DIFF_MAX_LINES, DEFAULT_READ_MAX_LINES, DEFAULT_SEARCH_MAX_LINES, DEFAULT_TERMINAL_MAX_LINES, DiffBlock, DisclosureRow, FISH_LOGO_PATH, FISH_LOGO_VIEWBOX, FileTypeIcon, FishLogo, GuideArtworkBrowser, GuideArtworkFiles, HoverCard, ICON_MEDIUM_STROKE, ICON_REGULAR_STROKE, IconAgentPresetOutlineMedium, IconAgentPresetOutlineRegular, IconAlarmClockOutlineMedium, IconAlarmClockOutlineRegular, IconApiOutlineMedium, IconApiOutlineRegular, IconArchiveCheckOutlineMedium, IconArchiveCheckOutlineRegular, IconArchiveOffOutlineMedium, IconArchiveOffOutlineRegular, IconArchiveOutlineMedium, IconArchiveOutlineRegular, IconBranchOutlineMedium, IconBranchOutlineRegular, IconBrowseOutlineMedium, IconBrowseOutlineRegular, IconCheckCircleFillMedium, IconCheckCircleFillRegular, IconCheckCircleOutlineMedium, IconCheckCircleOutlineRegular, IconCheckOutlineMedium, IconCheckOutlineRegular, IconChecklistOutlineMedium, IconChecklistOutlineRegular, IconChevronDownOutlineMedium, IconChevronDownOutlineRegular, IconChevronLeftOutlineMedium, IconChevronLeftOutlineRegular, IconChevronRightOutlineMedium, IconChevronRightOutlineRegular, IconChevronUpOutlineMedium, IconChevronUpOutlineRegular, IconChevronsUpDownOutlineMedium, IconChevronsUpDownOutlineRegular, IconClockOutlineMedium, IconClockOutlineRegular, IconCloseCircleFillMedium, IconCloseCircleFillRegular, IconCloseFillMedium, IconCloseFillRegular, IconCloseOutlineMedium, IconCloseOutlineRegular, IconCodeOutlineMedium, IconCodeOutlineRegular, IconCompactOutlineMedium, IconCompactOutlineRegular, IconCompareSplitOutlineMedium, IconCompareSplitOutlineRegular, IconContextInjectionOutlineMedium, IconContextInjectionOutlineRegular, IconCopyOutlineMedium, IconCopyOutlineRegular, IconCordisPluginOutlineMedium, IconCordisPluginOutlineRegular, IconDarkOutlineMedium, IconDarkOutlineRegular, IconDataOutlineMedium, IconDataOutlineRegular, IconDatabaseOutlineMedium, IconDatabaseOutlineRegular, IconDeliverDocMedium, IconDeliverDocRegular, IconDislikeFillMedium, IconDislikeFillRegular, IconDislikeOutlineMedium, IconDislikeOutlineRegular, IconDownloadOutlineMedium, IconDownloadOutlineRegular, IconEditOutlineMedium, IconEditOutlineRegular, IconEllipsisOutlineMedium, IconEllipsisOutlineRegular, IconEnhanceOutlineMedium, IconEnhanceOutlineRegular, IconFlatListOutlineMedium, IconFlatListOutlineRegular, IconFolderCloseMedium, IconFolderCloseRegular, IconFolderOpenMedium, IconFolderOpenOutlineMedium, IconFolderOpenOutlineRegular, IconFolderOpenRegular, IconFollowsystemOutlineMedium, IconFollowsystemOutlineRegular, IconFullscreenOutlineMedium, IconFullscreenOutlineRegular, IconGaugeOutlineMedium, IconGaugeOutlineRegular, IconGlobeOutlineMedium, IconGlobeOutlineRegular, IconGoalOutlineMedium, IconGoalOutlineRegular, IconInfoOutlineMedium, IconInfoOutlineRegular, IconInspectOutlineMedium, IconInspectOutlineRegular, IconLightOutlineMedium, IconLightOutlineRegular, IconLikeFillMedium, IconLikeFillRegular, IconLikeOutlineMedium, IconLikeOutlineRegular, IconLinkOutlineMedium, IconLinkOutlineRegular, IconListPenOutlineMedium, IconListPenOutlineRegular, IconLoadingOutlineMedium, IconLoadingOutlineRegular, IconMicrophoneOutlineMedium, IconMicrophoneOutlineRegular, IconNewChatOutlineMedium, IconNewChatOutlineRegular, IconNowrapFillMedium, IconNowrapFillRegular, IconPanelLeftOutlineMedium, IconPanelLeftOutlineRegular, IconPaperPlaneOutlineMedium, IconPaperPlaneOutlineRegular, IconPaperclipOutlineMedium, IconPaperclipOutlineRegular, IconPauseOutlineMedium, IconPauseOutlineRegular, IconPersonalizationOutlineMedium, IconPersonalizationOutlineRegular, IconPinFillMedium, IconPinFillRegular, IconPinOutlineMedium, IconPinOutlineRegular, IconPlanOutlineMedium, IconPlanOutlineRegular, IconPlayOutlineMedium, IconPlayOutlineRegular, IconPluginPinwheelOutlineMedium, IconPluginPinwheelOutlineRegular, IconPlusOutlineMedium, IconPlusOutlineRegular, IconProjectAddOutlineMedium, IconProjectAddOutlineRegular, IconQuestionOutlineMedium, IconQuestionOutlineRegular, IconQueueOutlineMedium, IconQueueOutlineRegular, IconRefreshOutlineMedium, IconRefreshOutlineRegular, IconRightUpOutlineMedium, IconRightUpOutlineRegular, IconSearchOutlineMedium, IconSearchOutlineRegular, IconSendOutlineMedium, IconSendOutlineRegular, IconSettingsOutlineMedium, IconSettingsOutlineRegular, IconShareOutlineMedium, IconShareOutlineRegular, IconShieldOutlineMedium, IconShieldOutlineRegular, IconSkillOutlineMedium, IconSkillOutlineRegular, IconSlidersTwoOutlineMedium, IconSlidersTwoOutlineRegular, IconSparkleMedium, IconSparkleRegular, IconStopFillMedium, IconStopFillRegular, IconThinkOutlineMedium, IconThinkOutlineRegular, IconTrashOutlineMedium, IconTrashOutlineRegular, IconTreeCornerMedium, IconTreeCornerRegular, IconTriangleRightFillMedium, IconTriangleRightFillRegular, IconUnarchiveOutlineMedium, IconUnarchiveOutlineRegular, IconUserOutlineMedium, IconUserOutlineRegular, IconUsersOutlineMedium, IconUsersOutlineRegular, IconWarningOutlineMedium, IconWarningOutlineRegular, IconWarningTriangleOutlineMedium, IconWarningTriangleOutlineRegular, IconWorkspaceTreeOutlineMedium, IconWorkspaceTreeOutlineRegular, IconWrapFillMedium, IconWrapFillRegular, IconWrapLinesOutlineMedium, IconWrapLinesOutlineRegular, ImageLightbox, InlineEditor, Input, JsonBlock, JsonTree, LinkIconMedium, LinkIconRegular, MarkdownDelegateProvider, MarkdownText, Menu, MenuGroup, MenuItemButton, MenuSurface, Modal, PathLabel, PermissionIconFullAccessMedium, PermissionIconFullAccessRegular, PermissionIconReadOnlyMedium, PermissionIconReadOnlyRegular, PermissionIconWorkspaceWriteMedium, PermissionIconWorkspaceWriteRegular, Pill, PluginArtworkDefault, PluginArtworkLoop, PluginArtworkSearch, PluginArtworkSubagent, PluginArtworkTerminal, ReadBlock, ReferenceIconMedium, ReferenceIconRegular, RiskConfirmation, SHIELD_OUTLINE_PATH, SearchBlock, SegmentedControl, SegmentedTabs, SettingsForm, SettingsFormModel, SettingsSecretField, SettingsValueField, ShortcutKeys, StateDot, Switch, Tag, TerminalBlock, TextShimmer, Toast, Tooltip, WebBlock, classifyFileType, classifyLinkPath, closeTopModal, diffTotals, extractMarkdownPlainText, fileExtension, fileSizeText, focusWithoutRing, isBehindModal, isDarwinDesktop, languageForPath, modalSelector, observeComposition, observeStickyMenuGroups, pointerModality, projectUserText, rankByName, relativeTime, settingsNumberField, settingsTextField, useAnchoredMaxHeight, useAnchoredPosition, useCodeHighlighter, useDismissOnOutsidePointer, useModalLayer, writeClipboard };
|
|
12508
|
+
export { BrandWordmark, Button, CODE_HIGHLIGHT_EXTENSIONS, Checkbox, CodeBlock, CommandText, ConnectionIndicator, DEFAULT_DIFF_MAX_LINES, DEFAULT_READ_MAX_LINES, DEFAULT_SEARCH_MAX_LINES, DEFAULT_TERMINAL_MAX_LINES, DiffBlock, DisclosureRow, FISH_LOGO_PATH, FISH_LOGO_VIEWBOX, FileTypeIcon, FishLogo, GuideArtworkBrowser, GuideArtworkFiles, HoverCard, ICON_MEDIUM_STROKE, ICON_REGULAR_STROKE, IconAgentPresetOutlineMedium, IconAgentPresetOutlineRegular, IconAlarmClockOutlineMedium, IconAlarmClockOutlineRegular, IconApiOutlineMedium, IconApiOutlineRegular, IconArchiveCheckOutlineMedium, IconArchiveCheckOutlineRegular, IconArchiveOffOutlineMedium, IconArchiveOffOutlineRegular, IconArchiveOutlineMedium, IconArchiveOutlineRegular, IconBranchOutlineMedium, IconBranchOutlineRegular, IconBrowseOutlineMedium, IconBrowseOutlineRegular, IconCheckCircleFillMedium, IconCheckCircleFillRegular, IconCheckCircleOutlineMedium, IconCheckCircleOutlineRegular, IconCheckOutlineMedium, IconCheckOutlineRegular, IconChecklistOutlineMedium, IconChecklistOutlineRegular, IconChevronDownOutlineMedium, IconChevronDownOutlineRegular, IconChevronLeftOutlineMedium, IconChevronLeftOutlineRegular, IconChevronRightOutlineMedium, IconChevronRightOutlineRegular, IconChevronUpOutlineMedium, IconChevronUpOutlineRegular, IconChevronsUpDownOutlineMedium, IconChevronsUpDownOutlineRegular, IconClockOutlineMedium, IconClockOutlineRegular, IconCloseCircleFillMedium, IconCloseCircleFillRegular, IconCloseFillMedium, IconCloseFillRegular, IconCloseOutlineMedium, IconCloseOutlineRegular, IconCodeOutlineMedium, IconCodeOutlineRegular, IconCompactOutlineMedium, IconCompactOutlineRegular, IconCompareSplitOutlineMedium, IconCompareSplitOutlineRegular, IconContextInjectionOutlineMedium, IconContextInjectionOutlineRegular, IconCopyOutlineMedium, IconCopyOutlineRegular, IconCordisPluginOutlineMedium, IconCordisPluginOutlineRegular, IconDarkOutlineMedium, IconDarkOutlineRegular, IconDataOutlineMedium, IconDataOutlineRegular, IconDatabaseOutlineMedium, IconDatabaseOutlineRegular, IconDeliverDocMedium, IconDeliverDocRegular, IconDislikeFillMedium, IconDislikeFillRegular, IconDislikeOutlineMedium, IconDislikeOutlineRegular, IconDownloadOutlineMedium, IconDownloadOutlineRegular, IconEditOutlineMedium, IconEditOutlineRegular, IconEllipsisOutlineMedium, IconEllipsisOutlineRegular, IconEnhanceOutlineMedium, IconEnhanceOutlineRegular, IconFlatListOutlineMedium, IconFlatListOutlineRegular, IconFolderCloseMedium, IconFolderCloseRegular, IconFolderOpenMedium, IconFolderOpenOutlineMedium, IconFolderOpenOutlineRegular, IconFolderOpenRegular, IconFollowsystemOutlineMedium, IconFollowsystemOutlineRegular, IconFullscreenOutlineMedium, IconFullscreenOutlineRegular, IconGaugeOutlineMedium, IconGaugeOutlineRegular, IconGlobeOutlineMedium, IconGlobeOutlineRegular, IconGoalOutlineMedium, IconGoalOutlineRegular, IconInfoOutlineMedium, IconInfoOutlineRegular, IconInspectOutlineMedium, IconInspectOutlineRegular, IconLightOutlineMedium, IconLightOutlineRegular, IconLikeFillMedium, IconLikeFillRegular, IconLikeOutlineMedium, IconLikeOutlineRegular, IconLinkOutlineMedium, IconLinkOutlineRegular, IconListPenOutlineMedium, IconListPenOutlineRegular, IconLoadingOutlineMedium, IconLoadingOutlineRegular, IconMicrophoneOutlineMedium, IconMicrophoneOutlineRegular, IconNewChatOutlineMedium, IconNewChatOutlineRegular, IconNowrapFillMedium, IconNowrapFillRegular, IconPanelLeftOutlineMedium, IconPanelLeftOutlineRegular, IconPaperPlaneOutlineMedium, IconPaperPlaneOutlineRegular, IconPaperclipOutlineMedium, IconPaperclipOutlineRegular, IconPauseOutlineMedium, IconPauseOutlineRegular, IconPersonalizationOutlineMedium, IconPersonalizationOutlineRegular, IconPinFillMedium, IconPinFillRegular, IconPinOutlineMedium, IconPinOutlineRegular, IconPlanOutlineMedium, IconPlanOutlineRegular, IconPlayOutlineMedium, IconPlayOutlineRegular, IconPluginPinwheelOutlineMedium, IconPluginPinwheelOutlineRegular, IconPlusOutlineMedium, IconPlusOutlineRegular, IconProjectAddOutlineMedium, IconProjectAddOutlineRegular, IconQuestionOutlineMedium, IconQuestionOutlineRegular, IconQueueOutlineMedium, IconQueueOutlineRegular, IconRefreshOutlineMedium, IconRefreshOutlineRegular, IconRightUpOutlineMedium, IconRightUpOutlineRegular, IconSearchOutlineMedium, IconSearchOutlineRegular, IconSendOutlineMedium, IconSendOutlineRegular, IconSettingsOutlineMedium, IconSettingsOutlineRegular, IconShareOutlineMedium, IconShareOutlineRegular, IconShieldOutlineMedium, IconShieldOutlineRegular, IconSkillOutlineMedium, IconSkillOutlineRegular, IconSlidersTwoOutlineMedium, IconSlidersTwoOutlineRegular, IconSparkleMedium, IconSparkleRegular, IconStopFillMedium, IconStopFillRegular, IconThinkOutlineMedium, IconThinkOutlineRegular, IconTrashOutlineMedium, IconTrashOutlineRegular, IconTreeCornerMedium, IconTreeCornerRegular, IconTriangleRightFillMedium, IconTriangleRightFillRegular, IconUnarchiveOutlineMedium, IconUnarchiveOutlineRegular, IconUserOutlineMedium, IconUserOutlineRegular, IconUsersOutlineMedium, IconUsersOutlineRegular, IconWarningOutlineMedium, IconWarningOutlineRegular, IconWarningTriangleOutlineMedium, IconWarningTriangleOutlineRegular, IconWorkspaceTreeOutlineMedium, IconWorkspaceTreeOutlineRegular, IconWrapFillMedium, IconWrapFillRegular, IconWrapLinesOutlineMedium, IconWrapLinesOutlineRegular, ImageLightbox, InlineEditor, Input, JsonBlock, JsonTree, LinkIconMedium, LinkIconRegular, MarkdownDelegateProvider, MarkdownText, Menu, MenuGroup, MenuItemButton, MenuSurface, Modal, PathLabel, PermissionIconFullAccessMedium, PermissionIconFullAccessRegular, PermissionIconReadOnlyMedium, PermissionIconReadOnlyRegular, PermissionIconWorkspaceWriteMedium, PermissionIconWorkspaceWriteRegular, Pill, PluginArtworkDefault, PluginArtworkLoop, PluginArtworkSearch, PluginArtworkSubagent, PluginArtworkTerminal, ReadBlock, ReferenceIconMedium, ReferenceIconRegular, RiskConfirmation, SHIELD_OUTLINE_PATH, SearchBlock, SegmentedControl, SegmentedTabs, SettingsForm, SettingsFormModel, SettingsSecretField, SettingsValueField, ShortcutKeys, StateDot, Switch, Tag, TerminalBlock, TextShimmer, Toast, Tooltip, WebBlock, classifyFileType, classifyLinkPath, closeTopModal, diffTotals, extractMarkdownPlainText, fileExtension, fileSizeText, focusWithoutRing, isBehindModal, isDarwinDesktop, languageForPath, modalSelector, observeComposition, observeStickyMenuGroups, pointerModality, projectUserText, rankByName, relativeTime, settingsNumberField, settingsTextField, useAnchoredMaxHeight, useAnchoredPosition, useCodeHighlighter, useDismissOnOutsidePointer, useModalLayer, writeClipboard };
|
|
12449
12509
|
|
|
12450
12510
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Display text and owner-localized identification for a command scrollport. */
|
|
2
|
+
export interface CommandTextProps {
|
|
3
|
+
/** Original command or formatted command arguments, without truncation. */
|
|
4
|
+
text: string;
|
|
5
|
+
/** Accessible name while the text can scroll horizontally. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Owner typography and positioning. */
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Render command text without adding Tab stops for content that fits.
|
|
12
|
+
* @param props - Text, localized scrollport name, and owner styling.
|
|
13
|
+
* @returns A horizontal text scrollport, named and keyboard-focusable only when overflowing.
|
|
14
|
+
*/
|
|
15
|
+
export declare function CommandText({ text, label, className }: CommandTextProps): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=CommandText.d.ts.map
|
|
@@ -8,13 +8,15 @@ export interface DisclosureRowProps {
|
|
|
8
8
|
onToggle: () => void;
|
|
9
9
|
/** Animate the complete header while its owning operation is running. */
|
|
10
10
|
running?: boolean | undefined;
|
|
11
|
-
/** Makes the
|
|
11
|
+
/** Makes the title row the disclosure target; with an accessory, it shrinks to its content width. */
|
|
12
12
|
expandOnRowClick?: boolean | undefined;
|
|
13
13
|
/** Replaces the collapsed icon with a chevron while the row is hovered. */
|
|
14
14
|
previewChevron?: boolean | undefined;
|
|
15
15
|
/** Keeps `collapsedContent` inline while open. */
|
|
16
16
|
keepContentWhenOpen?: boolean | undefined;
|
|
17
17
|
collapsedContent?: ReactNode;
|
|
18
|
+
/** Independent action beside the title, outside the disclosure target and shimmer. */
|
|
19
|
+
headerAccessory?: ReactNode;
|
|
18
20
|
children?: ReactNode;
|
|
19
21
|
className?: string | undefined;
|
|
20
22
|
rowClassName?: string | undefined;
|
|
@@ -32,5 +34,5 @@ export interface DisclosureRowProps {
|
|
|
32
34
|
* @param props - Visual content, controlled state, and interaction policy.
|
|
33
35
|
* @returns the disclosure row.
|
|
34
36
|
*/
|
|
35
|
-
export declare const DisclosureRow: import("react").MemoExoticComponent<({ icon, title, open, expandable, onToggle, running, expandOnRowClick, previewChevron, keepContentWhenOpen, collapsedContent, children, className, rowClassName, contentClassName, contentLayoutClassName, leadingClassName, chevronClassName, titleClassName, }: DisclosureRowProps) => import("react").JSX.Element>;
|
|
37
|
+
export declare const DisclosureRow: import("react").MemoExoticComponent<({ icon, title, open, expandable, onToggle, running, expandOnRowClick, previewChevron, keepContentWhenOpen, collapsedContent, headerAccessory, children, className, rowClassName, contentClassName, contentLayoutClassName, leadingClassName, chevronClassName, titleClassName, }: DisclosureRowProps) => import("react").JSX.Element>;
|
|
36
38
|
//# sourceMappingURL=DisclosureRow.d.ts.map
|
|
@@ -5,6 +5,8 @@ export declare const DEFAULT_TERMINAL_MAX_LINES = 16;
|
|
|
5
5
|
* (this package is cordis-free, so copy arrives via props).
|
|
6
6
|
*/
|
|
7
7
|
export interface TerminalBlockLabels {
|
|
8
|
+
/** Accessible name for an overflowing authored command line, numbered from one. */
|
|
9
|
+
commandLine: (line: number) => string;
|
|
8
10
|
/** Status pill text for a signal-terminated command. */
|
|
9
11
|
signal: (signal: string) => string;
|
|
10
12
|
/** Status pill text for a non-zero exit code. */
|
|
@@ -33,7 +35,7 @@ export interface TerminalBlockLabels {
|
|
|
33
35
|
expand: (hidden: number) => string;
|
|
34
36
|
}
|
|
35
37
|
export interface TerminalBlockProps {
|
|
36
|
-
/** The command
|
|
38
|
+
/** The command, rendered verbatim after the prompt label; long lines scroll horizontally unless the host enables wrapping. */
|
|
37
39
|
command: string;
|
|
38
40
|
/** Working directory for the prompt label; absent renders a plain `$`. */
|
|
39
41
|
cwd?: string | undefined;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -73,6 +73,8 @@ export type { RelativeTime, RelativeTimeUnit } from './relative-time.ts';
|
|
|
73
73
|
export { JsonTree } from './JsonTree.tsx';
|
|
74
74
|
export type { JsonTreeProps, JsonTreeLabels } from './JsonTree.tsx';
|
|
75
75
|
export { TerminalBlock, DEFAULT_TERMINAL_MAX_LINES } from './TerminalBlock.tsx';
|
|
76
|
+
export { CommandText } from './CommandText.tsx';
|
|
77
|
+
export type { CommandTextProps } from './CommandText.tsx';
|
|
76
78
|
export type { TerminalBlockProps, TerminalBlockLabels } from './TerminalBlock.tsx';
|
|
77
79
|
export { ReadBlock, DEFAULT_READ_MAX_LINES } from './ReadBlock.tsx';
|
|
78
80
|
export type { ReadBlockProps, ReadBlockLine, ReadBlockLabels } from './ReadBlock.tsx';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-primitives",
|
|
3
3
|
"description": "Pure React atoms for the dsh web UI: controls, icons, markdown, and JSON inspectors (zero cordis)",
|
|
4
|
-
"version": "0.2.1-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -23,21 +23,25 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@deepseek-ai/dsh-client-store": "0.2.1-alpha.2",
|
|
26
27
|
"@types/react": "~18.3.1",
|
|
27
28
|
"@types/react-dom": "~18.3.0",
|
|
29
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1",
|
|
30
|
+
"@deepseek-ai/dsh-util-code-language": "0.2.1-alpha.2",
|
|
28
31
|
"react": "^18.2.0",
|
|
29
32
|
"clsx": "^2.0.0",
|
|
30
33
|
"diff": "^9.0.0",
|
|
31
34
|
"react-dom": "^18.2.0",
|
|
32
35
|
"anser": "^2.3.5",
|
|
33
|
-
"katex": "^0.
|
|
36
|
+
"katex": "^0.18.7",
|
|
34
37
|
"micromark-core-commonmark": "^2.0.3",
|
|
35
38
|
"micromark-util-character": "^2.1.1",
|
|
36
39
|
"micromark-util-classify-character": "^2.0.1",
|
|
37
40
|
"micromark-util-symbol": "^2.0.1",
|
|
38
41
|
"micromark-util-types": "^2.0.2",
|
|
39
|
-
"shiki": "^4.3
|
|
40
|
-
"@
|
|
42
|
+
"shiki": "^4.4.3",
|
|
43
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.2",
|
|
44
|
+
"@shikijs/langs": "^4.4.3",
|
|
41
45
|
"@types/mdast": "^4.0.4",
|
|
42
46
|
"micromark-factory-space": "^2.0.1",
|
|
43
47
|
"micromark-extension-math": "^3.1.0",
|
|
@@ -46,11 +50,7 @@
|
|
|
46
50
|
"mdast-util-math": "^3.0.0",
|
|
47
51
|
"micromark-extension-gfm": "^3.0.0",
|
|
48
52
|
"micromark-util-sanitize-uri": "^2.0.1",
|
|
49
|
-
"simple-icons": "16.31.0"
|
|
50
|
-
"@deepseek-ai/dsh-client-store": "0.2.1-alpha.1",
|
|
51
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.1",
|
|
52
|
-
"@deepseek-ai/dsh-util-code-language": "0.2.1-alpha.1",
|
|
53
|
-
"@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.1"
|
|
53
|
+
"simple-icons": "16.31.0"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
56
56
|
"lib/index.js",
|