@extend-ai/react-xlsx 0.20.9 → 0.20.11

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/dist/internal.cjs CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkZ3XV7ESQcjs = require('./chunk-Z3XV7ESQ.cjs');
10
+ var _chunkSXHHFUXAcjs = require('./chunk-SXHHFUXA.cjs');
11
11
  require('./chunk-OGZ6ROZC.cjs');
12
12
  require('./chunk-AD4CGQN2.cjs');
13
13
 
@@ -19,5 +19,5 @@ require('./chunk-AD4CGQN2.cjs');
19
19
 
20
20
 
21
21
 
22
- exports.XlsxFileSizeLimitExceededError = _chunkZ3XV7ESQcjs.XlsxFileSizeLimitExceededError; exports.__createContentNode = _chunkZ3XV7ESQcjs.__createContentNode; exports.__createContentRoot = _chunkZ3XV7ESQcjs.__createContentRoot; exports.__createControlledViewer = _chunkZ3XV7ESQcjs.__createControlledViewer; exports.canUseConfiguredWasmSourceInWorker = _chunkZ3XV7ESQcjs.canUseConfiguredWasmSourceInWorker; exports.formatBinaryBytes = _chunkZ3XV7ESQcjs.formatBinaryBytes; exports.getConfiguredWorkerWasmSource = _chunkZ3XV7ESQcjs.getConfiguredWorkerWasmSource; exports.getSheetsWasmModule = _chunkZ3XV7ESQcjs.getSheetsWasmModule;
22
+ exports.XlsxFileSizeLimitExceededError = _chunkSXHHFUXAcjs.XlsxFileSizeLimitExceededError; exports.__createContentNode = _chunkSXHHFUXAcjs.__createContentNode; exports.__createContentRoot = _chunkSXHHFUXAcjs.__createContentRoot; exports.__createControlledViewer = _chunkSXHHFUXAcjs.__createControlledViewer; exports.canUseConfiguredWasmSourceInWorker = _chunkSXHHFUXAcjs.canUseConfiguredWasmSourceInWorker; exports.formatBinaryBytes = _chunkSXHHFUXAcjs.formatBinaryBytes; exports.getConfiguredWorkerWasmSource = _chunkSXHHFUXAcjs.getConfiguredWorkerWasmSource; exports.getSheetsWasmModule = _chunkSXHHFUXAcjs.getSheetsWasmModule;
23
23
  //# sourceMappingURL=internal.cjs.map
package/dist/internal.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  formatBinaryBytes,
8
8
  getConfiguredWorkerWasmSource,
9
9
  getSheetsWasmModule
10
- } from "./chunk-4ZD6JIMY.js";
10
+ } from "./chunk-VSM7WKLM.js";
11
11
  import "./chunk-CVMHJO5H.js";
12
12
  export {
13
13
  XlsxFileSizeLimitExceededError,
@@ -198,57 +198,20 @@ function __wbg_finalize_init(instance, module) {
198
198
  cachedUint8ArrayMemory0 = null;
199
199
  return wasm;
200
200
  }
201
- async function __wbg_load(module, imports) {
202
- if (typeof Response === "function" && module instanceof Response) {
203
- if (typeof WebAssembly.instantiateStreaming === "function") {
204
- try {
205
- return await WebAssembly.instantiateStreaming(module, imports);
206
- } catch (e) {
207
- const validResponse = module.ok && expectedResponseType(module.type);
208
- if (validResponse && module.headers.get("Content-Type") !== "application/wasm") {
209
- console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
210
- } else {
211
- throw e;
212
- }
213
- }
214
- }
215
- const bytes = await module.arrayBuffer();
216
- return await WebAssembly.instantiate(bytes, imports);
217
- } else {
218
- const instance = await WebAssembly.instantiate(module, imports);
219
- if (instance instanceof WebAssembly.Instance) {
220
- return { instance, module };
221
- } else {
222
- return instance;
223
- }
224
- }
225
- function expectedResponseType(type) {
226
- switch (type) {
227
- case "basic":
228
- case "cors":
229
- case "default":
230
- return true;
231
- }
232
- return false;
233
- }
234
- }
235
- async function __wbg_init(module_or_path) {
201
+ function initSync(module) {
236
202
  if (wasm !== void 0) return wasm;
237
- if (module_or_path !== void 0) {
238
- if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
239
- ({ module_or_path } = module_or_path);
203
+ if (module !== void 0) {
204
+ if (Object.getPrototypeOf(module) === Object.prototype) {
205
+ ({ module } = module);
240
206
  } else {
241
- console.warn("using deprecated parameters for the initialization function; pass a single object instead");
207
+ console.warn("using deprecated parameters for `initSync()`; pass a single object instead");
242
208
  }
243
209
  }
244
- if (module_or_path === void 0) {
245
- module_or_path = new URL("office_art_bg.wasm", import.meta.url);
246
- }
247
210
  const imports = __wbg_get_imports();
248
- if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) {
249
- module_or_path = fetch(module_or_path);
211
+ if (!(module instanceof WebAssembly.Module)) {
212
+ module = new WebAssembly.Module(module);
250
213
  }
251
- const { instance, module } = await __wbg_load(await module_or_path, imports);
214
+ const instance = new WebAssembly.Instance(module, imports);
252
215
  return __wbg_finalize_init(instance, module);
253
216
  }
254
217
 
@@ -260,7 +223,8 @@ var pending;
260
223
  async function loadOfficeArt() {
261
224
  pending ??= Promise.resolve().then(async () => {
262
225
  const compressed = Uint8Array.from(atob(payload_default), (character) => character.charCodeAt(0));
263
- await __wbg_init({ module_or_path: gunzipSync(compressed) });
226
+ const module = await WebAssembly.compile(gunzipSync(compressed));
227
+ initSync({ module });
264
228
  }).catch((error) => {
265
229
  pending = void 0;
266
230
  throw error;
@@ -277,4 +241,4 @@ async function loadOfficeArt() {
277
241
  export {
278
242
  loadOfficeArt
279
243
  };
280
- //# sourceMappingURL=loader-VYUM3ZAM.js.map
244
+ //# sourceMappingURL=loader-BCP54V75.js.map