@deepseek-ai/dsh-client-ui-primitives 0.2.0-rc.1 → 0.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +4 -4
- package/README.md +10 -3
- package/README.zh.md +10 -3
- package/lib/DisclosureRow.module.css +14 -2
- package/lib/MenuGroup.module.css +37 -0
- package/lib/index.js +349 -226
- package/lib/types/DisclosureRow.d.ts +1 -1
- package/lib/types/Input.d.ts +4 -3
- package/lib/types/MenuGroup.d.ts +22 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +4 -4
package/lib/types/Input.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type
|
|
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
|
|
8
|
+
export declare const Input: import("react").ForwardRefExoticComponent<{
|
|
8
9
|
icon?: ReactNode;
|
|
9
10
|
className?: string;
|
|
10
|
-
} & InputHTMLAttributes<HTMLInputElement>
|
|
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
|
package/lib/types/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export { Input } from './Input.tsx';
|
|
|
24
24
|
export { Menu, MenuItemButton } from './Menu.tsx';
|
|
25
25
|
export { MenuSurface } from './MenuSurface.tsx';
|
|
26
26
|
export type { MenuSurfaceProps } from './MenuSurface.tsx';
|
|
27
|
+
export { MenuGroup, observeStickyMenuGroups } from './MenuGroup.tsx';
|
|
27
28
|
export type { MenuItemButtonProps, MenuEntry, MenuItem, MenuSeparator, MenuLabel } from './Menu.tsx';
|
|
28
29
|
export { useAnchoredMaxHeight } from './useAnchoredMaxHeight.ts';
|
|
29
30
|
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.
|
|
4
|
+
"version": "0.2.0-rc.2",
|
|
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.
|
|
50
|
+
"@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
|
|
51
51
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
52
|
-
"@deepseek-ai/dsh-util-code-language": "0.2.0-rc.
|
|
53
|
-
"@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.
|
|
52
|
+
"@deepseek-ai/dsh-util-code-language": "0.2.0-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.2"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
56
56
|
"lib/index.js",
|