@deepseek-ai/dsh-client-ui-primitives 0.1.7-alpha.2 → 0.1.7-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.
Files changed (58) hide show
  1. package/README.i18n.yaml +60 -5
  2. package/README.md +27 -10
  3. package/README.zh.md +27 -10
  4. package/lib/Button.module.css +6 -8
  5. package/lib/Checkbox.module.css +1 -1
  6. package/lib/CodeCard.module.css +3 -3
  7. package/lib/ConnectionIndicator.module.css +6 -2
  8. package/lib/HoverCard.module.css +17 -8
  9. package/lib/ImageLightbox.module.css +46 -0
  10. package/lib/ImagePreview.module.css +24 -0
  11. package/lib/Input.module.css +2 -2
  12. package/lib/JsonTree.module.css +3 -3
  13. package/lib/Menu.module.css +22 -18
  14. package/lib/MenuSurface.module.css +49 -0
  15. package/lib/Modal.module.css +27 -6
  16. package/lib/Pill.module.css +2 -1
  17. package/lib/RiskConfirmation.module.css +1 -1
  18. package/lib/SearchBlock.module.css +1 -1
  19. package/lib/SegmentedControl.module.css +9 -9
  20. package/lib/SegmentedTabs.module.css +3 -3
  21. package/lib/ShortcutKeys.module.css +33 -0
  22. package/lib/Switch.module.css +3 -8
  23. package/lib/TerminalBlock.module.css +3 -3
  24. package/lib/Toast.module.css +2 -2
  25. package/lib/Tooltip.module.css +9 -1
  26. package/lib/WebBlock.module.css +1 -1
  27. package/lib/index.js +1592 -825
  28. package/lib/markdown/CodeBlock.module.css +1 -1
  29. package/lib/markdown/JsonBlock.module.css +2 -2
  30. package/lib/markdown/MarkdownText.module.css +28 -5
  31. package/lib/settings-form/SettingsForm.module.css +2 -2
  32. package/lib/settings-form/fields.module.css +4 -4
  33. package/lib/types/Button.d.ts +6 -5
  34. package/lib/types/HoverCard.d.ts +5 -2
  35. package/lib/types/ImageLightbox.d.ts +27 -0
  36. package/lib/types/ImagePreview.d.ts +12 -0
  37. package/lib/types/Menu.d.ts +9 -1
  38. package/lib/types/MenuSurface.d.ts +16 -0
  39. package/lib/types/Modal.d.ts +12 -4
  40. package/lib/types/ShortcutKeys.d.ts +11 -0
  41. package/lib/types/Tooltip.d.ts +15 -4
  42. package/lib/types/code-highlighting.d.ts +1 -8
  43. package/lib/types/focus.d.ts +9 -0
  44. package/lib/types/guide-artwork.d.ts +15 -0
  45. package/lib/types/icons/index.d.ts +8 -4
  46. package/lib/types/icons/shared-artwork.d.ts +8 -1
  47. package/lib/types/index.d.ts +9 -1
  48. package/lib/types/input-modality.d.ts +19 -0
  49. package/lib/types/keyboard-composition.d.ts +11 -0
  50. package/lib/types/markdown/MarkdownDelegate.d.ts +11 -1
  51. package/lib/types/markdown/highlight.d.ts +16 -10
  52. package/lib/types/markdown/local-image-syntax.d.ts +10 -0
  53. package/lib/types/plugin-artwork.d.ts +1 -1
  54. package/lib/types/settings-form/fields.d.ts +1 -0
  55. package/lib/types/useModalLayer.d.ts +27 -0
  56. package/package.json +4 -3
  57. package/lib/OnboardingSurface.module.css +0 -28
  58. package/lib/types/OnboardingSurface.d.ts +0 -11
@@ -1,5 +1,5 @@
1
1
  import type { IconProps } from './icons/props.ts';
2
- /** Terminal plugin artwork (prompt chevron and cursor bar). */
2
+ /** Light-blue terminal artwork shared by plugin cards and sidebar guide entries. */
3
3
  export declare const PluginArtworkTerminal: ({ size, className }: IconProps) => import("react").JSX.Element;
4
4
  /** Agent-loop plugin artwork (four leaves circling a center). */
5
5
  export declare const PluginArtworkLoop: ({ size, className }: IconProps) => import("react").JSX.Element;
