@xyo-network/react-shared 2.64.5 → 2.64.7
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/browser/components/ListItemButtonEx.cjs +2 -2
- package/dist/browser/components/ListItemButtonEx.cjs.map +1 -1
- package/dist/browser/components/ListItemButtonEx.d.cts +1 -1
- package/dist/browser/components/ListItemButtonEx.d.cts.map +1 -1
- package/dist/browser/components/ListItemButtonEx.d.mts +1 -1
- package/dist/browser/components/ListItemButtonEx.d.mts.map +1 -1
- package/dist/browser/components/ListItemButtonEx.d.ts +1 -1
- package/dist/browser/components/ListItemButtonEx.d.ts.map +1 -1
- package/dist/browser/components/ListItemButtonEx.js +1 -1
- package/dist/browser/components/ListItemButtonEx.js.map +1 -1
- package/dist/browser/components/TableCell/AddressTableCell.cjs.map +1 -1
- package/dist/browser/components/TableCell/AddressTableCell.js.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCell.cjs.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCell.d.cts +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCell.d.cts.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCell.d.mts +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCell.d.mts.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCell.d.ts +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCell.d.ts.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCell.js.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.cjs.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.d.cts +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.d.cts.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.d.mts +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.d.mts.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.d.ts +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.d.ts.map +1 -1
- package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.js.map +1 -1
- package/dist/browser/components/TableCell/HashTableCell.cjs.map +1 -1
- package/dist/browser/components/TableCell/HashTableCell.js.map +1 -1
- package/dist/browser/components/TableCell/index.cjs.map +1 -1
- package/dist/browser/components/TableCell/index.js.map +1 -1
- package/dist/browser/components/index.cjs +2 -2
- package/dist/browser/components/index.cjs.map +1 -1
- package/dist/browser/components/index.js +1 -1
- package/dist/browser/components/index.js.map +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/docs.json +308 -308
- package/dist/node/components/ListItemButtonEx.cjs +2 -2
- package/dist/node/components/ListItemButtonEx.cjs.map +1 -1
- package/dist/node/components/ListItemButtonEx.d.cts +1 -1
- package/dist/node/components/ListItemButtonEx.d.cts.map +1 -1
- package/dist/node/components/ListItemButtonEx.d.mts +1 -1
- package/dist/node/components/ListItemButtonEx.d.mts.map +1 -1
- package/dist/node/components/ListItemButtonEx.d.ts +1 -1
- package/dist/node/components/ListItemButtonEx.d.ts.map +1 -1
- package/dist/node/components/ListItemButtonEx.js +1 -1
- package/dist/node/components/ListItemButtonEx.js.map +1 -1
- package/dist/node/components/TableCell/AddressTableCell.cjs.map +1 -1
- package/dist/node/components/TableCell/AddressTableCell.js.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCell.cjs.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCell.d.cts +1 -1
- package/dist/node/components/TableCell/EllipsisTableCell.d.cts.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCell.d.mts +1 -1
- package/dist/node/components/TableCell/EllipsisTableCell.d.mts.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCell.d.ts +1 -1
- package/dist/node/components/TableCell/EllipsisTableCell.d.ts.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCell.js.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCellDeprecated.cjs.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCellDeprecated.d.cts +1 -1
- package/dist/node/components/TableCell/EllipsisTableCellDeprecated.d.cts.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCellDeprecated.d.mts +1 -1
- package/dist/node/components/TableCell/EllipsisTableCellDeprecated.d.mts.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCellDeprecated.d.ts +1 -1
- package/dist/node/components/TableCell/EllipsisTableCellDeprecated.d.ts.map +1 -1
- package/dist/node/components/TableCell/EllipsisTableCellDeprecated.js.map +1 -1
- package/dist/node/components/TableCell/HashTableCell.cjs.map +1 -1
- package/dist/node/components/TableCell/HashTableCell.js.map +1 -1
- package/dist/node/components/TableCell/index.cjs.map +1 -1
- package/dist/node/components/TableCell/index.js.map +1 -1
- package/dist/node/components/index.cjs +2 -2
- package/dist/node/components/index.cjs.map +1 -1
- package/dist/node/components/index.js +1 -1
- package/dist/node/components/index.js.map +1 -1
- package/dist/node/index.cjs +2 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +12 -12
- package/src/components/BasicHero/BasicHero.stories.tsx +1 -1
- package/src/components/ListItemButtonEx.tsx +1 -1
- package/src/components/SectionSpacingRow/SectionSpacingRow.stories.tsx +1 -1
- package/src/components/TableCell/EllipsisTableCell.tsx +1 -1
- package/src/components/TableCell/EllipsisTableCellDeprecated.tsx +1 -1
- package/src/components/TableCell/EllipsizeTableCell.stories.tsx +1 -1
- package/src/components/ThemeTokenAvatar/ThemeTokenAvatar.stories.tsx +1 -1
- package/src/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.stories.tsx +1 -1
- package/src/components/TokenBar/TokenBar.stories.tsx +1 -1
- package/src/components/TokenSummary/TokenSummary.stories.tsx +1 -1
- package/src/hooks/GradientStyles/GradientStyle.stories.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/TableCell/HashTableCell.tsx","../../../../src/components/TableCell/EllipsisTableCell.tsx","../../../../src/components/Ellipsize.tsx","../../../../src/hooks/useShareForwardRef.ts"],"sourcesContent":["import { useEvent } from '@xyo-network/react-event'\nimport { useRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface HashTableCellProps extends EllipsisTableCellProps {\n archive?: string\n dataType?: 'block' | 'payload'\n exploreDomain?: string\n network?: string\n}\n\nexport const HashTableCell: React.FC<HashTableCellProps> = ({ value, archive, dataType, network, exploreDomain, ...props }) => {\n const ref = useRef<HTMLTableCellElement | null>(null)\n const [tableCellRef, dispatch] = useEvent<HTMLTableCellElement>(undefined, ref)\n const hashPath = `/${dataType}/hash/${value}?network=${network ?? 'main'}`\n const explorePath = archive ? `/archive/${archive}${hashPath}` : hashPath\n\n const handleCellClick = () => {\n dispatch?.('hash', 'click', value)\n }\n\n return (\n <EllipsisTableCell\n onClick={handleCellClick}\n ref={tableCellRef}\n value={value}\n href={exploreDomain ? `${exploreDomain}${explorePath}}` : undefined}\n to={exploreDomain ? undefined : explorePath}\n {...props}\n />\n )\n}\n","import { styled, TableCell, TableCellProps } from '@mui/material'\nimport { LinkEx } from '@xylabs/react-link'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useMemo } from 'react'\nimport { To } from 'react-router-dom'\n\nimport { EllipsizeBox } from '../Ellipsize'\n\nconst EllipsisTableCellRoot = styled(TableCell, {\n name: 'EllipsisTableCell',\n shouldForwardProp: (prop) => prop !== 'width',\n slot: 'Root',\n})(({ width = '100%' }) => ({\n width,\n}))\n\nexport interface EllipsisTableCellProps extends TableCellProps {\n href?: string\n link?: boolean\n to?: To\n value?: string\n /**\n * Width of the table cell.\n *\n * Note: When using percentages, this value can be different than what you expect\n * if used on a cell that is not the first cell in the first row.\n */\n width?: string | number\n}\n\nexport const EllipsisTableCellWithRef: React.FC<WithChildren<EllipsisTableCellProps>> = forwardRef(\n ({ children, href, link = false, to, value, ...props }, ref) => {\n const data = useMemo(() => {\n if (children) {\n return children\n }\n if (href || link || to) {\n return (\n <LinkEx title={value} to={to} href={href} target={href ? '_blank' : undefined}>\n {value}\n </LinkEx>\n )\n }\n return value\n }, [children, href, link, to, value])\n return (\n <EllipsisTableCellRoot ref={ref} {...props}>\n <EllipsizeBox sx={{ cursor: link || to || href ? 'pointer' : 'inherit' }}>{data}</EllipsizeBox>\n </EllipsisTableCellRoot>\n )\n },\n)\n\nEllipsisTableCellWithRef.displayName = 'EllipsisTableCell'\nexport const EllipsisTableCell = EllipsisTableCellWithRef\n","import { Box, BoxProps, styled, Typography, TypographyProps, TypographyTypeMap } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useCallback, useState } from 'react'\n\nimport { useShareForwardedRef } from '../hooks'\n\n/**\n * Heavily inspired by - https://stackoverflow.com/a/30362531/2803259\n */\n\nconst ComponentName = 'Ellipsize'\n\nexport interface EllipsizeRootProps extends BoxProps {\n beforeLineHeight?: string | number\n}\n\nconst EllipsizeRoot = styled(Box, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'beforeLineHeight',\n slot: 'Root',\n})<EllipsizeRootProps>(({ beforeLineHeight }) => ({\n '&': {\n // because the cell content ends up absolutely positioned, the cell doesn't know the content height.\n // the pseudo element with a hidden character establishes the proper height of the content and hides it\n ':before': {\n content: \"'nbsp;'\",\n display: 'block',\n // take the pseudo element out of the `display: block` flow so it won't push against our actual content\n float: 'left',\n visibility: 'hidden',\n // since we are `display: block`, lineHeight is the height\n ...(beforeLineHeight && { lineHeight: beforeLineHeight }),\n },\n },\n}))\n\nconst EllipsizeInnerWrap = styled(Box, {\n name: ComponentName,\n slot: 'innerWrap',\n})(() => ({\n position: 'relative',\n}))\n\nconst EllipsizeContentWrap = styled(Typography, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'ellipsisPosition',\n slot: 'contentWrap',\n})<TypographyWithComponentProps>(({ theme, ellipsisPosition, fontFamily }) => {\n return theme.unstable_sx({\n fontFamily: fontFamily ?? 'monospace',\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n right: 0,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...(ellipsisPosition === 'start'\n ? {\n direction: 'rtl',\n textAlign: 'left',\n }\n : {}),\n })\n})\n\nconst useClientHeight = () => {\n const [contentWrapHeight, setContentWrapHeight] = useState<string>()\n\n const contentWrapRef = useCallback((node: HTMLElement) => {\n if (node !== null) {\n setContentWrapHeight(node.clientHeight + 'px')\n }\n }, [])\n\n return { contentWrapHeight, contentWrapRef }\n}\n\n// See - https://mui.com/material-ui/guides/composition/#with-typescript\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {\n ellipsisPosition?: 'start' | 'end'\n}\n\nexport interface EllipsizeBoxProps extends BoxProps {\n disableSharedRef?: boolean\n ellipsisPosition?: 'start' | 'end'\n typographyProps?: TypographyWithComponentProps\n}\n\nexport const EllipsizeBox = forwardRef<HTMLDivElement, WithChildren<EllipsizeBoxProps>>(\n ({ children, ellipsisPosition = 'start', disableSharedRef, typographyProps, ...props }, ref) => {\n // Allow syncing of :before pseudo element height with contentWrapHeight\n const { contentWrapRef, contentWrapHeight } = useClientHeight()\n const sharedRef = useShareForwardedRef(ref)\n\n return (\n <EllipsizeRoot beforeLineHeight={!!sharedRef && !disableSharedRef ? contentWrapHeight : undefined} {...props} ref={ref}>\n <EllipsizeInnerWrap>\n <EllipsizeContentWrap ref={contentWrapRef} component={'span'} ellipsisPosition={ellipsisPosition} variant=\"body2\" {...typographyProps}>\n {children}\n </EllipsizeContentWrap>\n </EllipsizeInnerWrap>\n </EllipsizeRoot>\n )\n },\n)\nEllipsizeBox.displayName = 'EllipsizeBox'\n","import { ForwardedRef, useEffect, useRef } from 'react'\n\nexport const useShareForwardedRef = <T>(forwardedRef: ForwardedRef<T>, refresh = 0) => {\n // final ref that will share value with forward ref. this is the one to be attached to components\n const innerRef = useRef<T>(null)\n\n useEffect(() => {\n if (!forwardedRef) {\n return\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(innerRef.current)\n return\n } else {\n forwardedRef.current = innerRef.current\n }\n }, [forwardedRef, refresh])\n\n return innerRef\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,UAAAA,eAAc;;;ACDvB,SAAS,UAAAC,SAAQ,iBAAiC;AAClD,SAAS,cAAc;AAEvB,SAAS,cAAAC,aAAY,eAAe;;;ACHpC,SAAS,KAAe,QAAQ,kBAAsD;AAEtF,SAAS,YAAY,aAAa,gBAAgB;;;ACFlD,SAAuB,WAAW,cAAc;AAEzC,IAAM,uBAAuB,CAAI,cAA+B,UAAU,MAAM;AAErF,QAAM,WAAW,OAAU,IAAI;AAE/B,YAAU,MAAM;AACd,QAAI,CAAC,cAAc;AACjB;AAAA,IACF;AACA,QAAI,OAAO,iBAAiB,YAAY;AACtC,mBAAa,SAAS,OAAO;AAC7B;AAAA,IACF,OAAO;AACL,mBAAa,UAAU,SAAS;AAAA,IAClC;AAAA,EACF,GAAG,CAAC,cAAc,OAAO,CAAC;AAE1B,SAAO;AACT;;;AD+EU;AAxFV,IAAM,gBAAgB;AAMtB,IAAM,gBAAgB,OAAO,KAAK;AAAA,EAChC,MAAM;AAAA,EACN,mBAAmB,CAAC,SAAS,SAAS;AAAA,EACtC,MAAM;AACR,CAAC,EAAsB,CAAC,EAAE,iBAAiB,OAAO;AAAA,EAChD,KAAK;AAAA;AAAA;AAAA,IAGH,WAAW;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA;AAAA,MAET,OAAO;AAAA,MACP,YAAY;AAAA;AAAA,MAEZ,GAAI,oBAAoB,EAAE,YAAY,iBAAiB;AAAA,IACzD;AAAA,EACF;AACF,EAAE;AAEF,IAAM,qBAAqB,OAAO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MACL;AAAA,MACA,MAAM,gBAAgB,GAAG,aAAa,GAAG,WAAW,MAAM;AAAA,MAC1D,IAAI,gBAAgB,SAAY;AAAA,MAC/B,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["useRef","styled","forwardRef","jsx","styled","forwardRef","jsx","useRef"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/TableCell/HashTableCell.tsx","../../../../src/components/TableCell/EllipsisTableCell.tsx","../../../../src/components/Ellipsize.tsx","../../../../src/hooks/useShareForwardRef.ts"],"sourcesContent":["import { useEvent } from '@xyo-network/react-event'\nimport { useRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface HashTableCellProps extends EllipsisTableCellProps {\n archive?: string\n dataType?: 'block' | 'payload'\n exploreDomain?: string\n network?: string\n}\n\nexport const HashTableCell: React.FC<HashTableCellProps> = ({ value, archive, dataType, network, exploreDomain, ...props }) => {\n const ref = useRef<HTMLTableCellElement | null>(null)\n const [tableCellRef, dispatch] = useEvent<HTMLTableCellElement>(undefined, ref)\n const hashPath = `/${dataType}/hash/${value}?network=${network ?? 'main'}`\n const explorePath = archive ? `/archive/${archive}${hashPath}` : hashPath\n\n const handleCellClick = () => {\n dispatch?.('hash', 'click', value)\n }\n\n return (\n <EllipsisTableCell\n onClick={handleCellClick}\n ref={tableCellRef}\n value={value}\n href={exploreDomain ? `${exploreDomain}${explorePath}}` : undefined}\n to={exploreDomain ? undefined : explorePath}\n {...props}\n />\n )\n}\n","import { styled, TableCell, TableCellProps } from '@mui/material'\nimport { LinkEx } from '@xylabs/react-link'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useMemo } from 'react'\nimport { To } from 'react-router-dom-6'\n\nimport { EllipsizeBox } from '../Ellipsize'\n\nconst EllipsisTableCellRoot = styled(TableCell, {\n name: 'EllipsisTableCell',\n shouldForwardProp: (prop) => prop !== 'width',\n slot: 'Root',\n})(({ width = '100%' }) => ({\n width,\n}))\n\nexport interface EllipsisTableCellProps extends TableCellProps {\n href?: string\n link?: boolean\n to?: To\n value?: string\n /**\n * Width of the table cell.\n *\n * Note: When using percentages, this value can be different than what you expect\n * if used on a cell that is not the first cell in the first row.\n */\n width?: string | number\n}\n\nexport const EllipsisTableCellWithRef: React.FC<WithChildren<EllipsisTableCellProps>> = forwardRef(\n ({ children, href, link = false, to, value, ...props }, ref) => {\n const data = useMemo(() => {\n if (children) {\n return children\n }\n if (href || link || to) {\n return (\n <LinkEx title={value} to={to} href={href} target={href ? '_blank' : undefined}>\n {value}\n </LinkEx>\n )\n }\n return value\n }, [children, href, link, to, value])\n return (\n <EllipsisTableCellRoot ref={ref} {...props}>\n <EllipsizeBox sx={{ cursor: link || to || href ? 'pointer' : 'inherit' }}>{data}</EllipsizeBox>\n </EllipsisTableCellRoot>\n )\n },\n)\n\nEllipsisTableCellWithRef.displayName = 'EllipsisTableCell'\nexport const EllipsisTableCell = EllipsisTableCellWithRef\n","import { Box, BoxProps, styled, Typography, TypographyProps, TypographyTypeMap } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useCallback, useState } from 'react'\n\nimport { useShareForwardedRef } from '../hooks'\n\n/**\n * Heavily inspired by - https://stackoverflow.com/a/30362531/2803259\n */\n\nconst ComponentName = 'Ellipsize'\n\nexport interface EllipsizeRootProps extends BoxProps {\n beforeLineHeight?: string | number\n}\n\nconst EllipsizeRoot = styled(Box, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'beforeLineHeight',\n slot: 'Root',\n})<EllipsizeRootProps>(({ beforeLineHeight }) => ({\n '&': {\n // because the cell content ends up absolutely positioned, the cell doesn't know the content height.\n // the pseudo element with a hidden character establishes the proper height of the content and hides it\n ':before': {\n content: \"'nbsp;'\",\n display: 'block',\n // take the pseudo element out of the `display: block` flow so it won't push against our actual content\n float: 'left',\n visibility: 'hidden',\n // since we are `display: block`, lineHeight is the height\n ...(beforeLineHeight && { lineHeight: beforeLineHeight }),\n },\n },\n}))\n\nconst EllipsizeInnerWrap = styled(Box, {\n name: ComponentName,\n slot: 'innerWrap',\n})(() => ({\n position: 'relative',\n}))\n\nconst EllipsizeContentWrap = styled(Typography, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'ellipsisPosition',\n slot: 'contentWrap',\n})<TypographyWithComponentProps>(({ theme, ellipsisPosition, fontFamily }) => {\n return theme.unstable_sx({\n fontFamily: fontFamily ?? 'monospace',\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n right: 0,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...(ellipsisPosition === 'start'\n ? {\n direction: 'rtl',\n textAlign: 'left',\n }\n : {}),\n })\n})\n\nconst useClientHeight = () => {\n const [contentWrapHeight, setContentWrapHeight] = useState<string>()\n\n const contentWrapRef = useCallback((node: HTMLElement) => {\n if (node !== null) {\n setContentWrapHeight(node.clientHeight + 'px')\n }\n }, [])\n\n return { contentWrapHeight, contentWrapRef }\n}\n\n// See - https://mui.com/material-ui/guides/composition/#with-typescript\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {\n ellipsisPosition?: 'start' | 'end'\n}\n\nexport interface EllipsizeBoxProps extends BoxProps {\n disableSharedRef?: boolean\n ellipsisPosition?: 'start' | 'end'\n typographyProps?: TypographyWithComponentProps\n}\n\nexport const EllipsizeBox = forwardRef<HTMLDivElement, WithChildren<EllipsizeBoxProps>>(\n ({ children, ellipsisPosition = 'start', disableSharedRef, typographyProps, ...props }, ref) => {\n // Allow syncing of :before pseudo element height with contentWrapHeight\n const { contentWrapRef, contentWrapHeight } = useClientHeight()\n const sharedRef = useShareForwardedRef(ref)\n\n return (\n <EllipsizeRoot beforeLineHeight={!!sharedRef && !disableSharedRef ? contentWrapHeight : undefined} {...props} ref={ref}>\n <EllipsizeInnerWrap>\n <EllipsizeContentWrap ref={contentWrapRef} component={'span'} ellipsisPosition={ellipsisPosition} variant=\"body2\" {...typographyProps}>\n {children}\n </EllipsizeContentWrap>\n </EllipsizeInnerWrap>\n </EllipsizeRoot>\n )\n },\n)\nEllipsizeBox.displayName = 'EllipsizeBox'\n","import { ForwardedRef, useEffect, useRef } from 'react'\n\nexport const useShareForwardedRef = <T>(forwardedRef: ForwardedRef<T>, refresh = 0) => {\n // final ref that will share value with forward ref. this is the one to be attached to components\n const innerRef = useRef<T>(null)\n\n useEffect(() => {\n if (!forwardedRef) {\n return\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(innerRef.current)\n return\n } else {\n forwardedRef.current = innerRef.current\n }\n }, [forwardedRef, refresh])\n\n return innerRef\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,UAAAA,eAAc;;;ACDvB,SAAS,UAAAC,SAAQ,iBAAiC;AAClD,SAAS,cAAc;AAEvB,SAAS,cAAAC,aAAY,eAAe;;;ACHpC,SAAS,KAAe,QAAQ,kBAAsD;AAEtF,SAAS,YAAY,aAAa,gBAAgB;;;ACFlD,SAAuB,WAAW,cAAc;AAEzC,IAAM,uBAAuB,CAAI,cAA+B,UAAU,MAAM;AAErF,QAAM,WAAW,OAAU,IAAI;AAE/B,YAAU,MAAM;AACd,QAAI,CAAC,cAAc;AACjB;AAAA,IACF;AACA,QAAI,OAAO,iBAAiB,YAAY;AACtC,mBAAa,SAAS,OAAO;AAC7B;AAAA,IACF,OAAO;AACL,mBAAa,UAAU,SAAS;AAAA,IAClC;AAAA,EACF,GAAG,CAAC,cAAc,OAAO,CAAC;AAE1B,SAAO;AACT;;;AD+EU;AAxFV,IAAM,gBAAgB;AAMtB,IAAM,gBAAgB,OAAO,KAAK;AAAA,EAChC,MAAM;AAAA,EACN,mBAAmB,CAAC,SAAS,SAAS;AAAA,EACtC,MAAM;AACR,CAAC,EAAsB,CAAC,EAAE,iBAAiB,OAAO;AAAA,EAChD,KAAK;AAAA;AAAA;AAAA,IAGH,WAAW;AAAA,MACT,S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AY,OAAO,GAAG,QAAQ,KAAK;AAEjE,QAAM,kBAAkB,MAAM;AAC5B,yCAAW,QAAQ,SAAS;AAAA,EAC9B;AAEA,SACE,gBAAAD;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,KAAK;AAAA,MACL;AAAA,MACA,MAAM,gBAAgB,GAAG,aAAa,GAAG,WAAW,MAAM;AAAA,MAC1D,IAAI,gBAAgB,SAAY;AAAA,MAC/B,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["useRef","styled","forwardRef","jsx","styled","forwardRef","jsx","useRef"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/TableCell/index.ts","../../../../src/components/TableCell/AddressTableCell.tsx","../../../../src/components/TableCell/EllipsisTableCell.tsx","../../../../src/components/Ellipsize.tsx","../../../../src/hooks/useShareForwardRef.ts","../../../../src/components/TableCell/HashTableCell.tsx"],"sourcesContent":["export * from './AddressTableCell'\nexport * from './EllipsisTableCell'\nexport * from './HashTableCell'\n","import { forwardRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface AddressTableCellProps extends EllipsisTableCellProps {\n /** @deprecated - archives are no longer supported */\n archive?: string\n /** @deprecated - use events instead */\n exploreDomain?: string\n link?: boolean\n}\n\nconst AddressTableCell = forwardRef<HTMLTableCellElement, AddressTableCellProps>(({ value, archive, exploreDomain, link, ...props }, ref) => {\n const href = exploreDomain && archive ? `${exploreDomain}/archive/${archive}/address/${value}` : undefined\n const to = exploreDomain === undefined && archive ? `/archive/${archive}/address/${value}` : undefined\n\n return <EllipsisTableCell value={value} href={href} to={to} ref={ref} link={link} {...props} />\n})\n\nAddressTableCell.displayName = 'AddressTableCell'\nexport { AddressTableCell }\n","import { styled, TableCell, TableCellProps } from '@mui/material'\nimport { LinkEx } from '@xylabs/react-link'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useMemo } from 'react'\nimport { To } from 'react-router-dom'\n\nimport { EllipsizeBox } from '../Ellipsize'\n\nconst EllipsisTableCellRoot = styled(TableCell, {\n name: 'EllipsisTableCell',\n shouldForwardProp: (prop) => prop !== 'width',\n slot: 'Root',\n})(({ width = '100%' }) => ({\n width,\n}))\n\nexport interface EllipsisTableCellProps extends TableCellProps {\n href?: string\n link?: boolean\n to?: To\n value?: string\n /**\n * Width of the table cell.\n *\n * Note: When using percentages, this value can be different than what you expect\n * if used on a cell that is not the first cell in the first row.\n */\n width?: string | number\n}\n\nexport const EllipsisTableCellWithRef: React.FC<WithChildren<EllipsisTableCellProps>> = forwardRef(\n ({ children, href, link = false, to, value, ...props }, ref) => {\n const data = useMemo(() => {\n if (children) {\n return children\n }\n if (href || link || to) {\n return (\n <LinkEx title={value} to={to} href={href} target={href ? '_blank' : undefined}>\n {value}\n </LinkEx>\n )\n }\n return value\n }, [children, href, link, to, value])\n return (\n <EllipsisTableCellRoot ref={ref} {...props}>\n <EllipsizeBox sx={{ cursor: link || to || href ? 'pointer' : 'inherit' }}>{data}</EllipsizeBox>\n </EllipsisTableCellRoot>\n )\n },\n)\n\nEllipsisTableCellWithRef.displayName = 'EllipsisTableCell'\nexport const EllipsisTableCell = EllipsisTableCellWithRef\n","import { Box, BoxProps, styled, Typography, TypographyProps, TypographyTypeMap } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useCallback, useState } from 'react'\n\nimport { useShareForwardedRef } from '../hooks'\n\n/**\n * Heavily inspired by - https://stackoverflow.com/a/30362531/2803259\n */\n\nconst ComponentName = 'Ellipsize'\n\nexport interface EllipsizeRootProps extends BoxProps {\n beforeLineHeight?: string | number\n}\n\nconst EllipsizeRoot = styled(Box, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'beforeLineHeight',\n slot: 'Root',\n})<EllipsizeRootProps>(({ beforeLineHeight }) => ({\n '&': {\n // because the cell content ends up absolutely positioned, the cell doesn't know the content height.\n // the pseudo element with a hidden character establishes the proper height of the content and hides it\n ':before': {\n content: \"'nbsp;'\",\n display: 'block',\n // take the pseudo element out of the `display: block` flow so it won't push against our actual content\n float: 'left',\n visibility: 'hidden',\n // since we are `display: block`, lineHeight is the height\n ...(beforeLineHeight && { lineHeight: beforeLineHeight }),\n },\n },\n}))\n\nconst EllipsizeInnerWrap = styled(Box, {\n name: ComponentName,\n slot: 'innerWrap',\n})(() => ({\n position: 'relative',\n}))\n\nconst EllipsizeContentWrap = styled(Typography, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'ellipsisPosition',\n slot: 'contentWrap',\n})<TypographyWithComponentProps>(({ theme, ellipsisPosition, fontFamily }) => {\n return theme.unstable_sx({\n fontFamily: fontFamily ?? 'monospace',\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n right: 0,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...(ellipsisPosition === 'start'\n ? {\n direction: 'rtl',\n textAlign: 'left',\n }\n : {}),\n })\n})\n\nconst useClientHeight = () => {\n const [contentWrapHeight, setContentWrapHeight] = useState<string>()\n\n const contentWrapRef = useCallback((node: HTMLElement) => {\n if (node !== null) {\n setContentWrapHeight(node.clientHeight + 'px')\n }\n }, [])\n\n return { contentWrapHeight, contentWrapRef }\n}\n\n// See - https://mui.com/material-ui/guides/composition/#with-typescript\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {\n ellipsisPosition?: 'start' | 'end'\n}\n\nexport interface EllipsizeBoxProps extends BoxProps {\n disableSharedRef?: boolean\n ellipsisPosition?: 'start' | 'end'\n typographyProps?: TypographyWithComponentProps\n}\n\nexport const EllipsizeBox = forwardRef<HTMLDivElement, WithChildren<EllipsizeBoxProps>>(\n ({ children, ellipsisPosition = 'start', disableSharedRef, typographyProps, ...props }, ref) => {\n // Allow syncing of :before pseudo element height with contentWrapHeight\n const { contentWrapRef, contentWrapHeight } = useClientHeight()\n const sharedRef = useShareForwardedRef(ref)\n\n return (\n <EllipsizeRoot beforeLineHeight={!!sharedRef && !disableSharedRef ? contentWrapHeight : undefined} {...props} ref={ref}>\n <EllipsizeInnerWrap>\n <EllipsizeContentWrap ref={contentWrapRef} component={'span'} ellipsisPosition={ellipsisPosition} variant=\"body2\" {...typographyProps}>\n {children}\n </EllipsizeContentWrap>\n </EllipsizeInnerWrap>\n </EllipsizeRoot>\n )\n },\n)\nEllipsizeBox.displayName = 'EllipsizeBox'\n","import { ForwardedRef, useEffect, useRef } from 'react'\n\nexport const useShareForwardedRef = <T>(forwardedRef: ForwardedRef<T>, refresh = 0) => {\n // final ref that will share value with forward ref. this is the one to be attached to components\n const innerRef = useRef<T>(null)\n\n useEffect(() => {\n if (!forwardedRef) {\n return\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(innerRef.current)\n return\n } else {\n forwardedRef.current = innerRef.current\n }\n }, [forwardedRef, refresh])\n\n return innerRef\n}\n","import { useEvent } from '@xyo-network/react-event'\nimport { useRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface HashTableCellProps extends EllipsisTableCellProps {\n archive?: string\n dataType?: 'block' | 'payload'\n exploreDomain?: string\n network?: string\n}\n\nexport const HashTableCell: React.FC<HashTableCellProps> = ({ value, archive, dataType, network, exploreDomain, ...props }) => {\n const ref = useRef<HTMLTableCellElement | null>(null)\n const [tableCellRef, dispatch] = useEvent<HTMLTableCellElement>(undefined, ref)\n const hashPath = `/${dataType}/hash/${value}?network=${network ?? 'main'}`\n const explorePath = archive ? `/archive/${archive}${hashPath}` : hashPath\n\n const handleCellClick = () => {\n dispatch?.('hash', 'click', value)\n }\n\n return (\n <EllipsisTableCell\n onClick={handleCellClick}\n ref={tableCellRef}\n value={value}\n href={exploreDomain ? `${exploreDomain}${explorePath}}` : undefined}\n to={exploreDomain ? undefined : explorePath}\n {...props}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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AA,EAC9B;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,KAAK;AAAA,MACL;AAAA,MACA,MAAM,gBAAgB,GAAG,aAAa,GAAG,WAAW,MAAM;AAAA,MAC1D,IAAI,gBAAgB,SAAY;AAAA,MAC/B,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["import_react","import_material","import_react","import_react","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/TableCell/index.ts","../../../../src/components/TableCell/AddressTableCell.tsx","../../../../src/components/TableCell/EllipsisTableCell.tsx","../../../../src/components/Ellipsize.tsx","../../../../src/hooks/useShareForwardRef.ts","../../../../src/components/TableCell/HashTableCell.tsx"],"sourcesContent":["export * from './AddressTableCell'\nexport * from './EllipsisTableCell'\nexport * from './HashTableCell'\n","import { forwardRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface AddressTableCellProps extends EllipsisTableCellProps {\n /** @deprecated - archives are no longer supported */\n archive?: string\n /** @deprecated - use events instead */\n exploreDomain?: string\n link?: boolean\n}\n\nconst AddressTableCell = forwardRef<HTMLTableCellElement, AddressTableCellProps>(({ value, archive, exploreDomain, link, ...props }, ref) => {\n const href = exploreDomain && archive ? `${exploreDomain}/archive/${archive}/address/${value}` : undefined\n const to = exploreDomain === undefined && archive ? `/archive/${archive}/address/${value}` : undefined\n\n return <EllipsisTableCell value={value} href={href} to={to} ref={ref} link={link} {...props} />\n})\n\nAddressTableCell.displayName = 'AddressTableCell'\nexport { AddressTableCell }\n","import { styled, TableCell, TableCellProps } from '@mui/material'\nimport { LinkEx } from '@xylabs/react-link'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useMemo } from 'react'\nimport { To } from 'react-router-dom-6'\n\nimport { EllipsizeBox } from '../Ellipsize'\n\nconst EllipsisTableCellRoot = styled(TableCell, {\n name: 'EllipsisTableCell',\n shouldForwardProp: (prop) => prop !== 'width',\n slot: 'Root',\n})(({ width = '100%' }) => ({\n width,\n}))\n\nexport interface EllipsisTableCellProps extends TableCellProps {\n href?: string\n link?: boolean\n to?: To\n value?: string\n /**\n * Width of the table cell.\n *\n * Note: When using percentages, this value can be different than what you expect\n * if used on a cell that is not the first cell in the first row.\n */\n width?: string | number\n}\n\nexport const EllipsisTableCellWithRef: React.FC<WithChildren<EllipsisTableCellProps>> = forwardRef(\n ({ children, href, link = false, to, value, ...props }, ref) => {\n const data = useMemo(() => {\n if (children) {\n return children\n }\n if (href || link || to) {\n return (\n <LinkEx title={value} to={to} href={href} target={href ? '_blank' : undefined}>\n {value}\n </LinkEx>\n )\n }\n return value\n }, [children, href, link, to, value])\n return (\n <EllipsisTableCellRoot ref={ref} {...props}>\n <EllipsizeBox sx={{ cursor: link || to || href ? 'pointer' : 'inherit' }}>{data}</EllipsizeBox>\n </EllipsisTableCellRoot>\n )\n },\n)\n\nEllipsisTableCellWithRef.displayName = 'EllipsisTableCell'\nexport const EllipsisTableCell = EllipsisTableCellWithRef\n","import { Box, BoxProps, styled, Typography, TypographyProps, TypographyTypeMap } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useCallback, useState } from 'react'\n\nimport { useShareForwardedRef } from '../hooks'\n\n/**\n * Heavily inspired by - https://stackoverflow.com/a/30362531/2803259\n */\n\nconst ComponentName = 'Ellipsize'\n\nexport interface EllipsizeRootProps extends BoxProps {\n beforeLineHeight?: string | number\n}\n\nconst EllipsizeRoot = styled(Box, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'beforeLineHeight',\n slot: 'Root',\n})<EllipsizeRootProps>(({ beforeLineHeight }) => ({\n '&': {\n // because the cell content ends up absolutely positioned, the cell doesn't know the content height.\n // the pseudo element with a hidden character establishes the proper height of the content and hides it\n ':before': {\n content: \"'nbsp;'\",\n display: 'block',\n // take the pseudo element out of the `display: block` flow so it won't push against our actual content\n float: 'left',\n visibility: 'hidden',\n // since we are `display: block`, lineHeight is the height\n ...(beforeLineHeight && { lineHeight: beforeLineHeight }),\n },\n },\n}))\n\nconst EllipsizeInnerWrap = styled(Box, {\n name: ComponentName,\n slot: 'innerWrap',\n})(() => ({\n position: 'relative',\n}))\n\nconst EllipsizeContentWrap = styled(Typography, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'ellipsisPosition',\n slot: 'contentWrap',\n})<TypographyWithComponentProps>(({ theme, ellipsisPosition, fontFamily }) => {\n return theme.unstable_sx({\n fontFamily: fontFamily ?? 'monospace',\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n right: 0,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...(ellipsisPosition === 'start'\n ? {\n direction: 'rtl',\n textAlign: 'left',\n }\n : {}),\n })\n})\n\nconst useClientHeight = () => {\n const [contentWrapHeight, setContentWrapHeight] = useState<string>()\n\n const contentWrapRef = useCallback((node: HTMLElement) => {\n if (node !== null) {\n setContentWrapHeight(node.clientHeight + 'px')\n }\n }, [])\n\n return { contentWrapHeight, contentWrapRef }\n}\n\n// See - https://mui.com/material-ui/guides/composition/#with-typescript\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {\n ellipsisPosition?: 'start' | 'end'\n}\n\nexport interface EllipsizeBoxProps extends BoxProps {\n disableSharedRef?: boolean\n ellipsisPosition?: 'start' | 'end'\n typographyProps?: TypographyWithComponentProps\n}\n\nexport const EllipsizeBox = forwardRef<HTMLDivElement, WithChildren<EllipsizeBoxProps>>(\n ({ children, ellipsisPosition = 'start', disableSharedRef, typographyProps, ...props }, ref) => {\n // Allow syncing of :before pseudo element height with contentWrapHeight\n const { contentWrapRef, contentWrapHeight } = useClientHeight()\n const sharedRef = useShareForwardedRef(ref)\n\n return (\n <EllipsizeRoot beforeLineHeight={!!sharedRef && !disableSharedRef ? contentWrapHeight : undefined} {...props} ref={ref}>\n <EllipsizeInnerWrap>\n <EllipsizeContentWrap ref={contentWrapRef} component={'span'} ellipsisPosition={ellipsisPosition} variant=\"body2\" {...typographyProps}>\n {children}\n </EllipsizeContentWrap>\n </EllipsizeInnerWrap>\n </EllipsizeRoot>\n )\n },\n)\nEllipsizeBox.displayName = 'EllipsizeBox'\n","import { ForwardedRef, useEffect, useRef } from 'react'\n\nexport const useShareForwardedRef = <T>(forwardedRef: ForwardedRef<T>, refresh = 0) => {\n // final ref that will share value with forward ref. this is the one to be attached to components\n const innerRef = useRef<T>(null)\n\n useEffect(() => {\n if (!forwardedRef) {\n return\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(innerRef.current)\n return\n } else {\n forwardedRef.current = innerRef.current\n }\n }, [forwardedRef, refresh])\n\n return innerRef\n}\n","import { useEvent } from '@xyo-network/react-event'\nimport { useRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface HashTableCellProps extends EllipsisTableCellProps {\n archive?: string\n dataType?: 'block' | 'payload'\n exploreDomain?: string\n network?: string\n}\n\nexport const HashTableCell: React.FC<HashTableCellProps> = ({ value, archive, dataType, network, exploreDomain, ...props }) => {\n const ref = useRef<HTMLTableCellElement | null>(null)\n const [tableCellRef, dispatch] = useEvent<HTMLTableCellElement>(undefined, ref)\n const hashPath = `/${dataType}/hash/${value}?network=${network ?? 'main'}`\n const explorePath = archive ? `/archive/${archive}${hashPath}` : hashPath\n\n const handleCellClick = () => {\n dispatch?.('hash', 'click', value)\n }\n\n return (\n <EllipsisTableCell\n onClick={handleCellClick}\n ref={tableCellRef}\n value={value}\n href={exploreDomain ? `${exploreDomain}${explorePath}}` : undefined}\n to={exploreDomain ? undefined : explorePath}\n {...props}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;;;ACA3B,IAAAC,mBAAk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MAAM,gBAAgB,GAAG,aAAa,GAAG,WAAW,MAAM;AAAA,MAC1D,IAAI,gBAAgB,SAAY;AAAA,MAC/B,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["import_react","import_material","import_react","import_react","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/TableCell/AddressTableCell.tsx","../../../../src/components/TableCell/EllipsisTableCell.tsx","../../../../src/components/Ellipsize.tsx","../../../../src/hooks/useShareForwardRef.ts","../../../../src/components/TableCell/HashTableCell.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface AddressTableCellProps extends EllipsisTableCellProps {\n /** @deprecated - archives are no longer supported */\n archive?: string\n /** @deprecated - use events instead */\n exploreDomain?: string\n link?: boolean\n}\n\nconst AddressTableCell = forwardRef<HTMLTableCellElement, AddressTableCellProps>(({ value, archive, exploreDomain, link, ...props }, ref) => {\n const href = exploreDomain && archive ? `${exploreDomain}/archive/${archive}/address/${value}` : undefined\n const to = exploreDomain === undefined && archive ? `/archive/${archive}/address/${value}` : undefined\n\n return <EllipsisTableCell value={value} href={href} to={to} ref={ref} link={link} {...props} />\n})\n\nAddressTableCell.displayName = 'AddressTableCell'\nexport { AddressTableCell }\n","import { styled, TableCell, TableCellProps } from '@mui/material'\nimport { LinkEx } from '@xylabs/react-link'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useMemo } from 'react'\nimport { To } from 'react-router-dom'\n\nimport { EllipsizeBox } from '../Ellipsize'\n\nconst EllipsisTableCellRoot = styled(TableCell, {\n name: 'EllipsisTableCell',\n shouldForwardProp: (prop) => prop !== 'width',\n slot: 'Root',\n})(({ width = '100%' }) => ({\n width,\n}))\n\nexport interface EllipsisTableCellProps extends TableCellProps {\n href?: string\n link?: boolean\n to?: To\n value?: string\n /**\n * Width of the table cell.\n *\n * Note: When using percentages, this value can be different than what you expect\n * if used on a cell that is not the first cell in the first row.\n */\n width?: string | number\n}\n\nexport const EllipsisTableCellWithRef: React.FC<WithChildren<EllipsisTableCellProps>> = forwardRef(\n ({ children, href, link = false, to, value, ...props }, ref) => {\n const data = useMemo(() => {\n if (children) {\n return children\n }\n if (href || link || to) {\n return (\n <LinkEx title={value} to={to} href={href} target={href ? '_blank' : undefined}>\n {value}\n </LinkEx>\n )\n }\n return value\n }, [children, href, link, to, value])\n return (\n <EllipsisTableCellRoot ref={ref} {...props}>\n <EllipsizeBox sx={{ cursor: link || to || href ? 'pointer' : 'inherit' }}>{data}</EllipsizeBox>\n </EllipsisTableCellRoot>\n )\n },\n)\n\nEllipsisTableCellWithRef.displayName = 'EllipsisTableCell'\nexport const EllipsisTableCell = EllipsisTableCellWithRef\n","import { Box, BoxProps, styled, Typography, TypographyProps, TypographyTypeMap } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useCallback, useState } from 'react'\n\nimport { useShareForwardedRef } from '../hooks'\n\n/**\n * Heavily inspired by - https://stackoverflow.com/a/30362531/2803259\n */\n\nconst ComponentName = 'Ellipsize'\n\nexport interface EllipsizeRootProps extends BoxProps {\n beforeLineHeight?: string | number\n}\n\nconst EllipsizeRoot = styled(Box, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'beforeLineHeight',\n slot: 'Root',\n})<EllipsizeRootProps>(({ beforeLineHeight }) => ({\n '&': {\n // because the cell content ends up absolutely positioned, the cell doesn't know the content height.\n // the pseudo element with a hidden character establishes the proper height of the content and hides it\n ':before': {\n content: \"'nbsp;'\",\n display: 'block',\n // take the pseudo element out of the `display: block` flow so it won't push against our actual content\n float: 'left',\n visibility: 'hidden',\n // since we are `display: block`, lineHeight is the height\n ...(beforeLineHeight && { lineHeight: beforeLineHeight }),\n },\n },\n}))\n\nconst EllipsizeInnerWrap = styled(Box, {\n name: ComponentName,\n slot: 'innerWrap',\n})(() => ({\n position: 'relative',\n}))\n\nconst EllipsizeContentWrap = styled(Typography, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'ellipsisPosition',\n slot: 'contentWrap',\n})<TypographyWithComponentProps>(({ theme, ellipsisPosition, fontFamily }) => {\n return theme.unstable_sx({\n fontFamily: fontFamily ?? 'monospace',\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n right: 0,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...(ellipsisPosition === 'start'\n ? {\n direction: 'rtl',\n textAlign: 'left',\n }\n : {}),\n })\n})\n\nconst useClientHeight = () => {\n const [contentWrapHeight, setContentWrapHeight] = useState<string>()\n\n const contentWrapRef = useCallback((node: HTMLElement) => {\n if (node !== null) {\n setContentWrapHeight(node.clientHeight + 'px')\n }\n }, [])\n\n return { contentWrapHeight, contentWrapRef }\n}\n\n// See - https://mui.com/material-ui/guides/composition/#with-typescript\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {\n ellipsisPosition?: 'start' | 'end'\n}\n\nexport interface EllipsizeBoxProps extends BoxProps {\n disableSharedRef?: boolean\n ellipsisPosition?: 'start' | 'end'\n typographyProps?: TypographyWithComponentProps\n}\n\nexport const EllipsizeBox = forwardRef<HTMLDivElement, WithChildren<EllipsizeBoxProps>>(\n ({ children, ellipsisPosition = 'start', disableSharedRef, typographyProps, ...props }, ref) => {\n // Allow syncing of :before pseudo element height with contentWrapHeight\n const { contentWrapRef, contentWrapHeight } = useClientHeight()\n const sharedRef = useShareForwardedRef(ref)\n\n return (\n <EllipsizeRoot beforeLineHeight={!!sharedRef && !disableSharedRef ? contentWrapHeight : undefined} {...props} ref={ref}>\n <EllipsizeInnerWrap>\n <EllipsizeContentWrap ref={contentWrapRef} component={'span'} ellipsisPosition={ellipsisPosition} variant=\"body2\" {...typographyProps}>\n {children}\n </EllipsizeContentWrap>\n </EllipsizeInnerWrap>\n </EllipsizeRoot>\n )\n },\n)\nEllipsizeBox.displayName = 'EllipsizeBox'\n","import { ForwardedRef, useEffect, useRef } from 'react'\n\nexport const useShareForwardedRef = <T>(forwardedRef: ForwardedRef<T>, refresh = 0) => {\n // final ref that will share value with forward ref. this is the one to be attached to components\n const innerRef = useRef<T>(null)\n\n useEffect(() => {\n if (!forwardedRef) {\n return\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(innerRef.current)\n return\n } else {\n forwardedRef.current = innerRef.current\n }\n }, [forwardedRef, refresh])\n\n return innerRef\n}\n","import { useEvent } from '@xyo-network/react-event'\nimport { useRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface HashTableCellProps extends EllipsisTableCellProps {\n archive?: string\n dataType?: 'block' | 'payload'\n exploreDomain?: string\n network?: string\n}\n\nexport const HashTableCell: React.FC<HashTableCellProps> = ({ value, archive, dataType, network, exploreDomain, ...props }) => {\n const ref = useRef<HTMLTableCellElement | null>(null)\n const [tableCellRef, dispatch] = useEvent<HTMLTableCellElement>(undefined, ref)\n const hashPath = `/${dataType}/hash/${value}?network=${network ?? 'main'}`\n const explorePath = archive ? `/archive/${archive}${hashPath}` : hashPath\n\n const handleCellClick = () => {\n dispatch?.('hash', 'click', value)\n }\n\n return (\n <EllipsisTableCell\n onClick={handleCellClick}\n ref={tableCellRef}\n value={value}\n href={exploreDomain ? `${exploreDomain}${explorePath}}` : undefined}\n to={exploreDomain ? undefined : explorePath}\n {...props}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,cAAAA,mBAAkB;;;ACA3B,SAAS,UAAAC,SAAQ,iBAAiC;AAClD,SAAS,cAAc;AAEvB,SAAS,cAAAC,aAAY,eAAe;;;ACHpC,SAAS,KAAe,QAAQ,kBAAsD;AAEtF,SAAS,YAAY,aAAa,gBAAgB;;;ACFlD,SAAuB,WAAW,cAAc;AAEzC,IAAM,uBAAuB,CAAI,cAA+B,UAAU,MAAM;AAErF,Q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names":["forwardRef","styled","forwardRef","jsx","styled","forwardRef","jsx","forwardRef","useRef","jsx","useRef"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/TableCell/AddressTableCell.tsx","../../../../src/components/TableCell/EllipsisTableCell.tsx","../../../../src/components/Ellipsize.tsx","../../../../src/hooks/useShareForwardRef.ts","../../../../src/components/TableCell/HashTableCell.tsx"],"sourcesContent":["import { forwardRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface AddressTableCellProps extends EllipsisTableCellProps {\n /** @deprecated - archives are no longer supported */\n archive?: string\n /** @deprecated - use events instead */\n exploreDomain?: string\n link?: boolean\n}\n\nconst AddressTableCell = forwardRef<HTMLTableCellElement, AddressTableCellProps>(({ value, archive, exploreDomain, link, ...props }, ref) => {\n const href = exploreDomain && archive ? `${exploreDomain}/archive/${archive}/address/${value}` : undefined\n const to = exploreDomain === undefined && archive ? `/archive/${archive}/address/${value}` : undefined\n\n return <EllipsisTableCell value={value} href={href} to={to} ref={ref} link={link} {...props} />\n})\n\nAddressTableCell.displayName = 'AddressTableCell'\nexport { AddressTableCell }\n","import { styled, TableCell, TableCellProps } from '@mui/material'\nimport { LinkEx } from '@xylabs/react-link'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useMemo } from 'react'\nimport { To } from 'react-router-dom-6'\n\nimport { EllipsizeBox } from '../Ellipsize'\n\nconst EllipsisTableCellRoot = styled(TableCell, {\n name: 'EllipsisTableCell',\n shouldForwardProp: (prop) => prop !== 'width',\n slot: 'Root',\n})(({ width = '100%' }) => ({\n width,\n}))\n\nexport interface EllipsisTableCellProps extends TableCellProps {\n href?: string\n link?: boolean\n to?: To\n value?: string\n /**\n * Width of the table cell.\n *\n * Note: When using percentages, this value can be different than what you expect\n * if used on a cell that is not the first cell in the first row.\n */\n width?: string | number\n}\n\nexport const EllipsisTableCellWithRef: React.FC<WithChildren<EllipsisTableCellProps>> = forwardRef(\n ({ children, href, link = false, to, value, ...props }, ref) => {\n const data = useMemo(() => {\n if (children) {\n return children\n }\n if (href || link || to) {\n return (\n <LinkEx title={value} to={to} href={href} target={href ? '_blank' : undefined}>\n {value}\n </LinkEx>\n )\n }\n return value\n }, [children, href, link, to, value])\n return (\n <EllipsisTableCellRoot ref={ref} {...props}>\n <EllipsizeBox sx={{ cursor: link || to || href ? 'pointer' : 'inherit' }}>{data}</EllipsizeBox>\n </EllipsisTableCellRoot>\n )\n },\n)\n\nEllipsisTableCellWithRef.displayName = 'EllipsisTableCell'\nexport const EllipsisTableCell = EllipsisTableCellWithRef\n","import { Box, BoxProps, styled, Typography, TypographyProps, TypographyTypeMap } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useCallback, useState } from 'react'\n\nimport { useShareForwardedRef } from '../hooks'\n\n/**\n * Heavily inspired by - https://stackoverflow.com/a/30362531/2803259\n */\n\nconst ComponentName = 'Ellipsize'\n\nexport interface EllipsizeRootProps extends BoxProps {\n beforeLineHeight?: string | number\n}\n\nconst EllipsizeRoot = styled(Box, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'beforeLineHeight',\n slot: 'Root',\n})<EllipsizeRootProps>(({ beforeLineHeight }) => ({\n '&': {\n // because the cell content ends up absolutely positioned, the cell doesn't know the content height.\n // the pseudo element with a hidden character establishes the proper height of the content and hides it\n ':before': {\n content: \"'nbsp;'\",\n display: 'block',\n // take the pseudo element out of the `display: block` flow so it won't push against our actual content\n float: 'left',\n visibility: 'hidden',\n // since we are `display: block`, lineHeight is the height\n ...(beforeLineHeight && { lineHeight: beforeLineHeight }),\n },\n },\n}))\n\nconst EllipsizeInnerWrap = styled(Box, {\n name: ComponentName,\n slot: 'innerWrap',\n})(() => ({\n position: 'relative',\n}))\n\nconst EllipsizeContentWrap = styled(Typography, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'ellipsisPosition',\n slot: 'contentWrap',\n})<TypographyWithComponentProps>(({ theme, ellipsisPosition, fontFamily }) => {\n return theme.unstable_sx({\n fontFamily: fontFamily ?? 'monospace',\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n right: 0,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...(ellipsisPosition === 'start'\n ? {\n direction: 'rtl',\n textAlign: 'left',\n }\n : {}),\n })\n})\n\nconst useClientHeight = () => {\n const [contentWrapHeight, setContentWrapHeight] = useState<string>()\n\n const contentWrapRef = useCallback((node: HTMLElement) => {\n if (node !== null) {\n setContentWrapHeight(node.clientHeight + 'px')\n }\n }, [])\n\n return { contentWrapHeight, contentWrapRef }\n}\n\n// See - https://mui.com/material-ui/guides/composition/#with-typescript\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {\n ellipsisPosition?: 'start' | 'end'\n}\n\nexport interface EllipsizeBoxProps extends BoxProps {\n disableSharedRef?: boolean\n ellipsisPosition?: 'start' | 'end'\n typographyProps?: TypographyWithComponentProps\n}\n\nexport const EllipsizeBox = forwardRef<HTMLDivElement, WithChildren<EllipsizeBoxProps>>(\n ({ children, ellipsisPosition = 'start', disableSharedRef, typographyProps, ...props }, ref) => {\n // Allow syncing of :before pseudo element height with contentWrapHeight\n const { contentWrapRef, contentWrapHeight } = useClientHeight()\n const sharedRef = useShareForwardedRef(ref)\n\n return (\n <EllipsizeRoot beforeLineHeight={!!sharedRef && !disableSharedRef ? contentWrapHeight : undefined} {...props} ref={ref}>\n <EllipsizeInnerWrap>\n <EllipsizeContentWrap ref={contentWrapRef} component={'span'} ellipsisPosition={ellipsisPosition} variant=\"body2\" {...typographyProps}>\n {children}\n </EllipsizeContentWrap>\n </EllipsizeInnerWrap>\n </EllipsizeRoot>\n )\n },\n)\nEllipsizeBox.displayName = 'EllipsizeBox'\n","import { ForwardedRef, useEffect, useRef } from 'react'\n\nexport const useShareForwardedRef = <T>(forwardedRef: ForwardedRef<T>, refresh = 0) => {\n // final ref that will share value with forward ref. this is the one to be attached to components\n const innerRef = useRef<T>(null)\n\n useEffect(() => {\n if (!forwardedRef) {\n return\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(innerRef.current)\n return\n } else {\n forwardedRef.current = innerRef.current\n }\n }, [forwardedRef, refresh])\n\n return innerRef\n}\n","import { useEvent } from '@xyo-network/react-event'\nimport { useRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface HashTableCellProps extends EllipsisTableCellProps {\n archive?: string\n dataType?: 'block' | 'payload'\n exploreDomain?: string\n network?: string\n}\n\nexport const HashTableCell: React.FC<HashTableCellProps> = ({ value, archive, dataType, network, exploreDomain, ...props }) => {\n const ref = useRef<HTMLTableCellElement | null>(null)\n const [tableCellRef, dispatch] = useEvent<HTMLTableCellElement>(undefined, ref)\n const hashPath = `/${dataType}/hash/${value}?network=${network ?? 'main'}`\n const explorePath = archive ? `/archive/${archive}${hashPath}` : hashPath\n\n const handleCellClick = () => {\n dispatch?.('hash', 'click', value)\n }\n\n return (\n <EllipsisTableCell\n onClick={handleCellClick}\n ref={tableCellRef}\n value={value}\n href={exploreDomain ? `${exploreDomain}${explorePath}}` : undefined}\n to={exploreDomain ? undefined : explorePath}\n {...props}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,cAAAA,mBAAkB;;;ACA3B,SAAS,UAAAC,SAAQ,iBAAiC;AAClD,SAAS,cAAc;AAEvB,SAAS,cAAAC,aAAY,eAAe;;;ACHpC,SAAS,KAAe,QAAQ,kBAAsD;AAEtF,SAAS,YAAY,aAAa,gBAAgB;;;ACFlD,SAAuB,WAAW,cAAc;AAEzC,IAAM,uBAAuB,CAAI,cAA+B,UAAU,MAAM;AAErF,QAAM,WAAW,OAAU,IAAI;AAE/B,YAAU,MAAM;AACd,QAAI,CAAC,cAAc;AACjB;AAAA,IACF;AACA,QAAI,OAAO,iBAAiB,YAAY;AACtC,mBAAa,SAAS,OAAO;AAC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,gBAAK,GAClF;AAAA,EAEJ;AACF;AAEA,yBAAyB,cAAc;AAChC,IAAM,oBAAoB;;;ADtCxB,gBAAAG,YAAA;AAJT,IAAM,mBAAmBC,YAAwD,CAAC,EAAE,OAAO,SAAS,eAAe,MAAM,GAAG,MAAM,GAAG,QAAQ;AAC3I,QAAM,OAAO,iBAAiB,UAAU,GAAG,aAAa,YAAY,OAAO,YAAY,KAAK,KAAK;AACjG,QAAM,KAAK,kBAAkB,UAAa,UAAU,YAAY,OAAO,YAAY,KAAK,KAAK;AAE7F,SAAO,gBAAAD,KAAC,qBAAkB,OAAc,MAAY,IAAQ,KAAU,MAAa,GAAG,OAAO;AAC/F,CAAC;AAED,iBAAiB,cAAc;;;AInB/B,SAAS,gBAAgB;AACzB,SAAS,UAAAE,eAAc;AAsBnB,gBAAAC,YAAA;AAXG,IAAM,gBAA8C,CAAC,EAAE,OAAO,SAAS,UAAU,SAAS,eAAe,GAAG,MAAM,MAAM;AAC7H,QAAM,MAAMC,QAAoC,IAAI;AACpD,QAAM,CAAC,cAAc,QAAQ,IAAI,SAA+B,QAAW,GAAG;AAC9E,QAAM,WAAW,IAAI,QAAQ,SAAS,KAAK,YAAY,WAAW,MAAM;AACxE,QAAM,cAAc,UAAU,YAAY,OAAO,GAAG,QAAQ,KAAK;AAEjE,QAAM,kBAAkB,MAAM;AAC5B,yCAAW,QAAQ,SAAS;AAAA,EAC9B;AAEA,SACE,gBAAAD;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,KAAK;AAAA,MACL;AAAA,MACA,MAAM,gBAAgB,GAAG,aAAa,GAAG,WAAW,MAAM;AAAA,MAC1D,IAAI,gBAAgB,SAAY;AAAA,MAC/B,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["forwardRef","styled","forwardRef","jsx","styled","forwardRef","jsx","forwardRef","useRef","jsx","useRef"]}
|
|
@@ -386,10 +386,10 @@ var ErrorBoundary = class extends import_react3.Component {
|
|
|
386
386
|
|
|
387
387
|
// src/components/ListItemButtonEx.tsx
|
|
388
388
|
var import_material8 = require("@mui/material");
|
|
389
|
-
var
|
|
389
|
+
var import_react_router_dom_6 = require("react-router-dom-6");
|
|
390
390
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
391
391
|
var ListItemButtonExTo = ({ to, toOptions, onClick, ...props }) => {
|
|
392
|
-
const navigate = (0,
|
|
392
|
+
const navigate = (0, import_react_router_dom_6.useNavigate)();
|
|
393
393
|
const localOnClick = (event) => {
|
|
394
394
|
onClick == null ? void 0 : onClick(event);
|
|
395
395
|
if (to) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts","../../../src/components/Ampersand.tsx","../../../src/components/BasicHero/BasicHero.tsx","../../../src/hooks/GradientStyles/GradientStyles.tsx","../../../src/hooks/useIsMobile.ts","../../../src/hooks/useMediaQuery.ts","../../../src/hooks/useShareForwardRef.ts","../../../src/components/Ellipsize.tsx","../../../src/components/ErrorBoundary.tsx","../../../src/components/ListItemButtonEx.tsx","../../../src/components/LoadResult.tsx","../../../src/components/NotFound.tsx","../../../src/components/Pipe.tsx","../../../src/components/pluginValidation/DataMissing.tsx","../../../src/components/ScrollTableOnSm.tsx","../../../src/components/SectionSpacingRow/SectionSpacingRow.tsx","../../../src/components/TableCell/AddressTableCell.tsx","../../../src/components/TableCell/EllipsisTableCell.tsx","../../../src/components/TableCell/HashTableCell.tsx","../../../src/components/ThemeTokenAvatar/ThemeTokenAvatar.tsx","../../../src/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.tsx","../../../src/components/TokenBar/TokenBar.tsx","../../../src/components/TokenData/img/index.ts","../../../src/components/TokenData/TokenData.ts","../../../src/components/TokenData/useGetTokenData.tsx","../../../src/components/TokenSummary/TokenSummary.tsx","../../../src/components/TypographyEx.tsx"],"sourcesContent":["export * from './Ampersand'\nexport * from './BasicHero'\nexport * from './Ellipsize'\nexport * from './ErrorBoundary'\nexport * from './ListItemButtonEx'\nexport * from './LoadResult'\nexport * from './NotFound'\nexport * from './Pipe'\nexport * from './pluginValidation'\nexport * from './ScrollTableOnSm'\nexport * from './SectionSpacingRow'\nexport * from './TableCell'\nexport * from './ThemeTokenAvatar'\nexport * from './ThemeTokenAvatarGroup'\nexport * from './TokenBar'\nexport * from './TokenData'\nexport * from './TokenSummary'\nexport * from './TypographyEx'\n","import { Typography, TypographyProps } from '@mui/material'\n\nexport const Ampersand: React.FC<TypographyProps> = (props) => {\n return (\n <Typography marginX={1} component=\"span\" {...props}>\n &\n </Typography>\n )\n}\n","import { Container, Grid, Typography } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexBoxProps, FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport { ReactElement } from 'react'\n\nimport { useGradientStyles, useIsMobile } from '../../hooks'\n\nexport interface BasicHeroProps extends FlexBoxProps {\n backgroundColor?: string\n backgroundImage?: string\n button1Href?: string\n button1Text?: string\n button1To?: string\n button2Href?: string\n button2Text?: string\n button2To?: string\n desc: string\n gradientTitle?: string\n heroImage?: string\n subLinkIcon?: ReactElement\n subLinkPath?: string\n subLinkText1?: string\n subLinkText2?: string\n sx?: Record<string, string>\n textColor?: string\n title: string\n title2?: string\n}\n\ninterface SubLinkSectionProps {\n backgroundImageAlignment?: boolean\n subLinkIcon?: ReactElement\n subLinkPath?: string\n subLinkText1?: string\n subLinkText2?: string\n}\n\ninterface ButtonSectionProps {\n buttonText?: string\n href?: string\n to?: string\n}\nconst SubLinkSection: React.FC<SubLinkSectionProps> = ({ backgroundImageAlignment, subLinkIcon, subLinkPath, subLinkText1, subLinkText2 }) => {\n return (\n <FlexGrowRow\n width=\"100%\"\n sx={{ flexDirection: { md: 'row', xs: 'column' }, justifyContent: { md: backgroundImageAlignment ? 'flex-start' : 'center', xs: 'center' } }}\n >\n {subLinkIcon ? <span>{subLinkIcon} </span> : null}\n <Typography>{subLinkText1} </Typography>\n <LinkEx href={subLinkPath} underline=\"always\" target=\"_blank\" color=\"inherit\">\n <Typography>{subLinkText2}</Typography>\n </LinkEx>\n </FlexGrowRow>\n )\n}\n\nconst ButtonSection: React.FC<ButtonSectionProps> = ({ href, to, buttonText }) => {\n const isMobile = useIsMobile()\n return (\n <ButtonEx\n fullWidth={true}\n marginTop={1}\n marginBottom={1}\n marginRight={isMobile ? 2 : 1}\n marginLeft={isMobile ? 2 : 0}\n target={href ?? '_blank'}\n to={to}\n href={href}\n color=\"primary\"\n variant=\"contained\"\n paddingX={3}\n sx={{ display: href || to ? 'flex' : 'none' }}\n >\n {buttonText}\n </ButtonEx>\n )\n}\n\nexport const BasicHero: React.FC<BasicHeroProps> = ({\n backgroundImage,\n title,\n gradientTitle,\n backgroundColor,\n textColor,\n desc,\n heroImage,\n title2,\n subLinkText1,\n subLinkText2,\n subLinkPath,\n button1Text,\n button2Text,\n button2To,\n button1To,\n button2Href,\n button1Href,\n subLinkIcon,\n sx,\n ...props\n}) => {\n const isMobile = useIsMobile()\n const { classes } = useGradientStyles()\n return (\n <FlexGrowCol\n sx={{\n backgroundImage: `url(${backgroundImage})`,\n backgroundPosition: { lg: 'bottom', md: 'center left', xs: 'top left' },\n minHeight: {\n md: '500px',\n sm: '400px',\n xs: '200px',\n },\n ...(sx ?? {}),\n }}\n style={{\n backgroundColor: backgroundColor ?? '',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n color: textColor ?? '',\n }}\n {...props}\n >\n <Container>\n <Grid\n container\n justifyContent=\"center\"\n alignItems=\"center\"\n sx={{\n alignItems: { xs: 'center' },\n justifyContent: { xs: 'center' },\n }}\n >\n <Grid item xs={12} sm={8} md={backgroundImage ? 6 : 8} lg={backgroundImage ? 6 : 8}>\n <FlexGrowCol paddingY={2} sx={{ alignItems: { xs: backgroundImage && !isMobile ? 'flex-start' : 'center' } }}>\n <Typography variant=\"h1\" component=\"h1\" gutterBottom textAlign={backgroundImage && !isMobile ? 'left' : 'center'}>\n {title ? <span>{`${title} `}</span> : null}\n {gradientTitle ? <span className={classes().heading}> {` ${gradientTitle}`}</span> : null}\n {title2 ? <span>{` ${title2}`}</span> : null}\n </Typography>\n <Typography variant=\"body1\" component=\"h2\" gutterBottom textAlign={backgroundImage && !isMobile ? 'left' : 'center'}>\n {desc}\n </Typography>\n <FlexGrowRow sx={{ flexDirection: { lg: 'row', xs: 'column' } }} width=\"100%\" marginTop={1}>\n <ButtonSection href={button1Href} to={button1To} buttonText={button1Text} />\n <ButtonSection href={button2Href} to={button2To} buttonText={button2Text} />\n </FlexGrowRow>\n <SubLinkSection\n subLinkIcon={subLinkIcon}\n subLinkText1={subLinkText1}\n subLinkText2={subLinkText2}\n subLinkPath={subLinkPath}\n backgroundImageAlignment={backgroundImage ? true : false}\n />\n </FlexGrowCol>\n </Grid>\n <Grid item xs={12} md={6}>\n {heroImage ? <img src={heroImage} width=\"100%\" /> : null}\n </Grid>\n </Grid>\n </Container>\n </FlexGrowCol>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { makeStyles } from '@mui/styles'\nimport { CSSProperties } from 'react'\n\nexport interface GradientStyles {\n background: CSSProperties\n border: CSSProperties\n heading: CSSProperties\n}\n\nexport const colorfulGradientLightMode = () => {\n return {\n background: {\n backgroundImage: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',\n },\n border: {\n borderImage: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',\n borderImageSlice: 1,\n borderImageSource: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',\n borderRadius: 0,\n borderStyle: 'solid',\n borderWidth: '2px',\n },\n heading: {\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n background: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',\n display: 'inline-block',\n },\n }\n}\n\nexport const colorfulGradientDarkMode = () => {\n return {\n background: {\n backgroundImage: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',\n },\n border: {\n borderImage: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',\n borderImageSlice: 1,\n borderImageSource: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',\n borderRadius: 0,\n borderStyle: 'solid',\n borderWidth: '2px',\n },\n heading: {\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n background: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',\n display: 'inline-block',\n },\n }\n}\n\nexport const useGradientStyles = () => {\n const theme = useTheme()\n const styles = theme.palette.mode === 'dark' ? colorfulGradientDarkMode() : colorfulGradientLightMode()\n const classes = makeStyles(styles)\n return { classes, styles }\n}\n","import { useTheme } from '@mui/material'\n\nimport { useMediaQuery } from './useMediaQuery'\n\nexport const useIsMobile = () => {\n const theme = useTheme()\n return useMediaQuery(theme.breakpoints.down('md'))\n}\n","// eslint-disable-next-line import/no-deprecated\nimport { useMediaQuery } from '@mui/material'\n\n// eslint-disable-next-line import/no-deprecated\nexport { useMediaQuery }\n\n/* This file only exists to deal with the false positve lint error */\n","import { ForwardedRef, useEffect, useRef } from 'react'\n\nexport const useShareForwardedRef = <T>(forwardedRef: ForwardedRef<T>, refresh = 0) => {\n // final ref that will share value with forward ref. this is the one to be attached to components\n const innerRef = useRef<T>(null)\n\n useEffect(() => {\n if (!forwardedRef) {\n return\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(innerRef.current)\n return\n } else {\n forwardedRef.current = innerRef.current\n }\n }, [forwardedRef, refresh])\n\n return innerRef\n}\n","import { Box, BoxProps, styled, Typography, TypographyProps, TypographyTypeMap } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useCallback, useState } from 'react'\n\nimport { useShareForwardedRef } from '../hooks'\n\n/**\n * Heavily inspired by - https://stackoverflow.com/a/30362531/2803259\n */\n\nconst ComponentName = 'Ellipsize'\n\nexport interface EllipsizeRootProps extends BoxProps {\n beforeLineHeight?: string | number\n}\n\nconst EllipsizeRoot = styled(Box, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'beforeLineHeight',\n slot: 'Root',\n})<EllipsizeRootProps>(({ beforeLineHeight }) => ({\n '&': {\n // because the cell content ends up absolutely positioned, the cell doesn't know the content height.\n // the pseudo element with a hidden character establishes the proper height of the content and hides it\n ':before': {\n content: \"'nbsp;'\",\n display: 'block',\n // take the pseudo element out of the `display: block` flow so it won't push against our actual content\n float: 'left',\n visibility: 'hidden',\n // since we are `display: block`, lineHeight is the height\n ...(beforeLineHeight && { lineHeight: beforeLineHeight }),\n },\n },\n}))\n\nconst EllipsizeInnerWrap = styled(Box, {\n name: ComponentName,\n slot: 'innerWrap',\n})(() => ({\n position: 'relative',\n}))\n\nconst EllipsizeContentWrap = styled(Typography, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'ellipsisPosition',\n slot: 'contentWrap',\n})<TypographyWithComponentProps>(({ theme, ellipsisPosition, fontFamily }) => {\n return theme.unstable_sx({\n fontFamily: fontFamily ?? 'monospace',\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n right: 0,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...(ellipsisPosition === 'start'\n ? {\n direction: 'rtl',\n textAlign: 'left',\n }\n : {}),\n })\n})\n\nconst useClientHeight = () => {\n const [contentWrapHeight, setContentWrapHeight] = useState<string>()\n\n const contentWrapRef = useCallback((node: HTMLElement) => {\n if (node !== null) {\n setContentWrapHeight(node.clientHeight + 'px')\n }\n }, [])\n\n return { contentWrapHeight, contentWrapRef }\n}\n\n// See - https://mui.com/material-ui/guides/composition/#with-typescript\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {\n ellipsisPosition?: 'start' | 'end'\n}\n\nexport interface EllipsizeBoxProps extends BoxProps {\n disableSharedRef?: boolean\n ellipsisPosition?: 'start' | 'end'\n typographyProps?: TypographyWithComponentProps\n}\n\nexport const EllipsizeBox = forwardRef<HTMLDivElement, WithChildren<EllipsizeBoxProps>>(\n ({ children, ellipsisPosition = 'start', disableSharedRef, typographyProps, ...props }, ref) => {\n // Allow syncing of :before pseudo element height with contentWrapHeight\n const { contentWrapRef, contentWrapHeight } = useClientHeight()\n const sharedRef = useShareForwardedRef(ref)\n\n return (\n <EllipsizeRoot beforeLineHeight={!!sharedRef && !disableSharedRef ? contentWrapHeight : undefined} {...props} ref={ref}>\n <EllipsizeInnerWrap>\n <EllipsizeContentWrap ref={contentWrapRef} component={'span'} ellipsisPosition={ellipsisPosition} variant=\"body2\" {...typographyProps}>\n {children}\n </EllipsizeContentWrap>\n </EllipsizeInnerWrap>\n </EllipsizeRoot>\n )\n },\n)\nEllipsizeBox.displayName = 'EllipsizeBox'\n","import { Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { Component, ErrorInfo, ReactNode } from 'react'\n\nexport interface ErrorBoundaryProps {\n children: ReactNode\n // fallback as a static ReactNode value\n fallback?: ReactNode\n // fallback element that can receive the error as a prop\n fallbackWithError?: (error: Error) => ReactNode\n}\n\nexport interface ErrorBoundaryState {\n error?: Error\n}\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { error: undefined }\n }\n\n static getDerivedStateFromError(error: Error) {\n return { error }\n }\n\n override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error(`${error}: ${errorInfo}`)\n }\n\n override render() {\n if (this.state.error) {\n if (this.props.fallbackWithError) {\n return this.props.fallbackWithError(this.state.error)\n }\n return (\n this.props.fallback ?? (\n <FlexCol>\n <Typography variant=\"h1\">Something went wrong.</Typography>\n <Typography variant=\"body1\">[{this.state.error?.message}]</Typography>\n </FlexCol>\n )\n )\n }\n\n return this.props.children\n }\n}\n","import { ListItemButton, ListItemButtonProps } from '@mui/material'\nimport { MouseEvent } from 'react'\nimport { NavigateOptions, To, useNavigate } from 'react-router-dom'\n\nexport interface ListItemButtonExProps extends ListItemButtonProps {\n target?: string\n to?: To\n toOptions?: NavigateOptions\n}\n\nexport const ListItemButtonExTo: React.FC<ListItemButtonExProps> = ({ to, toOptions, onClick, ...props }) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLDivElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ListItemButton onClick={localOnClick} {...props} />\n}\n\nexport const ListItemButtonEx: React.FC<ListItemButtonExProps> = ({ to, ...props }) => {\n if (to) {\n return <ListItemButtonExTo to={to} {...props} />\n } else {\n return <ListItemButton {...props} />\n }\n}\n","import { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { PropsWithChildren } from 'react'\n\nimport { NotFound } from './NotFound'\n\nexport interface LoadResultProps<T> {\n /** @deprecated - use error prop */\n apiError?: Error\n /** Defer error handling to the children and load them */\n error?: boolean\n notFound: boolean\n searchResult: T | undefined\n}\n\nexport function LoadResult<T>(props: PropsWithChildren<LoadResultProps<T>>) {\n const { notFound, error, searchResult, children } = props\n if (notFound) {\n return <NotFound />\n }\n if (error) {\n return <>{children}</>\n }\n if (searchResult === undefined) {\n return <FlexGrowRow busy minHeight=\"50px\" />\n } else {\n return <>{children}</>\n }\n}\n","import { Typography } from '@mui/material'\nimport { FlexBoxProps, FlexGrowCol } from '@xylabs/react-flexbox'\n\nconst NotFound: React.FC<FlexBoxProps> = (props) => {\n return (\n <FlexGrowCol {...props}>\n <Typography variant=\"h2\">Sorry!</Typography>\n <Typography marginY={3} variant=\"body2\">\n {\"Can't find anything here\"}\n </Typography>\n </FlexGrowCol>\n )\n}\n\nexport { NotFound }\n","import { Typography, TypographyProps } from '@mui/material'\n\nexport const Pipe: React.FC<TypographyProps> = (props) => {\n return (\n <Typography marginX={1} component=\"span\" {...props}>\n |\n </Typography>\n )\n}\n","import { Alert, AlertProps, AlertTitle } from '@mui/material'\n\nexport interface PayloadDataMissingProps extends AlertProps {\n alertBody?: string\n}\n\nexport const PayloadDataMissing: React.FC<PayloadDataMissingProps> = ({ alertBody, ...props }) => {\n return (\n <Alert severity=\"warning\" {...props}>\n <AlertTitle>Missing Data</AlertTitle>\n {alertBody ?? 'Payload is missing required data to render correctly'}\n </Alert>\n )\n}\n","import { styled } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nconst StyledScrollTableOnSm = styled('div')(({ theme }) => ({\n [theme.breakpoints.down('md')]: {\n overflowX: 'scroll',\n },\n display: 'flex',\n flexGrow: 1,\n}))\n\nconst ScrollTableOnSm: React.FC<WithChildren> = ({ children }) => <StyledScrollTableOnSm>{children}</StyledScrollTableOnSm>\n\nexport { ScrollTableOnSm }\n","import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexGrowRow } from '@xylabs/react-flexbox'\nimport { forwardRef } from 'react'\n\nexport const SectionSpacingRow = forwardRef<HTMLDivElement, FlexBoxProps>(({ children, sx, ...props }, ref) => {\n const theme = useTheme()\n return (\n <FlexGrowRow\n sx={{\n paddingBottom: { md: theme.spacing(5), xs: theme.spacing(5) },\n paddingTop: { md: theme.spacing(5), xs: theme.spacing(5) },\n ...sx,\n }}\n width=\"100%\"\n ref={ref}\n {...props}\n >\n {children}\n </FlexGrowRow>\n )\n})\n\nSectionSpacingRow.displayName = 'SectionSpacingRow'\n","import { forwardRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface AddressTableCellProps extends EllipsisTableCellProps {\n /** @deprecated - archives are no longer supported */\n archive?: string\n /** @deprecated - use events instead */\n exploreDomain?: string\n link?: boolean\n}\n\nconst AddressTableCell = forwardRef<HTMLTableCellElement, AddressTableCellProps>(({ value, archive, exploreDomain, link, ...props }, ref) => {\n const href = exploreDomain && archive ? `${exploreDomain}/archive/${archive}/address/${value}` : undefined\n const to = exploreDomain === undefined && archive ? `/archive/${archive}/address/${value}` : undefined\n\n return <EllipsisTableCell value={value} href={href} to={to} ref={ref} link={link} {...props} />\n})\n\nAddressTableCell.displayName = 'AddressTableCell'\nexport { AddressTableCell }\n","import { styled, TableCell, TableCellProps } from '@mui/material'\nimport { LinkEx } from '@xylabs/react-link'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useMemo } from 'react'\nimport { To } from 'react-router-dom'\n\nimport { EllipsizeBox } from '../Ellipsize'\n\nconst EllipsisTableCellRoot = styled(TableCell, {\n name: 'EllipsisTableCell',\n shouldForwardProp: (prop) => prop !== 'width',\n slot: 'Root',\n})(({ width = '100%' }) => ({\n width,\n}))\n\nexport interface EllipsisTableCellProps extends TableCellProps {\n href?: string\n link?: boolean\n to?: To\n value?: string\n /**\n * Width of the table cell.\n *\n * Note: When using percentages, this value can be different than what you expect\n * if used on a cell that is not the first cell in the first row.\n */\n width?: string | number\n}\n\nexport const EllipsisTableCellWithRef: React.FC<WithChildren<EllipsisTableCellProps>> = forwardRef(\n ({ children, href, link = false, to, value, ...props }, ref) => {\n const data = useMemo(() => {\n if (children) {\n return children\n }\n if (href || link || to) {\n return (\n <LinkEx title={value} to={to} href={href} target={href ? '_blank' : undefined}>\n {value}\n </LinkEx>\n )\n }\n return value\n }, [children, href, link, to, value])\n return (\n <EllipsisTableCellRoot ref={ref} {...props}>\n <EllipsizeBox sx={{ cursor: link || to || href ? 'pointer' : 'inherit' }}>{data}</EllipsizeBox>\n </EllipsisTableCellRoot>\n )\n },\n)\n\nEllipsisTableCellWithRef.displayName = 'EllipsisTableCell'\nexport const EllipsisTableCell = EllipsisTableCellWithRef\n","import { useEvent } from '@xyo-network/react-event'\nimport { useRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface HashTableCellProps extends EllipsisTableCellProps {\n archive?: string\n dataType?: 'block' | 'payload'\n exploreDomain?: string\n network?: string\n}\n\nexport const HashTableCell: React.FC<HashTableCellProps> = ({ value, archive, dataType, network, exploreDomain, ...props }) => {\n const ref = useRef<HTMLTableCellElement | null>(null)\n const [tableCellRef, dispatch] = useEvent<HTMLTableCellElement>(undefined, ref)\n const hashPath = `/${dataType}/hash/${value}?network=${network ?? 'main'}`\n const explorePath = archive ? `/archive/${archive}${hashPath}` : hashPath\n\n const handleCellClick = () => {\n dispatch?.('hash', 'click', value)\n }\n\n return (\n <EllipsisTableCell\n onClick={handleCellClick}\n ref={tableCellRef}\n value={value}\n href={exploreDomain ? `${exploreDomain}${explorePath}}` : undefined}\n to={exploreDomain ? undefined : explorePath}\n {...props}\n />\n )\n}\n","import { Avatar, AvatarProps, useTheme } from '@mui/material'\n\nexport const ThemeTokenAvatar: React.FC<AvatarProps> = ({ ...props }) => {\n const theme = useTheme()\n return <Avatar sx={{ background: theme.palette.common.white }} {...props} />\n}\n","import { AvatarGroup, AvatarGroupProps } from '@mui/material'\n\nimport { ThemeTokenAvatar } from '../ThemeTokenAvatar'\n\nexport interface ThemeTokenAvatarGroupProps extends AvatarGroupProps {\n images?: string[]\n}\n\nexport const ThemeTokenAvatarGroup: React.FC<ThemeTokenAvatarGroupProps> = ({ images, ...props }) => {\n return <AvatarGroup {...props}>{images?.map((image, index) => <ThemeTokenAvatar key={index} src={image} />)}</AvatarGroup>\n}\n","import { Paper, PaperProps, Typography, TypographyProps } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { ReactNode } from 'react'\nexport interface TokenBarProps extends PaperProps {\n text1?: ReactNode\n text1Props?: TypographyProps\n text1Suffix?: ReactNode\n text2?: ReactNode\n text2Props?: TypographyProps\n text2Suffix?: ReactNode\n}\n\nexport const TokenBar: React.FC<TokenBarProps> = ({ text1, text1Props, text1Suffix, text2, text2Props, text2Suffix, ...props }) => {\n return (\n <Paper elevation={0} className=\"TokenBar-root\" {...props}>\n <FlexRow justifyContent=\"space-between\">\n <Typography variant=\"body1\" fontWeight={300} margin={1} {...text1Props}>\n {text1}\n {text1Suffix}\n </Typography>\n <Typography variant=\"body1\" fontWeight={300} textTransform=\"uppercase\" color=\"gray\" margin={1} {...text2Props}>\n {text2}\n {text2Suffix}\n </Typography>\n </FlexRow>\n </Paper>\n )\n}\n","import ada from './ada.png'\nimport btc from './btc.png'\nimport busd from './busd.png'\nimport dai from './dai.png'\nimport dogecoin from './dogecoin.png'\nimport dot from './dot.png'\nimport ethereum from './ethereum.png'\nimport frax from './frax.png'\nimport link from './link.png'\nimport sol from './sol.png'\nimport tether from './tether.png'\nimport usdCoin from './usd-coin.png'\nimport weth from './weth.png'\nimport wrappedBtc from './wrapped-bitcoin.png'\nimport xyo from './xyo.png'\n\nexport { ada, btc, busd, dai, dogecoin, dot, ethereum, frax, link, sol, tether, usdCoin, weth, wrappedBtc, xyo }\n","import * as tokenImages from './img'\n\nexport interface TokenData {\n coinmarketcapLink: string\n etherscanLink: string\n icon: string\n readableName: string\n tokenSymbol: string\n uniqueTokenId: string\n}\n\nexport const TokenData: TokenData[] = [\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/multi-collateral-dai/',\n etherscanLink: 'https://etherscan.io/token/0x6b175474e89094c44da98b954eedeac495271d0f',\n icon: tokenImages.dai,\n readableName: 'Dai',\n tokenSymbol: 'dai',\n uniqueTokenId: 'dai',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/weth/',\n etherscanLink: 'https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n icon: tokenImages.weth,\n readableName: 'Weth',\n tokenSymbol: 'weth',\n uniqueTokenId: 'weth',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/ethereum/',\n etherscanLink: 'n/a',\n icon: tokenImages.ethereum,\n readableName: 'Ethereum',\n tokenSymbol: 'eth',\n uniqueTokenId: 'ethereum',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/bitcoin/',\n etherscanLink: 'n/a',\n icon: tokenImages.btc,\n readableName: 'Bitcoin',\n tokenSymbol: 'btc',\n uniqueTokenId: 'btc',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/xyo/',\n etherscanLink: 'https://etherscan.io/token/0x55296f69f40ea6d20e478533c15a6b08b654e758',\n icon: tokenImages.xyo,\n readableName: 'XYO',\n tokenSymbol: 'xyo',\n uniqueTokenId: 'xyo',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/frax/',\n etherscanLink: 'https://etherscan.io/token/0x853d955acef822db058eb8505911ed77f175b99e',\n icon: tokenImages.frax,\n readableName: 'Frax',\n tokenSymbol: 'frax',\n uniqueTokenId: 'frax',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/wrapped-bitcoin/',\n etherscanLink: 'https://etherscan.io/token/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',\n icon: tokenImages.wrappedBtc,\n readableName: 'Wrapped BTC',\n tokenSymbol: 'wbtc',\n uniqueTokenId: 'wbtc',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/usd-coin/',\n etherscanLink: 'https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n icon: tokenImages.usdCoin,\n readableName: 'USDC',\n tokenSymbol: 'usdc',\n uniqueTokenId: 'usdc',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/tether/',\n etherscanLink: 'https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7',\n icon: tokenImages.tether,\n readableName: 'Tether',\n tokenSymbol: 'usdt',\n uniqueTokenId: 'usdt',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/cardano/',\n etherscanLink: 'https://etherscan.io/token/0xc14777c94229582e5758c5a79b83dde876b9be98',\n icon: tokenImages.ada,\n readableName: 'Cardano',\n tokenSymbol: 'ada',\n uniqueTokenId: 'ada',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/binance-usd/',\n etherscanLink: 'https://etherscan.io/token/0x4Fabb145d64652a948d72533023f6E7A623C7C53',\n icon: tokenImages.busd,\n readableName: 'Binance USD',\n tokenSymbol: 'busd',\n uniqueTokenId: 'busd',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/dogecoin/',\n etherscanLink: 'https://etherscan.io/token/0x7618b5024a6349f9aef10ddfd33e3428c734551e',\n icon: tokenImages.dogecoin,\n readableName: 'Dogecoin',\n tokenSymbol: 'doge',\n uniqueTokenId: 'doge',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/polkadot-new/',\n etherscanLink: 'https://etherscan.io/token/0x2d4fb6dd969992c881d8e534c747cc925d5ba221',\n icon: tokenImages.dot,\n readableName: 'Polkadot',\n tokenSymbol: 'dot',\n uniqueTokenId: 'dot',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/chainlink/',\n etherscanLink: 'https://etherscan.io/token/0x514910771af9ca656af840dff83e8264ecf986ca',\n icon: tokenImages.link,\n readableName: 'ChainLink',\n tokenSymbol: 'link',\n uniqueTokenId: 'link',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/solana/',\n etherscanLink: 'https://etherscan.io/token/0x1f54638b7737193ffd86c19ec51907a7c41755d8',\n icon: tokenImages.sol,\n readableName: 'Solana',\n tokenSymbol: 'sol',\n uniqueTokenId: 'sol',\n },\n]\n","import { TokenData } from './TokenData'\n\nexport const useGetTokenData = (symbols: (string | undefined)[]) => {\n return symbols?.map((symbol) => {\n const additionalTokenData = TokenData.find((x) => x.tokenSymbol === symbol)\n const checkedTokenData = additionalTokenData ? additionalTokenData : TokenData[0]\n return checkedTokenData\n })\n}\n","import { AvatarProps, CardHeader, CardHeaderProps, Typography } from '@mui/material'\nimport { ReactNode } from 'react'\n\nimport { ThemeTokenAvatar } from '../ThemeTokenAvatar'\n\nexport interface TokenSummaryProps extends CardHeaderProps {\n icon?: string\n imgBgProps?: AvatarProps\n symbol?: string\n symbolElement?: ReactNode\n}\n\nexport const TokenSummary: React.FC<TokenSummaryProps> = ({ icon, symbol, symbolElement, children, ...props }) => {\n return (\n <>\n <CardHeader\n avatar={<ThemeTokenAvatar src={icon} alt={symbol} />}\n title={\n <Typography variant=\"h6\" fontWeight={300} textTransform=\"uppercase\">\n {symbolElement ?? symbol}\n </Typography>\n }\n {...props}\n />\n {children}\n </>\n )\n}\n","import { Typography, TypographyProps } from '@mui/material'\n\nimport { useGradientStyles } from '../hooks'\n\nexport interface TypographyExProps extends TypographyProps {\n gradient?: 'text'\n}\n\nexport const TypographyEx: React.FC<TypographyExProps> = ({ gradient, ...props }) => {\n const { classes } = useGradientStyles()\n return <Typography className={gradient === 'text' ? classes().heading : undefined} {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAA4C;AAIxC;AAFG,IAAM,YAAuC,CAAC,UAAU;AAC7D,SACE,4CAAC,8BAAW,SAAS,GAAG,WAAU,QAAQ,GAAG,OAAO,eAEpD;AAEJ;;;ACRA,IAAAA,mBAA4C;AAC5C,0BAAyB;AACzB,2BAAuD;AACvD,wBAAuB;;;ACHvB,IAAAC,mBAAyB;AACzB,oBAA2B;AASpB,IAAM,4BAA4B,MAAM;AAC7C,SAAO;AAAA,IACL,YAAY;AAAA,MACV,iBAAiB;AAAA,IACnB;AAAA,IACA,QAAQ;AAAA,MACN,aAAa;AAAA,MACb,kBAAkB;AAAA,MAClB,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,aAAa;AAAA,MACb,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,MACP,sBAAsB;AAAA,MACtB,qBAAqB;AAAA,MACrB,YAAY;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEO,IAAM,2B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G,MAAM,MAAM;AACnF,QAAM,EAAE,QAAQ,IAAI,kBAAkB;AACtC,SAAO,8CAAC,gCAAW,WAAW,aAAa,SAAS,QAAQ,EAAE,UAAU,QAAY,GAAG,OAAO;AAChG;","names":["import_material","import_material","import_material","import_material","import_jsx_runtime","import_material","import_react","import_jsx_runtime","import_material","import_react_flexbox","import_react","import_jsx_runtime","import_material","import_jsx_runtime","import_react_flexbox","import_material","import_react_flexbox","import_jsx_runtime","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_react","import_jsx_runtime","import_react","import_material","import_react_link","import_react","import_jsx_runtime","link","import_jsx_runtime","link","import_react","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_jsx_runtime","dai","weth","ethereum","btc","xyo","frax","wrappedBtc","usdCoin","tether","ada","busd","dogecoin","dot","link","sol","import_material","import_jsx_runtime","import_material","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts","../../../src/components/Ampersand.tsx","../../../src/components/BasicHero/BasicHero.tsx","../../../src/hooks/GradientStyles/GradientStyles.tsx","../../../src/hooks/useIsMobile.ts","../../../src/hooks/useMediaQuery.ts","../../../src/hooks/useShareForwardRef.ts","../../../src/components/Ellipsize.tsx","../../../src/components/ErrorBoundary.tsx","../../../src/components/ListItemButtonEx.tsx","../../../src/components/LoadResult.tsx","../../../src/components/NotFound.tsx","../../../src/components/Pipe.tsx","../../../src/components/pluginValidation/DataMissing.tsx","../../../src/components/ScrollTableOnSm.tsx","../../../src/components/SectionSpacingRow/SectionSpacingRow.tsx","../../../src/components/TableCell/AddressTableCell.tsx","../../../src/components/TableCell/EllipsisTableCell.tsx","../../../src/components/TableCell/HashTableCell.tsx","../../../src/components/ThemeTokenAvatar/ThemeTokenAvatar.tsx","../../../src/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.tsx","../../../src/components/TokenBar/TokenBar.tsx","../../../src/components/TokenData/img/index.ts","../../../src/components/TokenData/TokenData.ts","../../../src/components/TokenData/useGetTokenData.tsx","../../../src/components/TokenSummary/TokenSummary.tsx","../../../src/components/TypographyEx.tsx"],"sourcesContent":["export * from './Ampersand'\nexport * from './BasicHero'\nexport * from './Ellipsize'\nexport * from './ErrorBoundary'\nexport * from './ListItemButtonEx'\nexport * from './LoadResult'\nexport * from './NotFound'\nexport * from './Pipe'\nexport * from './pluginValidation'\nexport * from './ScrollTableOnSm'\nexport * from './SectionSpacingRow'\nexport * from './TableCell'\nexport * from './ThemeTokenAvatar'\nexport * from './ThemeTokenAvatarGroup'\nexport * from './TokenBar'\nexport * from './TokenData'\nexport * from './TokenSummary'\nexport * from './TypographyEx'\n","import { Typography, TypographyProps } from '@mui/material'\n\nexport const Ampersand: React.FC<TypographyProps> = (props) => {\n return (\n <Typography marginX={1} component=\"span\" {...props}>\n &\n </Typography>\n )\n}\n","import { Container, Grid, Typography } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexBoxProps, FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport { ReactElement } from 'react'\n\nimport { useGradientStyles, useIsMobile } from '../../hooks'\n\nexport interface BasicHeroProps extends FlexBoxProps {\n backgroundColor?: string\n backgroundImage?: string\n button1Href?: string\n button1Text?: string\n button1To?: string\n button2Href?: string\n button2Text?: string\n button2To?: string\n desc: string\n gradientTitle?: string\n heroImage?: string\n subLinkIcon?: ReactElement\n subLinkPath?: string\n subLinkText1?: string\n subLinkText2?: string\n sx?: Record<string, string>\n textColor?: string\n title: string\n title2?: string\n}\n\ninterface SubLinkSectionProps {\n backgroundImageAlignment?: boolean\n subLinkIcon?: ReactElement\n subLinkPath?: string\n subLinkText1?: string\n subLinkText2?: string\n}\n\ninterface ButtonSectionProps {\n buttonText?: string\n href?: string\n to?: string\n}\nconst SubLinkSection: React.FC<SubLinkSectionProps> = ({ backgroundImageAlignment, subLinkIcon, subLinkPath, subLinkText1, subLinkText2 }) => {\n return (\n <FlexGrowRow\n width=\"100%\"\n sx={{ flexDirection: { md: 'row', xs: 'column' }, justifyContent: { md: backgroundImageAlignment ? 'flex-start' : 'center', xs: 'center' } }}\n >\n {subLinkIcon ? <span>{subLinkIcon} </span> : null}\n <Typography>{subLinkText1} </Typography>\n <LinkEx href={subLinkPath} underline=\"always\" target=\"_blank\" color=\"inherit\">\n <Typography>{subLinkText2}</Typography>\n </LinkEx>\n </FlexGrowRow>\n )\n}\n\nconst ButtonSection: React.FC<ButtonSectionProps> = ({ href, to, buttonText }) => {\n const isMobile = useIsMobile()\n return (\n <ButtonEx\n fullWidth={true}\n marginTop={1}\n marginBottom={1}\n marginRight={isMobile ? 2 : 1}\n marginLeft={isMobile ? 2 : 0}\n target={href ?? '_blank'}\n to={to}\n href={href}\n color=\"primary\"\n variant=\"contained\"\n paddingX={3}\n sx={{ display: href || to ? 'flex' : 'none' }}\n >\n {buttonText}\n </ButtonEx>\n )\n}\n\nexport const BasicHero: React.FC<BasicHeroProps> = ({\n backgroundImage,\n title,\n gradientTitle,\n backgroundColor,\n textColor,\n desc,\n heroImage,\n title2,\n subLinkText1,\n subLinkText2,\n subLinkPath,\n button1Text,\n button2Text,\n button2To,\n button1To,\n button2Href,\n button1Href,\n subLinkIcon,\n sx,\n ...props\n}) => {\n const isMobile = useIsMobile()\n const { classes } = useGradientStyles()\n return (\n <FlexGrowCol\n sx={{\n backgroundImage: `url(${backgroundImage})`,\n backgroundPosition: { lg: 'bottom', md: 'center left', xs: 'top left' },\n minHeight: {\n md: '500px',\n sm: '400px',\n xs: '200px',\n },\n ...(sx ?? {}),\n }}\n style={{\n backgroundColor: backgroundColor ?? '',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n color: textColor ?? '',\n }}\n {...props}\n >\n <Container>\n <Grid\n container\n justifyContent=\"center\"\n alignItems=\"center\"\n sx={{\n alignItems: { xs: 'center' },\n justifyContent: { xs: 'center' },\n }}\n >\n <Grid item xs={12} sm={8} md={backgroundImage ? 6 : 8} lg={backgroundImage ? 6 : 8}>\n <FlexGrowCol paddingY={2} sx={{ alignItems: { xs: backgroundImage && !isMobile ? 'flex-start' : 'center' } }}>\n <Typography variant=\"h1\" component=\"h1\" gutterBottom textAlign={backgroundImage && !isMobile ? 'left' : 'center'}>\n {title ? <span>{`${title} `}</span> : null}\n {gradientTitle ? <span className={classes().heading}> {` ${gradientTitle}`}</span> : null}\n {title2 ? <span>{` ${title2}`}</span> : null}\n </Typography>\n <Typography variant=\"body1\" component=\"h2\" gutterBottom textAlign={backgroundImage && !isMobile ? 'left' : 'center'}>\n {desc}\n </Typography>\n <FlexGrowRow sx={{ flexDirection: { lg: 'row', xs: 'column' } }} width=\"100%\" marginTop={1}>\n <ButtonSection href={button1Href} to={button1To} buttonText={button1Text} />\n <ButtonSection href={button2Href} to={button2To} buttonText={button2Text} />\n </FlexGrowRow>\n <SubLinkSection\n subLinkIcon={subLinkIcon}\n subLinkText1={subLinkText1}\n subLinkText2={subLinkText2}\n subLinkPath={subLinkPath}\n backgroundImageAlignment={backgroundImage ? true : false}\n />\n </FlexGrowCol>\n </Grid>\n <Grid item xs={12} md={6}>\n {heroImage ? <img src={heroImage} width=\"100%\" /> : null}\n </Grid>\n </Grid>\n </Container>\n </FlexGrowCol>\n )\n}\n","import { useTheme } from '@mui/material'\nimport { makeStyles } from '@mui/styles'\nimport { CSSProperties } from 'react'\n\nexport interface GradientStyles {\n background: CSSProperties\n border: CSSProperties\n heading: CSSProperties\n}\n\nexport const colorfulGradientLightMode = () => {\n return {\n background: {\n backgroundImage: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',\n },\n border: {\n borderImage: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',\n borderImageSlice: 1,\n borderImageSource: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',\n borderRadius: 0,\n borderStyle: 'solid',\n borderWidth: '2px',\n },\n heading: {\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n background: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',\n display: 'inline-block',\n },\n }\n}\n\nexport const colorfulGradientDarkMode = () => {\n return {\n background: {\n backgroundImage: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',\n },\n border: {\n borderImage: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',\n borderImageSlice: 1,\n borderImageSource: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',\n borderRadius: 0,\n borderStyle: 'solid',\n borderWidth: '2px',\n },\n heading: {\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n background: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',\n display: 'inline-block',\n },\n }\n}\n\nexport const useGradientStyles = () => {\n const theme = useTheme()\n const styles = theme.palette.mode === 'dark' ? colorfulGradientDarkMode() : colorfulGradientLightMode()\n const classes = makeStyles(styles)\n return { classes, styles }\n}\n","import { useTheme } from '@mui/material'\n\nimport { useMediaQuery } from './useMediaQuery'\n\nexport const useIsMobile = () => {\n const theme = useTheme()\n return useMediaQuery(theme.breakpoints.down('md'))\n}\n","// eslint-disable-next-line import/no-deprecated\nimport { useMediaQuery } from '@mui/material'\n\n// eslint-disable-next-line import/no-deprecated\nexport { useMediaQuery }\n\n/* This file only exists to deal with the false positve lint error */\n","import { ForwardedRef, useEffect, useRef } from 'react'\n\nexport const useShareForwardedRef = <T>(forwardedRef: ForwardedRef<T>, refresh = 0) => {\n // final ref that will share value with forward ref. this is the one to be attached to components\n const innerRef = useRef<T>(null)\n\n useEffect(() => {\n if (!forwardedRef) {\n return\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(innerRef.current)\n return\n } else {\n forwardedRef.current = innerRef.current\n }\n }, [forwardedRef, refresh])\n\n return innerRef\n}\n","import { Box, BoxProps, styled, Typography, TypographyProps, TypographyTypeMap } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useCallback, useState } from 'react'\n\nimport { useShareForwardedRef } from '../hooks'\n\n/**\n * Heavily inspired by - https://stackoverflow.com/a/30362531/2803259\n */\n\nconst ComponentName = 'Ellipsize'\n\nexport interface EllipsizeRootProps extends BoxProps {\n beforeLineHeight?: string | number\n}\n\nconst EllipsizeRoot = styled(Box, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'beforeLineHeight',\n slot: 'Root',\n})<EllipsizeRootProps>(({ beforeLineHeight }) => ({\n '&': {\n // because the cell content ends up absolutely positioned, the cell doesn't know the content height.\n // the pseudo element with a hidden character establishes the proper height of the content and hides it\n ':before': {\n content: \"'nbsp;'\",\n display: 'block',\n // take the pseudo element out of the `display: block` flow so it won't push against our actual content\n float: 'left',\n visibility: 'hidden',\n // since we are `display: block`, lineHeight is the height\n ...(beforeLineHeight && { lineHeight: beforeLineHeight }),\n },\n },\n}))\n\nconst EllipsizeInnerWrap = styled(Box, {\n name: ComponentName,\n slot: 'innerWrap',\n})(() => ({\n position: 'relative',\n}))\n\nconst EllipsizeContentWrap = styled(Typography, {\n name: ComponentName,\n shouldForwardProp: (prop) => prop !== 'ellipsisPosition',\n slot: 'contentWrap',\n})<TypographyWithComponentProps>(({ theme, ellipsisPosition, fontFamily }) => {\n return theme.unstable_sx({\n fontFamily: fontFamily ?? 'monospace',\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n right: 0,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...(ellipsisPosition === 'start'\n ? {\n direction: 'rtl',\n textAlign: 'left',\n }\n : {}),\n })\n})\n\nconst useClientHeight = () => {\n const [contentWrapHeight, setContentWrapHeight] = useState<string>()\n\n const contentWrapRef = useCallback((node: HTMLElement) => {\n if (node !== null) {\n setContentWrapHeight(node.clientHeight + 'px')\n }\n }, [])\n\n return { contentWrapHeight, contentWrapRef }\n}\n\n// See - https://mui.com/material-ui/guides/composition/#with-typescript\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type TypographyWithComponentProps<D extends React.ElementType = TypographyTypeMap['defaultComponent'], P = {}> = TypographyProps<D, P> & {\n ellipsisPosition?: 'start' | 'end'\n}\n\nexport interface EllipsizeBoxProps extends BoxProps {\n disableSharedRef?: boolean\n ellipsisPosition?: 'start' | 'end'\n typographyProps?: TypographyWithComponentProps\n}\n\nexport const EllipsizeBox = forwardRef<HTMLDivElement, WithChildren<EllipsizeBoxProps>>(\n ({ children, ellipsisPosition = 'start', disableSharedRef, typographyProps, ...props }, ref) => {\n // Allow syncing of :before pseudo element height with contentWrapHeight\n const { contentWrapRef, contentWrapHeight } = useClientHeight()\n const sharedRef = useShareForwardedRef(ref)\n\n return (\n <EllipsizeRoot beforeLineHeight={!!sharedRef && !disableSharedRef ? contentWrapHeight : undefined} {...props} ref={ref}>\n <EllipsizeInnerWrap>\n <EllipsizeContentWrap ref={contentWrapRef} component={'span'} ellipsisPosition={ellipsisPosition} variant=\"body2\" {...typographyProps}>\n {children}\n </EllipsizeContentWrap>\n </EllipsizeInnerWrap>\n </EllipsizeRoot>\n )\n },\n)\nEllipsizeBox.displayName = 'EllipsizeBox'\n","import { Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { Component, ErrorInfo, ReactNode } from 'react'\n\nexport interface ErrorBoundaryProps {\n children: ReactNode\n // fallback as a static ReactNode value\n fallback?: ReactNode\n // fallback element that can receive the error as a prop\n fallbackWithError?: (error: Error) => ReactNode\n}\n\nexport interface ErrorBoundaryState {\n error?: Error\n}\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { error: undefined }\n }\n\n static getDerivedStateFromError(error: Error) {\n return { error }\n }\n\n override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error(`${error}: ${errorInfo}`)\n }\n\n override render() {\n if (this.state.error) {\n if (this.props.fallbackWithError) {\n return this.props.fallbackWithError(this.state.error)\n }\n return (\n this.props.fallback ?? (\n <FlexCol>\n <Typography variant=\"h1\">Something went wrong.</Typography>\n <Typography variant=\"body1\">[{this.state.error?.message}]</Typography>\n </FlexCol>\n )\n )\n }\n\n return this.props.children\n }\n}\n","import { ListItemButton, ListItemButtonProps } from '@mui/material'\nimport { MouseEvent } from 'react'\nimport { NavigateOptions, To, useNavigate } from 'react-router-dom-6'\n\nexport interface ListItemButtonExProps extends ListItemButtonProps {\n target?: string\n to?: To\n toOptions?: NavigateOptions\n}\n\nexport const ListItemButtonExTo: React.FC<ListItemButtonExProps> = ({ to, toOptions, onClick, ...props }) => {\n const navigate = useNavigate()\n const localOnClick = (event: MouseEvent<HTMLDivElement>) => {\n onClick?.(event)\n if (to) {\n navigate(to, toOptions)\n }\n }\n\n return <ListItemButton onClick={localOnClick} {...props} />\n}\n\nexport const ListItemButtonEx: React.FC<ListItemButtonExProps> = ({ to, ...props }) => {\n if (to) {\n return <ListItemButtonExTo to={to} {...props} />\n } else {\n return <ListItemButton {...props} />\n }\n}\n","import { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { PropsWithChildren } from 'react'\n\nimport { NotFound } from './NotFound'\n\nexport interface LoadResultProps<T> {\n /** @deprecated - use error prop */\n apiError?: Error\n /** Defer error handling to the children and load them */\n error?: boolean\n notFound: boolean\n searchResult: T | undefined\n}\n\nexport function LoadResult<T>(props: PropsWithChildren<LoadResultProps<T>>) {\n const { notFound, error, searchResult, children } = props\n if (notFound) {\n return <NotFound />\n }\n if (error) {\n return <>{children}</>\n }\n if (searchResult === undefined) {\n return <FlexGrowRow busy minHeight=\"50px\" />\n } else {\n return <>{children}</>\n }\n}\n","import { Typography } from '@mui/material'\nimport { FlexBoxProps, FlexGrowCol } from '@xylabs/react-flexbox'\n\nconst NotFound: React.FC<FlexBoxProps> = (props) => {\n return (\n <FlexGrowCol {...props}>\n <Typography variant=\"h2\">Sorry!</Typography>\n <Typography marginY={3} variant=\"body2\">\n {\"Can't find anything here\"}\n </Typography>\n </FlexGrowCol>\n )\n}\n\nexport { NotFound }\n","import { Typography, TypographyProps } from '@mui/material'\n\nexport const Pipe: React.FC<TypographyProps> = (props) => {\n return (\n <Typography marginX={1} component=\"span\" {...props}>\n |\n </Typography>\n )\n}\n","import { Alert, AlertProps, AlertTitle } from '@mui/material'\n\nexport interface PayloadDataMissingProps extends AlertProps {\n alertBody?: string\n}\n\nexport const PayloadDataMissing: React.FC<PayloadDataMissingProps> = ({ alertBody, ...props }) => {\n return (\n <Alert severity=\"warning\" {...props}>\n <AlertTitle>Missing Data</AlertTitle>\n {alertBody ?? 'Payload is missing required data to render correctly'}\n </Alert>\n )\n}\n","import { styled } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\n\nconst StyledScrollTableOnSm = styled('div')(({ theme }) => ({\n [theme.breakpoints.down('md')]: {\n overflowX: 'scroll',\n },\n display: 'flex',\n flexGrow: 1,\n}))\n\nconst ScrollTableOnSm: React.FC<WithChildren> = ({ children }) => <StyledScrollTableOnSm>{children}</StyledScrollTableOnSm>\n\nexport { ScrollTableOnSm }\n","import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexGrowRow } from '@xylabs/react-flexbox'\nimport { forwardRef } from 'react'\n\nexport const SectionSpacingRow = forwardRef<HTMLDivElement, FlexBoxProps>(({ children, sx, ...props }, ref) => {\n const theme = useTheme()\n return (\n <FlexGrowRow\n sx={{\n paddingBottom: { md: theme.spacing(5), xs: theme.spacing(5) },\n paddingTop: { md: theme.spacing(5), xs: theme.spacing(5) },\n ...sx,\n }}\n width=\"100%\"\n ref={ref}\n {...props}\n >\n {children}\n </FlexGrowRow>\n )\n})\n\nSectionSpacingRow.displayName = 'SectionSpacingRow'\n","import { forwardRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface AddressTableCellProps extends EllipsisTableCellProps {\n /** @deprecated - archives are no longer supported */\n archive?: string\n /** @deprecated - use events instead */\n exploreDomain?: string\n link?: boolean\n}\n\nconst AddressTableCell = forwardRef<HTMLTableCellElement, AddressTableCellProps>(({ value, archive, exploreDomain, link, ...props }, ref) => {\n const href = exploreDomain && archive ? `${exploreDomain}/archive/${archive}/address/${value}` : undefined\n const to = exploreDomain === undefined && archive ? `/archive/${archive}/address/${value}` : undefined\n\n return <EllipsisTableCell value={value} href={href} to={to} ref={ref} link={link} {...props} />\n})\n\nAddressTableCell.displayName = 'AddressTableCell'\nexport { AddressTableCell }\n","import { styled, TableCell, TableCellProps } from '@mui/material'\nimport { LinkEx } from '@xylabs/react-link'\nimport type { WithChildren } from '@xylabs/react-shared'\nimport { forwardRef, useMemo } from 'react'\nimport { To } from 'react-router-dom-6'\n\nimport { EllipsizeBox } from '../Ellipsize'\n\nconst EllipsisTableCellRoot = styled(TableCell, {\n name: 'EllipsisTableCell',\n shouldForwardProp: (prop) => prop !== 'width',\n slot: 'Root',\n})(({ width = '100%' }) => ({\n width,\n}))\n\nexport interface EllipsisTableCellProps extends TableCellProps {\n href?: string\n link?: boolean\n to?: To\n value?: string\n /**\n * Width of the table cell.\n *\n * Note: When using percentages, this value can be different than what you expect\n * if used on a cell that is not the first cell in the first row.\n */\n width?: string | number\n}\n\nexport const EllipsisTableCellWithRef: React.FC<WithChildren<EllipsisTableCellProps>> = forwardRef(\n ({ children, href, link = false, to, value, ...props }, ref) => {\n const data = useMemo(() => {\n if (children) {\n return children\n }\n if (href || link || to) {\n return (\n <LinkEx title={value} to={to} href={href} target={href ? '_blank' : undefined}>\n {value}\n </LinkEx>\n )\n }\n return value\n }, [children, href, link, to, value])\n return (\n <EllipsisTableCellRoot ref={ref} {...props}>\n <EllipsizeBox sx={{ cursor: link || to || href ? 'pointer' : 'inherit' }}>{data}</EllipsizeBox>\n </EllipsisTableCellRoot>\n )\n },\n)\n\nEllipsisTableCellWithRef.displayName = 'EllipsisTableCell'\nexport const EllipsisTableCell = EllipsisTableCellWithRef\n","import { useEvent } from '@xyo-network/react-event'\nimport { useRef } from 'react'\n\nimport { EllipsisTableCell, EllipsisTableCellProps } from './EllipsisTableCell'\n\nexport interface HashTableCellProps extends EllipsisTableCellProps {\n archive?: string\n dataType?: 'block' | 'payload'\n exploreDomain?: string\n network?: string\n}\n\nexport const HashTableCell: React.FC<HashTableCellProps> = ({ value, archive, dataType, network, exploreDomain, ...props }) => {\n const ref = useRef<HTMLTableCellElement | null>(null)\n const [tableCellRef, dispatch] = useEvent<HTMLTableCellElement>(undefined, ref)\n const hashPath = `/${dataType}/hash/${value}?network=${network ?? 'main'}`\n const explorePath = archive ? `/archive/${archive}${hashPath}` : hashPath\n\n const handleCellClick = () => {\n dispatch?.('hash', 'click', value)\n }\n\n return (\n <EllipsisTableCell\n onClick={handleCellClick}\n ref={tableCellRef}\n value={value}\n href={exploreDomain ? `${exploreDomain}${explorePath}}` : undefined}\n to={exploreDomain ? undefined : explorePath}\n {...props}\n />\n )\n}\n","import { Avatar, AvatarProps, useTheme } from '@mui/material'\n\nexport const ThemeTokenAvatar: React.FC<AvatarProps> = ({ ...props }) => {\n const theme = useTheme()\n return <Avatar sx={{ background: theme.palette.common.white }} {...props} />\n}\n","import { AvatarGroup, AvatarGroupProps } from '@mui/material'\n\nimport { ThemeTokenAvatar } from '../ThemeTokenAvatar'\n\nexport interface ThemeTokenAvatarGroupProps extends AvatarGroupProps {\n images?: string[]\n}\n\nexport const ThemeTokenAvatarGroup: React.FC<ThemeTokenAvatarGroupProps> = ({ images, ...props }) => {\n return <AvatarGroup {...props}>{images?.map((image, index) => <ThemeTokenAvatar key={index} src={image} />)}</AvatarGroup>\n}\n","import { Paper, PaperProps, Typography, TypographyProps } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { ReactNode } from 'react'\nexport interface TokenBarProps extends PaperProps {\n text1?: ReactNode\n text1Props?: TypographyProps\n text1Suffix?: ReactNode\n text2?: ReactNode\n text2Props?: TypographyProps\n text2Suffix?: ReactNode\n}\n\nexport const TokenBar: React.FC<TokenBarProps> = ({ text1, text1Props, text1Suffix, text2, text2Props, text2Suffix, ...props }) => {\n return (\n <Paper elevation={0} className=\"TokenBar-root\" {...props}>\n <FlexRow justifyContent=\"space-between\">\n <Typography variant=\"body1\" fontWeight={300} margin={1} {...text1Props}>\n {text1}\n {text1Suffix}\n </Typography>\n <Typography variant=\"body1\" fontWeight={300} textTransform=\"uppercase\" color=\"gray\" margin={1} {...text2Props}>\n {text2}\n {text2Suffix}\n </Typography>\n </FlexRow>\n </Paper>\n )\n}\n","import ada from './ada.png'\nimport btc from './btc.png'\nimport busd from './busd.png'\nimport dai from './dai.png'\nimport dogecoin from './dogecoin.png'\nimport dot from './dot.png'\nimport ethereum from './ethereum.png'\nimport frax from './frax.png'\nimport link from './link.png'\nimport sol from './sol.png'\nimport tether from './tether.png'\nimport usdCoin from './usd-coin.png'\nimport weth from './weth.png'\nimport wrappedBtc from './wrapped-bitcoin.png'\nimport xyo from './xyo.png'\n\nexport { ada, btc, busd, dai, dogecoin, dot, ethereum, frax, link, sol, tether, usdCoin, weth, wrappedBtc, xyo }\n","import * as tokenImages from './img'\n\nexport interface TokenData {\n coinmarketcapLink: string\n etherscanLink: string\n icon: string\n readableName: string\n tokenSymbol: string\n uniqueTokenId: string\n}\n\nexport const TokenData: TokenData[] = [\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/multi-collateral-dai/',\n etherscanLink: 'https://etherscan.io/token/0x6b175474e89094c44da98b954eedeac495271d0f',\n icon: tokenImages.dai,\n readableName: 'Dai',\n tokenSymbol: 'dai',\n uniqueTokenId: 'dai',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/weth/',\n etherscanLink: 'https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n icon: tokenImages.weth,\n readableName: 'Weth',\n tokenSymbol: 'weth',\n uniqueTokenId: 'weth',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/ethereum/',\n etherscanLink: 'n/a',\n icon: tokenImages.ethereum,\n readableName: 'Ethereum',\n tokenSymbol: 'eth',\n uniqueTokenId: 'ethereum',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/bitcoin/',\n etherscanLink: 'n/a',\n icon: tokenImages.btc,\n readableName: 'Bitcoin',\n tokenSymbol: 'btc',\n uniqueTokenId: 'btc',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/xyo/',\n etherscanLink: 'https://etherscan.io/token/0x55296f69f40ea6d20e478533c15a6b08b654e758',\n icon: tokenImages.xyo,\n readableName: 'XYO',\n tokenSymbol: 'xyo',\n uniqueTokenId: 'xyo',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/frax/',\n etherscanLink: 'https://etherscan.io/token/0x853d955acef822db058eb8505911ed77f175b99e',\n icon: tokenImages.frax,\n readableName: 'Frax',\n tokenSymbol: 'frax',\n uniqueTokenId: 'frax',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/wrapped-bitcoin/',\n etherscanLink: 'https://etherscan.io/token/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',\n icon: tokenImages.wrappedBtc,\n readableName: 'Wrapped BTC',\n tokenSymbol: 'wbtc',\n uniqueTokenId: 'wbtc',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/usd-coin/',\n etherscanLink: 'https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n icon: tokenImages.usdCoin,\n readableName: 'USDC',\n tokenSymbol: 'usdc',\n uniqueTokenId: 'usdc',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/tether/',\n etherscanLink: 'https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7',\n icon: tokenImages.tether,\n readableName: 'Tether',\n tokenSymbol: 'usdt',\n uniqueTokenId: 'usdt',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/cardano/',\n etherscanLink: 'https://etherscan.io/token/0xc14777c94229582e5758c5a79b83dde876b9be98',\n icon: tokenImages.ada,\n readableName: 'Cardano',\n tokenSymbol: 'ada',\n uniqueTokenId: 'ada',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/binance-usd/',\n etherscanLink: 'https://etherscan.io/token/0x4Fabb145d64652a948d72533023f6E7A623C7C53',\n icon: tokenImages.busd,\n readableName: 'Binance USD',\n tokenSymbol: 'busd',\n uniqueTokenId: 'busd',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/dogecoin/',\n etherscanLink: 'https://etherscan.io/token/0x7618b5024a6349f9aef10ddfd33e3428c734551e',\n icon: tokenImages.dogecoin,\n readableName: 'Dogecoin',\n tokenSymbol: 'doge',\n uniqueTokenId: 'doge',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/polkadot-new/',\n etherscanLink: 'https://etherscan.io/token/0x2d4fb6dd969992c881d8e534c747cc925d5ba221',\n icon: tokenImages.dot,\n readableName: 'Polkadot',\n tokenSymbol: 'dot',\n uniqueTokenId: 'dot',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/chainlink/',\n etherscanLink: 'https://etherscan.io/token/0x514910771af9ca656af840dff83e8264ecf986ca',\n icon: tokenImages.link,\n readableName: 'ChainLink',\n tokenSymbol: 'link',\n uniqueTokenId: 'link',\n },\n {\n coinmarketcapLink: 'https://coinmarketcap.com/currencies/solana/',\n etherscanLink: 'https://etherscan.io/token/0x1f54638b7737193ffd86c19ec51907a7c41755d8',\n icon: tokenImages.sol,\n readableName: 'Solana',\n tokenSymbol: 'sol',\n uniqueTokenId: 'sol',\n },\n]\n","import { TokenData } from './TokenData'\n\nexport const useGetTokenData = (symbols: (string | undefined)[]) => {\n return symbols?.map((symbol) => {\n const additionalTokenData = TokenData.find((x) => x.tokenSymbol === symbol)\n const checkedTokenData = additionalTokenData ? additionalTokenData : TokenData[0]\n return checkedTokenData\n })\n}\n","import { AvatarProps, CardHeader, CardHeaderProps, Typography } from '@mui/material'\nimport { ReactNode } from 'react'\n\nimport { ThemeTokenAvatar } from '../ThemeTokenAvatar'\n\nexport interface TokenSummaryProps extends CardHeaderProps {\n icon?: string\n imgBgProps?: AvatarProps\n symbol?: string\n symbolElement?: ReactNode\n}\n\nexport const TokenSummary: React.FC<TokenSummaryProps> = ({ icon, symbol, symbolElement, children, ...props }) => {\n return (\n <>\n <CardHeader\n avatar={<ThemeTokenAvatar src={icon} alt={symbol} />}\n title={\n <Typography variant=\"h6\" fontWeight={300} textTransform=\"uppercase\">\n {symbolElement ?? symbol}\n </Typography>\n }\n {...props}\n />\n {children}\n </>\n )\n}\n","import { Typography, TypographyProps } from '@mui/material'\n\nimport { useGradientStyles } from '../hooks'\n\nexport interface TypographyExProps extends TypographyProps {\n gradient?: 'text'\n}\n\nexport const TypographyEx: React.FC<TypographyExProps> = ({ gradient, ...props }) => {\n const { classes } = useGradientStyles()\n return <Typography className={gradient === 'text' ? classes().heading : undefined} {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAA4C;AAIxC;AAFG,IAAM,YAAuC,CAAC,UAAU;AAC7D,SACE,4CAAC,8BAAW,SAAS,GAAG,WAAU,QAAQ,GAAG,OAAO,eAEpD;AAEJ;;;ACRA,IAAAA,mBAA4C;AAC5C,0BAAyB;AACzB,2BAAuD;AACvD,wBAAuB;;;ACHvB,IAAAC,mBAAyB;AACzB,oBAA2B;AASpB,IAAM,4BAA4B,MAAM;AAC7C,SAAO;AAAA,IACL,YAAY;AAAA,MACV,iBAAiB;AAAA,IACnB;AAAA,IACA,QAAQ;AAAA,MACN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K,QAAQ;AAAA,QAClD,OACE,8CAAC,gCAAW,SAAQ,MAAK,YAAY,KAAK,eAAc,aACrD,2BAAiB,QACpB;AAAA,QAED,GAAG;AAAA;AAAA,IACN;AAAA,IACC;AAAA,KACH;AAEJ;;;AC3BA,IAAAC,oBAA4C;AAUnC,IAAAC,uBAAA;AAFF,IAAM,eAA4C,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM;AACnF,QAAM,EAAE,QAAQ,IAAI,kBAAkB;AACtC,SAAO,8CAAC,gCAAW,WAAW,aAAa,SAAS,QAAQ,EAAE,UAAU,QAAY,GAAG,OAAO;AAChG;","names":["import_material","import_material","import_material","import_material","import_jsx_runtime","import_material","import_react","import_jsx_runtime","import_material","import_react_flexbox","import_react","import_jsx_runtime","import_material","import_jsx_runtime","import_react_flexbox","import_material","import_react_flexbox","import_jsx_runtime","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_react","import_jsx_runtime","import_react","import_material","import_react_link","import_react","import_jsx_runtime","link","import_jsx_runtime","link","import_react","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_jsx_runtime","import_material","import_react_flexbox","import_jsx_runtime","dai","weth","ethereum","btc","xyo","frax","wrappedBtc","usdCoin","tether","ada","busd","dogecoin","dot","link","sol","import_material","import_jsx_runtime","import_material","import_jsx_runtime"]}
|
|
@@ -328,7 +328,7 @@ var ErrorBoundary = class extends Component {
|
|
|
328
328
|
|
|
329
329
|
// src/components/ListItemButtonEx.tsx
|
|
330
330
|
import { ListItemButton } from "@mui/material";
|
|
331
|
-
import { useNavigate } from "react-router-dom";
|
|
331
|
+
import { useNavigate } from "react-router-dom-6";
|
|
332
332
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
333
333
|
var ListItemButtonExTo = ({ to, toOptions, onClick, ...props }) => {
|
|
334
334
|
const navigate = useNavigate();
|