@pitcher/canvas-ui 2026.1.20-111900-beta → 2026.1.20-115623-beta

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/canvas-ui.js CHANGED
@@ -110489,14 +110489,7 @@ function init({
110489
110489
  (folder) => !state$2.folderCache[folder.id] && folder.parent_folder_id
110490
110490
  );
110491
110491
  if (foldersToCache.length > 0) {
110492
- const parentIdsToFetch = Array.from(
110493
- new Set(foldersToCache.map((f) => f.parent_folder_id).filter(Boolean))
110494
- ).filter((parentId) => {
110495
- const hasUncachedChildren = foldersToCache.some(
110496
- (f) => f.parent_folder_id === parentId && !state$2.folderCache[f.id]
110497
- );
110498
- return hasUncachedChildren;
110499
- });
110492
+ const parentIdsToFetch = Array.from(new Set(foldersToCache.map((f) => f.parent_folder_id).filter(Boolean)));
110500
110493
  await Promise.all(
110501
110494
  parentIdsToFetch.map(async (parentId) => {
110502
110495
  try {
@@ -110505,6 +110498,18 @@ function init({
110505
110498
  setSelectedFolder: false
110506
110499
  });
110507
110500
  if (parentFolder) {
110501
+ state$2.folderCache[parentId] = {
110502
+ files_count: parentFolder.files.length,
110503
+ folders_count: parentFolder.folders.length,
110504
+ available_files_count: parentFolder.files.filter((f) => {
110505
+ const isExpired = f.expires_at && new Date(f.expires_at) < /* @__PURE__ */ new Date();
110506
+ return !f.deleted_at && !isExpired;
110507
+ }).length,
110508
+ available_folders_count: parentFolder.folders.filter((sf) => {
110509
+ return (sf.files_count > 0 || sf.folders_count > 0) && (sf.available_files_count !== 0 || sf.available_folders_count !== 0);
110510
+ }).length,
110511
+ timestamp: Date.now()
110512
+ };
110508
110513
  parentFolder.folders.forEach((subfolder) => {
110509
110514
  state$2.folderCache[subfolder.id] = {
110510
110515
  files_count: subfolder.files_count,