maidr 0.22.1__py3-none-any.whl → 0.22.2__py3-none-any.whl

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.
maidr/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.22.1"
1
+ __version__ = "0.22.2"
2
2
 
3
3
  from .api import close, render, save_html, show, stacked
4
4
  from .core import Maidr
maidr/core/maidr.py CHANGED
@@ -11,7 +11,6 @@ from typing import Any, Literal
11
11
  from htmltools import HTML, HTMLDocument, Tag, tags
12
12
  from lxml import etree
13
13
  from matplotlib.figure import Figure
14
- from matplotlib.patches import Rectangle
15
14
 
16
15
  from maidr.core.context_manager import HighlightContextManager
17
16
  from maidr.core.enum.maidr_key import MaidrKey
@@ -272,7 +271,7 @@ class Maidr:
272
271
  # Render the plot inside an iframe if in a Jupyter notebook, Google Colab
273
272
  # or VSCode notebook. No need for iframe if this is a Quarto document.
274
273
  # For TypeScript we will use iframe by default for now
275
- if Environment.is_notebook():
274
+ if Environment.is_notebook() or Environment.is_shiny():
276
275
  unique_id = "iframe_" + Maidr._unique_id()
277
276
 
278
277
  def generate_iframe_script(unique_id: str) -> str:
maidr/patch/barplot.py CHANGED
@@ -64,6 +64,9 @@ def bar(
64
64
  align == "edge"
65
65
  ):
66
66
  plot_type = PlotType.DODGED
67
+ if "dodge" in kwargs:
68
+ plot_type = PlotType.DODGED
69
+
67
70
  return common(plot_type, wrapped, instance, args, kwargs)
68
71
 
69
72
 
maidr/util/environment.py CHANGED
@@ -31,6 +31,16 @@ class Environment:
31
31
  except ImportError:
32
32
  return False
33
33
 
34
+ @staticmethod
35
+ def is_shiny() -> bool:
36
+ """Return True if the environment is a Shiny app."""
37
+ try:
38
+ import shiny
39
+
40
+ return shiny.__name__ == "shiny"
41
+ except ImportError:
42
+ return False
43
+
34
44
  @staticmethod
35
45
  def is_vscode_notebook() -> bool:
