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.
- {dashlab-0.3.7 → dashlab-0.3.9}/PKG-INFO +1 -1
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/_version.py +1 -1
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/base.py +4 -2
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/utils.py +5 -1
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/PKG-INFO +1 -1
- {dashlab-0.3.7 → dashlab-0.3.9}/LICENSE +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/README.md +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/__init__.py +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/_internal.py +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/core.py +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/patches.py +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/animator.css +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/animator.js +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/fscreen.css +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/fscreen.js +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/listw.css +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/static/listw.js +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab/widgets.py +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/SOURCES.txt +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/dependency_links.txt +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/requires.txt +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/dashlab.egg-info/top_level.txt +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/pyproject.toml +0 -0
- {dashlab-0.3.7 → dashlab-0.3.9}/setup.cfg +0 -0
|
@@ -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
|
|
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('@'): #
|
|
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"
|
|
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
|
|
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
|