@datalayer/core 1.2.24 → 1.2.25

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { AlienIcon } from '@datalayer/icons-react';
3
3
  import { EntityAvatar, useColorPalette } from '@datalayer/primer-addons';
4
- import { getAvatarURL } from '../../utils/index.js';
4
+ import { getAvatarURL } from '../../utils/Avatar.js';
5
5
  import { ChosenAvatar, principalAvatarOf, } from '../principal/PrincipalAppearance.js';
6
6
  /**
7
7
  * Returns `true` when the given URL points to a real user avatar (i.e. not a
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text } from '@primer/react';
3
3
  import { Box } from '@datalayer/primer-addons';
4
- import { UserAvatar } from '../../components/avatars/index.js';
5
- import { CopyToClipboardButton } from '../../components/buttons/index.js';
4
+ import { UserAvatar } from '../../components/avatars/UserAvatar.js';
5
+ import { CopyToClipboardButton } from '../../components/buttons/CopyToClipboardButton.js';
6
6
  /** One row of the list: its label, then its value. */
7
7
  const Row = ({ label, children, }) => (_jsxs(_Fragment, { children: [_jsx(Box, { p: 1, children: _jsx(Text, { style: { fontWeight: 'bold' }, children: label }) }), _jsx(Box, { p: 1, display: "flex", alignItems: "center", gap: 1, children: typeof children === 'string' ? _jsx(Text, { children: children }) : children })] }));
8
8
  export const UserIdentity = ({ identity, displayId = true, displayComputed = true, avatarAction, }) => (_jsxs(Box, { children: [_jsxs(Box, { display: "flex", flexDirection: "column", alignItems: "flex-start", gap: 2, children: [_jsx(UserAvatar, { avatarUrl: identity.avatar_url, avatar: identity.avatar_icon, size: 100 }), avatarAction] }), _jsxs(Box, { display: "grid", gridTemplateColumns: "1fr 2fr", rowGap: 3, columnGap: 3, maxWidth: 500, mt: 3, children: [_jsx(Row, { label: "Username", children: identity.username }), displayComputed && (_jsxs(_Fragment, { children: [_jsx(Row, { label: "Display name", children: identity.display_name }), _jsx(Row, { label: "Initials", children: identity.initials })] })), identity.origin && _jsx(Row, { label: "Origin", children: identity.origin }), displayId && identity.id && (_jsx(Row, { label: "UID", children: _jsxs(_Fragment, { children: [_jsx(Text, { children: identity.id }), _jsx(CopyToClipboardButton, { value: identity.id, ariaLabel: "Copy the identifier of the account" })] }) }))] })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/core",
3
- "version": "1.2.24",
3
+ "version": "1.2.25",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",