dara-core 1.14.4__py3-none-any.whl → 1.14.6__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.
@@ -54995,6 +54995,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
54995
54995
  } else {
54996
54996
  localStorage.setItem(key, value);
54997
54997
  }
54998
+ if (__privateGet(this, _subscribers)[key]) {
54999
+ __privateGet(this, _subscribers)[key].forEach((cb) => cb(value));
55000
+ }
54998
55001
  }
54999
55002
  async replaceValue(key, fn) {
55000
55003
  if (__privateGet(this, _locks)[key]) {
@@ -55028,9 +55031,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
55028
55031
  callback(e3.newValue);
55029
55032
  }
55030
55033
  };
55034
+ __privateGet(this, _subscribers)[key].push(callback);
55031
55035
  window.addEventListener("storage", subFunc);
55032
55036
  return () => {
55033
55037
  window.removeEventListener("storage", subFunc);
55038
+ __privateGet(this, _subscribers)[key].splice(
55039
+ __privateGet(this, _subscribers)[key].findIndex((val) => val === callback),
55040
+ 1
55041
+ );
55034
55042
  };
55035
55043
  }
55036
55044
  }
@@ -56590,6 +56598,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
56590
56598
  type: "token_update"
56591
56599
  })
56592
56600
  );
56601
+ this.token = newToken;
56593
56602
  }
56594
56603
  }
56595
56604
  sendCustomMessage(kind, data, awaitResponse = false) {
@@ -60404,14 +60413,15 @@ Inferred class string: "${iconClasses}."`
60404
60413
  border-radius: 100px;
60405
60414
  }
60406
60415
  `;
60407
- function TemplateRoot() {
60416
+ function TemplateRoot(props) {
60408
60417
  var _a, _b, _c;
60409
60418
  const token = useSessionToken();
60419
+ const tokenRef = React.useRef(token);
60410
60420
  const { data: config2 } = useConfig();
60411
60421
  const { data: template, isLoading: templateLoading } = useTemplate(config2 == null ? void 0 : config2.template);
60412
60422
  const { data: actions, isLoading: actionsLoading } = useActions();
60413
60423
  const { data: components, isLoading: componentsLoading, refetch: refetchComponents } = useComponents();
60414
- const [wsClient, setWsClient] = React.useState();
60424
+ const [wsClient, setWsClient] = React.useState(props.initialWebsocketClient);
60415
60425
  React.useEffect(() => {
60416
60426
  cleanSessionCache(token);
60417
60427
  }, [token]);
@@ -60420,6 +60430,7 @@ Inferred class string: "${iconClasses}."`
60420
60430
  return;
60421
60431
  }
60422
60432
  return onTokenChange((newToken) => {
60433
+ tokenRef.current = newToken;
60423
60434
  wsClient.updateToken(newToken);
60424
60435
  });
60425
60436
  }, [wsClient]);
@@ -60430,12 +60441,12 @@ Inferred class string: "${iconClasses}."`
60430
60441
  }, [config2 == null ? void 0 : config2.title]);
60431
60442
  React.useEffect(() => {
60432
60443
  if (config2) {
60433
- setWsClient(setupWebsocket(token, config2.live_reload));
60444
+ setWsClient(setupWebsocket(tokenRef.current, config2.live_reload));
60434
60445
  }
60435
60446
  return () => {
60436
60447
  wsClient == null ? void 0 : wsClient.close();
60437
60448
  };
60438
- }, [token, config2 == null ? void 0 : config2.live_reload]);
60449
+ }, [tokenRef, config2 == null ? void 0 : config2.live_reload]);
60439
60450
  if (templateLoading || actionsLoading || componentsLoading) {
60440
60451
  return null;
60441
60452
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.14.4
3
+ Version: 1.14.6
4
4
  Summary: Dara Framework Core
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -20,10 +20,10 @@ 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.14.4)
24
- Requires-Dist: croniter (>=1.0.15,<2.0.0)
23
+ Requires-Dist: create-dara-app (==1.14.6)
24
+ Requires-Dist: croniter (>=1.0.15,<3.0.0)
25
25
  Requires-Dist: cryptography (>=42.0.4)
