@scm-js/plugin-api 1.68.0 → 1.70.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.
Files changed (2) hide show
  1. package/index.d.ts +19 -4
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1395,6 +1395,20 @@ export interface Toast {
1395
1395
  label: string;
1396
1396
  run: () => void;
1397
1397
  };
1398
+ /**
1399
+ * Buttons in a row under the text, for a notice that offers more than one way on — the
1400
+ * terrain notice's data set to switch to, folder to draw from and Game Data…. Pressing
1401
+ * one dismisses the toast unless it says `keep` (a button that opens a picker the person
1402
+ * may back out of).
1403
+ */
1404
+ actions?: ToastAction[];
1405
+ }
1406
+ /** One of a toast's `actions`. */
1407
+ export interface ToastAction {
1408
+ label: string;
1409
+ run: () => void;
1410
+ /** Leave the toast up when pressed. */
1411
+ keep?: boolean;
1398
1412
  }
1399
1413
  /**
1400
1414
  * The colour and layout codes StarCraft reads out of a string, and what a string looks
@@ -4348,9 +4362,10 @@ export interface GameDataSource {
4348
4362
  /** Set when the desktop app extracted the files from a StarCraft installation. */
4349
4363
  desktop: boolean;
4350
4364
  /**
4351
- * The data set's hash, where one is known: what a map saved with it records. Sixteen hex
4352
- * digits over the files of the set that differ from the game's, by the rule `scmjs mod
4353
- * play` hands the play page (`docs/cli.md`, "Playing a mod on the play page").
4365
+ * The data set's hash, where one is known: what a map saved with it records. The mod's
4366
+ * hash, as the play page and `scmjs mod info` work it out (`docs/mods.md`, "The mod's
4367
+ * hash"): sixteen hex digits over every file the set provides — its game files, the
4368
+ * plugins it carries and its FireGraft project — never compared with anyone's copy.
4354
4369
  */
4355
4370
  hash?: string;
4356
4371
  /**
@@ -4523,7 +4538,7 @@ export interface GameDataApi {
4523
4538
  * @example
4524
4539
  * // Draw from the edit at once, and name it when its digest is ready.
4525
4540
  * api.gameData.reload();
4526
- * api.gameData.rehash(await digestOfChangedFiles());
4541
+ * api.gameData.rehash(await modHashOfTheFiles());
4527
4542
  */
4528
4543
  rehash(hash: string | null): GameDataSource | null;
4529
4544
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scm-js/plugin-api",
3
- "version": "1.68.0",
3
+ "version": "1.70.0",
4
4
  "description": "Type declarations for the scmJS plugin API",
5
5
  "license": "MIT",
6
6
  "types": "index.d.ts",