@deepseek-ai/dsh-client-ui-primitives 0.2.0-rc.1 → 0.2.1-alpha.1

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,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- /** Shared 24px disclosure chrome for compact flow rows. */
2
+ /** Shared 24px process row: tertiary text and icons, secondary on hover. */
3
3
  export interface DisclosureRowProps {
4
4
  icon: ReactNode;
5
5
  title: string;
@@ -0,0 +1,23 @@
1
+ /** Multi-line inline editor for short saved-on-Enter drafts such as queued messages and goals. */
2
+ /**
3
+ * Render an autofocused textarea that grows with its text up to six lines, then scrolls.
4
+ * A textarea rather than an input: HTML strips newlines from single-line input values.
5
+ * Enter saves, Shift+Enter breaks the line, Enter during IME composition does nothing,
6
+ * and Escape cancels.
7
+ * @param props.value - current draft text.
8
+ * @param props.label - localized accessible name.
9
+ * @param props.onChange - receives the edited text.
10
+ * @param props.onSave - called for a plain Enter.
11
+ * @param props.onCancel - called for Escape.
12
+ * @param props.className - extra class for the editor's placement.
13
+ * @returns the textarea.
14
+ */
15
+ export declare function InlineEditor({ value, label, onChange, onSave, onCancel, className }: {
16
+ value: string;
17
+ label: string;
18
+ onChange: (value: string) => void;
19
+ onSave: () => void;
20
+ onCancel: () => void;
21
+ className?: string;
22
+ }): import("react").JSX.Element;
23
+ //# sourceMappingURL=InlineEditor.d.ts.map
@@ -1,11 +1,12 @@
1
- import type { InputHTMLAttributes, ReactNode } from 'react';
1
+ import { type InputHTMLAttributes, type ReactNode } from 'react';
2
2
  /**
3
3
  * Render a text input with an optional leading icon.
4
4
  * @param props.icon - optional 16px leading icon node.
5
+ * @param ref - the native input, cleared when it unmounts.
5
6
  * @returns wrapper span containing the native input; input attributes pass through.
6
7
  */
7
- export declare function Input({ icon, className, ...rest }: {
8
+ export declare const Input: import("react").ForwardRefExoticComponent<{
8
9
  icon?: ReactNode;
9
10
  className?: string;
10
- } & InputHTMLAttributes<HTMLInputElement>): import("react").JSX.Element;
11
+ } & InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
11
12
  //# sourceMappingURL=Input.d.ts.map
@@ -0,0 +1,22 @@
1
+ /** Accessible menu groups with shared sticky-heading presentation and viewport observation. */
2
+ import { type ReactNode } from 'react';
3
+ /**
4
+ * Render a named group with an instance-owned heading id and an inaccessible position sentinel.
5
+ * @param props - Caller-localized label and optional menu rows.
6
+ * @returns A section named by its direct heading, followed by the supplied children.
7
+ */
8
+ export declare function MenuGroup({ label, children }: {
9
+ label: string;
10
+ children?: ReactNode;
11
+ }): import("react").JSX.Element;
12
+ /**
13
+ * Update heading backgrounds asynchronously from native intersection and viewport-size observations.
14
+ * Headings remain transparent until observations identify a section crossing the viewport top.
15
+ * Without IntersectionObserver or ResizeObserver, CSS sticky headings remain transparent.
16
+ * Group membership is captured at setup; dispose before observing changed groups or the same viewport again.
17
+ * @param viewport - Unpadded, borderless scroll container with direct MenuGroup children.
18
+ * @returns Cleanup owning both intersection observers and the viewport resize observer; disconnects
19
+ * them, ignores queued callbacks, and clears managed data-stuck attributes. No valid groups acquires nothing.
20
+ */
21
+ export declare function observeStickyMenuGroups(viewport: HTMLElement): () => void;
22
+ //# sourceMappingURL=MenuGroup.d.ts.map
@@ -21,9 +21,11 @@ export { SegmentedControl } from './SegmentedControl.tsx';
21
21
  export type { SegmentedControlOption } from './SegmentedControl.tsx';
22
22
  export { Checkbox } from './Checkbox.tsx';
23
23
  export { Input } from './Input.tsx';
24
+ export { InlineEditor } from './InlineEditor.tsx';
24
25
  export { Menu, MenuItemButton } from './Menu.tsx';
25
26
  export { MenuSurface } from './MenuSurface.tsx';
26
27
  export type { MenuSurfaceProps } from './MenuSurface.tsx';
28
+ export { MenuGroup, observeStickyMenuGroups } from './MenuGroup.tsx';
27
29
  export type { MenuItemButtonProps, MenuEntry, MenuItem, MenuSeparator, MenuLabel } from './Menu.tsx';
28
30
  export { useAnchoredMaxHeight } from './useAnchoredMaxHeight.ts';
29
31
  export { useAnchoredPosition } from './useAnchoredPosition.ts';
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.0-rc.1",
4
+ "version": "0.2.1-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -47,10 +47,10 @@
47
47
  "micromark-extension-gfm": "^3.0.0",
48
48
  "micromark-util-sanitize-uri": "^2.0.1",
49
49
  "simple-icons": "16.31.0",
50
- "@deepseek-ai/dsh-client-store": "0.2.0-rc.1",
51
- "@deepseek-ai/cordis": "~4.0.4",
52
- "@deepseek-ai/dsh-util-code-language": "0.2.0-rc.1",
53
- "@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.1"
50
+ "@deepseek-ai/dsh-client-store": "0.2.1-alpha.1",
51
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
52
+ "@deepseek-ai/dsh-util-code-language": "0.2.1-alpha.1",
53
+ "@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.1"
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.4"
61
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1"
62
62
  }
63
63
  }