26
- Requires-Dist: dara-components (==1.14.4) ; extra == "all"
26
+ Requires-Dist: dara-components (==1.14.6) ; extra == "all"
27
27
  Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0)
28
28
  Requires-Dist: fastapi (==0.109.0)
29
29
  Requires-Dist: fastapi-vite (==0.3.1)
@@ -51,7 +51,7 @@ Description-Content-Type: text/markdown
51
51
 
52
52
  # Dara Application Framework
53
53
 
54
- <img src="https://github.com/causalens/dara/blob/v1.14.4/img/dara_light.svg?raw=true">
54
+ <img src="https://github.com/causalens/dara/blob/v1.14.6/img/dara_light.svg?raw=true">
55
55
 
56
56
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
57
57
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -96,7 +96,7 @@ source .venv/bin/activate
96
96
  dara start
97
97
  ```
98
98
 
99
- ![Dara App](https://github.com/causalens/dara/blob/v1.14.4/img/components_gallery.png?raw=true)
99
+ ![Dara App](https://github.com/causalens/dara/blob/v1.14.6/img/components_gallery.png?raw=true)
100
100
 
101
101
  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:
102
102
 
@@ -113,9 +113,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
113
113
 
114
114
  | Dara App | Description |
115
115
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
116
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.14.4/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
117
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.14.4/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 |
118
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.14.4/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. |
116
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.14.6/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
117
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.14.6/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 |
118
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.14.6/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. |
119
119
 
120
120
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
121
121
 
@@ -142,9 +142,9 @@ And the supporting UI packages and tools.
142
142
  - `ui-utils` - miscellaneous utility functions
143
143
  - `ui-widgets` - widget components
144
144
 
145
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.14.4/CONTRIBUTING.md) file.
145
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.14.6/CONTRIBUTING.md) file.
146
146
 
147
147
  ## License
148
148
 
149
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.14.4/LICENSE).
149
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.14.6/LICENSE).
150
150
 
@@ -81,7 +81,7 @@ dara/core/metrics/cache.py,sha256=ybofUhZO0TCHeyhB_AtldWk1QTmTKh7GucTXpOkeTFA,25
81
81
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
82
82
  dara/core/metrics/utils.py,sha256=rYlBinxFc7VehFT5cTNXLk8gC74UEj7ZGq6vLgIDpSg,2247
83
83
  dara/core/persistence.py,sha256=TO94rPAN7jxZKVCC5YA4eE7GGDoNlCPe-BkkItV2VUE,10379
84
- dara/core/umd/dara.core.umd.js,sha256=G4PJcloF4i2VPJvRxjE2ACk9CKkoLY0wm-0Yx0pA6EE,4878257
84
+ dara/core/umd/dara.core.umd.js,sha256=W3h6YomUxrDAGy-mTKuZHYwnHobad-y6F9BGk6j21Z0,4878770
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=O-Em_glGdZNO0LLl2RWmJSrQiXKxliXg_PuhVXGT81I,1811
@@ -105,8 +105,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
105
105
  dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
106
106
  dara/core/visual/themes/definitions.py,sha256=m3oN0txs65MZepqjj7AKMMxybf2aq5fTjcTwJmHqEbk,2744
107
107
  dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
108
- dara_core-1.14.4.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
- dara_core-1.14.4.dist-info/METADATA,sha256=qhIorm6FB5Archjzvz_htUrVrj67YAScouZope18A1s,7383
110
- dara_core-1.14.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
- dara_core-1.14.4.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
- dara_core-1.14.4.dist-info/RECORD,,
108
+ dara_core-1.14.6.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
+ dara_core-1.14.6.dist-info/METADATA,sha256=Bs5Xh3miO83sW7WtixrnUDUrlMxXw8wNrd1J0jNYvdY,7383
110
+ dara_core-1.14.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
+ dara_core-1.14.6.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
+ dara_core-1.14.6.dist-info/RECORD,,