@ohtaman/washi 0.1.0 → 0.1.1
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/README.ja.md +42 -2
- package/README.md +42 -2
- package/README.zh-CN.md +42 -2
- package/dist/lib/assets/{highs-worker-D57nd9KC.js → highs-worker-DeDWU6KI.js} +1 -1
- package/dist/lib/demo/highs.wasm +0 -0
- package/dist/lib/solvers/z3.js +1 -1
- package/dist/lib/washi-logo.png +0 -0
- package/dist/lib/washi-logo.svg +70 -0
- package/dist/lib/washi.js +78 -78
- package/dist/lib/{z3-C5DfllfD.js → z3-C8g-PtmP.js} +79 -59
- package/dist/types/highs-loader.d.ts +17 -1
- package/dist/types/highs-loader.d.ts.map +1 -1
- package/dist/types/highs-worker-client.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -89,23 +89,43 @@ var u = 0, d = class {
|
|
|
89
89
|
let e = this.sense === "==" ? "=" : this.sense;
|
|
90
90
|
return `${this.name}: ${this.lhs.toString()} ${e} ${this.rhs}`;
|
|
91
91
|
}
|
|
92
|
-
}, f =
|
|
93
|
-
function
|
|
94
|
-
|
|
92
|
+
}, f = "https://cdn.jsdelivr.net/npm/highs@1.15.3/build/highs.wasm", p = null, m = null;
|
|
93
|
+
function h(e) {
|
|
94
|
+
m = e, p = null;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
return
|
|
96
|
+
function g() {
|
|
97
|
+
return m;
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
return
|
|
99
|
+
function _(e) {
|
|
100
|
+
return e.length >= 4 && e[0] === 0 && e[1] === 97 && e[2] === 115 && e[3] === 109;
|
|
101
|
+
}
|
|
102
|
+
async function v(e) {
|
|
103
|
+
try {
|
|
104
|
+
let t = await fetch(e, { headers: { Range: "bytes=0-3" } });
|
|
105
|
+
if (!t.ok || (t.headers.get("content-type") || "").includes("text/html")) return !1;
|
|
106
|
+
if (!t.body) return !0;
|
|
107
|
+
let n = t.body.getReader(), { value: r, done: i } = await n.read();
|
|
108
|
+
return await n.cancel(), i || !r || r.length < 4 ? !1 : _(r);
|
|
109
|
+
} catch {
|
|
110
|
+
return !1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async function y(e) {
|
|
114
|
+
if (e) return e;
|
|
115
|
+
if (m) return m;
|
|
116
|
+
let t = typeof window < "u" ? new URL("/highs.wasm", window.location.origin).href : typeof self < "u" && self.location ? new URL("highs.wasm", self.location.href).href : "/highs.wasm";
|
|
117
|
+
return await v(t) ? t : (typeof console < "u" && console.info && console.info(`[WaSHI] Local highs.wasm not found or invalid at "${t}". Automatically falling back to official CDN: ${f}`), f);
|
|
118
|
+
}
|
|
119
|
+
async function b(e = {}) {
|
|
120
|
+
return p || (p = (async () => {
|
|
101
121
|
let t = await import("highs"), n = t.default || t;
|
|
102
122
|
if (typeof process < "u" && process.versions && process.versions.node && process.type !== "renderer") return await n();
|
|
103
|
-
let r =
|
|
104
|
-
return await n({ locateFile: (e) => e.endsWith(".wasm") ?
|
|
105
|
-
})(),
|
|
123
|
+
let r = await y(e.wasmUrl);
|
|
124
|
+
return await n({ locateFile: (e) => e.endsWith(".wasm") ? r : e });
|
|
125
|
+
})(), p);
|
|
106
126
|
}
|
|
107
|
-
async function
|
|
108
|
-
let n = await
|
|
127
|
+
async function x(e, t = {}) {
|
|
128
|
+
let n = await b(t), r = performance.now(), i = { output_flag: t.outputFlag ?? !1 };
|
|
109
129
|
return t.timeLimit !== void 0 && (i.time_limit = t.timeLimit), t.presolve !== void 0 && (i.presolve = t.presolve), t.solver !== void 0 && (i.solver = t.solver), t.relGap !== void 0 && (i.mip_rel_gap = t.relGap), t.absGap !== void 0 && (i.mip_abs_gap = t.absGap), {
|
|
110
130
|
result: n.solve(e, i),
|
|
111
131
|
runTime: (performance.now() - r) / 1e3
|
|
@@ -113,37 +133,37 @@ async function _(e, t = {}) {
|
|
|
113
133
|
}
|
|
114
134
|
//#endregion
|
|
115
135
|
//#region src/highs-worker-client.ts
|
|
116
|
-
var
|
|
117
|
-
function
|
|
136
|
+
var S = null, C = 0, w = /* @__PURE__ */ new Map();
|
|
137
|
+
function T() {
|
|
118
138
|
if (typeof window > "u" || typeof Worker > "u") return null;
|
|
119
|
-
if (!
|
|
120
|
-
|
|
139
|
+
if (!S) try {
|
|
140
|
+
S = new Worker(new URL(
|
|
121
141
|
/* @vite-ignore */
|
|
122
|
-
"/assets/highs-worker-
|
|
142
|
+
"/assets/highs-worker-DeDWU6KI.js",
|
|
123
143
|
"" + import.meta.url
|
|
124
|
-
), { type: "module" }),
|
|
125
|
-
let { type: t, id: n, result: r, runTime: i, error: a } = e.data, o =
|
|
126
|
-
o && (
|
|
144
|
+
), { type: "module" }), S.onmessage = (e) => {
|
|
145
|
+
let { type: t, id: n, result: r, runTime: i, error: a } = e.data, o = w.get(n);
|
|
146
|
+
o && (w.delete(n), t === "SOLVE_SUCCESS" ? o.resolve({
|
|
127
147
|
result: r,
|
|
128
148
|
runTime: i
|
|
129
149
|
}) : o.reject(Error(a || "Worker solve failed")));
|
|
130
|
-
},
|
|
150
|
+
}, S.onerror = (e) => {
|
|
131
151
|
console.error("HiGHS Web Worker error:", e);
|
|
132
152
|
};
|
|
133
153
|
} catch (e) {
|
|
134
|
-
console.warn("Could not instantiate Web Worker, falling back to main thread:", e),
|
|
154
|
+
console.warn("Could not instantiate Web Worker, falling back to main thread:", e), S = null;
|
|
135
155
|
}
|
|
136
|
-
return
|
|
156
|
+
return S;
|
|
137
157
|
}
|
|
138
|
-
async function
|
|
139
|
-
let n = t.useWorker ?? typeof window < "u" ?
|
|
140
|
-
if (!n) return
|
|
141
|
-
let r = t.wasmUrl
|
|
158
|
+
async function E(e, t = {}) {
|
|
159
|
+
let n = t.useWorker ?? typeof window < "u" ? T() : null;
|
|
160
|
+
if (!n) return x(e, t);
|
|
161
|
+
let r = await y(t.wasmUrl), i = {
|
|
142
162
|
...t,
|
|
143
|
-
|
|
144
|
-
}, a = `req_${++
|
|
163
|
+
wasmUrl: r
|
|
164
|
+
}, a = `req_${++C}`;
|
|
145
165
|
return new Promise((t, r) => {
|
|
146
|
-
|
|
166
|
+
w.set(a, {
|
|
147
167
|
resolve: t,
|
|
148
168
|
reject: r
|
|
149
169
|
}), n.postMessage({
|
|
@@ -156,7 +176,7 @@ async function S(e, t = {}) {
|
|
|
156
176
|
}
|
|
157
177
|
//#endregion
|
|
158
178
|
//#region src/modeler/solvers/highs.ts
|
|
159
|
-
var
|
|
179
|
+
var D = class e {
|
|
160
180
|
static capabilities = {
|
|
161
181
|
supportsMIP: !0,
|
|
162
182
|
supportsQP: !0
|
|
@@ -172,7 +192,7 @@ var C = class e {
|
|
|
172
192
|
let r = {
|
|
173
193
|
...this.options,
|
|
174
194
|
...n
|
|
175
|
-
}, { lpString: i, nameToVar: a, nameToConstraint: o } = t, { result: s, runTime: c } = await
|
|
195
|
+
}, { lpString: i, nameToVar: a, nameToConstraint: o } = t, { result: s, runTime: c } = await E(i, r), l = s.Status || "Unknown", u;
|
|
176
196
|
u = l.includes("Optimal") ? "Optimal" : l.includes("Infeasible") ? "Infeasible" : l.includes("Unbounded") ? "Unbounded" : l.includes("TimeLimit") || l.includes("Time limit") ? "TimeLimit" : l.includes("IterationLimit") ? "IterationLimit" : "Optimal";
|
|
177
197
|
let d = s.ObjectiveValue, f = typeof d == "number" ? d + e.objective.constant : null, p = {}, m = {}, h = {}, g = {};
|
|
178
198
|
if (s.Columns) for (let [e, t] of Object.entries(s.Columns)) {
|
|
@@ -203,7 +223,7 @@ var C = class e {
|
|
|
203
223
|
raw: s
|
|
204
224
|
};
|
|
205
225
|
}
|
|
206
|
-
},
|
|
226
|
+
}, O = D, k = class {
|
|
207
227
|
name;
|
|
208
228
|
capabilities;
|
|
209
229
|
options;
|
|
@@ -229,44 +249,44 @@ var C = class e {
|
|
|
229
249
|
raw: { mock: !0 }
|
|
230
250
|
};
|
|
231
251
|
}
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
var
|
|
235
|
-
function
|
|
236
|
-
|
|
252
|
+
}, A = /* @__PURE__ */ new Map();
|
|
253
|
+
A.set("highs", (e) => new D(e)), A.set("glpk", (t) => new e(t)), A.set("mock", (e) => new k(e));
|
|
254
|
+
var j = (e) => new D(e);
|
|
255
|
+
function M(e, t) {
|
|
256
|
+
A.set(e.toLowerCase(), t);
|
|
237
257
|
}
|
|
238
|
-
function
|
|
258
|
+
function N(e) {
|
|
239
259
|
if (typeof e == "string") {
|
|
240
|
-
let t =
|
|
260
|
+
let t = A.get(e.toLowerCase());
|
|
241
261
|
if (!t) throw Error(`Solver '${e}' is not registered.`);
|
|
242
|
-
|
|
243
|
-
} else
|
|
262
|
+
j = t;
|
|
263
|
+
} else j = typeof e == "function" ? e : () => e;
|
|
244
264
|
}
|
|
245
|
-
function
|
|
246
|
-
if (!e) return
|
|
265
|
+
function P(e, t) {
|
|
266
|
+
if (!e) return j(t);
|
|
247
267
|
if (typeof e == "string") {
|
|
248
|
-
let n =
|
|
249
|
-
if (!n) throw Error(`Solver '${e}' not found. Available solvers: ${
|
|
268
|
+
let n = A.get(e.toLowerCase());
|
|
269
|
+
if (!n) throw Error(`Solver '${e}' not found. Available solvers: ${F().join(", ")}`);
|
|
250
270
|
return n(t);
|
|
251
271
|
}
|
|
252
272
|
return e;
|
|
253
273
|
}
|
|
254
|
-
function
|
|
255
|
-
return Array.from(
|
|
274
|
+
function F() {
|
|
275
|
+
return Array.from(A.keys());
|
|
256
276
|
}
|
|
257
277
|
//#endregion
|
|
258
278
|
//#region src/modeler/solvers/z3.ts
|
|
259
|
-
var
|
|
260
|
-
async function
|
|
261
|
-
return
|
|
279
|
+
var I = null;
|
|
280
|
+
async function L() {
|
|
281
|
+
return I ||= (async () => {
|
|
262
282
|
try {
|
|
263
283
|
return await (await import("z3-solver")).init();
|
|
264
284
|
} catch (e) {
|
|
265
285
|
throw Error(`Failed to load z3-solver. Ensure it is installed: npm install z3-solver. Error: ${e instanceof Error ? e.message : String(e)}`);
|
|
266
286
|
}
|
|
267
|
-
})(),
|
|
287
|
+
})(), I;
|
|
268
288
|
}
|
|
269
|
-
var
|
|
289
|
+
var R = class {
|
|
270
290
|
name = "z3";
|
|
271
291
|
capabilities = {
|
|
272
292
|
supportsMIP: !0,
|
|
@@ -362,7 +382,7 @@ var P = class {
|
|
|
362
382
|
async check(e, t = {}) {
|
|
363
383
|
if (typeof window < "u" && window.document !== void 0) return this.fallbackCheck(e);
|
|
364
384
|
try {
|
|
365
|
-
let { Context: t } = await
|
|
385
|
+
let { Context: t } = await L(), n = new t(`check_${Date.now()}_${Math.random().toString(36).substring(2, 7)}`), r = new n.Solver(), i = this.createContextTranslator(n), a = e.variables || e.vars || [], o = e.boolVars || [], s = e.constraints || [], c = e.logicalConstraints || [];
|
|
366
386
|
for (let e of a) {
|
|
367
387
|
let t = i.getVarAst(e);
|
|
368
388
|
e.lb !== -Infinity && r.add(t.ge(e.lb)), e.ub !== Infinity && r.add(t.le(e.ub)), (e.type === "Binary" || e.type === "BINARY") && (r.add(t.ge(0)), r.add(t.le(1)));
|
|
@@ -511,7 +531,7 @@ var P = class {
|
|
|
511
531
|
values: r
|
|
512
532
|
};
|
|
513
533
|
}
|
|
514
|
-
let { Context: r } = await
|
|
534
|
+
let { Context: r } = await L(), i = new r(`opt_${Date.now()}_${Math.random().toString(36).substring(2, 7)}`), a = new i.Optimize(), o = this.createContextTranslator(i), s = e.variables || e.vars || [], c = e.boolVars || [], l = e.constraints || [], u = e.logicalConstraints || [];
|
|
515
535
|
for (let e of s) {
|
|
516
536
|
let t = o.getVarAst(e);
|
|
517
537
|
e.lb !== -Infinity && a.add(t.ge(e.lb)), e.ub !== Infinity && a.add(t.le(e.ub)), (e.type === "Binary" || e.type === "BINARY") && (a.add(t.ge(0)), a.add(t.le(1)));
|
|
@@ -554,9 +574,9 @@ var P = class {
|
|
|
554
574
|
};
|
|
555
575
|
}
|
|
556
576
|
};
|
|
557
|
-
function
|
|
558
|
-
|
|
577
|
+
function z() {
|
|
578
|
+
M("z3", () => new R());
|
|
559
579
|
}
|
|
560
|
-
|
|
580
|
+
z();
|
|
561
581
|
//#endregion
|
|
562
|
-
export { l as S,
|
|
582
|
+
export { c as C, l as E, a as S, o as T, x as _, M as a, i as b, O as c, b as d, g as f, h as g, y as h, F as i, D as l, v as m, z as n, N as o, _ as p, P as r, k as s, R as t, f as u, d as v, s as w, r as x, n as y };
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import type { SolveOptions } from "./modeler/types.js";
|
|
2
|
+
export declare const OFFICIAL_HIGHS_CDN_WASM_URL = "https://cdn.jsdelivr.net/npm/highs@1.15.3/build/highs.wasm";
|
|
2
3
|
type HighsInstance = any;
|
|
3
|
-
export declare function setHighsWasmUrl(url: string): void;
|
|
4
|
+
export declare function setHighsWasmUrl(url: string | null): void;
|
|
4
5
|
export declare function getHighsWasmUrl(): string | null;
|
|
6
|
+
/**
|
|
7
|
+
* Check if the given byte array begins with the standard WebAssembly magic header (\0asm).
|
|
8
|
+
*/
|
|
9
|
+
export declare function isValidWasmHeader(bytes: Uint8Array): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Probe a URL to determine whether it serves a valid WebAssembly binary
|
|
12
|
+
* without downloading the entire file. Cancels the stream after checking the first chunk.
|
|
13
|
+
*/
|
|
14
|
+
export declare function probeWasmUrl(url: string): Promise<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the HiGHS WASM URL for browser / worker environments.
|
|
17
|
+
* - Explicit URLs (customWasmUrl or options.wasmUrl) are strictly used (no CDN fallback).
|
|
18
|
+
* - Default resolution probes the local origin; if missing or returning HTML, falls back to the official CDN.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveBrowserWasmUrl(explicitUrl?: string): Promise<string>;
|
|
5
21
|
/**
|
|
6
22
|
* Get or initialize the HiGHS WebAssembly solver instance.
|
|
7
23
|
* Works seamlessly in Node.js, Web Browsers, and Web Workers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highs-loader.d.ts","sourceRoot":"","sources":["../../src/highs-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,KAAK,aAAa,GAAG,GAAG,CAAC;AAKzB,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"highs-loader.d.ts","sourceRoot":"","sources":["../../src/highs-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,eAAO,MAAM,2BAA2B,+DACsB,CAAC;AAE/D,KAAK,aAAa,GAAG,GAAG,CAAC;AAKzB,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,QAIjD;AAED,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAQ5D;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAgChE;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BjF;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,CAoCjF;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA6B3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highs-worker-client.d.ts","sourceRoot":"","sources":["../../src/highs-worker-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"highs-worker-client.d.ts","sourceRoot":"","sources":["../../src/highs-worker-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;AAgD3B;;GAEG;AACH,wBAAsB,OAAO,CAC3B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,YAAY,GAAG;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GACnD,OAAO,CAAC;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAyB3D"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export type { VarType, OptimizationSense, ComparisonSense, SolverStatus, SolveOp
|
|
|
9
9
|
export { LpProblem, LpVariable, LpMinimize, LpMaximize, LpContinuous, LpInteger, LpBinary, LpStatus, value, } from "./modeler/pulp-compat.js";
|
|
10
10
|
export { MipModel, MINIMIZE, MAXIMIZE, CONTINUOUS, INTEGER, BINARY, maximize, minimize, } from "./modeler/mip-compat.js";
|
|
11
11
|
export { type Solver, type SolverOptions, type SolverResult, type SolverCheckResult, type SolverCapabilities, HighsSolver, HiGHS, GLPKSolver, Z3Solver, registerZ3Solver, MockSolver, registerSolver, getSolver, setDefaultSolver, listAvailableSolvers, } from "./modeler/solvers/index.js";
|
|
12
|
-
export { getHighs, solveLpWithHighs, setHighsWasmUrl, getHighsWasmUrl } from "./highs-loader.js";
|
|
12
|
+
export { getHighs, solveLpWithHighs, setHighsWasmUrl, getHighsWasmUrl, OFFICIAL_HIGHS_CDN_WASM_URL, isValidWasmHeader, probeWasmUrl, resolveBrowserWasmUrl, } from "./highs-loader.js";
|
|
13
13
|
export { getGlpk } from "./glpk-loader.js";
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,KAAK,EACL,KAAK,YAAY,EACjB,GAAG,EACH,KAAK,UAAU,EACf,OAAO,EACP,GAAG,EACH,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,KAAK,QAAQ,EACb,UAAU,EACV,OAAO,EACP,QAAQ,EACR,MAAM,EACN,GAAG,EACH,EAAE,EACF,GAAG,EACH,OAAO,EACP,GAAG,EACH,SAAS,EACT,eAAe,EACf,IAAI,EACJ,CAAC,EACD,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,KAAK,GACN,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,GACT,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,EACL,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,KAAK,EACL,KAAK,YAAY,EACjB,GAAG,EACH,KAAK,UAAU,EACf,OAAO,EACP,GAAG,EACH,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,KAAK,QAAQ,EACb,UAAU,EACV,OAAO,EACP,QAAQ,EACR,MAAM,EACN,GAAG,EACH,EAAE,EACF,GAAG,EACH,OAAO,EACP,GAAG,EACH,SAAS,EACT,eAAe,EACf,IAAI,EACJ,CAAC,EACD,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,KAAK,GACN,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,GACT,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,EACL,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohtaman/washi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "WaSHI: WebAssembly Algebraic System for Hybrid & Integer modeling (LP, MIP, QP, SMT)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/lib/washi.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"import": "./dist/lib/washi.js",
|
|
13
13
|
"default": "./dist/lib/washi.js"
|
|
14
14
|
},
|
|
15
|
+
"./highs.wasm": "./dist/lib/highs.wasm",
|
|
15
16
|
"./solvers/z3": {
|
|
16
17
|
"types": "./dist/types/modeler/solvers/z3.d.ts",
|
|
17
18
|
"import": "./dist/lib/solvers/z3.js",
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"build": "npm run build:types && npm run build:lib && npm run build:demo",
|
|
41
42
|
"preview": "vite preview",
|
|
42
43
|
"test": "vitest run",
|
|
43
|
-
"test:e2e": "vitest run test/e2e.test.ts",
|
|
44
|
+
"test:e2e": "RUN_E2E=1 vitest run test/e2e.test.ts",
|
|
44
45
|
"prepublishOnly": "npm run build:types && npm run build:lib"
|
|
45
46
|
},
|
|
46
47
|
"keywords": [
|