
    ch                        % S r SSKJr  SSKJr  SSKJrJr  SSKJ	r
  SSKJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r:J;r;J<r<J=r=J>r>J?r?J@r@JArAJBrBJCrCJDrDJErEJFrFJGrGJHrHJIrIJJrJJKrKJLrLJMrMJNrNJOrOJPrPJQrQ  SSKRJSrT  \(       aV  SSKUrUSS	KJrJVrVJWrW  \UR                  S
:  a  SSKJYrY  OSSKZJYrY  \UR                  S:  a  SSKJ[r[  OSSKZJ[r[  SSK\J]r]  \[" S5      r^/ SQr_      SS jr`SS jra\TR                  rb\TR                  rc\TR                  rdS\eS'    S\eS'    SS jrf\
SS j5       rg\
S S j5       rgS!S jrg      S"S jrhg)#z)Customizing chart configuration defaults.    )annotations)wraps)TYPE_CHECKINGAny)overload)FAreaConfigKwdsAutoSizeParamsKwdsAxisConfigKwdsAxisResolveMapKwdsBarConfigKwdsBindCheckboxKwdsBindDirectKwdsBindInputKwdsBindRadioSelectKwdsBindRangeKwdsBoxPlotConfigKwdsBrushConfigKwdsCompositionConfigKwds
ConfigKwdsDateTimeKwdsDerivedStreamKwdsErrorBandConfigKwdsErrorBarConfigKwds$FeatureGeometryGeoJsonPropertiesKwdsFormatConfigKwdsGeoJsonFeatureCollectionKwdsGeoJsonFeatureKwdsGeometryCollectionKwdsGradientStopKwdsHeaderConfigKwdsIntervalSelectionConfigKwds&IntervalSelectionConfigWithoutTypeKwdsLegendConfigKwdsLegendResolveMapKwdsLegendStreamBindingKwdsLinearGradientKwdsLineConfigKwdsLineStringKwds
LocaleKwdsMarkConfigKwdsMergedStreamKwdsMultiLineStringKwdsMultiPointKwdsMultiPolygonKwdsNumberLocaleKwdsOverlayMarkDefKwdsPaddingKwds	PointKwdsPointSelectionConfigKwds#PointSelectionConfigWithoutTypeKwdsPolygonKwdsProjectionConfigKwdsProjectionKwdsRadialGradientKwdsRangeConfigKwdsRectConfigKwdsResolveKwds
RowColKwdsScaleConfigKwdsScaleInvalidDataConfigKwdsScaleResolveMapKwdsSelectionConfigKwdsStepKwdsStyleConfigIndexKwdsThemeConfigTickConfigKwdsTimeIntervalStepKwdsTimeLocaleKwdsTitleConfigKwdsTitleParamsKwdsTooltipContentKwdsTopLevelSelectionParameterKwdsVariableParameterKwdsViewBackgroundKwdsViewConfigKwds)themesN)r   CallableLiteral)      )LiteralString)rQ   
   )	ParamSpec)PluginP)Mr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r'   r(   r&   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   activeenablegetnamesoptionsregister
unregisterc                  ^ ^ SUU 4S jjnU$ )a  
Decorator for registering a theme function.

Parameters
----------
name
    Unique name assigned in registry.
enable
    Auto-enable the wrapped theme.

Examples
--------
Register and enable a theme::

    import altair as alt
    from altair import theme


    @theme.register("param_font_size", enable=True)
    def custom_theme() -> theme.ThemeConfig:
        sizes = 12, 14, 16, 18, 20
        return {
            "autosize": {"contains": "content", "resize": True},
            "background": "#F3F2F1",
            "config": {
                "axisX": {"labelFontSize": sizes[1], "titleFontSize": sizes[1]},
                "axisY": {"labelFontSize": sizes[1], "titleFontSize": sizes[1]},
                "font": "'Lato', 'Segoe UI', Tahoma, Verdana, sans-serif",
                "headerColumn": {"labelFontSize": sizes[1]},
                "headerFacet": {"labelFontSize": sizes[1]},
                "headerRow": {"labelFontSize": sizes[1]},
                "legend": {"labelFontSize": sizes[0], "titleFontSize": sizes[1]},
                "text": {"fontSize": sizes[0]},
                "title": {"fontSize": sizes[-1]},
            },
            "height": {"step": 28},
            "width": 350,
        }

