@pitcher/canvas-ui 2026.1.12-133255-beta → 2026.1.12-143801-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.css CHANGED
@@ -551,13 +551,13 @@ swiper-container::part(pagination) {
551
551
  line-height: 20px;
552
552
  letter-spacing: 0.25px;
553
553
  color: var(--ad430d74);
554
- }[data-v-39cbb556] .ais-SearchBox {
554
+ }[data-v-5e194a1b] .ais-SearchBox {
555
555
  margin: 0;
556
556
  }
557
- [data-v-39cbb556] .ais-SearchBox-submit,[data-v-39cbb556] .ais-SearchBox-reset {
557
+ [data-v-5e194a1b] .ais-SearchBox-submit,[data-v-5e194a1b] .ais-SearchBox-reset {
558
558
  display: none;
559
559
  }
560
- .admin-search[data-v-39cbb556] .ais-SearchBox-reset {
560
+ .admin-search[data-v-5e194a1b] .ais-SearchBox-reset {
561
561
  display: block !important;
562
562
  position: absolute !important;
563
563
  right: 12px !important;
@@ -571,17 +571,17 @@ swiper-container::part(pagination) {
571
571
  font-size: 16px !important;
572
572
  z-index: 10 !important;
573
573
  }
574
- .admin-search[data-v-39cbb556] .ais-SearchBox-reset:hover {
574
+ .admin-search[data-v-5e194a1b] .ais-SearchBox-reset:hover {
575
575
  color: var(--p-text2) !important;
576
576
  }
577
- .admin-search[data-v-39cbb556] .ais-SearchBox-reset:focus {
577
+ .admin-search[data-v-5e194a1b] .ais-SearchBox-reset:focus {
578
578
  outline: none !important;
579
579
  color: var(--p-primary) !important;
580
580
  }
581
- .admin-search[data-v-39cbb556] .ais-SearchBox-input {
581
+ .admin-search[data-v-5e194a1b] .ais-SearchBox-input {
582
582
  padding-right: 40px !important;
583
583
  }
584
- [data-v-39cbb556] .ais-SearchBox-input {
584
+ [data-v-5e194a1b] .ais-SearchBox-input {
585
585
  width: 100%;
586
586
  padding: 12px 16px 12px 40px;
587
587
  border: 1px solid var(--p-primary4);
@@ -590,39 +590,39 @@ swiper-container::part(pagination) {
590
590
  background-color: var(--p-base);
591
591
  transition: border-color 0.2s ease;
592
592
  }
593
- [data-v-39cbb556] .ais-SearchBox-input:focus {
593
+ [data-v-5e194a1b] .ais-SearchBox-input:focus {
594
594
  outline: none;
595
595
  border-color: var(--p-primary);
596
596
  box-shadow: 0 0 0 3px var(--p-primary5);
597
597
  }
598
- [data-v-39cbb556] .ais-SearchBox-input::placeholder {
598
+ [data-v-5e194a1b] .ais-SearchBox-input::placeholder {
599
599
  color: var(--p-text3);
600
600
  font-size: 14px;
601
601
  }
602
- .overflow-y-auto[data-v-39cbb556] {
602
+ .overflow-y-auto[data-v-5e194a1b] {
603
603
  scrollbar-width: thin;
604
604
  scrollbar-color: var(--p-border2) var(--p-surface2);
605
605
  }
606
- .overflow-y-auto[data-v-39cbb556]::-webkit-scrollbar {
606
+ .overflow-y-auto[data-v-5e194a1b]::-webkit-scrollbar {
607
607
  width: 6px;
608
608
  }
609
- .overflow-y-auto[data-v-39cbb556]::-webkit-scrollbar-track {
609
+ .overflow-y-auto[data-v-5e194a1b]::-webkit-scrollbar-track {
610
610
  background: var(--p-surface2);
611
611
  }
612
- .overflow-y-auto[data-v-39cbb556]::-webkit-scrollbar-thumb {
612
+ .overflow-y-auto[data-v-5e194a1b]::-webkit-scrollbar-thumb {
613
613
  background-color: var(--p-border2);
614
614
  border-radius: 3px;
615
615
  }
616
- .overflow-y-auto[data-v-39cbb556]::-webkit-scrollbar-thumb:hover {
616
+ .overflow-y-auto[data-v-5e194a1b]::-webkit-scrollbar-thumb:hover {
617
617
  background-color: var(--p-text3);
618
618
  }
619
- button[data-v-39cbb556]:hover {
619
+ button[data-v-5e194a1b]:hover {
620
620
  transition: all 0.2s ease;
621
621
  }
622
- button[data-v-39cbb556]:focus {
622
+ button[data-v-5e194a1b]:focus {
623
623
  outline: none;
624
624
  }
625
- [data-v-39cbb556] mark,[data-v-39cbb556] em {
625
+ [data-v-5e194a1b] mark,[data-v-5e194a1b] em {
626
626
  font-weight: bold;
627
627
  font-style: normal;
628
628
  }
package/canvas-ui.js CHANGED
@@ -96006,6 +96006,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96006
96006
  };
96007
96007
  const contentResults = ref([]);
96008
96008
  const canvasResults = ref([]);
96009
+ const unfilteredContentResults = ref([]);
96010
+ const unfilteredCanvasResults = ref([]);
96009
96011
  const isSearching = ref(false);
96010
96012
  const hasSearchCompleted = ref(false);
96011
96013
  const querySuggestions = ref([]);
@@ -96029,7 +96031,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96029
96031
  return /* @__PURE__ */ new Set();
96030
96032
  }
96031
96033
  const types = /* @__PURE__ */ new Set();
96032
- contentResults.value.forEach((item) => {
96034
+ unfilteredContentResults.value.forEach((item) => {
96033
96035
  if (item.type === "folder") {
96034
96036
  types.add("folder");
96035
96037
  } else if (item.type === "file" && item.file_category) {
@@ -96043,7 +96045,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96043
96045
  return /* @__PURE__ */ new Set();
96044
96046
  }
96045
96047
  const types = /* @__PURE__ */ new Set();
96046
- canvasResults.value.forEach((item) => {
96048
+ unfilteredCanvasResults.value.forEach((item) => {
96047
96049
  if (item.content_type) {
96048
96050
  types.add(item.content_type);
96049
96051
  }
@@ -96057,10 +96059,10 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96057
96059
  return fileTypeOptions.filter((option) => availableFileTypes.value.has(option.value));
96058
96060
  });
96059
96061
  const hasContentFilters = computed(() => {
96060
- return visibleFileTypeOptions.value.length > 0;
96062
+ return visibleFileTypeOptions.value.length > 0 || selectedFileType.value !== null;
96061
96063
  });
96062
96064
  const hasCanvasFilters = computed(() => {
96063
- return availableCanvasTypes.value.size > 0;
96065
+ return visibleCanvasTypeOptions.value.length > 0 || selectedCanvasFilter.value !== null;
96064
96066
  });
96065
96067
  const shouldShowNoResults = computed(() => {
96066
96068
  if (showRecentView.value || !searchQuery.value.trim() || isSearching.value || !hasSearchCompleted.value) return false;
@@ -96148,6 +96150,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96148
96150
  if (!query.trim()) {
96149
96151
  contentResults.value = [];
96150
96152
  canvasResults.value = [];
96153
+ unfilteredContentResults.value = [];
96154
+ unfilteredCanvasResults.value = [];
96151
96155
  hasSearchCompleted.value = false;
96152
96156
  isSearching.value = false;
96153
96157
  searchError.value = null;
@@ -96179,22 +96183,36 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96179
96183
  console.warn("[CAlgoliaSearch] Selected canvas filter is invalid and was removed:", selectedCanvasFilter.value);
96180
96184
  selectedCanvasFilter.value = null;
96181
96185
  }
96182
- const canvasFilters = validCanvasFilter ? ` AND content_type:"${validCanvasFilter}"` : "";
96183
96186
  const validFileType = selectedFileType.value && ALLOWED_FILE_TYPES.includes(selectedFileType.value) ? selectedFileType.value : null;
96184
96187
  if (selectedFileType.value && !validFileType) {
96185
96188
  console.warn("[CAlgoliaSearch] Selected file type filter is invalid and was removed:", selectedFileType.value);
96186
96189
  selectedFileType.value = null;
96187
96190
  }
96188
- const contentFilters = validFileType ? ` AND ${validFileType === "folder" ? `type:"${validFileType}"` : `file_category:"${validFileType}"`}` : "";
96189
96191
  const results = await searchViaBackend(query.trim(), {
96190
- canvas: canvasFilters,
96191
- content: contentFilters
96192
+ canvas: "",
96193
+ content: ""
96192
96194
  });
96193
96195
  if (query.trim() !== searchQuery.value.trim()) {
96194
96196
  return;
96195
96197
  }
96196
- contentResults.value = results.content?.hits || [];
96197
- canvasResults.value = results.canvas?.hits || [];
96198
+ unfilteredContentResults.value = results.content?.hits || [];
96199
+ unfilteredCanvasResults.value = results.canvas?.hits || [];
96200
+ let filteredContent = unfilteredContentResults.value;
96201
+ let filteredCanvas = unfilteredCanvasResults.value;
96202
+ if (validFileType) {
96203
+ filteredContent = filteredContent.filter((item) => {
96204
+ if (validFileType === "folder") {
96205
+ return item.type === "folder";
96206
+ } else {
96207
+ return item.type === "file" && item.file_category === validFileType;
96208
+ }
96209
+ });
96210
+ }
96211
+ if (validCanvasFilter) {
96212
+ filteredCanvas = filteredCanvas.filter((item) => item.content_type === validCanvasFilter);
96213
+ }
96214
+ contentResults.value = filteredContent;
96215
+ canvasResults.value = filteredCanvas;
96198
96216
  selectedResultIndex.value = -1;
96199
96217
  searchError.value = null;
96200
96218
  if (query.trim().length >= 2 && !shouldSkipSuggestionFetch) {
@@ -96214,6 +96232,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96214
96232
  console.error("Search error:", error);
96215
96233
  contentResults.value = [];
96216
96234
  canvasResults.value = [];
96235
+ unfilteredContentResults.value = [];
96236
+ unfilteredCanvasResults.value = [];
96217
96237
  isSearching.value = false;
96218
96238
  hasSearchCompleted.value = true;
96219
96239
  if (error.message === "AUTH_REQUIRED") {
@@ -97227,7 +97247,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97227
97247
  }
97228
97248
  });
97229
97249
 
97230
- const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-39cbb556"]]);
97250
+ const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-5e194a1b"]]);
97231
97251
 
97232
97252
  const BulletListExtended = BulletList.extend({
97233
97253
  addOptions() {