@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.
- package/README.md +16 -4
- 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
|
-
|
|
186
|
-
|
|
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