@tutti-os/workbench-surface 0.0.255 → 0.0.256
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/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -14889,10 +14889,26 @@ function useWorkbenchHostSurfaceRenderers(input) {
|
|
|
14889
14889
|
]
|
|
14890
14890
|
);
|
|
14891
14891
|
const captureNodePreviewImage = useCallback14(
|
|
14892
|
-
async (node) =>
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
|
|
14892
|
+
async (node) => {
|
|
14893
|
+
const definitionPreviewImageUrl = await captureNodeDefinitionPreviewImage(node);
|
|
14894
|
+
if (definitionPreviewImageUrl !== null) {
|
|
14895
|
+
return definitionPreviewImageUrl;
|
|
14896
|
+
}
|
|
14897
|
+
if (input.captureNodePreviewImage) {
|
|
14898
|
+
return await Promise.resolve(input.captureNodePreviewImage(node)).catch(
|
|
14899
|
+
() => null
|
|
14900
|
+
);
|
|
14901
|
+
}
|
|
14902
|
+
const previewImages = await Promise.resolve(
|
|
14903
|
+
input.captureNodePreviewImages?.(node) ?? null
|
|
14904
|
+
).catch(() => null);
|
|
14905
|
+
return previewImages?.dockPreviewImageUrl ?? null;
|
|
14906
|
+
},
|
|
14907
|
+
[
|
|
14908
|
+
captureNodeDefinitionPreviewImage,
|
|
14909
|
+
input.captureNodePreviewImage,
|
|
14910
|
+
input.captureNodePreviewImages
|
|
14911
|
+
]
|
|
14896
14912
|
);
|
|
14897
14913
|
const captureNodePreviewImages = useCallback14(
|
|
14898
14914
|
async (node) => {
|