@pitcher/canvas-ui 2026.1.13-070805-beta → 2026.1.13-134214-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
@@ -95684,120 +95684,118 @@ const _hoisted_9$O = {
95684
95684
  class: "flex items-center space-x-1 ml-2"
95685
95685
  };
95686
95686
  const _hoisted_10$C = { class: "flex items-center" };
95687
- const _hoisted_11$x = { class: "c-select-filter__popover w-[350px] rounded flex flex-col bg-base" };
95688
- const _hoisted_12$p = { class: "pa-2 max-h-[300px] overflow-y-auto" };
95689
- const _hoisted_13$k = {
95687
+ const _hoisted_11$x = { key: 0 };
95688
+ const _hoisted_12$p = { class: "c-select-filter__popover w-[350px] rounded flex flex-col bg-base" };
95689
+ const _hoisted_13$k = { class: "pa-2 max-h-[300px] overflow-y-auto" };
95690
+ const _hoisted_14$h = {
95690
95691
  key: 0,
95691
95692
  class: "flex items-center ml-2"
95692
95693
  };
95693
- const _hoisted_14$h = { class: "flex items-center" };
95694
- const _hoisted_15$f = { class: "c-select-filter__popover w-[350px] rounded flex flex-col bg-base" };
95695
- const _hoisted_16$e = { class: "pa-2 max-h-[300px] overflow-y-auto" };
95696
- const _hoisted_17$c = {
95697
- key: 0,
95694
+ const _hoisted_15$f = {
95695
+ key: 2,
95698
95696
  class: "flex items-center ml-2"
95699
95697
  };
95700
- const _hoisted_18$a = { class: "flex flex-col w-full flex-1 min-h-0" };
95701
- const _hoisted_19$a = {
95698
+ const _hoisted_16$e = { class: "flex flex-col w-full flex-1 min-h-0" };
95699
+ const _hoisted_17$c = {
95702
95700
  key: 0,
95703
95701
  class: "flex-1 overflow-y-auto bg-white w-full pl-1 pr-6 py-0"
95704
95702
  };
95705
- const _hoisted_20$9 = { class: "space-y-1 mt-4" };
95706
- const _hoisted_21$7 = ["onClick"];
95707
- const _hoisted_22$5 = { class: "text-sm text-gray-700" };
95708
- const _hoisted_23$5 = { class: "flex items-center mb-0" };
95709
- const _hoisted_24$5 = { class: "text-sm font-bold text-gray-700" };
95710
- const _hoisted_25$5 = ["onClick"];
95711
- const _hoisted_26$5 = {
95703
+ const _hoisted_18$a = { class: "space-y-1 mt-4" };
95704
+ const _hoisted_19$a = ["onClick"];
95705
+ const _hoisted_20$9 = { class: "text-sm text-gray-700" };
95706
+ const _hoisted_21$7 = { class: "flex items-center mb-0" };
95707
+ const _hoisted_22$5 = { class: "text-sm font-bold text-gray-700" };
95708
+ const _hoisted_23$5 = ["onClick"];
95709
+ const _hoisted_24$5 = {
95712
95710
  key: 0,
95713
95711
  class: "relative mr-4"
95714
95712
  };
95715
- const _hoisted_27$5 = {
95713
+ const _hoisted_25$5 = {
95716
95714
  key: 0,
95717
95715
  class: "absolute inset-0 flex items-center justify-center bg-gray-200 bg-opacity-75 border-rounded-1"
95718
95716
  };
95719
- const _hoisted_28$5 = {
95717
+ const _hoisted_26$5 = {
95720
95718
  key: 1,
95721
95719
  class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
95722
95720
  };
95723
- const _hoisted_29$5 = { class: "flex-1 min-w-0" };
95724
- const _hoisted_30$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95725
- const _hoisted_31$4 = { class: "text-xs text-gray-500" };
95726
- const _hoisted_32$4 = {
95721
+ const _hoisted_27$5 = { class: "flex-1 min-w-0" };
95722
+ const _hoisted_28$5 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95723
+ const _hoisted_29$5 = { class: "text-xs text-gray-500" };
95724
+ const _hoisted_30$4 = {
95727
95725
  key: 1,
95728
95726
  class: "flex-1 overflow-y-auto bg-white w-full"
95729
95727
  };
95730
- const _hoisted_33$4 = { class: "w-full px-0" };
95731
- const _hoisted_34$4 = {
95728
+ const _hoisted_31$4 = { class: "w-full px-0" };
95729
+ const _hoisted_32$4 = {
95732
95730
  key: 0,
95733
95731
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95734
95732
  };
95735
- const _hoisted_35$4 = {
95733
+ const _hoisted_33$4 = {
95736
95734
  key: 0,
95737
95735
  class: "mb-0"
95738
95736
  };
95739
- const _hoisted_36$4 = { class: "flex items-center px-0 pt-2 pb-1" };
95740
- const _hoisted_37$4 = { class: "text-m font-semibold text-gray-900" };
95741
- const _hoisted_38$4 = { class: "ml-2 text-sm text-gray-500" };
95742
- const _hoisted_39$4 = ["data-result-selected", "onClick"];
95743
- const _hoisted_40$4 = {
95737
+ const _hoisted_34$4 = { class: "flex items-center px-0 pt-2 pb-1" };
95738
+ const _hoisted_35$4 = { class: "text-m font-semibold text-gray-900" };
95739
+ const _hoisted_36$4 = { class: "ml-2 text-sm text-gray-500" };
95740
+ const _hoisted_37$4 = ["data-result-selected", "onClick"];
95741
+ const _hoisted_38$4 = {
95744
95742
  key: 1,
95745
95743
  class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
95746
95744
  };
95747
- const _hoisted_41$4 = { class: "flex-1 min-w-0" };
95748
- const _hoisted_42$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95749
- const _hoisted_43$4 = ["innerHTML"];
95750
- const _hoisted_44$4 = { class: "text-xs text-gray-500" };
95751
- const _hoisted_45$4 = { class: "text-xs text-gray-400" };
95752
- const _hoisted_46$4 = {
95745
+ const _hoisted_39$4 = { class: "flex-1 min-w-0" };
95746
+ const _hoisted_40$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95747
+ const _hoisted_41$4 = ["innerHTML"];
95748
+ const _hoisted_42$4 = { class: "text-xs text-gray-500" };
95749
+ const _hoisted_43$4 = { class: "text-xs text-gray-400" };
95750
+ const _hoisted_44$4 = {
95753
95751
  key: 0,
95754
95752
  class: "px-0 py-0"
95755
95753
  };
95756
- const _hoisted_47$4 = { key: 1 };
95757
- const _hoisted_48$4 = { class: "flex items-center px-0 pt-2 pb-1" };
95758
- const _hoisted_49$4 = { class: "text-m font-semibold text-gray-900" };
95759
- const _hoisted_50$4 = { class: "ml-2 text-sm text-gray-500" };
95760
- const _hoisted_51$3 = ["data-result-selected", "onClick"];
95761
- const _hoisted_52$3 = { class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center" };
95762
- const _hoisted_53$3 = { class: "flex-1 min-w-0" };
95763
- const _hoisted_54$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95764
- const _hoisted_55$2 = { class: "text-xs text-gray-500" };
95765
- const _hoisted_56$2 = { class: "text-xs text-gray-400" };
95766
- const _hoisted_57$2 = {
95754
+ const _hoisted_45$4 = { key: 1 };
95755
+ const _hoisted_46$4 = { class: "flex items-center px-0 pt-2 pb-1" };
95756
+ const _hoisted_47$4 = { class: "text-m font-semibold text-gray-900" };
95757
+ const _hoisted_48$4 = { class: "ml-2 text-sm text-gray-500" };
95758
+ const _hoisted_49$4 = ["data-result-selected", "onClick"];
95759
+ const _hoisted_50$4 = { class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center" };
95760
+ const _hoisted_51$3 = { class: "flex-1 min-w-0" };
95761
+ const _hoisted_52$3 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95762
+ const _hoisted_53$3 = { class: "text-xs text-gray-500" };
95763
+ const _hoisted_54$2 = { class: "text-xs text-gray-400" };
95764
+ const _hoisted_55$2 = {
95767
95765
  key: 0,
95768
95766
  class: "px-0 py-0"
95769
95767
  };
95770
- const _hoisted_58$2 = {
95768
+ const _hoisted_56$2 = {
95771
95769
  key: 2,
95772
95770
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95773
95771
  };
95774
- const _hoisted_59$2 = {
95772
+ const _hoisted_57$2 = {
95775
95773
  key: 2,
95776
95774
  class: "flex-1 overflow-y-auto bg-white w-full"
95777
95775
  };
95778
- const _hoisted_60$2 = { class: "w-full px-0" };
95779
- const _hoisted_61$2 = {
95776
+ const _hoisted_58$2 = { class: "w-full px-0" };
95777
+ const _hoisted_59$2 = {
95780
95778
  key: 0,
95781
95779
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95782
95780
  };
95783
- const _hoisted_62$2 = { class: "flex items-center px-0 pt-2 pb-1" };
95784
- const _hoisted_63$2 = { class: "text-m font-semibold text-gray-900" };
95785
- const _hoisted_64$2 = { class: "ml-2 text-sm text-gray-500" };
95786
- const _hoisted_65$2 = ["data-result-selected", "onClick"];
95787
- const _hoisted_66$2 = {
95781
+ const _hoisted_60$2 = { class: "flex items-center px-0 pt-2 pb-1" };
95782
+ const _hoisted_61$2 = { class: "text-m font-semibold text-gray-900" };
95783
+ const _hoisted_62$2 = { class: "ml-2 text-sm text-gray-500" };
95784
+ const _hoisted_63$2 = ["data-result-selected", "onClick"];
95785
+ const _hoisted_64$2 = {
95788
95786
  key: 1,
95789
95787
  class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
95790
95788
  };
95791
- const _hoisted_67$2 = { class: "flex-1 min-w-0" };
95792
- const _hoisted_68$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95793
- const _hoisted_69$1 = ["innerHTML"];
95794
- const _hoisted_70$1 = { class: "text-xs text-gray-500" };
95795
- const _hoisted_71$1 = { class: "text-xs text-gray-400" };
95796
- const _hoisted_72$1 = {
95789
+ const _hoisted_65$2 = { class: "flex-1 min-w-0" };
95790
+ const _hoisted_66$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95791
+ const _hoisted_67$2 = ["innerHTML"];
95792
+ const _hoisted_68$2 = { class: "text-xs text-gray-500" };
95793
+ const _hoisted_69$1 = { class: "text-xs text-gray-400" };
95794
+ const _hoisted_70$1 = {
95797
95795
  key: 0,
95798
95796
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95799
95797
  };
95800
- const _hoisted_73$1 = {
95798
+ const _hoisted_71$1 = {
95801
95799
  key: 0,
95802
95800
  class: "flex flex-wrap line-height-6 pt-4 pb-2 px-6 border-t border-gray-200 gap-y-4 gap-x-4"
95803
95801
  };
@@ -95821,10 +95819,9 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95821
95819
  const showRecentView = ref(true);
95822
95820
  const suggestionsDropdownRef = ref(null);
95823
95821
  const searchInputRef = ref(null);
95824
- const selectedFileType = ref(null);
95822
+ const selectedFileTypes = ref([]);
95825
95823
  const showFileTypeDropdown = ref(false);
95826
- const selectedCanvasFilter = ref(null);
95827
- const showCanvasTypeDropdown = ref(false);
95824
+ const selectedCanvasFilters = ref([]);
95828
95825
  const fileTypeOptions = [
95829
95826
  { label: "Folder", value: "folder" },
95830
95827
  { label: "PDF", value: "pdf" },
@@ -95837,55 +95834,17 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95837
95834
  { label: "AR", value: "ar" },
95838
95835
  { label: "Web", value: "web" }
95839
95836
  ];
95840
- const canvasTypeOptions = computed(() => {
95841
- const options = [
95842
- { label: t("canvasUI.CAlgoliaSearch.canvasFilters.templates"), value: "template" },
95843
- { label: t("canvasUI.CAlgoliaSearch.canvasFilters.products"), value: "section" },
95844
- { label: t("canvasUI.CAlgoliaSearch.canvasFilters.blocks"), value: "block" }
95845
- ];
95846
- if (!props.isAdmin) {
95847
- options.unshift({ label: t("canvasUI.CAlgoliaSearch.canvasFilters.saved"), value: "saved_canvas" });
95848
- }
95849
- if (props.isAdmin) {
95850
- options.splice(1, 0, {
95851
- label: t("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates"),
95852
- value: "product_template"
95853
- });
95854
- }
95855
- return options;
95856
- });
95857
- const ALLOWED_CANVAS_TYPES = ["saved_canvas", "template", "product_template", "section", "block"];
95858
- const ALLOWED_FILE_TYPES = [
95859
- "folder",
95860
- "pdf",
95861
- "image",
95862
- "audio",
95863
- "video",
95864
- "document",
95865
- "presentation",
95866
- "spreadsheet",
95867
- "ar",
95868
- "web"
95869
- ];
95870
- const visibleCanvasTypeOptions = computed(() => {
95871
- if (showRecentView.value || !searchQuery.value.trim()) {
95872
- return canvasTypeOptions.value;
95873
- }
95874
- return canvasTypeOptions.value.filter((option) => availableCanvasTypes.value.has(option.value));
95875
- });
95876
- const hasActiveFilters = computed(() => selectedFileType.value !== null || selectedCanvasFilter.value !== null);
95837
+ const hasActiveFilters = computed(() => selectedFileTypes.value.length > 0 || selectedCanvasFilters.value.length > 0);
95877
95838
  const clearAllFilters = () => {
95878
- selectedFileType.value = null;
95879
- selectedCanvasFilter.value = null;
95839
+ selectedFileTypes.value = [];
95840
+ selectedCanvasFilters.value = [];
95880
95841
  debouncedFilterSearch();
95881
95842
  };
95882
95843
  const handleEverywhereClick = async () => {
95883
- selectedFileType.value = null;
95884
- selectedCanvasFilter.value = null;
95844
+ selectedFileTypes.value = [];
95845
+ selectedCanvasFilters.value = [];
95885
95846
  searchType.value = null;
95886
- if (searchQuery.value.trim() && (unfilteredContentResults.value.length > 0 || unfilteredCanvasResults.value.length > 0)) {
95887
- applyFiltersToResults();
95888
- } else if (searchQuery.value.trim()) {
95847
+ if (searchQuery.value.trim()) {
95889
95848
  try {
95890
95849
  skipNextSuggestionFetch.value = true;
95891
95850
  await performSearch(searchQuery.value);
@@ -96021,11 +95980,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96021
95980
  };
96022
95981
  const contentResults = ref([]);
96023
95982
  const canvasResults = ref([]);
96024
- const unfilteredContentResults = ref([]);
96025
- const unfilteredCanvasResults = ref([]);
96026
95983
  const isSearching = ref(false);
96027
95984
  const hasSearchCompleted = ref(false);
96028
- let currentSearchId = 0;
96029
95985
  const querySuggestions = ref([]);
96030
95986
  const selectedSuggestionIndex = ref(-1);
96031
95987
  const selectedResultIndex = ref(-1);
@@ -96042,44 +95998,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96042
95998
  }
96043
95999
  return canvasResults.value;
96044
96000
  });
96045
- const availableFileTypes = computed(() => {
96046
- if (showRecentView.value || !searchQuery.value.trim()) {
96047
- return /* @__PURE__ */ new Set();
96048
- }
96049
- const types = /* @__PURE__ */ new Set();
96050
- unfilteredContentResults.value.forEach((item) => {
96051
- if (item.type === "folder") {
96052
- types.add("folder");
96053
- } else if (item.type === "file" && item.file_category) {
96054
- types.add(item.file_category);
96055
- }
96056
- });
96057
- return types;
96058
- });
96059
- const availableCanvasTypes = computed(() => {
96060
- if (showRecentView.value || !searchQuery.value.trim()) {
96061
- return /* @__PURE__ */ new Set();
96062
- }
96063
- const types = /* @__PURE__ */ new Set();
96064
- unfilteredCanvasResults.value.forEach((item) => {
96065
- if (item.content_type) {
96066
- types.add(item.content_type);
96067
- }
96068
- });
96069
- return types;
96070
- });
96071
- const visibleFileTypeOptions = computed(() => {
96072
- if (showRecentView.value || !searchQuery.value.trim()) {
96073
- return fileTypeOptions;
96074
- }
96075
- return fileTypeOptions.filter((option) => availableFileTypes.value.has(option.value));
96076
- });
96077
- const hasContentFilters = computed(() => {
96078
- return visibleFileTypeOptions.value.length > 0 || selectedFileType.value !== null;
96079
- });
96080
- const hasCanvasFilters = computed(() => {
96081
- return visibleCanvasTypeOptions.value.length > 0 || selectedCanvasFilter.value !== null;
96082
- });
96083
96001
  const shouldShowNoResults = computed(() => {
96084
96002
  if (showRecentView.value || !searchQuery.value.trim() || isSearching.value || !hasSearchCompleted.value) return false;
96085
96003
  if (searchType.value === "content") {
@@ -96123,30 +96041,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96123
96041
  };
96124
96042
  watch(searchType, () => {
96125
96043
  selectedResultIndex.value = -1;
96126
- showFileTypeDropdown.value = false;
96127
- showCanvasTypeDropdown.value = false;
96128
- });
96129
- watch(visibleFileTypeOptions, (newOptions) => {
96130
- if (selectedFileType.value) {
96131
- const isStillAvailable = newOptions.some((option) => option.value === selectedFileType.value);
96132
- if (!isStillAvailable) {
96133
- selectedFileType.value = null;
96134
- if (searchQuery.value.trim()) {
96135
- performSearch(searchQuery.value.trim());
96136
- }
96137
- }
96138
- }
96139
- });
96140
- watch(visibleCanvasTypeOptions, (newOptions) => {
96141
- if (selectedCanvasFilter.value) {
96142
- const isStillAvailable = newOptions.some((option) => option.value === selectedCanvasFilter.value);
96143
- if (!isStillAvailable) {
96144
- selectedCanvasFilter.value = null;
96145
- if (searchQuery.value.trim()) {
96146
- performSearch(searchQuery.value.trim());
96147
- }
96148
- }
96149
- }
96150
96044
  });
96151
96045
  const scrollSelectedResultIntoView = () => {
96152
96046
  nextTick(() => {
@@ -96190,8 +96084,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96190
96084
  if (!query.trim()) {
96191
96085
  contentResults.value = [];
96192
96086
  canvasResults.value = [];
96193
- unfilteredContentResults.value = [];
96194
- unfilteredCanvasResults.value = [];
96195
96087
  hasSearchCompleted.value = false;
96196
96088
  isSearching.value = false;
96197
96089
  searchError.value = null;
@@ -96200,47 +96092,59 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96200
96092
  isSearching.value = true;
96201
96093
  hasSearchCompleted.value = false;
96202
96094
  searchError.value = null;
96203
- const searchId = ++currentSearchId;
96204
96095
  const shouldSkipSuggestionFetch = skipNextSuggestionFetch.value;
96205
96096
  if (shouldSkipSuggestionFetch) {
96206
96097
  skipNextSuggestionFetch.value = false;
96207
96098
  }
96208
96099
  try {
96209
- const validCanvasFilter = selectedCanvasFilter.value && ALLOWED_CANVAS_TYPES.includes(selectedCanvasFilter.value) ? selectedCanvasFilter.value : null;
96210
- if (selectedCanvasFilter.value && !validCanvasFilter) {
96211
- console.warn("[CAlgoliaSearch] Selected canvas filter is invalid and was removed:", selectedCanvasFilter.value);
96212
- selectedCanvasFilter.value = null;
96213
- }
96214
- const validFileType = selectedFileType.value && ALLOWED_FILE_TYPES.includes(selectedFileType.value) ? selectedFileType.value : null;
96215
- if (selectedFileType.value && !validFileType) {
96216
- console.warn("[CAlgoliaSearch] Selected file type filter is invalid and was removed:", selectedFileType.value);
96217
- selectedFileType.value = null;
96100
+ const ALLOWED_CANVAS_TYPES = ["saved_canvas", "template", "product_template", "section", "block"];
96101
+ const ALLOWED_FILE_TYPES = [
96102
+ "folder",
96103
+ "pdf",
96104
+ "image",
96105
+ "audio",
96106
+ "video",
96107
+ "document",
96108
+ "presentation",
96109
+ "spreadsheet",
96110
+ "ar",
96111
+ "web"
96112
+ ];
96113
+ const validCanvasFilters = selectedCanvasFilters.value.filter((f) => ALLOWED_CANVAS_TYPES.includes(f));
96114
+ if (selectedCanvasFilters.value.length > 0 && validCanvasFilters.length === 0) {
96115
+ console.warn(
96116
+ "[CAlgoliaSearch] All selected canvas filters are invalid and were removed:",
96117
+ selectedCanvasFilters.value
96118
+ );
96119
+ selectedCanvasFilters.value = [];
96120
+ } else if (validCanvasFilters.length < selectedCanvasFilters.value.length) {
96121
+ const removedFilters = selectedCanvasFilters.value.filter((f) => !validCanvasFilters.includes(f));
96122
+ console.warn("[CAlgoliaSearch] Some canvas filters were invalid and removed:", removedFilters);
96123
+ selectedCanvasFilters.value = validCanvasFilters;
96124
+ }
96125
+ const canvasFilters = validCanvasFilters.length > 0 ? ` AND (${validCanvasFilters.map((filter) => `content_type:"${filter}"`).join(" OR ")})` : "";
96126
+ const validFileTypes = selectedFileTypes.value.filter((t2) => ALLOWED_FILE_TYPES.includes(t2));
96127
+ if (selectedFileTypes.value.length > 0 && validFileTypes.length === 0) {
96128
+ console.warn(
96129
+ "[CAlgoliaSearch] All selected file type filters are invalid and were removed:",
96130
+ selectedFileTypes.value
96131
+ );
96132
+ selectedFileTypes.value = [];
96133
+ } else if (validFileTypes.length < selectedFileTypes.value.length) {
96134
+ const removedFilters = selectedFileTypes.value.filter((t2) => !validFileTypes.includes(t2));
96135
+ console.warn("[CAlgoliaSearch] Some file type filters were invalid and removed:", removedFilters);
96136
+ selectedFileTypes.value = validFileTypes;
96218
96137
  }
96138
+ const contentFilters = validFileTypes.length > 0 ? ` AND (${validFileTypes.map((type) => type === "folder" ? `type:"${type}"` : `file_category:"${type}"`).join(" OR ")})` : "";
96219
96139
  const results = await searchViaBackend(query.trim(), {
96220
- canvas: "",
96221
- content: ""
96140
+ canvas: canvasFilters,
96141
+ content: contentFilters
96222
96142
  });
96223
96143
  if (query.trim() !== searchQuery.value.trim()) {
96224
96144
  return;
96225
96145
  }
96226
- unfilteredContentResults.value = results.content?.hits || [];
96227
- unfilteredCanvasResults.value = results.canvas?.hits || [];
96228
- let filteredContent = unfilteredContentResults.value;
96229
- let filteredCanvas = unfilteredCanvasResults.value;
96230
- if (validFileType) {
96231
- filteredContent = filteredContent.filter((item) => {
96232
- if (validFileType === "folder") {
96233
- return item.type === "folder";
96234
- } else {
96235
- return item.type === "file" && item.file_category === validFileType;
96236
- }
96237
- });
96238
- }
96239
- if (validCanvasFilter) {
96240
- filteredCanvas = filteredCanvas.filter((item) => item.content_type === validCanvasFilter);
96241
- }
96242
- contentResults.value = filteredContent;
96243
- canvasResults.value = filteredCanvas;
96146
+ contentResults.value = results.content?.hits || [];
96147
+ canvasResults.value = results.canvas?.hits || [];
96244
96148
  selectedResultIndex.value = -1;
96245
96149
  searchError.value = null;
96246
96150
  if (query.trim().length >= 2 && !shouldSkipSuggestionFetch) {
@@ -96253,27 +96157,23 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96253
96157
  }
96254
96158
  await nextTick();
96255
96159
  setTimeout(() => {
96256
- if (searchId === currentSearchId) {
96257
- isSearching.value = false;
96258
- hasSearchCompleted.value = true;
96259
- }
96160
+ isSearching.value = false;
96161
+ hasSearchCompleted.value = true;
96260
96162
  }, 50);
96261
96163
  } catch (error) {
96262
96164
  console.error("Search error:", error);
96263
- if (searchId === currentSearchId) {
96264
- contentResults.value = [];
96265
- canvasResults.value = [];
96266
- isSearching.value = false;
96267
- hasSearchCompleted.value = true;
96268
- if (error.message === "AUTH_REQUIRED") {
96269
- searchError.value = "Please sign in to search";
96270
- } else if (error.message === "AUTH_EXPIRED") {
96271
- searchError.value = "Your session has expired. Please sign in again";
96272
- } else if (error.message === "AUTH_FORBIDDEN") {
96273
- searchError.value = "You do not have permission to search this instance";
96274
- } else {
96275
- searchError.value = "Search failed. Please try again";
96276
- }
96165
+ contentResults.value = [];
96166
+ canvasResults.value = [];
96167
+ isSearching.value = false;
96168
+ hasSearchCompleted.value = true;
96169
+ if (error.message === "AUTH_REQUIRED") {
96170
+ searchError.value = "Please sign in to search";
96171
+ } else if (error.message === "AUTH_EXPIRED") {
96172
+ searchError.value = "Your session has expired. Please sign in again";
96173
+ } else if (error.message === "AUTH_FORBIDDEN") {
96174
+ searchError.value = "You do not have permission to search this instance";
96175
+ } else {
96176
+ searchError.value = "Search failed. Please try again";
96277
96177
  }
96278
96178
  }
96279
96179
  };
@@ -96283,36 +96183,19 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96283
96183
  if (!query || typeof query !== "string") return "";
96284
96184
  return query;
96285
96185
  }
96286
- function applyFiltersToResults() {
96287
- if (unfilteredContentResults.value.length === 0 && unfilteredCanvasResults.value.length === 0) {
96288
- return;
96289
- }
96290
- const validFileType = selectedFileType.value ? ALLOWED_FILE_TYPES.includes(selectedFileType.value) ? selectedFileType.value : null : null;
96291
- const validCanvasFilter = selectedCanvasFilter.value ? ALLOWED_CANVAS_TYPES.includes(selectedCanvasFilter.value) ? selectedCanvasFilter.value : null : null;
96292
- let filteredContent = unfilteredContentResults.value;
96293
- let filteredCanvas = unfilteredCanvasResults.value;
96294
- if (validFileType) {
96295
- filteredContent = filteredContent.filter((item) => {
96296
- if (validFileType === "folder") {
96297
- return item.type === "folder";
96298
- } else {
96299
- return item.type === "file" && item.file_category === validFileType;
96300
- }
96301
- });
96302
- }
96303
- if (validCanvasFilter) {
96304
- filteredCanvas = filteredCanvas.filter((item) => item.content_type === validCanvasFilter);
96305
- }
96306
- contentResults.value = filteredContent;
96307
- canvasResults.value = filteredCanvas;
96308
- selectedResultIndex.value = -1;
96309
- }
96310
96186
  const debouncedFilterSearch = () => {
96311
96187
  if (filterChangeTimer) clearTimeout(filterChangeTimer);
96312
96188
  if (searchTimer) clearTimeout(searchTimer);
96313
96189
  filterChangeTimer = setTimeout(async () => {
96314
96190
  if (searchQuery.value.trim() && !showRecentView.value) {
96315
- applyFiltersToResults();
96191
+ try {
96192
+ skipNextSuggestionFetch.value = true;
96193
+ await performSearch(searchQuery.value);
96194
+ } catch (error) {
96195
+ console.error("[debouncedFilterSearch] Search failed:", error);
96196
+ } finally {
96197
+ skipNextSuggestionFetch.value = false;
96198
+ }
96316
96199
  }
96317
96200
  }, 500);
96318
96201
  };
@@ -96338,8 +96221,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96338
96221
  showRecentView.value = true;
96339
96222
  contentResults.value = [];
96340
96223
  canvasResults.value = [];
96341
- unfilteredContentResults.value = [];
96342
- unfilteredCanvasResults.value = [];
96343
96224
  querySuggestions.value = [];
96344
96225
  selectedSuggestionIndex.value = -1;
96345
96226
  selectedResultIndex.value = -1;
@@ -96353,8 +96234,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96353
96234
  showRecentView.value = true;
96354
96235
  contentResults.value = [];
96355
96236
  canvasResults.value = [];
96356
- unfilteredContentResults.value = [];
96357
- unfilteredCanvasResults.value = [];
96358
96237
  querySuggestions.value = [];
96359
96238
  selectedSuggestionIndex.value = -1;
96360
96239
  selectedResultIndex.value = -1;
@@ -96479,23 +96358,33 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96479
96358
  if (endChar < highlightValue.length) truncated = truncated + "...";
96480
96359
  return sanitizeHtml(truncated);
96481
96360
  };
96482
- const handleCanvasTypeChange = (value) => {
96483
- selectedCanvasFilter.value = value;
96484
- showCanvasTypeDropdown.value = false;
96361
+ const toggleCanvasFilter = (filterType) => {
96362
+ if (selectedCanvasFilters.value.includes(filterType)) {
96363
+ selectedCanvasFilters.value.splice(selectedCanvasFilters.value.indexOf(filterType), 1);
96364
+ } else {
96365
+ selectedCanvasFilters.value.push(filterType);
96366
+ }
96485
96367
  debouncedFilterSearch();
96486
96368
  };
96487
- const clearCanvasFilter = () => {
96488
- selectedCanvasFilter.value = null;
96489
- showCanvasTypeDropdown.value = false;
96369
+ const clearCanvasFilters = () => {
96370
+ selectedCanvasFilters.value = [];
96490
96371
  debouncedFilterSearch();
96491
96372
  };
96492
- const handleFileTypeChange = (value) => {
96493
- selectedFileType.value = value;
96494
- showFileTypeDropdown.value = false;
96373
+ const toggleFileType = (fileType, checked) => {
96374
+ if (checked) {
96375
+ if (!selectedFileTypes.value.includes(fileType)) {
96376
+ selectedFileTypes.value.push(fileType);
96377
+ }
96378
+ } else {
96379
+ const index = selectedFileTypes.value.indexOf(fileType);
96380
+ if (index > -1) {
96381
+ selectedFileTypes.value.splice(index, 1);
96382
+ }
96383
+ }
96495
96384
  debouncedFilterSearch();
96496
96385
  };
96497
- const clearFileType = () => {
96498
- selectedFileType.value = null;
96386
+ const clearFileTypes = () => {
96387
+ selectedFileTypes.value = [];
96499
96388
  showFileTypeDropdown.value = false;
96500
96389
  debouncedFilterSearch();
96501
96390
  };
@@ -96664,7 +96553,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96664
96553
  show: "",
96665
96554
  verticalAlignment: "top",
96666
96555
  "z-index": _ctx.zIndex,
96667
- "onUpdate:show": _cache[14] || (_cache[14] = ($event) => emit("toggleSearch", $event))
96556
+ "onUpdate:show": _cache[15] || (_cache[15] = ($event) => emit("toggleSearch", $event))
96668
96557
  }, {
96669
96558
  default: withCtx(() => [
96670
96559
  createElementVNode("div", {
@@ -96673,7 +96562,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96673
96562
  }, [
96674
96563
  createElementVNode("div", _hoisted_1$4w, [
96675
96564
  createElementVNode("div", _hoisted_2$3j, [
96676
- _cache[15] || (_cache[15] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
96565
+ _cache[16] || (_cache[16] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
96677
96566
  createElementVNode("i", { class: "c-icon far fa-search text-gray-400 text-l" })
96678
96567
  ], -1)),
96679
96568
  withDirectives(createElementVNode("input", {
@@ -96770,7 +96659,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96770
96659
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.tabs.pitchDecks")), 1)
96771
96660
  ], 2)) : createCommentVNode("", true)
96772
96661
  ]),
96773
- searchType.value && (searchType.value === "content" && hasContentFilters.value || searchType.value === "canvases" && hasCanvasFilters.value) ? (openBlock(), createElementBlock("div", _hoisted_9$O, [
96662
+ searchType.value ? (openBlock(), createElementBlock("div", _hoisted_9$O, [
96774
96663
  searchType.value === "content" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
96775
96664
  createVNode(unref(NPopover), {
96776
96665
  class: "c-select-filter",
@@ -96779,13 +96668,13 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96779
96668
  show: showFileTypeDropdown.value,
96780
96669
  "show-arrow": false,
96781
96670
  trigger: "manual",
96782
- onClickoutside: _cache[8] || (_cache[8] = ($event) => showFileTypeDropdown.value = false)
96671
+ onClickoutside: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = false)
96783
96672
  }, {
96784
96673
  trigger: withCtx(() => [
96785
96674
  createVNode(unref(NTag), {
96786
96675
  class: "select-none cursor-pointer",
96787
96676
  style: normalizeStyle({
96788
- "--n-color": selectedFileType.value ? "var(--p-primary5)" : "var(--p-primary6)",
96677
+ "--n-color": selectedFileTypes.value.length ? "var(--p-primary5)" : "var(--p-primary6)",
96789
96678
  "--n-border": "1px solid var(--p-primary5)",
96790
96679
  "--n-height": "28px"
96791
96680
  }),
@@ -96796,42 +96685,34 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96796
96685
  }, {
96797
96686
  default: withCtx(() => [
96798
96687
  createElementVNode("div", _hoisted_10$C, [
96799
- createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1)
96688
+ createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1),
96689
+ selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true)
96800
96690
  ])
96801
96691
  ]),
96802
96692
  _: 1
96803
96693
  }, 8, ["style"])
96804
96694
  ]),
96805
96695
  default: withCtx(() => [
96806
- createElementVNode("div", _hoisted_11$x, [
96807
- createElementVNode("div", _hoisted_12$p, [
96808
- createVNode(unref(NRadioGroup), {
96809
- value: selectedFileType.value,
96810
- "onUpdate:value": [
96811
- _cache[7] || (_cache[7] = ($event) => selectedFileType.value = $event),
96812
- handleFileTypeChange
96813
- ]
96814
- }, {
96815
- default: withCtx(() => [
96816
- (openBlock(true), createElementBlock(Fragment, null, renderList(visibleFileTypeOptions.value, (option) => {
96817
- return openBlock(), createElementBlock("div", {
96818
- key: option.value,
96819
- class: "w-full h-7 flex items-center"
96820
- }, [
96821
- createVNode(unref(NRadio), {
96822
- class: "px-2 truncate",
96823
- value: option.value
96824
- }, {
96825
- default: withCtx(() => [
96826
- createTextVNode(toDisplayString(option.label), 1)
96827
- ]),
96828
- _: 2
96829
- }, 1032, ["value"])
96830
- ]);
96831
- }), 128))
96832
- ]),
96833
- _: 1
96834
- }, 8, ["value"])
96696
+ createElementVNode("div", _hoisted_12$p, [
96697
+ createElementVNode("div", _hoisted_13$k, [
96698
+ (openBlock(), createElementBlock(Fragment, null, renderList(fileTypeOptions, (option) => {
96699
+ return createElementVNode("div", {
96700
+ key: option.value,
96701
+ class: "w-full h-7 flex items-center"
96702
+ }, [
96703
+ createVNode(unref(NCheckbox), {
96704
+ checked: selectedFileTypes.value.includes(option.value),
96705
+ class: "px-2 truncate",
96706
+ "onUpdate:checked": (v) => toggleFileType(option.value, v),
96707
+ value: option.value
96708
+ }, {
96709
+ default: withCtx(() => [
96710
+ createTextVNode(toDisplayString(option.label), 1)
96711
+ ]),
96712
+ _: 2
96713
+ }, 1032, ["checked", "onUpdate:checked", "value"])
96714
+ ]);
96715
+ }), 64))
96835
96716
  ]),
96836
96717
  createElementVNode("div", {
96837
96718
  class: "pa-2",
@@ -96841,7 +96722,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96841
96722
  block: "",
96842
96723
  class: "pa-2",
96843
96724
  text: "",
96844
- onClick: clearFileType
96725
+ onClick: clearFileTypes
96845
96726
  }, {
96846
96727
  default: withCtx(() => [
96847
96728
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
@@ -96853,109 +96734,115 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96853
96734
  ]),
96854
96735
  _: 1
96855
96736
  }, 8, ["show"]),
96856
- hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_13$k, [
96857
- _cache[16] || (_cache[16] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96737
+ hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_14$h, [
96738
+ _cache[17] || (_cache[17] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96858
96739
  createElementVNode("span", {
96859
96740
  class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
96860
96741
  onClick: clearAllFilters
96861
96742
  }, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
96862
96743
  ])) : createCommentVNode("", true)
96863
96744
  ], 64)) : searchType.value === "canvases" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
96864
- createVNode(unref(NPopover), {
96865
- class: "c-select-filter",
96866
- placement: "bottom-start",
96867
- raw: "",
96868
- show: showCanvasTypeDropdown.value,
96869
- "show-arrow": false,
96870
- trigger: "manual",
96871
- onClickoutside: _cache[11] || (_cache[11] = ($event) => showCanvasTypeDropdown.value = false)
96745
+ !_ctx.isAdmin ? (openBlock(), createBlock(unref(NTag), {
96746
+ key: 0,
96747
+ class: "select-none cursor-pointer",
96748
+ style: normalizeStyle({
96749
+ "--n-color": selectedCanvasFilters.value.includes("saved_canvas") ? "var(--p-primary5)" : "var(--p-primary6)",
96750
+ "--n-border": "1px solid var(--p-primary5)",
96751
+ "--n-height": "28px"
96752
+ }),
96753
+ themeOverrides: {
96754
+ borderRadius: "4px"
96755
+ },
96756
+ onClick: _cache[8] || (_cache[8] = ($event) => toggleCanvasFilter("saved_canvas"))
96872
96757
  }, {
96873
- trigger: withCtx(() => [
96874
- createVNode(unref(NTag), {
96875
- class: "select-none cursor-pointer",
96876
- style: normalizeStyle({
96877
- "--n-color": selectedCanvasFilter.value ? "var(--p-primary5)" : "var(--p-primary6)",
96878
- "--n-border": "1px solid var(--p-primary5)",
96879
- "--n-height": "28px"
96880
- }),
96881
- themeOverrides: {
96882
- borderRadius: "4px"
96883
- },
96884
- onClick: _cache[9] || (_cache[9] = ($event) => showCanvasTypeDropdown.value = !showCanvasTypeDropdown.value)
96885
- }, {
96886
- default: withCtx(() => [
96887
- createElementVNode("div", _hoisted_14$h, [
96888
- createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1)
96889
- ])
96890
- ]),
96891
- _: 1
96892
- }, 8, ["style"])
96758
+ default: withCtx(() => [
96759
+ createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 1)
96893
96760
  ]),
96761
+ _: 1
96762
+ }, 8, ["style"])) : createCommentVNode("", true),
96763
+ createVNode(unref(NTag), {
96764
+ class: "select-none cursor-pointer",
96765
+ style: normalizeStyle({
96766
+ "--n-color": selectedCanvasFilters.value.includes("template") ? "var(--p-primary5)" : "var(--p-primary6)",
96767
+ "--n-border": "1px solid var(--p-primary5)",
96768
+ "--n-height": "28px"
96769
+ }),
96770
+ themeOverrides: {
96771
+ borderRadius: "4px"
96772
+ },
96773
+ onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("template"))
96774
+ }, {
96894
96775
  default: withCtx(() => [
96895
- createElementVNode("div", _hoisted_15$f, [
96896
- createElementVNode("div", _hoisted_16$e, [
96897
- createVNode(unref(NRadioGroup), {
96898
- value: selectedCanvasFilter.value,
96899
- "onUpdate:value": [
96900
- _cache[10] || (_cache[10] = ($event) => selectedCanvasFilter.value = $event),
96901
- handleCanvasTypeChange
96902
- ]
96903
- }, {
96904
- default: withCtx(() => [
96905
- (openBlock(true), createElementBlock(Fragment, null, renderList(visibleCanvasTypeOptions.value, (option) => {
96906
- return openBlock(), createElementBlock("div", {
96907
- key: option.value,
96908
- class: "w-full h-7 flex items-center"
96909
- }, [
96910
- createVNode(unref(NRadio), {
96911
- class: "px-2 truncate",
96912
- value: option.value
96913
- }, {
96914
- default: withCtx(() => [
96915
- createTextVNode(toDisplayString(option.label), 1)
96916
- ]),
96917
- _: 2
96918
- }, 1032, ["value"])
96919
- ]);
96920
- }), 128))
96921
- ]),
96922
- _: 1
96923
- }, 8, ["value"])
96924
- ]),
96925
- createElementVNode("div", {
96926
- class: "pa-2",
96927
- style: normalizeStyle({ borderTop: `1px solid ${unref(themeVars).primary5}` })
96928
- }, [
96929
- createVNode(CButton, {
96930
- block: "",
96931
- class: "pa-2",
96932
- text: "",
96933
- onClick: clearCanvasFilter
96934
- }, {
96935
- default: withCtx(() => [
96936
- createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
96937
- ]),
96938
- _: 1
96939
- })
96940
- ], 4)
96941
- ])
96776
+ createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 1)
96942
96777
  ]),
96943
96778
  _: 1
96944
- }, 8, ["show"]),
96945
- hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_17$c, [
96946
- _cache[17] || (_cache[17] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96779
+ }, 8, ["style"]),
96780
+ _ctx.isAdmin ? (openBlock(), createBlock(unref(NTag), {
96781
+ key: 1,
96782
+ class: "select-none cursor-pointer",
96783
+ style: normalizeStyle({
96784
+ "--n-color": selectedCanvasFilters.value.includes("product_template") ? "var(--p-primary5)" : "var(--p-primary6)",
96785
+ "--n-border": "1px solid var(--p-primary5)",
96786
+ "--n-height": "28px"
96787
+ }),
96788
+ themeOverrides: {
96789
+ borderRadius: "4px"
96790
+ },
96791
+ onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("product_template"))
96792
+ }, {
96793
+ default: withCtx(() => [
96794
+ createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates")), 1)
96795
+ ]),
96796
+ _: 1
96797
+ }, 8, ["style"])) : createCommentVNode("", true),
96798
+ createVNode(unref(NTag), {
96799
+ class: "select-none cursor-pointer",
96800
+ style: normalizeStyle({
96801
+ "--n-color": selectedCanvasFilters.value.includes("section") ? "var(--p-primary5)" : "var(--p-primary6)",
96802
+ "--n-border": "1px solid var(--p-primary5)",
96803
+ "--n-height": "28px"
96804
+ }),
96805
+ themeOverrides: {
96806
+ borderRadius: "4px"
96807
+ },
96808
+ onClick: _cache[11] || (_cache[11] = ($event) => toggleCanvasFilter("section"))
96809
+ }, {
96810
+ default: withCtx(() => [
96811
+ createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.products")), 1)
96812
+ ]),
96813
+ _: 1
96814
+ }, 8, ["style"]),
96815
+ createVNode(unref(NTag), {
96816
+ class: "select-none cursor-pointer",
96817
+ style: normalizeStyle({
96818
+ "--n-color": selectedCanvasFilters.value.includes("block") ? "var(--p-primary5)" : "var(--p-primary6)",
96819
+ "--n-border": "1px solid var(--p-primary5)",
96820
+ "--n-height": "28px"
96821
+ }),
96822
+ themeOverrides: {
96823
+ borderRadius: "4px"
96824
+ },
96825
+ onClick: _cache[12] || (_cache[12] = ($event) => toggleCanvasFilter("block"))
96826
+ }, {
96827
+ default: withCtx(() => [
96828
+ createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.blocks")), 1)
96829
+ ]),
96830
+ _: 1
96831
+ }, 8, ["style"]),
96832
+ selectedCanvasFilters.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_15$f, [
96833
+ _cache[18] || (_cache[18] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96947
96834
  createElementVNode("span", {
96948
96835
  class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
96949
- onClick: clearAllFilters
96836
+ onClick: clearCanvasFilters
96950
96837
  }, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
96951
96838
  ])) : createCommentVNode("", true)
96952
96839
  ], 64)) : createCommentVNode("", true)
96953
96840
  ])) : createCommentVNode("", true)
96954
96841
  ])) : createCommentVNode("", true)
96955
96842
  ]),
96956
- createElementVNode("div", _hoisted_18$a, [
96957
- showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_19$a, [
96958
- createElementVNode("div", _hoisted_20$9, [
96843
+ createElementVNode("div", _hoisted_16$e, [
96844
+ showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_17$c, [
96845
+ createElementVNode("div", _hoisted_18$a, [
96959
96846
  (openBlock(true), createElementBlock(Fragment, null, renderList(recentSearches.value, (search) => {
96960
96847
  return openBlock(), createElementBlock("div", {
96961
96848
  key: search,
@@ -96968,14 +96855,14 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96968
96855
  icon: "clock-rotate-left",
96969
96856
  size: "16"
96970
96857
  }),
96971
- createElementVNode("span", _hoisted_22$5, toDisplayString(search), 1)
96972
- ], 8, _hoisted_21$7);
96858
+ createElementVNode("span", _hoisted_20$9, toDisplayString(search), 1)
96859
+ ], 8, _hoisted_19$a);
96973
96860
  }), 128))
96974
96861
  ]),
96975
96862
  recentlyOpenedDocs.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
96976
- _cache[18] || (_cache[18] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
96977
- createElementVNode("div", _hoisted_23$5, [
96978
- createElementVNode("span", _hoisted_24$5, toDisplayString(unref(t)("canvasUI.components.fileViewer.recentlyOpened")), 1)
96863
+ _cache[19] || (_cache[19] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
96864
+ createElementVNode("div", _hoisted_21$7, [
96865
+ createElementVNode("span", _hoisted_22$5, toDisplayString(unref(t)("canvasUI.components.fileViewer.recentlyOpened")), 1)
96979
96866
  ]),
96980
96867
  createElementVNode("div", {
96981
96868
  class: normalizeClass(_ctx.isAdmin ? "space-y-2" : "space-y-0")
@@ -96989,7 +96876,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96989
96876
  ]),
96990
96877
  onClick: ($event) => handleRecentDocClick(doc, doc.type)
96991
96878
  }, [
96992
- doc.type === "file" ? (openBlock(), createElementBlock("div", _hoisted_26$5, [
96879
+ doc.type === "file" ? (openBlock(), createElementBlock("div", _hoisted_24$5, [
96993
96880
  createVNode(_sfc_main$6K, {
96994
96881
  class: "h-14 border-rounded-1 overflow-hidden flex-0",
96995
96882
  cover: "",
@@ -96998,7 +96885,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96998
96885
  src: recentThumbnails.value[doc.id] || "",
96999
96886
  width: "72"
97000
96887
  }, null, 8, ["file-data", "src"]),
97001
- isLoadingThumbnails.value && !recentThumbnails.value[doc.id] ? (openBlock(), createElementBlock("div", _hoisted_27$5, [
96888
+ isLoadingThumbnails.value && !recentThumbnails.value[doc.id] ? (openBlock(), createElementBlock("div", _hoisted_25$5, [
97002
96889
  createVNode(CIcon, {
97003
96890
  class: "animate-spin",
97004
96891
  color: "var(--p-primary)",
@@ -97006,7 +96893,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97006
96893
  size: "20"
97007
96894
  })
97008
96895
  ])) : createCommentVNode("", true)
97009
- ])) : (openBlock(), createElementBlock("div", _hoisted_28$5, [
96896
+ ])) : (openBlock(), createElementBlock("div", _hoisted_26$5, [
97010
96897
  doc.type === "canvas" ? (openBlock(), createBlock(CIcon, {
97011
96898
  key: 0,
97012
96899
  color: "var(--p-text2)",
@@ -97019,33 +96906,33 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97019
96906
  size: "32"
97020
96907
  }))
97021
96908
  ])),
97022
- createElementVNode("div", _hoisted_29$5, [
97023
- createElementVNode("h3", _hoisted_30$4, toDisplayString(doc.name), 1),
97024
- createElementVNode("p", _hoisted_31$4, toDisplayString(doc.type === "canvas" ? formatCanvasType(doc.content_type) : doc.type === "folder" ? "Folder" : doc.file_category || "File"), 1)
96909
+ createElementVNode("div", _hoisted_27$5, [
96910
+ createElementVNode("h3", _hoisted_28$5, toDisplayString(doc.name), 1),
96911
+ createElementVNode("p", _hoisted_29$5, toDisplayString(doc.type === "canvas" ? formatCanvasType(doc.content_type) : doc.type === "folder" ? "Folder" : doc.file_category || "File"), 1)
97025
96912
  ])
97026
- ], 10, _hoisted_25$5);
96913
+ ], 10, _hoisted_23$5);
97027
96914
  }), 128))
97028
96915
  ], 2)
97029
96916
  ], 64)) : createCommentVNode("", true)
97030
- ])) : !searchType.value ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
97031
- createElementVNode("div", _hoisted_33$4, [
97032
- isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_34$4, [
96917
+ ])) : !searchType.value ? (openBlock(), createElementBlock("div", _hoisted_30$4, [
96918
+ createElementVNode("div", _hoisted_31$4, [
96919
+ isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
97033
96920
  createVNode(CIcon, {
97034
96921
  class: "animate-spin text-6xl",
97035
96922
  color: "var(--p-primary)",
97036
96923
  icon: "spinner"
97037
96924
  })
97038
96925
  ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
97039
- filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_35$4, [
97040
- createElementVNode("div", _hoisted_36$4, [
96926
+ filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_33$4, [
96927
+ createElementVNode("div", _hoisted_34$4, [
97041
96928
  createVNode(CIcon, {
97042
96929
  class: "mr-2",
97043
96930
  color: "var(--p-text2)",
97044
96931
  icon: "folder",
97045
96932
  size: "16"
97046
96933
  }),
97047
- createElementVNode("span", _hoisted_37$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
97048
- createElementVNode("span", _hoisted_38$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
96934
+ createElementVNode("span", _hoisted_35$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
96935
+ createElementVNode("span", _hoisted_36$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
97049
96936
  ]),
97050
96937
  createElementVNode("div", null, [
97051
96938
  (openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.slice(0, 5), (item) => {
@@ -97067,30 +96954,30 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97067
96954
  "object-fit": "cover",
97068
96955
  src: item.picture_url || "",
97069
96956
  width: "72"
97070
- }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_40$4, [
96957
+ }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_38$4, [
97071
96958
  createVNode(CIcon, {
97072
96959
  color: "var(--p-text2)",
97073
96960
  icon: "folder",
97074
96961
  size: "32"
97075
96962
  })
97076
96963
  ])),
97077
- createElementVNode("div", _hoisted_41$4, [
97078
- createElementVNode("h3", _hoisted_42$4, toDisplayString(item.name), 1),
96964
+ createElementVNode("div", _hoisted_39$4, [
96965
+ createElementVNode("h3", _hoisted_40$4, toDisplayString(item.name), 1),
97079
96966
  item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
97080
96967
  key: 0,
97081
96968
  class: "text-xs text-gray-600 mb-1",
97082
96969
  innerHTML: getSnippet(item)
97083
- }, null, 8, _hoisted_43$4)) : createCommentVNode("", true),
97084
- createElementVNode("p", _hoisted_44$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
96970
+ }, null, 8, _hoisted_41$4)) : createCommentVNode("", true),
96971
+ createElementVNode("p", _hoisted_42$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
97085
96972
  ]),
97086
- createElementVNode("div", _hoisted_45$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
97087
- ], 10, _hoisted_39$4);
96973
+ createElementVNode("div", _hoisted_43$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
96974
+ ], 10, _hoisted_37$4);
97088
96975
  }), 128))
97089
96976
  ]),
97090
- filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_46$4, [
96977
+ filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
97091
96978
  createElementVNode("span", {
97092
96979
  class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
97093
- onClick: _cache[12] || (_cache[12] = ($event) => searchType.value = "content")
96980
+ onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "content")
97094
96981
  }, [
97095
96982
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
97096
96983
  createVNode(CIcon, {
@@ -97101,16 +96988,16 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97101
96988
  ])
97102
96989
  ])) : createCommentVNode("", true)
97103
96990
  ])) : createCommentVNode("", true),
97104
- filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_47$4, [
97105
- createElementVNode("div", _hoisted_48$4, [
96991
+ filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_45$4, [
96992
+ createElementVNode("div", _hoisted_46$4, [
97106
96993
  createVNode(CIcon, {
97107
96994
  class: "mr-2",
97108
96995
  color: "var(--p-text2)",
97109
96996
  icon: "presentation",
97110
96997
  size: "16"
97111
96998
  }),
97112
- createElementVNode("span", _hoisted_49$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
97113
- createElementVNode("span", _hoisted_50$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
96999
+ createElementVNode("span", _hoisted_47$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
97000
+ createElementVNode("span", _hoisted_48$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
97114
97001
  ]),
97115
97002
  createElementVNode("div", null, [
97116
97003
  (openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
@@ -97124,25 +97011,25 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97124
97011
  "data-result-selected": isResultSelected(item),
97125
97012
  onClick: ($event) => handleResultClick(item, "canvas")
97126
97013
  }, [
97127
- createElementVNode("div", _hoisted_52$3, [
97014
+ createElementVNode("div", _hoisted_50$4, [
97128
97015
  createVNode(CIcon, {
97129
97016
  color: "var(--p-text2)",
97130
97017
  icon: "presentation",
97131
97018
  size: "32"
97132
97019
  })
97133
97020
  ]),
97134
- createElementVNode("div", _hoisted_53$3, [
97135
- createElementVNode("h3", _hoisted_54$2, toDisplayString(item.name), 1),
97136
- createElementVNode("p", _hoisted_55$2, toDisplayString(formatCanvasType(item.content_type)), 1)
97021
+ createElementVNode("div", _hoisted_51$3, [
97022
+ createElementVNode("h3", _hoisted_52$3, toDisplayString(item.name), 1),
97023
+ createElementVNode("p", _hoisted_53$3, toDisplayString(formatCanvasType(item.content_type)), 1)
97137
97024
  ]),
97138
- createElementVNode("div", _hoisted_56$2, toDisplayString(item.folder?.name || ""), 1)
97139
- ], 10, _hoisted_51$3);
97025
+ createElementVNode("div", _hoisted_54$2, toDisplayString(item.folder?.name || ""), 1)
97026
+ ], 10, _hoisted_49$4);
97140
97027
  }), 128))
97141
97028
  ]),
97142
- filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_57$2, [
97029
+ filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
97143
97030
  createElementVNode("span", {
97144
97031
  class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
97145
- onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "canvases")
97032
+ onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
97146
97033
  }, [
97147
97034
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
97148
97035
  createVNode(CIcon, {
@@ -97153,7 +97040,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97153
97040
  ])
97154
97041
  ])) : createCommentVNode("", true)
97155
97042
  ])) : createCommentVNode("", true),
97156
- searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_58$2, [
97043
+ searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_56$2, [
97157
97044
  createVNode(CIcon, {
97158
97045
  class: "text-6xl",
97159
97046
  color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
@@ -97166,16 +97053,16 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97166
97053
  ])) : createCommentVNode("", true)
97167
97054
  ], 64))
97168
97055
  ])
97169
- ])) : (openBlock(), createElementBlock("div", _hoisted_59$2, [
97170
- createElementVNode("div", _hoisted_60$2, [
97171
- isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_61$2, [
97056
+ ])) : (openBlock(), createElementBlock("div", _hoisted_57$2, [
97057
+ createElementVNode("div", _hoisted_58$2, [
97058
+ isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_59$2, [
97172
97059
  createVNode(CIcon, {
97173
97060
  class: "animate-spin text-6xl",
97174
97061
  color: "var(--p-primary)",
97175
97062
  icon: "spinner"
97176
97063
  })
97177
97064
  ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
97178
- createElementVNode("div", _hoisted_62$2, [
97065
+ createElementVNode("div", _hoisted_60$2, [
97179
97066
  searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
97180
97067
  key: 0,
97181
97068
  class: "mr-2",
@@ -97189,8 +97076,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97189
97076
  icon: "presentation",
97190
97077
  size: "16"
97191
97078
  })),
97192
- createElementVNode("span", _hoisted_63$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
97193
- createElementVNode("span", _hoisted_64$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
97079
+ createElementVNode("span", _hoisted_61$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
97080
+ createElementVNode("span", _hoisted_62$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
97194
97081
  ]),
97195
97082
  createElementVNode("div", null, [
97196
97083
  (openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
@@ -97215,7 +97102,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97215
97102
  "object-fit": "cover",
97216
97103
  src: item.picture_url || "",
97217
97104
  width: "72"
97218
- }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_66$2, [
97105
+ }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_64$2, [
97219
97106
  searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
97220
97107
  key: 0,
97221
97108
  color: "var(--p-text2)",
@@ -97228,20 +97115,20 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97228
97115
  size: "32"
97229
97116
  }))
97230
97117
  ])),
97231
- createElementVNode("div", _hoisted_67$2, [
97232
- createElementVNode("h3", _hoisted_68$2, toDisplayString(item.name), 1),
97118
+ createElementVNode("div", _hoisted_65$2, [
97119
+ createElementVNode("h3", _hoisted_66$2, toDisplayString(item.name), 1),
97233
97120
  searchType.value === "content" && item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
97234
97121
  key: 0,
97235
97122
  class: "text-xs text-gray-600 mb-1",
97236
97123
  innerHTML: getSnippet(item)
97237
- }, null, 8, _hoisted_69$1)) : createCommentVNode("", true),
97238
- createElementVNode("p", _hoisted_70$1, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File" : formatCanvasType(item.content_type)), 1)
97124
+ }, null, 8, _hoisted_67$2)) : createCommentVNode("", true),
97125
+ createElementVNode("p", _hoisted_68$2, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File" : formatCanvasType(item.content_type)), 1)
97239
97126
  ]),
97240
- createElementVNode("div", _hoisted_71$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
97241
- ], 10, _hoisted_65$2);
97127
+ createElementVNode("div", _hoisted_69$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
97128
+ ], 10, _hoisted_63$2);
97242
97129
  }), 128))
97243
97130
  ]),
97244
- searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_72$1, [
97131
+ searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_70$1, [
97245
97132
  createVNode(CIcon, {
97246
97133
  class: "text-6xl",
97247
97134
  color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
@@ -97256,7 +97143,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97256
97143
  ])
97257
97144
  ]))
97258
97145
  ]),
97259
- !showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_73$1, [
97146
+ !showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_71$1, [
97260
97147
  createVNode(CShortcut, null, {
97261
97148
  default: withCtx(() => [
97262
97149
  createVNode(CShortcutIcon, { icon: "arrow-up" }),
@@ -97298,7 +97185,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97298
97185
  }
97299
97186
  });
97300
97187
 
97301
- const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-52d9ac98"]]);
97188
+ const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-da2357d4"]]);
97302
97189
 
97303
97190
  const BulletListExtended = BulletList.extend({
97304
97191
  addOptions() {
@@ -110427,7 +110314,24 @@ function init({
110427
110314
  }
110428
110315
  let filteredFolders = [];
110429
110316
  if (!hasMetadataFilters && foldersResponse.status === "fulfilled" && foldersResponse.value) {
110430
- filteredFolders = foldersResponse.value.results?.map((f) => ({ ...f, type: "folder" })) ?? [];
110317
+ const foldersFromSearch = foldersResponse.value.results ?? [];
110318
+ const folderDetailsPromises = foldersFromSearch.map(async (folder) => {
110319
+ try {
110320
+ const folderDetails = await state$2.folderItemsFetcher?.(folder.id);
110321
+ const filesCount = folderDetails?.files?.length ?? 0;
110322
+ const foldersCount = folderDetails?.folders?.length ?? 0;
110323
+ return {
110324
+ ...folder,
110325
+ type: "folder",
110326
+ files_count: filesCount,
110327
+ folders_count: foldersCount
110328
+ };
110329
+ } catch (error) {
110330
+ console.error(`Failed to fetch details for folder ${folder.name}:`, error);
110331
+ return { ...folder, type: "folder" };
110332
+ }
110333
+ });
110334
+ filteredFolders = await Promise.all(folderDetailsPromises);
110431
110335
  } else if (!hasMetadataFilters && !useAppStore$4().isLocalSearch.value) {
110432
110336
  console.error(
110433
110337
  "Failed to fetch folders:",
@@ -176366,10 +176270,10 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
176366
176270
  __name: "ActionsToolbar",
176367
176271
  setup(__props) {
176368
176272
  useCssVars((_ctx) => ({
176369
- "c6ccac5c": unref(themeVars).primary4,
176370
- "3edbaaa2": unref(themeVars).primary,
176371
- "c6ccac58": unref(themeVars).primary6,
176372
- "0f45ae31": unref(themeVars).base
176273
+ "c70ce490": unref(themeVars).primary4,
176274
+ "471cb1fc": unref(themeVars).primary,
176275
+ "c70ce48c": unref(themeVars).primary6,
176276
+ "08cf7517": unref(themeVars).base
176373
176277
  }));
176374
176278
  const {
176375
176279
  toggleContentPanel,
@@ -176607,7 +176511,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
176607
176511
  },
176608
176512
  type: "folder",
176609
176513
  file_thumbnail_urls: folder.file_thumbnail_urls,
176610
- thumbnail_url: folder.thumbnail_url
176514
+ thumbnail_url: folder.thumbnail_url,
176515
+ files_count: folder.files_count,
176516
+ folders_count: folder.folders_count,
176517
+ available_files_count: folder.available_files_count,
176518
+ available_folders_count: folder.available_folders_count
176611
176519
  };
176612
176520
  });
176613
176521
  const fileResults = files.map((file) => {
@@ -176837,7 +176745,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
176837
176745
  }
176838
176746
  });
176839
176747
 
176840
- const ActionsToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-fecebf5a"]]);
176748
+ const ActionsToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-38edbab6"]]);
176841
176749
 
176842
176750
  const _sfc_main$t = /* @__PURE__ */ defineComponent({
176843
176751
  __name: "FavoritesTable",