streamlit-nightly 1.38.1.dev20240909__py2.py3-none-any.whl → 1.38.1.dev20240911__py2.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.
- streamlit/__init__.py +1 -1
- streamlit/cli_util.py +59 -0
- streamlit/commands/experimental_query_params.py +33 -10
- streamlit/commands/page_config.py +6 -3
- streamlit/components/v1/custom_component.py +3 -5
- streamlit/config_option.py +3 -3
- streamlit/delta_generator.py +1 -1
- streamlit/elements/arrow.py +1 -1
- streamlit/elements/form.py +1 -1
- streamlit/elements/lib/built_in_chart_utils.py +1 -2
- streamlit/{color_util.py → elements/lib/color_util.py} +8 -20
- streamlit/elements/lib/options_selector_utils.py +191 -4
- streamlit/elements/lib/policies.py +1 -6
- streamlit/elements/lib/utils.py +11 -168
- streamlit/elements/map.py +6 -1
- streamlit/elements/plotly_chart.py +1 -1
- streamlit/elements/vega_charts.py +2 -2
- streamlit/elements/widgets/button.py +7 -5
- streamlit/elements/widgets/button_group.py +8 -8
- streamlit/elements/widgets/camera_input.py +1 -1
- streamlit/elements/widgets/chat.py +7 -5
- streamlit/elements/widgets/checkbox.py +1 -1
- streamlit/elements/widgets/color_picker.py +1 -1
- streamlit/elements/widgets/data_editor.py +1 -1
- streamlit/elements/widgets/file_uploader.py +1 -1
- streamlit/elements/widgets/multiselect.py +3 -5
- streamlit/elements/widgets/number_input.py +2 -2
- streamlit/elements/widgets/radio.py +3 -6
- streamlit/elements/widgets/select_slider.py +7 -5
- streamlit/elements/widgets/selectbox.py +3 -6
- streamlit/elements/widgets/slider.py +2 -2
- streamlit/elements/widgets/text_widgets.py +1 -1
- streamlit/elements/widgets/time_widgets.py +1 -1
- streamlit/errors.py +22 -0
- streamlit/file_util.py +4 -4
- streamlit/net_util.py +4 -2
- streamlit/runtime/app_session.py +1 -1
- streamlit/runtime/caching/cache_utils.py +5 -1
- streamlit/runtime/caching/storage/local_disk_cache_storage.py +2 -2
- streamlit/runtime/state/__init__.py +1 -5
- streamlit/runtime/state/common.py +1 -14
- streamlit/runtime/state/query_params.py +9 -2
- streamlit/runtime/state/widgets.py +0 -9
- streamlit/static/asset-manifest.json +20 -20
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/1260.4017a70f.chunk.js +5 -0
- streamlit/static/static/js/2266.f3886a78.chunk.js +2 -0
- streamlit/static/static/js/{245.532167ed.chunk.js → 245.68a062da.chunk.js} +1 -1
- streamlit/static/static/js/{3156.0542d233.chunk.js → 3156.002c6ee0.chunk.js} +1 -1
- streamlit/static/static/js/3560.ce031236.chunk.js +1 -0
- streamlit/static/static/js/{4103.2a961369.chunk.js → 4103.d863052a.chunk.js} +1 -1
- streamlit/static/static/js/{5180.5e064ef1.chunk.js → 5180.e826dd46.chunk.js} +1 -1
- streamlit/static/static/js/5618.08be9e66.chunk.js +5 -0
- streamlit/static/static/js/{5625.0394ecdc.chunk.js → 5625.3a8dc81f.chunk.js} +1 -1
- streamlit/static/static/js/{5711.28939a95.chunk.js → 5711.3d376a33.chunk.js} +1 -1
- streamlit/static/static/js/6088.c137d543.chunk.js +1 -0
- streamlit/static/static/js/{6360.17e58a87.chunk.js → 6360.6d7cfa35.chunk.js} +1 -1
- streamlit/static/static/js/{7193.bc9bdd04.chunk.js → 7193.2594a18c.chunk.js} +1 -1
- streamlit/static/static/js/8166.11abccb8.chunk.js +1 -0
- streamlit/static/static/js/{8237.ed5d881b.chunk.js → 8237.210a5ac4.chunk.js} +1 -1
- streamlit/static/static/js/8815.0284d089.chunk.js +1 -0
- streamlit/static/static/js/9114.1ee3d4dd.chunk.js +1 -0
- streamlit/static/static/js/954.3cc76210.chunk.js +5 -0
- streamlit/static/static/js/{main.5d1dd93c.js → main.e270cec5.js} +2 -2
- streamlit/string_util.py +13 -5
- streamlit/time_util.py +3 -14
- streamlit/util.py +1 -127
- streamlit/watcher/local_sources_watcher.py +1 -1
- streamlit/web/bootstrap.py +2 -2
- streamlit/web/cli.py +2 -2
- {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/RECORD +82 -85
- streamlit/case_converters.py +0 -91
- streamlit/code_util.py +0 -90
- streamlit/constants.py +0 -19
- streamlit/static/static/js/1260.5ebd5704.chunk.js +0 -5
- streamlit/static/static/js/2266.48d2ebd0.chunk.js +0 -2
- streamlit/static/static/js/3560.17463b1c.chunk.js +0 -1
- streamlit/static/static/js/5618.6d42e995.chunk.js +0 -5
- streamlit/static/static/js/6088.00849717.chunk.js +0 -1
- streamlit/static/static/js/8166.0d1971ea.chunk.js +0 -1
- streamlit/static/static/js/8815.0b7dc879.chunk.js +0 -1
- streamlit/static/static/js/9114.c676bef4.chunk.js +0 -1
- streamlit/static/static/js/954.bf90fe19.chunk.js +0 -5
- /streamlit/{echo.py → commands/echo.py} +0 -0
- /streamlit/elements/{form_utils.py → lib/form_utils.py} +0 -0
- /streamlit/{js_number.py → elements/lib/js_number.py} +0 -0
- /streamlit/static/static/js/{2266.48d2ebd0.chunk.js.LICENSE.txt → 2266.f3886a78.chunk.js.LICENSE.txt} +0 -0
- /streamlit/static/static/js/{main.5d1dd93c.js.LICENSE.txt → main.e270cec5.js.LICENSE.txt} +0 -0
- /streamlit/{folder_black_list.py → watcher/folder_black_list.py} +0 -0
- {streamlit_nightly-1.38.1.dev20240909.data → streamlit_nightly-1.38.1.dev20240911.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.38.1.dev20240909.dist-info → streamlit_nightly-1.38.1.dev20240911.dist-info}/top_level.txt +0 -0
streamlit/file_util.py
CHANGED
@@ -20,7 +20,7 @@ import io
|
|
20
20
|
import os
|
21
21
|
from pathlib import Path
|
22
22
|
|
23
|
-
from streamlit import env_util,
|
23
|
+
from streamlit import env_util, errors
|
24
24
|
from streamlit.string_util import is_binary_string
|
25
25
|
|
26
26
|
# Configuration and credentials are stored inside the ~/.streamlit folder
|
@@ -77,7 +77,7 @@ def streamlit_read(path, binary=False):
|
|
77
77
|
"""
|
78
78
|
filename = get_streamlit_file_path(path)
|
79
79
|
if os.stat(filename).st_size == 0:
|
80
|
-
raise
|
80
|
+
raise errors.Error(f'Read zero byte file: "{filename}"')
|
81
81
|
|
82
82
|
mode = "r"
|
83
83
|
if binary:
|
@@ -109,13 +109,13 @@ def streamlit_write(path, binary=False):
|
|
109
109
|
with open(path, mode) as handle:
|
110
110
|
yield handle
|
111
111
|
except OSError as e:
|
112
|
-
msg = ["Unable to write file:
|
112
|
+
msg = [f"Unable to write file: {os.path.abspath(path)}"]
|
113
113
|
if e.errno == errno.EINVAL and env_util.IS_DARWIN:
|
114
114
|
msg.append(
|
115
115
|
"Python is limited to files below 2GB on OSX. "
|
116
116
|
"See https://bugs.python.org/issue24658"
|
117
117
|
)
|
118
|
-
raise
|
118
|
+
raise errors.Error("\n".join(msg))
|
119
119
|
|
120
120
|
|
121
121
|
def get_static_dir() -> str:
|
streamlit/net_util.py
CHANGED
@@ -16,7 +16,6 @@ from __future__ import annotations
|
|
16
16
|
|
17
17
|
from typing import Final
|
18
18
|
|
19
|
-
from streamlit import util
|
20
19
|
from streamlit.logger import get_logger
|
21
20
|
|
22
21
|
_LOGGER: Final = get_logger(__name__)
|
@@ -25,6 +24,9 @@ _LOGGER: Final = get_logger(__name__)
|
|
25
24
|
_AWS_CHECK_IP: Final = "http://checkip.amazonaws.com"
|
26
25
|
_AWS_CHECK_IP_HTTPS: Final = "https://checkip.amazonaws.com"
|
27
26
|
|
27
|
+
# URL of Streamlit's help page.
|
28
|
+
_HELP_DOC: Final = "https://docs.streamlit.io/"
|
29
|
+
|
28
30
|
_external_ip: str | None = None
|
29
31
|
_internal_ip: str | None = None
|
30
32
|
|
@@ -53,7 +55,7 @@ def get_external_ip() -> str | None:
|
|
53
55
|
else:
|
54
56
|
_LOGGER.warning(
|
55
57
|
"Did not auto detect external IP.\nPlease go to %s for debugging hints.",
|
56
|
-
|
58
|
+
_HELP_DOC,
|
57
59
|
)
|
58
60
|
_external_ip = None
|
59
61
|
|
streamlit/runtime/app_session.py
CHANGED
@@ -22,7 +22,6 @@ from typing import TYPE_CHECKING, Callable, Final
|
|
22
22
|
|
23
23
|
import streamlit.elements.exception as exception_utils
|
24
24
|
from streamlit import config, runtime
|
25
|
-
from streamlit.case_converters import to_snake_case
|
26
25
|
from streamlit.logger import get_logger
|
27
26
|
from streamlit.proto.ClientState_pb2 import ClientState
|
28
27
|
from streamlit.proto.Common_pb2 import FileURLs, FileURLsRequest
|
@@ -41,6 +40,7 @@ from streamlit.runtime.metrics_util import Installation
|
|
41
40
|
from streamlit.runtime.pages_manager import PagesManager
|
42
41
|
from streamlit.runtime.scriptrunner import RerunData, ScriptRunner, ScriptRunnerEvent
|
43
42
|
from streamlit.runtime.secrets import secrets_singleton
|
43
|
+
from streamlit.string_util import to_snake_case
|
44
44
|
from streamlit.version import STREAMLIT_VERSION_STRING
|
45
45
|
from streamlit.watcher import LocalSourcesWatcher
|
46
46
|
|
@@ -276,10 +276,14 @@ class CachedFunc:
|
|
276
276
|
# We've acquired the lock - but another thread may have acquired it first
|
277
277
|
# and already computed the value. So we need to test for a cache hit again,
|
278
278
|
# before computing.
|
279
|
-
|
279
|
+
try:
|
280
280
|
cached_result = cache.read_result(value_key)
|
281
281
|
# Another thread computed the value before us. Early exit!
|
282
282
|
return self._handle_cache_hit(cached_result)
|
283
|
+
except CacheKeyNotFoundError:
|
284
|
+
# No cache hit -> we will call the cached function
|
285
|
+
# below.
|
286
|
+
pass
|
283
287
|
|
284
288
|
# We acquired the lock before any other thread. Compute the value!
|
285
289
|
with self._info.cached_message_replay_ctx.calling_cached_function(
|
@@ -63,7 +63,7 @@ import os
|
|
63
63
|
import shutil
|
64
64
|
from typing import Final
|
65
65
|
|
66
|
-
from streamlit import
|
66
|
+
from streamlit import errors
|
67
67
|
from streamlit.file_util import get_streamlit_file_path, streamlit_read, streamlit_write
|
68
68
|
from streamlit.logger import get_logger
|
69
69
|
from streamlit.runtime.caching.storage.cache_storage_protocol import (
|
@@ -164,7 +164,7 @@ class LocalDiskCacheStorage(CacheStorage):
|
|
164
164
|
try:
|
165
165
|
with streamlit_write(path, binary=True) as output:
|
166
166
|
output.write(value)
|
167
|
-
except
|
167
|
+
except errors.Error as e:
|
168
168
|
_LOGGER.debug(e)
|
169
169
|
# Clean up file so we don't leave zero byte files.
|
170
170
|
try:
|
@@ -24,10 +24,7 @@ from streamlit.runtime.state.session_state_proxy import (
|
|
24
24
|
SessionStateProxy,
|
25
25
|
get_session_state,
|
26
26
|
)
|
27
|
-
from streamlit.runtime.state.widgets import
|
28
|
-
NoValue,
|
29
|
-
register_widget,
|
30
|
-
)
|
27
|
+
from streamlit.runtime.state.widgets import register_widget
|
31
28
|
|
32
29
|
__all__ = [
|
33
30
|
"WidgetArgs",
|
@@ -40,6 +37,5 @@ __all__ = [
|
|
40
37
|
"SessionStateStatProvider",
|
41
38
|
"SessionStateProxy",
|
42
39
|
"get_session_state",
|
43
|
-
"NoValue",
|
44
40
|
"register_widget",
|
45
41
|
]
|
@@ -18,7 +18,6 @@ from __future__ import annotations
|
|
18
18
|
|
19
19
|
from dataclasses import dataclass, field
|
20
20
|
from typing import (
|
21
|
-
TYPE_CHECKING,
|
22
21
|
Any,
|
23
22
|
Callable,
|
24
23
|
Dict,
|
@@ -34,7 +33,7 @@ from typing import (
|
|
34
33
|
|
35
34
|
from typing_extensions import TypeAlias, TypeGuard
|
36
35
|
|
37
|
-
from streamlit import
|
36
|
+
from streamlit import util
|
38
37
|
from streamlit.errors import (
|
39
38
|
StreamlitAPIException,
|
40
39
|
)
|
@@ -60,10 +59,6 @@ from streamlit.proto.TextArea_pb2 import TextArea
|
|
60
59
|
from streamlit.proto.TextInput_pb2 import TextInput
|
61
60
|
from streamlit.proto.TimeInput_pb2 import TimeInput
|
62
61
|
|
63
|
-
if TYPE_CHECKING:
|
64
|
-
from streamlit.runtime.scriptrunner_utils.script_run_context import ScriptRunContext
|
65
|
-
|
66
|
-
|
67
62
|
# Protobuf types for all widgets.
|
68
63
|
WidgetProto: TypeAlias = Union[
|
69
64
|
Arrow,
|
@@ -242,11 +237,3 @@ def require_valid_user_key(key: str) -> None:
|
|
242
237
|
raise StreamlitAPIException(
|
243
238
|
f"Keys beginning with {GENERATED_ELEMENT_ID_PREFIX} are reserved."
|
244
239
|
)
|
245
|
-
|
246
|
-
|
247
|
-
def save_for_app_testing(ctx: ScriptRunContext, k: str, v: Any):
|
248
|
-
if config.get_option("global.appTest"):
|
249
|
-
try:
|
250
|
-
ctx.session_state[TESTING_KEY][k] = v
|
251
|
-
except KeyError:
|
252
|
-
ctx.session_state[TESTING_KEY] = {k: v}
|
@@ -15,10 +15,9 @@
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
17
|
from dataclasses import dataclass, field
|
18
|
-
from typing import TYPE_CHECKING, Iterable, Iterator, MutableMapping
|
18
|
+
from typing import TYPE_CHECKING, Final, Iterable, Iterator, MutableMapping
|
19
19
|
from urllib import parse
|
20
20
|
|
21
|
-
from streamlit.constants import EMBED_QUERY_PARAMS_KEYS
|
22
21
|
from streamlit.errors import StreamlitAPIException
|
23
22
|
from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
|
24
23
|
from streamlit.runtime.scriptrunner_utils.script_run_context import get_script_run_ctx
|
@@ -27,6 +26,14 @@ if TYPE_CHECKING:
|
|
27
26
|
from _typeshed import SupportsKeysAndGetItem
|
28
27
|
|
29
28
|
|
29
|
+
EMBED_QUERY_PARAM: Final[str] = "embed"
|
30
|
+
EMBED_OPTIONS_QUERY_PARAM: Final[str] = "embed_options"
|
31
|
+
EMBED_QUERY_PARAMS_KEYS: Final[list[str]] = [
|
32
|
+
EMBED_QUERY_PARAM,
|
33
|
+
EMBED_OPTIONS_QUERY_PARAM,
|
34
|
+
]
|
35
|
+
|
36
|
+
|
30
37
|
@dataclass
|
31
38
|
class QueryParams(MutableMapping[str, str]):
|
32
39
|
"""A lightweight wrapper of a dict that sends forwardMsgs when state changes.
|
@@ -75,15 +75,6 @@ ELEMENT_TYPE_TO_VALUE_TYPE: Final[Mapping[ElementType, ValueFieldName]] = (
|
|
75
75
|
)
|
76
76
|
|
77
77
|
|
78
|
-
class NoValue:
|
79
|
-
"""Return this from DeltaGenerator.foo_widget() when you want the st.foo_widget()
|
80
|
-
call to return None. This is needed because `DeltaGenerator._enqueue`
|
81
|
-
replaces `None` with a `DeltaGenerator` (for use in non-widget elements).
|
82
|
-
"""
|
83
|
-
|
84
|
-
pass
|
85
|
-
|
86
|
-
|
87
78
|
def register_widget(
|
88
79
|
element_type: ElementType,
|
89
80
|
element_proto: WidgetProto,
|
@@ -1,15 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"files": {
|
3
3
|
"main.css": "./static/css/main.5513bd04.css",
|
4
|
-
"main.js": "./static/js/main.
|
4
|
+
"main.js": "./static/js/main.e270cec5.js",
|
5
5
|
"static/js/6679.265ca09c.chunk.js": "./static/js/6679.265ca09c.chunk.js",
|
6
6
|
"static/js/9464.7e9a3c0a.chunk.js": "./static/js/9464.7e9a3c0a.chunk.js",
|
7
7
|
"static/js/9077.e0a8db2a.chunk.js": "./static/js/9077.e0a8db2a.chunk.js",
|
8
8
|
"static/js/3391.663b9d47.chunk.js": "./static/js/3391.663b9d47.chunk.js",
|
9
9
|
"static/css/3156.93909c7e.chunk.css": "./static/css/3156.93909c7e.chunk.css",
|
10
|
-
"static/js/3156.
|
10
|
+
"static/js/3156.002c6ee0.chunk.js": "./static/js/3156.002c6ee0.chunk.js",
|
11
11
|
"static/css/5711.c24b25fa.chunk.css": "./static/css/5711.c24b25fa.chunk.css",
|
12
|
-
"static/js/5711.
|
12
|
+
"static/js/5711.3d376a33.chunk.js": "./static/js/5711.3d376a33.chunk.js",
|
13
13
|
"static/js/3861.0dedcd19.chunk.js": "./static/js/3861.0dedcd19.chunk.js",
|
14
14
|
"static/js/8642.dfef7dcb.chunk.js": "./static/js/8642.dfef7dcb.chunk.js",
|
15
15
|
"static/js/7493.95e79b96.chunk.js": "./static/js/7493.95e79b96.chunk.js",
|
@@ -18,28 +18,28 @@
|
|
18
18
|
"static/js/9923.7061d124.chunk.js": "./static/js/9923.7061d124.chunk.js",
|
19
19
|
"static/js/583.61ac7fde.chunk.js": "./static/js/583.61ac7fde.chunk.js",
|
20
20
|
"static/js/4827.f9cb5fa3.chunk.js": "./static/js/4827.f9cb5fa3.chunk.js",
|
21
|
-
"static/js/8237.
|
21
|
+
"static/js/8237.210a5ac4.chunk.js": "./static/js/8237.210a5ac4.chunk.js",
|
22
22
|
"static/js/5828.f8572ba4.chunk.js": "./static/js/5828.f8572ba4.chunk.js",
|
23
23
|
"static/js/9060.1ec8dc2b.chunk.js": "./static/js/9060.1ec8dc2b.chunk.js",
|
24
|
-
"static/js/5625.
|
24
|
+
"static/js/5625.3a8dc81f.chunk.js": "./static/js/5625.3a8dc81f.chunk.js",
|
25
25
|
"static/js/6141.43a8fda3.chunk.js": "./static/js/6141.43a8fda3.chunk.js",
|
26
|
-
"static/js/4103.
|
26
|
+
"static/js/4103.d863052a.chunk.js": "./static/js/4103.d863052a.chunk.js",
|
27
27
|
"static/js/1086.1bb52316.chunk.js": "./static/js/1086.1bb52316.chunk.js",
|
28
|
-
"static/js/245.
|
29
|
-
"static/js/7193.
|
30
|
-
"static/js/6360.
|
28
|
+
"static/js/245.68a062da.chunk.js": "./static/js/245.68a062da.chunk.js",
|
29
|
+
"static/js/7193.2594a18c.chunk.js": "./static/js/7193.2594a18c.chunk.js",
|
30
|
+
"static/js/6360.6d7cfa35.chunk.js": "./static/js/6360.6d7cfa35.chunk.js",
|
31
31
|
"static/js/8790.0b98f286.chunk.js": "./static/js/8790.0b98f286.chunk.js",
|
32
|
-
"static/js/8815.
|
32
|
+
"static/js/8815.0284d089.chunk.js": "./static/js/8815.0284d089.chunk.js",
|
33
33
|
"static/js/9528.746f7a0e.chunk.js": "./static/js/9528.746f7a0e.chunk.js",
|
34
34
|
"static/js/7809.063e3004.chunk.js": "./static/js/7809.063e3004.chunk.js",
|
35
|
-
"static/js/6088.
|
36
|
-
"static/js/8166.
|
37
|
-
"static/js/9114.
|
38
|
-
"static/js/5180.
|
39
|
-
"static/js/5618.
|
40
|
-
"static/js/1260.
|
41
|
-
"static/js/3560.
|
42
|
-
"static/js/954.
|
35
|
+
"static/js/6088.c137d543.chunk.js": "./static/js/6088.c137d543.chunk.js",
|
36
|
+
"static/js/8166.11abccb8.chunk.js": "./static/js/8166.11abccb8.chunk.js",
|
37
|
+
"static/js/9114.1ee3d4dd.chunk.js": "./static/js/9114.1ee3d4dd.chunk.js",
|
38
|
+
"static/js/5180.e826dd46.chunk.js": "./static/js/5180.e826dd46.chunk.js",
|
39
|
+
"static/js/5618.08be9e66.chunk.js": "./static/js/5618.08be9e66.chunk.js",
|
40
|
+
"static/js/1260.4017a70f.chunk.js": "./static/js/1260.4017a70f.chunk.js",
|
41
|
+
"static/js/3560.ce031236.chunk.js": "./static/js/3560.ce031236.chunk.js",
|
42
|
+
"static/js/954.3cc76210.chunk.js": "./static/js/954.3cc76210.chunk.js",
|
43
43
|
"static/js/3966.e0686958.chunk.js": "./static/js/3966.e0686958.chunk.js",
|
44
44
|
"static/js/8161.9b75f98a.chunk.js": "./static/js/8161.9b75f98a.chunk.js",
|
45
45
|
"static/js/6817.6adfea98.chunk.js": "./static/js/6817.6adfea98.chunk.js",
|
@@ -53,7 +53,7 @@
|
|
53
53
|
"static/js/5544.2769497c.chunk.js": "./static/js/5544.2769497c.chunk.js",
|
54
54
|
"static/css/7077.81b3d18f.chunk.css": "./static/css/7077.81b3d18f.chunk.css",
|
55
55
|
"static/js/7077.e21833ae.chunk.js": "./static/js/7077.e21833ae.chunk.js",
|
56
|
-
"static/js/2266.
|
56
|
+
"static/js/2266.f3886a78.chunk.js": "./static/js/2266.f3886a78.chunk.js",
|
57
57
|
"static/js/3389.71902a75.chunk.js": "./static/js/3389.71902a75.chunk.js",
|
58
58
|
"static/js/4297.3afbdd03.chunk.js": "./static/js/4297.3afbdd03.chunk.js",
|
59
59
|
"static/js/4942.e4db7877.chunk.js": "./static/js/4942.e4db7877.chunk.js",
|
@@ -153,6 +153,6 @@
|
|
153
153
|
},
|
154
154
|
"entrypoints": [
|
155
155
|
"static/css/main.5513bd04.css",
|
156
|
-
"static/js/main.
|
156
|
+
"static/js/main.e270cec5.js"
|
157
157
|
]
|
158
158
|
}
|
streamlit/static/index.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.e270cec5.js"></script><link href="./static/css/main.5513bd04.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1260],{68035:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});r(58878);var n=r(25571),o=r(78286),i=r(89653);const s=r(60667).i7`
|
2
|
+
50% {
|
3
|
+
color: rgba(0, 0, 0, 0);
|
4
|
+
}
|
5
|
+
`,a=(0,i.A)("span",{target:"edlqvik0"})((t=>{let{includeDot:e,shouldBlink:r,theme:n}=t;return{...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${s}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(90782);const u=t=>{let{dirty:e,value:r,maxLength:i,className:s,type:u="single",inForm:c}=t;const d=[],p=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.push((0,l.jsx)(a,{includeDot:d.length>0,shouldBlink:e,children:t},d.length))};if(e){const t=c?"submit form":"apply";if("multiline"===u){p(`Press ${(0,n.u_)()?"\u2318":"Ctrl"}+Enter to ${t}`)}else"single"===u&&p(`Press Enter to ${t}`)}return i&&("chat"!==u||e)&&p(`${r.length}/${i}`,e&&r.length>=i),(0,l.jsx)(o.tp,{"data-testid":"InputInstructions",className:s,children:d})}},34752:(t,e,r)=>{"use strict";r.d(e,{X:()=>s,o:()=>i});var n=r(58878),o=r(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,r){(0,o.se)(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,o._L)(e)&&(this.formClearListener=t.addFormClearedListener(e,r),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;null===(t=this.formClearListener)||void 0===t||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function s(t){let{element:e,widgetMgr:r,onFormCleared:i}=t;(0,n.useEffect)((()=>{if(!(0,o._L)(e.formId))return;const t=r.addFormClearedListener(e.formId,i);return()=>{t.disconnect()}}),[e,r,i])}},81260:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(58878),o=r(32698),i=r.n(o),s=r(59095),a=r(8151),l=r(29669),u=r(34752),c=r(68035),d=r(70474),p=r(78286),h=r(93480),f=r(997),m=r(25571);const y=(0,r(89653).A)("div",{target:"e11y4ecf0"})((t=>{let{width:e}=t;return{position:"relative",width:e}}),"");var b=r(90782);class g extends n.PureComponent{constructor(t){var e;super(t),e=this,this.formClearHelper=new u.o,this.id=void 0,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=function(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{widgetMgr:n,element:o,fragmentId:i}=e.props;n.setStringValue(o,e.state.value,t,i),r&&e.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((t,e)=>{var r;return{value:null!==(r=e.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=t=>{const{value:e}=t.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&e.length>n||((0,m.Ml)(this.props.element)?this.setState({dirty:!0,value:e},(()=>{this.commitWidgetValue({fromUi:!0},!1)})):this.setState({dirty:!0,value:e}))},this.onKeyPress=t=>{"Enter"===t.key&&(this.state.dirty&&this.commitWidgetValue({fromUi:!0}),(0,m.Ml)(this.props.element)&&this.props.widgetMgr.submitForm(this.props.element.formId,this.props.fragmentId))},this.id=i()("text_input_")}get initialValue(){var t;const e=this.props.widgetMgr.getStringValue(this.props.element);return null!==(t=null!==e&&void 0!==e?e:this.props.element.default)&&void 0!==t?t:null}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:t}=this.props.element;t&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:t}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==t&&void 0!==t?t:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}getTypeString(){return this.props.element.type===l.ks.Type.PASSWORD?"password":"text"}render(){var t;const{dirty:e,value:r}=this.state,{element:n,width:o,disabled:i,widgetMgr:a,theme:l}=this.props,{placeholder:u}=n;return this.formClearHelper.manageFormClearListener(a,n.formId,this.onFormCleared),(0,b.jsxs)(y,{className:"stTextInput","data-testid":"stTextInput",width:o,children:[(0,b.jsx)(d.L,{label:n.label,disabled:i,labelVisibility:(0,m.yv)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),htmlFor:this.id,children:n.help&&(0,b.jsx)(p.j,{children:(0,b.jsx)(h.A,{content:n.help,placement:f.W.TOP_RIGHT})})}),(0,b.jsx)(s.A,{value:null!==r&&void 0!==r?r:"",placeholder:u,onBlur:this.onBlur,onChange:this.onChange,onKeyPress:this.onKeyPress,"aria-label":n.label,disabled:i,id:this.id,type:this.getTypeString(),autoComplete:n.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:l.lineHeights.inputWidget,paddingRight:l.spacing.sm,paddingLeft:l.spacing.sm,paddingBottom:l.spacing.sm,paddingTop:l.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:l.sizes.minElementHeight,borderLeftWidth:l.sizes.borderWidth,borderRightWidth:l.sizes.borderWidth,borderTopWidth:l.sizes.borderWidth,borderBottomWidth:l.sizes.borderWidth}}}}),o>l.breakpoints.hideWidgetDetails&&(0,b.jsx)(c.A,{dirty:e,value:null!==r&&void 0!==r?r:"",maxLength:n.maxChars,inForm:(0,m.Ml)({formId:n.formId})})]})}}const v=(0,a.b)(g)},59095:(t,e,r)=>{"use strict";r.d(e,{A:()=>P});var n=r(58878),o=r(35331),i=r(4842),s=r(18648),a=r(81301),l=r(92850);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}var c=["Root","StartEnhancer","EndEnhancer"],d=["startEnhancer","endEnhancer","overrides"];function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p.apply(this,arguments)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(l){a=!0,o=l}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===u(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}(this,r)}}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var j=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(w,t);var e,r,u,f=g(w);function w(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,w);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return O(v(t=f.call.apply(f,[this].concat(r))),"state",{isFocused:t.props.autoFocus||!1}),O(v(t),"onFocus",(function(e){t.setState({isFocused:!0}),t.props.onFocus(e)})),O(v(t),"onBlur",(function(e){t.setState({isFocused:!1}),t.props.onBlur(e)})),t}return e=w,(r=[{key:"render",value:function(){var t=this.props,e=t.startEnhancer,r=t.endEnhancer,u=t.overrides,f=u.Root,y=u.StartEnhancer,b=u.EndEnhancer,g=m(u,c),v=m(t,d),w=h((0,o._O)(f,a.bL),2),O=w[0],j=w[1],P=h((0,o._O)(y,a.P2),2),S=P[0],E=P[1],x=h((0,o._O)(b,a.P2),2),I=x[0],W=x[1],_=(0,i.e)(this.props,this.state);return n.createElement(O,p({"data-baseweb":"input"},_,j,{$adjoined:C(e,r),$hasIconTrailing:this.props.clearable||"password"==this.props.type}),F(e)&&n.createElement(S,p({},_,E,{$position:l.vN.start}),"function"===typeof e?e(_):e),n.createElement(s.A,p({},v,{overrides:g,adjoined:C(e,r),onFocus:this.onFocus,onBlur:this.onBlur})),F(r)&&n.createElement(I,p({},_,W,{$position:l.vN.end}),"function"===typeof r?r(_):r))}}])&&y(e.prototype,r),u&&y(e,u),Object.defineProperty(e,"prototype",{writable:!1}),w}(n.Component);function C(t,e){return F(t)&&F(e)?l.fb.both:F(t)?l.fb.left:F(e)?l.fb.right:l.fb.none}function F(t){return Boolean(t||0===t)}O(j,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:l.SK.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});const P=j},32698:(t,e,r)=>{var n=r(30136),o=0;t.exports=function(t){var e=++o;return n(t)+e}}}]);
|