@ohtaman/washi 0.8.1 → 0.9.0-rc.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.
Files changed (44) hide show
  1. package/README.md +16 -13
  2. package/dist/browser/solvers/{highs-__vite-browser-external-Dn-83hnF.js → highs-__vite-browser-external-xcxOpLMD.js} +1 -1
  3. package/dist/browser/solvers/{highs-browser-runtime-0Bgq5ksG.js → highs-browser-runtime-ccRmE4qj.js} +1 -1
  4. package/dist/browser/solvers/highs-inline.js +51 -0
  5. package/dist/{lib/solvers/loader-CDpPXN_F.js → browser/solvers/highs-loader-Csn3-0tq.js} +241 -149
  6. package/dist/browser/solvers/highs-worker.js +17 -16
  7. package/dist/browser/solvers/highs.js +295 -255
  8. package/dist/browser/solvers/pumpkin-inline.js +51 -0
  9. package/dist/{lib/solvers/loader-Ow74Fa1B.js → browser/solvers/pumpkin-loader-BI3n3dWO.js} +145 -55
  10. package/dist/browser/solvers/pumpkin-worker.js +24 -23
  11. package/dist/browser/solvers/pumpkin.js +307 -288
  12. package/dist/browser/washi.min.js +4 -4
  13. package/dist/lib/solvers/embedded-wasm-CSFlLV5N.js +49 -0
  14. package/dist/lib/solvers/highs-node-runtime.js +1 -7
  15. package/dist/lib/solvers/highs-worker.js +19 -17
  16. package/dist/lib/solvers/highs.js +153 -112
  17. package/dist/{browser/solvers/highs-loader-BLY3wzDH.js → lib/solvers/loader-DCtyxsfF.js} +56 -36
  18. package/dist/{browser/solvers/pumpkin-loader-CvdaKxf4.js → lib/solvers/loader-b5PNpCmX.js} +58 -33
  19. package/dist/lib/solvers/pumpkin-worker.js +25 -23
  20. package/dist/lib/solvers/pumpkin.js +212 -192
  21. package/dist/types/modeler/solvers/embedded-wasm.d.ts +36 -0
  22. package/dist/types/modeler/solvers/embedded-wasm.d.ts.map +1 -0
  23. package/dist/types/modeler/solvers/highs/loader.d.ts.map +1 -1
  24. package/dist/types/modeler/solvers/highs/node-runtime.d.ts.map +1 -1
  25. package/dist/types/modeler/solvers/highs/worker-client.d.ts.map +1 -1
  26. package/dist/types/modeler/solvers/inline-pack.d.ts +6 -0
  27. package/dist/types/modeler/solvers/inline-pack.d.ts.map +1 -0
  28. package/dist/types/modeler/solvers/pumpkin/loader.d.ts +1 -1
  29. package/dist/types/modeler/solvers/pumpkin/loader.d.ts.map +1 -1
  30. package/dist/types/modeler/solvers/pumpkin/solver.d.ts.map +1 -1
  31. package/dist/types/modeler/solvers/pumpkin/worker-client.d.ts.map +1 -1
  32. package/dist/types/modeler/solvers/pumpkin/worker.d.ts +1 -0
  33. package/dist/types/modeler/solvers/pumpkin/worker.d.ts.map +1 -1
  34. package/docs/getting-started/ai-agents.md +55 -1
  35. package/docs/getting-started/runtimes.md +46 -1
  36. package/docs/solvers/highs.md +2 -0
  37. package/docs/solvers/pumpkin.md +2 -0
  38. package/llms-full.txt +105 -2
  39. package/llms.txt +55 -1
  40. package/package.json +12 -3
  41. package/skills/washi/SKILL.md +66 -2
  42. package/skills/washi-single-html/SKILL.md +335 -0
  43. package/README.ja.md +0 -246
  44. package/README.zh-CN.md +0 -246
package/README.md CHANGED
@@ -1,24 +1,24 @@
1
1
  <div align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="./assets/washi-header-dark.png">
