@ai-matrx/alchemy 0.8.3 → 0.8.5

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/CHANGELOG.md CHANGED
@@ -1,8 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.5
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/alchemy/v0.8.4..npm/alchemy/v0.8.5 -- apps/shared/alchemy`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.8.4
10
+ ### Secure SheetJS release
11
+
12
+ - Replaced the stale npm-registry SheetJS 0.18.5 dependency with the official SheetJS 0.20.3 release. This removes the prototype-pollution and ReDoS advisories from the lazy XLSX export engine.
13
+ - SheetJS is compiled into the XLSX artifact so npm consumers never need to install its remote tarball dependency.
14
+
15
+ ### Consumer action
16
+
17
+ None.
18
+
3
19
  ## 0.8.3
4
20
  ### engine subscribe loop
5
21
 
22
+ - The phone sheet's verb strip is icon-only and scrolls (seven labelled verbs wrapped letter by letter at 390px).
6
23
  - Fix: an action store that notifies inside `subscribe` (a hydration read — read-aloud, thumbs) looped the engine (subscribe → notify → resolve → resubscribe; "Maximum update depth exceeded" on /chat right-click). Subscriptions are now keyed by the resolved ids and a synchronous notify during subscribe is ignored. Test red before the fix (timeout), green after.
7
24
 
8
25
  ### Consumer action
@@ -243,4 +260,3 @@ Initial `@ai-matrx/alchemy` distribution package. It exports the existing kit co
243
260
 
244
261
  Wait for the initial npm publish and the required sibling package releases. Then install `@ai-matrx/alchemy` and replace multiple Alchemy package imports with the matching distribution subpath.
245
262
 
246
-
package/dist/core.cjs CHANGED
@@ -5,8 +5,13 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __esm = (fn, res) => function __init() {
9
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
8
+ var __esm = (fn, res, err) => function __init() {
9
+ if (err) throw err[0];
10
+ try {
11
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
+ } catch (e) {
13
+ throw err = [e], e;
14
+ }
10
15
  };
11
16
  var __export = (target, all) => {
12
17
  for (var name in all)
@@ -1357,50 +1362,6 @@ var init_document = __esm({
1357
1362
  }
1358
1363
  });
1359
1364
 
1360
- // src/operate/formats/xlsx.ts
1361
- var xlsx_exports = {};
1362
- __export(xlsx_exports, {
1363
- xlsxEngine: () => xlsxEngine
1364
- });
1365
- var cell, xlsxEngine;
1366
- var init_xlsx = __esm({
1367
- "src/operate/formats/xlsx.ts"() {
1368
- "use strict";
1369
- init_core();
1370
- cell = (value) => value === void 0 || value === null ? null : typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? value : JSON.stringify(value);
1371
- xlsxEngine = {
1372
- async build(draft, options, signal) {
1373
- if (signal.aborted) throw new DOMException("Cancelled", "AbortError");
1374
- const p = draft.payload;
1375
- if (p.kind !== "rows") throw new ContentTransferError("unsupported-format", "An Excel workbook needs table rows. Download it as CSV or JSON instead.");
1376
- const columns = p.columns.filter(
1377
- (c) => c.visible && c.exportable !== false && c.classification !== "secret" && c.classification !== "credential"
1378
- );
1379
- const XLSX = await import("xlsx");
1380
- if (signal.aborted) throw new DOMException("Cancelled", "AbortError");
1381
- const sheet = XLSX.utils.aoa_to_sheet([columns.map((c) => c.label), ...p.rows.map((row) => columns.map((c) => cell(readTransferCell(row, c))))]);
1382
- const book = XLSX.utils.book_new();
1383
- const filename = options.filename ?? "export.xlsx";
1384
- const sheetName = filename.replace(/\.xlsx$/i, "").replace(/[\\/?*[\]:]/g, " ").trim().slice(0, 31) || "Data";
1385
- XLSX.utils.book_append_sheet(book, sheet, sheetName);
1386
- const written = XLSX.write(book, { type: "array", bookType: "xlsx", compression: true });
1387
- return sealTransferArtifact({
1388
- snapshotId: draft.snapshotId,
1389
- draftRevision: draft.revision,
1390
- format: "xlsx",
1391
- plainText: serialize(draft, "tsv", { spreadsheetSafe: true }).plainText,
1392
- file: {
1393
- filename,
1394
- mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1395
- bytes: written instanceof Uint8Array ? written : new Uint8Array(written)
1396
- },
1397
- omissions: draft.omissions.map((o) => ({ ...o }))
1398
- });
1399
- }
1400
- };
1401
- }
1402
- });
1403
-
1404
1365
  // src/core.ts
1405
1366
  var core_exports = {};
1406
1367
  __export(core_exports, {
@@ -1577,7 +1538,7 @@ var FORMAT_ADAPTERS = Object.freeze([
1577
1538
  modes: ["download"],
1578
1539
  runsOn: "client",
1579
1540
  supports: isRows,
1580
- load: lazy(async () => (await Promise.resolve().then(() => (init_xlsx(), xlsx_exports))).xlsxEngine)
1541
+ load: lazy(async () => (await import("@ai-matrx/alchemy/operate/formats/xlsx")).xlsxEngine)
1581
1542
  },
1582
1543
  {
1583
1544
  id: "pdf",