| 847 | actions?: (ValueNodeAction | FalsyValue)[] |
| 848 | class?: string |
| 849 | }> = props => { |
| 850 | const ctx = s.useContext(ValueContext) |
| 851 | |
| 852 | const isUpdated = |
| 853 | (props.isSignal || ctx?.underStore) && |
| 854 | (() => { |
| 855 | const [_isUpdated, pingUpdated] = createPingedSignal() |
| 856 | s.createEffect(defer(() => props.value, pingUpdated)) |
| 857 | return _isUpdated |
| 858 | })() |
| 859 | |
| 860 | const handleSelect = (): void => { |
| 861 | if (props.onClick && decode.isValueNested(props.value)) props.onClick() |
| 862 | } |
| 863 | |
| 864 | const {isHovered, hoverProps} = createNestedHover() |
| 865 | const isExtendable = s.createMemo(() => decode.isValueNested(props.value)) |
| 866 | |
| 867 | return ( |
| 868 | <li |
| 869 | class={clsx( |
| 870 | props.class, |
| 871 | ui.highlight_container, |
| 872 | 'flex flex-wrap items-start p-l-2ch', |
| 873 | 'font-mono leading-inspector_row', |
| 874 | props.isStale && 'opacity-60', |
| 875 | )} |
| 876 | style={{ |
| 877 | [ui.highlight_opacity_var]: isHovered() ? '0.3' : '0', |
| 878 | }} |
| 879 | {...(props.name && {'aria-label': `${props.name} signal`})} |
| 880 | {...hoverProps} |
| 881 | > |
| 882 | <div |
| 883 | class={clsx( |
| 884 | 'pointer-events-none absolute mt-.25 -inset-y-.25 -inset-x-1 b b-solid b-dom rounded', |
| 885 | props.isInspected ? 'opacity-50' : 'opacity-0', |
| 886 | )} |
| 887 | style={{'mask-image': 'linear-gradient(90deg, black, transparent)'}} |
| 888 | /> |
| 889 | <div |
| 890 | class={clsx( |
| 891 | ui.highlight_element, |
| 892 | 'b b-solid b-highlight-border', |
| 893 | )} |
| 894 | /> |
| 895 | |
| 896 | {isExtendable() && ( |
| 897 | <div class="absolute -left-1 w-inspector_row h-inspector_row center-child"> |
| 898 | <ui.CollapseToggle |
| 899 | onToggle={handleSelect} |
| 900 | class={clsx( |
| 901 | 'transition-opacity', |
| 902 | (isExtendable() && props.isExtended) || isHovered() |
| 903 | ? 'opacity-100' |
| 904 | : 'opacity-0', |
| 905 | )} |
| 906 | collapsed={!props.isExtended} |
nothing calls this directly
no test coverage detected
searching dependent graphs…