@poolse/react-ui 0.1.0
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/CHANGELOG.md +24 -0
- package/LICENSE +21 -0
- package/README.md +91 -0
- package/dist/index.cjs +1024 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +424 -0
- package/dist/index.d.ts +424 -0
- package/dist/index.js +1008 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +841 -0
- package/package.json +69 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@poolse/react-ui` are documented here. Format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
|
+
[semver](https://semver.org).
|
|
6
|
+
|
|
7
|
+
## [0.1.0] — 2026-06-01
|
|
8
|
+
|
|
9
|
+
First publishable release.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Composed `<ConversationView>` — full chat surface in one drop-in.
|
|
14
|
+
- Individual pieces: `<MessageBubble>`, `<MessageComposer>`,
|
|
15
|
+
`<TypingIndicator>`, `<Avatar>`.
|
|
16
|
+
- Conversation + member panels: `<ConversationList>`, `<MemberList>`.
|
|
17
|
+
- Rich content: `<AttachmentPreview>` (image / file),
|
|
18
|
+
`<ReactionStrip>` + `<ReactionPicker>`, `<MentionInput>`.
|
|
19
|
+
- Brand chrome: `<PoolseIcon>` (41 icons), `<PoolseLogo>` (mark / lockup
|
|
20
|
+
/ wordmark / mono), `<PoolseFonts />` (auto-loaded by
|
|
21
|
+
`<ConversationView>`).
|
|
22
|
+
- Full `--poolse-*` CSS variable system mirroring the brand kit:
|
|
23
|
+
colors, type, radii, warm-tinted shadows, light + dark themes.
|
|
24
|
+
- Render-prop escape hatches on every list/conversation component.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Poolse
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# `@poolse/react-ui`
|
|
2
|
+
|
|
3
|
+
Plug-and-play React components for **[poolse](https://poolse.dev)** — realtime chat infrastructure.
|
|
4
|
+
|
|
5
|
+
Brand-aligned default UI built on top of **[`@poolse/react`](https://www.npmjs.com/package/@poolse/react)** hooks. Drop a `<ConversationView>` in once and you've got chat. Or compose `<MessageBubble>`, `<MessageComposer>`, `<ConversationList>`, `<MemberList>`, `<AttachmentPreview>`, `<ReactionStrip>`, `<MentionInput>` à la carte. Themed via CSS variables — no rebuild needed to re-skin.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @poolse/react-ui @poolse/react @poolse/sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { PoolseProvider } from '@poolse/react';
|
|
17
|
+
import { ConversationView } from '@poolse/react-ui';
|
|
18
|
+
import '@poolse/react-ui/styles.css';
|
|
19
|
+
|
|
20
|
+
function App() {
|
|
21
|
+
return (
|
|
22
|
+
<PoolseProvider
|
|
23
|
+
config={{
|
|
24
|
+
apiUrl: 'https://chat.example.com',
|
|
25
|
+
getToken: async () => {
|
|
26
|
+
const res = await fetch('/api/chat-token', { method: 'POST' });
|
|
27
|
+
const { token } = await res.json();
|
|
28
|
+
return token;
|
|
29
|
+
},
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<ConversationView conversationId="<conversation-id>" />
|
|
33
|
+
</PoolseProvider>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That's it. Auto-loads the brand fonts (Bricolage Grotesque / Hanken Grotesk / JetBrains Mono) on mount unless you pass `loadFonts={false}`.
|
|
39
|
+
|
|
40
|
+
## Components
|
|
41
|
+
|
|
42
|
+
| Component | Use |
|
|
43
|
+
| -------------------------------------- | ------------------------------------------------------------------------- |
|
|
44
|
+
| `<ConversationView>` | Full chat surface: message list + typing indicator + composer |
|
|
45
|
+
| `<ConversationList>` | Sidebar of conversations the user belongs to |
|
|
46
|
+
| `<MemberList>` | Roster for a conversation, with role badges + optional remove |
|
|
47
|
+
| `<MessageBubble>` | One message — coral for self, surface for others; read-receipt glyph |
|
|
48
|
+
| `<MessageComposer>` | Pill input + circular brand send button |
|
|
49
|
+
| `<MentionInput>` | Composer with `@` autocomplete |
|
|
50
|
+
| `<TypingIndicator>` | Three bouncing dots + names label |
|
|
51
|
+
| `<AttachmentPreview>` | Inline image (lazy thumbnail) OR file card with download |
|
|
52
|
+
| `<ReactionStrip>` + `<ReactionPicker>` | Pills with counts + emoji picker |
|
|
53
|
+
| `<Avatar>` | Initials gradient + presence dot + image fallback |
|
|
54
|
+
| `<PoolseIcon name="…" />` | Any icon from the 41-icon brand set |
|
|
55
|
+
| `<PoolseLogo>` | Brand mark / lockup / wordmark, theme-aware |
|
|
56
|
+
| `<PoolseFonts />` | Inject the brand fonts (idempotent; `ConversationView` does this for you) |
|
|
57
|
+
|
|
58
|
+
## Theming
|
|
59
|
+
|
|
60
|
+
Every color, radius, shadow, and font is a `--poolse-*` CSS variable. Override in your own stylesheet — no component ejection:
|
|
61
|
+
|
|
62
|
+
```css
|
|
63
|
+
:root {
|
|
64
|
+
--poolse-brand: #0070f3; /* swap coral for your brand */
|
|
65
|
+
--poolse-brand-soft: #e0eaff;
|
|
66
|
+
--poolse-brand-strong: #0050b3;
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Dark mode: set `[data-theme="dark"]` on any ancestor (or rely on the user's `prefers-color-scheme`).
|
|
71
|
+
|
|
72
|
+
## Customization
|
|
73
|
+
|
|
74
|
+
Every component has a render-prop escape hatch — replace any row, message, or item without giving up the rest of the UI:
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
<ConversationList renderItem={(conv, selected) => <MyCustomRow {...} />} />
|
|
78
|
+
<ConversationView renderMessage={(msg, currentUserId) => <MyMessageBubble {...} />} />
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Or skip `@poolse/react-ui` entirely and build everything on the raw hooks from `@poolse/react`.
|
|
82
|
+
|
|
83
|
+
## Documentation
|
|
84
|
+
|
|
85
|
+
- Full component reference + theming — <https://poolse.dev/docs/react-ui>
|
|
86
|
+
- Source — <https://github.com/poolse-hq/js-sdk>
|
|
87
|
+
- Issues — <https://github.com/poolse-hq/js-sdk/issues>
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
MIT
|