@pitcher/canvas-ui 2025.12.23-130926-beta → 2025.12.23-132349-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-9e56c429] .ais-SearchBox {
554
+ }[data-v-09781a03] .ais-SearchBox {
555
555
  margin: 0;
556
556
  }
557
- [data-v-9e56c429] .ais-SearchBox-submit,[data-v-9e56c429] .ais-SearchBox-reset {
557
+ [data-v-09781a03] .ais-SearchBox-submit,[data-v-09781a03] .ais-SearchBox-reset {
558
558
  display: none;
559
559
  }
560
- .admin-search[data-v-9e56c429] .ais-SearchBox-reset {
560
+ .admin-search[data-v-09781a03] .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-9e56c429] .ais-SearchBox-reset:hover {
574
+ .admin-search[data-v-09781a03] .ais-SearchBox-reset:hover {
575
575
  color: var(--p-text2) !important;
576
576
  }
577
- .admin-search[data-v-9e56c429] .ais-SearchBox-reset:focus {
577
+ .admin-search[data-v-09781a03] .ais-SearchBox-reset:focus {
578
578
  outline: none !important;
579
579
  color: var(--p-primary) !important;
580
580
  }
581
- .admin-search[data-v-9e56c429] .ais-SearchBox-input {
581
+ .admin-search[data-v-09781a03] .ais-SearchBox-input {
582
582
  padding-right: 40px !important;
583
583
  }
584
- [data-v-9e56c429] .ais-SearchBox-input {
584
+ [data-v-09781a03] .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-9e56c429] .ais-SearchBox-input:focus {
593
+ [data-v-09781a03] .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-9e56c429] .ais-SearchBox-input::placeholder {
598
+ [data-v-09781a03] .ais-SearchBox-input::placeholder {
599
599
  color: var(--p-text3);
600
600
  font-size: 14px;
601
601
  }
602
- .overflow-y-auto[data-v-9e56c429] {
602
+ .overflow-y-auto[data-v-09781a03] {
603
603
  scrollbar-width: thin;
604
604
  scrollbar-color: var(--p-border2) var(--p-surface2);
605
605
  }
606
- .overflow-y-auto[data-v-9e56c429]::-webkit-scrollbar {
606
+ .overflow-y-auto[data-v-09781a03]::-webkit-scrollbar {
607
607
  width: 6px;
608
608
  }
609
- .overflow-y-auto[data-v-9e56c429]::-webkit-scrollbar-track {
609
+ .overflow-y-auto[data-v-09781a03]::-webkit-scrollbar-track {
610
610
  background: var(--p-surface2);
611
611
  }
612
- .overflow-y-auto[data-v-9e56c429]::-webkit-scrollbar-thumb {
612
+ .overflow-y-auto[data-v-09781a03]::-webkit-scrollbar-thumb {
613
613
  background-color: var(--p-border2);
614
614
  border-radius: 3px;
615
615
  }
616
- .overflow-y-auto[data-v-9e56c429]::-webkit-scrollbar-thumb:hover {
616
+ .overflow-y-auto[data-v-09781a03]::-webkit-scrollbar-thumb:hover {
617
617
  background-color: var(--p-text3);
618
618
  }
619
- button[data-v-9e56c429]:hover {
619
+ button[data-v-09781a03]:hover {
620
620
  transition: all 0.2s ease;
621
621
  }
622
- button[data-v-9e56c429]:focus {
622
+ button[data-v-09781a03]:focus {
623
623
  outline: none;
624
624
  }
625
- [data-v-9e56c429] mark,[data-v-9e56c429] em {
625
+ [data-v-09781a03] mark,[data-v-09781a03] em {
626
626
  font-weight: bold;
627
627
  font-style: normal;
628
628
  }
package/canvas-ui.js CHANGED
@@ -95271,7 +95271,7 @@ const _hoisted_32$4 = {
95271
95271
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95272
95272
  };
95273
95273
  const _hoisted_33$4 = {
95274
- key: 1,
95274
+ key: 0,
95275
95275
  class: "mb-0"
95276
95276
  };
95277
95277
  const _hoisted_34$4 = { class: "flex items-center px-0 pt-2 pb-1" };
@@ -95291,7 +95291,7 @@ const _hoisted_44$4 = {
95291
95291
  key: 0,
95292
95292
  class: "px-0 py-0"
95293
95293
  };
95294
- const _hoisted_45$4 = { key: 2 };
95294
+ const _hoisted_45$4 = { key: 1 };
95295
95295
  const _hoisted_46$4 = { class: "flex items-center px-0 pt-2 pb-1" };
95296
95296
  const _hoisted_47$4 = { class: "text-m font-semibold text-gray-900" };
95297
95297
  const _hoisted_48$4 = { class: "ml-2 text-sm text-gray-500" };
@@ -95306,7 +95306,7 @@ const _hoisted_55$2 = {
95306
95306
  class: "px-0 py-0"
95307
95307
  };
95308
95308
  const _hoisted_56$2 = {
95309
- key: 0,
95309
+ key: 2,
95310
95310
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95311
95311
  };
95312
95312
  const _hoisted_57$2 = {
@@ -95380,13 +95380,19 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95380
95380
  selectedCanvasFilters.value = [];
95381
95381
  debouncedFilterSearch();
95382
95382
  };
95383
- const handleEverywhereClick = () => {
95383
+ const handleEverywhereClick = async () => {
95384
95384
  selectedFileTypes.value = [];
95385
95385
  selectedCanvasFilters.value = [];
95386
95386
  searchType.value = null;
95387
95387
  if (searchQuery.value.trim()) {
95388
- skipNextSuggestionFetch.value = true;
95389
- performSearch(searchQuery.value);
95388
+ try {
95389
+ skipNextSuggestionFetch.value = true;
95390
+ await performSearch(searchQuery.value);
95391
+ } catch (error) {
95392
+ console.error("[handleEverywhereClick] Search failed:", error);
95393
+ } finally {
95394
+ skipNextSuggestionFetch.value = false;
95395
+ }
95390
95396
  }
95391
95397
  };
95392
95398
  const recentSearches = ref([]);
@@ -95719,10 +95725,16 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95719
95725
  const debouncedFilterSearch = () => {
95720
95726
  if (filterChangeTimer) clearTimeout(filterChangeTimer);
95721
95727
  if (searchTimer) clearTimeout(searchTimer);
95722
- filterChangeTimer = setTimeout(() => {
95728
+ filterChangeTimer = setTimeout(async () => {
95723
95729
  if (searchQuery.value.trim() && !showRecentView.value) {
95724
- skipNextSuggestionFetch.value = true;
95725
- performSearch(searchQuery.value);
95730
+ try {
95731
+ skipNextSuggestionFetch.value = true;
95732
+ await performSearch(searchQuery.value);
95733
+ } catch (error) {
95734
+ console.error("[debouncedFilterSearch] Search failed:", error);
95735
+ } finally {
95736
+ skipNextSuggestionFetch.value = false;
95737
+ }
95726
95738
  } else {
95727
95739
  skipNextSuggestionFetch.value = false;
95728
95740
  }
@@ -96458,135 +96470,137 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96458
96470
  color: "var(--p-primary)",
96459
96471
  icon: "spinner"
96460
96472
  })
96461
- ])) : filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_33$4, [
96462
- createElementVNode("div", _hoisted_34$4, [
96463
- createVNode(CIcon, {
96464
- class: "mr-2",
96465
- color: "var(--p-text2)",
96466
- icon: "folder",
96467
- size: "16"
96468
- }),
96469
- createElementVNode("span", _hoisted_35$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
96470
- createElementVNode("span", _hoisted_36$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
96471
- ]),
96472
- createElementVNode("div", null, [
96473
- (openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.slice(0, 5), (item) => {
96474
- return openBlock(), createElementBlock("div", {
96475
- key: item.id,
96476
- class: normalizeClass([
96477
- "flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
96478
- _ctx.isAdmin ? "py-3" : "py-0",
96479
- isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
96480
- ]),
96481
- "data-result-selected": isResultSelected(item),
96482
- onClick: ($event) => handleResultClick(item, item.type === "folder" ? "folder" : "file")
96483
- }, [
96484
- item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
96485
- key: 0,
96486
- class: "w-18 h-14 border-rounded-1 overflow-hidden flex-shrink-0 mr-4",
96487
- cover: "",
96488
- "file-data": item,
96489
- "object-fit": "cover",
96490
- src: item.picture_url || "",
96491
- width: "72"
96492
- }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_38$4, [
96493
- createVNode(CIcon, {
96494
- color: "var(--p-text2)",
96495
- icon: "folder",
96496
- size: "32"
96497
- })
96498
- ])),
96499
- createElementVNode("div", _hoisted_39$4, [
96500
- createElementVNode("h3", _hoisted_40$4, toDisplayString(item.name), 1),
96501
- item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
96502
- key: 0,
96503
- class: "text-xs text-gray-600 mb-1",
96504
- innerHTML: getSnippet(item)
96505
- }, null, 8, _hoisted_41$4)) : createCommentVNode("", true),
96506
- createElementVNode("p", _hoisted_42$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
96507
- ]),
96508
- createElementVNode("div", _hoisted_43$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
96509
- ], 10, _hoisted_37$4);
96510
- }), 128))
96511
- ]),
96512
- filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
96513
- createElementVNode("span", {
96514
- class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
96515
- onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "content")
96516
- }, [
96517
- createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
96473
+ ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
96474
+ filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_33$4, [
96475
+ createElementVNode("div", _hoisted_34$4, [
96518
96476
  createVNode(CIcon, {
96519
- class: "ml-1",
96520
- icon: "chevron-right",
96521
- size: "12"
96522
- })
96523
- ])
96524
- ])) : createCommentVNode("", true)
96525
- ])) : createCommentVNode("", true),
96526
- filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_45$4, [
96527
- createElementVNode("div", _hoisted_46$4, [
96528
- createVNode(CIcon, {
96529
- class: "mr-2",
96530
- color: "var(--p-text2)",
96531
- icon: "presentation",
96532
- size: "16"
96533
- }),
96534
- createElementVNode("span", _hoisted_47$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
96535
- createElementVNode("span", _hoisted_48$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
96536
- ]),
96537
- createElementVNode("div", null, [
96538
- (openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
96539
- return openBlock(), createElementBlock("div", {
96540
- key: item.id,
96541
- class: normalizeClass([
96542
- "flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
96543
- _ctx.isAdmin ? "py-3" : "py-0",
96544
- isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
96545
- ]),
96546
- "data-result-selected": isResultSelected(item),
96547
- onClick: ($event) => handleResultClick(item, "canvas")
96477
+ class: "mr-2",
96478
+ color: "var(--p-text2)",
96479
+ icon: "folder",
96480
+ size: "16"
96481
+ }),
96482
+ createElementVNode("span", _hoisted_35$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
96483
+ createElementVNode("span", _hoisted_36$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
96484
+ ]),
96485
+ createElementVNode("div", null, [
96486
+ (openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.slice(0, 5), (item) => {
96487
+ return openBlock(), createElementBlock("div", {
96488
+ key: item.id,
96489
+ class: normalizeClass([
96490
+ "flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
96491
+ _ctx.isAdmin ? "py-3" : "py-0",
96492
+ isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
96493
+ ]),
96494
+ "data-result-selected": isResultSelected(item),
96495
+ onClick: ($event) => handleResultClick(item, item.type === "folder" ? "folder" : "file")
96496
+ }, [
96497
+ item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
96498
+ key: 0,
96499
+ class: "w-18 h-14 border-rounded-1 overflow-hidden flex-shrink-0 mr-4",
96500
+ cover: "",
96501
+ "file-data": item,
96502
+ "object-fit": "cover",
96503
+ src: item.picture_url || "",
96504
+ width: "72"
96505
+ }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_38$4, [
96506
+ createVNode(CIcon, {
96507
+ color: "var(--p-text2)",
96508
+ icon: "folder",
96509
+ size: "32"
96510
+ })
96511
+ ])),
96512
+ createElementVNode("div", _hoisted_39$4, [
96513
+ createElementVNode("h3", _hoisted_40$4, toDisplayString(item.name), 1),
96514
+ item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
96515
+ key: 0,
96516
+ class: "text-xs text-gray-600 mb-1",
96517
+ innerHTML: getSnippet(item)
96518
+ }, null, 8, _hoisted_41$4)) : createCommentVNode("", true),
96519
+ createElementVNode("p", _hoisted_42$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
96520
+ ]),
96521
+ createElementVNode("div", _hoisted_43$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
96522
+ ], 10, _hoisted_37$4);
96523
+ }), 128))
96524
+ ]),
96525
+ filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
96526
+ createElementVNode("span", {
96527
+ class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
96528
+ onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "content")
96548
96529
  }, [
96549
- createElementVNode("div", _hoisted_50$4, [
96550
- createVNode(CIcon, {
96551
- color: "var(--p-text2)",
96552
- icon: "presentation",
96553
- size: "32"
96554
- })
96555
- ]),
96556
- createElementVNode("div", _hoisted_51$3, [
96557
- createElementVNode("h3", _hoisted_52$3, toDisplayString(item.name), 1),
96558
- createElementVNode("p", _hoisted_53$3, toDisplayString(formatCanvasType(item.content_type)), 1)
96559
- ]),
96560
- createElementVNode("div", _hoisted_54$2, toDisplayString(item.folder?.name || ""), 1)
96561
- ], 10, _hoisted_49$4);
96562
- }), 128))
96563
- ]),
96564
- filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
96565
- createElementVNode("span", {
96566
- class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
96567
- onClick: _cache[15] || (_cache[15] = ($event) => searchType.value = "canvases")
96568
- }, [
96569
- createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
96530
+ createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
96531
+ createVNode(CIcon, {
96532
+ class: "ml-1",
96533
+ icon: "chevron-right",
96534
+ size: "12"
96535
+ })
96536
+ ])
96537
+ ])) : createCommentVNode("", true)
96538
+ ])) : createCommentVNode("", true),
96539
+ filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_45$4, [
96540
+ createElementVNode("div", _hoisted_46$4, [
96570
96541
  createVNode(CIcon, {
96571
- class: "ml-1",
96572
- icon: "chevron-right",
96573
- size: "12"
96574
- })
96575
- ])
96542
+ class: "mr-2",
96543
+ color: "var(--p-text2)",
96544
+ icon: "presentation",
96545
+ size: "16"
96546
+ }),
96547
+ createElementVNode("span", _hoisted_47$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
96548
+ createElementVNode("span", _hoisted_48$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
96549
+ ]),
96550
+ createElementVNode("div", null, [
96551
+ (openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
96552
+ return openBlock(), createElementBlock("div", {
96553
+ key: item.id,
96554
+ class: normalizeClass([
96555
+ "flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
96556
+ _ctx.isAdmin ? "py-3" : "py-0",
96557
+ isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
96558
+ ]),
96559
+ "data-result-selected": isResultSelected(item),
96560
+ onClick: ($event) => handleResultClick(item, "canvas")
96561
+ }, [
96562
+ createElementVNode("div", _hoisted_50$4, [
96563
+ createVNode(CIcon, {
96564
+ color: "var(--p-text2)",
96565
+ icon: "presentation",
96566
+ size: "32"
96567
+ })
96568
+ ]),
96569
+ createElementVNode("div", _hoisted_51$3, [
96570
+ createElementVNode("h3", _hoisted_52$3, toDisplayString(item.name), 1),
96571
+ createElementVNode("p", _hoisted_53$3, toDisplayString(formatCanvasType(item.content_type)), 1)
96572
+ ]),
96573
+ createElementVNode("div", _hoisted_54$2, toDisplayString(item.folder?.name || ""), 1)
96574
+ ], 10, _hoisted_49$4);
96575
+ }), 128))
96576
+ ]),
96577
+ filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
96578
+ createElementVNode("span", {
96579
+ class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
96580
+ onClick: _cache[15] || (_cache[15] = ($event) => searchType.value = "canvases")
96581
+ }, [
96582
+ createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
96583
+ createVNode(CIcon, {
96584
+ class: "ml-1",
96585
+ icon: "chevron-right",
96586
+ size: "12"
96587
+ })
96588
+ ])
96589
+ ])) : createCommentVNode("", true)
96590
+ ])) : createCommentVNode("", true),
96591
+ searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_56$2, [
96592
+ createVNode(CIcon, {
96593
+ class: "text-6xl",
96594
+ color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
96595
+ "fa-type": "fal",
96596
+ icon: searchError.value ? "exclamation-triangle" : "radar"
96597
+ }, null, 8, ["color", "icon"]),
96598
+ createElementVNode("p", {
96599
+ class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
96600
+ }, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
96576
96601
  ])) : createCommentVNode("", true)
96577
- ])) : createCommentVNode("", true)
96578
- ]),
96579
- searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_56$2, [
96580
- createVNode(CIcon, {
96581
- class: "text-6xl",
96582
- color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
96583
- "fa-type": "fal",
96584
- icon: searchError.value ? "exclamation-triangle" : "radar"
96585
- }, null, 8, ["color", "icon"]),
96586
- createElementVNode("p", {
96587
- class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
96588
- }, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
96589
- ])) : createCommentVNode("", true)
96602
+ ], 64))
96603
+ ])
96590
96604
  ])) : (openBlock(), createElementBlock("div", _hoisted_57$2, [
96591
96605
  createElementVNode("div", _hoisted_58$2, [
96592
96606
  isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_59$2, [
@@ -96719,7 +96733,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96719
96733
  }
96720
96734
  });
96721
96735
 
96722
- const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-9e56c429"]]);
96736
+ const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-09781a03"]]);
96723
96737
 
96724
96738
  const BulletListExtended = BulletList.extend({
96725
96739
  addOptions() {