@selvajs/ui 6.0.0-beta.7 → 6.0.0-beta.8

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.
@@ -1,4 +1,4 @@
1
- import { downloadFileData } from '@selvajs/compute/core';
1
+ import { downloadFileDataByRoot } from '@selvajs/compute/core';
2
2
  import { SvelteMap } from 'svelte/reactivity';
3
3
  import { APP_DEFAULTS } from '../constants';
4
4
  export const MIME_BY_EXT = {
@@ -45,11 +45,13 @@ export async function downloadFiles(fileData, fileName = 'grasshopper-output') {
45
45
  console.warn('[FileDownload] No files to download');
46
46
  return;
47
47
  }
48
+ // A lone file is saved as itself rather than zipped — the one case that needs the DOM
49
+ // directly. Everything else, including the per-root archive split, belongs to compute.
48
50
  if (filesArray.length === 1) {
49
51
  saveSingleFile(filesArray[0]);
50
52
  return;
51
53
  }
52
- await downloadFileData(filesArray, fileName);
54
+ await downloadFileDataByRoot(filesArray, fileName);
53
55
  }
54
56
  catch (error) {
55
57
  console.error('[FileDownload] Error downloading files:', error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selvajs/ui",
3
- "version": "6.0.0-beta.7",
3
+ "version": "6.0.0-beta.8",
4
4
  "description": "Shared UI components and utilities for Selva applications",
5
5
  "license": "MIT",
6
6
  "author": "VektorNode",
@@ -59,9 +59,9 @@
59
59
  "svelte": "^5",
60
60
  "tailwind-variants": "^3.3.0",
61
61
  "three": "^0.185.1",
62
- "@selvajs/solve": "^1.0.0-beta.10",
63
- "@selvajs/compute": "^4.0.0-beta.6",
62
+ "@selvajs/compute": "^4.0.0-beta.8",
64
63
  "@selvajs/schemas": "^5.0.0-beta.3",
64
+ "@selvajs/solve": "^1.0.0-beta.10",
65
65
  "@selvajs/visualization": "^1.0.0-beta.4"
66
66
  },
67
67
  "peerDependenciesMeta": {
@@ -90,9 +90,9 @@
90
90
  "svelte": "5.56.8",
91
91
  "tailwind-variants": "^3.3.0",
92
92
  "vitest": "^4.1.10",
93
- "@selvajs/compute": "4.0.0-beta.6",
94
- "@selvajs/config": "0.0.3",
93
+ "@selvajs/compute": "4.0.0-beta.8",
95
94
  "@selvajs/schemas": "5.0.0-beta.3",
95
+ "@selvajs/config": "0.0.3",
96
96
  "@selvajs/solve": "1.0.0-beta.10",
97
97
  "@selvajs/visualization": "1.0.0-beta.4"
98
98
  },
@@ -1,4 +1,4 @@
1
- import { downloadFileData, type FileData } from '@selvajs/compute/core';
1
+ import { downloadFileDataByRoot, type FileData } from '@selvajs/compute/core';
2
2
  import { SvelteMap } from 'svelte/reactivity';
3
3
  import { APP_DEFAULTS } from '../constants';
4
4
 
@@ -53,12 +53,14 @@ export async function downloadFiles(
53
53
  return;
54
54
  }
55
55
 
56
+ // A lone file is saved as itself rather than zipped — the one case that needs the DOM
57
+ // directly. Everything else, including the per-root archive split, belongs to compute.
56
58
  if (filesArray.length === 1) {
57
59
  saveSingleFile(filesArray[0]);
58
60
  return;
59
61
  }
60
62
 
61
- await downloadFileData(filesArray, fileName);
63
+ await downloadFileDataByRoot(filesArray, fileName);
62
64
  } catch (error) {
63
65
  console.error('[FileDownload] Error downloading files:', error);
64
66
  throw error;