36
46
  """Return True if the environment is a VSCode notebook."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: maidr
3
- Version: 0.22.1
3
+ Version: 0.22.2
4
4
  Summary: Multimodal Access and Interactive Data Representations
5
5
  License: GPL-3.0-or-later
6
6
  Keywords: accessibility,visualization,sonification,braille,tactile,multimodal,data representation,blind,low vision,visual impairments
@@ -1,4 +1,4 @@
1
- maidr/__init__.py,sha256=ABDD1_FOfLPWDA5gMifMwKyoWCkWv9pistkI4dAedOw,357
1
+ maidr/__init__.py,sha256=rqvpwh77dvV86dbscY3OPvc7wX6V9xQbgjk-zwRTriI,357
2
2
  maidr/api.py,sha256=GNyYSF8jEOsqCY4ZWLw3hh6RmRDewkWh6DJbzWfEwOA,1721
3
3
  maidr/core/__init__.py,sha256=WgxLpSEYMc4k3OyEOf1shOxfEq0ASzppEIZYmE91ThQ,25
4
4
  maidr/core/context_manager.py,sha256=6cT7ZGOApSpC-SLD2XZWWU_H08i-nfv-JUlzXOtvWYw,3374
@@ -7,7 +7,7 @@ maidr/core/enum/library.py,sha256=e8ujT_L-McJWfoVJd1ty9K_2bwITnf1j0GPLsnAcHes,10
7
7
  maidr/core/enum/maidr_key.py,sha256=WLLn2kSkUp4KzhMIiV6U6H5JCYuS1QjbXmR5EiyGy2E,759
8
8
  maidr/core/enum/plot_type.py,sha256=pyfyIwlq3taqe2Z1sVUSbMsTp5QTvYBlZXsMMMclEVM,293
9
9
  maidr/core/figure_manager.py,sha256=e6nI5pGqH0NM3yzt2jeiae4lrBlIOhkDN92GZJ3MNmk,3988
10
- maidr/core/maidr.py,sha256=eQHe4UGBu0l5C8Jdd9UGVt0qdrU37niwVgV-2n2_p6g,12575
10
+ maidr/core/maidr.py,sha256=w27bsjX42uGZofaCDtMlZGNPYVMvg0mKU7r0xQFDeTY,12560
11
11
  maidr/core/plot/__init__.py,sha256=xDIpRGM-4DfaSSL3nKcXrjdMecCHJ6en4K4nA_fPefQ,83
12
12
  maidr/core/plot/barplot.py,sha256=a5dOAaWqfbllLBN4U8JjPWSbONGqM8QUTTmUSccMd6U,1981
13
13
  maidr/core/plot/boxplot.py,sha256=WuHrUy6CFZRBfVDjl9MU262mfLFR6DWF_2h4zN3wcMI,5881
@@ -21,7 +21,7 @@ maidr/core/plot/scatterplot.py,sha256=o0i0uS-wXK9ZrENxneoHbh3-u-2goRONp19Yu9QLsa
21
21
  maidr/exception/__init__.py,sha256=PzaXoYBhyZxMDcJkuxJugDx7jZeseI0El6LpxIwXyG4,46
22
22
  maidr/exception/extraction_error.py,sha256=rd37Oxa9gn2OWFWt9AOH5fv0hNd3sAWGvpDMFBuJY2I,607
23
23
  maidr/patch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- maidr/patch/barplot.py,sha256=iCoYaqlHou6_rSnbjfZwpRU8ENnYcfQ9JCdUxhrSgCA,2416
24
+ maidr/patch/barplot.py,sha256=nxgBWBMUyf3eAW56CN5EKYYy3vsTgEPRlcvNYS3-WiU,2479
25
25
  maidr/patch/boxplot.py,sha256=Mcz94pSf7PT3SyRsI8TDrIKVdEmiiUQouXvd05mtnfw,2846
26
26
  maidr/patch/clear.py,sha256=2Sc4CIt5jRGkew3TxFsBZm-uowC9yDSxtraEcXZjmGw,396
27
27
  maidr/patch/common.py,sha256=bRe4jruUvCIwp1t1E8Q3OuQ0eEyHgpMjXVpsPBZj4C8,843
@@ -31,13 +31,13 @@ maidr/patch/histogram.py,sha256=tnyKkTMuzDXdyQBywhpHZgH3i2mXzOCSyfUSRM0tfUg,1315
31
31
  maidr/patch/lineplot.py,sha256=_EyqOp8BcO-kGq9sn8PyNQ8-Bz0FsnHAufXRkTGQzBw,1025
32
32
  maidr/patch/scatterplot.py,sha256=kln6zZwjVsdQzICalo-RnBOJrx1BnIB2xYUwItHvSNY,525
33
33
  maidr/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- maidr/util/environment.py,sha256=pa6NOoZLQQDmQvWitSTtB9nI2A7xETHLeJRNqWHybik,4220
34
+ maidr/util/environment.py,sha256=NJzbcFUCIk7OF29eIae8jyHax9p8fQgFLmxM6Af0fUY,4465
35
35
  maidr/util/mixin/__init__.py,sha256=aGJZNhtWh77yIVPc7ipIZm1OajigjMtCWYKPuDWTC-c,217
36
36
  maidr/util/mixin/extractor_mixin.py,sha256=AjpgCo_dgASdTwFumfgDOoVCVioxDDoqFWphaBj5gz4,4764
37
37
  maidr/util/mixin/merger_mixin.py,sha256=V0qLw_6DUB7X6CQ3BCMpsCQX_ZuwAhoSTm_E4xAJFKM,712
38
38
  maidr/widget/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  maidr/widget/shiny.py,sha256=wrrw2KAIpE_A6CNQGBtNHauR1DjenA_n47qlFXX9_rk,745
40
- maidr-0.22.1.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
41
- maidr-0.22.1.dist-info/METADATA,sha256=joyaX_YNioraA-OG3yiArVGVlsnsePZgZav0nYrLtbM,2688
42
- maidr-0.22.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
43
- maidr-0.22.1.dist-info/RECORD,,
40
+ maidr-0.22.2.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
41
+ maidr-0.22.2.dist-info/METADATA,sha256=0icmzAmbYyHT8FgQOVqcv6E_7dSN0M-_egxRyrLUpQI,2688
42
+ maidr-0.22.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
43
+ maidr-0.22.2.dist-info/RECORD,,
File without changes