@nuasite/cms 0.9.3 → 0.10.0

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 CHANGED
@@ -307,6 +307,27 @@ Sent when the user hovers or clicks a CMS element. Contains full element metadat
307
307
 
308
308
  Sent when no element is hovered. No additional data.
309
309
 
310
+ ### Inbound Messages (Parent → Iframe)
311
+
312
+ The parent window can send commands to the editor iframe using `postMessage`:
313
+
314
+ ```typescript
315
+ const iframe = document.querySelector('iframe')
316
+
317
+ // Deselect the currently selected component
318
+ iframe.contentWindow.postMessage({ type: 'cms-deselect-element' }, '*')
319
+ ```
320
+
321
+ All inbound message types are exported as TypeScript interfaces:
322
+
323
+ ```typescript
324
+ import type { CmsDeselectElementMessage, CmsInboundMessage } from '@nuasite/cms'
325
+ ```
326
+
327
+ #### `cms-deselect-element`
328
+
329
+ Deselects the currently selected component and closes the block editor. No additional data required.
330
+
310
331
  ## Exports
311
332
 
312
333
  ```typescript