add edit urls for menu and package manager

This commit is contained in:
dillon 2015-10-03 14:24:10 -07:00
parent 8b0fc2ba91
commit e53895f79c
2 changed files with 109 additions and 113 deletions

View file

@ -1,6 +1,7 @@
---
layout: docs
title: Menu
edit_url: "https://github.com/nylas/N1/blob/master/src/components/menu.cjsx"
---
<h2>Summary</h2>
@ -46,7 +47,7 @@ component&#39;s Menu instance:</p>
<td>
<span class="optional">Optional</span>
<p>The <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> class name applied to the Menu</p>
</td>
</tr>
<tr>
@ -54,9 +55,9 @@ component&#39;s Menu instance:</p>
<em>itemContent</em>
</td>
<td>
<p>A <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a> that returns a <a href='menuitem.html'>MenuItem</a>, <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a>, or React component for the given <code>item</code>. If you return a <a href='menuitem.html'>MenuItem</a>, your item is injected into the list directly. If you return a string or React component, the result is placed within a <a href='menuitem.html'>MenuItem</a>, resulting in the following DOM: <code>&lt;div className=&quot;item [selected]&quot;&gt;{your content}&lt;/div&gt;</code>. To create dividers and other special menu items, return an instance of:</p>
</td>
</tr>
<tr>
@ -64,9 +65,9 @@ component&#39;s Menu instance:</p>
<em>itemKey</em>
</td>
<td>
<p>A <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a> that returns a unique string key for the given <code>item</code>. Keys are important for efficient React rendering when <code>items</code> is changed, and a key function is required.</p>
</td>
</tr>
<tr>
@ -74,9 +75,9 @@ component&#39;s Menu instance:</p>
<em>itemChecked</em>
</td>
<td>
<p>A <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a> that returns true if the given item should be shown with a checkmark. If you don&#39;t provide an implementation for <code>itemChecked</code>, no checkmarks are ever shown.</p>
</td>
</tr>
<tr>
@ -84,9 +85,9 @@ component&#39;s Menu instance:</p>
<em>items</em>
</td>
<td>
<p>An <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/array'>Array</a> of arbitrary objects the menu should display.</p>
</td>
</tr>
<tr>
@ -94,9 +95,9 @@ component&#39;s Menu instance:</p>
<em>onSelect</em>
</td>
<td>
<p>A <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a> called with the selected item when the user clicks an item in the menu or confirms their selection with the Enter key.</p>
</td>
</tr>
<tr>
@ -104,9 +105,9 @@ component&#39;s Menu instance:</p>
<em>defaultSelectedIndex</em>
</td>
<td>
<p>The index of the item first selected if there was no other previous index. Defaults to 0. Set to -1 if you want nothing selected.</p>
</td>
</tr>
</table>
@ -119,12 +120,12 @@ component&#39;s Menu instance:</p>
<h4 id=getSelectedItem class="function-name">
getSelectedItem(<span class="args"></span>) <a href="#getSelectedItem" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p></p>
</div>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -136,12 +137,9 @@ component&#39;s Menu instance:</p>
<h4 id=setSelectedItem class="function-name">
setSelectedItem(<span class="args"></span>) <a href="#setSelectedItem" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Set the currently selected item. Pass
null to remove the selection</p>
</p>
</div>

View file