We can then see the ``name`` parameter displayed when checking::

    theme.active
    "param_font_size"

Until another theme has been enabled, all charts will use defaults set in ``custom_theme()``::

    from vega_datasets import data

    source = data.stocks()
    lines = (
        alt.Chart(source, title=alt.Title("Stocks"))
        .mark_line()
        .encode(x="date:T", y="price:Q", color="symbol:N")
    )
    lines.interactive(bind_y=False)

c                  >^  [        TT 5        T(       a  [        R                  " T5        [        T 5      SU 4S jj5       nU$ )Nc                    > T" U 0 UD6$ N )argskwargsfuncs     _C:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\altair/theme.pywrapper+register.<locals>.decorate.<locals>.wrapper   s    (((    )rd   zP.argsre   zP.kwargsreturnrC   )	_register_themesrY   _wraps)rf   rh   rY   names   ` rg   decorateregister.<locals>.decorate   s9    $NN4 		) 
	) rj   )rf   Plugin[ThemeConfig]rk   rr   rc   )ro   rY   rp   s   `` rg   r]   r]      s    ~	 	 Orj   c                ^    [        U S5      nUc  SU < S[        5       < 3n[        U5      eU$ )z
Remove and return a previously registered theme.

Parameters
----------
name
    Unique name assigned during ``alt.theme.register``.

Raises
------
TypeError
    When ``name`` has not been registered.
NzFound no theme named z! in registry.
Registered themes:
)rl   r[   	TypeError)ro   pluginmsgs      rg   r^   r^     sC     tT"F~#D8 ,#wk 	
 nrj   strrX   dict[str, Any]r\   c                     [         $ rb   )__all__rc   rj   rg   __dir__r{   %  s    Nrj   c                    g rb   rc   ro   s    rg   __getattr__r~   )  s    14rj   c                    g rb   rc   r}   s    rg   r~   r~   +  s    =@rj   c                    U S:X  a  [         R                  $ U S:X  a  [         R                  $ S[        < SU < 3n[	        U5      e)NrX   r\   zmodule z has no attribute )rm   rX   r\   __name__AttributeError)ro   rv   s     rg   r~   r~   -  sD    x~~		|#5dX>S!!rj   c                   Uc   [         R                  R                  U S 5      $ [         R                  " U5      (       a  U[         R                  U '   U$ [	        U5      R
                  < SU< 3n[        U5      e)Nz is not a callable theme

)rm   _pluginspopplugin_typetyper   rt   )ro   fnrv   s      rg   rl   rl   7  sn     
z##D$//			R	 	 !#	b""%%A"Hnrj   )ro   rS   rY   boolrk   z4Callable[[Plugin[ThemeConfig]], Plugin[ThemeConfig]])ro   rS   rk   rr   )rk   z	list[str])ro   zLiteral['active']rk   rw   )ro   zLiteral['options']rk   rx   )ro   rw   rk   r   )ro   rS   r   Plugin[ThemeConfig] | Nonerk   r   )i__doc__
__future__r   	functoolsr   rn   typingr   r   r   	_overload!altair.vegalite.v5.schema._configr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   altair.vegalite.v5.themerN   rm   sysrO   rP   version_inforS   typing_extensionsrU   altair.utils.plugin_registryrV   rW   rz   r]   r^   rY   rZ   r[   __annotations__r{   r~   rl   rc   rj   rg   <module>r      si   / " % % (G G G G G G G G G G G G G G G G G GP 7--
7"(3
7"$/3#ANbJ
J$(J9JZ4 
kk 4	  3  4  4
 @  @"


7

rj   