@scm-js/plugin-api 1.62.0 → 1.64.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 +5 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1049,6 +1049,7 @@ export interface DoodadVerdict {
1049
1049
  /** Cell indices (row-major) whose ground fails the check, for the ghost to mark red. */
1050
1050
  bad: number[];
1051
1051
  }
1052
+ export type SymmetryMode = "none" | "h" | "v" | "hv" | "rot180" | "rot90" | "diag" | "adiag";
1052
1053
  export interface LocationStringChange {
1053
1054
  index: number;
1054
1055
  before: string | null;
@@ -2081,7 +2082,6 @@ export interface ChangeTilesetResult {
2081
2082
  spritesDropped: number;
2082
2083
  refilled: boolean;
2083
2084
  }
2084
- export type SymmetryMode = "none" | "h" | "v" | "hv" | "rot180" | "rot90" | "diag" | "adiag";
2085
2085
  export type StartLayout = "ring" | "corners";
2086
2086
  export interface StartPlacementResult {
2087
2087
  changes: UnitChange[];
@@ -2687,7 +2687,8 @@ export interface BuildStepSpec {
2687
2687
  * Build. Return an archive (or a bare scenario) — the editor takes the scenario and any
2688
2688
  * *new* members from it and lays the final file out with the user's save options; the
2689
2689
  * map's own members are written as they were. Throw an `Error` whose message says what
2690
- * is wrong in the user's terms.
2690
+ * is wrong in the user's terms. A plain `Error` is logged as a warning, a refusal the step
2691
+ * meant; anything else thrown (a `TypeError`, a class of your own) is logged as an error.
2691
2692
  */
2692
2693
  run(input: BuildStepInput): Promise<Uint8Array>;
2693
2694
  }
@@ -2707,7 +2708,8 @@ export interface BeforeBuildSpec {
2707
2708
  /**
2708
2709
  * May be asynchronous and may write to the document. A throw does not stop the save:
2709
2710
  * the map is written as it stands and a notice shows the error's message, so word it
2710
- * for the user. Inside it `document.export()` answers the map as it stands, without
2711
+ * for the user. As with a build step, a plain `Error` is logged as a warning and anything
2712
+ * else as an error. Inside it `document.export()` answers the map as it stands, without
2711
2713
  * running anything.
2712
2714
  */
2713
2715
  run(ctx: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scm-js/plugin-api",
3
- "version": "1.62.0",
3
+ "version": "1.64.0",
4
4
  "description": "Type declarations for the scmJS plugin API",
5
5
  "license": "MIT",
6
6
  "types": "index.d.ts",