@fileverse-dev/dsheet 4.1.18 → 4.1.19

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.
@@ -33,7 +33,7 @@ export interface SmartContractConfig {
33
33
  contracts?: ContractConfig[];
34
34
  /** RPC URL per chain. Falls back to bundled defaults when omitted. */
35
35
  rpcConfig?: Partial<Record<SupportedChain, string>>;
36
- /** Resolve ABI from stored reference (e.g. IPFS hash). Required for user-saved contracts with abiHash. */
36
+ /** Resolve ABI from stored reference (e.g. an IPFS CID or a Swarm reference — opaque to the package). Required for user-saved contracts with abiHash. */
37
37
  resolveAbi?: (abiHash: string) => Promise<Abi>;
38
38
  /** Persist a new contract. When omitted, package keeps it in session memory only. */
39
39
  onAddContract?: (input: NewContractInput) => Promise<void>;
@@ -52,7 +52,8 @@ export interface CallerParams {
52
52
  export interface FetchAbiParams {
53
53
  contractAddress: Hex;
54
54
  chain: import('viem').Chain;
55
- ipfsHash?: string;
55
+ /** Stored ABI reference (`ContractConfig.abiHash`), resolved via `resolveAbi`. */
56
+ abiRef?: string;
56
57
  }
57
58
  export type ParsedFunction = {
58
59
  functionName: string;
@@ -47929,11 +47929,11 @@ const TT = (e, t) => {
47929
47929
  throw new BT(e);
47930
47930
  return l;
47931
47931
  }, n1 = async (e, t) => {
47932
- const l = e.ipfsHash ? `${e.contractAddress}_${e.chain.id}_${e.ipfsHash}` : `${e.contractAddress}_${e.chain.id}`;
47932
+ const l = e.abiRef ? `${e.contractAddress}_${e.chain.id}_${e.abiRef}` : `${e.contractAddress}_${e.chain.id}`;
47933
47933
  if (t.abiCache[l])
47934
47934
  return t.abiCache[l];
47935
47935
  let n;
47936
- if (e.ipfsHash && t.resolveAbi ? n = await t.resolveAbi(e.ipfsHash) : n = await i1(e.contractAddress, e.chain), !n)
47936
+ if (e.abiRef && t.resolveAbi ? n = await t.resolveAbi(e.abiRef) : n = await i1(e.contractAddress, e.chain), !n)
47937
47937
  throw new JT(e.contractAddress, e.chain.id);
47938
47938
  return t.abiCache[l] = n, n;
47939
47939
  }, KT = (e, t) => {
@@ -47975,7 +47975,13 @@ const MT = async (e, t) => {
47975
47975
  if (!n)
47976
47976
  throw new Error("Chain ID not found");
47977
47977
  const o = VG(n), c = await n1({ contractAddress: l, chain: o }, t), [s, ...r] = i;
47978
- return { abi: c, contractAddress: l, chain: o, functionName: s, args: r };
47978
+ return {
47979
+ abi: c,
47980
+ contractAddress: l,
47981
+ chain: o,
47982
+ functionName: s,
47983
+ args: r
47984
+ };
47979
47985
  }, OT = async (e, t, l) => {
47980
47986
  const [n, i, ...o] = e, c = UT(n, t), s = kr[c.network];
47981
47987
  return {
@@ -47983,7 +47989,7 @@ const MT = async (e, t) => {
47983
47989
  {
47984
47990
  contractAddress: c.address,
47985
47991
  chain: s,
47986
- ipfsHash: c.abiHash || void 0
47992
+ abiRef: c.abiHash || void 0
47987
47993
  },
47988
47994
  l
47989
47995
  ),
@@ -48076,7 +48082,7 @@ const MT = async (e, t) => {
48076
48082
  {
48077
48083
  contractAddress: e.address,
48078
48084
  chain: l,
48079
- ipfsHash: e.abiHash || void 0
48085
+ abiRef: e.abiHash || void 0
48080
48086
  },
48081
48087
  t
48082
48088
  );
@@ -50708,10 +50714,10 @@ const QN = ({
50708
50714
  }, S.readAsText(b);
50709
50715
  });
50710
50716
  }, wZ = async (e, t, l, n) => {
50711
- const { handleExportToXLSX: i } = await import("./xlsx-export-impl-DPiVn_D4.js");
50717
+ const { handleExportToXLSX: i } = await import("./xlsx-export-impl-b03liE8V.js");
50712
50718
  return i(e, t, l, n);
50713
50719
  }, LZ = async (e, t, l, n) => {
50714
- const { handleExportToODS: i } = await import("./xlsx-export-impl-DPiVn_D4.js");
50720
+ const { handleExportToODS: i } = await import("./xlsx-export-impl-b03liE8V.js");
50715
50721
  return i(e, t, l, n);
50716
50722
  }, Td = (e) => {
50717
50723
  Jh({
@@ -50802,7 +50808,7 @@ const QN = ({
50802
50808
  }) => {
50803
50809
  const [s, r] = Xe(!1), u = We(
50804
50810
  async (h, m, b) => {
50805
- const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-CVvAMSHb.js");
50811
+ const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-DQ07A9l0.js");
50806
50812
  return Z(
50807
50813
  {
50808
50814
  sheetEditorRef: e,
@@ -50833,7 +50839,7 @@ const QN = ({
50833
50839
  ), d = We(
50834
50840
  async (h, m, b) => {
50835
50841
  var y;
50836
- const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-CVvAMSHb.js"), g = h == null ? void 0 : h.target, S = ((y = g == null ? void 0 : g.files) == null ? void 0 : y[0]) || m;
50842
+ const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-DQ07A9l0.js"), g = h == null ? void 0 : h.target, S = ((y = g == null ? void 0 : g.files) == null ? void 0 : y[0]) || m;
50837
50843
  if (!S) return;
50838
50844
  const f = await Z(S);
50839
50845
  return I(
@@ -56509,7 +56515,7 @@ async function _O(e, t) {
56509
56515
  const { convertOdsFileToXlsxFile: b } = await import("./ods-to-xlsx-DeJAYBkD.js");
56510
56516
  h = await b(e);
56511
56517
  }
56512
- const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-CVvAMSHb.js");
56518
+ const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-DQ07A9l0.js");
56513
56519
  await m(
56514
56520
  {
56515
56521
  sheetEditorRef: c,
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A, B as f, D as I, E as L, F as T, G as w, H as y, I as v, J as D, K as M, L as b, M as k, N as z, O, P } from "./index-D1F86l4X.js";
1
+ import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A, B as f, D as I, E as L, F as T, G as w, H as y, I as v, J as D, K as M, L as b, M as k, N as z, O, P } from "./index-CmlGPhgN.js";
2
2
  import { cy as G, cz as K, cA as U, cG as X, bs as _, e as j, f as B, l as H, a as J, dj as N, dk as q, bb as Y, dl as Z, dm as Q, dr as W, ds as $, du as ee, I as ae, dJ as se, eg as oe, b4 as te } from "./executeStringFunction-B1_kGelH.js";
3
3
  import { FLVURL as le } from "@fileverse-dev/formulajs";
4
4
  import { E as de, S as Se } from "./constants-8Ij49Lxv.js";
@@ -1,10 +1,10 @@
1
1
  import * as BZ from "yjs";
2
- import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-D1F86l4X.js";
2
+ import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-CmlGPhgN.js";
3
3
  import { g as sl } from "./executeStringFunction-B1_kGelH.js";
4
4
  import { Workbook as al } from "exceljs";
5
5
  import Kl from "luckyexcel";
6
- import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-BwKPvD2f.js";
7
- import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-CjllTwj9.js";
6
+ import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-FqEk4F3I.js";
7
+ import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-Bzo6AUas.js";
8
8
  import { toast as fZ } from "@fileverse/ui";
9
9
  var Zl = { exports: {} };
10
10
  (function(m) {
@@ -1,5 +1,5 @@
1
1
  import { i as w } from "./executeStringFunction-B1_kGelH.js";
2
- import { J as x } from "./xlsx-hyperlink-inline-BwKPvD2f.js";
2
+ import { J as x } from "./xlsx-hyperlink-inline-FqEk4F3I.js";
3
3
  function g(o) {
4
4
  return o.startsWith("_xlnm.");
5
5
  }
@@ -1,9 +1,9 @@
1
1
  import { utils as S, write as nt } from "xlsx-js-style";
2
2
  import { Workbook as pt } from "exceljs";
3
3
  import { toast as rt } from "@fileverse/ui";
4
- import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-BwKPvD2f.js";
4
+ import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-FqEk4F3I.js";
5
5
  import { b as gt } from "./executeStringFunction-B1_kGelH.js";
6
- import { e as bt } from "./index-D1F86l4X.js";
6
+ import { e as bt } from "./index-CmlGPhgN.js";
7
7
  const xt = {
8
8
  1: "thin",
9
9
  2: "hair",
@@ -854,7 +854,7 @@ const Z = (t) => {
854
854
  O
855
855
  );
856
856
  });
857
- const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-CjllTwj9.js");
857
+ const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-Bzo6AUas.js");
858
858
  ct(
859
859
  B,
860
860
  (k = (C = (s = t.current).getWorkbookContext) == null ? void 0 : C.call(s)) == null ? void 0 : k.definedNames,
@@ -1,5 +1,5 @@
1
1
  import { g as Rt, c as yt } from "./executeStringFunction-B1_kGelH.js";
2
- import { c as wt } from "./index-D1F86l4X.js";
2
+ import { c as wt } from "./index-CmlGPhgN.js";
3
3
  function jt(J, nt) {
4
4
  const g = J.getImages();
5
5
  if (!g.length) return [];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/dsheet",
3
3
  "private": false,
4
4
  "description": "DSheet",
5
- "version": "4.1.18",
5
+ "version": "4.1.19",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-dsheets.git"