@pitcher/canvas-ui 2025.12.4-164350-beta → 2025.12.5-123108-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 +166 -154
- package/canvas-ui.js.map +1 -1
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +1 -0
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -92229,18 +92229,19 @@ const navigateToHome = (skipSetPreviousLocation) => navigateToHome$1({
|
|
|
92229
92229
|
const updateHomePageSettings = (homePage) => {
|
|
92230
92230
|
canvasHomePage.value = homePage;
|
|
92231
92231
|
};
|
|
92232
|
+
const mergeWithArrayReplacement = (...sources) => mergeWith({}, ...sources, (_objValue, srcValue) => {
|
|
92233
|
+
if (Array.isArray(srcValue)) {
|
|
92234
|
+
return srcValue;
|
|
92235
|
+
}
|
|
92236
|
+
return void 0;
|
|
92237
|
+
});
|
|
92232
92238
|
const mergeIntoActiveContext = (contextUpdate) => {
|
|
92233
92239
|
if (!activeCanvas.value) {
|
|
92234
92240
|
console.warn("[mergeIntoActiveContext] No active canvas to update context");
|
|
92235
92241
|
return;
|
|
92236
92242
|
}
|
|
92237
92243
|
const currentContext = activeCanvas.value.context ?? {};
|
|
92238
|
-
const mergedContext =
|
|
92239
|
-
if (Array.isArray(srcValue)) {
|
|
92240
|
-
return srcValue;
|
|
92241
|
-
}
|
|
92242
|
-
return void 0;
|
|
92243
|
-
});
|
|
92244
|
+
const mergedContext = mergeWithArrayReplacement(currentContext, contextUpdate);
|
|
92244
92245
|
activeCanvas.value = {
|
|
92245
92246
|
...activeCanvas.value,
|
|
92246
92247
|
context: mergedContext
|
|
@@ -92409,7 +92410,8 @@ function useCanvas$1() {
|
|
|
92409
92410
|
onWizardExit,
|
|
92410
92411
|
contentAnnotation,
|
|
92411
92412
|
getSafeContext,
|
|
92412
|
-
watchCanvas
|
|
92413
|
+
watchCanvas,
|
|
92414
|
+
mergeWithArrayReplacement
|
|
92413
92415
|
};
|
|
92414
92416
|
}
|
|
92415
92417
|
|
|
@@ -94472,115 +94474,119 @@ const _hoisted_5$1M = {
|
|
|
94472
94474
|
key: 1,
|
|
94473
94475
|
class: "flex items-center mt-4"
|
|
94474
94476
|
};
|
|
94475
|
-
const _hoisted_6$1w = { class: "flex space-x-0" };
|
|
94477
|
+
const _hoisted_6$1w = { class: "flex space-x-0 items-center" };
|
|
94476
94478
|
const _hoisted_7$18 = { class: "uppercase" };
|
|
94477
94479
|
const _hoisted_8$Z = {
|
|
94480
|
+
key: 1,
|
|
94481
|
+
class: "h-16px w-1px bg-gray-300 mx-2"
|
|
94482
|
+
};
|
|
94483
|
+
const _hoisted_9$O = {
|
|
94478
94484
|
key: 0,
|
|
94479
94485
|
class: "flex items-center space-x-1 ml-2"
|
|
94480
94486
|
};
|
|
94481
|
-
const
|
|
94482
|
-
const
|
|
94483
|
-
const
|
|
94484
|
-
const
|
|
94485
|
-
const
|
|
94487
|
+
const _hoisted_10$C = { class: "flex items-center" };
|
|
94488
|
+
const _hoisted_11$x = { key: 0 };
|
|
94489
|
+
const _hoisted_12$p = { class: "c-select-filter__popover w-[350px] rounded flex flex-col bg-base" };
|
|
94490
|
+
const _hoisted_13$k = { class: "pa-2 max-h-[300px] overflow-y-auto" };
|
|
94491
|
+
const _hoisted_14$h = {
|
|
94486
94492
|
key: 0,
|
|
94487
94493
|
class: "flex items-center ml-2"
|
|
94488
94494
|
};
|
|
94489
|
-
const
|
|
94495
|
+
const _hoisted_15$f = {
|
|
94490
94496
|
key: 0,
|
|
94491
94497
|
class: "flex items-center ml-2"
|
|
94492
94498
|
};
|
|
94493
|
-
const
|
|
94494
|
-
const
|
|
94499
|
+
const _hoisted_16$e = { class: "flex flex-col w-full flex-1 min-h-0" };
|
|
94500
|
+
const _hoisted_17$c = {
|
|
94495
94501
|
key: 0,
|
|
94496
94502
|
class: "flex-1 overflow-y-auto bg-white w-full pl-1 pr-6 py-0"
|
|
94497
94503
|
};
|
|
94498
|
-
const
|
|
94499
|
-
const
|
|
94500
|
-
const
|
|
94501
|
-
const
|
|
94502
|
-
const
|
|
94503
|
-
const
|
|
94504
|
-
const
|
|
94504
|
+
const _hoisted_18$a = { class: "space-y-1 mt-4" };
|
|
94505
|
+
const _hoisted_19$a = ["onClick"];
|
|
94506
|
+
const _hoisted_20$9 = { class: "text-sm text-gray-700" };
|
|
94507
|
+
const _hoisted_21$7 = { class: "flex items-center mb-0" };
|
|
94508
|
+
const _hoisted_22$5 = { class: "text-sm font-bold text-gray-700" };
|
|
94509
|
+
const _hoisted_23$5 = ["onClick"];
|
|
94510
|
+
const _hoisted_24$5 = {
|
|
94505
94511
|
key: 0,
|
|
94506
94512
|
class: "relative mr-4"
|
|
94507
94513
|
};
|
|
94508
|
-
const
|
|
94514
|
+
const _hoisted_25$5 = {
|
|
94509
94515
|
key: 0,
|
|
94510
94516
|
class: "absolute inset-0 flex items-center justify-center bg-gray-200 bg-opacity-75 border-rounded-1"
|
|
94511
94517
|
};
|
|
94512
|
-
const
|
|
94518
|
+
const _hoisted_26$5 = {
|
|
94513
94519
|
key: 1,
|
|
94514
94520
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
94515
94521
|
};
|
|
94516
|
-
const
|
|
94517
|
-
const
|
|
94518
|
-
const
|
|
94519
|
-
const
|
|
94522
|
+
const _hoisted_27$5 = { class: "flex-1 min-w-0" };
|
|
94523
|
+
const _hoisted_28$5 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
94524
|
+
const _hoisted_29$5 = { class: "text-xs text-gray-500" };
|
|
94525
|
+
const _hoisted_30$4 = {
|
|
94520
94526
|
key: 1,
|
|
94521
94527
|
class: "flex-1 overflow-y-auto bg-white w-full"
|
|
94522
94528
|
};
|
|
94523
|
-
const
|
|
94524
|
-
const
|
|
94529
|
+
const _hoisted_31$4 = { class: "w-full px-0" };
|
|
94530
|
+
const _hoisted_32$4 = {
|
|
94525
94531
|
key: 0,
|
|
94526
94532
|
class: "mb-0"
|
|
94527
94533
|
};
|
|
94528
|
-
const
|
|
94529
|
-
const
|
|
94530
|
-
const
|
|
94531
|
-
const
|
|
94532
|
-
const
|
|
94534
|
+
const _hoisted_33$4 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
94535
|
+
const _hoisted_34$4 = { class: "text-m font-semibold text-gray-900" };
|
|
94536
|
+
const _hoisted_35$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
94537
|
+
const _hoisted_36$4 = ["data-result-selected", "onClick"];
|
|
94538
|
+
const _hoisted_37$4 = {
|
|
94533
94539
|
key: 1,
|
|
94534
94540
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
94535
94541
|
};
|
|
94536
|
-
const
|
|
94537
|
-
const
|
|
94538
|
-
const
|
|
94539
|
-
const
|
|
94540
|
-
const
|
|
94542
|
+
const _hoisted_38$4 = { class: "flex-1 min-w-0" };
|
|
94543
|
+
const _hoisted_39$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
94544
|
+
const _hoisted_40$4 = { class: "text-xs text-gray-500" };
|
|
94545
|
+
const _hoisted_41$4 = { class: "text-xs text-gray-400" };
|
|
94546
|
+
const _hoisted_42$4 = {
|
|
94541
94547
|
key: 0,
|
|
94542
94548
|
class: "px-0 py-0"
|
|
94543
94549
|
};
|
|
94544
|
-
const
|
|
94545
|
-
const
|
|
94546
|
-
const
|
|
94547
|
-
const
|
|
94548
|
-
const
|
|
94549
|
-
const
|
|
94550
|
-
const
|
|
94551
|
-
const
|
|
94552
|
-
const
|
|
94553
|
-
const
|
|
94554
|
-
const
|
|
94550
|
+
const _hoisted_43$4 = { key: 1 };
|
|
94551
|
+
const _hoisted_44$4 = { class: "flex items-center px-0 pt-4 pb-1" };
|
|
94552
|
+
const _hoisted_45$4 = { class: "text-m font-semibold text-gray-900" };
|
|
94553
|
+
const _hoisted_46$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
94554
|
+
const _hoisted_47$4 = ["data-result-selected", "onClick"];
|
|
94555
|
+
const _hoisted_48$4 = { class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center" };
|
|
94556
|
+
const _hoisted_49$4 = { class: "flex-1 min-w-0" };
|
|
94557
|
+
const _hoisted_50$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
94558
|
+
const _hoisted_51$2 = { class: "text-xs text-gray-500" };
|
|
94559
|
+
const _hoisted_52$2 = { class: "text-xs text-gray-400" };
|
|
94560
|
+
const _hoisted_53$2 = {
|
|
94555
94561
|
key: 0,
|
|
94556
94562
|
class: "px-0 py-0"
|
|
94557
94563
|
};
|
|
94558
|
-
const
|
|
94564
|
+
const _hoisted_54$1 = {
|
|
94559
94565
|
key: 0,
|
|
94560
94566
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
94561
94567
|
};
|
|
94562
|
-
const
|
|
94568
|
+
const _hoisted_55$1 = {
|
|
94563
94569
|
key: 2,
|
|
94564
94570
|
class: "flex-1 overflow-y-auto bg-white w-full"
|
|
94565
94571
|
};
|
|
94566
|
-
const
|
|
94567
|
-
const
|
|
94568
|
-
const
|
|
94569
|
-
const
|
|
94570
|
-
const
|
|
94571
|
-
const
|
|
94572
|
+
const _hoisted_56$1 = { class: "w-full px-0" };
|
|
94573
|
+
const _hoisted_57$1 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
94574
|
+
const _hoisted_58$1 = { class: "text-m font-semibold text-gray-900" };
|
|
94575
|
+
const _hoisted_59$1 = { class: "ml-2 text-sm text-gray-500" };
|
|
94576
|
+
const _hoisted_60$1 = ["data-result-selected", "onClick"];
|
|
94577
|
+
const _hoisted_61$1 = {
|
|
94572
94578
|
key: 1,
|
|
94573
94579
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
94574
94580
|
};
|
|
94575
|
-
const
|
|
94576
|
-
const
|
|
94577
|
-
const
|
|
94578
|
-
const
|
|
94579
|
-
const
|
|
94581
|
+
const _hoisted_62$1 = { class: "flex-1 min-w-0" };
|
|
94582
|
+
const _hoisted_63$1 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
94583
|
+
const _hoisted_64$1 = { class: "text-xs text-gray-500" };
|
|
94584
|
+
const _hoisted_65$1 = { class: "text-xs text-gray-400" };
|
|
94585
|
+
const _hoisted_66$1 = {
|
|
94580
94586
|
key: 0,
|
|
94581
94587
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
94582
94588
|
};
|
|
94583
|
-
const
|
|
94589
|
+
const _hoisted_67$1 = {
|
|
94584
94590
|
key: 0,
|
|
94585
94591
|
class: "flex flex-wrap line-height-6 pt-4 pb-2 px-6 border-t border-gray-200 gap-y-4 gap-x-4"
|
|
94586
94592
|
};
|
|
@@ -95375,8 +95381,8 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95375
95381
|
createElementVNode("div", _hoisted_6$1w, [
|
|
95376
95382
|
createElementVNode("button", {
|
|
95377
95383
|
class: normalizeClass([
|
|
95378
|
-
"h-
|
|
95379
|
-
searchType.value === null ? "bg-
|
|
95384
|
+
"h-28px text-14px font-500 transition-colors duration-200 flex items-center shadow-none outline-none focus:outline-none border-0",
|
|
95385
|
+
searchType.value === null ? "bg-primary5 text-primary px-12px rounded-4px" : "bg-primary6 text-primary hover:bg-primary5 px-16px"
|
|
95380
95386
|
]),
|
|
95381
95387
|
onClick: handleEverywhereClick
|
|
95382
95388
|
}, [
|
|
@@ -95385,25 +95391,26 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95385
95391
|
searchType.value !== "canvases" ? (openBlock(), createElementBlock("button", {
|
|
95386
95392
|
key: 0,
|
|
95387
95393
|
class: normalizeClass([
|
|
95388
|
-
"h-
|
|
95389
|
-
searchType.value === "content" ? "bg-
|
|
95394
|
+
"h-28px text-14px font-500 transition-colors duration-200 flex items-center shadow-none outline-none focus:outline-none border-0",
|
|
95395
|
+
searchType.value === "content" ? "bg-primary5 text-primary px-16px rounded-4px" : "bg-primary6 text-primary hover:bg-primary5 px-16px"
|
|
95390
95396
|
]),
|
|
95391
95397
|
onClick: _cache[4] || (_cache[4] = ($event) => searchType.value === "content" ? handleEverywhereClick() : searchType.value = "content")
|
|
95392
95398
|
}, [
|
|
95393
95399
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.tabs.content")), 1)
|
|
95394
95400
|
], 2)) : createCommentVNode("", true),
|
|
95401
|
+
searchType.value !== "content" && searchType.value !== "canvases" ? (openBlock(), createElementBlock("div", _hoisted_8$Z)) : createCommentVNode("", true),
|
|
95395
95402
|
searchType.value !== "content" ? (openBlock(), createElementBlock("button", {
|
|
95396
|
-
key:
|
|
95403
|
+
key: 2,
|
|
95397
95404
|
class: normalizeClass([
|
|
95398
|
-
"h-
|
|
95399
|
-
searchType.value === "canvases" ? "bg-
|
|
95405
|
+
"h-28px text-14px font-500 transition-colors duration-200 flex items-center shadow-none outline-none focus:outline-none border-0",
|
|
95406
|
+
searchType.value === "canvases" ? "bg-primary5 text-primary px-16px rounded-4px" : "bg-primary6 text-primary hover:bg-primary5 px-16px"
|
|
95400
95407
|
]),
|
|
95401
95408
|
onClick: _cache[5] || (_cache[5] = ($event) => searchType.value === "canvases" ? handleEverywhereClick() : searchType.value = "canvases")
|
|
95402
95409
|
}, [
|
|
95403
95410
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.tabs.pitchDecks")), 1)
|
|
95404
95411
|
], 2)) : createCommentVNode("", true)
|
|
95405
95412
|
]),
|
|
95406
|
-
searchType.value ? (openBlock(), createElementBlock("div",
|
|
95413
|
+
searchType.value ? (openBlock(), createElementBlock("div", _hoisted_9$O, [
|
|
95407
95414
|
searchType.value === "content" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
95408
95415
|
createVNode(unref(NPopover), {
|
|
95409
95416
|
class: "c-select-filter",
|
|
@@ -95420,7 +95427,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95420
95427
|
style: normalizeStyle({
|
|
95421
95428
|
"--n-color": selectedFileTypes.value.length ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
95422
95429
|
"--n-border": "1px solid var(--p-primary5)",
|
|
95423
|
-
"--n-height": "
|
|
95430
|
+
"--n-height": "28px"
|
|
95424
95431
|
}),
|
|
95425
95432
|
themeOverrides: {
|
|
95426
95433
|
borderRadius: "4px"
|
|
@@ -95428,11 +95435,9 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95428
95435
|
onClick: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
|
|
95429
95436
|
}, {
|
|
95430
95437
|
default: withCtx(() => [
|
|
95431
|
-
createElementVNode("div",
|
|
95432
|
-
createElementVNode("span",
|
|
95433
|
-
|
|
95434
|
-
}, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 3),
|
|
95435
|
-
selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_10$C, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true),
|
|
95438
|
+
createElementVNode("div", _hoisted_10$C, [
|
|
95439
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1),
|
|
95440
|
+
selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true),
|
|
95436
95441
|
selectedFileTypes.value.length ? (openBlock(), createBlock(CIcon, {
|
|
95437
95442
|
key: 1,
|
|
95438
95443
|
class: "ml-1",
|
|
@@ -95447,8 +95452,8 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95447
95452
|
}, 8, ["style"])
|
|
95448
95453
|
]),
|
|
95449
95454
|
default: withCtx(() => [
|
|
95450
|
-
createElementVNode("div",
|
|
95451
|
-
createElementVNode("div",
|
|
95455
|
+
createElementVNode("div", _hoisted_12$p, [
|
|
95456
|
+
createElementVNode("div", _hoisted_13$k, [
|
|
95452
95457
|
(openBlock(), createElementBlock(Fragment, null, renderList(fileTypeOptions, (option) => {
|
|
95453
95458
|
return createElementVNode("div", {
|
|
95454
95459
|
key: option.value,
|
|
@@ -95488,7 +95493,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95488
95493
|
]),
|
|
95489
95494
|
_: 1
|
|
95490
95495
|
}, 8, ["show"]),
|
|
95491
|
-
hasActiveFilters.value ? (openBlock(), createElementBlock("div",
|
|
95496
|
+
hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_14$h, [
|
|
95492
95497
|
_cache[17] || (_cache[17] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
|
|
95493
95498
|
createElementVNode("span", {
|
|
95494
95499
|
class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
|
|
@@ -95501,7 +95506,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95501
95506
|
style: normalizeStyle({
|
|
95502
95507
|
"--n-color": selectedCanvasFilters.value.includes("saved_canvas") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
95503
95508
|
"--n-border": "1px solid var(--p-primary5)",
|
|
95504
|
-
"--n-height": "
|
|
95509
|
+
"--n-height": "28px"
|
|
95505
95510
|
}),
|
|
95506
95511
|
themeOverrides: {
|
|
95507
95512
|
borderRadius: "4px"
|
|
@@ -95509,9 +95514,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95509
95514
|
onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("saved_canvas"))
|
|
95510
95515
|
}, {
|
|
95511
95516
|
default: withCtx(() => [
|
|
95512
|
-
createElementVNode("span",
|
|
95513
|
-
class: normalizeClass({ "font-bold": selectedCanvasFilters.value.includes("saved_canvas") })
|
|
95514
|
-
}, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 3)
|
|
95517
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 1)
|
|
95515
95518
|
]),
|
|
95516
95519
|
_: 1
|
|
95517
95520
|
}, 8, ["style"]),
|
|
@@ -95520,7 +95523,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95520
95523
|
style: normalizeStyle({
|
|
95521
95524
|
"--n-color": selectedCanvasFilters.value.includes("template") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
95522
95525
|
"--n-border": "1px solid var(--p-primary5)",
|
|
95523
|
-
"--n-height": "
|
|
95526
|
+
"--n-height": "28px"
|
|
95524
95527
|
}),
|
|
95525
95528
|
themeOverrides: {
|
|
95526
95529
|
borderRadius: "4px"
|
|
@@ -95528,9 +95531,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95528
95531
|
onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("template"))
|
|
95529
95532
|
}, {
|
|
95530
95533
|
default: withCtx(() => [
|
|
95531
|
-
createElementVNode("span",
|
|
95532
|
-
class: normalizeClass({ "font-bold": selectedCanvasFilters.value.includes("template") })
|
|
95533
|
-
}, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 3)
|
|
95534
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 1)
|
|
95534
95535
|
]),
|
|
95535
95536
|
_: 1
|
|
95536
95537
|
}, 8, ["style"]),
|
|
@@ -95539,7 +95540,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95539
95540
|
style: normalizeStyle({
|
|
95540
95541
|
"--n-color": selectedCanvasFilters.value.includes("section") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
95541
95542
|
"--n-border": "1px solid var(--p-primary5)",
|
|
95542
|
-
"--n-height": "
|
|
95543
|
+
"--n-height": "28px"
|
|
95543
95544
|
}),
|
|
95544
95545
|
themeOverrides: {
|
|
95545
95546
|
borderRadius: "4px"
|
|
@@ -95547,9 +95548,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95547
95548
|
onClick: _cache[11] || (_cache[11] = ($event) => toggleCanvasFilter("section"))
|
|
95548
95549
|
}, {
|
|
95549
95550
|
default: withCtx(() => [
|
|
95550
|
-
createElementVNode("span",
|
|
95551
|
-
class: normalizeClass({ "font-bold": selectedCanvasFilters.value.includes("section") })
|
|
95552
|
-
}, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.products")), 3)
|
|
95551
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.products")), 1)
|
|
95553
95552
|
]),
|
|
95554
95553
|
_: 1
|
|
95555
95554
|
}, 8, ["style"]),
|
|
@@ -95558,7 +95557,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95558
95557
|
style: normalizeStyle({
|
|
95559
95558
|
"--n-color": selectedCanvasFilters.value.includes("block") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
95560
95559
|
"--n-border": "1px solid var(--p-primary5)",
|
|
95561
|
-
"--n-height": "
|
|
95560
|
+
"--n-height": "28px"
|
|
95562
95561
|
}),
|
|
95563
95562
|
themeOverrides: {
|
|
95564
95563
|
borderRadius: "4px"
|
|
@@ -95566,13 +95565,11 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95566
95565
|
onClick: _cache[12] || (_cache[12] = ($event) => toggleCanvasFilter("block"))
|
|
95567
95566
|
}, {
|
|
95568
95567
|
default: withCtx(() => [
|
|
95569
|
-
createElementVNode("span",
|
|
95570
|
-
class: normalizeClass({ "font-bold": selectedCanvasFilters.value.includes("block") })
|
|
95571
|
-
}, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.blocks")), 3)
|
|
95568
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.blocks")), 1)
|
|
95572
95569
|
]),
|
|
95573
95570
|
_: 1
|
|
95574
95571
|
}, 8, ["style"]),
|
|
95575
|
-
selectedCanvasFilters.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
95572
|
+
selectedCanvasFilters.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_15$f, [
|
|
95576
95573
|
_cache[18] || (_cache[18] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
|
|
95577
95574
|
createElementVNode("span", {
|
|
95578
95575
|
class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
|
|
@@ -95583,9 +95580,9 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95583
95580
|
])) : createCommentVNode("", true)
|
|
95584
95581
|
])) : createCommentVNode("", true)
|
|
95585
95582
|
]),
|
|
95586
|
-
createElementVNode("div",
|
|
95587
|
-
showRecentView.value ? (openBlock(), createElementBlock("div",
|
|
95588
|
-
createElementVNode("div",
|
|
95583
|
+
createElementVNode("div", _hoisted_16$e, [
|
|
95584
|
+
showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_17$c, [
|
|
95585
|
+
createElementVNode("div", _hoisted_18$a, [
|
|
95589
95586
|
(openBlock(true), createElementBlock(Fragment, null, renderList(recentSearches.value, (search) => {
|
|
95590
95587
|
return openBlock(), createElementBlock("div", {
|
|
95591
95588
|
key: search,
|
|
@@ -95598,14 +95595,14 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95598
95595
|
icon: "clock-rotate-left",
|
|
95599
95596
|
size: "16"
|
|
95600
95597
|
}),
|
|
95601
|
-
createElementVNode("span",
|
|
95602
|
-
], 8,
|
|
95598
|
+
createElementVNode("span", _hoisted_20$9, toDisplayString(search), 1)
|
|
95599
|
+
], 8, _hoisted_19$a);
|
|
95603
95600
|
}), 128))
|
|
95604
95601
|
]),
|
|
95605
95602
|
recentlyOpenedDocs.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
95606
95603
|
_cache[19] || (_cache[19] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
|
|
95607
|
-
createElementVNode("div",
|
|
95608
|
-
createElementVNode("span",
|
|
95604
|
+
createElementVNode("div", _hoisted_21$7, [
|
|
95605
|
+
createElementVNode("span", _hoisted_22$5, toDisplayString(unref(t)("canvasUI.components.fileViewer.recentlyOpened")), 1)
|
|
95609
95606
|
]),
|
|
95610
95607
|
createElementVNode("div", {
|
|
95611
95608
|
class: normalizeClass(_ctx.isAdmin ? "space-y-2" : "space-y-0")
|
|
@@ -95619,7 +95616,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95619
95616
|
]),
|
|
95620
95617
|
onClick: ($event) => handleRecentDocClick(doc, doc.type)
|
|
95621
95618
|
}, [
|
|
95622
|
-
doc.type === "file" ? (openBlock(), createElementBlock("div",
|
|
95619
|
+
doc.type === "file" ? (openBlock(), createElementBlock("div", _hoisted_24$5, [
|
|
95623
95620
|
createVNode(_sfc_main$6I, {
|
|
95624
95621
|
class: "h-14 border-rounded-1 overflow-hidden flex-0",
|
|
95625
95622
|
cover: "",
|
|
@@ -95628,7 +95625,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95628
95625
|
src: recentThumbnails.value[doc.id] || "",
|
|
95629
95626
|
width: "72"
|
|
95630
95627
|
}, null, 8, ["file-data", "src"]),
|
|
95631
|
-
isLoadingThumbnails.value && !recentThumbnails.value[doc.id] ? (openBlock(), createElementBlock("div",
|
|
95628
|
+
isLoadingThumbnails.value && !recentThumbnails.value[doc.id] ? (openBlock(), createElementBlock("div", _hoisted_25$5, [
|
|
95632
95629
|
createVNode(CIcon, {
|
|
95633
95630
|
class: "animate-spin",
|
|
95634
95631
|
color: "var(--p-primary)",
|
|
@@ -95636,7 +95633,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95636
95633
|
size: "20"
|
|
95637
95634
|
})
|
|
95638
95635
|
])) : createCommentVNode("", true)
|
|
95639
|
-
])) : (openBlock(), createElementBlock("div",
|
|
95636
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_26$5, [
|
|
95640
95637
|
doc.type === "canvas" ? (openBlock(), createBlock(CIcon, {
|
|
95641
95638
|
key: 0,
|
|
95642
95639
|
color: "var(--p-text2)",
|
|
@@ -95649,26 +95646,26 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95649
95646
|
size: "32"
|
|
95650
95647
|
}))
|
|
95651
95648
|
])),
|
|
95652
|
-
createElementVNode("div",
|
|
95653
|
-
createElementVNode("h3",
|
|
95654
|
-
createElementVNode("p",
|
|
95649
|
+
createElementVNode("div", _hoisted_27$5, [
|
|
95650
|
+
createElementVNode("h3", _hoisted_28$5, toDisplayString(doc.name), 1),
|
|
95651
|
+
createElementVNode("p", _hoisted_29$5, toDisplayString(doc.type === "canvas" ? formatCanvasType(doc.content_type) : doc.type === "folder" ? "Folder" : doc.file_category || "File"), 1)
|
|
95655
95652
|
])
|
|
95656
|
-
], 10,
|
|
95653
|
+
], 10, _hoisted_23$5);
|
|
95657
95654
|
}), 128))
|
|
95658
95655
|
], 2)
|
|
95659
95656
|
], 64)) : createCommentVNode("", true)
|
|
95660
|
-
])) : !searchType.value ? (openBlock(), createElementBlock("div",
|
|
95661
|
-
createElementVNode("div",
|
|
95662
|
-
filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
95663
|
-
createElementVNode("div",
|
|
95657
|
+
])) : !searchType.value ? (openBlock(), createElementBlock("div", _hoisted_30$4, [
|
|
95658
|
+
createElementVNode("div", _hoisted_31$4, [
|
|
95659
|
+
filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
|
|
95660
|
+
createElementVNode("div", _hoisted_33$4, [
|
|
95664
95661
|
createVNode(CIcon, {
|
|
95665
95662
|
class: "mr-2",
|
|
95666
95663
|
color: "var(--p-text2)",
|
|
95667
95664
|
icon: "folder",
|
|
95668
95665
|
size: "16"
|
|
95669
95666
|
}),
|
|
95670
|
-
createElementVNode("span",
|
|
95671
|
-
createElementVNode("span",
|
|
95667
|
+
createElementVNode("span", _hoisted_34$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
|
|
95668
|
+
createElementVNode("span", _hoisted_35$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
|
|
95672
95669
|
]),
|
|
95673
95670
|
createElementVNode("div", null, [
|
|
95674
95671
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.slice(0, 5), (item) => {
|
|
@@ -95690,22 +95687,22 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95690
95687
|
"object-fit": "cover",
|
|
95691
95688
|
src: item.picture_url || "",
|
|
95692
95689
|
width: "72"
|
|
95693
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div",
|
|
95690
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_37$4, [
|
|
95694
95691
|
createVNode(CIcon, {
|
|
95695
95692
|
color: "var(--p-text2)",
|
|
95696
95693
|
icon: "folder",
|
|
95697
95694
|
size: "32"
|
|
95698
95695
|
})
|
|
95699
95696
|
])),
|
|
95700
|
-
createElementVNode("div",
|
|
95701
|
-
createElementVNode("h3",
|
|
95702
|
-
createElementVNode("p",
|
|
95697
|
+
createElementVNode("div", _hoisted_38$4, [
|
|
95698
|
+
createElementVNode("h3", _hoisted_39$4, toDisplayString(item.name), 1),
|
|
95699
|
+
createElementVNode("p", _hoisted_40$4, toDisplayString(item.type === "folder" ? "Folder" : item.content_type || "PDF"), 1)
|
|
95703
95700
|
]),
|
|
95704
|
-
createElementVNode("div",
|
|
95705
|
-
], 10,
|
|
95701
|
+
createElementVNode("div", _hoisted_41$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
95702
|
+
], 10, _hoisted_36$4);
|
|
95706
95703
|
}), 128))
|
|
95707
95704
|
]),
|
|
95708
|
-
filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div",
|
|
95705
|
+
filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_42$4, [
|
|
95709
95706
|
createElementVNode("span", {
|
|
95710
95707
|
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
95711
95708
|
onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "content")
|
|
@@ -95719,16 +95716,16 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95719
95716
|
])
|
|
95720
95717
|
])) : createCommentVNode("", true)
|
|
95721
95718
|
])) : createCommentVNode("", true),
|
|
95722
|
-
filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
95723
|
-
createElementVNode("div",
|
|
95719
|
+
filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_43$4, [
|
|
95720
|
+
createElementVNode("div", _hoisted_44$4, [
|
|
95724
95721
|
createVNode(CIcon, {
|
|
95725
95722
|
class: "mr-2",
|
|
95726
95723
|
color: "var(--p-text2)",
|
|
95727
95724
|
icon: "presentation",
|
|
95728
95725
|
size: "16"
|
|
95729
95726
|
}),
|
|
95730
|
-
createElementVNode("span",
|
|
95731
|
-
createElementVNode("span",
|
|
95727
|
+
createElementVNode("span", _hoisted_45$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
95728
|
+
createElementVNode("span", _hoisted_46$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
|
|
95732
95729
|
]),
|
|
95733
95730
|
createElementVNode("div", null, [
|
|
95734
95731
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
|
|
@@ -95742,22 +95739,22 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95742
95739
|
"data-result-selected": isResultSelected(item),
|
|
95743
95740
|
onClick: ($event) => handleResultClick(item, "canvas")
|
|
95744
95741
|
}, [
|
|
95745
|
-
createElementVNode("div",
|
|
95742
|
+
createElementVNode("div", _hoisted_48$4, [
|
|
95746
95743
|
createVNode(CIcon, {
|
|
95747
95744
|
color: "var(--p-text2)",
|
|
95748
95745
|
icon: "presentation",
|
|
95749
95746
|
size: "32"
|
|
95750
95747
|
})
|
|
95751
95748
|
]),
|
|
95752
|
-
createElementVNode("div",
|
|
95753
|
-
createElementVNode("h3",
|
|
95754
|
-
createElementVNode("p",
|
|
95749
|
+
createElementVNode("div", _hoisted_49$4, [
|
|
95750
|
+
createElementVNode("h3", _hoisted_50$4, toDisplayString(item.name), 1),
|
|
95751
|
+
createElementVNode("p", _hoisted_51$2, toDisplayString(formatCanvasType(item.content_type)), 1)
|
|
95755
95752
|
]),
|
|
95756
|
-
createElementVNode("div",
|
|
95757
|
-
], 10,
|
|
95753
|
+
createElementVNode("div", _hoisted_52$2, toDisplayString(item.folder?.name || ""), 1)
|
|
95754
|
+
], 10, _hoisted_47$4);
|
|
95758
95755
|
}), 128))
|
|
95759
95756
|
]),
|
|
95760
|
-
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div",
|
|
95757
|
+
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_53$2, [
|
|
95761
95758
|
createElementVNode("span", {
|
|
95762
95759
|
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
95763
95760
|
onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
|
|
@@ -95772,7 +95769,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95772
95769
|
])) : createCommentVNode("", true)
|
|
95773
95770
|
])) : createCommentVNode("", true)
|
|
95774
95771
|
]),
|
|
95775
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div",
|
|
95772
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_54$1, [
|
|
95776
95773
|
createVNode(CIcon, {
|
|
95777
95774
|
class: "text-6xl",
|
|
95778
95775
|
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
@@ -95783,9 +95780,9 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95783
95780
|
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
95784
95781
|
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
95785
95782
|
])) : createCommentVNode("", true)
|
|
95786
|
-
])) : (openBlock(), createElementBlock("div",
|
|
95787
|
-
createElementVNode("div",
|
|
95788
|
-
createElementVNode("div",
|
|
95783
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_55$1, [
|
|
95784
|
+
createElementVNode("div", _hoisted_56$1, [
|
|
95785
|
+
createElementVNode("div", _hoisted_57$1, [
|
|
95789
95786
|
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
95790
95787
|
key: 0,
|
|
95791
95788
|
class: "mr-2",
|
|
@@ -95799,8 +95796,8 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95799
95796
|
icon: "presentation",
|
|
95800
95797
|
size: "16"
|
|
95801
95798
|
})),
|
|
95802
|
-
createElementVNode("span",
|
|
95803
|
-
createElementVNode("span",
|
|
95799
|
+
createElementVNode("span", _hoisted_58$1, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
95800
|
+
createElementVNode("span", _hoisted_59$1, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
|
|
95804
95801
|
]),
|
|
95805
95802
|
createElementVNode("div", null, [
|
|
95806
95803
|
(openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
|
|
@@ -95825,7 +95822,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95825
95822
|
"object-fit": "cover",
|
|
95826
95823
|
src: item.picture_url || "",
|
|
95827
95824
|
width: "72"
|
|
95828
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div",
|
|
95825
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_61$1, [
|
|
95829
95826
|
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
95830
95827
|
key: 0,
|
|
95831
95828
|
color: "var(--p-text2)",
|
|
@@ -95838,15 +95835,15 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95838
95835
|
size: "32"
|
|
95839
95836
|
}))
|
|
95840
95837
|
])),
|
|
95841
|
-
createElementVNode("div",
|
|
95842
|
-
createElementVNode("h3",
|
|
95843
|
-
createElementVNode("p",
|
|
95838
|
+
createElementVNode("div", _hoisted_62$1, [
|
|
95839
|
+
createElementVNode("h3", _hoisted_63$1, toDisplayString(item.name), 1),
|
|
95840
|
+
createElementVNode("p", _hoisted_64$1, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.content_type || "PDF" : formatCanvasType(item.content_type)), 1)
|
|
95844
95841
|
]),
|
|
95845
|
-
createElementVNode("div",
|
|
95846
|
-
], 10,
|
|
95842
|
+
createElementVNode("div", _hoisted_65$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
95843
|
+
], 10, _hoisted_60$1);
|
|
95847
95844
|
}), 128))
|
|
95848
95845
|
]),
|
|
95849
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div",
|
|
95846
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_66$1, [
|
|
95850
95847
|
createVNode(CIcon, {
|
|
95851
95848
|
class: "text-6xl",
|
|
95852
95849
|
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
@@ -95860,7 +95857,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95860
95857
|
])
|
|
95861
95858
|
]))
|
|
95862
95859
|
]),
|
|
95863
|
-
!showRecentView.value ? (openBlock(), createElementBlock("div",
|
|
95860
|
+
!showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_67$1, [
|
|
95864
95861
|
createVNode(CShortcut, null, {
|
|
95865
95862
|
default: withCtx(() => [
|
|
95866
95863
|
createVNode(CShortcutIcon, { icon: "arrow-up" }),
|
|
@@ -95902,7 +95899,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95902
95899
|
}
|
|
95903
95900
|
});
|
|
95904
95901
|
|
|
95905
|
-
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5I, [["__scopeId", "data-v-
|
|
95902
|
+
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5I, [["__scopeId", "data-v-2614a281"]]);
|
|
95906
95903
|
|
|
95907
95904
|
const BulletListExtended = BulletList.extend({
|
|
95908
95905
|
addOptions() {
|
|
@@ -167746,7 +167743,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
167746
167743
|
setTemporaryContextKeys,
|
|
167747
167744
|
getSafeContext,
|
|
167748
167745
|
watchCanvas,
|
|
167749
|
-
mergeIntoActiveContext
|
|
167746
|
+
mergeIntoActiveContext,
|
|
167747
|
+
saveCanvasContext,
|
|
167748
|
+
mergeWithArrayReplacement
|
|
167750
167749
|
} = useCanvas$1();
|
|
167751
167750
|
const { updateComponentsWithThemeAssets } = useCanvasNodes();
|
|
167752
167751
|
const {
|
|
@@ -168153,6 +168152,17 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
168153
168152
|
props.onEnter?.();
|
|
168154
168153
|
broadcastCanvasOpenedEvent();
|
|
168155
168154
|
window.retriggerWizard = retriggerWizard;
|
|
168155
|
+
window.getCanvasContext = () => {
|
|
168156
|
+
if (!activeCanvas.value) return null;
|
|
168157
|
+
return cloneDeep(activeCanvas.value?.context ?? {});
|
|
168158
|
+
};
|
|
168159
|
+
window.updateCanvasContext = async (context, options) => {
|
|
168160
|
+
if (!activeCanvas.value) {
|
|
168161
|
+
throw new Error("No active canvas");
|
|
168162
|
+
}
|
|
168163
|
+
const mergedContext = mergeWithArrayReplacement(activeCanvas.value?.context ?? {}, context);
|
|
168164
|
+
await saveCanvasContext(mergedContext, options);
|
|
168165
|
+
};
|
|
168156
168166
|
});
|
|
168157
168167
|
onBeforeUnmount(() => {
|
|
168158
168168
|
const canvasId = activeCanvas.value?.id;
|
|
@@ -168182,6 +168192,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
168182
168192
|
window.__scribblePendingRequests.clear();
|
|
168183
168193
|
}
|
|
168184
168194
|
window.retriggerWizard = void 0;
|
|
168195
|
+
window.getCanvasContext = void 0;
|
|
168196
|
+
window.updateCanvasContext = void 0;
|
|
168185
168197
|
}
|
|
168186
168198
|
__expose({
|
|
168187
168199
|
deleteAsset,
|