@pitcher/canvas-ui 2025.12.4-161903-beta → 2025.12.4-162127
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 +25 -9
- package/canvas-ui.js.map +1 -1
- package/lib/apps/browser/stores/api.d.ts +0 -6
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +3 -2
- package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +2 -2
- package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +18 -18
- package/lib/apps/canvas-selector/stores/app.d.ts +14 -14
- package/lib/components/savedCanvases/smartFolders/SmartFolders.use.d.ts +4 -4
- package/lib/types/canvases.d.ts +0 -1
- package/package.json +1 -1
- package/types/openapi/models/Account.d.ts +1 -1
- package/types/openapi/models/AccountRequest.d.ts +1 -1
- package/types/openapi/models/DeletedFolder.d.ts +0 -1
- package/types/openapi/models/Folder.d.ts +0 -1
- package/types/openapi/models/FolderCreate.d.ts +0 -3
- package/types/openapi/models/FolderFile.d.ts +0 -2
- package/types/openapi/models/FolderRetrieve.d.ts +0 -4
- package/types/openapi/models/FolderUpdate.d.ts +0 -3
- package/types/openapi/models/InstanceMembershipUser.d.ts +0 -1
- package/types/openapi/models/OfflineSyncFolder.d.ts +0 -1
- package/types/openapi/models/User.d.ts +1 -4
package/canvas-ui.js
CHANGED
|
@@ -87996,7 +87996,6 @@ function assert(exp, message) {
|
|
|
87996
87996
|
const defaultSkipKeys = [
|
|
87997
87997
|
"id__in",
|
|
87998
87998
|
"tags__in",
|
|
87999
|
-
"tags__not_in",
|
|
88000
87999
|
"modified_at__gtr",
|
|
88001
88000
|
"created_at__gtr",
|
|
88002
88001
|
"end_at__lt",
|
|
@@ -92229,18 +92228,19 @@ const navigateToHome = (skipSetPreviousLocation) => navigateToHome$1({
|
|
|
92229
92228
|
const updateHomePageSettings = (homePage) => {
|
|
92230
92229
|
canvasHomePage.value = homePage;
|
|
92231
92230
|
};
|
|
92231
|
+
const mergeWithArrayReplacement = (...sources) => mergeWith({}, ...sources, (_objValue, srcValue) => {
|
|
92232
|
+
if (Array.isArray(srcValue)) {
|
|
92233
|
+
return srcValue;
|
|
92234
|
+
}
|
|
92235
|
+
return void 0;
|
|
92236
|
+
});
|
|
92232
92237
|
const mergeIntoActiveContext = (contextUpdate) => {
|
|
92233
92238
|
if (!activeCanvas.value) {
|
|
92234
92239
|
console.warn("[mergeIntoActiveContext] No active canvas to update context");
|
|
92235
92240
|
return;
|
|
92236
92241
|
}
|
|
92237
92242
|
const currentContext = activeCanvas.value.context ?? {};
|
|
92238
|
-
const mergedContext =
|
|
92239
|
-
if (Array.isArray(srcValue)) {
|
|
92240
|
-
return srcValue;
|
|
92241
|
-
}
|
|
92242
|
-
return void 0;
|
|
92243
|
-
});
|
|
92243
|
+
const mergedContext = mergeWithArrayReplacement(currentContext, contextUpdate);
|
|
92244
92244
|
activeCanvas.value = {
|
|
92245
92245
|
...activeCanvas.value,
|
|
92246
92246
|
context: mergedContext
|
|
@@ -92409,7 +92409,8 @@ function useCanvas$1() {
|
|
|
92409
92409
|
onWizardExit,
|
|
92410
92410
|
contentAnnotation,
|
|
92411
92411
|
getSafeContext,
|
|
92412
|
-
watchCanvas
|
|
92412
|
+
watchCanvas,
|
|
92413
|
+
mergeWithArrayReplacement
|
|
92413
92414
|
};
|
|
92414
92415
|
}
|
|
92415
92416
|
|
|
@@ -167746,7 +167747,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
167746
167747
|
setTemporaryContextKeys,
|
|
167747
167748
|
getSafeContext,
|
|
167748
167749
|
watchCanvas,
|
|
167749
|
-
mergeIntoActiveContext
|
|
167750
|
+
mergeIntoActiveContext,
|
|
167751
|
+
saveCanvasContext,
|
|
167752
|
+
mergeWithArrayReplacement
|
|
167750
167753
|
} = useCanvas$1();
|
|
167751
167754
|
const { updateComponentsWithThemeAssets } = useCanvasNodes();
|
|
167752
167755
|
const {
|
|
@@ -168153,6 +168156,17 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
168153
168156
|
props.onEnter?.();
|
|
168154
168157
|
broadcastCanvasOpenedEvent();
|
|
168155
168158
|
window.retriggerWizard = retriggerWizard;
|
|
168159
|
+
window.getCanvasContext = () => {
|
|
168160
|
+
if (!activeCanvas.value) return null;
|
|
168161
|
+
return cloneDeep(activeCanvas.value?.context ?? {});
|
|
168162
|
+
};
|
|
168163
|
+
window.updateCanvasContext = async (context, options) => {
|
|
168164
|
+
if (!activeCanvas.value) {
|
|
168165
|
+
throw new Error("No active canvas");
|
|
168166
|
+
}
|
|
168167
|
+
const mergedContext = mergeWithArrayReplacement(activeCanvas.value?.context ?? {}, context);
|
|
168168
|
+
await saveCanvasContext(mergedContext, options);
|
|
168169
|
+
};
|
|
168156
168170
|
});
|
|
168157
168171
|
onBeforeUnmount(() => {
|
|
168158
168172
|
const canvasId = activeCanvas.value?.id;
|
|
@@ -168182,6 +168196,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
168182
168196
|
window.__scribblePendingRequests.clear();
|
|
168183
168197
|
}
|
|
168184
168198
|
window.retriggerWizard = void 0;
|
|
168199
|
+
window.getCanvasContext = void 0;
|
|
168200
|
+
window.updateCanvasContext = void 0;
|
|
168185
168201
|
}
|
|
168186
168202
|
__expose({
|
|
168187
168203
|
deleteAsset,
|