@stealthscale/component-messaging 0.1.0 → 0.2.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/dist/theme.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as recipe$1, n as recipe$3, o as recipe, r as recipe$2, t as recipe$4 } from "./recipe-f6w25oLs.js";
1
+ import { a as recipe$1, n as recipe$3, o as recipe, r as recipe$2, t as recipe$4 } from "./recipes-D1oVFnRU.js";
2
2
  import { definePreset } from "@stealthscale/theme/authoring";
3
3
  //#region src/theme.ts
4
4
  /**
@@ -0,0 +1,66 @@
1
+ {
2
+ "about": "A file attached to a message or waiting to be sent: a media square with the type's icon, a thumbnail or a spinner, the name and a line of detail, and the actions. A group lists several, stacked as rows or wrapped as tiles.",
3
+ "ada": "Ada Okafor",
4
+ "board": {
5
+ "detail": "WebP image, 1 kB",
6
+ "name": "whiteboard.webp"
7
+ },
8
+ "cancel": "Cancel {{name}}",
9
+ "contract": "contract-northwind.pdf",
10
+ "csv": "date,amount\n2026-09-30,4200\n",
11
+ "done": {
12
+ "detail": "PDF, 248 kB",
13
+ "name": "invoice-4471.pdf"
14
+ },
15
+ "download": "Download {{name}}",
16
+ "error": {
17
+ "detail": "Upload failed: over 25 MB",
18
+ "name": "site-survey.mov"
19
+ },
20
+ "idle": {
21
+ "detail": "Not sent yet",
22
+ "name": "notes.txt"
23
+ },
24
+ "label": "Attachments",
25
+ "orientation": {
26
+ "about": "`horizontal` renders a row: the media square, the name over the detail, and the actions at the end. `vertical` renders a tile with the media across the top and the actions over its corner. A group stacks rows and wraps tiles.",
27
+ "title": "Rows and tiles"
28
+ },
29
+ "photos": "Photos from the planning session.",
30
+ "photosScene": {
31
+ "about": "Tiles under a message, the group small and vertical. Each thumbnail has an empty `alt`, because the name under it already names the file.",
32
+ "title": "Photos in a message"
33
+ },
34
+ "payouts": "payouts-september.csv",
35
+ "payoutsDetail": "CSV, 18 kB",
36
+ "processing": {
37
+ "detail": "Checking for viruses",
38
+ "name": "quarterly-report.xlsx"
39
+ },
40
+ "progress": "Uploading, {{percent}}%",
41
+ "remove": "Remove {{name}}",
42
+ "retry": "Retry {{name}}",
43
+ "roadmap": {
44
+ "detail": "WebP image, 1 kB",
45
+ "name": "roadmap.webp"
46
+ },
47
+ "size": {
48
+ "about": "The size sets the media square, the padding, the gap and the text styles. A group states the size of every attachment in it.",
49
+ "title": "Sizes"
50
+ },
51
+ "sprint": {
52
+ "detail": "WebP image, 1 kB",
53
+ "name": "sprint-board.webp"
54
+ },
55
+ "states": {
56
+ "about": "`idle` dashes the edge of a file not yet sent, and `error` inks the edge, the media and the detail in the error palette. A spinner in the media square shows a file on its way. The detail states each state in words, because a screen reader reads no edge or ink.",
57
+ "title": "States"
58
+ },
59
+ "title": "Attachment",
60
+ "uploading": {
61
+ "detail": "Uploading, 64%",
62
+ "name": "floor-plan.pdf"
63
+ },
64
+ "whiteboard": "whiteboard.webp",
65
+ "whiteboardDetail": "WebP image, 1 kB"
66
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "about": "The box a reader writes a message in: an optional strip for the message it replies to, the files waiting to be sent, a text that grows with its content, and a row of controls with attach and send. Enter sends, Shift+Enter starts a new line, and a paste of files attaches them.",
3
+ "answering": "Answering. Press stop to interrupt.",
4
+ "askLabel": "Ask the assistant",
5
+ "askPlaceholder": "Ask about last quarter",
6
+ "attach": "Attach files",
7
+ "cancelEdit": "Stop editing",
8
+ "cancelReply": "Cancel the reply",
9
+ "design": "Design",
10
+ "edit": {
11
+ "about": "ArrowUp in an empty composer loads the last message for editing, with a strip that says so. Escape or the strip's own control leaves the edit, and a send replaces the message. The composer here is controlled through `value`, so the caller writes the last message into it.",
12
+ "title": "Editing the last message"
13
+ },
14
+ "editPlaceholder": "Press the up arrow to edit your last message",
15
+ "editing": "Editing your message",
16
+ "engineering": "Engineering",
17
+ "files": "Files to send",
18
+ "finance": "Finance",
19
+ "first": "I'll send the contract tomorrow.",
20
+ "hint": "Ctrl+Enter to send",
21
+ "label": "Message",
22
+ "mentionPlaceholder": "Type @ to mention a teammate",
23
+ "mentions": {
24
+ "about": "`triggers` makes `@` open a mention. The caller finds the people whose names contain the term `onQueryChange` reports, and the list above the box offers them. The arrows move the highlight, Enter or Tab inserts the name, and Escape closes the list. A sent message marks each mention with the typography `Mark`.",
25
+ "title": "Mentions"
26
+ },
27
+ "people": "People",
28
+ "placeholder": "Write a message",
29
+ "remove": "Remove {{name}}",
30
+ "reply": {
31
+ "about": "A strip above the text shows the message the reply answers. Escape or the strip's own control dismisses it, and focus returns to the text. Picked, dropped or pasted files wait above the text as small tiles, each with a control that removes it. Files alone make a message that can be sent.",
32
+ "title": "A reply with files"
33
+ },
34
+ "replyPlaceholder": "Reply to Ada",
35
+ "replying": "Replying to Ada Okafor: The invoice from Northwind is in.",
36
+ "sales": "Sales",
37
+ "send": "Send",
38
+ "sent_one": "Sent “{{text}}” with {{count}} file.",
39
+ "sent_other": "Sent “{{text}}” with {{count}} files.",
40
+ "sent_zero": "Sent “{{text}}”.",
41
+ "size": {
42
+ "about": "The size sets the text style and the inset around the text and the controls.",
43
+ "title": "Sizes"
44
+ },
45
+ "stop": "Stop the answer",
46
+ "stopping": {
47
+ "about": "While an answer runs the composer is `busy`: it sends nothing, and the send control turns into a stop control that interrupts the answer. Focus stays on the control across the swap. Here Ctrl+Enter or Cmd+Enter sends, and Enter starts a new line.",
48
+ "title": "Stopping an answer"
49
+ },
50
+ "title": "Composer",
51
+ "variant": {
52
+ "about": "The box takes the field looks: outline, subtle and flushed. Its edge, its focus ring and its invalid and disabled states come from the textarea inside it.",
53
+ "title": "Looks"
54
+ },
55
+ "you": "You"
56
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "about": "A transcript of turns that follows the latest message. The view opens at the end and scrolls with each message that arrives or grows, until the reader scrolls up. A control then brings the reader back to the latest message.",
3
+ "ada": "Ada Okafor",
4
+ "answer": "Last quarter closed **12% above** plan.\n\n- Revenue: €4.2M, up from €3.7M\n- Churn: 1.8%, down from 2.4%\n- New accounts: 312\n\nMost of the gain came from annual plans sold in August, when the price change took effect. Support volume stayed flat while the customer count grew, so the cost to serve a customer fell for the third quarter in a row.",
5
+ "approve": "Can you approve it before five?",
6
+ "approved": "Approved. I'll send it to finance.",
7
+ "archive": "I'll archive the thread once the payment clears.",
8
+ "ask": "Ask the assistant",
9
+ "askPlaceholder": "Ask about last quarter",
10
+ "asked": "Did the supplier send the corrected invoice?",
11
+ "assistant": "Assistant",
12
+ "assistantLabel": "Conversation with the assistant",
13
+ "assisting": {
14
+ "about": "The answer opens with the reasoning and the tool call, each in a disclosure `Details`, with the call's arguments and result in a `JsonTreeView`. The answer streams as Markdown in a turn with `aria-busy`, so a screen reader reads it once it is complete. While it streams, the send control stops it. Send a question to replay it.",
15
+ "title": "An assistant"
16
+ },
17
+ "bram": "Bram Visser",
18
+ "call": "Arguments and result",
19
+ "cancelled": "Cancelled",
20
+ "chat": {
21
+ "about": "The chat runs the scroll engine with `useConversation` and passes it to the root, so a send moves the view to the reader's own message. Ada answers a moment later, after a typing row. Scroll up before she answers, and the view stays where it is and the control to jump back appears. The latest message reads Delivered until Ada answers, and Read after.",
22
+ "title": "A chat"
23
+ },
24
+ "check": "Do you want me to check it against the purchase order?",
25
+ "cleo": "Cleo Martin",
26
+ "confirmed": "Finance confirmed the bank details.",
27
+ "conversations": "Conversations",
28
+ "delivered": "Delivered",
29
+ "devi": "Devi Rao",
30
+ "done": "Done",
31
+ "found": "Found it in the shared inbox.",
32
+ "hello": "Morning! The Northwind invoice came in overnight.",
33
+ "history": {
34
+ "about": "Scrolling to the top loads the page of messages before the first, while the log is `aria-busy`. The browser keeps the message the reader was looking at in place as older messages are added above it.",
35
+ "title": "Older messages on demand"
36
+ },
37
+ "inbox": {
38
+ "about": "The conversations are a collections `Listbox`: one tab stop, the arrow keys move between the rows, and typing a name moves to it. Each row shows the avatar, the name, the latest message, its time and the count of unread messages. The count is in words, so a screen reader reads it with the row.",
39
+ "title": "An inbox"
40
+ },
41
+ "jump": "Jump to the latest message",
42
+ "label": "Conversation with Ada Okafor",
43
+ "loading": "Loading older messages",
44
+ "matches": "It matches, apart from the shipping line.",
45
+ "message": "Message",
46
+ "opened": "I opened a ticket with Northwind about the invoice.",
47
+ "placeholder": "Write a message",
48
+ "please": "Yes please, I'm in meetings until four.",
49
+ "question": "Summarise last quarter.",
50
+ "read": "Read",
51
+ "reasoning": "Last quarter is 2026-Q3. The question needs revenue, churn and new accounts, so I'll ask for all three and compare them with the plan.",
52
+ "running": "Running",
53
+ "scheduled": "The payment is scheduled for Friday.",
54
+ "send": "Send",
55
+ "sent": "They said they sent it on Monday.",
56
+ "stop": "Stop the answer",
57
+ "stopped": "Stopped",
58
+ "thanks": "Thanks, that settles September.",
59
+ "thought": "Thought for 4 seconds",
60
+ "title": "Conversation",
61
+ "tool": "get_quarter_metrics",
62
+ "transcript": {
63
+ "about": "Two days of messages, grouped into turns by `groupTurns`, with the day as the label of a `Divider`. The times are formatted in UTC, so `timeZone` starts each day at midnight UTC and a label names the day its messages were sent. The view opens at the end, under Ada typing. Scroll up and the control at the bottom brings the view back.",
64
+ "title": "A transcript"
65
+ },
66
+ "typing": "Ada is typing",
67
+ "unread_one": "{{count}} new",
68
+ "unread_other": "{{count}} new",
69
+ "you": "You"
70
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "about": "One turn of a conversation: the sender's avatar and name, a bubble per message, and a footer with the delivery status and the actions. The reader's own turns are at the end of the line.",
3
+ "ada": "Ada Okafor",
4
+ "align": {
5
+ "about": "`end` puts a turn at the end of the line, for the reader's own messages: the avatar moves to the end and the bubbles align to it. A screen reader reads the turns in the order they are written, so the side changes nothing it reads.",
6
+ "title": "Sides of the line"
7
+ },
8
+ "answer": {
9
+ "about": "The plain look has no fill and no padding, and the bubble takes the whole column, for an assistant's answer in Markdown. The actions under it are visible at rest.",
10
+ "title": "An answer as a document"
11
+ },
12
+ "approve": "Can you approve it before five?",
13
+ "approved": "Approved. I'll send it to finance.",
14
+ "assistant": "Assistant",
15
+ "bad": "Bad answer",
16
+ "bram": "Bram Visser",
17
+ "cancel": "Cancel",
18
+ "copy": "Copy",
19
+ "delete": "Delete",
20
+ "deleteNote": "It is removed for everyone in the thread.",
21
+ "deleteTitle": "Delete this comment?",
22
+ "delivered": "Delivered",
23
+ "deliveredText": "I'll bring the printed copy.",
24
+ "delivery": {
25
+ "about": "The status shows how far each message has got. The glyph shows the state at a glance and the words are what a screen reader reads, so the glyph is `aria-hidden`. A read message's status is in the primary palette's ink.",
26
+ "title": "Delivery states"
27
+ },
28
+ "edit": "Edit",
29
+ "editLabel": "Edit your comment",
30
+ "edited": "Edited",
31
+ "editing": "Editing your comment",
32
+ "exchange": {
33
+ "about": "Another person's turn opens with their avatar and name at the start of the line. The reader's reply is at the end of the line in the primary palette's solid look, with its time and status in the footer. A turn without a visible name takes `aria-label`, so a screen reader names the sender.",
34
+ "title": "An exchange"
35
+ },
36
+ "failed": "Not sent",
37
+ "failedText": "Here's the draft for Friday.",
38
+ "failure": {
39
+ "about": "`failed` paints the bubble in the error palette. A color reports nothing to a screen reader, so the status states the failure in words and the retry action is visible at rest.",
40
+ "title": "A message that did not send"
41
+ },
42
+ "good": "Good answer",
43
+ "invoice": "The invoice from Northwind is in.",
44
+ "liked_one": "Thumbs up, {{count}} person",
45
+ "liked_other": "Thumbs up, {{count}} people",
46
+ "liked_zero": "Thumbs up",
47
+ "likedMine_one": "Thumbs up, you",
48
+ "likedMine_other": "Thumbs up, {{count}} people, including you",
49
+ "look": {
50
+ "about": "A bubble takes the flat looks: solid, subtle, surface, outline and plain. A bubble is read and never pressed, so no look repaints under a pointer. The plain look has no fill and no padding.",
51
+ "title": "Looks"
52
+ },
53
+ "move": "Can we move the launch to Thursday? Marketing needs one more day for the assets.",
54
+ "palette": {
55
+ "about": "The palette colors the bubbles of the turn. Give the reader's own turns the primary palette and every other sender the neutral one, so the two sides differ by more than their place.",
56
+ "title": "Palettes"
57
+ },
58
+ "reactions": "Reactions",
59
+ "read": "Read",
60
+ "readText": "The contract is signed.",
61
+ "regenerate": "Regenerate",
62
+ "replyLabel": "Reply to the thread",
63
+ "replyPlaceholder": "Write a reply",
64
+ "retry": "Retry",
65
+ "reveal": {
66
+ "about": "`hover` keeps the actions transparent until a pointer is over the turn or focus is inside it, and shows them at rest under a coarse pointer, which cannot hover. `always` shows them at rest, for the last turn of a conversation. The actions are in the tab order under both values.",
67
+ "title": "Actions on hover"
68
+ },
69
+ "save": "Save",
70
+ "send": "Send",
71
+ "sending": "Sending",
72
+ "sendingText": "On my way.",
73
+ "sent": "Sent",
74
+ "sentText": "Running five minutes late.",
75
+ "size": {
76
+ "about": "The size sets the text style of the bubbles, the header and the footer, the padding inside a bubble, and the gap between the avatar and the column.",
77
+ "title": "Sizes"
78
+ },
79
+ "summary": "The quarter closed **12% above** plan.\n\n- Revenue: €4.2M\n- Churn: 1.8%, down from 2.4%\n\nMost of the gain came from annual plans sold in August.",
80
+ "tell": "Moved it to Thursday. I'll tell support.",
81
+ "thread": {
82
+ "about": "Comments are turns in the plain look, each with its time, a reaction and, on the reader's own, the actions. Edit swaps the words for a composer in place: Enter saves, Escape or Cancel keeps the words, and focus returns to Edit. Delete asks first, with focus on Cancel, and a deletion moves focus to the reply box.",
83
+ "title": "A comment thread"
84
+ },
85
+ "title": "Message",
86
+ "works": "Thursday works for engineering. The release branch is ready.",
87
+ "you": "You"
88
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "about": "The reactions under a message: a toggle button for each reaction with the number of people who reacted, and a picker that adds one. Each button is named by the reaction, the count and whether the reader is among the people who reacted.",
3
+ "ada": "Ada Okafor",
4
+ "add": "Add a reaction",
5
+ "choose": "Choose a reaction",
6
+ "eyes": "Eyes",
7
+ "heart": "Heart",
8
+ "label": "Reactions",
9
+ "laugh": "Laughing face",
10
+ "mine_one": "{{name}}, you",
11
+ "mine_other": "{{name}}, {{count}} people, including you",
12
+ "party": "Party popper",
13
+ "reacting": {
14
+ "about": "Press a reaction to join it or to leave it: `aria-pressed` states whether the reader is among the people who reacted, and a pressed reaction takes the primary palette. The picker adds a reaction and closes, and focus returns to its button.",
15
+ "title": "Reactions under a message"
16
+ },
17
+ "rocket": "Rocket",
18
+ "shipped": "The September invoices are out. Thanks, everyone!",
19
+ "theirs_one": "{{name}}, {{count}} person",
20
+ "theirs_other": "{{name}}, {{count}} people",
21
+ "thumbs": "Thumbs up",
22
+ "title": "Reactions"
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stealthscale/component-messaging",
3
- "version": "0.1.0",
3
+ "version": "0.2.2",
4
4
  "description": "Renders conversations: turns of messages with a status and actions, a transcript that follows the latest message, reactions, attachments, mentions and a composer.",
5
5
  "keywords": [
6
6
  "chat",
@@ -20,6 +20,7 @@
20
20
  "files": [
21
21
  "dist",
22
22
  "LICENSE",
23
+ "locales",
23
24
  "README.md"
24
25
  ],
25
26
  "type": "module",
@@ -36,38 +37,38 @@
36
37
  "access": "public"
37
38
  },
38
39
  "dependencies": {
39
- "@stealthscale/component-actions": "^0.1.0",
40
+ "@stealthscale/component-actions": "^0.2.3",
40
41
  "use-stick-to-bottom": "^1.1"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@arethetypeswrong/core": "^0.18",
44
- "@stealthscale/component-disclosure": "^0.1.0",
45
- "@stealthscale/component-primitives": "^0.1.0",
46
- "@stealthscale/hooks": "^0.1.0",
47
- "@stealthscale/theme": "^0.3.0",
48
- "@stealthscale/vite-config": "^0.6.0",
49
- "@stealthscale/vite-config-i18n": "^0.1.0",
50
- "@stealthscale/vite-config-react": "^0.8.0",
51
- "@stealthscale/vite-config-specimen": "^0.1.0",
52
- "@stealthscale/vite-config-theme": "^0.1.0",
45
+ "@stealthscale/component-disclosure": "^0.2.4",
46
+ "@stealthscale/component-primitives": "^0.3.1",
47
+ "@stealthscale/hooks": "^0.3.0",
48
+ "@stealthscale/theme": "^0.5.0",
49
+ "@stealthscale/vite-config": "^0.8.0",
50
+ "@stealthscale/vite-config-i18n": "^0.2.2",
51
+ "@stealthscale/vite-config-react": "^0.9.1",
52
+ "@stealthscale/vite-config-specimen": "^0.3.0",
53
+ "@stealthscale/vite-config-theme": "^0.3.0",
53
54
  "@stealthscale/vite-config-typescript": "^0.3.0",
54
55
  "@testing-library/react": "^16.3",
55
56
  "@types/react": "^19.3",
56
57
  "@types/react-dom": "^19.3",
57
58
  "happy-dom": "^20.14",
58
- "lucide-react": "^1.48",
59
- "oxc-transform-react": "^0.151",
59
+ "lucide-react": "^1.52",
60
+ "oxc-transform-react": "^0.153",
60
61
  "publint": "^0.3",
61
62
  "react": "^19.3",
62
63
  "react-dom": "^19.3",
63
64
  "typescript": "^7.0",
64
- "vitest": "5.0.1"
65
+ "vitest": "5.0.3"
65
66
  },
66
67
  "peerDependencies": {
67
- "@stealthscale/component-disclosure": "^0.1.0",
68
- "@stealthscale/component-primitives": "^0.1.0",
69
- "@stealthscale/hooks": "^0.1.0",
70
- "@stealthscale/theme": "^0.3.0",
68
+ "@stealthscale/component-disclosure": "^0.2.4",
69
+ "@stealthscale/component-primitives": "^0.3.1",
70
+ "@stealthscale/hooks": "^0.3.0",
71
+ "@stealthscale/theme": "^0.5.0",
71
72
  "react": "^19.3",
72
73
  "react-dom": "^19.3"
73
74
  },