diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72b2ece..2b2e6bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 18 - - run: npm ci --no-optional + - run: npm ci - run: npm test - name: 'Build web app artifacts' diff --git a/.gitignore b/.gitignore index d94b699..c831cc8 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ .env.development.local .env.test.local .env.production.local +.parcel-cache npm-debug.log* yarn-debug.log* diff --git a/README.md b/README.md index 0922ad4..5642284 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,33 @@ See the full ticket backlog [here](https://github.com/users/jeremyckahn/projects - Mirror: https://chitchatter.vercel.app/ (note that peers cannot connect across domains) - Staging: https://chitchatter-git-develop-jeremyckahn.vercel.app/ +## SDK + +You can use the official Chitchatter SDK to embed the app as a [Web Component](https://developer.mozilla.org/en-US/docs/Web/API/Web_components) called ``. + +```html + + + +``` + +The `` component supports the following optional attributes: + +- `room`: The name of the Chitchatter room the user should join. The default value is the URL of the embedding page. +- `user-name`: The friendly name of the user (which they can change). +- `user-id`: The static ID of the user. The default value is a random UUID. +- `root-url`: The URL of the Chitchatter instance to use. The default value is `https://chitchatter.im/`. +- `color-mode`: `light` or `dark`. The default value is `dark`. +- `play-message-sound`: Whether or not to play a sound when a user receives a message while the window is not in focus. The default value is `false`. + +As well as the following [standard `