dara-core 1.16.9__py3-none-any.whl → 1.16.9a1__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.
@@ -213,7 +213,7 @@ else:
213
213
 
214
214
  def get_jsonable_encoder() -> Dict[Type[Any], Callable[..., Any]]:
215
215
  """
216
- Get the encoder registry as a dict of `{type: serialize}` pairs
216
+ Get the encoder registry as a dict of {type: serialize} pairs
217
217
  """
218
218
  return {k: v['serialize'] for k, v in encoder_registry.items()}
219
219
 
@@ -22547,6 +22547,62 @@ var __privateWrapper = (obj, member, setter, getter) => ({
22547
22547
  })(lodash$2, lodash$2.exports);
22548
22548
  var e$2 = "object" == typeof navigator ? navigator.platform : "";
22549
22549
  /Mac|iPod|iPhone|iPad/.test(e$2);
22550
+ function useIMEEnter({ onKeyDown: userKeyDown, onKeyUp: userKeyUp, onCompositionStart: userCompStart, onCompositionEnd: userCompEnd }) {
22551
+ const isComposingRef = React.useRef(false);
22552
+ const justEndedRef = React.useRef(false);
22553
+ const handleCompositionStart = React.useCallback((e3) => {
22554
+ isComposingRef.current = true;
22555
+ userCompStart === null || userCompStart === void 0 ? void 0 : userCompStart(e3);
22556
+ }, [userCompStart]);
22557
+ const handleCompositionEnd = React.useCallback((e3) => {
22558
+ isComposingRef.current = false;
22559
+ justEndedRef.current = true;
22560
+ userCompEnd === null || userCompEnd === void 0 ? void 0 : userCompEnd(e3);
22561
+ }, [userCompEnd]);
22562
+ const handleKeyDownCapture = React.useCallback((e3) => {
22563
+ if (isComposingRef.current) {
22564
+ e3.preventDefault();
22565
+ e3.stopPropagation();
22566
+ return;
22567
+ }
22568
+ if (justEndedRef.current) {
22569
+ if (e3.which === 229) {
22570
+ e3.preventDefault();
22571
+ e3.stopPropagation();
22572
+ return;
22573
+ }
22574
+ justEndedRef.current = false;
22575
+ }
22576
+ }, []);
22577
+ const handleKeyDown = React.useCallback((e3) => {
22578
+ if (isComposingRef.current) {
22579
+ return;
22580
+ }
22581
+ userKeyDown === null || userKeyDown === void 0 ? void 0 : userKeyDown(e3);
22582
+ }, [userKeyDown]);
22583
+ const handleKeyUpCapture = React.useCallback((e3) => {
22584
+ if (isComposingRef.current || justEndedRef.current) {
22585
+ justEndedRef.current = false;
22586
+ e3.preventDefault();
22587
+ e3.stopPropagation();
22588
+ }
22589
+ }, []);
22590
+ const handleKeyUp = React.useCallback((e3) => {
22591
+ if (isComposingRef.current || justEndedRef.current) {
22592
+ justEndedRef.current = false;
22593
+ return;
22594
+ }
22595
+ userKeyUp === null || userKeyUp === void 0 ? void 0 : userKeyUp(e3);
22596
+ }, [userKeyUp]);
22597
+ return {
22598
+ onCompositionStart: handleCompositionStart,
22599
+ onCompositionEnd: handleCompositionEnd,
22600
+ onKeyDownCapture: handleKeyDownCapture,
22601
+ onKeyDown: handleKeyDown,
22602
+ onKeyUpCapture: handleKeyUpCapture,
22603
+ onKeyUp: handleKeyUp
22604
+ };
22605
+ }
22550
22606
  globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