4
- <source media="(prefers-color-scheme: light)" srcset="./assets/washi-header-light.png">
5
- <img alt="WaSHI - Mathematical Optimization Modeler in TypeScript" src="./assets/washi-header-light.png" width="420" />
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://washi.ohtaman.dev/washi-header-dark.png">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://washi.ohtaman.dev/washi-header-light.png">
5
+ <img alt="WaSHI - Mathematical Optimization Modeler in TypeScript" src="https://washi.ohtaman.dev/washi-header-light.png" width="420" />
6
6
  </picture>
7
7
  <p><strong>Mathematical Optimization Modeler in TypeScript</strong></p>
8
8
  <p>
9
9
  <em>Linear Programming (LP) • Mixed-Integer Programming (MIP) • Convex Quadratic Programming (QP) • Constraint Programming (CP) • SMT &amp; Conflict Diagnosis</em>
10
10
  </p>
11
11
  <p>
12
- <a href="./README.md">English</a> •
13
- <a href="./README.ja.md">日本語</a> •
14
- <a href="./README.zh-CN.md">简体中文</a>
12
+ <a href="https://github.com/ohtaman/washi/blob/main/README.md">English</a> •
13
+ <a href="https://github.com/ohtaman/washi/blob/main/README-ja.md">日本語</a> •
14
+ <a href="https://github.com/ohtaman/washi/blob/main/README-zh-CN.md">简体中文</a>
15
15
  </p>
16
16
  <p>
17
17
  <a href="https://www.npmjs.com/package/@ohtaman/washi"><img src="https://img.shields.io/npm/v/@ohtaman/washi?color=crimson&label=npm" alt="npm version" /></a>
18
18
  <a href="https://github.com/ohtaman/washi/actions/workflows/distribution.yml"><img src="https://github.com/ohtaman/washi/actions/workflows/distribution.yml/badge.svg" alt="CI Status" /></a>
19
19
  <a href="https://washi.ohtaman.dev/"><img src="https://img.shields.io/badge/docs-online-blue" alt="docs" /></a>
20
20
  <a href="https://washi.ohtaman.dev/demo/"><img src="https://img.shields.io/badge/demo-playground-brightgreen" alt="live demo" /></a>
21
- <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license" /></a>
21
+ <a href="https://github.com/ohtaman/washi/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license" /></a>
22
22
  </p>
23
23
  </div>
24
24
 
@@ -38,8 +38,8 @@
38
38
 
