@tutti-os/workspace-file-manager 0.0.11 → 0.0.12

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.
@@ -1769,8 +1769,8 @@ var defaultApplicationIconExtensions = /* @__PURE__ */ new Set([
1769
1769
  "xz",
1770
1770
  "zip"
1771
1771
  ]);
1772
- function shouldResolveWorkspaceFileEntryIcon(entry) {
1773
- return isWorkspaceApplicationBundle(entry) || resolveWorkspaceFileDefaultApplicationIconExtension(entry) !== null;
1772
+ function shouldResolveWorkspaceFileEntryIcon(entry, options = {}) {
1773
+ return options.includeImageThumbnails && shouldResolveWorkspaceFileImageThumbnail(entry) || isWorkspaceApplicationBundle(entry) || resolveWorkspaceFileDefaultApplicationIconExtension(entry) !== null;
1774
1774
  }
1775
1775
  function shouldUseWorkspaceFileExtensionDocumentIcon(entry) {
1776
1776
  if (entry.kind !== "file") {
@@ -1790,6 +1790,9 @@ function resolveWorkspaceFileDefaultApplicationIconExtension(entry) {
1790
1790
  return defaultApplicationIconExtensions.has(extension) ? extension : null;
1791
1791
  }
1792
1792
  function resolveWorkspaceFileEntryIconCacheKey(entry) {
1793
+ if (shouldResolveWorkspaceFileImageThumbnail(entry)) {
1794
+ return `image-thumbnail:${entry.path}:${entry.mtimeMs ?? 0}`;
1795
+ }
1793
1796
  if (isWorkspaceApplicationBundle(entry)) {
1794
1797
  return `application:${entry.path}:${entry.mtimeMs ?? 0}`;
1795
1798
  }
@@ -1799,6 +1802,9 @@ function resolveWorkspaceFileEntryIconCacheKey(entry) {
1799
1802
  }
1800
1803
  return `default:${entry.path}:${entry.mtimeMs ?? 0}`;
1801
1804
  }
1805
+ function shouldResolveWorkspaceFileImageThumbnail(entry) {
1806
+ return entry.kind === "file" && resolveWorkspaceFileVisualKind(entry) === "image";
1807
+ }
1802
1808
 
1803
1809
  export {
1804
1810
  classifyWorkspaceFilePreviewKind,
@@ -1825,4 +1831,4 @@ export {
1825
1831
  resolveWorkspaceFileDefaultApplicationIconExtension,
1826
1832
  resolveWorkspaceFileEntryIconCacheKey
1827
1833
  };
1828
- //# sourceMappingURL=chunk-DXLDUMVG.js.map
1834
+ //# sourceMappingURL=chunk-CSFEGRX7.js.map