@scm-js/plugin-api 1.39.0 → 1.40.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 +16 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3324,7 +3324,12 @@ export interface TriggerClaimRange {
|
|
|
3324
3324
|
* in it — by a hash of the records, say — or null when the records are not there.
|
|
3325
3325
|
*/
|
|
3326
3326
|
export interface TriggerClaimSpec {
|
|
3327
|
-
/**
|
|
3327
|
+
/**
|
|
3328
|
+
* What generated the run, in words, as a sentence would use it: `"the trigger script"`.
|
|
3329
|
+
* `label`, `badge` and `openLabel` are given in English and shown through the plugin's
|
|
3330
|
+
* registered catalogues, so they follow a language change; `api.triggers.claims` hands
|
|
3331
|
+
* back the English.
|
|
3332
|
+
*/
|
|
3328
3333
|
label: string;
|
|
3329
3334
|
/** The word on the badge the trigger list shows on each row; the plugin's id by default. */
|
|
3330
3335
|
badge?: string;
|
|
@@ -4605,7 +4610,7 @@ export type OverlayAbove =
|
|
|
4605
4610
|
* it goes away with the plugin.
|
|
4606
4611
|
*/
|
|
4607
4612
|
export interface OverlaySpec {
|
|
4608
|
-
/** Shown in View ▸ Overlays and the Layers panel. Unique per plugin. */
|
|
4613
|
+
/** Shown in View ▸ Overlays and the Layers panel. Unique per plugin. In English, like a menu label: shown through the plugin's registered catalogues. */
|
|
4609
4614
|
name: string;
|
|
4610
4615
|
/** Start visible; true by default. What the user last set for this name wins for the session. */
|
|
4611
4616
|
visible?: boolean;
|
|
@@ -5105,6 +5110,11 @@ export type TopMenu = "File" | "Edit" | "View" | "Layer" | "Scenario" | "Trigger
|
|
|
5105
5110
|
*/
|
|
5106
5111
|
export type MenuPath = TopMenu | `${TopMenu}/${string}` | (string & {});
|
|
5107
5112
|
export interface MenuItemSpec {
|
|
5113
|
+
/**
|
|
5114
|
+
* In English, like the path's segments: it is the item's identity (another plugin's
|
|
5115
|
+
* `after` names it), and the menu shows it translated through the catalogues the plugin
|
|
5116
|
+
* registered with `i18n.register`, so it follows a language change.
|
|
5117
|
+
*/
|
|
5108
5118
|
label: string;
|
|
5109
5119
|
/** Display only — bind the key with `hotkeys.add`. */
|
|
5110
5120
|
shortcut?: string;
|
|
@@ -5166,6 +5176,10 @@ export interface ContextMenuContext {
|
|
|
5166
5176
|
markedArea: Rect | null;
|
|
5167
5177
|
}
|
|
5168
5178
|
export interface ContextItemSpec {
|
|
5179
|
+
/**
|
|
5180
|
+
* A fixed label is given in English and shown through the plugin's registered catalogues;
|
|
5181
|
+
* a function is called when the menu opens, so it translates with `i18n.t` itself.
|
|
5182
|
+
*/
|
|
5169
5183
|
label: string | ((ctx: ContextMenuContext) => string);
|
|
5170
5184
|
enabled?: (ctx: ContextMenuContext) => boolean;
|
|
5171
5185
|
visible?: (ctx: ContextMenuContext) => boolean;
|