@scm-js/plugin-api 1.32.0 → 1.34.0
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.
- package/index.d.ts +27 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2412,8 +2412,8 @@ export interface ResizeDocumentOptions {
|
|
|
2412
2412
|
/**
|
|
2413
2413
|
* Where a map opened or created goes. `"new"` opens it beside the open one, which stays
|
|
2414
2414
|
* open behind it; `"current"` opens it in place of the open one, through the unsaved-changes
|
|
2415
|
-
* gate. Omitted, the editor follows its preference (several maps at once, on by default)
|
|
2416
|
-
*
|
|
2415
|
+
* gate. Omitted, the editor follows its preference (several maps at once, on by default).
|
|
2416
|
+
* Either way the untouched blank map the editor started on is replaced, not kept.
|
|
2417
2417
|
*/
|
|
2418
2418
|
export type OpenInto = "new" | "current";
|
|
2419
2419
|
export interface OpenDocumentOptions {
|
|
@@ -4215,6 +4215,24 @@ export interface StatusItemHandle {
|
|
|
4215
4215
|
remove(): void;
|
|
4216
4216
|
isShown(): boolean;
|
|
4217
4217
|
}
|
|
4218
|
+
/** A button on the map itself (`ui.mapButton`), in the row at its bottom-right corner. */
|
|
4219
|
+
export interface MapButtonSpec {
|
|
4220
|
+
/** A word or two; the button is as wide as it. */
|
|
4221
|
+
label: string;
|
|
4222
|
+
/** The tooltip. */
|
|
4223
|
+
title?: string;
|
|
4224
|
+
/** A count or a short mark beside the label (unread messages); nothing when absent, null, 0 or "". */
|
|
4225
|
+
badge?: number | string | null;
|
|
4226
|
+
/** Drawn pressed: what the button opens is open. */
|
|
4227
|
+
active?: boolean;
|
|
4228
|
+
onClick: () => void;
|
|
4229
|
+
}
|
|
4230
|
+
export interface MapButtonHandle {
|
|
4231
|
+
/** Change any of the fields; the button redraws. */
|
|
4232
|
+
set(patch: Partial<MapButtonSpec>): void;
|
|
4233
|
+
remove(): void;
|
|
4234
|
+
isShown(): boolean;
|
|
4235
|
+
}
|
|
4218
4236
|
/**
|
|
4219
4237
|
* The dialogs a plugin may add to (`ui.dialogSlot`), and the fields each one exposes to
|
|
4220
4238
|
* the slot. A field is the dialog's *working copy* — what the person sees in the form,
|
|
@@ -4482,6 +4500,13 @@ export interface UiApi {
|
|
|
4482
4500
|
* leaves with `remove()` or the plugin.
|
|
4483
4501
|
*/
|
|
4484
4502
|
statusItem(spec: StatusItemSpec): StatusItemHandle;
|
|
4503
|
+
/**
|
|
4504
|
+
* A button on the map, in the row at its bottom-right corner beside the tileset, size
|
|
4505
|
+
* and zoom — for something that belongs to the map being worked on, such as a shared
|
|
4506
|
+
* map's chat. Keep it to what matters while the map is in view; everything else goes
|
|
4507
|
+
* in a menu or the status bar. It leaves with `remove()` or the plugin.
|
|
4508
|
+
*/
|
|
4509
|
+
mapButton(spec: MapButtonSpec): MapButtonHandle;
|
|
4485
4510
|
/**
|
|
4486
4511
|
* Add to a built-in dialog. `mount` runs in a row at the left of the dialog's footer each
|
|
4487
4512
|
* time that dialog opens, with the dialog's working-copy fields to read and fill
|