@deepseek-ai/dsh-client-ui-primitives 0.1.2-alpha.5 → 0.1.3-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/lib/index.js CHANGED
@@ -4,29 +4,31 @@ import css from "./StateDot.module.css";
4
4
  import css$1 from "./DisclosureRow.module.css";
5
5
  import css$2 from "./Button.module.css";
6
6
  import css$3 from "./Pill.module.css";
7
- import css$4 from "./Input.module.css";
7
+ import css$4 from "./Tag.module.css";
8
+ import css$5 from "./Switch.module.css";
9
+ import css$6 from "./Input.module.css";
8
10
  import { Fragment as Fragment$1, cloneElement, createElement, memo, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
9
11
  import { createPortal } from "react-dom";
10
- import css$5 from "./Menu.module.css";
11
- import css$6 from "./HoverCard.module.css";
12
- import css$7 from "./Modal.module.css";
13
- import css$8 from "./OnboardingSurface.module.css";
14
- import css$9 from "./RiskConfirmation.module.css";
15
- import css$10 from "./ConnectionIndicator.module.css";
16
- import css$11 from "./user-text.module.css";
17
- import css$12 from "./Tooltip.module.css";
18
- import css$13 from "./Toast.module.css";
19
- import css$14 from "./JsonTree.module.css";
12
+ import css$7 from "./Menu.module.css";
13
+ import css$8 from "./HoverCard.module.css";
14
+ import css$9 from "./Modal.module.css";
15
+ import css$10 from "./OnboardingSurface.module.css";
16
+ import css$11 from "./RiskConfirmation.module.css";
17
+ import css$12 from "./ConnectionIndicator.module.css";
18
+ import css$13 from "./user-text.module.css";
19
+ import css$14 from "./Tooltip.module.css";
20
+ import css$15 from "./Toast.module.css";
21
+ import css$16 from "./JsonTree.module.css";
20
22
  import Anser from "anser";
21
- import css$15 from "./TerminalBlock.module.css";
23
+ import css$17 from "./TerminalBlock.module.css";
22
24
  import { createCssVariablesTheme, createHighlighterCoreSync } from "shiki/core";
23
25
  import { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from "shiki/engine/javascript";
24
26
  import langTs from "@shikijs/langs/typescript";
25
27
  import langBash from "@shikijs/langs/shellscript";
26
28
  import langJson from "@shikijs/langs/json";
27
- import css$16 from "./ReadBlock.module.css";
28
- import css$17 from "./DiffBlock.module.css";
29
- import css$18 from "./SearchBlock.module.css";
29
+ import css$18 from "./ReadBlock.module.css";
30
+ import css$19 from "./DiffBlock.module.css";
31
+ import css$20 from "./SearchBlock.module.css";
30
32
  import { fromMarkdown } from "mdast-util-from-markdown";
31
33
  import { gfmFromMarkdown } from "mdast-util-gfm";
32
34
  import { mathFromMarkdown } from "mdast-util-math";
@@ -38,13 +40,12 @@ import { classifyCharacter } from "micromark-util-classify-character";
38
40
  import { codes, constants, types } from "micromark-util-symbol";
39
41
  import { factorySpace } from "micromark-factory-space";
40
42
  import { normalizeUri } from "micromark-util-sanitize-uri";
41
- import css$19 from "./markdown/CodeBlock.module.css";
43
+ import css$21 from "./markdown/CodeBlock.module.css";
42
44
  import katex from "katex";
43
- import css$20 from "./markdown/MarkdownText.module.css";
45
+ import css$22 from "./markdown/MarkdownText.module.css";
44
46
  import "katex/dist/katex.min.css";
45
- import css$21 from "./WebBlock.module.css";
46
- import css$22 from "./markdown/JsonBlock.module.css";
47
- import css$23 from "./markdown/MessageText.module.css";
47
+ import css$23 from "./WebBlock.module.css";
48
+ import css$24 from "./markdown/JsonBlock.module.css";
48
49
  //#region lib/types/StateDot.js
49
50
  /** Outer 3x3 matrix cells (2px pixels on a 10px grid), clockwise from top-left. */
50
51
  const MATRIX_CELLS = [
@@ -59,7 +60,7 @@ const MATRIX_CELLS = [
59
60
  ];
60
61
  /**
61
62
  * Render a state dot.
62
- * @param props.state - which of the four states to show.
63
+ * @param props.state - which of `done`, `warning`, `ongoing`, `error`, or `idle` to show.
63
64
  * @param props.size - outer diameter in px (default 10, the figma size).
64
65
  * @param props.className - extra class for layout placement.
65
66
  * @returns the dot element (aria-hidden; pair with text for accessibility).
@@ -1562,6 +1563,50 @@ function Pill({ active = false, className, children, onClick, ...rest }) {
1562
1563
  });
1563
1564
  }
1564
1565
  //#endregion
1566
+ //#region lib/types/Tag.js
1567
+ /**
1568
+ * Render a read-only tag.
1569
+ * @param props.tone - which palette to use (default `outline`).
1570
+ * @param props.className - extra class for layout placement.
1571
+ * @param props.children - the localized label, owned by the render site.
1572
+ * @returns the tag element.
1573
+ */
1574
+ function Tag({ tone = "outline", className, children }) {
1575
+ return jsx("span", {
1576
+ className: clsx(css$4.tag, className),
1577
+ "data-tone": tone,
1578
+ children
1579
+ });
1580
+ }
1581
+ //#endregion
1582
+ //#region lib/types/Switch.js
1583
+ /**
1584
+ * Render a toggle switch.
1585
+ * @param props.checked - the current state; the control is fully controlled.
1586
+ * @param props.onChange - called with the state the click asks for.
1587
+ * @param props.label - localized accessible name, owned by the render site.
1588
+ * @param props.disabled - whether the control refuses input; owners also set it
1589
+ * while a write is in flight, not only when a deployment locks the toggle.
1590
+ * @param props.title - localized hover text, typically why the toggle is locked.
1591
+ * @param props.className - extra class for layout placement.
1592
+ * @returns the switch element.
1593
+ */
1594
+ function Switch({ checked, onChange, label, disabled = false, title, className }) {
1595
+ return jsx("button", {
1596
+ type: "button",
1597
+ role: "switch",
1598
+ "aria-checked": checked,
1599
+ "aria-label": label,
1600
+ title,
1601
+ disabled,
1602
+ className: clsx(css$5.switch, className),
1603
+ onClick: () => {
1604
+ onChange(!checked);
1605
+ },
1606
+ children: jsx("span", { className: css$5.thumb })
1607
+ });
1608
+ }
1609
+ //#endregion
1565
1610
  //#region lib/types/Input.js
1566
1611
  /**
1567
1612
  * Render a text input with an optional leading icon.
@@ -1570,12 +1615,12 @@ function Pill({ active = false, className, children, onClick, ...rest }) {
1570
1615
  */
1571
1616
  function Input({ icon, className, ...rest }) {
1572
1617
  return jsxs("span", {
1573
- className: clsx(css$4.wrap, className),
1618
+ className: clsx(css$6.wrap, className),
1574
1619
  children: [icon != null && jsx("span", {
1575
- className: css$4.icon,
1620
+ className: css$6.icon,
1576
1621
  children: icon
1577
1622
  }), jsx("input", {
1578
- className: css$4.input,
1623
+ className: css$6.input,
1579
1624
  ...rest
1580
1625
  })]
1581
1626
  });
@@ -1652,9 +1697,13 @@ const MEASURE_STYLE = {
1652
1697
  * scroll/resize; return null to skip placement for that frame.
1653
1698
  * @param props.footer - rows pinned below the scrolling items area, separated
1654
1699
  * by a hairline; they stay visible while the items above scroll.
1700
+ * @param props.selection - how a selected row is marked: a trailing check
1701
+ * (`'check'`, default — figma .Menu_cell) or the hover fill held on the row
1702
+ * with no check (`'fill'`, for icon-labelled rows where a trailing glyph
1703
+ * crowds the cell).
1655
1704
  * @returns anchor wrapper with the conditional list.
1656
1705
  */
1657
- function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose, align = "start", side = "bottom", portal = false, closeOnPointerLeave = false, dense = false, compact = false, getAnchorRect, footer, className }) {
1706
+ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose, align = "start", side = "bottom", portal = false, closeOnPointerLeave = false, dense = false, compact = false, selection = "check", getAnchorRect, footer, className }) {
1658
1707
  const rootRef = useRef(null);
1659
1708
  const listRef = useRef(null);
1660
1709
  const [openSubmenuId, setOpenSubmenuId] = useState(null);
@@ -1738,11 +1787,11 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
1738
1787
  const scrollable = !items.some((entry) => !isSeparator(entry) && !isLabel(entry) && entry.submenu !== void 0 && entry.submenu.length > 0);
1739
1788
  const renderEntry = (entry) => {
1740
1789
  if (isSeparator(entry)) return jsx("div", {
1741
- className: css$5.separator,
1790
+ className: css$7.separator,
1742
1791
  role: "separator"
1743
1792
  }, entry.id);
1744
1793
  if (isLabel(entry)) return jsx("div", {
1745
- className: css$5.label,
1794
+ className: css$7.label,
1746
1795
  role: "presentation",
1747
1796
  children: entry.text
1748
1797
  }, entry.id);
@@ -1750,7 +1799,7 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
1750
1799
  const subOpen = hasSub && openSubmenuId === entry.id;
1751
1800
  const selected = entry.id === selectedId || selectedIds?.includes(entry.id) === true;
1752
1801
  return jsxs("div", {
1753
- className: css$5.itemWrap,
1802
+ className: css$7.itemWrap,
1754
1803
  onMouseEnter: () => {
1755
1804
  setOpenSubmenuId(hasSub ? entry.id : null);
1756
1805
  },
@@ -1760,7 +1809,7 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
1760
1809
  children: [jsxs("button", {
1761
1810
  type: "button",
1762
1811
  role: "menuitem",
1763
- className: clsx(css$5.item, selected && css$5.selected, entry.danger === true && css$5.danger),
1812
+ className: clsx(css$7.item, selected && (selection === "fill" ? css$7.selectedFill : css$7.selected), entry.danger === true && css$7.danger),
1764
1813
  disabled: entry.disabled,
1765
1814
  "aria-haspopup": hasSub ? "menu" : void 0,
1766
1815
  "aria-expanded": hasSub ? subOpen : void 0,
@@ -1776,31 +1825,31 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
1776
1825
  },
1777
1826
  children: [
1778
1827
  entry.icon !== void 0 && jsx("span", {
1779
- className: css$5.itemIcon,
1828
+ className: css$7.itemIcon,
1780
1829
  children: entry.icon
1781
1830
  }),
1782
1831
  jsx("span", {
1783
- className: css$5.itemLabel,
1832
+ className: css$7.itemLabel,
1784
1833
  children: entry.label
1785
1834
  }),
1786
- selected && jsx(IconCheckOutline16, { className: css$5.check })
1835
+ selected && selection === "check" && jsx(IconCheckOutline16, { className: css$7.check })
1787
1836
  ]
1788
1837
  }), subOpen && entry.submenu !== void 0 && jsx("div", {
1789
- className: clsx(css$5.submenu, compact && css$5.compactList),
1838
+ className: clsx(css$7.submenu, compact && css$7.compactList),
1790
1839
  role: "menu",
1791
1840
  children: entry.submenu.map((sub) => jsxs("button", {
1792
1841
  type: "button",
1793
1842
  role: "menuitem",
1794
- className: css$5.item,
1843
+ className: css$7.item,
1795
1844
  disabled: sub.disabled,
1796
1845
  onClick: () => {
1797
1846
  onSelect(sub.id);
1798
1847
  },
1799
1848
  children: [sub.icon !== void 0 && jsx("span", {
1800
- className: css$5.itemIcon,
1849
+ className: css$7.itemIcon,
1801
1850
  children: sub.icon
1802
1851
  }), jsx("span", {
1803
- className: css$5.itemLabel,
1852
+ className: css$7.itemLabel,
1804
1853
  children: sub.label
1805
1854
  })]
1806
1855
  }, sub.id))
@@ -1809,25 +1858,25 @@ function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose,
1809
1858
  };
1810
1859
  const list = open && jsxs("div", {
1811
1860
  ref: listRef,
1812
- className: clsx(css$5.list, dense && css$5.denseList, compact && css$5.compactList, scrollable && css$5.scrollable, portal && css$5.portal, side === "top" && !portal && css$5.sideTop, align === "end" && !portal && css$5.alignEnd),
1861
+ className: clsx(css$7.list, dense && css$7.denseList, compact && css$7.compactList, scrollable && css$7.scrollable, portal && css$7.portal, side === "top" && !portal && css$7.sideTop, align === "end" && !portal && css$7.alignEnd),
1813
1862
  style: portal ? fixedPos ?? MEASURE_STYLE : void 0,
1814
1863
  role: "menu",
1815
1864
  onClick: (e) => {
1816
1865
  e.stopPropagation();
1817
1866
  },
1818
1867
  children: [jsx("div", {
1819
- className: css$5.viewport,
1868
+ className: css$7.viewport,
1820
1869
  role: "presentation",
1821
1870
  children: items.map(renderEntry)
1822
1871
  }), footer !== void 0 && footer.length > 0 && jsx("div", {
1823
- className: css$5.footer,
1872
+ className: css$7.footer,
1824
1873
  role: "presentation",
1825
1874
  children: footer.map(renderEntry)
1826
1875
  })]
1827
1876
  });
1828
1877
  return jsxs("span", {
1829
1878
  ref: rootRef,
1830
- className: clsx(css$5.root, className),
1879
+ className: clsx(css$7.root, className),
1831
1880
  onPointerEnter: closeOnPointerLeave ? cancelClose : void 0,
1832
1881
  onPointerLeave: closeOnPointerLeave ? () => {
1833
1882
  if (open) armClose();
@@ -2127,7 +2176,7 @@ function HoverCard({ anchor, content, openDelayMs = 500, disabled = false, copyT
2127
2176
  const copyable = copyText !== void 0;
2128
2177
  const card = open && pos !== null && jsx("div", {
2129
2178
  ref: cardRef,
2130
- className: `${css$6.card}${copyable ? ` ${css$6.copyable}` : ""}${copied ? ` ${css$6.feedback}` : ""}`,
2179
+ className: `${css$8.card}${copyable ? ` ${css$8.copyable}` : ""}${copied ? ` ${css$8.feedback}` : ""}`,
2131
2180
  style: {
2132
2181
  ...pos,
2133
2182
  minHeight: copied && copyHeightRef.current !== null ? copyHeightRef.current : void 0
@@ -2148,14 +2197,14 @@ function HoverCard({ anchor, content, openDelayMs = 500, disabled = false, copyT
2148
2197
  copy(copyText);
2149
2198
  } : void 0,
2150
2199
  children: copied ? jsx("span", {
2151
- className: css$6.copied,
2200
+ className: css$8.copied,
2152
2201
  "aria-hidden": "true",
2153
2202
  children: copiedLabel
2154
2203
  }) : content
2155
2204
  });
2156
2205
  return jsxs("span", {
2157
2206
  ref: rootRef,
2158
- className: css$6.root,
2207
+ className: css$8.root,
2159
2208
  onPointerEnter: () => {
2160
2209
  if (disabled) return;
2161
2210
  cancelClose();
@@ -2178,7 +2227,7 @@ function HoverCard({ anchor, content, openDelayMs = 500, disabled = false, copyT
2178
2227
  children: [
2179
2228
  anchor,
2180
2229
  open && copyable && jsx("span", {
2181
- className: css$6.status,
2230
+ className: css$8.status,
2182
2231
  role: "status",
2183
2232
  children: copied ? copiedLabel : ""
2184
2233
  }),
@@ -2215,44 +2264,44 @@ function Modal({ open, onClose, title, closeLabel, description, children, footer
2215
2264
  }, [open, onClose]);
2216
2265
  if (!open) return null;
2217
2266
  return createPortal(jsxs("div", {
2218
- className: css$7.root,
2267
+ className: css$9.root,
2219
2268
  role: "presentation",
2220
2269
  children: [jsx("div", {
2221
- className: css$7.mask,
2270
+ className: css$9.mask,
2222
2271
  "aria-hidden": "true",
2223
2272
  onClick: onClose
2224
2273
  }), jsx("div", {
2225
- className: clsx(css$7.dialog, className),
2274
+ className: clsx(css$9.dialog, className),
2226
2275
  role: "dialog",
2227
2276
  "aria-modal": "true",
2228
2277
  "aria-label": title,
2229
2278
  children: headless ? children : jsxs(Fragment, { children: [jsxs("div", {
2230
- className: clsx(css$7.content, contentClassName),
2279
+ className: clsx(css$9.content, contentClassName),
2231
2280
  children: [
2232
2281
  jsxs("div", {
2233
- className: css$7.header,
2282
+ className: css$9.header,
2234
2283
  children: [jsx("h2", {
2235
- className: css$7.title,
2284
+ className: css$9.title,
2236
2285
  children: title
2237
2286
  }), jsx("button", {
2238
2287
  type: "button",
2239
- className: css$7.close,
2288
+ className: css$9.close,
2240
2289
  "aria-label": closeLabel,
2241
2290
  onClick: onClose,
2242
2291
  children: jsx(IconCloseOutline16, { size: 14 })
2243
2292
  })]
2244
2293
  }),
2245
2294
  description !== void 0 && description !== "" && jsx("p", {
2246
- className: css$7.description,
2295
+ className: css$9.description,
2247
2296
  children: description
2248
2297
  }),
2249
2298
  children !== void 0 && jsx("div", {
2250
- className: css$7.body,
2299
+ className: css$9.body,
2251
2300
  children
2252
2301
  })
2253
2302
  ]
2254
2303
  }), footer !== void 0 && jsx("div", {
2255
- className: css$7.footer,
2304
+ className: css$9.footer,
2256
2305
  children: footer
2257
2306
  })] })
2258
2307
  })]
@@ -2276,13 +2325,13 @@ function OnboardingSurface({ children }) {
2276
2325
  };
2277
2326
  }, []);
2278
2327
  return createPortal(jsxs("div", {
2279
- className: css$8.onboardingOverlay,
2328
+ className: css$10.onboardingOverlay,
2280
2329
  role: "presentation",
2281
2330
  children: [jsx("div", {
2282
- className: css$8.onboardingMask,
2331
+ className: css$10.onboardingMask,
2283
2332
  "aria-hidden": "true"
2284
2333
  }), jsx("div", {
2285
- className: css$8.onboardingStage,
2334
+ className: css$10.onboardingStage,
2286
2335
  children
2287
2336
  })]
2288
2337
  }), document.body);
@@ -2303,28 +2352,28 @@ function RiskConfirmation({ open, title, description, acknowledgeLabel, cancelLa
2303
2352
  onClose: onCancel,
2304
2353
  title,
2305
2354
  closeLabel,
2306
- className: css$9.confirmation ?? "",
2307
- contentClassName: css$9.confirmationContent ?? "",
2355
+ className: css$11.confirmation ?? "",
2356
+ contentClassName: css$11.confirmationContent ?? "",
2308
2357
  footer: jsxs(Fragment, { children: [jsx(Button, {
2309
2358
  variant: "outline",
2310
- className: css$9.modalAction,
2359
+ className: css$11.modalAction,
2311
2360
  onClick: onCancel,
2312
2361
  children: cancelLabel
2313
2362
  }), jsx(Button, {
2314
2363
  variant: "primary",
2315
- className: css$9.confirmAction,
2364
+ className: css$11.confirmAction,
2316
2365
  disabled: disabled || !acknowledged,
2317
2366
  onClick: onConfirm,
2318
2367
  children: confirmLabel
2319
2368
  })] }),
2320
2369
  children: [jsxs("div", {
2321
- className: css$9.warning,
2370
+ className: css$11.warning,
2322
2371
  children: [jsx(IconWarningOutline16, {
2323
2372
  size: 18,
2324
- className: css$9.warningIcon
2373
+ className: css$11.warningIcon
2325
2374
  }), jsx("p", { children: description })]
2326
2375
  }), jsxs("label", {
2327
- className: css$9.acknowledgement,
2376
+ className: css$11.acknowledgement,
2328
2377
  children: [jsx("input", {
2329
2378
  type: "checkbox",
2330
2379
  checked: acknowledged,
@@ -2355,41 +2404,41 @@ function ConnectionIndicator({ state, disconnectedLabel, reconnectLabel, connect
2355
2404
  if (state === void 0) return null;
2356
2405
  const sizeLabels = jsxs(Fragment, { children: [
2357
2406
  jsx("span", {
2358
- className: css$10.sizeLabel,
2407
+ className: css$12.sizeLabel,
2359
2408
  "aria-hidden": "true",
2360
2409
  children: disconnectedLabel
2361
2410
  }),
2362
2411
  jsx("span", {
2363
- className: css$10.sizeLabel,
2412
+ className: css$12.sizeLabel,
2364
2413
  "aria-hidden": "true",
2365
2414
  children: reconnectLabel
2366
2415
  }),
2367
2416
  jsxs("span", {
2368
- className: css$10.sizeLabel,
2417
+ className: css$12.sizeLabel,
2369
2418
  "aria-hidden": "true",
2370
2419
  children: [connectingLabel, jsx("span", {
2371
- className: css$10.dots,
2420
+ className: css$12.dots,
2372
2421
  children: "..."
2373
2422
  })]
2374
2423
  }),
2375
2424
  jsx("span", {
2376
- className: css$10.sizeLabel,
2425
+ className: css$12.sizeLabel,
2377
2426
  "aria-hidden": "true",
2378
2427
  children: recoveredLabel
2379
2428
  })
2380
2429
  ] });
2381
2430
  if (state === "recovered") return jsxs("div", {
2382
- className: `${css$10.indicator} ${css$10.success}`,
2431
+ className: `${css$12.indicator} ${css$12.success}`,
2383
2432
  role: "status",
2384
2433
  "aria-label": recoveredLabel,
2385
2434
  children: [jsx("span", {
2386
- className: css$10.icon,
2435
+ className: css$12.icon,
2387
2436
  "aria-hidden": "true",
2388
2437
  children: jsx(IconCheckOutline16, { size: 14 })
2389
2438
  }), jsxs("span", {
2390
- className: css$10.label,
2439
+ className: css$12.label,
2391
2440
  children: [sizeLabels, jsx("span", {
2392
- className: css$10.stateLabel,
2441
+ className: css$12.stateLabel,
2393
2442
  children: recoveredLabel
2394
2443
  })]
2395
2444
  })]
@@ -2397,38 +2446,38 @@ function ConnectionIndicator({ state, disconnectedLabel, reconnectLabel, connect
2397
2446
  const connecting = state === "connecting";
2398
2447
  return jsxs("button", {
2399
2448
  type: "button",
2400
- className: `${css$10.indicator} ${css$10.warning}`,
2449
+ className: `${css$12.indicator} ${css$12.warning}`,
2401
2450
  "data-phase": state,
2402
2451
  "aria-label": connecting ? restartActionLabel : reconnectActionLabel,
2403
2452
  onClick: onReconnect,
2404
2453
  children: [jsx("span", {
2405
- className: css$10.icon,
2454
+ className: css$12.icon,
2406
2455
  "aria-hidden": "true",
2407
2456
  children: jsx(IconWarningOutline16, { size: 14 })
2408
2457
  }), jsxs("span", {
2409
- className: css$10.label,
2458
+ className: css$12.label,
2410
2459
  children: [
2411
2460
  sizeLabels,
2412
2461
  jsx("span", {
2413
- className: css$10.stateLabel,
2462
+ className: css$12.stateLabel,
2414
2463
  children: connecting ? jsxs(Fragment, { children: [connectingLabel, jsxs("span", {
2415
- className: css$10.dots,
2464
+ className: css$12.dots,
2416
2465
  "aria-hidden": "true",
2417
2466
  children: [
2418
2467
  jsx("span", { children: "." }),
2419
2468
  jsx("span", {
2420
- className: css$10.secondDot,
2469
+ className: css$12.secondDot,
2421
2470
  children: "."
2422
2471
  }),
2423
2472
  jsx("span", {
2424
- className: css$10.thirdDot,
2473
+ className: css$12.thirdDot,
2425
2474
  children: "."
2426
2475
  })
2427
2476
  ]
2428
2477
  })] }) : disconnectedLabel
2429
2478
  }),
2430
2479
  jsx("span", {
2431
- className: css$10.hoverLabel,
2480
+ className: css$12.hoverLabel,
2432
2481
  children: reconnectLabel
2433
2482
  })
2434
2483
  ]
@@ -2618,16 +2667,285 @@ function ReferenceIcon({ kind, size = 16, className }) {
2618
2667
  }
2619
2668
  }
2620
2669
  //#endregion
2670
+ //#region lib/types/LinkIcon.js
2671
+ /** Code, web, and data extensions: all three categories share the code glyph. */
2672
+ const CODE_EXTENSIONS = new Set([
2673
+ "ts",
2674
+ "tsx",
2675
+ "js",
2676
+ "jsx",
2677
+ "mjs",
2678
+ "cjs",
2679
+ "cts",
2680
+ "mts",
2681
+ "css",
2682
+ "scss",
2683
+ "sass",
2684
+ "less",
2685
+ "html",
2686
+ "htm",
2687
+ "vue",
2688
+ "svelte",
2689
+ "astro",
2690
+ "json",
2691
+ "jsonc",
2692
+ "json5",
2693
+ "yaml",
2694
+ "yml",
2695
+ "toml",
2696
+ "xml",
2697
+ "ini",
2698
+ "env",
2699
+ "sh",
2700
+ "bash",
2701
+ "zsh",
2702
+ "fish",
2703
+ "ps1",
2704
+ "bat",
2705
+ "cmd",
2706
+ "py",
2707
+ "pyi",
2708
+ "rb",
2709
+ "rs",
2710
+ "go",
2711
+ "java",
2712
+ "kt",
2713
+ "kts",
2714
+ "c",
2715
+ "cc",
2716
+ "cpp",
2717
+ "cxx",
2718
+ "h",
2719
+ "hh",
2720
+ "hpp",
2721
+ "cs",
2722
+ "php",
2723
+ "swift",
2724
+ "sql",
2725
+ "csv",
2726
+ "tsv",
2727
+ "proto",
2728
+ "graphql",
2729
+ "gql",
2730
+ "lua",
2731
+ "r",
2732
+ "pl",
2733
+ "scala",
2734
+ "clj",
2735
+ "cljs",
2736
+ "ex",
2737
+ "exs",
2738
+ "erl",
2739
+ "hs",
2740
+ "dart"
2741
+ ]);
2742
+ const IMAGE_EXTENSIONS = new Set([
2743
+ "png",
2744
+ "jpg",
2745
+ "jpeg",
2746
+ "gif",
2747
+ "svg",
2748
+ "webp",
2749
+ "avif",
2750
+ "bmp",
2751
+ "ico",
2752
+ "tif",
2753
+ "tiff",
2754
+ "heic",
2755
+ "heif"
2756
+ ]);
2757
+ const DOCUMENT_EXTENSIONS = new Set([
2758
+ "pdf",
2759
+ "doc",
2760
+ "docx",
2761
+ "xls",
2762
+ "xlsx",
2763
+ "ppt",
2764
+ "pptx"
2765
+ ]);
2766
+ /**
2767
+ * Derive a file path's link-icon category from its extension. Unknown and
2768
+ * missing extensions fall to `other` (the plain-paper glyph).
2769
+ * @param path - File path as the producing tool spelled it (either separator).
2770
+ * @returns The file's glyph category; never `url` or `folder`.
2771
+ */
2772
+ function classifyLinkPath(path) {
2773
+ const name = path.slice(Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\")) + 1);
2774
+ const dot = name.lastIndexOf(".");
2775
+ if (dot < 0) return "other";
2776
+ const extension = name.slice(dot + 1).toLowerCase();
2777
+ if (CODE_EXTENSIONS.has(extension)) return "code";
2778
+ if (IMAGE_EXTENSIONS.has(extension)) return "image";
2779
+ return DOCUMENT_EXTENSIONS.has(extension) ? "document" : "other";
2780
+ }
2781
+ const GlobeGlyph = ({ size, className }) => jsx("svg", {
2782
+ width: size,
2783
+ height: size,
2784
+ className,
2785
+ viewBox: "0 0 20 20",
2786
+ fill: "none",
2787
+ xmlns: "http://www.w3.org/2000/svg",
2788
+ "aria-hidden": true,
2789
+ children: jsx("path", {
2790
+ fillRule: "evenodd",
2791
+ clipRule: "evenodd",
2792
+ d: "M9.99951 1.68994C14.5889 1.68994 18.3098 5.41022 18.3101 9.99951C18.3101 14.589 14.589 18.3101 9.99951 18.3101C5.41022 18.3098 1.68994 14.5889 1.68994 9.99951C1.69017 5.41037 5.41037 1.69017 9.99951 1.68994ZM3.23193 10.7495C3.52924 13.463 5.41981 15.6965 7.94873 16.4946C7.74323 16.1395 7.56487 15.736 7.41162 15.3022C6.97892 14.0773 6.70459 12.4906 6.63232 10.7495H3.23193ZM13.3667 10.7495C13.2944 12.4906 13.0211 14.0773 12.5884 15.3022C12.4352 15.7359 12.2557 16.1386 12.0503 16.4937C14.5794 15.6956 16.4707 13.4631 16.7681 10.7495H13.3667ZM8.13428 10.7495C8.20587 12.3512 8.45916 13.7619 8.82666 14.8022C9.046 15.4231 9.29031 15.8714 9.52686 16.1499C9.76321 16.428 9.92505 16.4651 9.99951 16.4653C10.0737 16.4653 10.2362 16.4288 10.4731 16.1499C10.7097 15.8714 10.954 15.4231 11.1733 14.8022C11.5408 13.7619 11.7941 12.3512 11.8657 10.7495H8.13428ZM9.99951 3.18994C9.92505 3.19013 9.76321 3.22823 9.52686 3.50635C9.29035 3.78486 9.04595 4.23325 8.82666 4.854C8.43314 5.96808 8.16996 7.50638 8.12158 9.24951H11.8784C11.83 7.50638 11.5669 5.96808 11.1733 4.854C10.954 4.23324 10.7097 3.78486 10.4731 3.50635C10.2362 3.22748 10.0737 3.18994 9.99951 3.18994ZM12.27 3.57861C12.3862 3.82232 12.4924 4.0822 12.5884 4.354C13.0494 5.65902 13.33 7.37415 13.3784 9.24951H16.7681C16.4792 6.61525 14.6885 4.43369 12.27 3.57861ZM7.729 3.57861C5.3109 4.4338 3.52072 6.61541 3.23193 9.24951H6.62158C6.67001 7.37415 6.95063 5.65902 7.41162 4.354C7.50759 4.08233 7.61287 3.82221 7.729 3.57861Z",
2793
+ fill: "currentColor"
2794
+ })
2795
+ });
2796
+ const CodeGlyph = ({ size, className }) => jsxs("svg", {
2797
+ width: size,
2798
+ height: size,
2799
+ className,
2800
+ viewBox: "0 0 20 20",
2801
+ fill: "none",
2802
+ xmlns: "http://www.w3.org/2000/svg",
2803
+ "aria-hidden": true,
2804
+ children: [
2805
+ jsx("path", {
2806
+ d: "M5 15.2021L1.67188 11.874C1.42017 11.6223 1.1823 11.3858 1.00781 11.1689C0.823288 10.9396 0.645016 10.6559 0.586914 10.2891C0.556619 10.0975 0.556619 9.90245 0.586914 9.71094C0.645016 9.3441 0.823288 9.06042 1.00781 8.83105C1.1823 8.61419 1.42017 8.37768 1.67188 8.12598L5 4.79785L6.20215 6L2.87402 9.32813C2.59555 9.6066 2.43539 9.76802 2.33203 9.89648C2.29246 9.94567 2.27406 9.97638 2.26563 9.99121C2.26528 9.99711 2.26528 10.0029 2.26563 10.0088C2.27406 10.0236 2.29246 10.0543 2.33203 10.1035C2.43539 10.232 2.59555 10.3934 2.87402 10.6719L6.20215 14L5 15.2021Z",
2807
+ fill: "currentColor"
2808
+ }),
2809
+ jsx("path", {
2810
+ d: "M15 15.2021L18.3281 11.874C18.5798 11.6223 18.8177 11.3858 18.9922 11.1689C19.1767 10.9396 19.355 10.6559 19.4131 10.2891C19.4434 10.0975 19.4434 9.90245 19.4131 9.71094C19.355 9.3441 19.1767 9.06042 18.9922 8.83105C18.8177 8.61419 18.5798 8.37768 18.3281 8.12598L15 4.79785L13.7979 6L17.126 9.32813C17.4045 9.6066 17.5646 9.76802 17.668 9.89648C17.7075 9.94567 17.7259 9.97638 17.7344 9.99121C17.7347 9.99711 17.7347 10.0029 17.7344 10.0088C17.7259 10.0236 17.7075 10.0543 17.668 10.1035C17.5646 10.232 17.4045 10.3934 17.126 10.6719L13.7979 14L15 15.2021Z",
2811
+ fill: "currentColor"
2812
+ }),
2813
+ jsx("path", {
2814
+ d: "M9.41181 15.0993L7.76955 14.6593L10.3577 5.00002L12 5.44006L9.41181 15.0993Z",
2815
+ fill: "currentColor"
2816
+ })
2817
+ ]
2818
+ });
2819
+ const FolderGlyph = ({ size, className }) => jsxs("svg", {
2820
+ width: size,
2821
+ height: size,
2822
+ className,
2823
+ viewBox: "0 0 20 20",
2824
+ fill: "none",
2825
+ xmlns: "http://www.w3.org/2000/svg",
2826
+ "aria-hidden": true,
2827
+ children: [jsx("path", {
2828
+ d: "M1.2002 11.4178V6.7244C1.2002 6.47036 1.19957 6.2962 1.21387 6.12773C1.29746 5.14425 1.76052 4.23195 2.50489 3.58378C2.63247 3.47269 2.77337 3.37059 2.97852 3.2205C3.11259 3.12241 3.20444 3.05471 3.29981 2.99296C3.85318 2.6347 4.49029 2.42604 5.14844 2.38847C5.26177 2.38201 5.37601 2.38261 5.542 2.38261H7.91211C8.63453 2.38261 9.13199 2.37701 9.61329 2.49882C9.7656 2.53739 9.91613 2.58526 10.0625 2.64237C10.525 2.8229 10.9267 3.11712 11.5147 3.5369L12.0859 3.94413C12.1927 4.02032 12.2509 4.06163 12.2959 4.09062C12.3336 4.11488 12.3394 4.11605 12.332 4.11308C12.3403 4.11633 12.3488 4.11875 12.3574 4.12089C12.3627 4.12161 12.3757 4.12265 12.4004 4.12382C12.4538 4.12635 12.5252 4.12675 12.6563 4.12675C13.7369 4.12675 14.6105 4.12608 15.3086 4.19999C16.0209 4.27545 16.643 4.43585 17.1885 4.82011C17.5449 5.07115 17.8554 5.38173 18.1064 5.73808C18.4908 6.28368 18.6521 6.90645 18.7275 7.61894C18.8014 8.31701 18.7998 9.19066 18.7998 10.2713V11.4178C18.7998 12.5248 18.801 13.4195 18.7236 14.1336C18.6446 14.8626 18.4763 15.4982 18.0742 16.0516C17.8399 16.374 17.5559 16.6571 17.2334 16.8914C16.68 17.2935 16.0445 17.4628 15.3154 17.5418C14.6014 17.6191 13.7065 17.618 12.5996 17.618H7.40039C6.29352 17.618 5.39863 17.6191 4.68457 17.5418C3.95547 17.4628 3.32001 17.2935 2.76661 16.8914C2.44414 16.6571 2.16011 16.374 1.92579 16.0516C1.52375 15.4982 1.35537 14.8626 1.27637 14.1336C1.199 13.4195 1.2002 12.5248 1.2002 11.4178ZM2.79981 11.4178C2.79981 12.5602 2.80136 13.3529 2.86719 13.9607C2.93144 14.5537 3.04885 14.8759 3.21973 15.1111C3.35542 15.2979 3.52029 15.4618 3.70704 15.5975C3.94221 15.7683 4.26361 15.8867 4.85645 15.951C5.46439 16.0168 6.25766 16.0174 7.40039 16.0174H12.5996C13.7424 16.0174 14.5356 16.0168 15.1436 15.951C15.7364 15.8867 16.0578 15.7683 16.293 15.5975C16.4797 15.4618 16.6446 15.2979 16.7803 15.1111C16.9512 14.8759 17.0686 14.5537 17.1328 13.9607C17.1986 13.3529 17.2002 12.5602 17.2002 11.4178V10.2713C17.2002 9.15571 17.1987 8.38124 17.1357 7.7869C17.0743 7.20716 16.9618 6.8914 16.7988 6.65995C16.6534 6.45353 16.473 6.2741 16.2666 6.1287C16.0351 5.96565 15.7196 5.85222 15.1397 5.79081C14.5454 5.7279 13.7716 5.72733 12.6563 5.72733C12.4465 5.72733 12.2081 5.73253 11.9736 5.6746C11.8947 5.65509 11.8168 5.63037 11.7412 5.60038C11.517 5.51135 11.3268 5.36863 11.1563 5.24687L10.585 4.83866C9.93302 4.37321 9.71454 4.22394 9.48047 4.13261C9.39579 4.09958 9.30882 4.07191 9.22071 4.0496C8.97721 3.98798 8.71286 3.98222 7.91211 3.98222H5.542C5.35809 3.98222 5.29665 3.98285 5.23926 3.98612C4.85821 4.00788 4.48933 4.12829 4.16895 4.33573C4.12071 4.36697 4.07125 4.40295 3.92286 4.51151C3.69569 4.67771 3.61995 4.73389 3.55567 4.78983C3.1248 5.16501 2.8561 5.69324 2.80762 6.26249C2.80039 6.34752 2.79981 6.44244 2.79981 6.7244V11.4178Z",
2829
+ fill: "currentColor"
2830
+ }), jsx("path", {
2831
+ d: "M15.4913 8.11793V9.71754H4.50892V8.11793H15.4913Z",
2832
+ fill: "currentColor"
2833
+ })]
2834
+ });
2835
+ const PhotoGlyph = ({ size, className }) => jsxs("svg", {
2836
+ width: size,
2837
+ height: size,
2838
+ className,
2839
+ viewBox: "0 0 20 20",
2840
+ fill: "none",
2841
+ xmlns: "http://www.w3.org/2000/svg",
2842
+ "aria-hidden": true,
2843
+ children: [jsx("path", {
2844
+ fillRule: "evenodd",
2845
+ clipRule: "evenodd",
2846
+ d: "M13 5.15039C14.574 5.15039 15.8496 6.42599 15.8496 8C15.8496 9.57401 14.574 10.8496 13 10.8496C11.426 10.8496 10.1504 9.57401 10.1504 8C10.1504 6.42599 11.426 5.1504 13 5.15039ZM13 6.84961C12.3649 6.84961 11.8496 7.36488 11.8496 8C11.8496 8.63513 12.3649 9.15039 13 9.15039C13.6351 9.15039 14.1504 8.63513 14.1504 8C14.1504 7.36488 13.6351 6.84961 13 6.84961Z",
2847
+ fill: "currentColor"
2848
+ }), jsx("path", {
2849
+ fillRule: "evenodd",
2850
+ clipRule: "evenodd",
2851
+ d: "M12.5996 2.15039C13.7056 2.15039 14.6038 2.14883 15.3213 2.22656C16.0546 2.30602 16.6994 2.47647 17.2627 2.88574C17.5895 3.1232 17.8768 3.41049 18.1143 3.73731C18.5235 4.30063 18.694 4.9454 18.7734 5.67871C18.8512 6.39616 18.8496 7.29441 18.8496 8.40039V11.5996C18.8496 12.7056 18.8512 13.6038 18.7734 14.3213C18.694 15.0546 18.5235 15.6994 18.1143 16.2627C17.8768 16.5895 17.5895 16.8768 17.2627 17.1143C16.6994 17.5235 16.0546 17.694 15.3213 17.7734C14.6038 17.8512 13.7056 17.8496 12.5996 17.8496H7.40039C6.29441 17.8496 5.39616 17.8512 4.67871 17.7734C3.9454 17.694 3.30063 17.5235 2.73731 17.1143C2.41049 16.8768 2.1232 16.5895 1.88574 16.2627C1.47647 15.6994 1.30602 15.0546 1.22656 14.3213C1.14883 13.6038 1.15039 12.7056 1.15039 11.5996V8.40039C1.15039 7.29441 1.14883 6.39616 1.22656 5.67871C1.30602 4.9454 1.47647 4.30063 1.88574 3.73731C2.1232 3.41049 2.41049 3.1232 2.73731 2.88574C3.30063 2.47647 3.9454 2.30602 4.67871 2.22656C5.39616 2.14883 6.29441 2.15039 7.40039 2.15039H12.5996ZM5.56348 10.8164C5.30962 10.8348 5.02517 10.9291 4.58008 11.1973C4.13813 11.4635 3.60989 11.8565 2.85449 12.4229C2.85831 13.1414 2.86855 13.6903 2.91699 14.1377C2.98078 14.7264 3.09709 15.0384 3.26074 15.2637C3.39335 15.4462 3.55382 15.6067 3.73633 15.7393C3.96158 15.9029 4.2736 16.0192 4.86231 16.083C5.46688 16.1485 6.25677 16.1504 7.40039 16.1504H11.9492L8.71094 12.9131C8.00039 12.2025 7.51129 11.7149 7.09571 11.376C6.69274 11.0474 6.42364 10.9144 6.17481 10.8604C5.97432 10.8168 5.7681 10.8017 5.56348 10.8164ZM7.40039 3.84961C6.25677 3.84961 5.46688 3.85153 4.86231 3.91699C4.2736 3.98078 3.96158 4.09709 3.73633 4.26074C3.55382 4.39335 3.39335 4.55382 3.26074 4.73633C3.09709 4.96158 2.98078 5.2736 2.91699 5.86231C2.85153 6.46688 2.84961 7.25677 2.84961 8.40039V10.3105C3.15698 10.0902 3.43896 9.8988 3.70215 9.74024C4.26649 9.40025 4.81639 9.16621 5.44141 9.1211C5.80775 9.0947 6.17623 9.1213 6.53516 9.19922C7.14769 9.33224 7.65922 9.64212 8.16992 10.0586C8.66793 10.4648 9.22718 11.025 9.91309 11.7109L14.333 16.1318C14.6363 16.122 14.9012 16.1086 15.1377 16.083C15.7264 16.0192 16.0384 15.9029 16.2637 15.7393C16.4462 15.6067 16.6067 15.4462 16.7393 15.2637C16.9029 15.0384 17.0192 14.7264 17.083 14.1377C17.1485 13.5331 17.1504 12.7432 17.1504 11.5996V8.40039C17.1504 7.25677 17.1485 6.46688 17.083 5.86231C17.0192 5.2736 16.9029 4.96158 16.7393 4.73633C16.6067 4.55382 16.4462 4.39335 16.2637 4.26074C16.0384 4.09709 15.7264 3.98078 15.1377 3.91699C14.5331 3.85153 13.7432 3.84961 12.5996 3.84961H7.40039Z",
2852
+ fill: "currentColor"
2853
+ })]
2854
+ });
2855
+ const PaperGlyph = ({ size, className }) => jsx("svg", {
2856
+ width: size,
2857
+ height: size,
2858
+ className,
2859
+ viewBox: "0 0 20 20",
2860
+ fill: "none",
2861
+ xmlns: "http://www.w3.org/2000/svg",
2862
+ "aria-hidden": true,
2863
+ children: jsx("path", {
2864
+ d: "M11.3467 4.59607C11.3469 5.40284 11.3499 5.9609 11.3965 6.39099C11.444 6.82964 11.5288 7.03981 11.6328 7.18298C11.7253 7.3102 11.8376 7.42158 11.9648 7.51404C12.108 7.61807 12.3181 7.70283 12.7568 7.75037C13.1851 7.79675 13.7399 7.79992 14.541 7.80017L11.3467 4.59607ZM17.2695 12.7455C17.2695 13.5901 17.2706 14.2881 17.21 14.848C17.1477 15.4228 17.0119 15.9463 16.6768 16.4076C16.4856 16.6707 16.2543 16.902 15.9912 17.0931C15.5298 17.4284 15.0065 17.5641 14.4316 17.6263C13.8718 17.687 13.1737 17.6859 12.3291 17.6859H8.23926C7.39498 17.6859 6.69745 17.687 6.1377 17.6263C5.56284 17.5641 5.03855 17.4284 4.57715 17.0931C4.31413 16.902 4.08272 16.6706 3.8916 16.4076C3.55647 15.9463 3.42167 15.4227 3.35938 14.848C3.29872 14.2881 3.29981 13.5901 3.29981 12.7455V6.80017C3.29981 5.95586 3.29876 5.25837 3.35938 4.69861C3.42166 4.12375 3.55638 3.59946 3.8916 3.13806C4.08274 2.87503 4.31412 2.64365 4.57715 2.45252C5.03855 2.11729 5.56284 1.98257 6.1377 1.92029C6.69746 1.85967 7.39495 1.86072 8.23926 1.86072H9.38468C10.039 1.86072 10.3661 1.86072 10.6679 1.95896C10.7677 1.99146 10.8648 2.03176 10.9583 2.0795C11.241 2.22382 11.472 2.45549 11.934 2.91883L16.2188 7.21612C16.679 7.67761 16.909 7.90836 17.0523 8.1902C17.0997 8.28342 17.1397 8.38022 17.172 8.4797C17.2695 8.78045 17.2695 9.10631 17.2695 9.75801V12.7455ZM4.89942 12.7455C4.89942 13.6256 4.90106 14.2215 4.9502 14.6752C4.99773 15.1139 5.08249 15.324 5.18652 15.4672C5.27898 15.5944 5.39037 15.7067 5.51758 15.7992C5.66076 15.9032 5.87093 15.988 6.30957 16.0355C6.76321 16.0847 7.35919 16.0853 8.23926 16.0853H12.3291C13.2091 16.0853 13.8051 16.0846 14.2588 16.0355C14.6973 15.988 14.9076 15.9032 15.0508 15.7992C15.1781 15.7067 15.2903 15.5945 15.3828 15.4672C15.4868 15.324 15.5716 15.1139 15.6191 14.6752C15.6683 14.2215 15.6689 13.6256 15.6689 12.7455V9.40076H14.6865C13.8419 9.40076 13.1439 9.40185 12.584 9.34119C12.0093 9.27889 11.4857 9.14411 11.0244 8.80896C10.7614 8.61784 10.53 8.38645 10.3389 8.12341C10.0036 7.66202 9.86795 7.13773 9.80567 6.56287C9.74505 6.00312 9.74609 5.30558 9.7461 4.4613V3.46033H8.23926C7.35919 3.46033 6.76321 3.46196 6.30957 3.51111C5.87097 3.55865 5.66075 3.64342 5.51758 3.74744C5.39057 3.83979 5.27888 3.95148 5.18652 4.07849C5.0825 4.22166 4.99773 4.43188 4.9502 4.87048C4.90105 5.32412 4.89942 5.92011 4.89942 6.80017V12.7455Z",
2865
+ fill: "currentColor"
2866
+ })
2867
+ });
2868
+ const PaperDocGlyph = ({ size, className }) => jsxs("svg", {
2869
+ width: size,
2870
+ height: size,
2871
+ className,
2872
+ viewBox: "0 0 20 20",
2873
+ fill: "none",
2874
+ xmlns: "http://www.w3.org/2000/svg",
2875
+ "aria-hidden": true,
2876
+ children: [
2877
+ jsx("path", {
2878
+ d: "M11.3457 4.5957C11.3459 5.40247 11.3489 5.96054 11.3955 6.39063C11.443 6.82927 11.5278 7.03944 11.6318 7.18262C11.7243 7.30983 11.8367 7.42122 11.9639 7.51367C12.1071 7.61771 12.3171 7.70247 12.7559 7.75C13.1841 7.79639 13.739 7.79955 14.54 7.79981L11.3457 4.5957ZM17.2686 12.7451C17.2686 13.5897 17.2696 14.2878 17.209 14.8477C17.1467 15.4224 17.011 15.9459 16.6758 16.4072C16.4846 16.6703 16.2533 16.9016 15.9902 17.0928C15.5289 17.428 15.0055 17.5637 14.4307 17.626C13.8708 17.6866 13.1727 17.6855 12.3281 17.6855H8.23828C7.394 17.6855 6.69647 17.6866 6.13672 17.626C5.56186 17.5637 5.03757 17.428 4.57617 17.0928C4.31315 16.9016 4.08175 16.6703 3.89063 16.4072C3.55549 15.9459 3.42069 15.4224 3.3584 14.8477C3.29774 14.2878 3.29883 13.5897 3.29883 12.7451V6.79981C3.29883 5.95549 3.29778 5.258 3.3584 4.69824C3.42068 4.12338 3.5554 3.5991 3.89063 3.1377C4.08176 2.87466 4.31314 2.64328 4.57617 2.45215C5.03757 2.11692 5.56186 1.98221 6.13672 1.91992C6.69648 1.8593 7.39397 1.86035 8.23828 1.86035H9.3837C10.038 1.86035 10.3652 1.86035 10.6669 1.9586C10.7668 1.99109 10.8639 2.03139 10.9573 2.07913C11.24 2.22346 11.471 2.45512 11.933 2.91846L16.2178 7.21575C16.678 7.67725 16.9081 7.90799 17.0514 8.18983C17.0988 8.28305 17.1388 8.37985 17.171 8.47933C17.2686 8.78009 17.2686 9.10594 17.2686 9.75765V12.7451ZM4.89844 12.7451C4.89844 13.6253 4.90008 14.2211 4.94922 14.6748C4.99675 15.1135 5.08151 15.3236 5.18555 15.4668C5.278 15.594 5.38939 15.7064 5.5166 15.7988C5.65978 15.9029 5.86995 15.9876 6.30859 16.0352C6.76223 16.0843 7.35822 16.085 8.23828 16.085H12.3281C13.2081 16.085 13.8042 16.0843 14.2578 16.0352C14.6963 15.9876 14.9066 15.9028 15.0498 15.7988C15.1771 15.7063 15.2893 15.5941 15.3818 15.4668C15.4859 15.3236 15.5706 15.1135 15.6182 14.6748C15.6673 14.2211 15.668 13.6252 15.668 12.7451V9.40039H14.6855C13.841 9.40039 13.1429 9.40148 12.583 9.34082C12.0083 9.27852 11.4847 9.14374 11.0234 8.8086C10.7604 8.61747 10.5291 8.38608 10.3379 8.12305C10.0027 7.66165 9.86697 7.13736 9.80469 6.5625C9.74408 6.00275 9.74512 5.30522 9.74512 4.46094V3.45996H8.23828C7.35822 3.45996 6.76223 3.46159 6.30859 3.51074C5.86999 3.55828 5.65977 3.64305 5.5166 3.74707C5.38959 3.83942 5.2779 3.95111 5.18555 4.07813C5.08153 4.2213 4.99676 4.43152 4.94922 4.87012C4.90007 5.32376 4.89844 5.91974 4.89844 6.79981V12.7451Z",
2879
+ fill: "currentColor"
2880
+ }),
2881
+ jsx("path", {
2882
+ d: "M11.1523 13.0995V14.4999H6.30273V13.0995H11.1523Z",
2883
+ fill: "currentColor"
2884
+ }),
2885
+ jsx("path", {
2886
+ d: "M10.2148 10V11.4004H6.30273V10H10.2148Z",
2887
+ fill: "currentColor"
2888
+ })
2889
+ ]
2890
+ });
2891
+ /** Local exhaustiveness helper — this package does not depend on `dsh-llm`. */
2892
+ /* v8 ignore next 3 -- closed-union backstop; only reached if a kind is forged */
2893
+ function assertNever$1(value) {
2894
+ throw new Error(`unreachable link icon kind: ${String(value)}`);
2895
+ }
2896
+ /**
2897
+ * Render the leading glyph for one clickable artifact link.
2898
+ * @param props - The link category, optional size (default 14px — the inline
2899
+ * link text size these glyphs sit beside), and optional CSS class.
2900
+ * @returns The category's SVG glyph, riding currentColor.
2901
+ */
2902
+ function LinkIcon({ kind, size = 14, className }) {
2903
+ switch (kind) {
2904
+ case "url": return jsx(GlobeGlyph, {
2905
+ size,
2906
+ className
2907
+ });
2908
+ case "folder": return jsx(FolderGlyph, {
2909
+ size,
2910
+ className
2911
+ });
2912
+ case "code": return jsx(CodeGlyph, {
2913
+ size,
2914
+ className
2915
+ });
2916
+ case "image": return jsx(PhotoGlyph, {
2917
+ size,
2918
+ className
2919
+ });
2920
+ case "document": return jsx(PaperDocGlyph, {
2921
+ size,
2922
+ className
2923
+ });
2924
+ case "other": return jsx(PaperGlyph, {
2925
+ size,
2926
+ className
2927
+ });
2928
+ /* v8 ignore next -- closed-union backstop; only reached if a kind is forged */
2929
+ default: return assertNever$1(kind);
2930
+ }
2931
+ }
2932
+ //#endregion
2621
2933
  //#region lib/types/user-text.js
2622
2934
  /** The wire form a session chip serializes to; label is the display text. */
2623
2935
  const SESSION_WIRE_RE = /@\[([^\]\n]+)\]\(dsh-session:[^)\s]+\)/gu;
2936
+ /** Sentence punctuation a bare `@name` token may carry without being part of the reference. */
2937
+ const TRAILING_PUNCTUATION_RE = /[.,;:!?,。;:!?]+$/u;
2624
2938
  /**
2625
2939
  * Split one sent text into inline plain runs and reference chips.
2626
2940
  * @param text - the logged model text of the message or queue row.
2627
2941
  * @param sessionLabels - exact session mention labels associated by an adjacent recall.
2942
+ * @param slashNames - names a `/name` token may decorate as: the skills the
2943
+ * host loaded for this message, or the command a command bubble echoes
2944
+ * (unsent queue rows pass none).
2945
+ * @param slashKind - the chip kind those tokens render as.
2628
2946
  * @returns inline nodes covering the whole text.
2629
2947
  */
2630
- function projectUserText(text, sessionLabels) {
2948
+ function projectUserText(text, sessionLabels, slashNames = [], slashKind = "skill") {
2631
2949
  const ranges = [];
2632
2950
  SESSION_WIRE_RE.lastIndex = 0;
2633
2951
  let wire;
@@ -2651,13 +2969,14 @@ function projectUserText(text, sessionLabels) {
2651
2969
  start = text.indexOf(label, start + label.length);
2652
2970
  }
2653
2971
  }
2654
- const re = /(^|\s)(\/[\w-]+|@"[^"\n]+"|@[^\s]+)/gu;
2972
+ const re = /(^|\s)(\/[\w-]+(?=\s|$)|@"[^"\n]+"|@[^\s]+)/gu;
2655
2973
  let m;
2656
2974
  while ((m = re.exec(text)) !== null) {
2657
2975
  const tokenStart = m.index + m[1].length;
2658
2976
  const rawLabel = m[2];
2659
- const label = rawLabel.startsWith("@\"") ? rawLabel : rawLabel.replace(/[.,;:!?,。;:!?]+$/gu, "");
2977
+ const label = rawLabel.startsWith("@\"") ? rawLabel : rawLabel.replace(TRAILING_PUNCTUATION_RE, "");
2660
2978
  if (label.length <= 1) continue;
2979
+ if (label.startsWith("/") && !slashNames.includes(label.slice(1))) continue;
2661
2980
  ranges.push({
2662
2981
  start: tokenStart,
2663
2982
  end: tokenStart + label.length,
@@ -2671,7 +2990,7 @@ function projectUserText(text, sessionLabels) {
2671
2990
  let cursor = 0;
2672
2991
  const pushPlain = (from, to) => {
2673
2992
  parts.push(jsx("span", {
2674
- className: css$11.plainRun,
2993
+ className: css$13.plainRun,
2675
2994
  children: text.slice(from, to)
2676
2995
  }, `t${from}`));
2677
2996
  };
@@ -2682,19 +3001,19 @@ function projectUserText(text, sessionLabels) {
2682
3001
  const referenceKind = kind === "session" ? "session" : label.startsWith("@") ? label.endsWith("/") ? "folder" : "file" : void 0;
2683
3002
  const displayLabel = range.display ?? (referenceKind === void 0 ? label : referenceKind === "session" ? label.slice(1) : label.slice(1).replace(/^"|"$/gu, "").split(/[\\/]/u).filter(Boolean).at(-1) ?? label.slice(1));
2684
3003
  parts.push(jsxs("span", {
2685
- className: css$11.refChip,
2686
- "data-ref-chip": referenceKind ?? "skill",
3004
+ className: clsx(css$13.refChip, referenceKind === void 0 && css$13.slashChip),
3005
+ "data-ref-chip": referenceKind ?? slashKind,
2687
3006
  title: label,
2688
3007
  children: [referenceKind !== void 0 && jsx(ReferenceIcon, {
2689
3008
  kind: referenceKind,
2690
3009
  size: 16,
2691
- className: css$11.refIcon
3010
+ className: css$13.refIcon
2692
3011
  }), displayLabel]
2693
3012
  }, tokenStart));
2694
3013
  cursor = end;
2695
3014
  }
2696
3015
  if (parts.length === 0) return jsx("span", {
2697
- className: css$11.plainRun,
3016
+ className: css$13.plainRun,
2698
3017
  children: text
2699
3018
  });
2700
3019
  if (cursor < text.length) pushPlain(cursor, text.length);
@@ -2832,7 +3151,7 @@ function Tooltip({ label, side = "right", delayMs = 0, disabled = false, maxWidt
2832
3151
  }
2833
3152
  }), pos !== null && jsx("span", {
2834
3153
  ref: bubble,
2835
- className: css$12.bubble,
3154
+ className: css$14.bubble,
2836
3155
  "data-side": placement,
2837
3156
  style: {
2838
3157
  left: pos.x,
@@ -2893,23 +3212,86 @@ function Toast({ text, icon, anchor, holdMs = HOLD_MS, onDone }) {
2893
3212
  };
2894
3213
  }, [anchor]);
2895
3214
  return createPortal(jsxs("div", {
2896
- className: css$13.toast,
3215
+ className: css$15.toast,
2897
3216
  role: "alert",
2898
3217
  style: {
2899
3218
  ...left === null ? {} : { left },
2900
3219
  "--dsh-toast-hold": `${String(holdMs)}ms`
2901
3220
  },
2902
3221
  children: [icon !== void 0 && jsx("span", {
2903
- className: css$13.icon,
3222
+ className: css$15.icon,
2904
3223
  "aria-hidden": true,
2905
3224
  children: icon
2906
3225
  }), jsx("span", {
2907
- className: css$13.text,
3226
+ className: css$15.text,
2908
3227
  children: text
2909
3228
  })]
2910
3229
  }), document.body);
2911
3230
  }
2912
3231
  //#endregion
3232
+ //#region lib/types/file-size.js
3233
+ /** Compact human-readable byte counts shared by attachment presenters. @module @deepseek-ai/dsh-client-ui-primitives/file-size */
3234
+ /**
3235
+ * Byte count as compact user-facing size text (`312B`, `4.2KB`, `1.5MB`, `2.4GB`).
3236
+ * @param bytes - exact byte count.
3237
+ * @returns whole-unit text with one decimal below ten of the chosen unit.
3238
+ */
3239
+ function fileSizeText(bytes) {
3240
+ if (bytes < 1024) return `${bytes}B`;
3241
+ const kb = bytes / 1024;
3242
+ if (kb < 1024) return `${kb < 10 ? kb.toFixed(1) : Math.round(kb)}KB`;
3243
+ const mb = kb / 1024;
3244
+ if (mb < 1024) return `${mb < 10 ? mb.toFixed(1) : Math.round(mb)}MB`;
3245
+ const gb = mb / 1024;
3246
+ return `${gb < 10 ? gb.toFixed(1) : Math.round(gb)}GB`;
3247
+ }
3248
+ //#endregion
3249
+ //#region lib/types/DocumentFileIcon.js
3250
+ /**
3251
+ * Render the DeepSeek Web document glyph used by generic-file cards.
3252
+ * @param props - optional CSS class for sizing and placement.
3253
+ * @returns a decorative document SVG with an instance-safe gradient id.
3254
+ */
3255
+ function DocumentFileIcon({ className }) {
3256
+ const gradientId = useId();
3257
+ return jsxs("svg", {
3258
+ className,
3259
+ xmlns: "http://www.w3.org/2000/svg",
3260
+ width: "24",
3261
+ height: "28",
3262
+ viewBox: "0 0 24 28",
3263
+ fill: "none",
3264
+ "aria-hidden": true,
3265
+ children: [
3266
+ jsx("path", {
3267
+ d: "M16.5 0l7 7v15.6c0 2.25 0 3.375-.573 4.164a3 3 0 0 1-.663.663C21.475 28 20.349 28 18.1 28H5.9c-2.25 0-3.375 0-4.164-.573a3 3 0 0 1-.663-.663C.5 25.975.5 24.849.5 22.6V5.4c0-2.25 0-3.375.573-4.164a3 3 0 0 1 .663-.663C2.525 0 3.651 0 5.9 0h10.6z",
3268
+ fill: `url(#${gradientId})`
3269
+ }),
3270
+ jsx("path", {
3271
+ d: "M16.5 0l7 7h-3.8c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C16.5 5.48 16.5 4.92 16.5 3.8V0z",
3272
+ fill: "#fff",
3273
+ fillOpacity: ".55"
3274
+ }),
3275
+ jsx("path", {
3276
+ d: "M6 11.784c0-.433.351-.784.784-.784h10.432a.784.784 0 1 1 0 1.568H6.784A.784.784 0 0 1 6 11.784zM6 15.784c0-.433.351-.784.784-.784h10.432a.784.784 0 1 1 0 1.568H6.784A.784.784 0 0 1 6 15.784zM6.114 19.817c0-.433.35-.784.784-.784h6.318a.784.784 0 1 1 0 1.568H6.898a.784.784 0 0 1-.784-.784z",
3277
+ fill: "#fff"
3278
+ }),
3279
+ jsx("defs", { children: jsxs("linearGradient", {
3280
+ id: gradientId,
3281
+ x1: "1.5",
3282
+ y1: "-1",
3283
+ x2: "23.5",
3284
+ y2: "28",
3285
+ gradientUnits: "userSpaceOnUse",
3286
+ children: [jsx("stop", { stopColor: "#6D93FF" }), jsx("stop", {
3287
+ offset: "1",
3288
+ stopColor: "#5A71F0"
3289
+ })]
3290
+ }) })
3291
+ ]
3292
+ });
3293
+ }
3294
+ //#endregion
2913
3295
  //#region lib/types/relative-time.js
2914
3296
  /**
2915
3297
  * Compact relative-time bucketing shared by every surface that dates a
@@ -2956,6 +3338,76 @@ function relativeTime(at, now) {
2956
3338
  };
2957
3339
  }
2958
3340
  //#endregion
3341
+ //#region lib/types/rank-by-name.js
3342
+ /**
3343
+ * Shared ranking for `/` menu candidates: the query must be a
3344
+ * case-insensitive ordered subsequence of the candidate name. Prefix hits
3345
+ * rank first, then the strongest alignment score, then the source order of
3346
+ * the input. Decision record:
3347
+ * .agents/notes/archived/feature/2026-08-04-web-slash-command-fuzzy-discovery.md
3348
+ */
3349
+ /** Extra weight for name starts and separator boundaries. */
3350
+ function boundaryBonus(name, index) {
3351
+ return index === 0 || name.charAt(index - 1) === "-" || name.charAt(index - 1) === "_" ? 8 : 0;
3352
+ }
3353
+ /**
3354
+ * Score the strongest ordered-subsequence alignment in O(name × query).
3355
+ * Boundary and adjacent matches earn weight; skipped and leading characters
3356
+ * cost weight. Undefined when the query is not a subsequence of the name.
3357
+ */
3358
+ function alignmentScore(name, query) {
3359
+ if (query.length > name.length) return void 0;
3360
+ const noMatch = Number.NEGATIVE_INFINITY;
3361
+ let previous = Array(name.length).fill(noMatch);
3362
+ for (let index = 0; index < name.length; index++) if (name.charAt(index) === query.charAt(0)) previous[index] = 1 + boundaryBonus(name, index) - index;
3363
+ for (let queryIndex = 1; queryIndex < query.length; queryIndex++) {
3364
+ const current = Array(name.length).fill(noMatch);
3365
+ let left = noMatch;
3366
+ let leftLeft = noMatch;
3367
+ let bestGapped = noMatch;
3368
+ for (const [index, prior] of previous.entries()) {
3369
+ if (leftLeft !== noMatch) bestGapped = Math.max(bestGapped, leftLeft + index - 2);
3370
+ if (name.charAt(index) === query.charAt(queryIndex)) {
3371
+ const bonus = 1 + boundaryBonus(name, index);
3372
+ let score = noMatch;
3373
+ if (left !== noMatch) score = left + bonus + 4;
3374
+ if (bestGapped !== noMatch) score = Math.max(score, bestGapped + bonus + 1 - index);
3375
+ current[index] = score;
3376
+ }
3377
+ leftLeft = left;
3378
+ left = prior;
3379
+ }
3380
+ previous = current;
3381
+ }
3382
+ let best = noMatch;
3383
+ for (const score of previous) best = Math.max(best, score);
3384
+ return best === noMatch ? void 0 : best;
3385
+ }
3386
+ /**
3387
+ * Rank named items by a menu query.
3388
+ * @param items - candidates in source order (a host catalog, then client contributions).
3389
+ * @param rawQuery - the text typed after the trigger, matched case-insensitively.
3390
+ * @returns the matching items: prefix hits first, then by alignment score,
3391
+ * then in source order. The input list itself for an empty query.
3392
+ */
3393
+ function rankByName(items, rawQuery) {
3394
+ const query = rawQuery.toLowerCase();
3395
+ if (query === "") return items;
3396
+ const ranked = [];
3397
+ items.forEach((item, index) => {
3398
+ const name = item.name.toLowerCase();
3399
+ const score = alignmentScore(name, query);
3400
+ if (score !== void 0) ranked.push({
3401
+ item,
3402
+ index,
3403
+ prefix: name.startsWith(query),
3404
+ score
3405
+ });
3406
+ });
3407
+ ranked.sort((left, right) => Number(right.prefix) - Number(left.prefix) || right.score - left.score || left.index - right.index);
3408
+ return ranked.map((match) => match.item);
3409
+ }
3410
+ //#endregion
2959
3411
  //#region lib/types/JsonTree.js
2960
3412
  const OBJECT_PREVIEW_LIMIT = 4;
2961
3413
  const ARRAY_PREVIEW_LIMIT = 5;
@@ -3004,35 +3456,35 @@ function bracketOf(value) {
3004
3456
  }
3005
3457
  function previewPrimitive(value) {
3006
3458
  if (value === null) return jsx("span", {
3007
- className: css$14.keywordValue,
3459
+ className: css$16.keywordValue,
3008
3460
  children: "null"
3009
3461
  });
3010
3462
  if (typeof value === "string") return jsx("span", {
3011
- className: css$14.stringValue,
3463
+ className: css$16.stringValue,
3012
3464
  children: JSON.stringify(value)
3013
3465
  });
3014
3466
  if (typeof value === "number") return jsx("span", {
3015
- className: css$14.numberValue,
3467
+ className: css$16.numberValue,
3016
3468
  children: String(value)
3017
3469
  });
3018
3470
  if (typeof value === "boolean") return jsx("span", {
3019
- className: css$14.keywordValue,
3471
+ className: css$16.keywordValue,
3020
3472
  children: String(value)
3021
3473
  });
3022
3474
  if (typeof value === "bigint") return jsx("span", {
3023
- className: css$14.otherValue,
3475
+ className: css$16.otherValue,
3024
3476
  children: value.toString()
3025
3477
  });
3026
3478
  if (typeof value === "undefined") return jsx("span", {
3027
- className: css$14.otherValue,
3479
+ className: css$16.otherValue,
3028
3480
  children: "undefined"
3029
3481
  });
3030
3482
  if (typeof value === "symbol") return jsx("span", {
3031
- className: css$14.otherValue,
3483
+ className: css$16.otherValue,
3032
3484
  children: value.description ?? "Symbol"
3033
3485
  });
3034
3486
  if (typeof value === "function") return jsx("span", {
3035
- className: css$14.otherValue,
3487
+ className: css$16.otherValue,
3036
3488
  children: value.name || "Function"
3037
3489
  });
3038
3490
  return null;
@@ -3046,71 +3498,71 @@ function previewValue(value, depth) {
3046
3498
  const [open, close] = bracketOf(value);
3047
3499
  return jsxs(Fragment, { children: [
3048
3500
  jsx("span", {
3049
- className: css$14.punctuation,
3501
+ className: css$16.punctuation,
3050
3502
  children: open
3051
3503
  }),
3052
3504
  depth >= PREVIEW_DEPTH_LIMIT ? jsx("span", {
3053
- className: css$14.previewEllipsis,
3505
+ className: css$16.previewEllipsis,
3054
3506
  children: "…"
3055
3507
  }) : visible.map(([key, item], index) => jsxs("span", { children: [
3056
3508
  index > 0 && jsx("span", {
3057
- className: css$14.punctuation,
3509
+ className: css$16.punctuation,
3058
3510
  children: ", "
3059
3511
  }),
3060
3512
  !array && jsxs(Fragment, { children: [jsx("span", {
3061
- className: css$14.previewProperty,
3513
+ className: css$16.previewProperty,
3062
3514
  children: key
3063
3515
  }), jsx("span", {
3064
- className: css$14.punctuation,
3516
+ className: css$16.punctuation,
3065
3517
  children: ": "
3066
3518
  })] }),
3067
3519
  previewValue(item, depth + 1)
3068
3520
  ] }, key)),
3069
3521
  depth < PREVIEW_DEPTH_LIMIT && entries.length > limit && jsx("span", {
3070
- className: css$14.previewEllipsis,
3522
+ className: css$16.previewEllipsis,
3071
3523
  children: ", …"
3072
3524
  }),
3073
3525
  jsx("span", {
3074
- className: css$14.punctuation,
3526
+ className: css$16.punctuation,
3075
3527
  children: close
3076
3528
  })
3077
3529
  ] });
3078
3530
  }
3079
3531
  function primitiveValue(value) {
3080
3532
  if (value === null) return jsx("span", {
3081
- className: css$14.keywordValue,
3533
+ className: css$16.keywordValue,
3082
3534
  children: "null"
3083
3535
  });
3084
3536
  if (typeof value === "string") return jsx("span", {
3085
- className: css$14.stringValue,
3537
+ className: css$16.stringValue,
3086
3538
  children: JSON.stringify(value)
3087
3539
  });
3088
3540
  if (typeof value === "boolean") return jsx("span", {
3089
- className: css$14.keywordValue,
3541
+ className: css$16.keywordValue,
3090
3542
  children: String(value)
3091
3543
  });
3092
3544
  if (typeof value === "number") return jsx("span", {
3093
- className: css$14.numberValue,
3545
+ className: css$16.numberValue,
3094
3546
  children: String(value)
3095
3547
  });
3096
3548
  if (typeof value === "bigint") return jsx("span", {
3097
- className: css$14.numberValue,
3549
+ className: css$16.numberValue,
3098
3550
  children: `${value.toString()}n`
3099
3551
  });
3100
3552
  if (value instanceof Date) return jsx("span", {
3101
- className: css$14.otherValue,
3553
+ className: css$16.otherValue,
3102
3554
  children: value.toISOString()
3103
3555
  });
3104
3556
  if (typeof value === "function") return jsxs("span", {
3105
- className: css$14.otherValue,
3557
+ className: css$16.otherValue,
3106
3558
  children: ["function() ", "{ }"]
3107
3559
  });
3108
3560
  if (typeof value === "undefined") return jsx("span", {
3109
- className: css$14.otherValue,
3561
+ className: css$16.otherValue,
3110
3562
  children: "undefined"
3111
3563
  });
3112
3564
  return jsx("span", {
3113
- className: css$14.otherValue,
3565
+ className: css$16.otherValue,
3114
3566
  children: value.toString()
3115
3567
  });
3116
3568
  }
@@ -3138,7 +3590,7 @@ function moveFocus(button, direction) {
3138
3590
  function NodeField({ field, expandable, onToggle }) {
3139
3591
  if (field === void 0) return null;
3140
3592
  return jsxs("span", {
3141
- className: clsx(css$14.label, expandable && css$14.clickableLabel),
3593
+ className: clsx(css$16.label, expandable && css$16.clickableLabel),
3142
3594
  onClick: expandable ? onToggle : void 0,
3143
3595
  children: [fieldText(field), ":"]
3144
3596
  });
@@ -3167,7 +3619,7 @@ function JsonTreeNode({ field, initialExpanded, labels, lastElement, onClaimTabS
3167
3619
  }
3168
3620
  };
3169
3621
  const row = (children, ariaExpanded) => jsx("div", {
3170
- className: css$14.row,
3622
+ className: css$16.row,
3171
3623
  role: "treeitem",
3172
3624
  "aria-expanded": ariaExpanded,
3173
3625
  onMouseOver: (event) => {
@@ -3187,7 +3639,7 @@ function JsonTreeNode({ field, initialExpanded, labels, lastElement, onClaimTabS
3187
3639
  }),
3188
3640
  primitiveValue(value),
3189
3641
  !lastElement && jsx("span", {
3190
- className: css$14.punctuation,
3642
+ className: css$16.punctuation,
3191
3643
  children: ","
3192
3644
  })
3193
3645
  ] }));
@@ -3199,22 +3651,22 @@ function JsonTreeNode({ field, initialExpanded, labels, lastElement, onClaimTabS
3199
3651
  onToggle: toggle
3200
3652
  }),
3201
3653
  jsx("span", {
3202
- className: css$14.punctuation,
3654
+ className: css$16.punctuation,
3203
3655
  children: open
3204
3656
  }),
3205
3657
  jsx("span", {
3206
- className: css$14.punctuation,
3658
+ className: css$16.punctuation,
3207
3659
  children: close
3208
3660
  }),
3209
3661
  !lastElement && jsx("span", {
3210
- className: css$14.punctuation,
3662
+ className: css$16.punctuation,
3211
3663
  children: ","
3212
3664
  })
3213
3665
  ] }));
3214
3666
  return row(jsxs(Fragment, { children: [
3215
3667
  jsx("span", {
3216
3668
  ref: expanderRef,
3217
- className: clsx(css$14.expander, expanded ? css$14.collapseIcon : css$14.expandIcon),
3669
+ className: clsx(css$16.expander, expanded ? css$16.collapseIcon : css$16.expandIcon),
3218
3670
  "data-json-expander": true,
3219
3671
  role: "button",
3220
3672
  "aria-label": expanded ? labels.collapseNode : labels.expandNode,
@@ -3233,17 +3685,17 @@ function JsonTreeNode({ field, initialExpanded, labels, lastElement, onClaimTabS
3233
3685
  onToggle: toggle
3234
3686
  }),
3235
3687
  jsx("span", {
3236
- className: css$14.preview,
3688
+ className: css$16.preview,
3237
3689
  children: previewValue(value, 0)
3238
3690
  }),
3239
3691
  !lastElement && jsx("span", {
3240
- className: css$14.punctuation,
3692
+ className: css$16.punctuation,
3241
3693
  children: ","
3242
3694
  }),
3243
3695
  expanded && jsx("ul", {
3244
3696
  id: contentsId,
3245
3697
  role: "group",
3246
- className: css$14.children,
3698
+ className: css$16.children,
3247
3699
  children: entries.map(([key, item], index) => jsx(JsonTreeNode, {
3248
3700
  field: key,
3249
3701
  value: item,
@@ -3404,17 +3856,17 @@ function JsonTree({ data, label, className, copyable = true, expandTopLevel = tr
3404
3856
  const copyTitle = copyState === "copied" ? labels.copied : copyState === "failed" ? labels.copyFailed : copyTargetIsObject ? labels.copyPrettyJson : labels.copyValue;
3405
3857
  return jsxs("div", {
3406
3858
  ref: rootRef,
3407
- className: clsx(css$14.root, className),
3859
+ className: clsx(css$16.root, className),
3408
3860
  onMouseOver: handleRootMouseOver,
3409
3861
  onMouseLeave: () => {
3410
3862
  if (!copyMenuOpenRef.current) clearCopyTarget();
3411
3863
  },
3412
3864
  onScroll: handleScroll,
3413
3865
  children: [expandTopLevel ? jsxs("div", {
3414
- className: css$14.expandedTopLevel,
3866
+ className: css$16.expandedTopLevel,
3415
3867
  children: [
3416
3868
  jsx("div", {
3417
- className: clsx(css$14.row, css$14.topLevelBracket),
3869
+ className: clsx(css$16.row, css$16.topLevelBracket),
3418
3870
  "data-json-root-row": true,
3419
3871
  onMouseOver: (event) => {
3420
3872
  event.stopPropagation();
@@ -3424,13 +3876,13 @@ function JsonTree({ data, label, className, copyable = true, expandTopLevel = tr
3424
3876
  });
3425
3877
  },
3426
3878
  children: jsx("span", {
3427
- className: css$14.punctuation,
3879
+ className: css$16.punctuation,
3428
3880
  children: rootOpen
3429
3881
  })
3430
3882
  }),
3431
3883
  jsx("div", {
3432
3884
  "aria-label": label,
3433
- className: clsx(css$14.container, css$14.expandedTopLevelContainer),
3885
+ className: clsx(css$16.container, css$16.expandedTopLevelContainer),
3434
3886
  role: "tree",
3435
3887
  children: rootEntries.map(([key, value], index) => jsx(JsonTreeNode, {
3436
3888
  field: key,
@@ -3445,16 +3897,16 @@ function JsonTree({ data, label, className, copyable = true, expandTopLevel = tr
3445
3897
  }, key))
3446
3898
  }),
3447
3899
  jsx("div", {
3448
- className: clsx(css$14.row, css$14.topLevelBracket),
3900
+ className: clsx(css$16.row, css$16.topLevelBracket),
3449
3901
  children: jsx("span", {
3450
- className: css$14.punctuation,
3902
+ className: css$16.punctuation,
3451
3903
  children: rootClose
3452
3904
  })
3453
3905
  })
3454
3906
  ]
3455
3907
  }) : jsx("div", {
3456
3908
  "aria-label": label,
3457
- className: css$14.container,
3909
+ className: css$16.container,
3458
3910
  role: "tree",
3459
3911
  children: jsx(JsonTreeNode, {
3460
3912
  value: data,
@@ -3467,7 +3919,7 @@ function JsonTree({ data, label, className, copyable = true, expandTopLevel = tr
3467
3919
  onRowHover: handleRowHover
3468
3920
  })
3469
3921
  }), copyTarget !== void 0 && jsx("span", {
3470
- className: css$14.copyAnchor,
3922
+ className: css$16.copyAnchor,
3471
3923
  style: {
3472
3924
  left: copyTarget.left,
3473
3925
  top: copyTarget.top
@@ -3481,7 +3933,7 @@ function JsonTree({ data, label, className, copyable = true, expandTopLevel = tr
3481
3933
  anchor: jsx("button", {
3482
3934
  ref: copyButtonRef,
3483
3935
  type: "button",
3484
- className: css$14.copyButton,
3936
+ className: css$16.copyButton,
3485
3937
  "data-json-copy-button": true,
3486
3938
  "data-state": copyState,
3487
3939
  "aria-label": copyTitle,
@@ -3982,7 +4434,7 @@ function statusText(exitCode, signal, labels) {
3982
4434
  * Run-state indicator for the command, shown at the head of the prompt line so
3983
4435
  * the card states whether the command is still running without the reader
3984
4436
  * having to infer it from the presence of output. Three of {@link StateDotState}'s
3985
- * four states are reachable: the running chase (the same
4437
+ * five states are reachable: the running chase (the same
3986
4438
  * indicator a running tool row's leading icon uses, so the row and its card
3987
4439
  * never disagree), green for a clean settle, red for a signal or a non-zero
3988
4440
  * exit — the same status distinction {@link statusText} draws for the pill. A
@@ -4046,66 +4498,66 @@ function TerminalBlock({ command, cwd, home, output, exitCode, signal, running =
4046
4498
  const empty = lines.every((line) => line.every((span) => span.text.trim() === ""));
4047
4499
  const { hidden, capped, headLines, tailLines } = headTailCap(lines.length, maxLines, expanded);
4048
4500
  return jsxs("div", {
4049
- className: clsx(css$15.block, className),
4501
+ className: clsx(css$17.block, className),
4050
4502
  "data-terminal": "",
4051
4503
  "data-running": running ? "" : void 0,
4052
4504
  children: [jsxs("div", {
4053
- className: css$15.header,
4505
+ className: css$17.header,
4054
4506
  children: [
4055
4507
  jsxs("div", {
4056
- className: css$15.prompt,
4508
+ className: css$17.prompt,
4057
4509
  children: [jsx("span", {
4058
- className: css$15.runStateLabel,
4510
+ className: css$17.runStateLabel,
4059
4511
  children: state.label
4060
4512
  }), commandLines.map((line, index) => jsxs("div", {
4061
- className: css$15.promptLine,
4513
+ className: css$17.promptLine,
4062
4514
  children: [
4063
4515
  index === 0 && jsx(StateDot, {
4064
4516
  state: state.state,
4065
- className: css$15.runState
4517
+ className: css$17.runState
4066
4518
  }),
4067
4519
  jsx("span", {
4068
- className: css$15.cwd,
4520
+ className: css$17.cwd,
4069
4521
  children: index > 0 || cwd === void 0 ? "$" : promptLabel(cwd, home)
4070
4522
  }),
4071
4523
  jsx("span", {
4072
- className: css$15.command,
4524
+ className: css$17.command,
4073
4525
  children: line
4074
4526
  })
4075
4527
  ]
4076
4528
  }, index))]
4077
4529
  }),
4078
4530
  status !== void 0 && jsx(Pill, {
4079
- className: css$15.status,
4531
+ className: css$17.status,
4080
4532
  children: status
4081
4533
  }),
4082
4534
  !running && !empty && jsx("button", {
4083
4535
  type: "button",
4084
- className: css$15.copyButton,
4536
+ className: css$17.copyButton,
4085
4537
  onClick: onCopy,
4086
4538
  children: copied ? copy.copied : copy.copy
4087
4539
  })
4088
4540
  ]
4089
4541
  }), !running && (empty ? jsx("div", {
4090
- className: css$15.empty,
4542
+ className: css$17.empty,
4091
4543
  children: copy.noOutput
4092
4544
  }) : jsxs("div", {
4093
- className: css$15.output,
4545
+ className: css$17.output,
4094
4546
  children: [
4095
4547
  (capped ? lines.slice(0, headLines) : lines).map((line, index) => jsx("div", {
4096
- className: css$15.line,
4548
+ className: css$17.line,
4097
4549
  children: renderLine$1(line)
4098
4550
  }, index)),
4099
4551
  hidden > 0 && jsx("button", {
4100
4552
  type: "button",
4101
- className: css$15.expand,
4553
+ className: css$17.expand,
4102
4554
  "aria-expanded": expanded,
4103
4555
  "aria-label": expanded ? copy.collapseAria : copy.expandAria(hidden),
4104
4556
  onClick: onToggle,
4105
4557
  children: expanded ? copy.collapse : copy.expand(hidden)
4106
4558
  }),
4107
4559
  capped && lines.slice(lines.length - tailLines).map((line, index) => jsx("div", {
4108
- className: css$15.line,
4560
+ className: css$17.line,
4109
4561
  children: renderLine$1(line)
4110
4562
  }, index))
4111
4563
  ]
@@ -4683,51 +5135,51 @@ function ReadBlock({ label, labels, lines, totalLines, lang, maxLines = 16, clas
4683
5135
  const tailLines = maxLines - headLines;
4684
5136
  const windowed = lines.length < totalLines;
4685
5137
  const rows = (slice) => slice.map(([line, spans]) => jsxs("div", {
4686
- className: css$16.line,
5138
+ className: css$18.line,
4687
5139
  children: [jsx("span", {
4688
- className: css$16.gutter,
5140
+ className: css$18.gutter,
4689
5141
  "aria-hidden": true,
4690
5142
  children: line.number
4691
5143
  }), jsx("span", {
4692
- className: css$16.content,
5144
+ className: css$18.content,
4693
5145
  children: spans === void 0 ? line.text : renderSpans(spans)
4694
5146
  })]
4695
5147
  }, line.number));
4696
5148
  const paired = lines.map((line, index) => [line, highlighted?.[index]]);
4697
5149
  return jsxs("div", {
4698
5150
  ref: rootRef,
4699
- className: clsx(css$16.block, className),
5151
+ className: clsx(css$18.block, className),
4700
5152
  "data-read": "",
4701
5153
  children: [jsxs("div", {
4702
- className: css$16.banner,
5154
+ className: css$18.banner,
4703
5155
  children: [jsx("div", {
4704
- className: css$16.label,
5156
+ className: css$18.label,
4705
5157
  children: label ?? ""
4706
5158
  }), jsxs("div", {
4707
- className: css$16.action,
5159
+ className: css$18.action,
4708
5160
  children: [
4709
5161
  windowed && jsx("span", {
4710
- className: css$16.count,
5162
+ className: css$18.count,
4711
5163
  children: labels.window(lines.length, totalLines)
4712
5164
  }),
4713
5165
  jsx("span", {
4714
- className: css$16.lang,
5166
+ className: css$18.lang,
4715
5167
  children: lang ?? ""
4716
5168
  }),
4717
5169
  lines.length > 0 && jsx("button", {
4718
5170
  type: "button",
4719
- className: css$16.copyButton,
5171
+ className: css$18.copyButton,
4720
5172
  onClick: onCopy,
4721
5173
  children: copied ? labels.copied : labels.copy
4722
5174
  })
4723
5175
  ]
4724
5176
  })]
4725
5177
  }), jsxs("div", {
4726
- className: css$16.body,
5178
+ className: css$18.body,
4727
5179
  children: [
4728
5180
  rows(capped ? paired.slice(0, headLines) : paired),
4729
5181
  hidden > 0 && jsx(FoldToggle, {
4730
- className: css$16.expand,
5182
+ className: css$18.expand,
4731
5183
  expanded,
4732
5184
  hidden,
4733
5185
  labels,
@@ -4749,10 +5201,10 @@ function assertNever(value) {
4749
5201
  }
4750
5202
  /** The dim class per row kind (path/gap chrome vs the diff's own +/- colors). */
4751
5203
  const ROW_CLASS = {
4752
- path: css$17.path,
4753
- del: css$17.del,
4754
- add: css$17.add,
4755
- gap: css$17.gap
5204
+ path: css$19.path,
5205
+ del: css$19.del,
5206
+ add: css$19.add,
5207
+ gap: css$19.gap
4756
5208
  };
4757
5209
  /**
4758
5210
  * Total added/removed line counts across hunks — the same numbers the footer
@@ -4876,37 +5328,37 @@ function DiffBlock({ diffs, labels, maxLines = 16, className }) {
4876
5328
  const head = capped ? rows.slice(0, headLines) : rows;
4877
5329
  const tail = capped ? rows.slice(rows.length - tailLines) : [];
4878
5330
  return jsxs("div", {
4879
- className: clsx(css$17.block, className),
5331
+ className: clsx(css$19.block, className),
4880
5332
  "data-diff": "",
4881
5333
  children: [
4882
5334
  jsx("button", {
4883
5335
  type: "button",
4884
- className: css$17.copyButton,
5336
+ className: css$19.copyButton,
4885
5337
  onClick: onCopy,
4886
5338
  children: copied ? labels.copied : labels.copy
4887
5339
  }),
4888
5340
  jsxs("div", {
4889
- className: css$17.body,
5341
+ className: css$19.body,
4890
5342
  children: [
4891
5343
  head.map((row, index) => jsx("div", {
4892
- className: clsx(css$17.line, ROW_CLASS[row.kind]),
5344
+ className: clsx(css$19.line, ROW_CLASS[row.kind]),
4893
5345
  children: row.text
4894
5346
  }, index)),
4895
5347
  hidden > 0 && jsx(FoldToggle, {
4896
- className: css$17.expand,
5348
+ className: css$19.expand,
4897
5349
  expanded,
4898
5350
  hidden,
4899
5351
  labels,
4900
5352
  onToggle
4901
5353
  }),
4902
5354
  tail.map((row, index) => jsx("div", {
4903
- className: clsx(css$17.line, ROW_CLASS[row.kind]),
5355
+ className: clsx(css$19.line, ROW_CLASS[row.kind]),
4904
5356
  children: row.text
4905
5357
  }, index))
4906
5358
  ]
4907
5359
  }),
4908
5360
  jsxs("div", {
4909
- className: css$17.footer,
5361
+ className: css$19.footer,
4910
5362
  children: [
4911
5363
  "└ +",
4912
5364
  added,
@@ -5042,56 +5494,56 @@ function SearchBlock(props) {
5042
5494
  const tail = tailHeader === void 0 ? naturalTail : naturalTail.slice(1);
5043
5495
  const renderRow = (row) => {
5044
5496
  if (row.type === "path") return jsx("div", {
5045
- className: css$18.line,
5497
+ className: css$20.line,
5046
5498
  children: row.path
5047
5499
  });
5048
5500
  if (row.type === "match") return jsxs("div", {
5049
- className: css$18.line,
5501
+ className: css$20.line,
5050
5502
  children: [jsxs("span", {
5051
- className: css$18.lineNumber,
5503
+ className: css$20.lineNumber,
5052
5504
  children: [row.lineNumber, ": "]
5053
5505
  }), row.line]
5054
5506
  });
5055
5507
  return jsxs("button", {
5056
5508
  type: "button",
5057
- className: css$18.fileHeader,
5509
+ className: css$20.fileHeader,
5058
5510
  "aria-expanded": !row.collapsed,
5059
5511
  onClick: () => {
5060
5512
  toggleFile(row.index);
5061
5513
  },
5062
5514
  children: [jsx("span", {
5063
- className: css$18.filePath,
5515
+ className: css$20.filePath,
5064
5516
  children: row.path
5065
5517
  }), jsx("span", {
5066
- className: css$18.fileCount,
5518
+ className: css$20.fileCount,
5067
5519
  children: row.count
5068
5520
  })]
5069
5521
  });
5070
5522
  };
5071
5523
  return jsxs("div", {
5072
- className: clsx(css$18.block, className),
5524
+ className: clsx(css$20.block, className),
5073
5525
  "data-search": props.kind,
5074
5526
  children: [jsxs("div", {
5075
- className: css$18.header,
5527
+ className: css$20.header,
5076
5528
  children: [jsx("span", {
5077
- className: css$18.summary,
5529
+ className: css$20.summary,
5078
5530
  children: summaryText(props, shown, truncated, total)
5079
5531
  }), !empty && jsx("button", {
5080
5532
  type: "button",
5081
- className: css$18.copyButton,
5533
+ className: css$20.copyButton,
5082
5534
  onClick: onCopy,
5083
5535
  children: copied ? props.labels.copied : props.labels.copy
5084
5536
  })]
5085
5537
  }), empty ? jsx("div", {
5086
- className: css$18.empty,
5538
+ className: css$20.empty,
5087
5539
  children: props.labels.noResults
5088
5540
  }) : jsxs("div", {
5089
- className: css$18.body,
5541
+ className: css$20.body,
5090
5542
  children: [
5091
5543
  head.map((row) => jsx("div", { children: renderRow(row) }, rowKey(row))),
5092
5544
  hidden > 0 && jsx("button", {
5093
5545
  type: "button",
5094
- className: css$18.expand,
5546
+ className: css$20.expand,
5095
5547
  "aria-expanded": expanded,
5096
5548
  "aria-label": expanded ? props.labels.collapseAria : props.labels.expandAria(hidden),
5097
5549
  onClick: onToggle,
@@ -5892,24 +6344,24 @@ function CodeBlock({ code, lang, streaming, className, copyLabel, copiedLabel })
5892
6344
  });
5893
6345
  }, [copied, trimmed]);
5894
6346
  const body = streamedBody !== void 0 ? streamedBody : html === void 0 ? jsx("pre", {
5895
- className: css$19.plain,
6347
+ className: css$21.plain,
5896
6348
  children: jsx("code", { children: trimmed })
5897
6349
  }) : jsx("div", { dangerouslySetInnerHTML: { __html: html } });
5898
6350
  return jsxs("div", {
5899
6351
  ref: rootRef,
5900
- className: clsx(css$19.block, "md-code-block", className),
6352
+ className: clsx(css$21.block, "md-code-block", className),
5901
6353
  children: [jsx("div", {
5902
- className: css$19.bannerWrap,
6354
+ className: css$21.bannerWrap,
5903
6355
  children: jsxs("div", {
5904
- className: css$19.banner,
6356
+ className: css$21.banner,
5905
6357
  children: [jsx("div", {
5906
- className: css$19.infostring,
6358
+ className: css$21.infostring,
5907
6359
  children: lang ?? ""
5908
6360
  }), jsx("div", {
5909
- className: css$19.action,
6361
+ className: css$21.action,
5910
6362
  children: jsx("button", {
5911
6363
  type: "button",
5912
- className: css$19.copyButton,
6364
+ className: css$21.copyButton,
5913
6365
  onClick: onCopy,
5914
6366
  children: copied ? copiedLabel : copyLabel
5915
6367
  })
@@ -6127,13 +6579,16 @@ function renderNode(node, key, context) {
6127
6579
  const href = inlineCodeHttpUrl(value);
6128
6580
  if (href !== void 0) return jsx("code", { children: renderSafeLink(href, [value], "link") }, key);
6129
6581
  const mention = context.inLink === true ? void 0 : context.fileMentions?.resolve(value);
6130
- if (mention !== void 0) return jsx("code", { children: jsx("button", {
6582
+ if (mention !== void 0) return jsx("code", { children: jsxs("button", {
6131
6583
  type: "button",
6132
- className: css$20.fileMention,
6584
+ className: css$22.fileMention,
6133
6585
  title: mention.title,
6134
6586
  "aria-label": mention.label,
6135
6587
  onClick: mention.open,
6136
- children: value
6588
+ children: [jsx(LinkIcon, {
6589
+ kind: classifyLinkPath(value),
6590
+ className: css$22.linkIcon
6591
+ }), value]
6137
6592
  }) }, key);
6138
6593
  return jsx("code", { children: value }, key);
6139
6594
  }
@@ -6147,7 +6602,7 @@ function renderNode(node, key, context) {
6147
6602
  case "link": return renderAnchor(node.url, renderChildren(node.children, {
6148
6603
  ...context,
6149
6604
  inLink: true
6150
- }), key);
6605
+ }), key, !anchorWrapsOnlyImages(node.children));
6151
6606
  case "linkReference": return renderLinkReference(node, key, context);
6152
6607
  case "image": return renderImage(node.url, node.alt ?? "", key);
6153
6608
  case "imageReference": return renderImageReference(node, key, context);
@@ -6224,7 +6679,7 @@ function renderTable(node, key, context) {
6224
6679
  const [headRow, ...bodyRows] = node.children;
6225
6680
  const wide = (align === null ? headRow?.children.length ?? 0 : align.length) >= 4 && context.inBlockquote !== true;
6226
6681
  return jsx("div", {
6227
- className: clsx(css$20.tableScroll, wide ? "md-table-wide" : css$20.tableFill),
6682
+ className: clsx(css$22.tableScroll, wide ? "md-table-wide" : css$22.tableFill),
6228
6683
  tabIndex: wide ? 0 : void 0,
6229
6684
  children: jsxs("table", { children: [headRow !== void 0 && jsx("thead", { children: renderTableRow(headRow, "th", align, 0, context) }), bodyRows.length > 0 && jsx("tbody", { children: bodyRows.map((row, index) => renderTableRow(row, "td", align, index + 1, context)) })] })
6230
6685
  }, key);
@@ -6242,22 +6697,33 @@ function renderTableRow(row, cellTag, align, key, context) {
6242
6697
  }
6243
6698
  return jsx("tr", { children: cells }, key);
6244
6699
  }
6700
+ /**
6701
+ * True when an anchor's markdown children are all images, so the anchor is a
6702
+ * clickable picture (badge, thumbnail): the leading URL glyph would dangle
6703
+ * beside the image instead of leading link text, so those anchors skip it.
6704
+ */
6705
+ function anchorWrapsOnlyImages(children) {
6706
+ return children.length > 0 && children.every((child) => child.type === "image" || child.type === "imageReference");
6707
+ }
6245
6708
  /** Anchor over an already-authored href: allowlisted or unwrapped, external links get the safe attributes. */
6246
- function renderSafeLink(href, children, key) {
6709
+ function renderSafeLink(href, children, key, glyph = true) {
6247
6710
  const safeHref = sanitizeUrl(href);
6248
6711
  if (safeHref === "") return jsx(Fragment$1, { children }, key);
6249
- return jsx("a", {
6712
+ return jsxs("a", {
6250
6713
  href: safeHref,
6251
6714
  ...["http:", "https:"].includes(new URL(safeHref).protocol) ? {
6252
6715
  target: "_blank",
6253
6716
  rel: "noopener noreferrer"
6254
6717
  } : {},
6255
- children
6718
+ children: [glyph && jsx(LinkIcon, {
6719
+ kind: "url",
6720
+ className: css$22.linkIcon
6721
+ }), children]
6256
6722
  }, key);
6257
6723
  }
6258
6724
  /** Anchor over a parsed markdown destination, which hast normalized before the allowlist saw it. */
6259
- function renderAnchor(url, children, key) {
6260
- return renderSafeLink(normalizeUri(url), children, key);
6725
+ function renderAnchor(url, children, key, glyph = true) {
6726
+ return renderSafeLink(normalizeUri(url), children, key, glyph);
6261
6727
  }
6262
6728
  /**
6263
6729
  * The complete inline-code value when it is exactly an absolute HTTP(S) URL
@@ -6275,11 +6741,11 @@ function inlineCodeHttpUrl(value) {
6275
6741
  function renderImage(url, alt, key) {
6276
6742
  const imageSrc = remoteImageUrl(sanitizeUrl(normalizeUri(url)));
6277
6743
  if (imageSrc === void 0) return jsx("span", {
6278
- className: css$20.imageAlt,
6744
+ className: css$22.imageAlt,
6279
6745
  children: alt
6280
6746
  }, key);
6281
6747
  return jsx("img", {
6282
- className: css$20.image,
6748
+ className: css$22.image,
6283
6749
  src: imageSrc,
6284
6750
  alt,
6285
6751
  loading: "lazy",
@@ -6300,10 +6766,11 @@ function renderLinkReference(node, key, context) {
6300
6766
  renderChildren(node.children, context),
6301
6767
  referenceSuffix(node)
6302
6768
  ] }, key);
6303
- return renderAnchor(definition.url, renderChildren(node.children, {
6769
+ const rendered = renderChildren(node.children, {
6304
6770
  ...context,
6305
6771
  inLink: true
6306
- }), key);
6772
+ });
6773
+ return renderAnchor(definition.url, rendered, key, !anchorWrapsOnlyImages(node.children));
6307
6774
  }
6308
6775
  function renderImageReference(node, key, context) {
6309
6776
  const definition = context.targets.definitions.get(node.identifier.toUpperCase());
@@ -6514,7 +6981,7 @@ const MarkdownText = memo(function MarkdownText({ text, streaming = false, label
6514
6981
  fileMentions
6515
6982
  ]);
6516
6983
  return jsx("div", {
6517
- className: css$20.markdown,
6984
+ className: css$22.markdown,
6518
6985
  children
6519
6986
  });
6520
6987
  });
@@ -6570,12 +7037,15 @@ function SafeLink({ url, label, className }) {
6570
7037
  className,
6571
7038
  children: label
6572
7039
  });
6573
- return jsx("a", {
7040
+ return jsxs("a", {
6574
7041
  className,
6575
7042
  href,
6576
7043
  target: "_blank",
6577
7044
  rel: "noopener noreferrer",
6578
- children: label
7045
+ children: [jsx(LinkIcon, {
7046
+ kind: "url",
7047
+ className: css$23.linkIcon
7048
+ }), label]
6579
7049
  });
6580
7050
  }
6581
7051
  /**
@@ -6589,20 +7059,20 @@ function SafeLink({ url, label, className }) {
6589
7059
  */
6590
7060
  function SourceItem({ source, ordinal }) {
6591
7061
  return jsxs("li", {
6592
- className: css$21.source,
7062
+ className: css$23.source,
6593
7063
  value: ordinal,
6594
7064
  children: [
6595
7065
  jsx(SafeLink, {
6596
7066
  url: source.url,
6597
7067
  label: linkLabel(source.url, source.title),
6598
- className: css$21.sourceLink
7068
+ className: css$23.sourceLink
6599
7069
  }),
6600
7070
  source.snippet !== void 0 && source.snippet !== "" && jsx("div", {
6601
- className: css$21.snippet,
7071
+ className: css$23.snippet,
6602
7072
  children: source.snippet
6603
7073
  }),
6604
7074
  source.publishedAt !== void 0 && source.publishedAt !== "" && jsx("div", {
6605
- className: css$21.published,
7075
+ className: css$23.published,
6606
7076
  children: source.publishedAt
6607
7077
  })
6608
7078
  ]
@@ -6617,28 +7087,28 @@ function SourceItem({ source, ordinal }) {
6617
7087
  function WebSearchBlock({ answer, sources, truncated, labels, className }) {
6618
7088
  const empty = (answer === void 0 || answer === "") && sources.length === 0;
6619
7089
  return jsxs("div", {
6620
- className: clsx(css$21.block, className),
7090
+ className: clsx(css$23.block, className),
6621
7091
  "data-web": "search",
6622
7092
  children: [
6623
7093
  answer !== void 0 && answer !== "" && jsx("div", {
6624
- className: css$21.answer,
7094
+ className: css$23.answer,
6625
7095
  children: jsx(MarkdownText, {
6626
7096
  text: answer,
6627
7097
  labels: labels.markdown
6628
7098
  })
6629
7099
  }),
6630
7100
  empty ? jsx("div", {
6631
- className: css$21.empty,
7101
+ className: css$23.empty,
6632
7102
  children: labels.noResults
6633
7103
  }) : jsx("ol", {
6634
- className: css$21.sources,
7104
+ className: css$23.sources,
6635
7105
  children: sources.map((source, index) => jsx(SourceItem, {
6636
7106
  source,
6637
7107
  ordinal: index + 1
6638
7108
  }, index))
6639
7109
  }),
6640
7110
  truncated && jsx("div", {
6641
- className: css$21.truncated,
7111
+ className: css$23.truncated,
6642
7112
  children: labels.sourcesTruncated
6643
7113
  })
6644
7114
  ]
@@ -6651,23 +7121,23 @@ function WebSearchBlock({ answer, sources, truncated, labels, className }) {
6651
7121
  */
6652
7122
  function WebFetchBlock({ url, statusCode, truncated, labels, className }) {
6653
7123
  return jsxs("div", {
6654
- className: clsx(css$21.block, css$21.fetch, className),
7124
+ className: clsx(css$23.block, css$23.fetch, className),
6655
7125
  "data-web": "fetch",
6656
7126
  children: [jsx(SafeLink, {
6657
7127
  url,
6658
7128
  label: url,
6659
- className: css$21.fetchUrl
7129
+ className: css$23.fetchUrl
6660
7130
  }), jsxs("div", {
6661
- className: css$21.fetchMeta,
7131
+ className: css$23.fetchMeta,
6662
7132
  children: [jsxs("span", {
6663
- className: css$21.status,
7133
+ className: css$23.status,
6664
7134
  children: [
6665
7135
  labels.http,
6666
7136
  " ",
6667
7137
  statusCode
6668
7138
  ]
6669
7139
  }), truncated && jsx("span", {
6670
- className: css$21.truncated,
7140
+ className: css$23.truncated,
6671
7141
  children: labels.contentTruncated
6672
7142
  })]
6673
7143
  })]
@@ -6701,10 +7171,10 @@ function JsonBlock({ label, payload, defaultOpen = false, truncatedLabel }) {
6701
7171
  truncatedLabel
6702
7172
  ]);
6703
7173
  return jsxs("div", {
6704
- className: css$22.root,
7174
+ className: css$24.root,
6705
7175
  children: [jsxs("button", {
6706
7176
  type: "button",
6707
- className: css$22.toggle,
7177
+ className: css$24.toggle,
6708
7178
  onClick: () => {
6709
7179
  setOpen((v) => !v);
6710
7180
  },
@@ -6714,20 +7184,12 @@ function JsonBlock({ label, payload, defaultOpen = false, truncatedLabel }) {
6714
7184
  label
6715
7185
  ]
6716
7186
  }), open && jsx("pre", {
6717
- className: css$22.body,
7187
+ className: css$24.body,
6718
7188
  children: body
6719
7189
  })]
6720
7190
  });
6721
7191
  }
6722
7192
  //#endregion
6723
- //#region lib/types/markdown/MessageText.js
6724
- function MessageText({ text }) {
6725
- return jsx("div", {
6726
- className: css$23.text,
6727
- children: text
6728
- });
6729
- }
6730
- //#endregion
6731
7193
  //#region lib/types/markdown/plain-text.js
6732
7194
  /**
6733
7195
  * Markdown-to-plain-text projection for compact summaries and labels.
@@ -6799,6 +7261,6 @@ function extractMarkdownPlainText(markdown, options = {}) {
6799
7261
  }
6800
7262
  }
6801
7263
  //#endregion
6802
- export { BrandWordmark, Button, 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, FishLogo, HoverCard, IconAgentPresetOutline16, IconAlarmClockOutline16, IconApiOutline14, IconArchiveOutline20, IconBranchOutline16, IconBrowseOutline16, IconCheckOutline14, IconCheckOutline16, IconChecklistOutline14, IconChevronDownOutline14, IconChevronLeftOutline14, IconChevronRightOutline14, IconChevronUpOutline14, IconClockOutline16, IconCloseFill14, IconCloseOutline16, IconCodeOutline16, IconContextInjectionOutline16, IconCopyOutline16, IconCordisPluginOutline14, IconDarkOutline16, IconDataOutline16, IconDatabaseOutline16, IconDislikeFill16, IconDislikeOutline16, IconDownloadOutline16, IconEditOutline16, IconEllipsisOutline16, IconEnhanceOutline16, IconFolderClose16, IconFolderOpen16, IconFolderOpenOutline16, IconFollowsystemOutline16, IconFullscreenOutline16, IconGlobeOutline14, IconGoalOutline16, IconInspectOutline12, IconLightOutline16, IconLikeFill16, IconLikeOutline16, IconLinkOutline14, IconLinkOutline16, IconListPenOutline16, IconLoadingOutline16, IconNewChatOutline16, IconPanelLeftOutline16, IconPaperclipOutline16, IconPauseOutline16, IconPersonalizationOutline16, IconPlayOutline16, IconPlusOutline16, IconProjectAddOutline16, IconQuestionOutline14, IconQueueOutline14, IconRefreshOutline14, IconRefreshOutline16, IconRightUpOutline14, IconRightUpOutline16, IconSearchOutline16, IconSendOutline14, IconSendOutline16, IconSettingsOutline14, IconSettingsOutline16, IconShareOutline16, IconSkillOutline16, IconSparkle16, IconStopFill16, IconThinkOutline14, IconThinkOutline16, IconTrashOutline16, IconTreeCorner8x10, IconTriangleRightFill14, IconUserOutline16, IconWarningOutline16, Input, JsonBlock, JsonTree, MarkdownText, Menu, MessageText, Modal, OnboardingSurface, Pill, ReadBlock, ReferenceIcon, RiskConfirmation, SearchBlock, StateDot, TerminalBlock, Toast, Tooltip, WebBlock, diffTotals, extractMarkdownPlainText, projectUserText, relativeTime, useAnchoredMaxHeight, useAnchoredPosition, useDismissOnOutsidePointer, writeClipboard };
7264
+ export { BrandWordmark, Button, CodeBlock, ConnectionIndicator, DEFAULT_DIFF_MAX_LINES, DEFAULT_READ_MAX_LINES, DEFAULT_SEARCH_MAX_LINES, DEFAULT_TERMINAL_MAX_LINES, DiffBlock, DisclosureRow, DocumentFileIcon, FISH_LOGO_PATH, FISH_LOGO_VIEWBOX, FishLogo, HoverCard, IconAgentPresetOutline16, IconAlarmClockOutline16, IconApiOutline14, IconArchiveOutline20, IconBranchOutline16, IconBrowseOutline16, IconCheckOutline14, IconCheckOutline16, IconChecklistOutline14, IconChevronDownOutline14, IconChevronLeftOutline14, IconChevronRightOutline14, IconChevronUpOutline14, IconClockOutline16, IconCloseFill14, IconCloseOutline16, IconCodeOutline16, IconContextInjectionOutline16, IconCopyOutline16, IconCordisPluginOutline14, IconDarkOutline16, IconDataOutline16, IconDatabaseOutline16, IconDislikeFill16, IconDislikeOutline16, IconDownloadOutline16, IconEditOutline16, IconEllipsisOutline16, IconEnhanceOutline16, IconFolderClose16, IconFolderOpen16, IconFolderOpenOutline16, IconFollowsystemOutline16, IconFullscreenOutline16, IconGlobeOutline14, IconGoalOutline16, IconInspectOutline12, IconLightOutline16, IconLikeFill16, IconLikeOutline16, IconLinkOutline14, IconLinkOutline16, IconListPenOutline16, IconLoadingOutline16, IconNewChatOutline16, IconPanelLeftOutline16, IconPaperclipOutline16, IconPauseOutline16, IconPersonalizationOutline16, IconPlayOutline16, IconPlusOutline16, IconProjectAddOutline16, IconQuestionOutline14, IconQueueOutline14, IconRefreshOutline14, IconRefreshOutline16, IconRightUpOutline14, IconRightUpOutline16, IconSearchOutline16, IconSendOutline14, IconSendOutline16, IconSettingsOutline14, IconSettingsOutline16, IconShareOutline16, IconSkillOutline16, IconSparkle16, IconStopFill16, IconThinkOutline14, IconThinkOutline16, IconTrashOutline16, IconTreeCorner8x10, IconTriangleRightFill14, IconUserOutline16, IconWarningOutline16, Input, JsonBlock, JsonTree, LinkIcon, MarkdownText, Menu, Modal, OnboardingSurface, Pill, ReadBlock, ReferenceIcon, RiskConfirmation, SearchBlock, StateDot, Switch, Tag, TerminalBlock, Toast, Tooltip, WebBlock, classifyLinkPath, diffTotals, extractMarkdownPlainText, fileSizeText, projectUserText, rankByName, relativeTime, useAnchoredMaxHeight, useAnchoredPosition, useDismissOnOutsidePointer, writeClipboard };
6803
7265
 
6804
7266
  //# sourceMappingURL=index.js.map