
    hj6                     >    d dl mZ d dlmZ d dlmZ  G d de      Zy)    )
get_server)create_task)TrameComponentc                   0     e Zd ZdZd fd	Zd Zd Z xZS )TrameAppz
    Base trame class that has access to a trame server instance
    on which we provide simple accessor and method decoration capabilities.
    c                 >    t         |   t        ||      |       y )N)client_type)ctx_name)super__init__r   )selfserverr	   r
   _	__class__s        A/DATA/.local/lib/python3.12/site-packages/trame_common/obj/app.pyr   zTrameApp.__init__   s    FDxX    c                    K   ddl m} | j                  j                   d {     |d       | j                  j	                          y 7 (w)Nr   )clear_outputT)wait)IPython.displayr   uiready_ipython_display_)r   r   s     r   _async_displayzTrameApp._async_display   s7     0ggmm$!!# 	s    AA)Ac                 6    t        | j                                y)Nz2<i>Launching trame server in the background...</i>)r   r   )r   s    r   _repr_html_zTrameApp._repr_html_   s    D'')*Cr   )Nvue3N)__name__
__module____qualname____doc__r   r   r   __classcell__)r   s   @r   r   r      s    
Y$Dr   r   N)	trame.appr   trame_common.exec.asynchronousr   trame_common.obj.componentr   r    r   r   <module>r'      s      6 5D~ Dr   