@jtfmumm/patchwork-standalone-frame 0.4.1 → 0.4.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.
Files changed (2) hide show
  1. package/README.md +16 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -177,14 +177,26 @@ Pass `{ legacyMode: true, repo }` to use a plain automerge repo without keyhive.
177
177
 
178
178
  ### Keyhive mode (default)
179
179
 
180
- When `legacyMode` is not set, the frame initializes keyhive automatically, including WASM loading, repo creation, and access control.
180
+ When `legacyMode` is not set, the frame initializes keyhive automatically, including WASM loading, repo creation, and access control. You don't need to create a repo yourself.
181
+
182
+ Keyhive mode requires one additional dependency:
183
+
184
+ ```
185
+ pnpm add @automerge/automerge-repo-keyhive
186
+ ```
187
+
188
+ Then your entry point is simpler, with no repo setup needed:
181
189
 
182
190
  ```typescript
191
+ import { mountStandaloneApp } from "@jtfmumm/patchwork-standalone-frame";
183
192
  import { plugins } from "my-tool";
184
193
 
185
- mountStandaloneApp(root, plugins, {
186
- syncUrl: "wss://your-keyhive-sync-server.example.com",
187
- });
194
+ const root = document.getElementById("root");
195
+ if (root) {
196
+ mountStandaloneApp(root, plugins, {
197
+ syncUrl: "wss://your-keyhive-sync-server.example.com",
198
+ });
199
+ }
188
200
  ```
189
201
 
190
202
  ### Config options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jtfmumm/patchwork-standalone-frame",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Reusable standalone frame for patchwork tools with keyhive, doc history, and access control",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",