dash-startup-loading-plugin 1.0.4__tar.gz → 2.0.0__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.
- dash_startup_loading_plugin-2.0.0/MANIFEST.in +1 -0
- dash_startup_loading_plugin-2.0.0/PKG-INFO +262 -0
- dash_startup_loading_plugin-2.0.0/README.md +237 -0
- dash_startup_loading_plugin-2.0.0/pyproject.toml +55 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/__init__.py +17 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/plugin.py +400 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/py.typed +0 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/accordion-loader.js +22 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/analyzing-image.js +11 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/arc.js +17 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/bars.js +24 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/bobbing-dots.js +11 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/bouncing-dots.js +24 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/classic.js +21 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/clock-ring.js +21 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/comet-spinner.js +79 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/concentric-ring.js +21 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/conveyor-loop.js +21 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/dash-ring.js +11 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/diamond.js +25 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/dots-ring.js +34 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/dots.js +22 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/dual-arc.js +17 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/fade-arc.js +17 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/infinity-square-snake.js +46 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/infinity-track.js +46 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/infinity.js +17 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/morphing-infinity.js +10 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/orbit-ring.js +21 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/pulsating-dots.js +11 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/pulse-dot.js +24 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/pulse.js +24 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/quarter-ring.js +21 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/ring.js +17 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/ripple.js +11 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/satellite-ring.js +21 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/skeleton.js +17 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/spiral.js +11 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/spokes.js +17 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/square-accordion.js +37 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/square-grid.js +30 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/square-snake.js +30 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/swirling.js +39 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/symmetric-wave.js +135 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/terminal.js +22 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/text-blink.js +22 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/text-dots.js +22 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/text-shimmer-wave.js +11 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/text-shimmer.js +11 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/triple-dot-spinner.js +21 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/twin-orbit.js +17 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/typing.js +24 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/wandering-eyes.js +68 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/loading-ui/wave.js +22 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin/resources/startup-loading.js +35 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin.egg-info/PKG-INFO +262 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin.egg-info/SOURCES.txt +61 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin.egg-info/entry_points.txt +2 -0
- dash_startup_loading_plugin-2.0.0/src/dash_startup_loading_plugin.egg-info/requires.txt +2 -0
- dash_startup_loading_plugin-1.0.4/MANIFEST.in +0 -2
- dash_startup_loading_plugin-1.0.4/PKG-INFO +0 -303
- dash_startup_loading_plugin-1.0.4/README.md +0 -289
- dash_startup_loading_plugin-1.0.4/README.zh-CN.md +0 -274
- dash_startup_loading_plugin-1.0.4/pyproject.toml +0 -50
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/README.md +0 -289
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/README.zh-CN.md +0 -274
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/__init__.py +0 -29
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/examples/__init__.py +0 -5
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/examples/__main__.py +0 -5
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/examples/antd.py +0 -109
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/examples/basic.py +0 -49
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/examples/cli.py +0 -89
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/examples/fac.py +0 -110
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/examples/mantine.py +0 -79
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/examples/shared.py +0 -33
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/plugin.py +0 -296
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/resources/loading.css +0 -64
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/resources/loading.js +0 -177
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin/resources/theme.js +0 -102
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin.egg-info/PKG-INFO +0 -303
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin.egg-info/SOURCES.txt +0 -29
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin.egg-info/entry_points.txt +0 -5
- dash_startup_loading_plugin-1.0.4/src/dash_startup_loading_plugin.egg-info/requires.txt +0 -1
- dash_startup_loading_plugin-1.0.4/tests/test_documentation.py +0 -75
- dash_startup_loading_plugin-1.0.4/tests/test_examples.py +0 -150
- dash_startup_loading_plugin-1.0.4/tests/test_plugin.py +0 -270
- {dash_startup_loading_plugin-1.0.4 → dash_startup_loading_plugin-2.0.0}/LICENSE +0 -0
- {dash_startup_loading_plugin-1.0.4 → dash_startup_loading_plugin-2.0.0}/setup.cfg +0 -0
- {dash_startup_loading_plugin-1.0.4 → dash_startup_loading_plugin-2.0.0}/src/dash_startup_loading_plugin.egg-info/dependency_links.txt +0 -0
- {dash_startup_loading_plugin-1.0.4 → dash_startup_loading_plugin-2.0.0}/src/dash_startup_loading_plugin.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
prune tests
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dash-startup-loading-plugin
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: A configurable full-screen startup loading overlay for Dash apps, packaged as a Dash Hooks plugin.
|
|
5
|
+
Author-email: Ethan Zhang <ethan.zhang2016@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/c0debeez/dash-startup-loading-plugin
|
|
8
|
+
Project-URL: Bug Reports, https://github.com/c0debeez/dash-startup-loading-plugin/issues
|
|
9
|
+
Project-URL: Source, https://github.com/c0debeez/dash-startup-loading-plugin
|
|
10
|
+
Keywords: dash,plotly,loading,plugin
|
|
11
|
+
Classifier: Framework :: Dash
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: dash>=3.0.3
|
|
23
|
+
Requires-Dist: typing-extensions>=4.11
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# dash-startup-loading-plugin
|
|
27
|
+
|
|
28
|
+
[English](https://github.com/C0deBeez/dash-startup-loading-plugin/blob/master/README.md) |
|
|
29
|
+
[简体中文](https://github.com/C0deBeez/dash-startup-loading-plugin/blob/master/README.zh-CN.md)
|
|
30
|
+
|
|
31
|
+
An installable [Dash Hooks plugin](https://dash.plotly.com/dash-plugins-using-hooks)
|
|
32
|
+
that replaces Dash's initial loading presentation with a configurable
|
|
33
|
+
full-screen overlay.
|
|
34
|
+
|
|
35
|
+
The plugin injects its CSS and JavaScript into Dash's normal index document
|
|
36
|
+
before React mounts. Applications do not need to copy assets or replace
|
|
37
|
+
`index_string`, and Dash's built-in `<div class="_dash-loading">` remains in the
|
|
38
|
+
document.
|
|
39
|
+
|
|
40
|
+
## Requirements
|
|
41
|
+
|
|
42
|
+
- Python 3.9 or later
|
|
43
|
+
- Dash 3.0.3 or later
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install "dash-startup-loading-plugin>=2.0.0"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Dash discovers the plugin through its `dash_hooks` entry point. Installing the
|
|
52
|
+
package enables the default loading overlay without an explicit import.
|
|
53
|
+
|
|
54
|
+
The default background colors work with native Dash and Dash Ant Design.
|
|
55
|
+
|
|
56
|
+
## Quick start
|
|
57
|
+
|
|
58
|
+
The plugin is discovered automatically, so a native Dash app needs no
|
|
59
|
+
plugin-specific code:
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from dash import Dash, html
|
|
63
|
+
|
|
64
|
+
app = Dash(__name__)
|
|
65
|
+
app.layout = html.Main(
|
|
66
|
+
[
|
|
67
|
+
html.H1("My Dash app"),
|
|
68
|
+
html.P("The overlay closes after this layout is ready."),
|
|
69
|
+
]
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
if __name__ == "__main__":
|
|
73
|
+
app.run(debug=True)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The example above uses Dash's native components from `dash.html`. You can also
|
|
77
|
+
use the plugin with `dash-antd-components`:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install dash-ant-design
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
uv add dash-ant-design
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
import dash_antd_components as dac
|
|
89
|
+
from dash import Dash
|
|
90
|
+
|
|
91
|
+
app = Dash(__name__)
|
|
92
|
+
app.layout = dac.Space(
|
|
93
|
+
[
|
|
94
|
+
dac.Title("My Dash Ant Design app", level=2),
|
|
95
|
+
dac.Button("Continue", type="primary"),
|
|
96
|
+
dac.Input(placeholder="Search"),
|
|
97
|
+
],
|
|
98
|
+
orientation="vertical",
|
|
99
|
+
size="middle",
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
if __name__ == "__main__":
|
|
103
|
+
app.run(debug=True)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
When the `dash-antd-components` bundle is present, the plugin automatically
|
|
107
|
+
uses Ant Design's four-dot loader unless `loader` is explicitly configured.
|
|
108
|
+
Native Dash apps use the Loading UI `ring` loader by default.
|
|
109
|
+
|
|
110
|
+
### Theme behavior
|
|
111
|
+
|
|
112
|
+
Theme initialization belongs to the application. Set `dark`/`light` on the
|
|
113
|
+
root HTML element before Dash mounts, for example in `index_string`; the
|
|
114
|
+
plugin's CSS follows `html.dark`. This avoids a theme flash without making the
|
|
115
|
+
plugin own application preferences or asynchronous theme callbacks.
|
|
116
|
+
Use `prefers-color-scheme` in that head script when the application follows the
|
|
117
|
+
operating system preference.
|
|
118
|
+
|
|
119
|
+
## Dash Ant Design
|
|
120
|
+
|
|
121
|
+
Dash Ant Design is optional. The same `setup()` function configures native Dash
|
|
122
|
+
and Dash Ant Design applications. When its component bundle is present and
|
|
123
|
+
`loader` was not explicitly configured, the plugin uses Ant Design's four-dot
|
|
124
|
+
loader and `colorPrimary` defaults. Other component libraries use Loading UI's
|
|
125
|
+
`ring` loader by default. Explicit loader and color options always take
|
|
126
|
+
precedence:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pip install dash-ant-design
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
uv add dash-ant-design
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
from dash_startup_loading_plugin import setup
|
|
138
|
+
|
|
139
|
+
setup(loader="antd")
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Dismissal behavior
|
|
143
|
+
|
|
144
|
+
By default, the plugin preserves its original behavior: it observes Dash's
|
|
145
|
+
standard `#react-entry-point` and closes the overlay after Dash's
|
|
146
|
+
`._dash-loading` element disappears. Theme initialization and application
|
|
147
|
+
specific callback/layout settling belong in the application's `index_string`
|
|
148
|
+
and callbacks.
|
|
149
|
+
|
|
150
|
+
## Configuration
|
|
151
|
+
|
|
152
|
+
`setup(**changes)` updates the process-wide immutable
|
|
153
|
+
`StartupLoadingConfig`.
|
|
154
|
+
|
|
155
|
+
| Option | Default | Description |
|
|
156
|
+
| --- | ---: | --- |
|
|
157
|
+
| `enabled` | `True` | Enable index injection. |
|
|
158
|
+
| `aria_label` | `"Loading"` | Accessible status label. |
|
|
159
|
+
| `z_index` | `9999` | Overlay stacking order. |
|
|
160
|
+
| `loader_color` | `#1677ff` | Loader color in light mode. |
|
|
161
|
+
| `loader_dark_color` | `#1668dc` | Loader color in dark mode. |
|
|
162
|
+
| `loader_text_color` | `rgba(0,0,0,0.88)` | Text color for `text-*` Loading UI loaders in light mode. |
|
|
163
|
+
| `loader_dark_text_color` | `rgba(255,255,255,0.85)` | Text color for `text-*` Loading UI loaders in dark mode. |
|
|
164
|
+
| `loader` | `"default"` | Loading UI's `ring` animation. |
|
|
165
|
+
| `loader_text` | `"Loading"` | Text rendered by `text-*` Loading UI loaders. |
|
|
166
|
+
| `loader_size` | `64` | Target loader width and height. Loading UI uses its `ring` default of 4rem (64px); the `antd` loader uses Ant Design Spin's medium visual size of 20px. Other Loading UI loaders scale proportionally from their bundled default geometry. `None` uses the 64px baseline. |
|
|
167
|
+
| `loader_stroke_width` | `2` | Loading UI border and SVG stroke width, generated from its 2px default at the 64px ring baseline. |
|
|
168
|
+
| `custom_loader_html` | `None` | Trusted HTML replacing the default spinner. |
|
|
169
|
+
|
|
170
|
+
`custom_loader_html` is inserted verbatim and must never contain untrusted
|
|
171
|
+
user input.
|
|
172
|
+
|
|
173
|
+
The default loader uses Loading UI's `ring` animation. To use Ant Design's
|
|
174
|
+
four-dot loader, configure it explicitly:
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
setup(loader="antd")
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The overlay background follows the application's `html.dark` class and `--layout-bg` CSS variable, with `#f5f5f5` and `#111825` fallbacks. The plugin does not inspect ConfigProvider tokens. Explicit color options always take precedence. Use `loader_size`, `loader_color`, `loader_dark_color`, `loader_text_color`, and `loader_dark_text_color` to match a customized theme. Use `loader_text` to replace the default text in `text-*` loaders:
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
setup(loader="text-shimmer", loader_text="Preparing dashboard")
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Loader gallery
|
|
187
|
+
|
|
188
|
+
The effective default depends on the component bundle:
|
|
189
|
+
|
|
190
|
+
| Application | Default loader | Notes |
|
|
191
|
+
| --- | --- | --- |
|
|
192
|
+
| Native Dash components | `ring` | Loading UI renderer. |
|
|
193
|
+
| `dash-antd-components` | `antd` | Ant Design's four-dot spinner. |
|
|
194
|
+
| Any app with an explicit `setup(loader=...)` | The selected loader | Explicit configuration always wins. |
|
|
195
|
+
|
|
196
|
+
All Loading UI loaders are bundled separately and loaded only when selected.
|
|
197
|
+
The preview images below link to the official interactive demos. Open a preview
|
|
198
|
+
to see its live animation and source details. The `text-*` loaders accept
|
|
199
|
+
custom text through `loader_text`; `loader_color`, `loader_dark_color`,
|
|
200
|
+
`loader_size`, and `loader_stroke_width` apply where supported.
|
|
201
|
+
|
|
202
|
+
| Preview | Preview | Preview |
|
|
203
|
+
| --- | --- | --- |
|
|
204
|
+
| [](https://loading-ui.com/docs/components/accordion-loader)<br>`accordion-loader` | [](https://loading-ui.com/docs/components/analyzing-image)<br>`analyzing-image` | [](https://loading-ui.com/docs/components/arc)<br>`arc` |
|
|
205
|
+
| [](https://loading-ui.com/docs/components/bars)<br>`bars` | [](https://loading-ui.com/docs/components/bobbing-dots)<br>`bobbing-dots` | [](https://loading-ui.com/docs/components/bouncing-dots)<br>`bouncing-dots` |
|
|
206
|
+
| [](https://loading-ui.com/docs/components/classic)<br>`classic` | [](https://loading-ui.com/docs/components/clock-ring)<br>`clock-ring` | [](https://loading-ui.com/docs/components/comet-spinner)<br>`comet-spinner` |
|
|
207
|
+
| [](https://loading-ui.com/docs/components/concentric-ring)<br>`concentric-ring` | [](https://loading-ui.com/docs/components/conveyor-loop)<br>`conveyor-loop` | [](https://loading-ui.com/docs/components/dash-ring)<br>`dash-ring` |
|
|
208
|
+
| [](https://loading-ui.com/docs/components/diamond)<br>`diamond` | [](https://loading-ui.com/docs/components/dots)<br>`dots` | [](https://loading-ui.com/docs/components/dots-ring)<br>`dots-ring` |
|
|
209
|
+
| [](https://loading-ui.com/docs/components/dual-arc)<br>`dual-arc` | [](https://loading-ui.com/docs/components/fade-arc)<br>`fade-arc` | [](https://loading-ui.com/docs/components/infinity)<br>`infinity` |
|
|
210
|
+
| [](https://loading-ui.com/docs/components/infinity-square-snake)<br>`infinity-square-snake` | [](https://loading-ui.com/docs/components/infinity-track)<br>`infinity-track` | [](https://loading-ui.com/docs/components/morphing-infinity)<br>`morphing-infinity` |
|
|
211
|
+
| [](https://loading-ui.com/docs/components/orbit-ring)<br>`orbit-ring` | [](https://loading-ui.com/docs/components/pulsating-dots)<br>`pulsating-dots` | [](https://loading-ui.com/docs/components/pulse)<br>`pulse` |
|
|
212
|
+
| [](https://loading-ui.com/docs/components/pulse-dot)<br>`pulse-dot` | [](https://loading-ui.com/docs/components/quarter-ring)<br>`quarter-ring` | [](https://loading-ui.com/docs/components/ring)<br>`ring` |
|
|
213
|
+
| [](https://loading-ui.com/docs/components/ripple)<br>`ripple` | [](https://loading-ui.com/docs/components/satellite-ring)<br>`satellite-ring` | [](https://loading-ui.com/docs/components/skeleton)<br>`skeleton` |
|
|
214
|
+
| [](https://loading-ui.com/docs/components/spiral)<br>`spiral` | [](https://loading-ui.com/docs/components/spokes)<br>`spokes` | [](https://loading-ui.com/docs/components/square-accordion)<br>`square-accordion` |
|
|
215
|
+
| [](https://loading-ui.com/docs/components/square-grid)<br>`square-grid` | [](https://loading-ui.com/docs/components/square-snake)<br>`square-snake` | [](https://loading-ui.com/docs/components/swirling)<br>`swirling` |
|
|
216
|
+
| [](https://loading-ui.com/docs/components/symmetric-wave)<br>`symmetric-wave` | [](https://loading-ui.com/docs/components/terminal)<br>`terminal` | [](https://loading-ui.com/docs/components/text-blink)<br>`text-blink` |
|
|
217
|
+
| [](https://loading-ui.com/docs/components/text-dots)<br>`text-dots` | [](https://loading-ui.com/docs/components/text-shimmer)<br>`text-shimmer` | [](https://loading-ui.com/docs/components/text-shimmer-wave)<br>`text-shimmer-wave` |
|
|
218
|
+
| [](https://loading-ui.com/docs/components/triple-dot-spinner)<br>`triple-dot-spinner` | [](https://loading-ui.com/docs/components/twin-orbit)<br>`twin-orbit` | [](https://loading-ui.com/docs/components/typing)<br>`typing` |
|
|
219
|
+
| [](https://loading-ui.com/docs/components/wandering-eyes)<br>`wandering-eyes` | [](https://loading-ui.com/docs/components/wave)<br>`wave` | [Default: ring](https://loading-ui.com/docs/components/ring)<br>`default` |
|
|
220
|
+
| [Ant Design Spin](https://ant.design/components/spin)<br>`antd` | | |
|
|
221
|
+
|
|
222
|
+
The bundled [Loading UI](https://loading-ui.com/) collection supports all 47 loader names in the current upstream catalog:
|
|
223
|
+
|
|
224
|
+
```text
|
|
225
|
+
accordion-loader, analyzing-image, arc, bars, bobbing-dots, bouncing-dots, classic, clock-ring, comet-spinner, concentric-ring, conveyor-loop, dash-ring, diamond, dots, dots-ring, dual-arc, fade-arc, infinity, infinity-square-snake, infinity-track, morphing-infinity, orbit-ring, pulsating-dots, pulse, pulse-dot, quarter-ring, ring, ripple, satellite-ring, skeleton, spiral, spokes, square-accordion, square-grid, square-snake, swirling, symmetric-wave, terminal, text-blink, text-dots, text-shimmer, text-shimmer-wave, triple-dot-spinner, twin-orbit, typing, wandering-eyes, wave
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
For example:
|
|
229
|
+
|
|
230
|
+
```python
|
|
231
|
+
setup(loader="spiral", loader_color="#e91e63", loader_dark_color="#ff80ab")
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
The default loader, `ring`, and other Loading UI loaders use a bundled, isolated renderer loaded before Dash starts. Each loader ships as its own bundle, and the index only references the selected one at `<requests_pathname_prefix>_dash-startup-loading/<loader>.js`. That keeps the HTML document small and lets the browser cache the renderer, so the choice of loader does not grow the first-screen payload. No other indicator is shown while that renderer starts. Loading UI loaders sit in a centered 4:3 region that uses full width below 640px, half width from 640px, one-third from 768px, and one-quarter from 1024px. Each loader keeps the geometry from its official demo: square icons use their documented `size-*`, rectangular loaders keep their documented aspect ratio, and character-grid loaders derive intrinsic `ch`/`em` dimensions from their default props. Text loaders fit their text.
|
|
235
|
+
|
|
236
|
+
## Python API
|
|
237
|
+
|
|
238
|
+
```python
|
|
239
|
+
from dash_startup_loading_plugin import (
|
|
240
|
+
StartupLoadingConfig,
|
|
241
|
+
setup,
|
|
242
|
+
get_config,
|
|
243
|
+
reset_config,
|
|
244
|
+
)
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Notes
|
|
248
|
+
|
|
249
|
+
- Dash's hook and plugin configuration is process-wide. Use one configuration
|
|
250
|
+
per process.
|
|
251
|
+
- Readiness gates apply only to startup. Later callbacks do not recreate the overlay.
|
|
252
|
+
- The overlay markup and its small startup runtime are inlined, so strict Content
|
|
253
|
+
Security Policy deployments must allow the injected style and script. The
|
|
254
|
+
Loading UI renderer is served from a plugin route instead of being inlined.
|
|
255
|
+
- The overlay is only for initial application startup. Use `dcc.Loading` or
|
|
256
|
+
another callback-specific pattern for later callback execution.
|
|
257
|
+
|
|
258
|
+
## License
|
|
259
|
+
|
|
260
|
+
This project is distributed under the MIT License.
|
|
261
|
+
|
|
262
|
+
MIT
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# dash-startup-loading-plugin
|
|
2
|
+
|
|
3
|
+
[English](https://github.com/C0deBeez/dash-startup-loading-plugin/blob/master/README.md) |
|
|
4
|
+
[简体中文](https://github.com/C0deBeez/dash-startup-loading-plugin/blob/master/README.zh-CN.md)
|
|
5
|
+
|
|
6
|
+
An installable [Dash Hooks plugin](https://dash.plotly.com/dash-plugins-using-hooks)
|
|
7
|
+
that replaces Dash's initial loading presentation with a configurable
|
|
8
|
+
full-screen overlay.
|
|
9
|
+
|
|
10
|
+
The plugin injects its CSS and JavaScript into Dash's normal index document
|
|
11
|
+
before React mounts. Applications do not need to copy assets or replace
|
|
12
|
+
`index_string`, and Dash's built-in `<div class="_dash-loading">` remains in the
|
|
13
|
+
document.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- Python 3.9 or later
|
|
18
|
+
- Dash 3.0.3 or later
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install "dash-startup-loading-plugin>=2.0.0"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Dash discovers the plugin through its `dash_hooks` entry point. Installing the
|
|
27
|
+
package enables the default loading overlay without an explicit import.
|
|
28
|
+
|
|
29
|
+
The default background colors work with native Dash and Dash Ant Design.
|
|
30
|
+
|
|
31
|
+
## Quick start
|
|
32
|
+
|
|
33
|
+
The plugin is discovered automatically, so a native Dash app needs no
|
|
34
|
+
plugin-specific code:
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from dash import Dash, html
|
|
38
|
+
|
|
39
|
+
app = Dash(__name__)
|
|
40
|
+
app.layout = html.Main(
|
|
41
|
+
[
|
|
42
|
+
html.H1("My Dash app"),
|
|
43
|
+
html.P("The overlay closes after this layout is ready."),
|
|
44
|
+
]
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
if __name__ == "__main__":
|
|
48
|
+
app.run(debug=True)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The example above uses Dash's native components from `dash.html`. You can also
|
|
52
|
+
use the plugin with `dash-antd-components`:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install dash-ant-design
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uv add dash-ant-design
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
import dash_antd_components as dac
|
|
64
|
+
from dash import Dash
|
|
65
|
+
|
|
66
|
+
app = Dash(__name__)
|
|
67
|
+
app.layout = dac.Space(
|
|
68
|
+
[
|
|
69
|
+
dac.Title("My Dash Ant Design app", level=2),
|
|
70
|
+
dac.Button("Continue", type="primary"),
|
|
71
|
+
dac.Input(placeholder="Search"),
|
|
72
|
+
],
|
|
73
|
+
orientation="vertical",
|
|
74
|
+
size="middle",
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
if __name__ == "__main__":
|
|
78
|
+
app.run(debug=True)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
When the `dash-antd-components` bundle is present, the plugin automatically
|
|
82
|
+
uses Ant Design's four-dot loader unless `loader` is explicitly configured.
|
|
83
|
+
Native Dash apps use the Loading UI `ring` loader by default.
|
|
84
|
+
|
|
85
|
+
### Theme behavior
|
|
86
|
+
|
|
87
|
+
Theme initialization belongs to the application. Set `dark`/`light` on the
|
|
88
|
+
root HTML element before Dash mounts, for example in `index_string`; the
|
|
89
|
+
plugin's CSS follows `html.dark`. This avoids a theme flash without making the
|
|
90
|
+
plugin own application preferences or asynchronous theme callbacks.
|
|
91
|
+
Use `prefers-color-scheme` in that head script when the application follows the
|
|
92
|
+
operating system preference.
|
|
93
|
+
|
|
94
|
+
## Dash Ant Design
|
|
95
|
+
|
|
96
|
+
Dash Ant Design is optional. The same `setup()` function configures native Dash
|
|
97
|
+
and Dash Ant Design applications. When its component bundle is present and
|
|
98
|
+
`loader` was not explicitly configured, the plugin uses Ant Design's four-dot
|
|
99
|
+
loader and `colorPrimary` defaults. Other component libraries use Loading UI's
|
|
100
|
+
`ring` loader by default. Explicit loader and color options always take
|
|
101
|
+
precedence:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pip install dash-ant-design
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
uv add dash-ant-design
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from dash_startup_loading_plugin import setup
|
|
113
|
+
|
|
114
|
+
setup(loader="antd")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Dismissal behavior
|
|
118
|
+
|
|
119
|
+
By default, the plugin preserves its original behavior: it observes Dash's
|
|
120
|
+
standard `#react-entry-point` and closes the overlay after Dash's
|
|
121
|
+
`._dash-loading` element disappears. Theme initialization and application
|
|
122
|
+
specific callback/layout settling belong in the application's `index_string`
|
|
123
|
+
and callbacks.
|
|
124
|
+
|
|
125
|
+
## Configuration
|
|
126
|
+
|
|
127
|
+
`setup(**changes)` updates the process-wide immutable
|
|
128
|
+
`StartupLoadingConfig`.
|
|
129
|
+
|
|
130
|
+
| Option | Default | Description |
|
|
131
|
+
| --- | ---: | --- |
|
|
132
|
+
| `enabled` | `True` | Enable index injection. |
|
|
133
|
+
| `aria_label` | `"Loading"` | Accessible status label. |
|
|
134
|
+
| `z_index` | `9999` | Overlay stacking order. |
|
|
135
|
+
| `loader_color` | `#1677ff` | Loader color in light mode. |
|
|
136
|
+
| `loader_dark_color` | `#1668dc` | Loader color in dark mode. |
|
|
137
|
+
| `loader_text_color` | `rgba(0,0,0,0.88)` | Text color for `text-*` Loading UI loaders in light mode. |
|
|
138
|
+
| `loader_dark_text_color` | `rgba(255,255,255,0.85)` | Text color for `text-*` Loading UI loaders in dark mode. |
|
|
139
|
+
| `loader` | `"default"` | Loading UI's `ring` animation. |
|
|
140
|
+
| `loader_text` | `"Loading"` | Text rendered by `text-*` Loading UI loaders. |
|
|
141
|
+
| `loader_size` | `64` | Target loader width and height. Loading UI uses its `ring` default of 4rem (64px); the `antd` loader uses Ant Design Spin's medium visual size of 20px. Other Loading UI loaders scale proportionally from their bundled default geometry. `None` uses the 64px baseline. |
|
|
142
|
+
| `loader_stroke_width` | `2` | Loading UI border and SVG stroke width, generated from its 2px default at the 64px ring baseline. |
|
|
143
|
+
| `custom_loader_html` | `None` | Trusted HTML replacing the default spinner. |
|
|
144
|
+
|
|
145
|
+
`custom_loader_html` is inserted verbatim and must never contain untrusted
|
|
146
|
+
user input.
|
|
147
|
+
|
|
148
|
+
The default loader uses Loading UI's `ring` animation. To use Ant Design's
|
|
149
|
+
four-dot loader, configure it explicitly:
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
setup(loader="antd")
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The overlay background follows the application's `html.dark` class and `--layout-bg` CSS variable, with `#f5f5f5` and `#111825` fallbacks. The plugin does not inspect ConfigProvider tokens. Explicit color options always take precedence. Use `loader_size`, `loader_color`, `loader_dark_color`, `loader_text_color`, and `loader_dark_text_color` to match a customized theme. Use `loader_text` to replace the default text in `text-*` loaders:
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
setup(loader="text-shimmer", loader_text="Preparing dashboard")
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Loader gallery
|
|
162
|
+
|
|
163
|
+
The effective default depends on the component bundle:
|
|
164
|
+
|
|
165
|
+
| Application | Default loader | Notes |
|
|
166
|
+
| --- | --- | --- |
|
|
167
|
+
| Native Dash components | `ring` | Loading UI renderer. |
|
|
168
|
+
| `dash-antd-components` | `antd` | Ant Design's four-dot spinner. |
|
|
169
|
+
| Any app with an explicit `setup(loader=...)` | The selected loader | Explicit configuration always wins. |
|
|
170
|
+
|
|
171
|
+
All Loading UI loaders are bundled separately and loaded only when selected.
|
|
172
|
+
The preview images below link to the official interactive demos. Open a preview
|
|
173
|
+
to see its live animation and source details. The `text-*` loaders accept
|
|
174
|
+
custom text through `loader_text`; `loader_color`, `loader_dark_color`,
|
|
175
|
+
`loader_size`, and `loader_stroke_width` apply where supported.
|
|
176
|
+
|
|
177
|
+
| Preview | Preview | Preview |
|
|
178
|
+
| --- | --- | --- |
|
|
179
|
+
| [](https://loading-ui.com/docs/components/accordion-loader)<br>`accordion-loader` | [](https://loading-ui.com/docs/components/analyzing-image)<br>`analyzing-image` | [](https://loading-ui.com/docs/components/arc)<br>`arc` |
|
|
180
|
+
| [](https://loading-ui.com/docs/components/bars)<br>`bars` | [](https://loading-ui.com/docs/components/bobbing-dots)<br>`bobbing-dots` | [](https://loading-ui.com/docs/components/bouncing-dots)<br>`bouncing-dots` |
|
|
181
|
+
| [](https://loading-ui.com/docs/components/classic)<br>`classic` | [](https://loading-ui.com/docs/components/clock-ring)<br>`clock-ring` | [](https://loading-ui.com/docs/components/comet-spinner)<br>`comet-spinner` |
|
|
182
|
+
| [](https://loading-ui.com/docs/components/concentric-ring)<br>`concentric-ring` | [](https://loading-ui.com/docs/components/conveyor-loop)<br>`conveyor-loop` | [](https://loading-ui.com/docs/components/dash-ring)<br>`dash-ring` |
|
|
183
|
+
| [](https://loading-ui.com/docs/components/diamond)<br>`diamond` | [](https://loading-ui.com/docs/components/dots)<br>`dots` | [](https://loading-ui.com/docs/components/dots-ring)<br>`dots-ring` |
|
|
184
|
+
| [](https://loading-ui.com/docs/components/dual-arc)<br>`dual-arc` | [](https://loading-ui.com/docs/components/fade-arc)<br>`fade-arc` | [](https://loading-ui.com/docs/components/infinity)<br>`infinity` |
|
|
185
|
+
| [](https://loading-ui.com/docs/components/infinity-square-snake)<br>`infinity-square-snake` | [](https://loading-ui.com/docs/components/infinity-track)<br>`infinity-track` | [](https://loading-ui.com/docs/components/morphing-infinity)<br>`morphing-infinity` |
|
|
186
|
+
| [](https://loading-ui.com/docs/components/orbit-ring)<br>`orbit-ring` | [](https://loading-ui.com/docs/components/pulsating-dots)<br>`pulsating-dots` | [](https://loading-ui.com/docs/components/pulse)<br>`pulse` |
|
|
187
|
+
| [](https://loading-ui.com/docs/components/pulse-dot)<br>`pulse-dot` | [](https://loading-ui.com/docs/components/quarter-ring)<br>`quarter-ring` | [](https://loading-ui.com/docs/components/ring)<br>`ring` |
|
|
188
|
+
| [](https://loading-ui.com/docs/components/ripple)<br>`ripple` | [](https://loading-ui.com/docs/components/satellite-ring)<br>`satellite-ring` | [](https://loading-ui.com/docs/components/skeleton)<br>`skeleton` |
|
|
189
|
+
| [](https://loading-ui.com/docs/components/spiral)<br>`spiral` | [](https://loading-ui.com/docs/components/spokes)<br>`spokes` | [](https://loading-ui.com/docs/components/square-accordion)<br>`square-accordion` |
|
|
190
|
+
| [](https://loading-ui.com/docs/components/square-grid)<br>`square-grid` | [](https://loading-ui.com/docs/components/square-snake)<br>`square-snake` | [](https://loading-ui.com/docs/components/swirling)<br>`swirling` |
|
|
191
|
+
| [](https://loading-ui.com/docs/components/symmetric-wave)<br>`symmetric-wave` | [](https://loading-ui.com/docs/components/terminal)<br>`terminal` | [](https://loading-ui.com/docs/components/text-blink)<br>`text-blink` |
|
|
192
|
+
| [](https://loading-ui.com/docs/components/text-dots)<br>`text-dots` | [](https://loading-ui.com/docs/components/text-shimmer)<br>`text-shimmer` | [](https://loading-ui.com/docs/components/text-shimmer-wave)<br>`text-shimmer-wave` |
|
|
193
|
+
| [](https://loading-ui.com/docs/components/triple-dot-spinner)<br>`triple-dot-spinner` | [](https://loading-ui.com/docs/components/twin-orbit)<br>`twin-orbit` | [](https://loading-ui.com/docs/components/typing)<br>`typing` |
|
|
194
|
+
| [](https://loading-ui.com/docs/components/wandering-eyes)<br>`wandering-eyes` | [](https://loading-ui.com/docs/components/wave)<br>`wave` | [Default: ring](https://loading-ui.com/docs/components/ring)<br>`default` |
|
|
195
|
+
| [Ant Design Spin](https://ant.design/components/spin)<br>`antd` | | |
|
|
196
|
+
|
|
197
|
+
The bundled [Loading UI](https://loading-ui.com/) collection supports all 47 loader names in the current upstream catalog:
|
|
198
|
+
|
|
199
|
+
```text
|
|
200
|
+
accordion-loader, analyzing-image, arc, bars, bobbing-dots, bouncing-dots, classic, clock-ring, comet-spinner, concentric-ring, conveyor-loop, dash-ring, diamond, dots, dots-ring, dual-arc, fade-arc, infinity, infinity-square-snake, infinity-track, morphing-infinity, orbit-ring, pulsating-dots, pulse, pulse-dot, quarter-ring, ring, ripple, satellite-ring, skeleton, spiral, spokes, square-accordion, square-grid, square-snake, swirling, symmetric-wave, terminal, text-blink, text-dots, text-shimmer, text-shimmer-wave, triple-dot-spinner, twin-orbit, typing, wandering-eyes, wave
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
For example:
|
|
204
|
+
|
|
205
|
+
```python
|
|
206
|
+
setup(loader="spiral", loader_color="#e91e63", loader_dark_color="#ff80ab")
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The default loader, `ring`, and other Loading UI loaders use a bundled, isolated renderer loaded before Dash starts. Each loader ships as its own bundle, and the index only references the selected one at `<requests_pathname_prefix>_dash-startup-loading/<loader>.js`. That keeps the HTML document small and lets the browser cache the renderer, so the choice of loader does not grow the first-screen payload. No other indicator is shown while that renderer starts. Loading UI loaders sit in a centered 4:3 region that uses full width below 640px, half width from 640px, one-third from 768px, and one-quarter from 1024px. Each loader keeps the geometry from its official demo: square icons use their documented `size-*`, rectangular loaders keep their documented aspect ratio, and character-grid loaders derive intrinsic `ch`/`em` dimensions from their default props. Text loaders fit their text.
|
|
210
|
+
|
|
211
|
+
## Python API
|
|
212
|
+
|
|
213
|
+
```python
|
|
214
|
+
from dash_startup_loading_plugin import (
|
|
215
|
+
StartupLoadingConfig,
|
|
216
|
+
setup,
|
|
217
|
+
get_config,
|
|
218
|
+
reset_config,
|
|
219
|
+
)
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Notes
|
|
223
|
+
|
|
224
|
+
- Dash's hook and plugin configuration is process-wide. Use one configuration
|
|
225
|
+
per process.
|
|
226
|
+
- Readiness gates apply only to startup. Later callbacks do not recreate the overlay.
|
|
227
|
+
- The overlay markup and its small startup runtime are inlined, so strict Content
|
|
228
|
+
Security Policy deployments must allow the injected style and script. The
|
|
229
|
+
Loading UI renderer is served from a plugin route instead of being inlined.
|
|
230
|
+
- The overlay is only for initial application startup. Use `dcc.Loading` or
|
|
231
|
+
another callback-specific pattern for later callback execution.
|
|
232
|
+
|
|
233
|
+
## License
|
|
234
|
+
|
|
235
|
+
This project is distributed under the MIT License.
|
|
236
|
+
|
|
237
|
+
MIT
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dash-startup-loading-plugin"
|
|
7
|
+
version = "2.0.0"
|
|
8
|
+
description = "A configurable full-screen startup loading overlay for Dash apps, packaged as a Dash Hooks plugin."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
authors = [{ name = "Ethan Zhang", email = "ethan.zhang2016@gmail.com" }]
|
|
12
|
+
keywords = ["dash", "plotly", "loading", "plugin"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Framework :: Dash",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
17
|
+
"Programming Language :: Python :: 3.9",
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13",
|
|
22
|
+
]
|
|
23
|
+
license = "MIT"
|
|
24
|
+
license-files = ["LICENSE"]
|
|
25
|
+
dependencies = ["dash>=3.0.3", "typing-extensions>=4.11"]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
"Homepage" = "https://github.com/c0debeez/dash-startup-loading-plugin"
|
|
29
|
+
"Bug Reports" = "https://github.com/c0debeez/dash-startup-loading-plugin/issues"
|
|
30
|
+
"Source" = "https://github.com/c0debeez/dash-startup-loading-plugin"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
[dependency-groups]
|
|
34
|
+
test = ["pytest>=8"]
|
|
35
|
+
|
|
36
|
+
[project.entry-points."dash_hooks"]
|
|
37
|
+
dash_startup_loading_plugin = "dash_startup_loading_plugin"
|
|
38
|
+
|
|
39
|
+
[tool.setuptools]
|
|
40
|
+
package-dir = { "" = "src" }
|
|
41
|
+
include-package-data = true
|
|
42
|
+
|
|
43
|
+
[tool.setuptools.packages.find]
|
|
44
|
+
where = ["src"]
|
|
45
|
+
|
|
46
|
+
[tool.setuptools.package-data]
|
|
47
|
+
dash_startup_loading_plugin = [
|
|
48
|
+
"resources/startup-loading.js",
|
|
49
|
+
"resources/loading-ui/*.js",
|
|
50
|
+
"py.typed",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[tool.pytest.ini_options]
|
|
54
|
+
addopts = "-q -p no:cacheprovider"
|
|
55
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Full-screen startup loading overlay for Dash applications."""
|
|
2
|
+
|
|
3
|
+
from .plugin import (
|
|
4
|
+
StartupLoadingConfig,
|
|
5
|
+
__version__,
|
|
6
|
+
get_config,
|
|
7
|
+
reset_config,
|
|
8
|
+
setup,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"StartupLoadingConfig",
|
|
13
|
+
"__version__",
|
|
14
|
+
"get_config",
|
|
15
|
+
"reset_config",
|
|
16
|
+
"setup",
|
|
17
|
+
]
|