39
39
  - **[Documentation](https://washi.ohtaman.dev/)**: Modeling guide, solver references, and deployment guides
40
40
  - **[Interactive Showcase](https://washi.ohtaman.dev/showcase/) · [Browser Playground](https://washi.ohtaman.dev/demo/) · [Optimization N Exercises](https://washi.ohtaman.dev/exercises/)**: Try live optimization apps, practice interactive modeling workouts, and edit models in the browser
41
- - **[Examples](https://washi.ohtaman.dev/examples/)**: Problem recipes and runnable Node.js / browser scripts ([`examples/`](examples/README.md))
42
- - **[Agent Skill (`SKILL.md`)](skills/washi/SKILL.md) · [`llms.txt`](https://washi.ohtaman.dev/llms.txt) / [`llms-full.txt`](https://washi.ohtaman.dev/llms-full.txt)**: Workflow skill and machine-readable docs for AI coding agents
41
+ - **[Examples](https://washi.ohtaman.dev/examples/)**: Problem recipes and runnable Node.js / browser scripts ([`examples/`](https://github.com/ohtaman/washi/blob/main/examples/README.md))
42
+ - **[Agent Skill (`SKILL.md`)](https://github.com/ohtaman/washi/blob/main/skills/washi/SKILL.md) · [`llms.txt`](https://washi.ohtaman.dev/llms.txt) / [`llms-full.txt`](https://washi.ohtaman.dev/llms-full.txt)**: Workflow skill and machine-readable docs for AI coding agents
43
43
 
44
44
  ---
45
45
 
@@ -217,14 +217,17 @@ console.log(res.conflicts); // HiGHS: ["rush_required"]
217
217
  <!-- <script src="https://cdn.jsdelivr.net/npm/@ohtaman/washi/dist/browser/solvers/glpk.min.js"></script> -->
218
218
  ```
219
219
 
220
+ > [!TIP]
221
+ > **CSP-restricted single-file pages (`connect-src 'none'`)**: If your host allows CDN scripts (`script-src`) but blocks `.wasm` `fetch()`, load the self-registering inline WASM packs (`solvers/highs-inline.js` / `solvers/pumpkin-inline.js` — usable as either an ES module `import` or a classic `<script>` tag) before your first `solve()` / `check()` call, with no base64 decoding or setter boilerplate. Pass `{ useWorker: false }` if Workers/`blob:` are blocked. See the [Runtime Environments & Deployment Guide](https://washi.ohtaman.dev/getting-started/runtimes#csp-fetch-free).
222
+
220
223
  > [!NOTE]
221
- > **Z3 in the Browser**: Because Z3's WebAssembly build uses `SharedArrayBuffer`, browsers require a **Secure Context** (`HTTPS` or `localhost`) and Cross-Origin Isolation headers (`Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp`). See the [Cross-Origin Isolation Guide](docs/getting-started/cross-origin.md) and [`examples/distribution/`](examples/distribution/README.md). **HiGHS**, **Pumpkin**, and **GLPK** work without Cross-Origin Isolation headers.
224
+ > **Z3 in the Browser**: Because Z3's WebAssembly build uses `SharedArrayBuffer`, browsers require a **Secure Context** (`HTTPS` or `localhost`) and Cross-Origin Isolation headers (`Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp`). See the [Cross-Origin Isolation Guide](https://washi.ohtaman.dev/getting-started/cross-origin) and [`examples/distribution/`](https://github.com/ohtaman/washi/blob/main/examples/distribution/README.md). **HiGHS**, **Pumpkin**, and **GLPK** work without Cross-Origin Isolation headers.
222
225
 
223
226
  ---
224
227
 
225
228
  ## 🤝 Contributing
226
229
 
227
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for local development setup, running tests and benchmarks, rebuilding WebAssembly assets, and the release workflow.
230
+ See [CONTRIBUTING.md](https://github.com/ohtaman/washi/blob/main/CONTRIBUTING.md) for local development setup, running tests and benchmarks, rebuilding WebAssembly assets, and the release workflow.
228
231
 
229
232
  ---
230
233
 
@@ -242,5 +245,5 @@ WaSHI stands on the shoulders of the open-source mathematical optimization and a
242
245
 
243
246
  ## 📄 License
244
247
 
245
- - **`@ohtaman/washi`**: [MIT License](./LICENSE)
246
- - **Bundled / Optional Engines**: HiGHS (MIT), Pumpkin (MIT), Z3 (MIT), GLPK (GPL-3.0). See [THIRD_PARTY_LICENSES.md](./THIRD_PARTY_LICENSES.md) for full details.
248
+ - **`@ohtaman/washi`**: [MIT License](https://github.com/ohtaman/washi/blob/main/LICENSE)
249
+ - **Bundled / Optional Engines**: HiGHS (MIT), Pumpkin (MIT), Z3 (MIT), GLPK (GPL-3.0). See [THIRD_PARTY_LICENSES.md](https://github.com/ohtaman/washi/blob/main/THIRD_PARTY_LICENSES.md) for full details.
@@ -1,4 +1,4 @@
1
- import { t as e } from "./highs-browser-runtime-0Bgq5ksG.js";
1
+ import { t as e } from "./highs-browser-runtime-ccRmE4qj.js";
2
2
  //#region __vite-browser-external
3
3
  var t = /* @__PURE__ */ e(((e, t) => {
4
4
  t.exports = {};
@@ -1,4 +1,4 @@
1
- import { d as e } from "./highs-loader-BLY3wzDH.js";
1
+ import { d as e } from "./highs-loader-Csn3-0tq.js";
2
2
  //#region \0rolldown/runtime.js
3
3
  var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = (() => {
4
4
  var e = import.meta.url;