@deepseek-ai/dsh-client-ui-primitives 0.2.0-rc.2 → 0.2.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +12 -12
- package/README.md +11 -8
- package/README.zh.md +11 -8
- package/lib/CommandText.module.css +12 -0
- package/lib/DisclosureRow.module.css +15 -0
- package/lib/ImageLightbox.module.css +12 -4
- package/lib/InlineEditor.module.css +23 -0
- package/lib/TerminalBlock.module.css +3 -10
- package/lib/index.js +438 -311
- package/lib/types/CommandText.d.ts +16 -0
- package/lib/types/DisclosureRow.d.ts +4 -2
- package/lib/types/InlineEditor.d.ts +23 -0
- package/lib/types/TerminalBlock.d.ts +3 -1
- package/lib/types/index.d.ts +3 -0
- package/package.json +10 -10
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Display text and owner-localized identification for a command scrollport. */
|
|
2
|
+
export interface CommandTextProps {
|
|
3
|
+
/** Original command or formatted command arguments, without truncation. */
|
|
4
|
+
text: string;
|
|
5
|
+
/** Accessible name while the text can scroll horizontally. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Owner typography and positioning. */
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Render command text without adding Tab stops for content that fits.
|
|
12
|
+
* @param props - Text, localized scrollport name, and owner styling.
|
|
13
|
+
* @returns A horizontal text scrollport, named and keyboard-focusable only when overflowing.
|
|
14
|
+
*/
|
|
15
|
+
export declare function CommandText({ text, label, className }: CommandTextProps): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=CommandText.d.ts.map
|
|
@@ -8,13 +8,15 @@ export interface DisclosureRowProps {
|
|
|
8
8
|
onToggle: () => void;
|
|
9
9
|
/** Animate the complete header while its owning operation is running. */
|
|
10
10
|
running?: boolean | undefined;
|
|
11
|
-
/** Makes the
|
|
11
|
+
/** Makes the title row the disclosure target; with an accessory, it shrinks to its content width. */
|
|
12
12
|
expandOnRowClick?: boolean | undefined;
|
|
13
13
|
/** Replaces the collapsed icon with a chevron while the row is hovered. */
|
|
14
14
|
previewChevron?: boolean | undefined;
|
|
15
15
|
/** Keeps `collapsedContent` inline while open. */
|
|
16
16
|
keepContentWhenOpen?: boolean | undefined;
|
|
17
17
|
collapsedContent?: ReactNode;
|
|
18
|
+
/** Independent action beside the title, outside the disclosure target and shimmer. */
|
|
19
|
+
headerAccessory?: ReactNode;
|
|
18
20
|
children?: ReactNode;
|
|
19
21
|
className?: string | undefined;
|
|
20
22
|
rowClassName?: string | undefined;
|
|
@@ -32,5 +34,5 @@ export interface DisclosureRowProps {
|
|
|
32
34
|
* @param props - Visual content, controlled state, and interaction policy.
|
|
33
35
|
* @returns the disclosure row.
|
|
34
36
|
*/
|
|
35
|
-
export declare const DisclosureRow: import("react").MemoExoticComponent<({ icon, title, open, expandable, onToggle, running, expandOnRowClick, previewChevron, keepContentWhenOpen, collapsedContent, children, className, rowClassName, contentClassName, contentLayoutClassName, leadingClassName, chevronClassName, titleClassName, }: DisclosureRowProps) => import("react").JSX.Element>;
|
|
37
|
+
export declare const DisclosureRow: import("react").MemoExoticComponent<({ icon, title, open, expandable, onToggle, running, expandOnRowClick, previewChevron, keepContentWhenOpen, collapsedContent, headerAccessory, children, className, rowClassName, contentClassName, contentLayoutClassName, leadingClassName, chevronClassName, titleClassName, }: DisclosureRowProps) => import("react").JSX.Element>;
|
|
36
38
|
//# sourceMappingURL=DisclosureRow.d.ts.map
|
|
@@ -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
|
|
@@ -5,6 +5,8 @@ export declare const DEFAULT_TERMINAL_MAX_LINES = 16;
|
|
|
5
5
|
* (this package is cordis-free, so copy arrives via props).
|
|
6
6
|
*/
|
|
7
7
|
export interface TerminalBlockLabels {
|
|
8
|
+
/** Accessible name for an overflowing authored command line, numbered from one. */
|
|
9
|
+
commandLine: (line: number) => string;
|
|
8
10
|
/** Status pill text for a signal-terminated command. */
|
|
9
11
|
signal: (signal: string) => string;
|
|
10
12
|
/** Status pill text for a non-zero exit code. */
|
|
@@ -33,7 +35,7 @@ export interface TerminalBlockLabels {
|
|
|
33
35
|
expand: (hidden: number) => string;
|
|
34
36
|
}
|
|
35
37
|
export interface TerminalBlockProps {
|
|
36
|
-
/** The command
|
|
38
|
+
/** The command, rendered verbatim after the prompt label; long lines scroll horizontally unless the host enables wrapping. */
|
|
37
39
|
command: string;
|
|
38
40
|
/** Working directory for the prompt label; absent renders a plain `$`. */
|
|
39
41
|
cwd?: string | undefined;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ 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';
|
|
@@ -72,6 +73,8 @@ export type { RelativeTime, RelativeTimeUnit } from './relative-time.ts';
|
|
|
72
73
|
export { JsonTree } from './JsonTree.tsx';
|
|
73
74
|
export type { JsonTreeProps, JsonTreeLabels } from './JsonTree.tsx';
|
|
74
75
|
export { TerminalBlock, DEFAULT_TERMINAL_MAX_LINES } from './TerminalBlock.tsx';
|
|
76
|
+
export { CommandText } from './CommandText.tsx';
|
|
77
|
+
export type { CommandTextProps } from './CommandText.tsx';
|
|
75
78
|
export type { TerminalBlockProps, TerminalBlockLabels } from './TerminalBlock.tsx';
|
|
76
79
|
export { ReadBlock, DEFAULT_READ_MAX_LINES } from './ReadBlock.tsx';
|
|
77
80
|
export type { ReadBlockProps, ReadBlockLine, ReadBlockLabels } from './ReadBlock.tsx';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-primitives",
|
|
3
3
|
"description": "Pure React atoms for the dsh web UI: controls, icons, markdown, and JSON inspectors (zero cordis)",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -23,21 +23,25 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@deepseek-ai/dsh-client-store": "0.2.1-alpha.2",
|
|
26
27
|
"@types/react": "~18.3.1",
|
|
27
28
|
"@types/react-dom": "~18.3.0",
|
|
29
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1",
|
|
30
|
+
"@deepseek-ai/dsh-util-code-language": "0.2.1-alpha.2",
|
|
28
31
|
"react": "^18.2.0",
|
|
29
32
|
"clsx": "^2.0.0",
|
|
30
33
|
"diff": "^9.0.0",
|
|
31
34
|
"react-dom": "^18.2.0",
|
|
32
35
|
"anser": "^2.3.5",
|
|
33
|
-
"katex": "^0.
|
|
36
|
+
"katex": "^0.18.7",
|
|
34
37
|
"micromark-core-commonmark": "^2.0.3",
|
|
35
38
|
"micromark-util-character": "^2.1.1",
|
|
36
39
|
"micromark-util-classify-character": "^2.0.1",
|
|
37
40
|
"micromark-util-symbol": "^2.0.1",
|
|
38
41
|
"micromark-util-types": "^2.0.2",
|
|
39
|
-
"shiki": "^4.3
|
|
40
|
-
"@
|
|
42
|
+
"shiki": "^4.4.3",
|
|
43
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.2.1-alpha.2",
|
|
44
|
+
"@shikijs/langs": "^4.4.3",
|
|
41
45
|
"@types/mdast": "^4.0.4",
|
|
42
46
|
"micromark-factory-space": "^2.0.1",
|
|
43
47
|
"micromark-extension-math": "^3.1.0",
|
|
@@ -46,11 +50,7 @@
|
|
|
46
50
|
"mdast-util-math": "^3.0.0",
|
|
47
51
|
"micromark-extension-gfm": "^3.0.0",
|
|
48
52
|
"micromark-util-sanitize-uri": "^2.0.1",
|
|
49
|
-
"simple-icons": "16.31.0"
|
|
50
|
-
"@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
|
|
51
|
-
"@deepseek-ai/cordis": "~4.0.4",
|
|
52
|
-
"@deepseek-ai/dsh-util-code-language": "0.2.0-rc.2",
|
|
53
|
-
"@deepseek-ai/dsh-util-workspace-path": "0.2.0-rc.2"
|
|
53
|
+
"simple-icons": "16.31.0"
|
|
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.
|
|
61
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1"
|
|
62
62
|
}
|
|
63
63
|
}
|