@devvit/public-api 0.11.4-next-2024-12-07-be2205f63.0 → 0.11.4

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.
@@ -1,28 +1,9 @@
1
1
  import type { JSONValue } from '@devvit/shared-types/json.js';
2
2
  export interface WebViewUIClient {
3
3
  /**
4
- * Send a message to a WebView in your UI
5
- * Any WebView can receive this message. If your app contains different WebViews with specific
6
- * IDs you can target a specific WebView with the alternate overload: postMessage('id', message);
7
- *
4
+ * Send a message to a webview
8
5
  * Message will arrive via window.onmessage and will be wrapped in an object:
9
6
  * { type: 'devvit-message', data: { message } }
10
- *
11
- * If no WebViews are present an error will be logged to the console.
12
- *
13
- * @param message
14
- */
15
- postMessage<T extends JSONValue>(message: T): void;
16
- /**
17
- * Send a message to a specific WebView in your UI
18
- *
19
- * Message will arrive via window.onmessage and will be wrapped in an object:
20
- * { type: 'devvit-message', data: { message } }
21
- *
22
- * If a WebView with the given ID is not found an error will be logged to the console.
23
- *
24
- * @param webviewId
25
- * @param message
26
7
  */
27
8
  postMessage<T extends JSONValue>(webviewId: string, message: T): void;
28
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"web-view-ui-client.d.ts","sourceRoot":"","sources":["../../src/types/web-view-ui-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,eAAe;IAM9B;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC;IACnD;;;;;;;;;;OAUG;IACH,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC;CACvE"}
1
+ {"version":3,"file":"web-view-ui-client.d.ts","sourceRoot":"","sources":["../../src/types/web-view-ui-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC;CACvE"}