@@ -57,6 +57,7 @@ export declare function SettingsValueField(props: Omit<SettingsFieldProps, 'hint
57
57
  * A write-only credential control. The value never rides a response, so the
58
58
  * control reports only whether one is configured and starts blank; a blank
59
59
  * draft writes nothing, which keeps the stored key rather than clearing it.
60
+ * The control asks browsers not to autofill saved login passwords.
60
61
  * @param props - the field's copy, its staged text, and the configured state.
61
62
  * @returns the labelled control.
62
63
  */
@@ -0,0 +1,27 @@
1
+ import type { RefObject } from 'react';
2
+ /** Dialog and menu elements whose document order determines foreground shortcut ownership. */
3
+ export declare const modalSelector = "[role=\"dialog\"][aria-modal=\"true\"], [role=\"menu\"]";
4
+ /**
5
+ * Request closure of the foreground registered modal using its current onClose callback.
6
+ * A newer menu or unregistered dialog blocks dismissal of the modal behind it.
7
+ * @param document - product document whose modal owns the close command.
8
+ */
9
+ export declare function closeTopModal(document: Document): void;
10
+ /**
11
+ * Whether an anchor belongs behind the current modal and must yield keyboard input.
12
+ * @param anchor - local control owning the input handler.
13
+ * @returns true when another modal owns the foreground.
14
+ */
15
+ export declare function isBehindModal(anchor: HTMLElement | null): boolean;
16
+ /**
17
+ * Give only the top modal Escape and Tab ownership, then restore its previous focus.
18
+ * Automatic entry and return focus omit outlines; keyboard traversal retains its indicators.
19
+ * Controls mounted with the dialog use data-modal-autofocus for initial focus;
20
+ * React autoFocus runs before this layer can capture the invoking control.
21
+ * Local menus handle their Escape during capture before this bubble listener.
22
+ * @param dialog - mounted dialog element.
23
+ * @param open - whether this layer is active.
24
+ * @param onClose - top-layer Escape or application close action.
25
+ */
26
+ export declare function useModalLayer(dialog: RefObject<HTMLElement | null>, open: boolean, onClose: () => void): void;
27
+ //# sourceMappingURL=useModalLayer.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.1.7-alpha.2",
4
+ "version": "0.1.7-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -48,8 +48,9 @@
48
48
  "micromark-util-sanitize-uri": "^2.0.1",
49
49
  "simple-icons": "16.31.0",
50
50
  "@deepseek-ai/cordis": "~4.0.4",
51
- "@deepseek-ai/dsh-util-workspace-path": "0.1.7-alpha.2",
52
- "@deepseek-ai/dsh-client-store": "0.1.7-alpha.2"
51
+ "@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
52
+ "@deepseek-ai/dsh-util-code-language": "0.1.7-rc.2",
53
+ "@deepseek-ai/dsh-util-workspace-path": "0.1.7-rc.2"
53
54
  },
54
55
  "files": [
55
56
  "lib/index.js",
@@ -1,28 +0,0 @@
1
- /* First-run stage: keep the product top bar visible, then let onboarding own
2
- the complete workspace instead of presenting another settings modal. */
3
- .onboardingOverlay {
4
- position: fixed;
5
- inset: 0;
6
- z-index: 1100;
7
- }
8
-
9
- /* Mask */
10
- .onboardingMask {
11
- position: absolute;
12
- left: 0px;
13
- right: 0px;
14
- top: 80px;
15
- bottom: 0px;
16
- background: rgba(0, 0, 0, 0.24);
17
- backdrop-filter: var(--dsw-mask-blur);
18
- }
19
-
20
- .onboardingStage {
21
- position: absolute;
22
- z-index: 1;
23
- inset: 0;
24
- display: flex;
25
- justify-content: center;
26
- overflow: hidden;
27
- background: var(--dsw-alias-bg-layer-1);
28
- }
@@ -1,11 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- /**
3
- * Render a body-portaled onboarding stage and keep the application root inert
4
- * while mounted.
5
- * @param props.children - the step's page content, centered on the stage.
6
- * @returns the body-portaled overlay tree.
7
- */
8
- export declare function OnboardingSurface({ children }: {
9
- children: ReactNode;
10
- }): import("react").ReactPortal;
11
- //# sourceMappingURL=OnboardingSurface.d.ts.map