@minicode-dev/chat 0.1.0 → 0.1.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.md +54 -14
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# @minicode-dev/chat
|
|
2
2
|
|
|
3
3
|
Real-time chat for React (WebSocket, reactions, editing, emoji, GIFs/stickers via KLIPY, file and voice
|
|
4
|
-
attachments, notifications, Connect 4 and 3D Battleship)
|
|
4
|
+
attachments, notifications, Connect 4 and 3D Battleship).
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Standalone, reusable npm package for integration into React applications through configurable
|
|
7
|
+
providers and transport adapters.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- Owner: **Minicode** · License: `UNLICENSED`.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Install the package from npm. If your registry requires authentication, configure an `.npmrc` in
|
|
14
|
+
the host project (keep the token out of git, e.g. via an environment variable):
|
|
13
15
|
|
|
14
16
|
```ini
|
|
15
17
|
@minicode-dev:registry=https://registry.npmjs.org/
|
|
@@ -69,7 +71,7 @@ export function ChatRoute() {
|
|
|
69
71
|
}
|
|
70
72
|
```
|
|
71
73
|
|
|
72
|
-
- `LiraChatProvider` props: `config`, `transport` (inject your own `ChatTransport
|
|
74
|
+
- `LiraChatProvider` props: `config`, `transport` (inject your own `ChatTransport` adapter;
|
|
73
75
|
the provider never closes an injected transport), `stores`, `chatStore` and `children`. Without a
|
|
74
76
|
`transport`, a standalone WebSocket transport is created from `config.websocket.url`.
|
|
75
77
|
- `ChatWindow` props: `placement` (`'floating' | 'modal' | 'embedded'`), `open` / `onOpenChange`
|
|
@@ -111,14 +113,52 @@ from `/sounds/...`. Either:
|
|
|
111
113
|
|
|
112
114
|
The files are also exposed as `@minicode-dev/chat/assets/*` for bundlers that can import asset URLs.
|
|
113
115
|
|
|
114
|
-
##
|
|
116
|
+
## Local development
|
|
115
117
|
|
|
116
|
-
|
|
117
|
-
aliases in the root `vite.config.js`. The exports also carry a custom `@minicode-dev/source` condition that
|
|
118
|
-
points at `src/` for tooling that opts into it (`resolve.conditions`); it is never resolved by default.
|
|
118
|
+
This repository builds a library; it does not include a standalone demo or a `dev` script.
|
|
119
119
|
|
|
120
120
|
```bash
|
|
121
|
-
npm
|
|
122
|
-
npm
|
|
123
|
-
npm
|
|
121
|
+
npm install
|
|
122
|
+
npm run build # ESM library and styles in dist/
|
|
123
|
+
npm pack # builds again via prepack and creates an installable .tgz
|
|
124
124
|
```
|
|
125
|
+
|
|
126
|
+
To test local changes, install the generated tarball in a React application:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Run inside your consuming application; adjust the path and package version.
|
|
130
|
+
npm install /path/to/minicode-chat/minicode-dev-chat-0.1.0.tgz
|
|
131
|
+
npm run dev # if your application provides this script
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Repeat packing and installation after changes. Installation updates the consuming application's
|
|
135
|
+
local dependency files. Real-time messaging requires a compatible WebSocket service and any
|
|
136
|
+
necessary authentication, supplied by the consuming application.
|
|
137
|
+
|
|
138
|
+
For source-based development, the custom `@minicode-dev/source` export condition points at `src/`.
|
|
139
|
+
Tooling must explicitly enable it (for example through Vite's `resolve.conditions`) and resolve
|
|
140
|
+
this local package. It is not enabled by default; React and other shared peers must resolve to
|
|
141
|
+
one copy in the consuming application.
|
|
142
|
+
|
|
143
|
+
## Publishing updates
|
|
144
|
+
|
|
145
|
+
Log in yourself with `npm login`, then run:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npm run release # patch version, build, validate contents, publish
|
|
149
|
+
npm run release -- minor # minor version
|
|
150
|
+
npm run release -- major # major version
|
|
151
|
+
npm run release -- --dry-run # build and inspect; no version change or publication
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
The release script checks your npm session, builds, increments the version without
|
|
155
|
+
creating a Git commit or tag, and validates the exact archive before publishing it.
|
|
156
|
+
Only `dist/`, `assets/`, public types, README, changelog and package metadata are allowed.
|
|
157
|
+
Temporary archives and this package's root `.tgz` files are removed even on failure.
|
|
158
|
+
Build output in `dist/` is retained for local use. If publication fails after the
|
|
159
|
+
version bump, the updated version remains in `package.json` and the lockfile.
|
|
160
|
+
Registry access follows `publishConfig` in `package.json`; login and any required
|
|
161
|
+
npm authentication challenge are handled by you. No Git push is performed.
|
|
162
|
+
|
|
163
|
+
The command is named `release` because npm reserves `publish` as a lifecycle hook;
|
|
164
|
+
a script with that name that calls `npm publish` could invoke itself recursively.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minicode-dev/chat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "LIRA real-time chat (WebSocket, media, games) as a React package.",
|
|
6
6
|
"author": "Minicode",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
],
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "vite build",
|
|
43
|
-
"prepack": "npm run build"
|
|
43
|
+
"prepack": "npm run build",
|
|
44
|
+
"release": "node scripts/release.mjs"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"lucide-react": ">=0.400.0",
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"emojibase-data": "^17.0.0"
|
|
60
61
|
},
|
|
61
62
|
"publishConfig": {
|
|
62
|
-
"access": "
|
|
63
|
+
"access": "public"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
66
|
"@vitejs/plugin-react-swc": "^4.3.3",
|