@@ -44773,19 +44773,17 @@ define("features/QuickViewManager", function (require, exports, module) {
4477344773 * 3. If non-null, but visible==false, we're waiting for HOVER_DELAY, which
4477444774 * is tracked by hoverTimer. The state changes to visible==true as soon as
4477544775 * there is a provider. If the mouse moves before then, timer is restarted.
44776- *
44777- * @type {{
44778- * visible: boolean,
44779- * editor: !Editor,
44780- * hoverTimer: number, - setTimeout() token
44781- * start: !{line, ch}, - start of matched text range
44782- * end: !{line, ch}, - end of matched text range
44783- * content: !string, - HTML content to display in popover
44784- * xpos: number, - x of center of popover
44785- * ytop: number, - y of top of matched text (when popover placed above text, normally)
44786- * ybot: number, - y of bottom of matched text (when popover moved below text, avoiding window top)
44787- * marker: ?CodeMirror.TextMarker - only set once visible==true
44788- * }}
44776+ * @typedef {Object} PopoverState
44777+ * @property {boolean} visible - Whether the popover is visible.
44778+ * @property {!Editor} editor - The editor instance associated with the popover.
44779+ * @property {number} hoverTimer - The token returned by setTimeout().
44780+ * @property {!{line: number, ch: number}} start - Start of the matched text range.
44781+ * @property {!{line: number, ch: number}} end - End of the matched text range.
44782+ * @property {!string} content - HTML content to display in the popover.
44783+ * @property {number} xpos - X-coordinate of the center of the popover.
44784+ * @property {number} ytop - Y-coordinate of the top of the matched text when popover is above the text.
44785+ * @property {number} ybot - Y-coordinate of the bottom of the matched text when popover is below the text.
44786+ * @property {?CodeMirror.TextMarker} marker - The text marker; only set once `visible` is `true`.
4478944787 * @private
4479044788 */
4479144789 let popoverState = null;
@@ -44924,7 +44922,7 @@ define("features/QuickViewManager", function (require, exports, module) {
4492444922 * Returns a popover array with the list of popovers to be rendered after filtering from providers.
4492544923 * @param results
4492644924 * @param providerInfos
44927- * @return {* []}
44925+ * @return {Object []}
4492844926 * @private
4492944927 */
4493044928 function _getPopover(results, providerInfos) {
@@ -45536,17 +45534,15 @@ define("features/SelectionViewManager", function (require, exports, module) {
4553645534 * 3. If non-null, but visible==false, we're waiting for HOVER_DELAY, which
4553745535 * is tracked by hoverTimer. The state changes to visible==true as soon as
4553845536 * there is a provider. If the mouse moves before then, timer is restarted.
45539- *
45540- * @type {{
45541- * visible: boolean,
45542- * editor: !Editor,
45543- * start: !{line, ch}, - start of matched text range
45544- * end: !{line, ch}, - end of matched text range
45545- * content: !string, - HTML content to display in popover
45546- * xpos: number, - x of center of popover
45547- * ytop: number, - y of top of matched text (when popover placed above text, normally)
45548- * ybot: number, - y of bottom of matched text (when popover moved below text, avoiding window top)
45549- * }}
45537+ * @typedef {Object} PopoverState
45538+ * @property {boolean} visible - Whether the popover is visible.
45539+ * @property {!Editor} editor - The editor instance associated with the popover.
45540+ * @property {!{line: number, ch: number}} start - Start of the matched text range.
45541+ * @property {!{line: number, ch: number}} end - End of the matched text range.
45542+ * @property {!string} content - HTML content to display in the popover.
45543+ * @property {number} xpos - X-coordinate of the center of the popover.
45544+ * @property {number} ytop - Y-coordinate of the top of the matched text when the popover is placed above the text.
45545+ * @property {number} ybot - Y-coordinate of the bottom of the matched text when the popover is moved below the text.
4555045546 * @private
4555145547 */
4555245548 let popoverState = null;
@@ -142597,17 +142593,21 @@ define("utils/EventManager", function (require, exports, module) {
142597142593 * // to prevent collisions. EventHandlers starting with `ph-` and `br-` are reserved as system handlers
142598142594 * // and not available for use in extensions.
142599142595 * window.Phoenix.TRUSTED_ORIGINS ["http://mydomain.com"] = true;
142596+ * ```js
142600142597 * EventManager.registerEventHandler("`extensionName`-iframeMessageHandler", exports);
142601142598 * exports.on("iframeHelloEvent", function(_ev, event){
142602142599 * console.log(event.data.message);
142603142600 * });
142601+ * ```
142604142602 *
142605142603 * // Now from your iframe, send a message to the above event handler using:
142604+ * ```js
142606142605 * window.parent.postMessage({
142607142606 * handlerName: "`extensionName`-iframeMessageHandler",
142608142607 * eventName: "iframeHelloEvent",
142609142608 * message: "hello world"
142610142609 * }, '*');
142610+ * ```
142611142611 * // `you should replace * with the trusted domains list in production for security.` See how this can be
142612142612 * // done securely with this example: https://github.com/phcode-dev/phcode.live/blob/6d64386fbb9d671cdb64622bc48ffe5f71959bff/docs/virtual-server-loader.js#L43
142613142613 * // Abstract is that, pass in the parentOrigin as a query string parameter in iframe, and validate it against
@@ -142692,11 +142692,9 @@ define("utils/EventManager", function (require, exports, module) {
142692142692 * ```js
142693142693 * let angularCli;
142694142694 * ExtensionInterface.waitAndGetExtensionInterface("angularCli").then(interfaceObj=> angularCli = interfaceObj);
142695- * ...
142696142695 * if(angularCli){ // check if angular cli is avilable
142697142696 * angularCli.callSomeFunction();
142698142697 * }
142699- * ...
142700142698 * ```
142701142699 *
142702142700 * **Note** that the `angularCli` interface is async populated as and when the cli extension is loaded and the
@@ -142749,13 +142747,13 @@ define("utils/ExtensionInterface", function (require, exports, module) {
142749142747 * getter to get hold of extensions interface predictably.
142750142748 *
142751142749 * To get a registered interface `angularCli`
142750+ * ```js
142752142751 * let angularCli;
142753142752 * ExtensionInterface.waitAndGetExtensionInterface("angularCli").then(interfaceObj=> angularCli = interfaceObj);
142754- * ...
142755142753 * if(angularCli){ // check if angular cli is avilable
142756142754 * angularCli.callSomeFunction();
142757142755 * }
142758- * ...
142756+ * ```
142759142757 *
142760142758 * @param extensionInterfaceName
142761142759 * @return {Promise}
@@ -144037,7 +144035,7 @@ define("utils/FeatureGate", function (require, exports, module) {
144037144035
144038144036 /**
144039144037 * Returns an array of all named registered feature gates.
144040- * @return {[String ]} list of registered features
144038+ * @return {string[ ]} list of registered features
144041144039 * @type {function}
144042144040 */
144043144041 function getAllRegisteredFeatures() {
@@ -148280,7 +148278,7 @@ define("utils/StringUtils", function (require, exports, module) {
148280148278 * Example: var formatted = StringUtils.format("Hello {0}", "World");
148281148279 *
148282148280 * @param {string} str The base string
148283- * @param {... } Arguments to be substituted into the string
148281+ * @param {rest } Arguments to be substituted into the string
148284148282 *
148285148283 * @return {string} Formatted string
148286148284 */
@@ -157702,11 +157700,13 @@ define("widgets/NotificationUI", function (require, exports, module) {
157702157700 * // note that you can even provide an HTML Element node with
157703157701 * // custom event handlers directly here instead of HTML text.
157704157702 * let notification1 = NotificationUI.createFromTemplate(
157703+ * ```js
157705157704 * "<div>Click me to locate the file in file tree</div>", "showInfileTree",{
157706157705 * allowedPlacements: ['top', 'bottom'],
157707157706 * dismissOnClick: false,
157708157707 * autoCloseTimeS: 300 // auto close the popup after 5 minutes
157709157708 * });
157709+ * ```
157710157710 *
157711157711 * @param {string|Element} template A string template or HTML Element to use as the dialog HTML.
157712157712 * @param {String} [elementID] optional id string if provided will show the notification pointing to the element.
@@ -157829,11 +157829,12 @@ define("widgets/NotificationUI", function (require, exports, module) {
157829157829 * // note that you can even provide an HTML Element node with
157830157830 * // custom event handlers directly here instead of HTML text.
157831157831 * let notification1 = NotificationUI.createToastFromTemplate( "Title here",
157832+ * ```js
157832157833 * "<div>Click me to locate the file in file tree</div>", {
157833157834 * dismissOnClick: false,
157834157835 * autoCloseTimeS: 300 // auto close the popup after 5 minutes
157835157836 * });
157836- *
157837+ * ```
157837157838 * @param {string} title The title for the notification.
157838157839 * @param {string|Element} template A string template or HTML Element to use as the dialog HTML.
157839157840 * @param {{dismissOnClick, autoCloseTimeS, toastStyle}} [options] optional, supported
@@ -158705,10 +158706,12 @@ define("worker/IndexingWorker", function (require, exports, module) {
158705158706 * To Execute a named function `extensionName.sayHello` in the worker from phoenix
158706158707 * // in my_worker.js. It is a good practice to prefix your `[extensionName]`
158707158708 * // to exec handler to prevent name collisions with other extensions.
158709+ * ```js
158708158710 * WorkerComm.setExecHandler("extensionName.sayHello", (arg)=>{
158709158711 * console.log("hello from worker ", arg); // prints "hello from worker phoenix"
158710158712 * return "Hello Phoenix";
158711- * });
158713+ * });
158714+ * ```
158712158715 * // In Phoenix/extension
158713158716 * let workerMessage = await IndexingWorker.execPeer("extensionName.sayHello", "phoenix");
158714158717 * console.log(workerMessage); // prints "Hello Phoenix"
0 commit comments