astroceleste-engine 0.0.7 → 0.0.8

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.
@@ -45,6 +45,14 @@ export class Engine {
45
45
  readonly coverage: Float64Array | undefined;
46
46
  }
47
47
 
48
+ /**
49
+ * The Four Pillars of a birth (ISO 8601 UTC) at `longitude` (degrees east) where civil
50
+ * time was `utcOffsetMinutes` ahead of UTC, from its Chinese `calendar` (the chart's
51
+ * `chinese_calendar`). `options`: `{ solar_time?, zi_hour?, sex?, luck_pillars? }`, or
52
+ * `undefined` for the defaults. No kernel is needed.
53
+ */
54
+ export function bazi(calendar: any, birth: string, longitude: number, utcOffsetMinutes: number, options: any): any;
55
+
48
56
  /**
49
57
  * A computed chart's dignities (condition, sect, receptions) judged again under `scheme`
50
58
  * ("lilly" or "dorothean"). No kernel is needed.
@@ -93,6 +101,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
93
101
  export interface InitOutput {
94
102
  readonly memory: WebAssembly.Memory;
95
103
  readonly __wbg_engine_free: (a: number, b: number) => void;
104
+ readonly bazi: (a: any, b: number, c: number, d: number, e: number, f: any) => [number, number, number];
96
105
  readonly chartDignities: (a: any, b: number, c: number) => [number, number, number];
97
106
  readonly degreeQualities: (a: number) => [number, number, number];
98
107
  readonly degreeQualityTable: () => [number, number, number];
@@ -129,6 +129,28 @@ export class Engine {
129
129
  }
130
130
  if (Symbol.dispose) Engine.prototype[Symbol.dispose] = Engine.prototype.free;
131
131
 
132
+ /**
133
+ * The Four Pillars of a birth (ISO 8601 UTC) at `longitude` (degrees east) where civil
134
+ * time was `utcOffsetMinutes` ahead of UTC, from its Chinese `calendar` (the chart's
135
+ * `chinese_calendar`). `options`: `{ solar_time?, zi_hour?, sex?, luck_pillars? }`, or
136
+ * `undefined` for the defaults. No kernel is needed.
137
+ * @param {any} calendar
138
+ * @param {string} birth
139
+ * @param {number} longitude
140
+ * @param {number} utcOffsetMinutes
141
+ * @param {any} options
142
+ * @returns {any}
143
+ */
144
+ export function bazi(calendar, birth, longitude, utcOffsetMinutes, options) {
145
+ const ptr0 = passStringToWasm0(birth, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
146
+ const len0 = WASM_VECTOR_LEN;
147
+ const ret = wasm.bazi(calendar, ptr0, len0, longitude, utcOffsetMinutes, options);
148
+ if (ret[2]) {
149
+ throw takeFromExternrefTable0(ret[1]);
150
+ }
151
+ return takeFromExternrefTable0(ret[0]);
152
+ }
153
+
132
154
  /**
133
155
  * A computed chart's dignities (condition, sect, receptions) judged again under `scheme`
134
156
  * ("lilly" or "dorothean"). No kernel is needed.
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.7",
5
+ "version": "0.0.8",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",