dragble-react-editor 1.0.6 → 1.0.8
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 +4 -17
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -305,7 +305,7 @@ The `id` you pass to `connectMCP()` is a **Bring Your Own ID (BYOI)** that maps
|
|
|
305
305
|
|
|
306
306
|
**Why these rules?**
|
|
307
307
|
|
|
308
|
-
- The `id` is used in database lookups
|
|
308
|
+
- The `id` is used in database lookups and URL paths — special characters or extreme lengths would break routing
|
|
309
309
|
- Same `id` = resume the same session. Random UUIDs mean every page refresh creates a new session and loses AI context
|
|
310
310
|
- Short IDs (< 8 chars) are too easy to guess, long IDs (> 128 chars) waste storage
|
|
311
311
|
|
|
@@ -321,22 +321,9 @@ editor.connectMCP({ id: "tenant_42_invoice_template_v3" }); // tenant + entity
|
|
|
321
321
|
editor.connectMCP({ id: crypto.randomUUID() });
|
|
322
322
|
```
|
|
323
323
|
|
|
324
|
-
### Storage modes (compliance)
|
|
325
|
-
|
|
326
|
-
Choose how much of the session lives on Dragble's servers:
|
|
327
|
-
|
|
328
|
-
```tsx
|
|
329
|
-
editor.connectMCP({
|
|
330
|
-
id: "user-42-doc-99",
|
|
331
|
-
storage: "full", // default — best UX, refresh + cross-device resume
|
|
332
|
-
// "metadata-only" // audit metadata only, no design content persisted
|
|
333
|
-
// "memory-only" // nothing persisted (HIPAA / SOC2 / data residency)
|
|
334
|
-
});
|
|
335
|
-
```
|
|
336
|
-
|
|
337
324
|
### Disconnecting
|
|
338
325
|
|
|
339
|
-
`disconnectMCP()` permanently destroys the session —
|
|
326
|
+
`disconnectMCP()` permanently destroys the session — the session cannot be reopened:
|
|
340
327
|
|
|
341
328
|
```tsx
|
|
342
329
|
const { destroyed } = await editor.disconnectMCP();
|
|
@@ -345,7 +332,7 @@ const { destroyed } = await editor.disconnectMCP();
|
|
|
345
332
|
Your backend can also force-destroy a session server-side (e.g., when a user's subscription ends):
|
|
346
333
|
|
|
347
334
|
```bash
|
|
348
|
-
curl -X DELETE https://mcp.dragble.
|
|
335
|
+
curl -X DELETE https://mcp.dragble.com/sessions/user-42-doc-99 \
|
|
349
336
|
-H "X-API-Key: db_mcp_your_key_here"
|
|
350
337
|
```
|
|
351
338
|
|
|
@@ -355,7 +342,7 @@ Idle sessions are reaped after 2 hours of inactivity. Active sessions never expi
|
|
|
355
342
|
|
|
356
343
|
| Method | Returns |
|
|
357
344
|
| -------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
358
|
-
| `editor.connectMCP({ id,
|
|
345
|
+
| `editor.connectMCP({ id, editorMode? })` | `{ sessionId, resumed? }` |
|
|
359
346
|
| `editor.disconnectMCP()` | `{ destroyed }` — permanently deletes session |
|
|
360
347
|
| `editor.getPairingCode()` | `{ code, expiresAt }` — generate a pairing code for end-user AI clients |
|
|
361
348
|
| `editor.endPairing()` | `{ revoked }` — invalidate the active pairing code |
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ interface DragbleEditorProps {
|
|
|
27
27
|
*/
|
|
28
28
|
contentType?: "module";
|
|
29
29
|
/**
|
|
30
|
-
|
|
30
|
+
* All editor configuration (appearance, tools, features, AI, etc.).
|
|
31
31
|
* These are placed under `options` in the SDK's DragbleConfig.
|
|
32
32
|
*/
|
|
33
33
|
options?: EditorOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dragble-react-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "AI-powered React email editor component. Drag-and-drop email builder for creating responsive email templates and newsletters. Build HTML emails visually with Dragble.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|