@godxjp/chat 32.0.0 → 32.0.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.
@@ -0,0 +1,45 @@
1
+ import * as React from 'react';
2
+ import { ThoughtChainProp, ThoughtChainItemProp } from '@godxjp/ui/props/components';
3
+ export { ThoughtChainItemProp, ThoughtChainItemProp as ThoughtChainItemProps, ThoughtChainItemsProp, ThoughtChainLineProp, ThoughtChainProp, ThoughtChainProp as ThoughtChainProps, ThoughtChainStatusProp, ThoughtChainVariantProp } from '@godxjp/ui/props/components';
4
+
5
+ /**
6
+ * ThoughtChain — the assistant's reasoning, step by step (Ant Design X `ThoughtChain`).
7
+ *
8
+ * ## The shape, and why it is an `<ol>`
9
+ *
10
+ * Ant renders the whole chain as nested `<div>`s and paints the step number itself
11
+ * (`index + 1` in `es/thought-chain/Node.js`). The order of the steps IS the content here — step 3
12
+ * only makes sense after step 2 — so the chain is an ordered list and a screen reader gets "list,
13
+ * 4 items" plus each step's position for free. The visible ordinal stays, because the same number
14
+ * has to be on screen for a sighted reader following a long chain.
15
+ *
16
+ * ## The disclosure is a real button
17
+ *
18
+ * A `collapsible` step's title in Ant is a `<div onClick>` with a rotating chevron — no role, no
19
+ * `tabIndex`, no `aria-expanded`. Here it is a `<button aria-expanded aria-controls>` over the
20
+ * body it opens: the WAI-ARIA APG Disclosure pattern, so the step can be opened from the keyboard
21
+ * and its state is announced rather than inferred from a rotation.
22
+ *
23
+ * Everything a caller passes keeps Ant's spelling: `items` (with `icon`, `title`, `description`,
24
+ * `content`, `footer`, `status`, `collapsible`, `blink`, `destroyOnHidden`), the
25
+ * `defaultExpandedKeys` / `expandedKeys` / `onExpand` triad, and `line`. `styles` / `classNames` /
26
+ * `prefixCls` / `rootClassName` are not ported — the standing style-hole decision
27
+ * (docs/WHAT-BELONGS-HERE.md, docs/DESIGN-AUTHORITY.md); the chain is retuned through
28
+ * `src/tokens/components/thought-chain.css`.
29
+ */
30
+ declare const ThoughtChain: React.ForwardRefExoticComponent<ThoughtChainProp & React.RefAttributes<HTMLOListElement>>;
31
+ /**
32
+ * ThoughtChainItem — one step OUTSIDE a chain (Ant Design X `ThoughtChain.Item`).
33
+ *
34
+ * A named export rather than `ThoughtChain.Item`, for the same reason `ActionsItem` is: every
35
+ * compound in this library is separate named exports (`CardHeader`, `TabsList`), and attaching
36
+ * statics to one component would be the only instance of it here.
37
+ *
38
+ * ONE DEVIATION: Ant renders the chip as a `<div>` and hangs `onClick` on it, so a clickable step
39
+ * is invisible to the keyboard and to assistive technology. Here an item WITH `onClick` renders a
40
+ * real `<button>` and one without renders a plain `<div>` — the element follows whether the thing
41
+ * is actually a control.
42
+ */
43
+ declare const ThoughtChainItem: React.ForwardRefExoticComponent<ThoughtChainItemProp & React.RefAttributes<HTMLElement>>;
44
+
45
+ export { ThoughtChain, ThoughtChainItem };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ ThoughtChain,
4
+ ThoughtChainItem
5
+ } from "./chunk-52TWSF6W.js";
6
+ export {
7
+ ThoughtChain,
8
+ ThoughtChainItem
9
+ };
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import { WelcomeProp } from '@godxjp/ui/props/components';
3
+ export { WelcomeProp, WelcomeProp as WelcomeProps, WelcomeVariantProp } from '@godxjp/ui/props/components';
4
+
5
+ /**
6
+ * Welcome — the greeting block at the head of an empty conversation (Ant Design X `Welcome`).
7
+ *
8
+ * ## Why this is a component and not four lines of composition
9
+ *
10
+ * It is close to the line, and the honest answer is that the SHAPE is the value: an assistant's
11
+ * first screen is the same object in every product — glyph, greeting, one line under it, one
12
+ * trailing action — and Ant X named it, so every consumer that builds a chat now expects the name.
13
+ * What it owns beyond a `Flex` is the `extra` slot's placement (on the TITLE row, not below the
14
+ * description, which is where a hand-roll puts it) and the `icon`-as-URL rule below.
15
+ *
16
+ * ## Two deliberate differences from Ant X, both in the same direction
17
+ *
18
+ * - **The image icon is decorative.** Ant renders `alt="icon"` — a screen reader then reads the
19
+ * word "icon" beside a title the glyph is only decorating. Here it is `alt=""`, which is what an
20
+ * image that duplicates adjacent text is supposed to be.
21
+ * - **The heading level is Ant's.** Ant hardcodes `Typography.Title level={4}`, so this renders an
22
+ * `<h4>`. Hardcoding a level is a document-structure decision a component should not normally
23
+ * make, but the alternative — inventing a `level` prop Ant does not have — is a second spelling
24
+ * of an axis the issue asked to port verbatim. Wrap it in your own heading hierarchy if the page
25
+ * needs a different rung.
26
+ */
27
+ declare const Welcome: React.ForwardRefExoticComponent<WelcomeProp & React.RefAttributes<HTMLDivElement>>;
28
+
29
+ export { Welcome };
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import {
3
+ Welcome
4
+ } from "./chunk-NUCO7NAP.js";
5
+ export {
6
+ Welcome
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@godxjp/chat",
3
- "version": "32.0.0",
3
+ "version": "32.0.1",
4
4
  "description": "Conversational UI for GoDX apps on @godxjp/ui: message bubbles and lists, the composer with slash / mention suggestions, the conversation list, thought chains, the welcome block, attachments and the message action bar — IME-safe, ja / en / vi.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "lucide-react": "^1.37.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@godxjp/ui": "~32.0.0",
35
+ "@godxjp/ui": "~32.0.1",
36
36
  "react": ">=19.0.0",
37
37
  "react-dom": ">=19.0.0"
38
38
  },