dashlab 0.3.7__tar.gz → 0.3.9__tar.gz

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.
Files changed (24) hide show
  1. {dashlab-0.3.7 → dashlab-0.3.9}/PKG-INFO +1 -1
  2. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/_version.py +1 -1
  3. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/base.py +4 -2
  4. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/utils.py +5 -1
  5. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/PKG-INFO +1 -1
  6. {dashlab-0.3.7 → dashlab-0.3.9}/LICENSE +0 -0
  7. {dashlab-0.3.7 → dashlab-0.3.9}/README.md +0 -0
  8. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/__init__.py +0 -0
  9. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/_internal.py +0 -0
  10. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/core.py +0 -0
  11. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/patches.py +0 -0
  12. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/animator.css +0 -0
  13. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/animator.js +0 -0
  14. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/fscreen.css +0 -0
  15. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/fscreen.js +0 -0
  16. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/listw.css +0 -0
  17. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/listw.js +0 -0
  18. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/widgets.py +0 -0
  19. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/SOURCES.txt +0 -0
  20. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/dependency_links.txt +0 -0
  21. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/requires.txt +0 -0
  22. {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/top_level.txt +0 -0
  23. {dashlab-0.3.7 → dashlab-0.3.9}/pyproject.toml +0 -0
  24. {dashlab-0.3.7 → dashlab-0.3.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dashlab
3
- Version: 0.3.7
3
+ Version: 0.3.9
4
4
  Summary: A Python package for dashboard and data visualization tools.
5
5
  Author-email: Abdul Saboor <asaboor.my@outlook.com>
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
1
  # This is automatically updated at build time, do not edit manually.
2
2
  # Double qoites are checked here
3
3
 
4
- __version__ = "0.3.7"
4
+ __version__ = "0.3.9"
@@ -22,6 +22,7 @@ from .utils import print_error, disabled, _build_css, _fix_init_sig, _format_doc
22
22
 
23
23
  # Us
24
24
  _user_ctx = nullcontext # this can be set from external packages like ipyslides will set one
25
+ _this_klass = '' # for external used in ipyslides to detect current class where function is running
25
26
 
26
27
  _running_callbacks = set() # Global set to track currently running callbacks
27
28
 
@@ -157,7 +158,7 @@ _docs = {
157
158
  "callbacks": """
158
159
  - Methods decorated with `@callback`. Run in the order of definition.
159
160
  - Optional CSS class via `@callback('out-myclass')`
160
- - Decorate with @monitor to check execution time, kwargs etc.
161
+ - Decorate with `@monitor` to check execution time, kwargs etc.
161
162
  - CSS class must start with 'out-' excpet reserved 'out-main'
162
163
  - Each callback gets only needed parameters and updates happen only when relevant parameters change
163
164
  - Callbacks cannot call themselves recursively to prevent infinite loops
@@ -892,7 +893,8 @@ class DashboardBase(ipw.interactive, metaclass = _metaclass):
892
893
  _run_callbacks(self.__icallbacks, kwargs, self)
893
894
 
894
895
  def __user_ctx(self):
895
- global _user_ctx
896
+ global _user_ctx, _this_klass
897
+ _this_klass = "." + ".".join(self._dom_classes) # for context manager use outside
896
898
  try:
897
899
  with _user_ctx(): pass # test if it works
898
900
  except Exception as e:
@@ -156,7 +156,11 @@ def _build_css(selector, props):
156
156
  content += f"{key} {{\n\t"
157
157
  content += _build_css(selector, value).replace('\n','\n\t').rstrip('\t') # last tab is bad
158
158
  content += "}\n"
159
- elif key.startswith('@'): # @page, @keyframes etc.
159
+ elif key.startswith('@keyframes'): # handle keyframes specially
160
+ content += f"{key} {{\n"
161
+ inner = _build_css((), value).strip('\n') # build inner from/to/percent blocks
162
+ content += textwrap.indent(inner, '\t') + "\n}\n"
163
+ elif key.startswith('@'): # @page etc.
160
164
  content += f"{key} " # braces added by _build_css below, no extra needed
161
165
  content += _build_css((), value).strip(' \n\t\r') # strip both sides here to take brace at previous line
162
166
  content += "\n"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dashlab
3
- Version: 0.3.7
3
+ Version: 0.3.9
4
4
  Summary: A Python package for dashboard and data visualization tools.
5
5
  Author-email: Abdul Saboor <asaboor.my@outlook.com>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes