Browse Source

docs: Update menu-item with new position props (#14465)

* docs: Update menu-item with new position props

* :package: Update electron-typescript-definitions
Felix Rieseberg 6 years ago
parent
commit
f012ed8357
3 changed files with 269 additions and 259 deletions
  1. 15 5
      docs/api/menu-item.md
  2. 252 252
      package-lock.json
  3. 2 2
      package.json

+ 15 - 5
docs/api/menu-item.md

@@ -27,14 +27,24 @@ See [`Menu`](menu.md) for examples.
   * `visible` Boolean (optional) - If false, the menu item will be entirely hidden.
   * `checked` Boolean (optional) - Should only be specified for `checkbox` or `radio` type
     menu items.
-  * `submenu` (MenuItemConstructorOptions[] | [Menu](menu.md)) (optional) - Should be specified for `submenu` type menu items. If
-    `submenu` is specified, the `type: 'submenu'` can be omitted. If the value
-    is not a [`Menu`](menu.md) then it will be automatically converted to one using
+  * `submenu` (MenuItemConstructorOptions[] | [Menu](menu.md)) (optional) - Should be specified
+    for `submenu` type menu items. If `submenu` is specified, the `type: 'submenu'` can be omitted.
+    If the value is not a [`Menu`](menu.md) then it will be automatically converted to one using
     `Menu.buildFromTemplate`.
   * `id` String (optional) - Unique within a single menu. If defined then it can be used
     as a reference to this item by the position attribute.
-  * `position` String (optional) - This field allows fine-grained definition of the
-    specific location within a given menu.
+  * `before` String[] (optional) - Inserts this item before the item with the specified label. If
+    the referenced item doesn't exist the item will be inserted at the end of  the menu. Also implies
+    that the menu item in question should be placed in the same “group” as the item.
+  * `after` String[] (optional) - Inserts this item after the item with the specified label. If the
+    referenced item doesn't exist the item will be inserted at the end of
+    the menu.
+  * `beforeGroupContaining` String[] (optional) - Provides a means for a single context menu to declare
+    the placement of their containing group before the containing group of the item
+    with the specified label.
+  * `afterGroupContaining` String[] (optional) - Provides a means for a single context menu to declare
+    the placement of their containing group after the containing group of the item
+    with the specified label.
 
 ### Roles
 

File diff suppressed because it is too large
+ 252 - 252
package-lock.json


+ 2 - 2
package.json

@@ -13,7 +13,7 @@
     "dugite": "^1.45.0",
     "electabul": "~0.0.4",
     "electron-docs-linter": "^2.3.4",
-    "electron-typescript-definitions": "^1.3.6",
+    "electron-typescript-definitions": "^2.0.0",
     "github": "^9.2.0",
     "html-entities": "^1.2.1",
     "husky": "^0.14.3",
@@ -60,7 +60,7 @@
     "lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-relative-links",
     "lint:docs-relative-links": "python ./script/check-relative-doc-links.py",
     "lint:js-in-markdown": "standard-markdown docs",
-    "create-api-json": "electron-docs-linter docs --outfile=out/electron-api.json --version=$npm_package_version",
+    "create-api-json": "electron-docs-linter docs --outfile=out/electron-api.json --version=4.0.0-nightly.20180823",
     "create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --in=out/electron-api.json --out=out/electron.d.ts",
     "mock-release": "node ./script/ci-release-build.js",
     "preinstall": "node -e 'process.exit(0)'",

Some files were not shown because too many files changed in this diff