22551
22607
  function adopt(value) {
22552
22608
  return value instanceof P ? value : new P(function(resolve) {
@@ -34250,7 +34306,14 @@ var __privateWrapper = (obj, member, setter, getter) => ({
34250
34306
  onComplete();
34251
34307
  }
34252
34308
  };
34253
- return jsxRuntime.exports.jsxs(InputWrapper$3, { className, style, children: [jsxRuntime.exports.jsx(PrimaryInput, Object.assign({}, rest, { defaultValue: initialValue, isErrored: !!errorMsg, onChange: handleChange, onKeyDown: handleKeyDown, ref, type, min: minValue, max: maxValue })), errorMsg && jsxRuntime.exports.jsx(ErrorMessage$1, { children: errorMsg })] });
34309
+ const handlers = useIMEEnter({
34310
+ onKeyDown: handleKeyDown,
34311
+ onKeyUp: rest.onKeyUp,
34312
+ onCompositionStart: rest.onCompositionStart,
34313
+ onCompositionEnd: rest.onCompositionEnd
34314
+ });
34315
+ const spreadProps = Object.assign(Object.assign({}, rest), handlers);
34316
+ return jsxRuntime.exports.jsxs(InputWrapper$3, { className, style, children: [jsxRuntime.exports.jsx(PrimaryInput, Object.assign({}, spreadProps, { defaultValue: initialValue, isErrored: !!errorMsg, onChange: handleChange, ref, type, min: minValue, max: maxValue })), errorMsg && jsxRuntime.exports.jsx(ErrorMessage$1, { children: errorMsg })] });
34254
34317
  });
34255
34318
  Input$1.displayName = "Input";
34256
34319
  const Wrapper$7 = styled__default.default.div`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.16.9
3
+ Version: 1.16.9a1
4
4
  Summary: Dara Framework Core
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -20,14 +20,13 @@ Requires-Dist: async-asgi-testclient (>=1.4.11,<2.0.0)
20
20
  Requires-Dist: certifi (>=2024.7.4)
21
21
  Requires-Dist: click (==8.1.3)
22
22
  Requires-Dist: colorama (>=0.4.6,<0.5.0)
23
- Requires-Dist: create-dara-app (==1.16.9)
23
+ Requires-Dist: create-dara-app (==1.16.9-alpha.1)
24
24
  Requires-Dist: croniter (>=1.0.15,<3.0.0)
25
25
  Requires-Dist: cryptography (>=42.0.4)
26
- Requires-Dist: dara-components (==1.16.9) ; extra == "all"
26
+ Requires-Dist: dara-components (==1.16.9-alpha.1) ; extra == "all"
27
27
  Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0)
28
28
  Requires-Dist: fastapi (>=0.115.0,<0.116.0)
29
29
  Requires-Dist: fastapi_vite_dara (==0.4.0)
30
- Requires-Dist: h11 (>=0.16.0)
31
30
  Requires-Dist: httpx (>=0.23.0)
32
31
  Requires-Dist: jinja2 (>=2.1.1,<3.2.0)
33
32
  Requires-Dist: odfpy
@@ -53,7 +52,7 @@ Description-Content-Type: text/markdown
53
52
 
54
53
  # Dara Application Framework
55
54
 
56
- <img src="https://github.com/causalens/dara/blob/v1.16.9/img/dara_light.svg?raw=true">
55
+ <img src="https://github.com/causalens/dara/blob/v1.16.9-alpha.1/img/dara_light.svg?raw=true">
57
56
 
58
57
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
59
58
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -98,7 +97,7 @@ source .venv/bin/activate
98
97
  dara start
99
98
  ```
100
99
 
101
- ![Dara App](https://github.com/causalens/dara/blob/v1.16.9/img/components_gallery.png?raw=true)
100
+ ![Dara App](https://github.com/causalens/dara/blob/v1.16.9-alpha.1/img/components_gallery.png?raw=true)
102
101
 
103
102
  Note: `pip` installation uses [PEP 660](https://peps.python.org/pep-0660/) `pyproject.toml`-based editable installs which require `pip >= 21.3` and `setuptools >= 64.0.0`. You can upgrade both with:
104
103
 
@@ -115,9 +114,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
115
114
 
116
115
  | Dara App | Description |
117
116
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
118
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.16.9/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
119
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.16.9/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
120
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.16.9/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
117
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.16.9-alpha.1/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
118
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.16.9-alpha.1/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
119
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.16.9-alpha.1/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
121
120
 
122
121
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
123
122
 
@@ -144,9 +143,9 @@ And the supporting UI packages and tools.
144
143
  - `ui-utils` - miscellaneous utility functions
145
144
  - `ui-widgets` - widget components
146
145
 
147
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.16.9/CONTRIBUTING.md) file.
146
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.16.9-alpha.1/CONTRIBUTING.md) file.
148
147
 
149
148
  ## License
150
149
 
151
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.16.9/LICENSE).
150
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.16.9-alpha.1/LICENSE).
152
151
 