@ -1,6 +1,7 @@
---
layout: docs
title: PackageManager
edit_url: "https://github.com/nylas/N1/blob/master/src/package-manager.coffee"
---
<h2>Summary</h2>
@ -42,12 +43,12 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=onDidLoadInitialPackages class="function-name">
onDidLoadInitialPackages(<span class="args"><span class="arg">callback</span></span>) <a href="#onDidLoadInitialPackages" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Invoke the given callback when all packages have been loaded.</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -59,13 +60,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>callback</em>
</td>
<td class="markdown-from-sourecode">
<p><a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a></p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -77,12 +78,12 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=onDidActivateInitialPackages class="function-name">
onDidActivateInitialPackages(<span class="args"><span class="arg">callback</span></span>) <a href="#onDidActivateInitialPackages" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Invoke the given callback when all packages have been activated.</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -94,13 +95,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>callback</em>
</td>
<td class="markdown-from-sourecode">
<p><a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a></p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -112,12 +113,12 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=onDidActivatePackage class="function-name">
onDidActivatePackage(<span class="args"><span class="arg">callback</span></span>) <a href="#onDidActivatePackage" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Invoke the given callback when a package is activated.</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -129,13 +130,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>callback</em>
</td>
<td class="markdown-from-sourecode">
<p>A <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a> to be invoked when a package is activated.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -147,12 +148,12 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=onDidDeactivatePackage class="function-name">
onDidDeactivatePackage(<span class="args"><span class="arg">callback</span></span>) <a href="#onDidDeactivatePackage" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Invoke the given callback when a package is deactivated.</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -164,13 +165,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>callback</em>
</td>
<td class="markdown-from-sourecode">
<p>A <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a> to be invoked when a package is deactivated.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -182,12 +183,12 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=onDidLoadPackage class="function-name">
onDidLoadPackage(<span class="args"><span class="arg">callback</span></span>) <a href="#onDidLoadPackage" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Invoke the given callback when a package is loaded.</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -199,13 +200,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>callback</em>
</td>
<td class="markdown-from-sourecode">
<p>A <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a> to be invoked when a package is loaded.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -217,12 +218,12 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=onDidUnloadPackage class="function-name">
onDidUnloadPackage(<span class="args"><span class="arg">callback</span></span>) <a href="#onDidUnloadPackage" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Invoke the given callback when a package is unloaded.</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -234,13 +235,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>callback</em>
</td>
<td class="markdown-from-sourecode">
<p>A <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a> to be invoked when a package is unloaded.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -252,24 +253,24 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=getApmPath class="function-name">
getApmPath(<span class="args"></span>) <a href="#getApmPath" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get the path to the apm command.</p>
<p>Return a <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> file path to apm. </p>
</p>
</div>
<h4 id=getPackageDirPaths class="function-name">
getPackageDirPaths(<span class="args"></span>) <a href="#getPackageDirPaths" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get the paths being used to look for packages.</p>
</p>
</div>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -281,13 +282,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=resolvePackagePath class="function-name">
resolvePackagePath(<span class="args"><span class="arg">name</span></span>) <a href="#resolvePackagePath" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Resolve the given package name to a path on disk.</p>
<p>Return a <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> folder path or undefined if it could not be resolved. </p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -299,22 +300,22 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>name</em>
</td>
<td class="markdown-from-sourecode">
<p>The <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> package name.</p>
</td>
</tr>
</table>
<h4 id=isBundledPackage class="function-name">
isBundledPackage(<span class="args"><span class="arg">name</span></span>) <a href="#isBundledPackage" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Is the package with the given name bundled with Atom?</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -326,13 +327,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>name</em>
</td>
<td class="markdown-from-sourecode">
<p>The <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> package name.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -344,13 +345,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=enablePackage class="function-name">
enablePackage(<span class="args"></span>) <a href="#enablePackage" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Enable the package with the given name.</p>
</p>
</div>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -362,13 +363,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=disablePackage class="function-name">
disablePackage(<span class="args"></span>) <a href="#disablePackage" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Disable the package with the given name.</p>
</p>
</div>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -380,12 +381,12 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=isPackageDisabled class="function-name">
isPackageDisabled(<span class="args"><span class="arg">name</span></span>) <a href="#isPackageDisabled" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Is the package with the given name disabled?</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -397,13 +398,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>name</em>
</td>
<td class="markdown-from-sourecode">
<p>The <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> package name.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -415,22 +416,22 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=getActivePackages class="function-name">
getActivePackages(<span class="args"></span>) <a href="#getActivePackages" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get an <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/array'>Array</a> of all the active {Package}s. </p>
</p>
</div>
<h4 id=getActivePackage class="function-name">
getActivePackage(<span class="args"><span class="arg">name</span></span>) <a href="#getActivePackage" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get the active {Package} with the given name.</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -442,13 +443,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>name</em>
</td>
<td class="markdown-from-sourecode">
<p>The <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> package name.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -460,12 +461,12 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=isPackageActive class="function-name">
isPackageActive(<span class="args"><span class="arg">name</span></span>) <a href="#isPackageActive" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Is the {Package} with the given name active?</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -477,13 +478,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>name</em>
</td>
<td class="markdown-from-sourecode">
<p>The <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> package name.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -495,22 +496,22 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=getLoadedPackages class="function-name">
getLoadedPackages(<span class="args"></span>) <a href="#getLoadedPackages" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get an <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/array'>Array</a> of all the loaded {Package}s </p>
</p>
</div>
<h4 id=getLoadedPackage class="function-name">
getLoadedPackage(<span class="args"><span class="arg">name</span></span>) <a href="#getLoadedPackage" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get the loaded {Package} with the given name.</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -522,13 +523,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>name</em>
</td>
<td class="markdown-from-sourecode">
<p>The <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> package name.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -540,12 +541,12 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=isPackageLoaded class="function-name">
isPackageLoaded(<span class="args"><span class="arg">name</span></span>) <a href="#isPackageLoaded" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Is the package with the given name loaded?</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
@ -557,13 +558,13 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<em>name</em>
</td>
<td class="markdown-from-sourecode">
<p>The <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> package name.</p>
</td>
</tr>
</table>
<strong>Returns</strong>
<table class="arguments">
<tr>
@ -575,33 +576,30 @@ settings and also by calling <code>enablePackage()/disablePackage()</code>.</p>
<h4 id=getAvailablePackagePaths class="function-name">
getAvailablePackagePaths(<span class="args"></span>) <a href="#getAvailablePackagePaths" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get an <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/array'>Array</a> of <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a>s of all the available package paths.</p>
<p>If the optional windowType is passed, it will only load packages
that declare that windowType in their package.json </p>
</p>
</div>
<h4 id=getAvailablePackageNames class="function-name">
getAvailablePackageNames(<span class="args"></span>) <a href="#getAvailablePackageNames" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get an <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/array'>Array</a> of <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a>s of all the available package names. </p>
</p>
</div>
<h4 id=getAvailablePackageMetadata class="function-name">
getAvailablePackageMetadata(<span class="args"></span>) <a href="#getAvailablePackageMetadata" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get an <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/array'>Array</a> of <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a>s of all the available package metadata. </p>
</p>
</div>