@deepseek-ai/dsh-client-ui-primitives 0.2.2-alpha.2 → 0.2.2-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import type { HTMLAttributes } from 'react';
1
2
  /** Lightbox strings the owner resolves from its own locale namespace. */
2
3
  export interface ImageLightboxLabels {
3
4
  /** Accessible name of the preview dialog. */
@@ -15,13 +16,15 @@ export interface ImageLightboxLabels {
15
16
  * @param props.src - the original image URL.
16
17
  * @param props.alt - the image's alt text.
17
18
  * @param props.labels - dialog and close-control strings.
19
+ * @param props.contextMenuProps - optional original-image gesture bindings.
18
20
  * @param props.onClose - dismiss callback owned by the opener.
19
21
  * @returns the modal preview dialog.
20
22
  */
21
- export declare function ImageLightbox({ src, alt, labels, onClose }: {
23
+ export declare function ImageLightbox({ src, alt, labels, onClose, contextMenuProps }: {
22
24
  src: string;
23
25
  alt: string;
24
26
  labels: ImageLightboxLabels;
25
27
  onClose: () => void;
28
+ contextMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'onKeyDown' | 'tabIndex'> | undefined;
26
29
  }): import("react").ReactPortal;
27
30
  //# sourceMappingURL=ImageLightbox.d.ts.map
@@ -14,7 +14,7 @@ export interface MenuItem {
14
14
  /** Destructive row: error-colored text/icon and danger hover fill. */
15
15
  danger?: boolean;
16
16
  /** Nested card opened to the right on hover/focus. */
17
- submenu?: readonly MenuItem[];
17
+ submenu?: readonly MenuEntry[];
18
18
  }
19
19
  /** Hairline between item groups (not selectable). */
20
20
  export interface MenuSeparator {
@@ -41,6 +41,12 @@ export interface MenuItemButtonProps {
41
41
  current?: boolean;
42
42
  /** Whether the row cannot be activated. */
43
43
  disabled?: boolean;
44
+ /**
45
+ * Why the disabled row cannot be activated. The row then stays hoverable and
46
+ * focusable, shows the reason in a tooltip, and exposes it as the row's
47
+ * description; an enabled row ignores it.
48
+ */
49
+ disabledReason?: string | undefined;
44
50
  /** Destructive row: error-colored text/icon and danger hover fill. */
45
51
  danger?: boolean;
46
52
  /**
@@ -64,12 +70,13 @@ export interface MenuItemButtonProps {
64
70
  * @param props.icon - optional leading icon.
65
71
  * @param props.current - whether the row identifies the currently displayed page or view.
66
72
  * @param props.disabled - whether the row cannot be activated.
73
+ * @param props.disabledReason - why a disabled row cannot be activated, shown in a tooltip and read as its description.
67
74
  * @param props.danger - whether to use the destructive row colors.
68
75
  * @param props.separatorBefore - whether this row starts a new group (hairline above it).
69
76
  * @param props.onSelect - row activation callback.
70
77
  * @returns one menu-item row.
71
78
  */
72
- export declare function MenuItemButton({ children, shortcut, icon, current, disabled, danger, separatorBefore, onSelect, }: MenuItemButtonProps): import("react").JSX.Element;
79
+ export declare function MenuItemButton({ children, shortcut, icon, current, disabled, disabledReason, danger, separatorBefore, onSelect, }: MenuItemButtonProps): import("react").JSX.Element;
73
80
  /**
74
81
  * Render an anchored dropdown menu. While the list is open its keys mirror the
75
82
  * composer's: Tab settles the focused row — from the trigger, Tab enters the
@@ -77,6 +84,9 @@ export declare function MenuItemButton({ children, shortcut, icon, current, disa
77
84
  * anchor's first button, and selecting a row does the same — the rows unmount
78
85
  * with the list. Only a keyboard on the trigger or inside the list is
79
86
  * intercepted; Tab presses elsewhere on the page stay the browser's.
87
+ * @param props.contextual - cursor positioning, context dismissal, and per-divider icon alignment.
88
+ * @param props.exiting - retain an inert popup during dismissal or replacement fade.
89
+ * @param props.returnFocus - original control captured before asynchronous menu preparation.
80
90
  * @param props.autoFocus - focus the first item on open; the arrow keys walk the list either way.
81
91
  * @param props.open - whether the list is showing (owner-controlled).
82
92
  * @param props.anchor - the trigger element (rendered in place).
@@ -90,9 +100,9 @@ export declare function MenuItemButton({ children, shortcut, icon, current, disa
90
100
  * @param props.align - list alignment against the anchor (default 'start').
91
101
  * @param props.side - open below (`bottom`, default) or above (`top`) the anchor.
92
102
  * @param props.portal - render the list into document.body, fixed-positioned
93
- * from the anchor rect (follows movement and resizing while open). Use when an
94
- * ancestor's overflow clipping would crop the in-place list; default false
95
- * keeps the pure-CSS in-place behavior.
103
+ * synchronously (follows movement, resizing, and browser zoom while open)
104
+ * and clamped inside the visual viewport. Use when an ancestor's overflow clipping would crop the
105
+ * in-place list; default false keeps the pure-CSS in-place behavior.
96
106
  * @param props.closeOnPointerLeave - close the list once the pointer has left
97
107
  * both trigger and list for the pointer grace (default false keeps it open
98
108
  * until outside click/Escape/selection). The grace makes the 4px trigger->list
@@ -103,11 +113,11 @@ export declare function MenuItemButton({ children, shortcut, icon, current, disa
103
113
  * directly (e.g. from a host-owned trigger button) instead of measuring the
104
114
  * Menu's own wrapper span. Required when the wrapper isn't itself laid out at
105
115
  * the trigger (render-prop anchors, effect-positioned proxies — measuring the
106
- * wrapper there races the host's layout effects). Called on open, each animation
107
- * frame, and scroll/resize; return null to skip placement for that frame.
116
+ * wrapper there races the host's layout effects). Called while tracking the
117
+ * anchor and on scroll/resize; return null to defer placement.
108
118
  * @param props.minWidthFromAnchor - in portal mode, keep the menu at least as wide as its anchor, bounded by viewport margins.
109
119
  * @param props.footer - rows pinned below the scrolling items area, separated
110
- * by a hairline; they stay visible while the items above scroll.
120
+ * by a hairline; contextual menus reuse an explicit leading separator. These rows stay visible while the items above scroll.
111
121
  * @param props.children - component rows rendered after `items` in the same
112
122
  * list, each a `role="menuitem"` button such as {@link MenuItemButton}; they
113
123
  * share the keyboard walk, the submenu exclusivity, and the post-selection
@@ -122,8 +132,14 @@ export declare function MenuItemButton({ children, shortcut, icon, current, disa
122
132
  * document.body outside the owner's DOM subtree.
123
133
  * @returns anchor wrapper with the conditional list.
124
134
  */
125
- export declare function Menu({ open, anchor, items, children, selectedId, selectedIds, onSelect, onClose, align, side, portal, closeOnPointerLeave, dense, compact, autoFocus, selection, getAnchorRect, minWidthFromAnchor, footer, className, listClassName }: {
135
+ export declare function Menu({ open, anchor, items, children, selectedId, selectedIds, onSelect, onClose, align, side, portal, closeOnPointerLeave, dense, compact, autoFocus, selection, getAnchorRect, minWidthFromAnchor, footer, className, listClassName, contextual, exiting, returnFocus }: {
126
136
  open: boolean;
137
+ /** Pointer-positioned popup: cursor clearance, grouped icons, and context gestures. */
138
+ contextual?: boolean;
139
+ /** Resolve the original control for focus restoration and inert/hidden dismissal. */
140
+ returnFocus?: (() => HTMLElement | null) | undefined;
141
+ /** Retain a dismissed context popup during its short fade. */
142
+ exiting?: 'dismiss' | 'replace' | undefined;
127
143
  autoFocus?: boolean;
128
144
  anchor: ReactNode;
129
145
  items?: readonly MenuEntry[];
@@ -1,9 +1,18 @@
1
1
  /** Shared menu material and the macOS backing that lets Chromium blur transparent windows. */
2
2
  import { type ComponentPropsWithoutRef } from 'react';
3
+ /** Context-menu transition durations in milliseconds, shared with its lifecycle owner. */
4
+ export declare const MENU_TRANSITION_MS: Readonly<{
5
+ enter: 40;
6
+ dismiss: 80;
7
+ replace: 10;
8
+ prepare: 20;
9
+ }>;
3
10
  /** Menu containers preserve native div props and refs. */
4
11
  export interface MenuSurfaceProps extends ComponentPropsWithoutRef<'div'> {
5
12
  /** Match the shared compact menu's smaller outer radius. */
6
13
  compact?: boolean;
14
+ /** Fade direct content, material, and native backing without isolating the material's backdrop. */
15
+ phase?: 'enter' | 'dismiss' | 'replace' | undefined;
7
16
  }
8
17
  /**
9
18
  * Paint a menu and, on macOS, an opaque backing behind the page content within its bounds.
@@ -10,6 +10,10 @@ export declare const ICON_REGULAR_STROKE = 1;
10
10
  export declare const ICON_MEDIUM_STROKE = 1.3;
11
11
  /** Default artwork keyed by glyph name; symbol ids derive from these keys. */
12
12
  export declare const ICON_ARTWORK: {
13
+ 'save-outline': {
14
+ size: number;
15
+ svg: (strokeWidth: number) => string;
16
+ };
13
17
  'new-chat-outline': {
14
18
  size: number;
15
19
  svg: (strokeWidth: number) => string;
@@ -391,4 +391,8 @@ type AppsAddIconProps = IconProps & {
391
391
  export declare const IconAppsAddOutlineRegular: (props: AppsAddIconProps) => React.JSX.Element;
392
392
  /** Three entry tiles and an add mark with 1.3px strokes. */
393
393
  export declare const IconAppsAddOutlineMedium: (props: AppsAddIconProps) => React.JSX.Element;
394
+ /** Regular floppy-disk save action. */
395
+ export declare const IconSaveOutlineRegular: (props: IconProps) => React.JSX.Element;
396
+ /** Medium floppy-disk save action. */
397
+ export declare const IconSaveOutlineMedium: (props: IconProps) => React.JSX.Element;
394
398
  //# sourceMappingURL=index.d.ts.map
@@ -32,7 +32,7 @@ export { Checkbox } from './Checkbox.tsx';
32
32
  export { Input } from './Input.tsx';
33
33
  export { InlineEditor } from './InlineEditor.tsx';
34
34
  export { Menu, MenuItemButton } from './Menu.tsx';
35
- export { MenuSurface } from './MenuSurface.tsx';
35
+ export { MenuSurface, MENU_TRANSITION_MS } from './MenuSurface.tsx';
36
36
  export type { MenuSurfaceProps } from './MenuSurface.tsx';
37
37
  export { MenuGroup, observeStickyMenuGroups } from './MenuGroup.tsx';
38
38
  export type { MenuItemButtonProps, MenuEntry, MenuItem, MenuSeparator, MenuLabel } from './Menu.tsx';
@@ -102,7 +102,7 @@ export type { WebBlockProps, WebSearchBlockProps, WebFetchBlockProps, WebSourceV
102
102
  export { CodeBlock } from './markdown/CodeBlock.tsx';
103
103
  export type { CodeBlockProps } from './markdown/CodeBlock.tsx';
104
104
  export { JsonBlock } from './markdown/JsonBlock.tsx';
105
- export { MarkdownDelegateProvider } from './markdown/MarkdownDelegate.tsx';
105
+ export { MarkdownDelegateProvider, useMarkdownDelegate } from './markdown/MarkdownDelegate.tsx';
106
106
  export type { MarkdownDelegate, MarkdownDelegateProviderProps, MarkdownExternalLinkHandler } from './markdown/MarkdownDelegate.tsx';
107
107
  export { DetailDocument, detailDocumentState, useDetailDocumentLabels } from './DetailDocument.tsx';
108
108
  export type { DetailDocumentCopy, DetailDocumentLabels, DetailDocumentRead, DetailDocumentState } from './DetailDocument.tsx';
@@ -118,4 +118,5 @@ export type { ImageLightboxLabels } from './ImageLightbox.tsx';
118
118
  export { QuotePreview } from './QuotePreview.tsx';
119
119
  export type { QuotePreviewProps, QuotePreviewRemoval } from './QuotePreview.tsx';
120
120
  export { formatQuoteText } from './markdown/quote-text.ts';
121
+ export type { MarkdownMenuTarget } from './markdown/MarkdownDelegate.tsx';
121
122
  //# sourceMappingURL=index.d.ts.map
@@ -1,18 +1,36 @@
1
- import type { ReactNode } from 'react';
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { FileDragActions } from '../file-drag-actions.ts';
2
3
  import type { ImageLightboxLabels } from '../ImageLightbox.tsx';
3
4
  /**
4
5
  * Handle one sanitized absolute HTTP(S) URL selected from Markdown.
5
6
  * @param href - destination URL.
6
7
  */
7
8
  export type MarkdownExternalLinkHandler = (href: string) => void;
9
+ /** Explicit object and viewport coordinates from the element owning a context gesture. */
10
+ export type MarkdownMenuTarget = {
11
+ kind: 'file';
12
+ path: string;
13
+ line?: number;
14
+ } | {
15
+ kind: 'url';
16
+ url: string;
17
+ } | {
18
+ kind: 'image';
19
+ url: string;
20
+ path?: string;
21
+ name?: string;
22
+ mediaType?: string;
23
+ };
8
24
  /** Navigation capabilities supplied by the nearest Markdown owner. */
9
25
  export interface MarkdownDelegate {
26
+ /** Open an object menu without executing its normal activation. */
27
+ readonly getTriggerProps?: ((target: MarkdownMenuTarget) => Pick<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'onKeyDown' | 'tabIndex'>) | undefined;
10
28
  /**
11
29
  * Image previews for decoded local paths in this owner's workspace. The renderer
12
30
  * appends a per-mount `load` query parameter to `api/file` route URLs.
13
31
  */
14
32
  readonly fileImages?: {
15
- fileDrag: import('../file-drag-actions.ts').FileDragActions;
33
+ fileDrag: FileDragActions;
16
34
  resolve: (path: string) => string | undefined;
17
35
  resourceAddress?: ((path: string) => string) | undefined;
18
36
  labels: ImageLightboxLabels & {
@@ -42,7 +60,7 @@ export interface MarkdownDelegateProviderProps extends MarkdownDelegate {
42
60
  * @param props - Child tree and its file and HTTP(S) link handlers.
43
61
  * @returns the scoped child tree.
44
62
  */
45
- export declare function MarkdownDelegateProvider({ children, openExternalLink, openFile, fileImages, }: MarkdownDelegateProviderProps): ReactNode;
63
+ export declare function MarkdownDelegateProvider({ children, openExternalLink, openFile, fileImages, getTriggerProps, }: MarkdownDelegateProviderProps): ReactNode;
46
64
  /**
47
65
  * Read the nearest Markdown navigation capabilities.
48
66
  * @returns Owner callbacks, or an empty delegate outside a provider.
@@ -36,7 +36,9 @@ export type { MarkdownCodeLabels, MarkdownFileMentions, MarkdownLabels, Markdown
36
36
  * renderers, such as package READMEs. `textInteractionSource` marks the
37
37
  * existing root as a source for text selection interactions.
38
38
  * The provider's `openFile` enables local Markdown links in settled messages,
39
- * including `#L24` and `#L24-L30` destinations (ranges open at their first line).
39
+ * including `#L24` / `#L24-L30` fragments and `:24` / `:24-30` / `:24:5` suffixes
40
+ * (ranges open at their first line, columns are ignored, and invalid locations
41
+ * open only the file; see the README for URL/path classification).
40
42
  * @returns A GFM document with TeX math rendered through KaTeX; raw HTML never
41
43
  * renders as markup, and unsafe protocols are disabled. Local links without an opener remain text;
42
44
  * absolute HTTP(S) images render directly.
@@ -1,10 +1,20 @@
1
1
  /** Local Markdown destinations accepted by the file-preview callback. */
2
2
  /**
3
- * Decode a file destination and its optional GitHub-style line fragment.
4
- * Literal `?` and `#` in filenames must be percent-encoded.
3
+ * Recognize a relative, rooted, or absolute Windows path before URL parsing.
4
+ * @param value - A decoded or URI-normalized destination.
5
+ * @returns Whether a filesystem prefix makes the destination unambiguous.
6
+ */
7
+ export declare function isExplicitFilePath(value: string): boolean;
8
+ /**
9
+ * Decode a file destination with a fragment, line range, or line/column suffix.
10
+ * Explicit relative, slash/backslash-rooted, and Windows drive paths take
11
+ * precedence over URLs. Other parseable absolute URLs are not file links.
12
+ * Fragments take precedence over colon suffixes; invalid locations open the
13
+ * file without selecting a line. Columns are consumed but not selected.
14
+ * Percent-encode literal `?`, `#`, and numeric colon suffixes in filenames.
5
15
  * @param value - Parsed Markdown link destination.
6
16
  * @returns A local path and optional first line, or undefined for URLs,
7
- * fragment-only links, queries, malformed escapes, or invalid line ranges.
17
+ * fragment-only links, queries, malformed escapes, or control characters.
8
18
  */
9
19
  export declare function parseFileLink(value: string): {
10
20
  path: string;
@@ -1,19 +1,10 @@
1
- /**
2
- * Extend upstream dollar-only math syntax with TeX delimiters while reusing its
3
- * token vocabulary. The dollar construct is dispatched before upstream's
4
- * `mathFlow`, so the shapes it accepts keep the opening line's text as math
5
- * instead of fence meta, which the renderer does not read. A `$$` candidate it
6
- * declines — a `$$` sequence the line does not end after, or a block left open
7
- * — is left to that upstream flow.
8
- */
1
+ /** Extend upstream dollar-only math syntax with TeX delimiters while reusing its token vocabulary. */
9
2
  import type { Extension } from 'micromark-util-types';
10
3
  /**
11
- * TeX backslash delimiters and display-dollar blocks as a micromark syntax
12
- * extension reusing `micromark-extension-math`'s token vocabulary; the caller
13
- * must also register `math()` on the same parse so the emitted tokens compile
14
- * to standard math nodes. Both `$$<math>$$` on one line and a `$$<math>` block
15
- * closed by a trailing `$$` parse as one math node, and a closing `$$` may sit
16
- * at the end of a content line.
4
+ * TeX backslash delimiters and same-line display-dollar blocks as a micromark
5
+ * syntax extension reusing `micromark-extension-math`'s token vocabulary; the
6
+ * caller must also register `math()` on the same parse so the emitted tokens
7
+ * compile to standard math nodes.
17
8
  * @returns The micromark syntax extension.
18
9
  */
19
10
  export declare function mathCompatibility(): Extension;
@@ -4,17 +4,18 @@
4
4
  * cache frozen blocks as React elements; the rendered DOM is pinned
5
5
  * byte-for-byte by `tests/fixtures/markdown-dom` and must not drift.
6
6
  *
7
- * External link and image destinations pass a protocol allowlist; settled
7
+ * External links reject executable and embedded-document protocols; settled
8
8
  * local file links use an explicit owner callback. Images additionally require
9
9
  * absolute HTTP(S), raw HTML renders as literal text (no HTML enters the
10
- * DOM), and KaTeX runs without trusted commands. Fragment-anchor URLs fail
11
- * the allowlist, so footnote references and back-references render as plain
10
+ * DOM), and KaTeX runs without trusted commands. Fragment-only URLs are not
11
+ * absolute, so footnote references and back-references render as plain
12
12
  * text rather than in-page links.
13
13
  *
14
14
  * Merge-extensible node unions fall through the documented default (render
15
15
  * nothing) rather than ending in assertNever: grammars registered elsewhere
16
16
  * may add node types this renderer has no mapping for.
17
17
  */
18
+ import type { HTMLAttributes } from 'react';
18
19
  import type { ReactNode } from 'react';
19
20
  import type * as Md from 'mdast';
20
21
  import type { CodeToolbarLabels } from '../CodeToolbar.tsx';
@@ -84,6 +85,7 @@ export interface MarkdownFileMentions {
84
85
  */
85
86
  resolve(value: string): {
86
87
  open: () => void;
88
+ contextMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'onKeyDown' | 'tabIndex'>;
87
89
  label: string;
88
90
  title: string;
89
91
  } | undefined;
@@ -1,36 +1,36 @@
1
- /**
2
- * Keep a fixed-position floating element anchored to a trigger.
3
- *
4
- * A portaled panel is positioned from its anchor's viewport rect, which stops
5
- * being true the moment anything scrolls or the window resizes. This owns that
6
- * one concern: measure the anchor, offset the panel below or above it, clamp
7
- * the result inside the viewport, and re-run on scroll (capture phase, so
8
- * scrollers nested inside the page are caught too), on resize, and on the
9
- * panel's own size changes while the element is open.
10
- * @module @deepseek-ai/dsh-client-ui-primitives/useAnchoredPosition
11
- */
1
+ /** Synchronous placement for body-portaled panels with a viewport fixed-position containing block. */
12
2
  import { type CSSProperties, type RefObject } from 'react';
13
3
  /** Inputs for {@link useAnchoredPosition}. */
14
4
  export interface AnchoredPositionOptions {
15
- /** Whether the floating element is mounted and should track its anchor. */
5
+ /** Whether the panel is mounted and should track its anchor. */
16
6
  open: boolean;
17
- /** The element the panel is placed from. */
7
+ /** Element whose viewport rect anchors the panel. */
18
8
  anchorRef: RefObject<HTMLElement | null>;
19
- /** The floating element, measured so the clamp uses real dimensions. */
9
+ /** Body-portaled, fixed-position panel; its ancestors must not establish a containing block. */
20
10
  panelRef: RefObject<HTMLElement | null>;
21
- /** Which anchor edge the panel hangs from: below it (`bottom`, the default) or above it (`top`). */
22
- side?: 'top' | 'bottom';
23
- /** Which anchor edge the panel lines up with: its left edge (`start`, the default) or its right edge (`end`). */
11
+ /** Preferred anchor edge; right-side panels align their top edges. */
12
+ side?: 'top' | 'bottom' | 'right';
13
+ /** Horizontal alignment for panels above or below the anchor. */
24
14
  align?: 'start' | 'end';
25
- /** Distance kept between the anchor edge named by `side` and the panel. */
15
+ /** Distance from the preferred anchor edge, in CSS pixels. */
26
16
  gap: number;
27
- /** Distance kept between the panel and each viewport edge; the frame's overlay inset widens the top margin. */
17
+ /** Minimum viewport inset; desktop frame clearance can increase the top inset. */
28
18
  margin: number;
19
+ /** Reserve desktop frame clearance in addition to the margin; false keeps only the viewport margin. Defaults to true. */
20
+ frameClearance?: boolean;
21
+ /** Host-supplied client rect; null hides the panel until the anchor is available. */
22
+ getAnchorRect?: () => DOMRect | null;
23
+ /** Re-measure a committed content change before paint. */
24
+ layoutKey?: string | number;
25
+ /** Minimum panel width follows the anchor, bounded by the visible viewport. */
26
+ minWidthFromAnchor?: boolean;
29
27
  }
30
28
  /**
31
- * Track an anchor and return the panel's fixed coordinates.
32
- * @param options - the open state, the two refs, the placement side and alignment, and the gap/margin distances.
33
- * @returns `left`/`top` for the panel, or `null` before the first measurement.
29
+ * Keep a fixed panel aligned and constrained to the visible viewport.
30
+ * Panel CSS consumes `--dsh-anchored-max-width` and `--dsh-anchored-max-height` for size limits.
31
+ * The hook owns those inline variables and optional min-width while open, restoring them on cleanup.
32
+ * @param options - Open state, element refs, placement, and optional host rect or content change key.
33
+ * @returns Fixed left/top coordinates, or null while closed or awaiting an anchor; the first measurement completes before paint.
34
34
  */
35
35
  export declare function useAnchoredPosition(options: AnchoredPositionOptions): CSSProperties | null;
36
36
  //# sourceMappingURL=useAnchoredPosition.d.ts.map
@@ -1,4 +1,5 @@
1
1
  /** Inline text and reference presentation; business rules supply resolved JSON data and actions. */
2
+ import type { HTMLAttributes } from 'react';
2
3
  import type { ReactNode } from 'react';
3
4
  import { type ReferenceIconKind } from './ReferenceIcon.tsx';
4
5
  /** Plain text follows the wrapping and typography of its host. */
@@ -14,6 +15,8 @@ export declare function UserTextRun({ text }: UserTextRunProps): ReactNode;
14
15
  /** Presentation selected by a reference renderer, independent of its matching grammar. */
15
16
  export interface ReferenceChipProps {
16
17
  readonly appearance: ReferenceIconKind | 'skill' | 'command';
18
+ /** Explicit object-menu gesture bindings; absent for display-only references. */
19
+ readonly contextMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'onKeyDown' | 'tabIndex'>;
17
20
  readonly label: string;
18
21
  readonly title: string;
19
22
  /** Absent for display-only references and previews. */
@@ -25,5 +28,5 @@ export interface ReferenceChipProps {
25
28
  * @param props - resolved visual fields and optional action from the owning renderer.
26
29
  * @returns an inline label, or a keyboard-accessible button when activation is supplied.
27
30
  */
28
- export declare function ReferenceChip({ appearance, label, title, onActivate }: ReferenceChipProps): ReactNode;
31
+ export declare function ReferenceChip({ appearance, label, title, onActivate, contextMenuProps, }: ReferenceChipProps): ReactNode;
29
32
  //# sourceMappingURL=user-text.d.ts.map
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.2-alpha.2",
4
+ "version": "0.2.2-alpha.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@deepseek-ai/dsh-client-store": "0.2.2-alpha.2",
27
- "@deepseek-ai/cordis": "~4.0.6-alpha.1",
28
- "@deepseek-ai/dsh-util-code-language": "0.2.2-alpha.2",
26
+ "@deepseek-ai/dsh-client-store": "0.2.2-alpha.3",
27
+ "@deepseek-ai/cordis": "~4.0.6-alpha.2",
28
+ "@deepseek-ai/dsh-util-code-language": "0.2.2-alpha.3",
29
29
  "react": "^18.2.0",
30
30
  "clsx": "^2.0.0",
31
31
  "diff": "^9.0.0",
@@ -39,7 +39,7 @@
39
39
  "micromark-util-symbol": "^2.0.1",
40
40
  "micromark-util-types": "^2.0.2",
41
41
  "shiki": "^4.4.3",
42
- "@deepseek-ai/dsh-util-workspace-path": "0.2.2-alpha.2",
42
+ "@deepseek-ai/dsh-util-workspace-path": "0.2.2-alpha.3",
43
43
  "@shikijs/langs": "^4.4.3",
44
44
  "@types/mdast": "^4.0.4",
45
45
  "micromark-factory-space": "^2.0.1",
@@ -50,7 +50,7 @@
50
50
  "micromark-extension-gfm": "^3.0.0",
51
51
  "micromark-util-sanitize-uri": "^2.0.1",
52
52
  "simple-icons": "16.31.0",
53
- "@deepseek-ai/dsh-util-file-drag": "0.2.2-alpha.2"
53
+ "@deepseek-ai/dsh-util-file-drag": "0.2.2-alpha.3"
54
54
  },
55
55
  "files": [
56
56
  "lib/index.js",
@@ -58,6 +58,6 @@
58
58
  "lib/types/**/*.d.ts"
59
59
  ],
60
60
  "peerDependencies": {
61
- "@deepseek-ai/cordis": "~4.0.6-alpha.1"
61
+ "@deepseek-ai/cordis": "~4.0.6-alpha.2"
62
62
  }
63
63
  }