@pitcher/canvas-ui 2026.1.12-152912-beta → 2026.1.12-172413-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 +17 -17
- package/canvas-ui.js +59 -36
- package/canvas-ui.js.map +1 -1
- package/package.json +1 -1
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-
|
|
554
|
+
}[data-v-d67927f9] .ais-SearchBox {
|
|
555
555
|
margin: 0;
|
|
556
556
|
}
|
|
557
|
-
[data-v-
|
|
557
|
+
[data-v-d67927f9] .ais-SearchBox-submit,[data-v-d67927f9] .ais-SearchBox-reset {
|
|
558
558
|
display: none;
|
|
559
559
|
}
|
|
560
|
-
.admin-search[data-v-
|
|
560
|
+
.admin-search[data-v-d67927f9] .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-
|
|
574
|
+
.admin-search[data-v-d67927f9] .ais-SearchBox-reset:hover {
|
|
575
575
|
color: var(--p-text2) !important;
|
|
576
576
|
}
|
|
577
|
-
.admin-search[data-v-
|
|
577
|
+
.admin-search[data-v-d67927f9] .ais-SearchBox-reset:focus {
|
|
578
578
|
outline: none !important;
|
|
579
579
|
color: var(--p-primary) !important;
|
|
580
580
|
}
|
|
581
|
-
.admin-search[data-v-
|
|
581
|
+
.admin-search[data-v-d67927f9] .ais-SearchBox-input {
|
|
582
582
|
padding-right: 40px !important;
|
|
583
583
|
}
|
|
584
|
-
[data-v-
|
|
584
|
+
[data-v-d67927f9] .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-
|
|
593
|
+
[data-v-d67927f9] .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-
|
|
598
|
+
[data-v-d67927f9] .ais-SearchBox-input::placeholder {
|
|
599
599
|
color: var(--p-text3);
|
|
600
600
|
font-size: 14px;
|
|
601
601
|
}
|
|
602
|
-
.overflow-y-auto[data-v-
|
|
602
|
+
.overflow-y-auto[data-v-d67927f9] {
|
|
603
603
|
scrollbar-width: thin;
|
|
604
604
|
scrollbar-color: var(--p-border2) var(--p-surface2);
|
|
605
605
|
}
|
|
606
|
-
.overflow-y-auto[data-v-
|
|
606
|
+
.overflow-y-auto[data-v-d67927f9]::-webkit-scrollbar {
|
|
607
607
|
width: 6px;
|
|
608
608
|
}
|
|
609
|
-
.overflow-y-auto[data-v-
|
|
609
|
+
.overflow-y-auto[data-v-d67927f9]::-webkit-scrollbar-track {
|
|
610
610
|
background: var(--p-surface2);
|
|
611
611
|
}
|
|
612
|
-
.overflow-y-auto[data-v-
|
|
612
|
+
.overflow-y-auto[data-v-d67927f9]::-webkit-scrollbar-thumb {
|
|
613
613
|
background-color: var(--p-border2);
|
|
614
614
|
border-radius: 3px;
|
|
615
615
|
}
|
|
616
|
-
.overflow-y-auto[data-v-
|
|
616
|
+
.overflow-y-auto[data-v-d67927f9]::-webkit-scrollbar-thumb:hover {
|
|
617
617
|
background-color: var(--p-text3);
|
|
618
618
|
}
|
|
619
|
-
button[data-v-
|
|
619
|
+
button[data-v-d67927f9]:hover {
|
|
620
620
|
transition: all 0.2s ease;
|
|
621
621
|
}
|
|
622
|
-
button[data-v-
|
|
622
|
+
button[data-v-d67927f9]:focus {
|
|
623
623
|
outline: none;
|
|
624
624
|
}
|
|
625
|
-
[data-v-
|
|
625
|
+
[data-v-d67927f9] mark,[data-v-d67927f9] em {
|
|
626
626
|
font-weight: bold;
|
|
627
627
|
font-style: normal;
|
|
628
628
|
}
|
package/canvas-ui.js
CHANGED
|
@@ -95854,6 +95854,19 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95854
95854
|
}
|
|
95855
95855
|
return options;
|
|
95856
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
|
+
];
|
|
95857
95870
|
const visibleCanvasTypeOptions = computed(() => {
|
|
95858
95871
|
if (showRecentView.value || !searchQuery.value.trim()) {
|
|
95859
95872
|
return canvasTypeOptions.value;
|
|
@@ -95870,7 +95883,9 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95870
95883
|
selectedFileType.value = null;
|
|
95871
95884
|
selectedCanvasFilter.value = null;
|
|
95872
95885
|
searchType.value = null;
|
|
95873
|
-
if (searchQuery.value.trim()) {
|
|
95886
|
+
if (searchQuery.value.trim() && (unfilteredContentResults.value.length > 0 || unfilteredCanvasResults.value.length > 0)) {
|
|
95887
|
+
applyFiltersToResults();
|
|
95888
|
+
} else if (searchQuery.value.trim()) {
|
|
95874
95889
|
try {
|
|
95875
95890
|
skipNextSuggestionFetch.value = true;
|
|
95876
95891
|
await performSearch(searchQuery.value);
|
|
@@ -96108,6 +96123,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96108
96123
|
};
|
|
96109
96124
|
watch(searchType, () => {
|
|
96110
96125
|
selectedResultIndex.value = -1;
|
|
96126
|
+
showFileTypeDropdown.value = false;
|
|
96127
|
+
showCanvasTypeDropdown.value = false;
|
|
96111
96128
|
});
|
|
96112
96129
|
watch(visibleFileTypeOptions, (newOptions) => {
|
|
96113
96130
|
if (selectedFileType.value) {
|
|
@@ -96189,19 +96206,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96189
96206
|
skipNextSuggestionFetch.value = false;
|
|
96190
96207
|
}
|
|
96191
96208
|
try {
|
|
96192
|
-
const ALLOWED_CANVAS_TYPES = ["saved_canvas", "template", "product_template", "section", "block"];
|
|
96193
|
-
const ALLOWED_FILE_TYPES = [
|
|
96194
|
-
"folder",
|
|
96195
|
-
"pdf",
|
|
96196
|
-
"image",
|
|
96197
|
-
"audio",
|
|
96198
|
-
"video",
|
|
96199
|
-
"document",
|
|
96200
|
-
"presentation",
|
|
96201
|
-
"spreadsheet",
|
|
96202
|
-
"ar",
|
|
96203
|
-
"web"
|
|
96204
|
-
];
|
|
96205
96209
|
const validCanvasFilter = selectedCanvasFilter.value && ALLOWED_CANVAS_TYPES.includes(selectedCanvasFilter.value) ? selectedCanvasFilter.value : null;
|
|
96206
96210
|
if (selectedCanvasFilter.value && !validCanvasFilter) {
|
|
96207
96211
|
console.warn("[CAlgoliaSearch] Selected canvas filter is invalid and was removed:", selectedCanvasFilter.value);
|
|
@@ -96256,18 +96260,20 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96256
96260
|
}, 50);
|
|
96257
96261
|
} catch (error) {
|
|
96258
96262
|
console.error("Search error:", error);
|
|
96259
|
-
|
|
96260
|
-
|
|
96261
|
-
|
|
96262
|
-
|
|
96263
|
-
|
|
96264
|
-
|
|
96265
|
-
|
|
96266
|
-
|
|
96267
|
-
|
|
96268
|
-
|
|
96269
|
-
|
|
96270
|
-
|
|
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
|
+
}
|
|
96271
96277
|
}
|
|
96272
96278
|
}
|
|
96273
96279
|
};
|
|
@@ -96277,21 +96283,38 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96277
96283
|
if (!query || typeof query !== "string") return "";
|
|
96278
96284
|
return query;
|
|
96279
96285
|
}
|
|
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
|
+
}
|
|
96280
96310
|
const debouncedFilterSearch = () => {
|
|
96281
96311
|
if (filterChangeTimer) clearTimeout(filterChangeTimer);
|
|
96282
96312
|
if (searchTimer) clearTimeout(searchTimer);
|
|
96283
96313
|
filterChangeTimer = setTimeout(async () => {
|
|
96284
96314
|
if (searchQuery.value.trim() && !showRecentView.value) {
|
|
96285
|
-
|
|
96286
|
-
skipNextSuggestionFetch.value = true;
|
|
96287
|
-
await performSearch(searchQuery.value);
|
|
96288
|
-
} catch (error) {
|
|
96289
|
-
console.error("[debouncedFilterSearch] Search failed:", error);
|
|
96290
|
-
} finally {
|
|
96291
|
-
skipNextSuggestionFetch.value = false;
|
|
96292
|
-
}
|
|
96315
|
+
applyFiltersToResults();
|
|
96293
96316
|
}
|
|
96294
|
-
},
|
|
96317
|
+
}, 300);
|
|
96295
96318
|
};
|
|
96296
96319
|
const handleSearchInput = (query) => {
|
|
96297
96320
|
const validatedQuery = validateSearchInput(query);
|
|
@@ -97275,7 +97298,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97275
97298
|
}
|
|
97276
97299
|
});
|
|
97277
97300
|
|
|
97278
|
-
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-
|
|
97301
|
+
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-d67927f9"]]);
|
|
97279
97302
|
|
|
97280
97303
|
const BulletListExtended = BulletList.extend({
|
|
97281
97304
|
addOptions() {
|