Skip to content

Commit 5a7df92

Browse files
committed
regenerate declarations
1 parent 1094acf commit 5a7df92

File tree

44 files changed

+1476
-578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1476
-578
lines changed

declarations/src/main/kotlin/alarms/alarms.kt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import webextensions.Event
66
/**
77
* @param name Name of this alarm.
88
* @param scheduledTime Time when the alarm is scheduled to fire, in milliseconds past the epoch.
9-
* @param periodInMinutes When present, signals that the alarm triggers periodically after so many minutes.
9+
* @param periodInMinutes When present, signals that the alarm triggers periodically after so many
10+
minutes.
1011
*/
1112
class Alarm(
1213
var name: String,
@@ -15,9 +16,15 @@ class Alarm(
1516
)
1617

1718
/**
18-
* Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if 'when' is provided), after 'delayInMinutes' minutes from the current time (if 'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and 'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after that many minutes.
19+
* Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if
20+
'when' is provided), after 'delayInMinutes' minutes from the current time (if
21+
'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current
22+
time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and
23+
'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after
24+
that many minutes.
1925
* @param when Time when the alarm is scheduled to first fire, in milliseconds past the epoch.
20-
* @param delayInMinutes Number of minutes from the current time after which the alarm should first fire.
26+
* @param delayInMinutes Number of minutes from the current time after which the alarm should first
27+
fire.
2128
* @param periodInMinutes Number of minutes after which the alarm should recur repeatedly.
2229
*/
2330
class AlarmInfo(
@@ -34,7 +41,9 @@ external class AlarmsNamespace {
3441
val onAlarm: Event<(name: Alarm) -> Unit>
3542

3643
/**
37-
* Creates an alarm. After the delay is expired, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
44+
* Creates an alarm. After the delay is expired, the onAlarm event is fired. If there is another
45+
alarm with the same name (or no name if none is specified), it will be cancelled and
46+
replaced by this alarm.
3847
*/
3948
fun create(name: String? = definedExternally, alarmInfo: AlarmInfo)
4049

declarations/src/main/kotlin/bookmarks/bookmarks.kt

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,34 @@ import kotlin.js.Promise
44
import webextensions.Event
55

66
/**
7-
* Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default). */
7+
* Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that
8+
this node was configured by the system administrator or by the custodian of a supervised
9+
user. Omitted if the node can be modified by the user and the extension (default). */
810
typealias BookmarkTreeNodeUnmodifiable = String
911

1012
/**
1113
* Indicates the type of a BookmarkTreeNode, which can be one of bookmark, folder or separator. */
1214
typealias BookmarkTreeNodeType = String
1315

1416
/**
15-
* A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.
16-
* @param id The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
17+
* A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within
18+
their parent folder.
19+
* @param id The unique identifier for the node. IDs are unique within the current profile, and they
20+
remain valid even after the browser is restarted.
1721
* @param parentId The <code>id</code> of the parent folder. Omitted for the root node.
1822
* @param index The 0-based position of this node within its parent folder.
1923
* @param url The URL navigated to when a user clicks the bookmark. Omitted for folders.
2024
* @param title The text displayed for the node.
21-
* @param dateAdded When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>).
22-
* @param dateGroupModified When the contents of this folder last changed, in milliseconds since the epoch.
23-
* @param unmodifiable Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
24-
* @param type Indicates the type of the BookmarkTreeNode, which can be one of bookmark, folder or separator.
25+
* @param dateAdded When this node was created, in milliseconds since the epoch (<code>new
26+
Date(dateAdded)</code>).
27+
* @param dateGroupModified When the contents of this folder last changed, in milliseconds since the
28+
epoch.
29+
* @param unmodifiable Indicates the reason why this node is unmodifiable. The <var>managed</var>
30+
value indicates that this node was configured by the system administrator or by the
31+
custodian of a supervised user. Omitted if the node can be modified by the user and the
32+
extension (default).
33+
* @param type Indicates the type of the BookmarkTreeNode, which can be one of bookmark, folder or
34+
separator.
2535
* @param children An ordered list of children of this node.
2636
*/
2737
class BookmarkTreeNode(
@@ -40,7 +50,8 @@ class BookmarkTreeNode(
4050
/**
4151
* Object passed to the create() function.
4252
* @param parentId Defaults to the Other Bookmarks folder.
43-
* @param type Indicates the type of BookmarkTreeNode to create, which can be one of bookmark, folder or separator.
53+
* @param type Indicates the type of BookmarkTreeNode to create, which can be one of bookmark,
54+
folder or separator.
4455
*/
4556
class CreateDetails(
4657
var parentId: String? = null,
@@ -55,8 +66,10 @@ class CreateDetails(
5566
typealias IdOrIdList = Any
5667

5768
/**
58-
* An object specifying properties and values to match when searching. Produces bookmarks matching all properties.
59-
* @param query A string of words and quoted phrases that are matched against bookmark URLs and titles.
69+
* An object specifying properties and values to match when searching. Produces bookmarks matching
70+
all properties.
71+
* @param query A string of words and quoted phrases that are matched against bookmark URLs and
72+
titles.
6073
* @param url The URL of the bookmark; matches verbatim. Note that folders have no URL.
6174
* @param title The title of the bookmark; matches verbatim.
6275
*/
@@ -67,7 +80,10 @@ class Query(
6780
)
6881

6982
/**
70-
* Either a string of words and quoted phrases that are matched against bookmark URLs and titles, or an object. If an object, the properties <code>query</code>, <code>url</code>, and <code>title</code> may be specified and bookmarks matching all specified properties will be produced. */
83+
* Either a string of words and quoted phrases that are matched against bookmark URLs and titles, or
84+
an object. If an object, the properties <code>query</code>, <code>url</code>, and
85+
<code>title</code> may be specified and bookmarks matching all specified properties will be
86+
produced. */
7187
typealias Query2 = Any
7288

7389
class Destination(var parentId: String? = null, var index: Int? = null)
@@ -100,14 +116,16 @@ external class BookmarksNamespace {
100116
val onCreated: Event<(id: String, bookmark: BookmarkTreeNode) -> Unit>
101117

102118
/**
103-
* Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.
119+
* Fired when a bookmark or folder is removed. When a folder is removed recursively, a single
120+
notification is fired for the folder, and none for its contents.
104121
*
105122
* @param id null
106123
* @param removeInfo null */
107124
val onRemoved: Event<(id: String, removeInfo: RemoveInfo) -> Unit>
108125

109126
/**
110-
* Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes trigger this.
127+
* Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes
128+
trigger this.
111129
*
112130
* @param id null
113131
* @param changeInfo null */
@@ -151,17 +169,20 @@ external class BookmarksNamespace {
151169
fun getSubTree(id: String): Promise<Array<BookmarkTreeNode>>
152170

153171
/**
154-
* Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
172+
* Searches for BookmarkTreeNodes matching the given query. Queries specified with an object
173+
produce BookmarkTreeNodes matching all specified properties.
155174
*/
156175
fun search(query: String): Promise<Array<BookmarkTreeNode>>
157176

158177
/**
159-
* Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
178+
* Searches for BookmarkTreeNodes matching the given query. Queries specified with an object
179+
produce BookmarkTreeNodes matching all specified properties.
160180
*/
161181
fun search(query: Query): Promise<Array<BookmarkTreeNode>>
162182

163183
/**
164-
* Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.
184+
* Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it
185+
will be a folder.
165186
*/
166187
fun create(bookmark: CreateDetails): Promise<BookmarkTreeNode>
167188

@@ -171,7 +192,9 @@ external class BookmarksNamespace {
171192
fun move(id: String, destination: Destination): Promise<BookmarkTreeNode>
172193

173194
/**
174-
* Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' and 'url' are supported.
195+
* Updates the properties of a bookmark or folder. Specify only the properties that you want to
196+
change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only
197+
'title' and 'url' are supported.
175198
*/
176199
fun update(id: String, changes: Changes): Promise<BookmarkTreeNode>
177200

declarations/src/main/kotlin/browserAction/browserAction.kt

Lines changed: 51 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ import tabs.Tab
66
import webextensions.Event
77

88
/**
9-
* Specifies to which tab or window the value should be set, or from which one it should be retrieved. If no tab nor window is specified, the global value is set or retrieved.
10-
* @param tabId When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited.
11-
* @param windowId When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited.
9+
* Specifies to which tab or window the value should be set, or from which one it should be
10+
retrieved. If no tab nor window is specified, the global value is set or retrieved.
11+
* @param tabId When setting a value, it will be specific to the specified tab, and will
12+
automatically reset when the tab navigates. When getting, specifies the tab to get the value
13+
from; if there is no tab-specific value, the window one will be inherited.
14+
* @param windowId When setting a value, it will be specific to the specified window. When getting,
15+
specifies the window to get the value from; if there is no window-specific value, the global
16+
one will be inherited.
1217
*/
1318
class Details(
1419
var tabId: Int? = null,
@@ -18,7 +23,8 @@ class Details(
1823
typealias ColorArray = Array<Int>
1924

2025
/**
21-
* Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element).
26+
* Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code>
27+
element).
2228
*/
2329
@Suppress("NOTHING_TO_INLINE", "UnsafeCastFromDynamic")
2430
class ImageDataType() {
@@ -29,7 +35,9 @@ class ImageDataType() {
2935
}
3036

3137
/**
32-
* An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <code>[255, 0, 0, 255]</code>. Can also be a string with a CSS value, with opaque red being <code>#FF0000</code> or <code>#F00</code>. */
38+
* An array of four integers in the range [0,255] that make up the RGBA color of the badge. For
39+
example, opaque red is <code>[255, 0, 0, 255]</code>. Can also be a string with a CSS value,
40+
with opaque red being <code>#FF0000</code> or <code>#F00</code>. */
3341
typealias ColorValue = Any
3442

3543
/**
@@ -52,7 +60,12 @@ class ImageData() {
5260
}
5361

5462
/**
55-
* Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}' */
63+
* Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If
64+
the icon is specified as a dictionary, the actual image to be used is chosen depending on
65+
screen's pixel density. If the number of image pixels that fit into one screen space unit
66+
equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected.
67+
Initially only scales 1 and 2 will be supported. At least one image must be specified. Note
68+
that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}' */
5669
typealias ImageData2 = Any
5770

5871
@Suppress("NOTHING_TO_INLINE", "UnsafeCastFromDynamic")
@@ -64,12 +77,30 @@ class Path() {
6477
}
6578

6679
/**
67-
* Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' */
80+
* Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be
81+
set. If the icon is specified as a dictionary, the actual image to be used is chosen
82+
depending on screen's pixel density. If the number of image pixels that fit into one screen
83+
space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be
84+
selected. Initially only scales 1 and 2 will be supported. At least one image must be
85+
specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'
86+
*/
6887
typealias Path2 = Any
6988

7089
/**
71-
* @param imageData Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'
72-
* @param path Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'
90+
* @param imageData Either an ImageData object or a dictionary {size -> ImageData} representing icon
91+
to be set. If the icon is specified as a dictionary, the actual image to be used is chosen
92+
depending on screen's pixel density. If the number of image pixels that fit into one screen
93+
space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be
94+
selected. Initially only scales 1 and 2 will be supported. At least one image must be
95+
specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19':
96+
foo}'
97+
* @param path Either a relative image path or a dictionary {size -> relative image path} pointing
98+
to icon to be set. If the icon is specified as a dictionary, the actual image to be used is
99+
chosen depending on screen's pixel density. If the number of image pixels that fit into one
100+
screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19
101+
will be selected. Initially only scales 1 and 2 will be supported. At least one image must
102+
be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19':
103+
foo}'
73104
*/
74105
class Details3(
75106
var imageData: ImageData2? = null,
@@ -81,7 +112,8 @@ class Details3(
81112
typealias Popup = Any
82113

83114
/**
84-
* @param popup The html file to show in a popup. If set to the empty string (''), no popup is shown.
115+
* @param popup The html file to show in a popup. If set to the empty string (''), no popup is
116+
shown.
85117
*/
86118
class Details4(
87119
var popup: Popup
@@ -104,7 +136,8 @@ class Details7(var color: ColorValue)
104136

105137
external class BrowserActionNamespace {
106138
/**
107-
* Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.
139+
* Fired when a browser action icon is clicked. This event will not fire if the browser action
140+
has a popup.
108141
*
109142
* @param tab null */
110143
val onClicked: Event<(tab: Tab) -> Unit>
@@ -120,12 +153,15 @@ external class BrowserActionNamespace {
120153
fun getTitle(details: Details): Promise<String>
121154

122155
/**
123-
* Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.
156+
* Sets the icon for the browser action. The icon can be specified either as the path to an
157+
image file or as the pixel data from a canvas element, or as dictionary of either one of
158+
those. Either the <b>path</b> or the <b>imageData</b> property must be specified.
124159
*/
125160
fun setIcon(details: Details3): Promise<Any>
126161

127162
/**
128-
* Sets the html document to be opened as a popup when the user clicks on the browser action's icon.
163+
* Sets the html document to be opened as a popup when the user clicks on the browser action's
164+
icon.
129165
*/
130166
fun setPopup(details: Details4): Promise<Any>
131167

@@ -140,7 +176,8 @@ external class BrowserActionNamespace {
140176
fun setBadgeText(details: Details5): Promise<Any>
141177

142178
/**
143-
* Gets the badge text of the browser action. If no tab nor window is specified is specified, the global badge text is returned.
179+
* Gets the badge text of the browser action. If no tab nor window is specified is specified,
180+
the global badge text is returned.
144181
*/
145182
fun getBadgeText(details: Details): Promise<String>
146183

0 commit comments

Comments
 (0)