@@ -38,7 +38,7 @@ dara/core/internal/custom_response.py,sha256=aSPonh8AdRjioTk1MaPwdaJHkO4R4aG_osG
38
38
  dara/core/internal/dependency_resolution.py,sha256=y0CUop-RNNhwZLbafeqjhNEiTY549mLvDyNMTfvEl2Q,5456
39
39
  dara/core/internal/devtools.py,sha256=YmJdYKEqfxrpXFYAM5sJ2wUtUhfvaCMbb9PuDcqFdt4,2441
40
40
  dara/core/internal/download.py,sha256=2_fNIWDsV9f0BptTQRhBuIFXOO4th9pcYaIB7lsPcJU,3183
41
- dara/core/internal/encoder_registry.py,sha256=tq2ka9RjStEFsxTdsWF6kSOU7rycggEq8YfDlzSyzKk,11277
41
+ dara/core/internal/encoder_registry.py,sha256=oxsk1liCkN2Oqp4a8EyUxZ5JxIyXly-_UnliAnAhvng,11275
42
42
  dara/core/internal/execute_action.py,sha256=4lcU4ElyMlaybIv5oDlahsncJA4PM-6hLOKbtEpHPRI,7021
43
43
  dara/core/internal/hashing.py,sha256=bKskv9n7s83uYVRxva77EC9exMbMZudmWsrsTPmg8W8,1139
44
44
  dara/core/internal/import_discovery.py,sha256=rh9RS-NCkux_dShIe-XXjX2LiJQN8WiJ5cltrb0YlUE,7853
@@ -81,7 +81,7 @@ dara/core/metrics/cache.py,sha256=bGXwjO_rSc-FkS3PnPi1mvIZf1x-hvmG113dAUk1g-Y,26
81
81
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
82
82
  dara/core/metrics/utils.py,sha256=aKaa_hskV3M3h4xOGZYvegDLq_OWOEUlslkQKrrPQiI,2281
83
83
  dara/core/persistence.py,sha256=RaGiGQE3oIzEH7kHC1ZXji2VJa0aP0ewMjt1wRWYWjI,10634
84
- dara/core/umd/dara.core.umd.js,sha256=Ctt85jvKT_3vIdLI77j31IplDWcGBecQN2KKALPgzRc,4869322
84
+ dara/core/umd/dara.core.umd.js,sha256=QXsib_k_l_jk4L8DifMWiRJEsyNDgPw15epjGTGtm1U,4871647
85
85
  dara/core/umd/style.css,sha256=YQtQ4veiSktnyONl0CU1iU1kKfcQhreH4iASi1MP7Ak,4095007
86
86
  dara/core/visual/__init__.py,sha256=QN0wbG9HPQ_vXh8BO8DnBXeYLIENVTNtRmYzZf1lx7c,577
87
87
  dara/core/visual/components/__init__.py,sha256=4km21GLMLM2cr42SwehLUD7DJOlzvhwHl5hdG1OqmIM,2274
@@ -104,8 +104,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
104
104
  dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
105
105
  dara/core/visual/themes/definitions.py,sha256=nS_gQvOzCt5hTmj74d0_siq_9QWuj6wNuir4VCHy0Dk,2779
106
106
  dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
107
- dara_core-1.16.9.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
108
- dara_core-1.16.9.dist-info/METADATA,sha256=SLJiEjMYve8nbLJpZMuAlBvl2vT5wiSA-rPqAIMydJE,7470
109
- dara_core-1.16.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
110
- dara_core-1.16.9.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
111
- dara_core-1.16.9.dist-info/RECORD,,
107
+ dara_core-1.16.9a1.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
108
+ dara_core-1.16.9a1.dist-info/METADATA,sha256=wa4RebPpPygqfd5Lf2UJkaUbSeoc5CgWERyM-8kYygY,7514
109
+ dara_core-1.16.9a1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
110
+ dara_core-1.16.9a1.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
111
+ dara_core-1.16.9a1.dist-info/RECORD,,