@beyondwork/xlsx-substrate-bindings 0.4.0 → 0.4.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.md +26 -1
- package/dist/wasm/web-sha256.d.ts +1 -0
- package/dist/wasm/web-sha256.js +3 -0
- package/dist/wasm/web.d.ts +2 -1
- package/dist/wasm/web.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ and the TypeScript bridge over it.
|
|
|
10
10
|
| --- | --- |
|
|
11
11
|
| `@beyondwork/xlsx-substrate-bindings` | Plain-value AI and UI types, the Conductor agent metadata, `BRIDGE_VERSION` and `BRIDGE_CAPABILITIES`. No wasm. |
|
|
12
12
|
| `@beyondwork/xlsx-substrate-bindings/wasm` | The Node loader and the full bridge contract. |
|
|
13
|
-
| `@beyondwork/xlsx-substrate-bindings/wasm/web` | The browser loader
|
|
13
|
+
| `@beyondwork/xlsx-substrate-bindings/wasm/web` | The browser loader, the capability helpers, the typed bridge errors (`isXlsxWasmBridgeError`) and `XLSX_WASM_WEB_SHA256`. No `node:` imports. |
|
|
14
14
|
| `@beyondwork/xlsx-substrate-bindings/wasm/web/glue` | The wasm-bindgen glue (ES module) the browser loader takes. |
|
|
15
15
|
| `@beyondwork/xlsx-substrate-bindings/wasm/web/binary` | The one `.wasm` binary, for hosts that serve or preload it. |
|
|
16
16
|
| `@beyondwork/xlsx-substrate-bindings/blank-workbook` | `createBlankWorkbookBytes()`: a new one-sheet workbook to open and edit. No imports at all, so it bundles for a browser. |
|
|
@@ -70,6 +70,21 @@ const loaded = await loadXlsxWasmBridgeWeb({ glueModule: glue, wasmSource: wasmU
|
|
|
70
70
|
Serve the `.wasm` from a cacheable route with the `application/wasm` MIME
|
|
71
71
|
type, or preload it and pass the bytes.
|
|
72
72
|
|
|
73
|
+
`XLSX_WASM_WEB_SHA256` (from `@beyondwork/xlsx-substrate-bindings/wasm/web`)
|
|
74
|
+
is the SHA-256, in lowercase hex, of the `.wasm` this package carries. A host
|
|
75
|
+
that fetches the binary from a URL it does not control (the exact-version
|
|
76
|
+
`https://unpkg.com/@beyondwork/xlsx-substrate-bindings@<version>/generated/wasm-web/xlsx_substrate_wasm_bg.wasm`)
|
|
77
|
+
or receives it as bytes hashes what it got and compares it to the constant
|
|
78
|
+
before passing it to the loader. The value is written when the package is
|
|
79
|
+
packed; an unpacked workspace build carries the empty string, which no binary
|
|
80
|
+
matches.
|
|
81
|
+
|
|
82
|
+
The React package `@beyondwork/xlsx-react-component` wraps this loader for
|
|
83
|
+
in-browser apps (`loadConductorRuntime` and `openConductorWorkbook` from its
|
|
84
|
+
`./embed` entry). Its README shows the three ways to deliver the `.wasm` to a
|
|
85
|
+
Beyond Work workblock and how load and save go through `bw.fetchBlob` and
|
|
86
|
+
`bw.saveBlob`.
|
|
87
|
+
|
|
73
88
|
## Memory contract
|
|
74
89
|
|
|
75
90
|
- **Maximum.** The binary is linked with a 2 GiB linear-memory maximum
|
|
@@ -121,6 +136,16 @@ and can rebuild the error with `deserializeXlsxWasmBridgeError`.
|
|
|
121
136
|
|
|
122
137
|
## Release notes
|
|
123
138
|
|
|
139
|
+
### 0.4.1 (bridge `xlsx-wasm-bridge-v50`)
|
|
140
|
+
|
|
141
|
+
A PATCH release on the same bridge.
|
|
142
|
+
|
|
143
|
+
- `XLSX_WASM_WEB_SHA256` is exported from `./wasm/web`: the sha256 of the
|
|
144
|
+
packed web wasm, written at pack time, so a browser host can check bytes it
|
|
145
|
+
fetched from a URL before compiling them.
|
|
146
|
+
- `@beyondwork/xlsx-react-component` 0.1.0 (the live embedded grid,
|
|
147
|
+
`ConductorEmbeddedWorkbook`) depends on this release.
|
|
148
|
+
|
|
124
149
|
### 0.4.0 (bridge `xlsx-wasm-bridge-v50`)
|
|
125
150
|
|
|
126
151
|
A MINOR release: the bridge moved from v49 to v50.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const XLSX_WASM_WEB_SHA256: string;
|
package/dist/wasm/web.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type RawXlsxWasmModule, type XlsxWasmBridgeLoadResult } from "./bridge-contract.ts";
|
|
2
|
-
export { BRIDGE_CAPABILITIES, BRIDGE_VERSION, missingXlsxWasmCapabilities, supportsRuntimeSessionMutations, type XlsxRuntimeSessionHandle, type XlsxRuntimeSessionMutationBridge, type XlsxRuntimeSessionOpenRequest, type XlsxSelectionSetRequest, type XlsxWasmBridge, type XlsxWasmBridgeLoadResult, type XlsxWasmBridgeStatus } from "./bridge-contract.ts";
|
|
2
|
+
export { BRIDGE_CAPABILITIES, BRIDGE_VERSION, isXlsxWasmBridgeError, missingXlsxWasmCapabilities, supportsRuntimeSessionMutations, XlsxWasmBridgeError, type XlsxRuntimeSessionHandle, type XlsxRuntimeSessionMutationBridge, type XlsxRuntimeSessionOpenRequest, type XlsxSelectionSetRequest, type XlsxWasmBridge, type XlsxWasmBridgeErrorCode, type XlsxWasmBridgeLoadResult, type XlsxWasmBridgeStatus } from "./bridge-contract.ts";
|
|
3
3
|
export { createXlsxWorkbookMutationRouter, type XlsxWorkbookBytesSnapshot, type XlsxWorkbookMutationMode, type XlsxWorkbookMutationRouter, type XlsxWorkbookMutationRouterInit } from "./session-router.ts";
|
|
4
|
+
export { XLSX_WASM_WEB_SHA256 } from "./web-sha256.ts";
|
|
4
5
|
/**
|
|
5
6
|
* Accepted wasm sources for the web glue's init entry point
|
|
6
7
|
* (wasm-bindgen `--target web`): URL/string/Request/Response stream through
|
package/dist/wasm/web.js
CHANGED
|
@@ -14,8 +14,14 @@ import { createXlsxWasmBridge, createXlsxWasmRuntime, readWasmMemoryLimits, vali
|
|
|
14
14
|
// comes from a module with no `node:` import; the bundling guard
|
|
15
15
|
// test/xlsx/browser-entry-node-free.test.ts holds that for every browser
|
|
16
16
|
// entry of the package.
|
|
17
|
-
export { BRIDGE_CAPABILITIES, BRIDGE_VERSION,
|
|
17
|
+
export { BRIDGE_CAPABILITIES, BRIDGE_VERSION,
|
|
18
|
+
// X1-D-088: a browser host recognises the two typed bridge errors
|
|
19
|
+
// (out-of-memory-budget, wasm-instance-lost) without the Node loader.
|
|
20
|
+
isXlsxWasmBridgeError, missingXlsxWasmCapabilities, supportsRuntimeSessionMutations, XlsxWasmBridgeError } from "./bridge-contract.js";
|
|
18
21
|
export { createXlsxWorkbookMutationRouter } from "./session-router.js";
|
|
22
|
+
// X1-D-088: the packed binary's SHA-256, for hosts that check the wasm they
|
|
23
|
+
// fetched or received before instantiating it (written at prepack).
|
|
24
|
+
export { XLSX_WASM_WEB_SHA256 } from "./web-sha256.js";
|
|
19
25
|
/**
|
|
20
26
|
* Instantiate and mount the XLSX wasm bridge from the web-target artifact.
|
|
21
27
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beyondwork/xlsx-substrate-bindings",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Conductor, the Ensemble spreadsheet runtime: native XLSX sessions compiled to WebAssembly for Node and browsers.",
|
|
5
5
|
"conductor": {
|
|
6
6
|
"bridgeVersion": "xlsx-wasm-bridge-v50",
|