o
    YhM                     @  s   d dl mZ d dlmZmZ d dlmZmZ d dlm	Z
 d dlmZ d dlmZ er<d dlmZ d dlmZ d d	lmZ G d
d dZdS )    )annotations)TYPE_CHECKINGcast)LayoutConfigvalidate_width)Text)gather_metrics)
clean_text)DeltaGenerator)Width)SupportsStrc                   @  s4   e Zd ZedddddddZedddZdS )	TextMixintextNcontent)helpwidthbodyr   r   
str | Noner   r   returnr
   c                C  sB   t  }t||_|r||_t|dd t|d}| jjd||dS )aC  Write text without Markdown or HTML parsing.

        For monospace text, use |st.code|_.

        .. |st.code| replace:: ``st.code``
        .. _st.code: https://docs.streamlit.io/develop/api-reference/text/st.code

        Parameters
        ----------
        body : str
            The string to display.

        help : str or None
            A tooltip that gets displayed next to the text. If this is ``None``
            (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

        width : "content", "stretch", or int
            The width of the text element. This can be one of the following:

            - ``"content"`` (default): The width of the element matches the
              width of its content, but doesn't exceed the width of the parent
              container.
            - ``"stretch"``: The width of the element matches the width of the
              parent container.
            - An integer specifying the width in pixels: The element has a
              fixed width. If the specified width is greater than the width of
              the parent container, the width of the element matches the width
              of the parent container.

        Example
        -------
        >>> import streamlit as st
        >>>
        >>> st.text("This is text\n[and more text](that's not a Markdown link).")

        .. output ::
            https://doc-text.streamlit.app/
            height: 220px

        T)allow_content)r   r   )layout_config)	TextProtor	   r   r   r   r   dg_enqueue)selfr   r   r   
text_protor    r   X/var/www/html/Persson_Maskin/env/lib/python3.10/site-packages/streamlit/elements/text.pyr      s   4

zTextMixin.textc                 C  s
   t d| S )zGet our DeltaGenerator.r
   )r   )r   r   r   r   r   ]   s   
zTextMixin.dg)r   r   r   r   r   r   r   r
   )r   r
   )__name__
__module____qualname__r   r   propertyr   r   r   r   r   r      s    =r   N)
__future__r   typingr   r   #streamlit.elements.lib.layout_utilsr   r   streamlit.proto.Text_pb2r   r   streamlit.runtime.metrics_utilr   streamlit.string_utilr	   streamlit.delta_generatorr
   r   streamlit.type_utilr   r   r   r   r   r   <module>   s   