astroceleste-engine 0.0.3 → 0.0.4

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.
@@ -16,6 +16,16 @@ export class Engine {
16
16
  * The chart of a moment and place.
17
17
  */
18
18
  chart(request: any): any;
19
+ /**
20
+ * A chart with its electional assessment under `election_data`. `criteria` may be
21
+ * `undefined` for the defaults.
22
+ */
23
+ election(request: any, criteria: any): any;
24
+ /**
25
+ * The best electional windows from `request.utc` to `end` (ISO 8601 UTC, at most 92
26
+ * days later) at the request's place.
27
+ */
28
+ elections(request: any, end: string, criteria: any): any;
19
29
  /**
20
30
  * A chart with its horary analysis under `horary_data`.
21
31
  */
@@ -65,6 +75,8 @@ export interface InitOutput {
65
75
  readonly engine_addKernel: (a: number, b: number, c: number, d: number, e: number) => [number, number];
66
76
  readonly engine_chart: (a: number, b: any) => [number, number, number];
67
77
  readonly engine_coverage: (a: number) => [number, number];
78
+ readonly engine_election: (a: number, b: any, c: any) => [number, number, number];
79
+ readonly engine_elections: (a: number, b: any, c: number, d: number, e: any) => [number, number, number];
68
80
  readonly engine_horary: (a: number, b: any) => [number, number, number];
69
81
  readonly engine_new: () => number;
70
82
  readonly engine_supports: (a: number, b: number) => number;
@@ -55,6 +55,37 @@ export class Engine {
55
55
  }
56
56
  return v1;
57
57
  }
58
+ /**
59
+ * A chart with its electional assessment under `election_data`. `criteria` may be
60
+ * `undefined` for the defaults.
61
+ * @param {any} request
62
+ * @param {any} criteria
63
+ * @returns {any}
64
+ */
65
+ election(request, criteria) {
66
+ const ret = wasm.engine_election(this.__wbg_ptr, request, criteria);
67
+ if (ret[2]) {
68
+ throw takeFromExternrefTable0(ret[1]);
69
+ }
70
+ return takeFromExternrefTable0(ret[0]);
71
+ }
72
+ /**
73
+ * The best electional windows from `request.utc` to `end` (ISO 8601 UTC, at most 92
74
+ * days later) at the request's place.
75
+ * @param {any} request
76
+ * @param {string} end
77
+ * @param {any} criteria
78
+ * @returns {any}
79
+ */
80
+ elections(request, end, criteria) {
81
+ const ptr0 = passStringToWasm0(end, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
82
+ const len0 = WASM_VECTOR_LEN;
83
+ const ret = wasm.engine_elections(this.__wbg_ptr, request, ptr0, len0, criteria);
84
+ if (ret[2]) {
85
+ throw takeFromExternrefTable0(ret[1]);
86
+ }
87
+ return takeFromExternrefTable0(ret[0]);
88
+ }
58
89
  /**
59
90
  * A chart with its horary analysis under `horary_data`.
60
91
  * @param {any} request
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "astroceleste-engine",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for astroceleste-engine",
5
- "version": "0.0.3",
5
+ "version": "0.0.4",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",