utopia-ui 3.0.74 → 3.0.75

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Utopia UI [![npm version](https://img.shields.io/npm/v/utopia-ui.svg)](https://www.npmjs.com/package/utopia-ui) ![Build Status](https://img.shields.io/github/actions/workflow/status/utopia-os/utopia-ui/test.build.yml?branch=main) [![Docs Coverage](https://utopia-os.org/utopia-ui/coverage.svg)](https://utopia-os.org/utopia-ui/) ![License](https://img.shields.io/github/license/utopia-os/utopia-ui)
1
+ # Utopia UI [![npm version](https://img.shields.io/npm/v/utopia-ui.svg)](https://www.npmjs.com/package/utopia-ui) ![Build Status](https://img.shields.io/github/actions/workflow/status/utopia-os/utopia-ui/test.build.yml?branch=main) ![Test Coverage](https://utopia-os.org/utopia-ui/test-coverage.svg) [![Docs Coverage](https://utopia-os.org/utopia-ui/coverage.svg)](https://utopia-os.org/utopia-ui/) ![License](https://img.shields.io/github/license/utopia-os/utopia-ui)
2
2
 
3
3
  **UI Framework for Real-Life-Networking-Apps**
4
4
 
package/dist/index.cjs CHANGED
@@ -3235,6 +3235,10 @@ function HeaderView({ item, api, editCallback, deleteCallback, setPositionCallba
3235
3235
  setModalOpen(true);
3236
3236
  event.stopPropagation();
3237
3237
  };
3238
+ React.useEffect(() => {
3239
+ if (avatar)
3240
+ setImageLoaded(true);
3241
+ }, [avatar]);
3238
3242
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: 'tw-flex tw-flex-row', children: [jsxRuntime.jsx("div", { className: 'tw-grow tw-max-w-[calc(100%-60px)] }', children: jsxRuntime.jsxs("div", { className: 'flex items-center', children: [avatar && (jsxRuntime.jsx("div", { className: 'tw-avatar', children: jsxRuntime.jsxs("div", { className: `${big ? 'tw-w-20' : 'tw-w-10'} tw-inline tw-items-center tw-justify-center overflow-hidden`, children: [jsxRuntime.jsx("img", { className: 'tw-w-full tw-h-full tw-object-cover tw-rounded-full', src: avatar, alt: item.name + ' logo', onLoad: () => setImageLoaded(true), onError: () => setImageLoaded(false), style: { display: imageLoaded ? 'block' : 'none' } }), !imageLoaded && (jsxRuntime.jsx("div", { className: 'tw-w-full tw-h-full tw-bg-gray-200 tw-rounded-full' }))] }) })), jsxRuntime.jsxs("div", { className: `${avatar ? 'tw-ml-2' : ''} tw-overflow-hidden`, children: [jsxRuntime.jsx("div", { className: `${big ? 'xl:tw-text-3xl tw-text-2xl' : 'tw-text-xl'} tw-font-semibold tw-truncate`, title: title, children: title }), showAddress && address && !hideSubname && (jsxRuntime.jsx("div", { className: `tw-text-xs tw-text-gray-500 ${truncateSubname && 'tw-truncate'}`, children: address })), subtitle && !hideSubname && (jsxRuntime.jsx("div", { className: `tw-text-xs tw-text-gray-500 ${truncateSubname && 'tw-truncate'}`, children: subtitle }))] })] }) }), jsxRuntime.jsx("div", { onClick: (e) => e.stopPropagation(), className: `${big ? 'tw-mt-5' : 'tw-mt-1'}`, children: (api?.deleteItem || item.layer?.api?.updateItem) &&
3239
3243
  (hasUserPermission(api?.collectionName, 'delete', item) ||
3240
3244
  hasUserPermission(api?.collectionName, 'update', item)) &&